phanpy-cz/assets/fuse-7xj_Hrid.js

184 lines
200 KiB
JavaScript
Raw Permalink Normal View History

import{Z as ot,E as De,c as s,h as te,q as Ie,A as j,_ as pn,y as se,$ as bn,o as St,a0 as I,a1 as ma,a2 as Gn,a3 as ga,T as fe,D as kt,p as Di,a4 as va,a5 as Ri,F as Ni,k as U,x as it,K as st,i as ya,s as W,a6 as _a,a as Xn,n as ba,a7 as Fi,a8 as wa,a9 as zi,j as fo,L as Hi,g as ho,aa as Ta,ab as Pe,ac as Ea,ad as xa,ae as Dn,w as tt,u as wn,d as Zo,b as Ze,J as Vi,af as Ma,ag as Sa,ah as ka}from"./useTitle-4zhrJw0D.js";import{e as Aa}from"./tinyld-light-PxOyhYWY.js";import{m as Ia}from"./index-ELVm98zU.js";function Kr(){return Kr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Kr.apply(this,arguments)}var ji=["shift","alt","meta","mod","ctrl"],$a={esc:"escape",return:"enter",".":"period",",":"comma","-":"slash"," ":"space","`":"backquote","#":"backslash","+":"bracketright",ShiftLeft:"shift",ShiftRight:"shift",AltLeft:"alt",AltRight:"alt",MetaLeft:"meta",MetaRight:"meta",OSLeft:"meta",OSRight:"meta",ControlLeft:"ctrl",ControlRight:"ctrl"};function ht(e){return($a[e]||e).trim().toLowerCase().replace(/key|digit|numpad|arrow/,"")}function La(e){return ji.includes(e)}function xr(e,t){return t===void 0&&(t=","),e.split(t)}function Mr(e,t,n){t===void 0&&(t="+");var r=e.toLocaleLowerCase().split(t).map(function(a){return ht(a)}),o={alt:r.includes("alt"),ctrl:r.includes("ctrl")||r.includes("control"),shift:r.includes("shift"),meta:r.includes("meta"),mod:r.includes("mod")},i=r.filter(function(a){return!ji.includes(a)});return Kr({},o,{keys:i,description:n})}(function(){typeof document<"u"&&(document.addEventListener("keydown",function(e){e.key!==void 0&&Bi([ht(e.key),ht(e.code)])}),document.addEventListener("keyup",function(e){e.key!==void 0&&Ui([ht(e.key),ht(e.code)])})),typeof window<"u"&&window.addEventListener("blur",function(){pt.clear()})})();var pt=new Set;function po(e){return Array.isArray(e)}function Ca(e,t){t===void 0&&(t=",");var n=po(e)?e:e.split(t);return n.every(function(r){return pt.has(r.trim().toLowerCase())})}function Bi(e){var t=Array.isArray(e)?e:[e];pt.has("meta")&&pt.forEach(function(n){return!La(n)&&pt.delete(n.toLowerCase())}),t.forEach(function(n){return pt.add(n.toLowerCase())})}function Ui(e){var t=Array.isArray(e)?e:[e];e==="meta"?pt.clear():t.forEach(function(n){return pt.delete(n.toLowerCase())})}function Pa(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function Oa(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function Da(e){return Wi(e,["input","textarea","select"])}function Wi(e,t){var n=e.target;t===void 0&&(t=!1);var r=n&&n.tagName;return po(t)?!!(r&&t&&t.some(function(o){return o.toLowerCase()===r.toLowerCase()})):!!(r&&t&&t===!0)}function Ra(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a <HotkeysProvider>'),!0):t?e.some(function(n){return t.includes(n)})||e.includes("*"):!0}var Na=function(t,n,r){r===void 0&&(r=!1);var o=n.alt,i=n.meta,a=n.mod,u=n.shift,c=n.ctrl,l=n.keys,f=t.key,d=t.code,p=t.ctrlKey,m=t.metaKey,h=t.shiftKey,g=t.altKey,y=ht(d),T=f.toLowerCase();if(!(l!=null&&l.includes(y))&&!(l!=null&&l.includes(T))&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(y))return!1;if(!r){if(o===!g&&T!=="alt"||u===!h&&T!=="shift")return!1;if(a){if(!m&&!p)return!1}else if(i===!m&&T!=="meta"&&T!=="os"||c===!p&&T!=="ctrl"&&T!=="control")return!1}return l&&l.length===1&&(l.includes(T)||l.includes(y))?!0:l?Ca(l):!l},Fa=ot(void 0),za=function(){return De(Fa)};function Ki(e,t){return e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(e).length===Object.keys(t).length&&Object.keys(e).reduce(function(n,r){return n&&Ki(e[r],t[r])},!0):e===t}var Ha=ot({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),Va=function(){return De(Ha)};function ja(e){var t=j(void 0);return Ki(t.current,e)||(t.current=e),t.current}var Yo=functi
* Toastify js 1.12.0
* https://github.com/apvarun/toastify-js
* @license MIT licensed
*
* Copyright (C) 2018 Varun A P
*/var mf=mo.exports;(function(e){(function(t,n){e.exports?e.exports=n():t.Toastify=n()})(bn,function(t){var n=function(a){return new n.lib.init(a)},r="1.12.0";n.defaults={oldestFirst:!0,text:"Toastify is awesome!",node:void 0,duration:3e3,selector:void 0,callback:function(){},destination:void 0,newWindow:!1,close:!1,gravity:"toastify-top",positionLeft:!1,position:"",backgroundColor:"",avatar:"",className:"",stopOnFocus:!0,onClick:function(){},offset:{x:0,y:0},escapeMarkup:!0,ariaLive:"polite",style:{background:""}},n.lib=n.prototype={toastify:r,constructor:n,init:function(a){return a||(a={}),this.options={},this.toastElement=null,this.options.text=a.text||n.defaults.text,this.options.node=a.node||n.defaults.node,this.options.duration=a.duration===0?0:a.duration||n.defaults.duration,this.options.selector=a.selector||n.defaults.selector,this.options.callback=a.callback||n.defaults.callback,this.options.destination=a.destination||n.defaults.destination,this.options.newWindow=a.newWindow||n.defaults.newWindow,this.options.close=a.close||n.defaults.close,this.options.gravity=a.gravity==="bottom"?"toastify-bottom":n.defaults.gravity,this.options.positionLeft=a.positionLeft||n.defaults.positionLeft,this.options.position=a.position||n.defaults.position,this.options.backgroundColor=a.backgroundColor||n.defaults.backgroundColor,this.options.avatar=a.avatar||n.defaults.avatar,this.options.className=a.className||n.defaults.className,this.options.stopOnFocus=a.stopOnFocus===void 0?n.defaults.stopOnFocus:a.stopOnFocus,this.options.onClick=a.onClick||n.defaults.onClick,this.options.offset=a.offset||n.defaults.offset,this.options.escapeMarkup=a.escapeMarkup!==void 0?a.escapeMarkup:n.defaults.escapeMarkup,this.options.ariaLive=a.ariaLive||n.defaults.ariaLive,this.options.style=a.style||n.defaults.style,a.backgroundColor&&(this.options.style.background=a.backgroundColor),this},buildToast:function(){if(!this.options)throw"Toastify is not initialized";var a=document.createElement("div");a.className="toastify on "+this.options.className,this.options.position?a.className+=" toastify-"+this.options.position:this.options.positionLeft===!0?(a.className+=" toastify-left",console.warn("Property `positionLeft` will be depreciated in further versions. Please use `position` instead.")):a.className+=" toastify-right",a.className+=" "+this.options.gravity,this.options.backgroundColor&&console.warn('DEPRECATION NOTICE: "backgroundColor" is being deprecated. Please use the "style.background" property.');for(var u in this.options.style)a.style[u]=this.options.style[u];if(this.options.ariaLive&&a.setAttribute("aria-live",this.options.ariaLive),this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE)a.appendChild(this.options.node);else if(this.options.escapeMarkup?a.innerText=this.options.text:a.innerHTML=this.options.text,this.options.avatar!==""){var c=document.createElement("img");c.src=this.options.avatar,c.className="toastify-avatar",this.options.position=="left"||this.options.positionLeft===!0?a.appendChild(c):a.insertAdjacentElement("afterbegin",c)}if(this.options.close===!0){var l=document.createElement("button");l.type="button",l.setAttribute("aria-label","Close"),l.className="toast-close",l.innerHTML="&#10006;",l.addEventListener("click",(function(y){y.stopPropagation(),this.removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)}).bind(this));var f=window.innerWidth>0?window.innerWidth:screen.width;(this.options.position=="left"||this.options.positionLeft===!0)&&f>360?a.insertAdjacentElement("afterbegin",l):a.appendChild(l)}if(this.options.stopOnFocus&&this.options.duration>0){var d=this;a.addEventListener("mouseover",function(y){window.clearTimeout(a.timeOutValue)}),a.addEventListener("mouseleave",function(){a.timeOutValue=window.setTimeout(function(){d.removeElement(a)},d.options.duration)})}if(typeof this.options.destination<"u"&&a.addEventListener("click",(function(y){y.stopPropagation(),this.options.newWindow===!0?window.open(this.options.destination,"_blank"):window.location=this.options.destination
`)),d.innerHTML=`<code>${f.innerHTML.trim()}</code>`,f.replaceWith(d)}),u&&[...i.querySelectorAll("p")].filter(d=>/^```/g.test(d.innerText)).forEach(d=>{const p=[d];let m=!1,h=d;for(;h.nextElementSibling;){const g=h.nextElementSibling;if(g&&g.tagName==="P")if(/```$/g.test(g.innerText)){p.push(g),m=!0;break}else p.push(g);else break;h=g}if(m){const g=document.createElement("pre");p.forEach(T=>{T.querySelectorAll("br").forEach(_=>_.replaceWith(`
`))});const y=p.map(T=>T.innerHTML).join(`
`);g.innerHTML=`<code tabindex="0">${y}</code>`,d.replaceWith(g),p.forEach(T=>T.remove())}}),o.includes("`")&&(c=Or(i),c.forEach(l=>{let f=l.nodeValue.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");/`[^`]+`/g.test(f)&&(f=f.replaceAll(/(`[^]+?`)/g,"<code>$1</code>")),Pt.innerHTML=f,l.replaceWith(...Pt.childNodes)})),/twitter\.com/i.test(o)&&(c=Or(i,{rejectFilter:["A"]}),c.forEach(l=>{let f=l.nodeValue.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");/@[a-zA-Z0-9_]+@twitter\.com/g.test(f)&&(f=f.replaceAll(/(@([a-zA-Z0-9_]+)@twitter\.com)/g,'<a href="https://twitter.com/$2" rel="nofollow noopener noreferrer" target="_blank">$1</a>')),Pt.innerHTML=f,l.replaceWith(...Pt.childNodes)})),o.includes("#")){let l=null;const f=[...i.querySelectorAll("p")].filter((d,p)=>{let m=0;for(let h=0;h<d.childNodes.length;h++){const g=d.childNodes[h];if(g.nodeType===Node.TEXT_NODE){if(g.textContent.trim()!=="")return!1}else if(g.tagName!=="BR")if(g.tagName==="A"){const y=g.textContent.trim();if(!y||!y.startsWith("#"))return!1;m++}else return!1}if(m>3||m>1&&l&&p===l+1)return l=p,!0});f!=null&&f.length&&f.forEach(d=>{d.classList.add("hashtag-stuffing"),d.title=d.innerText})}return o.includes("<img")&&i.querySelectorAll("img").forEach(l=>{const f=l.getAttribute("width")||l.naturalWidth,d=l.getAttribute("height")||l.naturalHeight;f&&d&&l.style.setProperty("--original-aspect-ratio",`${f}/${d}`)}),r&&queueMicrotask(()=>r(i)),o=i.innerHTML,o}const ws=st(xl),Ml=["STYLE","IMG","VIDEO","AUDIO","AREA","MAP","TRACK","EMBED","IFRAME","OBJECT","PICTURE","PORTAL","SOURCE","SVG","MATH","CANVAS","NOSCRIPT","SCRIPT","INPUT","OPTION","TEXTAREA","SLOT","TEMPLATE"],Sl=Object.fromEntries(Ml.map(e=>[e,!0])),kl=/^(https?:\/\/(www\.)?|xmpp:)/,Pr=30;function Al(e){var t;if(!(!e||(t=e.querySelector)!=null&&t.call(e,"*")))try{const n=e.innerText.trim(),r=(n.match(kl)||[])[0]||"";if(!r)return;const o=n.slice(r.length,r.length+Pr),i=n.slice(r.length+Pr),a=n.slice(r.length).length>Pr;e.innerHTML=`<span class="invisible">${r}</span><span class=${a?"ellipsis":""}>${o}</span><span class="invisible">${i}</span>`}catch{}}function Or(e,t={}){var a;const n=[],r=Object.assign({},Sl,(a=t.rejectFilter)==null?void 0:a.reduce((u,c)=>(u[c]=!0,u),{})),o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode(u){return r[u.parentNode.nodeName]?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}},!1);let i;for(;i=o.nextNode();)n.push(i);return n}const Ot=document.createElement("div");function Il(e,t){if(!e)return"";const{preProcess:n}=t||{};return Ot.innerHTML=e.replace(/<\/p>/g,`</p>
`).replace(/<\/li>/g,`</li>
`),Ot.querySelectorAll("br").forEach(r=>{r.replaceWith(`
`)}),n==null||n(Ot),Ot.querySelectorAll(".invisible").forEach(r=>{r.remove()}),Ot.querySelectorAll(".ellipsis").forEach(r=>{r.append("...")}),Ot.innerText.replace(/[\r\n]{3,}/g,`
`).trim()}const cr=st(Il);function $l(e){const{mentions:t=[],instance:n,previewMode:r,statusURL:o}=e||{};return i=>{var f,d;let{target:a}=i;if(a=a.closest("a"),!a||i.metaKey||i.ctrlKey||i.shiftKey||i.altKey||i.which===2)return;const u=(f=a.previousSibling)==null?void 0:f.textContent,c=u==null?void 0:u.endsWith("@"),l=a.innerText.startsWith("@");if((a.classList.contains("u-url")||a.classList.contains("mention"))&&l||c&&!l){const p=(a.querySelector("span")||a).innerText.trim(),m=p.replace(/^@/,""),h=a.getAttribute("href"),g=t.find(y=>y.url===h)||t.find(y=>y.acct===m||y.username===m);if(g)i.preventDefault(),i.stopPropagation(),W.showAccount={account:g.acct,instance:n};else if(!/^http/i.test(p)){i.preventDefault(),i.stopPropagation();const y=a.getAttribute("href");W.showAccount={account:y,instance:n}}}else if(!r){const p=u==null?void 0:u.endsWith("#");if(a.classList.contains("hashtag")||p){i.preventDefault(),i.stopPropagation();const m=a.innerText.replace(/^#/,"").trim(),h=n?`#/${n}/t/${m}`:`#/t/${m}`;location.hash=h}else(d=W.unfurledLinks[a.href])!=null&&d.url&&o!==a.href&&(i.preventDefault(),i.stopPropagation(),W.prevLocation={pathname:location.hash.replace(/^#/,"")},location.hash=`#${W.unfurledLinks[a.href].url}`)}}}const{locale:Ll}=new Intl.DateTimeFormat().resolvedOptions(),Cl=e=>{const{dateYear:t,hideTime:n,formatOpts:r}=e||{},o=new Date().getFullYear();return Intl.DateTimeFormat(Ll,{year:t===o?void 0:"numeric",month:"short",day:"numeric",hour:n?void 0:"numeric",minute:n?void 0:"numeric",...r})},Pl=st(Cl);function yn(e,t){return e instanceof Date||(e=new Date(e)),Pl({dateYear:e.getFullYear(),...t}).format(e)}const{locale:Ol}=Intl.NumberFormat().resolvedOptions(),mt=Intl.NumberFormat(Ol,{notation:"compact",roundingMode:"floor"}).format,ci=5e3;function zn(e){if(e||(e=!0),W.showCompose){W.composerState.minimized?$e({duration:ci,text:"A draft post is currently minimized. Post or discard it before creating a new one."}):$e({duration:ci,text:"A post is currently open. Post or discard it before creating a new one."});return}Ya(),W.showCompose=e}function Af({skeleton:e,account:t,avatarSize:n="xl",useAvatarStatic:r=!1,instance:o,external:i,internal:a,onClick:u,showActivity:c=!1,showStats:l=!1,accountInstance:f,hideDisplayName:d=!1,relationship:p={},excludeRelationshipAttrs:m=[]}){if(e)return s("div",{class:"account-block skeleton",children:[s(nt,{size:n}),s("span",{children:[s("b",{children:"████████"}),s("br",{}),s("span",{class:"account-block-acct",children:"██████"})]})]});if(!t)return null;const{id:h,acct:g,avatar:y,avatarStatic:T,displayName:_,username:E,emojis:w,url:b,statusesCount:M,lastStatusAt:A,bot:O,fields:P,note:x,group:S,followersCount:V,createdAt:B,locked:D}=t;let[$,k,R]=g.match(/([^@]+)(@.+)/i)||[,g];f&&(R=`@${f}`);const L=P==null?void 0:P.find(C=>!!C.verifiedAt&&!!C.value),z={};for(const C in p)m.includes(C)||(z[C]=p[C]);const F=z.following||z.followedBy||z.requested;return s("a",{class:"account-block",href:b,target:i?"_blank":null,title:R?g:`@${g}`,onClick:C=>{if(!i){if(C.preventDefault(),u)return u(C);a?location.hash=`/${o}/a/${h}`:W.showAccount={account:t,instance:o}}},children:[s(nt,{url:r?T:y||T,size:n,squircle:O}),s("span",{class:"account-block-content",children:[!d&&s(U,{children:_?s("b",{children:s(Bt,{text:_,emojis:w})}):s("b",{children:E})})," ",s("span",{class:"account-block-acct bidi-isolate",children:[R?"":"@",k,s("wbr",{}),R,D&&s(U,{children:[" ",s(H,{icon:"lock",size:"s",alt:"Locked"})]})]}),c&&s("div",{class:"account-block-stats",children:["Posts: ",mt(M),!!A&&s(U,{children:[" ","· Last posted:"," ",yn(A,{hideTime:!0})]})]}),l&&s("div",{class:"account-block-stats",children:[O&&s(U,{children:s("span",{class:"tag collapsed",children:[s(H,{icon:"bot"})," Automated"]})}),!!S&&s(U,{children:s("span",{class:"tag collapsed",children:[s(H,{icon:"group"})," Group"]})}),F&&s("div",{class:"shazam-container-horizontal",children:s("div",{class:"shazam-container-inner",children:z.following&&z.followedBy?s("span",{class:"tag minimal",children:"Mutual"}):z.requested?s("span",{class:
<style ${n}>
:host {
contain: content;
display: block;
position: relative;
width: 100%;
padding-bottom: calc(100% / (16 / 9));
}
@media (max-width: 40em) {
:host([short]) {
padding-bottom: calc(100% / (9 / 16));
}
}
#frame, #fallbackPlaceholder, iframe {
position: absolute;
width: 100%;
height: 100%;
left: 0;
}
#frame {
cursor: pointer;
}
#fallbackPlaceholder {
object-fit: cover;
}
#frame::before {
content: '';
display: block;
position: absolute;
top: 0;
background-image: linear-gradient(180deg, #111 -20%, transparent 90%);
height: 60px;
width: 100%;
z-index: 1;
}
#playButton {
width: 68px;
height: 48px;
background-color: transparent;
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 68 48"><path d="M66.52 7.74c-.78-2.93-2.49-5.41-5.42-6.19C55.79.13 34 0 34 0S12.21.13 6.9 1.55c-2.93.78-4.63 3.26-5.42 6.19C.06 13.05 0 24 0 24s.06 10.95 1.48 16.26c.78 2.93 2.49 5.41 5.42 6.19C12.21 47.87 34 48 34 48s21.79-.13 27.1-1.55c2.93-.78 4.64-3.26 5.42-6.19C67.94 34.95 68 24 68 24s-.06-10.95-1.48-16.26z" fill="red"/><path d="M45 24 27 14v20" fill="white"/></svg>');
z-index: 1;
border: 0;
border-radius: inherit;
}
#playButton:before {
content: '';
border-style: solid;
border-width: 11px 0 11px 19px;
border-color: transparent transparent transparent #fff;
}
#playButton,
#playButton:before {
position: absolute;
top: 50%;
left: 50%;
transform: translate3d(-50%, -50%, 0);
cursor: inherit;
}
/* Post-click styles */
.activated {
cursor: unset;
}
#frame.activated::before,
#frame.activated > #playButton {
display: none;
}
</style>
<div id="frame">
<picture>
<source id="webpPlaceholder" type="image/webp">
<source id="jpegPlaceholder" type="image/jpeg">
<img id="fallbackPlaceholder" referrerpolicy="origin" loading="lazy">
</picture>
<button id="playButton"></button>
</div>
`,this.domRefFrame=t.querySelector("#frame"),this.domRefImg={fallback:t.querySelector("#fallbackPlaceholder"),webp:t.querySelector("#webpPlaceholder"),jpeg:t.querySelector("#jpegPlaceholder")},this.domRefPlayButton=t.querySelector("#playButton")}setupComponent(){this.initImagePlaceholder(),this.domRefPlayButton.setAttribute("aria-label",`${this.videoPlay}: ${this.videoTitle}`),this.setAttribute("title",`${this.videoPlay}: ${this.videoTitle}`),(this.autoLoad||this.isYouTubeShort())&&this.initIntersectionObserver()}attributeChangedCallback(t,n,r){switch(t){case"videoid":case"playlistid":case"videoTitle":case"videoPlay":{n!==r&&(this.setupComponent(),this.domRefFrame.classList.contains("activated")&&(this.domRefFrame.classList.remove("activated"),this.shadowRoot.querySelector("iframe").remove(),this.isIframeLoaded=!1));break}default:break}}addIframe(t=!1){if(!this.isIframeLoaded){let n=t?0:1;const r=this.noCookie?"-nocookie":"";let o;this.playlistId?o=`?listType=playlist&list=${this.playlistId}&`:o=`${this.videoId}?`,this.isYouTubeShort()&&(this.params=`loop=1&mute=1&modestbranding=1&playsinline=1&rel=0&enablejsapi=1&playlist=${this.videoId}`,n=1);const i=`
<iframe frameborder="0" title="${this.videoTitle}"
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen
src="https://www.youtube${r}.com/embed/${o}autoplay=${n}&${this.params}"
></iframe>`;this.domRefFrame.insertAdjacentHTML("beforeend",i),this.domRefFrame.classList.add("activated"),this.isIframeLoaded=!0,this.attemptShortAutoPlay(),this.dispatchEvent(new CustomEvent("liteYoutubeIframeLoaded",{detail:{videoId:this.videoId},bubbles:!0,cancelable:!0}))}}initImagePlaceholder(){var r,o;const t=`https://i.ytimg.com/vi_webp/${this.videoId}/${this.posterQuality}.webp`,n=`https://i.ytimg.com/vi/${this.videoId}/${this.posterQuality}.jpg`;this.domRefImg.fallback.loading=this.posterLoading,this.domRefImg.webp.srcset=t,this.domRefImg.jpeg.srcset=n,this.domRefImg.fallback.src=n,this.domRefImg.fallback.setAttribute("aria-label",`${this.videoPlay}: ${this.videoTitle}`),(o=(r=this.domRefImg)==null?void 0:r.fallback)==null||o.setAttribute("alt",`${this.videoPlay}: ${this.videoTitle}`)}initIntersectionObserver(){const t={root:null,rootMargin:"0px",threshold:0};new IntersectionObserver((r,o)=>{r.forEach(i=>{i.isIntersecting&&!this.isIframeLoaded&&(Be.warmConnections(),this.addIframe(!0),o.unobserve(this))})},t).observe(this)}attemptShortAutoPlay(){this.isYouTubeShort()&&setTimeout(()=>{var t,n;(n=(t=this.shadowRoot.querySelector("iframe"))==null?void 0:t.contentWindow)==null||n.postMessage('{"event":"command","func":"playVideo","args":""}',"*")},2e3)}isYouTubeShort(){return this.getAttribute("short")===""&&window.matchMedia("(max-width: 40em)").matches}static addPrefetch(t,n){const r=document.createElement("link");r.rel=t,r.href=n,r.crossOrigin="true",document.head.append(r)}static warmConnections(){Be.isPreconnected||window.liteYouTubeIsPreconnected||(Be.addPrefetch("preconnect","https://i.ytimg.com/"),Be.addPrefetch("preconnect","https://s.ytimg.com"),Be.addPrefetch("preconnect","https://www.youtube.com"),Be.addPrefetch("preconnect","https://www.google.com"),Be.addPrefetch("preconnect","https://googleads.g.doubleclick.net"),Be.addPrefetch("preconnect","https://static.doubleclick.net"),Be.isPreconnected=!0,window.liteYouTubeIsPreconnected=!0)}}Be.isPreconnected=!1;customElements.define("lite-youtube",Be);const As=new Uint8Array(128);for(let e=0;e<83;e++)As["0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz#$%*+,-.:;=?@[]^_{|}~".charCodeAt(e)]=e;const Yn=(e,t,n)=>{let r=0;for(;t<n;)r*=83,r+=As[e.charCodeAt(t++)];return r},Is=Math.pow,_n=Math.PI,hu=_n*2,$s=3294.6,Ls=269.025,pu=e=>e>10.31475?Is(e/Ls+.052132,2.4):e/$s,Fr=e=>~~(e>1227e-8?Ls*Is(e,.416666)-13.025:e*$s+1),hn=e=>(e<0?-1:1)*e*e,mi=e=>{for(e+=_n/2;e>_n;)e-=hu;const t=1.27323954*e-.405284735*hn(e);return .225*(hn(t)-t)+t};function xo(e){const t=Yn(e,2,6);return[t>>16,t>>8&255,t&255]}function mu(e,t,n,r){const o=Yn(e,0,1),i=o%9+1,a=~~(o/9)+1,u=i*a;let c=0,l=0,f=0,d=0,p=0,m=0,h=0,g=0,y=0,T=0,_=0,E=0;const w=(Yn(e,1,2)+1)/13446*(r|1),b=new Float64Array(u*3),M=xo(e);for(c=0;c<3;c++)b[c]=pu(M[c]);for(c=1;c<u;c++)E=Yn(e,4+c*2,6+c*2),b[c*3]=hn(~~(E/361)-9)*w,b[c*3+1]=hn(~~(E/19)%19-9)*w,b[c*3+2]=hn(E%19-9)*w;const A=new Float64Array(a*n),O=new Float64Array(i*t);for(l=0;l<a;l++)for(d=0;d<n;d++)A[l*n+d]=mi(_n*d*l/n);for(c=0;c<i;c++)for(f=0;f<t;f++)O[c*t+f]=mi(_n*f*c/t);const P=t*4,x=new Uint8ClampedArray(P*n);for(d=0;d<n;d++)for(f=0;f<t;f++){for(p=m=h=0,l=0;l<a;l++)for(y=A[l*n+d],c=0;c<i;c++)g=O[c*t+f]*y,T=(c+l*i)*3,p+=b[T]*g,m+=b[T+1]*g,h+=b[T+2]*g;_=4*f+d*P,x[_]=Fr(p),x[_+1]=Fr(m),x[_+2]=Fr(h),x[_+3]=255}return x}const gu=(e,t={})=>{const n=t.char||" ",r=t.count||2;let o=0;const i=[];return e.reverse().reduce((a,u)=>{i.length&&o&&i[o]&&i[o]===u.substring(1,i[o].length+1)&&(i.splice(o,1),o--);const l=[`${n.repeat(o?o*r:0)}${u}`,...a];return u.substring(0,2)==="</"&&(o++,i[o]=u.substring(2,u.length-1)),l},[]).join(`
`)};var vu=gu;const Cs=e=>e.trim().replace(/(^(\s|\t)+|(( |\t)+)$)/gm,""),yu=e=>{const t=Cs(e).split(`
`),n=[];let r="";for(let o=0;o<t.length;o+=1){const i=t[o];if(i.endsWith("/>")){n.push(`${r}${i.slice(0,-2)} />`),r="";continue}if(i.endsWith(">")){n.push(`${r}${i.startsWith(">")||i.startsWith("<")?"":" "}${i}`),r="";continue}r+=r.length?` ${i}`:i}return n};var _u={mergeAttributesWithElements:yu,removeEmptyLines:Cs};const bu=vu,{mergeAttributesWithElements:wu}=_u,Tu=(e,t={})=>{const n=wu(e);return bu(n,t)};var Eu=Tu;const xu=St(Eu);var cn=(e=>(e.Mouse="mouse",e.Touch="touch",e.Pointer="pointer",e))(cn||{}),ln=(e=>(e.CancelledByMovement="cancelled-by-movement",e.CancelledByRelease="cancelled-by-release",e.CancelledOutsideElement="cancelled-outside-element",e))(ln||{});const Ps=()=>typeof window=="object"?(window==null?void 0:window.PointerEvent)??null:null,Mu=()=>typeof window=="object"?(window==null?void 0:window.TouchEvent)??null:null;function Os(e){const{nativeEvent:t}=e,n=Mu();return n&&t instanceof n||"touches"in e}function Ds(e){const t=Ps();return e.nativeEvent instanceof MouseEvent&&!(t&&e.nativeEvent instanceof t)}function Rs(e){const{nativeEvent:t}=e;if(!t)return!1;const n=Ps();return n&&t instanceof n||"pointerId"in t}function gi(e){return Ds(e)||Os(e)||Rs(e)}function vi(e){return Os(e)?{x:e.touches[0].pageX,y:e.touches[0].pageY}:Ds(e)||Rs(e)?{x:e.pageX,y:e.pageY}:null}function Su(e){return{target:e.target,currentTarget:e.currentTarget,nativeEvent:e,persist:()=>{}}}function Ns(e,{threshold:t=400,captureEvent:n=!1,detect:r=cn.Pointer,cancelOnMovement:o=!1,cancelOutsideElement:i=!0,filterEvents:a,onStart:u,onMove:c,onFinish:l,onCancel:f}={}){const d=j(!1),p=j(!1),m=j(),h=j(),g=j(e),y=j(null),T=Ie(b=>M=>{p.current||gi(M)&&(a!==void 0&&!a(M)||(n&&M.persist(),u==null||u(M,{context:b}),y.current=vi(M),p.current=!0,m.current=M.currentTarget,h.current=setTimeout(()=>{g.current&&(g.current(M,{context:b}),d.current=!0)},t)))},[n,a,u,t]),_=Ie(b=>(M,A)=>{gi(M)&&p.current&&(y.current=null,n&&M.persist(),d.current?l==null||l(M,{context:b}):p.current&&(f==null||f(M,{context:b,reason:A??ln.CancelledByRelease})),d.current=!1,p.current=!1,h.current!==void 0&&clearTimeout(h.current))},[n,l,f]),E=Ie(b=>M=>{if(c==null||c(M,{context:b}),o!==!1&&y.current){const A=vi(M);if(A){const O=o===!0?25:o,P={x:Math.abs(A.x-y.current.x),y:Math.abs(A.y-y.current.y)};(P.x>O||P.y>O)&&_(b)(M,ln.CancelledByMovement)}}},[_,o,c]),w=Ie(b=>{if(e===null)return{};switch(r){case cn.Mouse:{const M={onMouseDown:T(b),onMouseMove:E(b),onMouseUp:_(b)};return i&&(M.onMouseLeave=A=>{_(b)(A,ln.CancelledOutsideElement)}),M}case cn.Touch:return{onTouchStart:T(b),onTouchMove:E(b),onTouchEnd:_(b)};case cn.Pointer:{const M={onPointerDown:T(b),onPointerMove:E(b),onPointerUp:_(b)};return i&&(M.onPointerLeave=A=>_(b)(A,ln.CancelledOutsideElement)),M}}},[e,_,i,r,E,T]);return se(()=>{if(!window)return;function b(M){const A=Su(M);_()(A)}return window.addEventListener("mouseup",b),window.addEventListener("touchend",b),window.addEventListener("pointerup",b),()=>{window.removeEventListener("mouseup",b),window.removeEventListener("touchend",b),window.removeEventListener("pointerup",b)}},[_]),se(()=>()=>{h.current!==void 0&&clearTimeout(h.current)},[]),se(()=>{g.current=e},[e]),w}function ku({poll:e,lang:t,readOnly:n,refresh:r=()=>{},votePoll:o=()=>{}}){const[i,a]=te("default"),{expired:u,expiresAt:c,id:l,multiple:f,options:d,ownVotes:p,voted:m,votersCount:h,votesCount:g,emojis:y}=e,T=!!c&&new Date(c),_=h||g;let E=0;_<=1e3?E=0:_<=1e4?E=1:_<=1e5&&(E=2);const[w,b]=te(!1),M=d.every(A=>A.votesCount!==null);return s("div",{lang:t,dir:"auto",class:`poll ${n?"read-only":""} ${i==="loading"?"loading":""}`,children:[w&&M||m||u?s(U,{children:[s("div",{class:"poll-options",children:d.map((A,O)=>{const{title:P,votesCount:x}=A,S=_?(x/_*100).toFixed(E):0,V=x>0&&x===Math.max(...d.map(B=>B.votesCount));return s("div",{class:`poll-option poll-result ${V?"poll-option-leading":""}`,style:{"--percentage":`${S}%`},children:[s("div",{class:"poll-option-title",children:[s("span",{children:s(Bt,{text:P,emojis:y})}),m&&p.includes(O)&&s(U,{children:[" ",s(H,{icon:"check-circle"})]})]}),s("div",{class:"p
📊:
${r.options.map(u=>`${r.multiple?"▪️":"•"} ${u.title}`).join(`
`)}`),o!=null&&o.length&&(i+=" "+o.map(u=>({image:"🖼️",gifv:"🎞️",video:"📹",audio:"🎵",unknown:""})[u.type]||"").join("")),i}function $u(e,t,n){var r=this,o=j(null),i=j(0),a=j(null),u=j([]),c=j(),l=j(),f=j(e),d=j(!0);f.current=e;var p=typeof window<"u",m=!t&&t!==0&&p;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var h=!!(n=n||{}).leading,g=!("trailing"in n)||!!n.trailing,y="maxWait"in n,T="debounceOnServer"in n&&!!n.debounceOnServer,_=y?Math.max(+n.maxWait||0,t):null;se(function(){return d.current=!0,function(){d.current=!1}},[]);var E=fe(function(){var w=function(x){var S=u.current,V=c.current;return u.current=c.current=null,i.current=x,l.current=f.current.apply(V,S)},b=function(x,S){m&&cancelAnimationFrame(a.current),a.current=m?requestAnimationFrame(x):setTimeout(x,S)},M=function(x){if(!d.current)return!1;var S=x-o.current;return!o.current||S>=t||S<0||y&&x-i.current>=_},A=function(x){return a.current=null,g&&u.current?w(x):(u.current=c.current=null,l.current)},O=function x(){var S=Date.now();if(M(S))return A(S);if(d.current){var V=t-(S-o.current),B=y?Math.min(V,_-(S-i.current)):V;b(x,B)}},P=function(){if(p||T){var x=Date.now(),S=M(x);if(u.current=[].slice.call(arguments),c.current=r,o.current=x,S){if(!a.current&&d.current)return i.current=o.current,b(O,t),h?w(o.current):l.current;if(y)return b(O,t),w(o.current)}return a.current||b(O,t),l.current}};return P.cancel=function(){a.current&&(m?cancelAnimationFrame(a.current):clearTimeout(a.current)),i.current=0,u.current=o.current=c.current=a.current=null},P.isPending=function(){return!!a.current},P.flush=function(){return a.current?A(Date.now()):l.current},P},[h,y,t,_,g,m,p,T]);return E}function Lu(e,t,n){var r=n===void 0?{}:n,o=r.leading,i=r.trailing;return $u(e,t,{maxWait:t,leading:o===void 0||o,trailing:i===void 0||i})}function Cu(e,t){var n=j(null),r=j(null);r.current=t;var o=j(null);se(function(){i()});var i=Ie(function(){var a=o.current,u=r.current,c=a||(u?u instanceof Element?u:u.current:null);n.current&&n.current.element===c&&n.current.subscriber===e||(n.current&&n.current.cleanup&&n.current.cleanup(),n.current={element:c,subscriber:e,cleanup:c?e(c):void 0})},[e]);return se(function(){return function(){n.current&&n.current.cleanup&&(n.current.cleanup(),n.current=null)}},[]),Ie(function(a){o.current=a,i()},[i])}function _i(e,t,n){return e[t]?e[t][0]?e[t][0][n]:e[t][n]:t==="contentBoxSize"?e.contentRect[n==="inlineSize"?"width":"height"]:void 0}function Pu(e){e===void 0&&(e={});var t=e.onResize,n=j(void 0);n.current=t;var r=e.round||Math.round,o=j(),i=te({width:void 0,height:void 0}),a=i[0],u=i[1],c=j(!1);se(function(){return c.current=!1,function(){c.current=!0}},[]);var l=j({width:void 0,height:void 0}),f=Cu(Ie(function(d){return(!o.current||o.current.box!==e.box||o.current.round!==r)&&(o.current={box:e.box,round:r,instance:new ResizeObserver(function(p){var m=p[0],h=e.box==="border-box"?"borderBoxSize":e.box==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",g=_i(m,h,"inlineSize"),y=_i(m,h,"blockSize"),T=g?r(g):void 0,_=y?r(y):void 0;if(l.current.width!==T||l.current.height!==_){var E={width:T,height:_};l.current.width=T,l.current.height=_,n.current?n.current(E):c.current||u(E)}})}),o.current.instance.observe(d,{box:e.box}),function(){o.current&&o.current.instance.unobserve(d)}},[e.box,r]),e.ref);return fe(function(){return{ref:f,width:a.width,height:a.height}},[f,a.width,a.height])}function qn({className:e="truncated"}={}){const t=j(),n=Lu(({height:r})=>{if(t.current){const{scrollHeight:o}=t.current;let i=o>r;if(i){const{height:a,maxHeight:u}=getComputedStyle(t.current),c=parseInt(u||a,10);i=o>c}t.current.classList.toggle(e,i)}},300);return Pu({ref:t,box:"border-box",onResize:n}),t}const ro={public:"earth",unlisted:"group",private:"lock",direct:"message"};var Hs="kvfysmfp",Vs="ufhsfnkm",Ou=".".concat(Hs,"{overflow:hidden;touch-action:none}.").concat(Vs,"{transform-origin: 0 0}"),Du=typeof window>"u",Ru=function(){return!Du&&("ontouchstart"in window||navigator.maxTouchPoints>0)};var Nu=function(e){
<video
src="${y}"
poster="${h}"
width="${b}"
height="${M}"
data-orientation="${x}"
preload="auto"
autoplay
muted
playsinline
${J?"loop":""}
ondblclick="this.paused ? this.play() : this.pause()"
${ze?"ontimeupdate=\"this.closest('.media-gif') && this.closest('.media-gif').style.setProperty('--progress', `${~~((this.currentTime / this.duration) * 100)}%`)\"":""}
></video>
`,Ve=`
<video
src="${y}"
poster="${h}"
width="${b}"
height="${M}"
data-orientation="${x}"
preload="auto"
autoplay
playsinline
${J?"loop":""}
controls
></video>
`;return s(oe,{children:s(z,{class:`media ${e} media-${ee?"gif":"video"} ${ae?"media-contain":""} ${ue?"media-hover-animate":""}`,"data-orientation":x,"data-formatted-duration":o?void 0:pe,"data-label":ee&&!o&&!ae?"GIF":void 0,"data-has-alt":!q||void 0,style:!o&&ie,onClick:Se=>{if(ue)try{V.current.pause()}catch{}l(Se)},onMouseEnter:()=>{if(ue)try{V.current.play()}catch{}},onMouseLeave:()=>{if(ue)try{V.current.pause()}catch{}},onFocus:()=>{if(ue)try{V.current.play()}catch{}},onBlur:()=>{if(ue)try{V.current.pause()}catch{}},children:[o||ae?ee&&o?s(xi,{...L,enabled:!0,children:s("div",{ref:D,dangerouslySetInnerHTML:{__html:Le}})}):ee?s("div",{class:"video-container",dangerouslySetInnerHTML:{__html:Le}}):s("div",{class:"video-container",dangerouslySetInnerHTML:{__html:Ve}}):ee?s("video",{ref:V,src:y,poster:h,width:b,height:M,"data-orientation":x,preload:"auto",playsinline:!0,loop:!0,muted:!0,onTimeUpdate:ze?Se=>{const{target:Ae}=Se,Re=Ae==null?void 0:Ae.closest(".media-gif");if(Re){const _e=Ae.currentTime/Ae.duration*100;Re.style.setProperty("--progress",`${_e}%`)}}:void 0}):s(U,{children:[h?s("img",{src:h,alt:q?"":d,width:b,height:M,"data-orientation":x,loading:"lazy",decoding:"async",onLoad:Se=>{if(!P){const Ae=Se.target.closest(".media");if(Ae){const{naturalHeight:Re,naturalWidth:_e}=Se.target;Ae.dataset.orientation=_e>Re?"landscape":"portrait",Ae.style.setProperty("--width",`${_e}px`),Ae.style.setProperty("--height",`${Re}px`),Ae.style.aspectRatio=`${_e}/${Re}`}}}}):s("video",{src:y+"#t=0.1",width:b,height:M,"data-orientation":x,preload:"metadata",muted:!0,disablePictureInPicture:!0,onLoadedMetadata:Se=>{if(!Y){const{duration:Ae}=Se.target;if(Ae){const Re=jr(Ae),_e=Se.target.closest(".media-video");_e&&(_e.dataset.formattedDuration=Re)}}}}),s("div",{class:"media-play",children:s(H,{icon:"play",size:"xl"})})]}),!o&&!q&&s(Br,{alt:d,lang:r,index:c})]})})}else if(T==="audio"||K){const Y=jr(_.duration);return s(oe,{children:s(z,{class:`media media-audio ${e}`,"data-formatted-duration":o?void 0:Y,"data-has-alt":!q||void 0,onClick:l,style:!o&&ie,children:[o?s("audio",{src:g||y,preload:"none",controls:!0,autoPlay:!0}):h?s("img",{src:h,alt:q?"":d,width:b,height:M,"data-orientation":x,loading:"lazy",onError:ge=>{var ee,J;try{(J=(ee=ge.target)==null?void 0:ee.remove)==null||J.call(ee)}catch{}}}):null,!o&&s(U,{children:[s("div",{class:"media-play",children:s(H,{icon:"play",size:"xl"})}),!q&&s(Br,{alt:d,lang:r,index:c})]})]})})}}function od(e){return URL.parse(e,location.origin)}const oo=it(rd,(e,t)=>{const n=e.media||{},r=t.media||{};return(n==null?void 0:n.id)===(r==null?void 0:r.id)&&n.url===r.url&&e.to===t.to&&e.class===t.class}),id=280,sd=140,ad=zi({limit:1,interval:1e3});function cd(e,t){return t.v1.accounts.$select(e).fetch()}const ld=fo(ad(cd)),dn={public:"Public",unlisted:"Unlisted",private:"Followers only",direct:"Private mention"},ud=window.ontouchstart!==void 0&&/iPad|iPhone|iPod/.test(navigator.userAgent),dd=new Intl.RelativeTimeFormat,Mi=80;function fd(e){var t;return(t=e==null?void 0:e.options)!=null&&t.length?`📊:
${e.options.map(n=>`- ${n.title}${n.votesCount>=0?` (${n.votesCount})`:""}`).join(`
`)}`:""}function Ur(e){const{spoilerText:t,content:n,poll:r}=e;return(t?`${t}
`:"")+cr(n)+fd(r)}const Si=it(({post:e,instance:t,previewMode:n})=>{const{content:r,emojis:o,language:i,mentions:a,url:u}=e;return s("div",{lang:i,dir:"auto",class:"inner-content",onClick:$l({mentions:a,instance:t,previewMode:n,statusURL:u}),dangerouslySetInnerHTML:{__html:ws(r,{emojis:o,postEnhanceDOM:c=>{c.querySelectorAll('a.u-url[target="_blank"]').forEach(l=>{/http/i.test(l.innerText.trim())||l.removeAttribute("target")})}})}})},(e,t)=>{const{post:n}=e,{post:r}=t;return n.content===r.content}),hd={s:"small",m:"medium",l:"large"},pd=st(e=>{if(e=e==null?void 0:e.trim(),(e==null?void 0:e.length)>500)return null;const n=Aa(e)[0];return n!=null&&n.lang&&(n==null?void 0:n.accuracy)>.5?n.lang:null});function Ut({statusID:e,status:t,instance:n,size:r="m",contentTextWeight:o,readOnly:i,enableCommentHint:a,withinContext:u,skeleton:c,enableTranslate:l,forceTranslate:f,previewMode:d,onMediaClick:p,quoted:m,onStatusLinkClick:h=()=>{},showFollowedTags:g,allowContextMenu:y,showActionsBar:T,showReplyParent:_,mediaFirst:E}){var Uo,Wo,Ko;if(c)return s("div",{class:`status skeleton ${E?"status-media-first small":""}`,children:[!E&&s(nt,{size:"xxl"}),s("div",{class:"container",children:[s("div",{class:"meta",children:[(r==="s"||E)&&s(nt,{size:"m"})," ███ ████████"]}),s("div",{class:"content-container",children:[E&&s("div",{class:"media-first-container"}),s("div",{class:`content ${E?"media-first-content":""}`,children:s("p",{children:"████ ████████"})})]})]})]});const{masto:w,instance:b,authenticated:M}=Xn({instance:n}),{instance:A}=Xn(),O=b===A;let P=tt(e||(t==null?void 0:t.id),b);const x=wn(W);if(t||(t=x.statuses[P]||x.statuses[e],P=tt(t==null?void 0:t.id,b)),!t)return null;const{account:{acct:S,avatar:V,avatarStatic:B,id:D,url:$,displayName:k,username:R,emojis:L,bot:z,group:F},id:C,repliesCount:K,reblogged:Z,reblogsCount:ne,favourited:le,favouritesCount:Te,bookmarked:he,poll:ve,muted:ye,sensitive:ie,spoilerText:de,visibility:q,language:oe,editedAt:Ee,filtered:ct,card:Y,createdAt:ge,inReplyToId:ee,inReplyToAccountId:J,content:pe,mentions:ue,mediaAttachments:ae,reblog:ze,uri:Le,url:Ve,emojis:Se,tags:Ae,pinned:Re,_deleted:_e,_pinned:Zt,emojiReactions:It}=t,[$t,Yt]=te(null);se(()=>{if(!pe||oe)return;let v;return v=setTimeout(()=>{let N=pd(cr(pe,{preProcess:Q=>{Q.querySelectorAll(".mention, .hashtag, pre, code, a:has(.invisible)").forEach(ce=>{ce.remove()}),Q.querySelectorAll("a").forEach(ce=>{const Ce=ce.innerText.trim();(Ce.startsWith("https://")||Ce.startsWith("http://"))&&ce.remove()})}}));Yt(N)},1e3),()=>clearTimeout(v)},[pe,oe]);const we=oe||$t,qt=!!(ae!=null&&ae.length);E&&qt&&(r="s");const lt=fe(()=>ho(),[]),Qe=fe(()=>lt&&lt===D,[D,lt]),hr=De(Fs),ut=!Qe&&!i&&!d&&Mo(ct,hr);if((ut==null?void 0:ut.action)==="hide")return null;const re=v=>{v.shiftKey};if(r!=="l"&&ut)return s(Td,{status:t,filterInfo:ut,instance:b,containerProps:{onMouseEnter:re},showFollowedTags:!0,quoted:m});const be=new Date(ge),He=new Date(Ee);let Ne=ue==null?void 0:ue.find(v=>v.id===J);!Ne&&J===C&&(Ne={url:$,username:R,displayName:k});const[xe,vt]=te(Ne);if(!u&&!xe&&J){const v=W.accounts[J];v?vt(v):ld(J,w).then(N=>{vt(N),W.accounts[N.id]=N}).catch(N=>{})}const En=J===lt||(ue==null?void 0:ue.find(v=>v.id===lt)),je=fe(()=>!!(Zo.account.get("preferences")||{})["reading:expand:spoilers"],[]),xn=fe(()=>{var N;return((N=(Zo.account.get("preferences")||{})["reading:expand:media"])==null?void 0:N.toLowerCase())||"default"},[]),Ke=d||je||!!x.spoilers[C],dt=d||xn==="show_all"||!!x.spoilersMedia[C];if(ze)return F?s("div",{"data-state-post-id":P,class:"status-group",onMouseEnter:re,children:[s("div",{class:"status-pre-meta",children:[s(H,{icon:"group",size:"l",alt:"Group"})," ",s(an,{account:t.account,instance:b,showAvatar:!0})]}),s(Ut,{status:e?null:ze,statusID:e?ze.id:null,instance:b,size:r,contentTextWeight:o,readOnly:i,mediaFirst:E})]}):s("div",{"data-state-post-id":P,class:"status-reblog",onMouseEnter:re,children:[s("div",{class:"status-pre-meta",children:[s(H,{icon:"rocket",size:"l"})," ",s(an,{account:t.account,instance:b,s
Some media have no descriptions.`),!confirm(v))return!1}if(W.statuses[P]={...t,reblogged:!Z,reblogsCount:ne+(Z?-1:1)},Z){const v=await w.v1.statuses.$select(C).unreblog();return Ze(v,b),!0}else{const v=await w.v1.statuses.$select(C).reblog();return Ze(v,b),!0}}catch{return W.statuses[P]=t,!1}},wr=async()=>{if(!O||!M)return alert(Xt),!1;try{if(W.statuses[P]={...t,reblogged:!Z,reblogsCount:ne+(Z?-1:1)},Z){const v=await w.v1.statuses.$select(C).unreblog();Ze(v,b)}else{const v=await w.v1.statuses.$select(C).reblog();Ze(v,b)}return!0}catch{return W.statuses[P]=t,!1}},Do=async()=>{if(!O||!M)return alert(Xt),!1;try{if(W.statuses[P]={...t,favourited:!le,favouritesCount:Te+(le?-1:1)},le){const v=await w.v1.statuses.$select(C).unfavourite();Ze(v,b)}else{const v=await w.v1.statuses.$select(C).favourite();Ze(v,b)}return!0}catch{return W.statuses[P]=t,!1}},Tr=async()=>{try{const v=await Do();!me&&v&&$e(le?`Unliked @${R||S}'s post`:`Liked @${R||S}'s post`)}catch{}},Ro=async()=>{if(Fn("@mastodon/post-bookmark")){if(!O||!M)return alert(Xt),!1;try{if(W.statuses[P]={...t,bookmarked:!he},he){const v=await w.v1.statuses.$select(C).unbookmark();Ze(v,b)}else{const v=await w.v1.statuses.$select(C).bookmark();Ze(v,b)}return!0}catch{return W.statuses[P]=t,!1}}},No=async()=>{try{const v=await Ro();!me&&v&&$e(he?`Unbookmarked @${R||S}'s post`:`Bookmarked @${R||S}'s post`)}catch{}},kn=!!we&&we!==_t&&!to([we],[_t])&&!ta.find(v=>we===v||to([we],[v])),Fo=j(),zo=j();async function oa(v){var ce,Ce,Ct,Er;v&&(Fo.current=w.v1.statuses.$select(e).rebloggedBy.list({limit:Mi}),zo.current=w.v1.statuses.$select(e).favouritedBy.list({limit:Mi}));const[{value:N},{value:Q}]=await Promise.allSettled([Fo.current.next(),zo.current.next()]);if((ce=N.value)!=null&&ce.length||(Ce=Q.value)!=null&&Ce.length){const bt=[];return(Ct=N.value)!=null&&Ct.length&&bt.push(...N.value.map(wt=>(wt._types=["reblog"],wt))),(Er=Q.value)!=null&&Er.length&&bt.push(...Q.value.map(wt=>(wt._types=["favourite"],wt))),{value:bt,done:N.done&&Q.done}}return{value:[],done:!0}}const ia=j(),Ho=["public","unlisted"].includes(q),sa=["public","unlisted","private"].includes(q),Vo=s(U,{children:[!me&&O&&s(U,{children:s("div",{class:"menu-control-group-horizontal status-menu",children:[s(ke,{onClick:Sn,children:[s(H,{icon:"comment"}),s("span",{children:K>0?mt(K):"Reply"})]}),s(Ar,{subMenu:!0,confirmLabel:s(U,{children:[s(H,{icon:"rocket"}),s("span",{children:Z?"Unboost":"Boost"})]}),className:`menu-reblog ${Z?"checked":""}`,menuExtras:s(ke,{onClick:()=>{zn({draftStatus:{status:`
${Ve}`}})},children:[s(H,{icon:"quote"}),s("span",{children:"Quote"})]}),menuFooter:br&&!Z?s("div",{class:"footer",children:[s(H,{icon:"alert"}),"Some media have no descriptions."]}):Oo>=3&&s("div",{class:"footer",children:[s(H,{icon:"info"}),s("span",{children:["Old post (",s("strong",{children:dd.format(-Oo,"month")}),")"]})]}),disabled:!Jt,onClick:async()=>{try{const v=await wr();!me&&v&&$e(Z?`Unboosted @${R||S}'s post`:`Boosted @${R||S}'s post`)}catch{}},children:[s(H,{icon:"rocket"}),s("span",{children:ne>0?mt(ne):Z?"Unboost":"Boost…"})]}),s(ke,{onClick:Tr,className:`menu-favourite ${le?"checked":""}`,children:[s(H,{icon:"heart"}),s("span",{children:Te>0?mt(Te):le?"Unlike":"Like"})]}),Fn("@mastodon/post-bookmark")&&s(ke,{onClick:No,className:`menu-bookmark ${he?"checked":""}`,children:[s(H,{icon:"bookmark"}),s("span",{children:he?"Unbookmark":"Bookmark"})]})]})}),!me&&O&&(me||T)&&s(tn,{}),(me||T)&&s(U,{children:s(ke,{onClick:()=>{W.showGenericAccounts={heading:"Boosted/Liked by…",fetchAccounts:oa,instance:b,showReactions:!0,postID:P}},children:[s(H,{icon:"react"}),s("span",{children:["Boosted/Liked by",s("span",{class:"more-insignificant",children:"…"})]})]})}),!E&&s(U,{children:[(l||!we||kn)&&s(tn,{}),l?s("div",{class:un?"menu-horizontal":"",children:[s(ke,{disabled:yt,onClick:()=>{Gt(!0)},children:[s(H,{icon:"translate"}),s("span",{children:"Translate"})]}),un&&s(ke,{onClick:()=>{const v=Ur(t);v&&yi(v,we)},children:[s(H,{icon:"speak"}),s("span",{children:"Speak"})]})]}):(!we||kn)&&s("div",{class:un?"menu-horizontal":"",children:[s(li,{to:`${b?`/${b}`:""}/s/${C}?translate=1`,children:[s(H,{icon:"translate"}),s("span",{children:"Translate"})]}),un&&s(ke,{onClick:()=>{const v=Ur(t);v&&yi(v,we)},children:[s(H,{icon:"speak"}),s("span",{children:"Speak"})]})]})]}),(!me&&O||l||!we||kn)&&s(tn,{}),!me&&s(U,{children:s(li,{to:b?`/${b}/s/${C}`:`/s/${C}`,onClick:v=>{h(v,t)},children:[s(H,{icon:"arrows-right"}),s("small",{children:["View post by @",R||S,s("br",{}),s("span",{class:"more-insignificant",children:[dn[q]," • ",Co]})]})]})}),!!Ee&&s(U,{children:s(ke,{onClick:()=>{Mn(C)},children:[s(H,{icon:"history"}),s("small",{children:["Show Edit History",s("br",{}),s("span",{class:"more-insignificant",children:["Edited: ",Po]})]})]})}),s(ke,{href:Ve,target:"_blank",children:[s(H,{icon:"external"}),s("small",{class:"menu-double-lines",children:bd(Ve)})]}),s("div",{class:"menu-horizontal",children:[s(ke,{onClick:()=>{try{navigator.clipboard.writeText(Ve),$e("Link copied")}catch{$e("Unable to copy link")}},children:[s(H,{icon:"link"}),s("span",{children:"Copy"})]}),Ho&&(navigator==null?void 0:navigator.share)&&((Wo=navigator==null?void 0:navigator.canShare)==null?void 0:Wo.call(navigator,{url:Ve}))&&s(ke,{onClick:()=>{try{navigator.share({url:Ve})}catch{alert("Sharing doesn't seem to work.")}},children:[s(H,{icon:"share"}),s("span",{children:"Share…"})]})]}),Ho&&me&&s(ke,{onClick:()=>{yr(!0)},children:[s(H,{icon:"code"}),s("span",{children:"Embed post"})]}),(Qe||En)&&s(tn,{}),(Qe||En)&&s(ke,{onClick:async()=>{try{const v=await w.v1.statuses.$select(C)[ye?"unmute":"mute"]();Ze(v,b),$e(ye?"Conversation unmuted":"Conversation muted")}catch{$e(ye?"Unable to unmute conversation":"Unable to mute conversation")}},children:ye?s(U,{children:[s(H,{icon:"unmute"}),s("span",{children:"Unmute conversation"})]}):s(U,{children:[s(H,{icon:"mute"}),s("span",{children:"Mute conversation"})]})}),Qe&&sa&&s(ke,{onClick:async()=>{try{const v=await w.v1.statuses.$select(C)[Re?"unpin":"pin"]();Ze(v,b),$e(Re?"Post unpinned from profile":"Post pinned to profile")}catch{$e(Re?"Unable to unpin post":"Unable to pin post")}},children:Re?s(U,{children:[s(H,{icon:"unpin"}),s("span",{children:"Unpin from profile"})]}):s(U,{children:[s(H,{icon:"pin"}),s("span",{children:"Pin to profile"})]})}),Qe&&s("div",{class:"menu-horizontal",children:[Fn("@mastodon/post-edit")&&s(ke,{onClick:()=>{zn({editStatus:t})},children:[s(H,{icon:"pencil"}),s("span",{children:"Edit"})]}),me&&s(Ar,{subMenu:!0,confirmLabel:s(U,{children:[s(H,{icon:"trash"}),s("span",{children:"D
${Ve}`}})},children:[s(H,{icon:"quote"}),s("span",{children:"Quote"})]}),menuFooter:br&&!Z&&s("div",{class:"footer",children:[s(H,{icon:"alert"}),"Some media have no descriptions."]}),children:s("div",{class:"action has-count",children:s(Rt,{checked:Z,title:["Boost","Unboost"],alt:["Boost","Boosted"],class:"reblog-button",icon:"rocket",count:ne,disabled:!Jt})})}),s("div",{class:"action has-count",children:s(Rt,{checked:le,title:["Like","Unlike"],alt:["Like","Liked"],class:"favourite-button",icon:"heart",count:Te,onClick:Do})}),Fn("@mastodon/post-bookmark")&&s("div",{class:"action",children:s(Rt,{checked:he,title:["Bookmark","Unbookmark"],alt:["Bookmark","Bookmarked"],class:"bookmark-button",icon:"bookmark",onClick:Ro})}),s(ls,{portal:{target:document.querySelector(".status-deck")||document.body},align:"end",gap:4,overflow:"auto",viewScroll:"close",menuButton:s("div",{class:"action",children:s("button",{type:"button",title:"More",class:"plain more-button",children:s(H,{icon:"more",size:"l",alt:"More"})})}),children:Vo})]})]})]}),!!vr&&s(Zr,{onClick:v=>{v.target===v.currentTarget&&Mn(!1)},children:s(yd,{statusID:vr,instance:b,fetchStatusHistory:()=>w.v1.statuses.$select(vr).history.list(),onClose:()=>{var v;Mn(!1),(v=Lt.current)==null||v.focus()}})}),!!na&&s(Zr,{onClick:v=>{v.target===v.currentTarget&&yr(!1)},children:s(_d,{post:t,instance:b,onClose:()=>{yr(!1)}})})]})]})}function md(e){const{enabled:t,children:n,lang:r,captionChildren:o}=e;return!t||!o?n:s("figure",{class:"media-figure-multiple",children:[n,s("figcaption",{lang:r,dir:"auto",children:o})]})}function gd(e){const{mediaAttachments:t,language:n,postID:r,instance:o}=e,i=t.length>1,a=j(),[u,c]=te(0);return se(()=>{let l=()=>{const{clientWidth:f,scrollLeft:d}=a.current,p=Math.round(Math.abs(d)/f);c(p)};return a.current&&a.current.addEventListener("scroll",l,{passive:!0}),()=>{a.current&&a.current.removeEventListener("scroll",l)}},[]),s(U,{children:[s("div",{class:"media-first-container",children:[s("div",{class:"media-first-carousel",ref:a,children:t.map((l,f)=>s("div",{class:"media-first-item",children:s(oo,{media:l,lang:n,to:`/${o}/s/${r}?media=${f+1}`})},l.id))}),i&&s("div",{class:"media-carousel-controls",children:[s("div",{class:"carousel-indexer",children:[u+1,"/",t.length]}),s("label",{class:"media-carousel-button",children:s("button",{type:"button",class:"carousel-button",hidden:u===0,onClick:l=>{l.preventDefault(),l.stopPropagation(),a.current.focus(),a.current.scrollTo({left:a.current.clientWidth*(u-1)*(Qr()?-1:1),behavior:"smooth"})},children:s(H,{icon:"arrow-left"})})}),s("label",{class:"media-carousel-button",children:s("button",{type:"button",class:"carousel-button",hidden:u===t.length-1,onClick:l=>{l.preventDefault(),l.stopPropagation(),a.current.focus(),a.current.scrollTo({left:a.current.clientWidth*(u+1)*(Qr()?-1:1),behavior:"smooth"})},children:s(H,{icon:"arrow-right"})})})]})]}),i&&s("div",{class:"media-carousel-dots",style:{"--dots-count":t.length},children:t.map((l,f)=>s("span",{class:`carousel-dot ${f===u?"active":""}`},l.id))})]})}function ki(e){return bs.toUnicode(URL.parse(e).hostname.replace(/^www\./,"").replace(/\/$/,""))}function Ai(e){return["x.com","twitter.com","threads.net","bsky.app"].includes(e)}function vd({card:e,selfReferential:t,instance:n}){var V;const r=wn(W),{blurhash:o,title:i,description:a,html:u,providerName:c,providerUrl:l,authorName:f,authorUrl:d,width:p,height:m,image:h,imageDescription:g,url:y,type:T,embedUrl:_,language:E,publishedAt:w}=e,b=i||c||f,A=p/m>=1.2?"large":"",[O,P]=te(null);if(se(()=>{b&&h&&!t&&Ma(y)&&Sa(n,y).then(B=>{if(!B)return;const{id:D,url:$}=B;P("#"+$)})},[b,h,t]),r.unfurledLinks[y])return null;const x=/<iframe/i.test(u),S=Ie(B=>{x&&(B.preventDefault(),W.showEmbedModal={html:u,url:y||_,width:p,height:m})},[x]);if(b&&(h||T==="photo"&&o)){const B=ki(y);let D;const $=h&&o?xo(o):null;if(!h){const z=mu(o,44,44),F=window.OffscreenCanvas?new OffscreenCanvas(1,1):document.createElement("canvas");F.width=44,F.height=44;const C=F.getContext("2d");C.imageSmoothingEnabled=!1;const K=C.createImageData(44,44);K
`+A+`
`+((S=d==null?void 0:d.options)!=null&&S.length?`
<p>📊:</p>
<ul>
${d.options.map(V=>`
<li>
${V.title}
${V.votesCount>=0?` (${V.votesCount})`:""}
</li>
`).join("")}
</ul>`:"")+(T.length>0?`
`+T.map(V=>{const{description:B,meta:D,previewRemoteUrl:$,previewUrl:k,remoteUrl:R,url:L,type:z}=V,{original:F={},small:C}=D||{},K=(C==null?void 0:C.width)||(F==null?void 0:F.width),Z=(C==null?void 0:C.height)||(F==null?void 0:F.height),ne=R||L,le=$||k,Te=le||ne,he=ne?URL.parse(ne):null,ve=z==="unknown"&&he&&/\.(mp4|m4r|m4v|mov|webm)$/i.test(he.pathname),ye=z==="unknown"&&he&&/\.(mp3|ogg|wav|m4a|m4p|m4b)$/i.test(he.pathname),ie=z==="image"||z==="unknown"&&le&&!ve&&!ye,de=z==="gifv"||z==="video"||ve,q=z==="audio"||ye;let oe="";return ie?oe=`<img src="${Te}" width="${K}" height="${Z}" alt="${B}" loading="lazy" />`:de?oe=`
<video src="${ne}" width="${K}" height="${Z}" controls preload="auto" poster="${le}" loading="lazy"></video>
${B?`<figcaption>${B}</figcaption>`:""}
`:q?oe=`
<audio src="${ne}" controls preload="auto"></audio>
${B?`<figcaption>${B}</figcaption>`:""}
`:oe=`
<a href="${ne}">📄 ${B||ne}</a>
`,`<figure>${oe}</figure>`}).join(`
`):""),x=`
<blockquote lang="${m}" cite="${_}">
${p?`
<details>
<summary>${p}</summary>
${P}
</details>
`:P}
<footer>
${ar(o,u)} (@${i}) <a href="${_}"><time datetime="${O.toISOString()}">${O.toLocaleString()}</time></a>
</footer>
</blockquote>
`;return xu(x)}function _d({post:e,instance:t,onClose:n}){const{account:{url:r,displayName:o,username:i,emojis:a,bot:u,group:c},id:l,poll:f,spoilerText:d,language:p,editedAt:m,createdAt:h,content:g,mediaAttachments:y,url:T,emojis:_}=e,E=Us(e,t);return s("div",{id:"embed-post",class:"sheet",children:[!!n&&s("button",{type:"button",class:"sheet-close",onClick:n,children:s(H,{icon:"x"})}),s("header",{children:s("h2",{children:"Embed post"})}),s("main",{tabIndex:"-1",children:[s("h3",{children:"HTML Code"}),s("textarea",{class:"embed-code",readonly:!0,onClick:w=>{w.target.select()},dir:"auto",children:E}),s("button",{type:"button",onClick:()=>{try{navigator.clipboard.writeText(E),$e("HTML code copied")}catch{$e("Unable to copy HTML code")}},children:[s(H,{icon:"clipboard"})," ",s("span",{children:"Copy"})]}),!!(y!=null&&y.length)&&s("section",{children:[s("p",{children:"Media attachments:"}),s("ol",{class:"links-list",children:y.map(w=>s("li",{children:s("a",{href:w.remoteUrl||w.url,target:"_blank",download:!0,children:w.remoteUrl||w.url})},w.id))})]}),!!(a!=null&&a.length)&&s("section",{children:[s("p",{children:"Account Emojis:"}),s("ul",{children:a.map(w=>s("li",{children:[s("picture",{children:[s("source",{srcset:w.staticUrl,media:"(prefers-reduced-motion: reduce)"}),s("img",{class:"shortcode-emoji emoji",src:w.url,alt:`:${w.shortcode}:`,width:"16",height:"16",loading:"lazy",decoding:"async"})]})," ",s("code",{children:[":",w.shortcode,":"]})," (",s("a",{href:w.url,target:"_blank",download:!0,children:"url"}),")",w.staticUrl?s(U,{children:[" ","(",s("a",{href:w.staticUrl,target:"_blank",download:!0,children:"static"}),")"]}):null]},w.shortcode))})]}),!!(_!=null&&_.length)&&s("section",{children:[s("p",{children:"Emojis:"}),s("ul",{children:_.map(w=>s("li",{children:[s("picture",{children:[s("source",{srcset:w.staticUrl,media:"(prefers-reduced-motion: reduce)"}),s("img",{class:"shortcode-emoji emoji",src:w.url,alt:`:${w.shortcode}:`,width:"16",height:"16",loading:"lazy",decoding:"async"})]})," ",s("code",{children:[":",w.shortcode,":"]})," (",s("a",{href:w.url,target:"_blank",download:!0,children:"url"}),")",w.staticUrl?s(U,{children:[" ","(",s("a",{href:w.staticUrl,target:"_blank",download:!0,children:"static"}),")"]}):null]},w.shortcode))})]}),s("section",{children:s("small",{children:[s("p",{children:"Notes:"}),s("ul",{children:[s("li",{children:"This is static, unstyled and scriptless. You may need to apply your own styles and edit as needed."}),s("li",{children:"Polls are not interactive, becomes a list with vote counts."}),s("li",{children:"Media attachments can be images, videos, audios or any file types."}),s("li",{children:"Post could be edited or deleted later."})]})]})}),s("h3",{children:"Preview"}),s("output",{class:"embed-preview",dangerouslySetInnerHTML:{__html:E},dir:"auto"}),s("p",{children:s("small",{children:"Note: This preview is lightly styled."})})]})]})}function Rt({checked:e,count:t,class:n,title:r,alt:o,size:i,icon:a,iconSize:u="l",onClick:c,...l}){typeof r=="string"&&(r=[r,r]),typeof o=="string"&&(o=[o,o]);const[f,d]=te(r[0]||""),[p,m]=te(o[0]||"");return se(()=>{e?(d(r[1]||""),m(o[1]||"")):(d(r[0]||""),m(o[0]||""))},[e,r,o]),s("button",{type:"button",title:f,class:`plain ${i?"small":""} ${n} ${e?"checked":""}`,onClick:h=>{c&&(h.preventDefault(),h.stopPropagation(),c(h))},...l,children:[s(H,{icon:a,size:u,alt:p}),!!t&&s(U,{children:[" ",s("small",{title:t,children:mt(t)})]})]})}function bd(e){if(!e)return;const t=URL.parse(e),{host:n,pathname:r}=t,o=r.replace(/\/$/,""),[i,a,u]=o.match(/\/(@[^\/]+)\/(.*)/)||[];return s(U,{children:[bs.toUnicode(n),a?s(U,{children:["/",a,s("wbr",{}),s("span",{class:"more-insignificant",children:["/",u]})]}):s("span",{class:"more-insignificant",children:o})]})}function wd({sKey:e}){const n=wn(W).statusReply[e];if(!n)return null;const{id:r,instance:o}=n,i=Vi(r,o);if(!i)return null;const{sensitive:a,spoilerText:u,account:{avatar:c,avatarStatic:l,bot:f}={},visibility:d,content:p,language:m,filtered:h}=i;if(a||u||!p)return null;const g=tt(r,o),y=zs(i),T=De(Fs),_=Mo(h,
//# sourceMappingURL=fuse-7xj_Hrid.js.map