import{K as Ya,L as Ja,D as Za,O as ca,P as la,Q as Xa,U as Qa,v as ua,i as eo,_ as Q,p as fe,h as Z,a as e,u as Ve,V as to,e as no,N as da,W as ao,X as oo,M as Te,Y as io,S as ro,g as W,w as pn,Z as so,$ as gt,a0 as co,a1 as lo,a2 as uo,a3 as mo,B as ho,a4 as po,a5 as fo,a6 as go,a7 as vo,a8 as bo,a9 as yo,aa as _o,ab as ko,ac as wo,ad as ma,ae as xo,f as ha,af as Eo,T as pa,F as $e,y as mn,ag as zn,r as To,b as yt,q as Lo,o as Ao,d as Xt,J as fa,C as Co,ah as Fo,ai as Nn,aj as So,ak as Bn,al as $o,m as Po,x as Vn}from"./vendor--8C7Txey.js";(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const r of o)if(r.type==="childList")for(const c of r.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&s(c)}).observe(document,{childList:!0,subtree:!0});function a(o){const r={};return o.integrity&&(r.integrity=o.integrity),o.referrerPolicy&&(r.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?r.credentials="include":o.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function s(o){if(o.ep)return;o.ep=!0;const r=a(o);fetch(o.href,r)}})();function ga(t){const n=O.local.getJSON("accounts")||[];return n.find(a=>a.info.id===t)||n[0]}function Io(t){return(O.local.getJSON("accounts")||[]).find(a=>a.accessToken===t)}function Ro(t){return(O.local.getJSON("accounts")||[]).find(a=>a.instanceURL===t)}function Ot(){window.__IGNORE_GET_ACCOUNT_ERROR__;const t=O.session.get("currentAccount");return ga(t)}function $t(){const t=Ot(),{instanceURL:n,info:{id:a}}=t;return`${a}@${n}`}function Do(t){const n=O.local.getJSON("accounts")||[],a=n.find(s=>s.info.id===t.info.id);a?(a.info=t.info,a.instanceURL=t.instanceURL,a.accessToken=t.accessToken,a.vapidKey=t.vapidKey):n.push(t),O.local.setJSON("accounts",n),O.session.set("currentAccount",t.info.id)}function wr(t){const n=O.local.getJSON("accounts")||[],a=n.find(s=>s.info.id===t.id);a&&(a.info.displayName!==t.displayName||a.info.avatar!==t.avatar||a.info.avatar_static!==t.avatar_static)&&(a.info={...a.info,...t},O.local.setJSON("accounts",n))}let Qt=null;function va(){if(Qt)return Qt;try{const t=Ot(),n=O.local.getJSON("instances"),a=t.instanceURL.toLowerCase();return Qt=n[a]}catch(t){return alert(`Failed to load instance configuration. Please try again. ${t}`),O.local.del("instances"),location.reload(),{}}}function Mo(t){const{configuration:n,maxMediaAttachments:a,maxTootChars:s,pleroma:o,pollLimits:r}=t,c=(n==null?void 0:n.statuses)||{};a&&(c.maxMediaAttachments??(c.maxMediaAttachments=a)),s&&(c.maxCharacters??(c.maxCharacters=s));const l=(n==null?void 0:n.polls)||{};return r&&(l.maxCharactersPerOption??(l.maxCharactersPerOption=r.maxOptionChars),l.maxExpiration??(l.maxExpiration=r.maxExpiration),l.maxOptions??(l.maxOptions=r.maxOptions),l.minExpiration??(l.minExpiration=r.minExpiration)),{...n,statuses:c,polls:l}}function Oo(){const t=va();return Mo(t)}const je={get:t=>{try{return localStorage.getItem(t)}catch{return null}},getJSON:t=>{try{return JSON.parse(je.get(t))}catch{return null}},set:(t,n)=>{try{return localStorage.setItem(t,n)}catch{return null}},setJSON:(t,n)=>{try{return je.set(t,JSON.stringify(n))}catch{return null}},del:t=>{try{return localStorage.removeItem(t)}catch{return null}}},hn={get:t=>{try{return sessionStorage.getItem(t)}catch{return null}},getJSON:t=>{try{return JSON.parse(hn.get(t))}catch{return null}},set:(t,n)=>{try{return sessionStorage.setItem(t,n)}catch{return null}},setJSON:(t,n)=>{try{return hn.set(t,JSON.stringify(n))}catch{return null}},del:t=>{try{return sessionStorage.removeItem(t)}catch{return null}}},zo={get:t=>{try{return je.getJSON(t)[$t()]}catch{return null}},set:(t,n)=>{try{const a=je.getJSON(t)||{};return a[$t()]=n,je.setJSON(t,a)}catch{return null}},del:t=>{try{const n=je.getJSON(t)||{};return delete n[$t()],je.setJSON(t,n)}catch{return null}}},O={local:je,session:hn,account:zo},Pt="mastodon.social",Rt={},Pe={};window.__ACCOUNT_APIS__=Pe;let ge;function Ne({instance:t,accessToken:n}){/^https?:\/\//.test(t)&&(t=t.replace(/^https?:\/\//,"").replace(/\/+$/,"").toLowerCase());const a=t?`https://${t}`:`https://${Pt}`,o={masto:Ya({url:a,accessToken:n,timeout:3e4}),instance:t,accessToken:n};return Rt[t]=o,Pe[t]||(Pe[t]={}),n&&(Pe[t][n]=o),o}async function xr(t,n){const{masto:a,accessToken:s}=t;let o;try{o=await a.v2.instance.fetch()}catch{}if(!o)try{o=await a.v1.instance.fetch()}catch{}if(!o)return;const{uri:r,urls:{streamingApi:c}={},domain:l,configuration:{urls:{streaming:m}={}}={}}=o,f=O.local.getJSON("instances")||{};if((r||l)&&(f[(l||r).replace(/^https?:\/\//,"").replace(/\/+$/,"").toLowerCase()]=o),n&&(f[n.toLowerCase()]=o),O.local.setJSON("instances",f),"WebSocket"in window&&(c||m)){const p=Ja({streamingApiUrl:m||c,accessToken:s,implementation:WebSocket});t.streaming=p}}async function Er(t,n,a,s){const{masto:o}=t,r=await o.v1.accounts.verifyCredentials();O.session.set("currentAccount",r.id),Do({info:r,instanceURL:n.toLowerCase(),accessToken:a,vapidKey:s})}async function Tr(t){try{const{masto:n}=t,a=await n.v1.preferences.fetch();O.account.set("preferences",a)}catch{}}function Ke({instance:t,accessToken:n,accountID:a,account:s}={}){var m,f,d,p,h;if(t&&(t=t.toLowerCase().trim()),t&&n){const g=((m=Pe[t])==null?void 0:m[n])||Ne({instance:t,accessToken:n}),{masto:_,streaming:b}=g;return{masto:_,streaming:b,client:g,authenticated:!0,instance:t}}if(n)for(const g in Pe)if(Pe[g][n]){const _=Pe[g][n],{masto:b,streaming:y}=_;return{masto:b,streaming:y,client:_,authenticated:!0,instance:g}}else{const _=Io(n);if(_){const b=_.accessToken,y=_.instanceURL.toLowerCase().trim(),v=Ne({instance:y,accessToken:b}),{masto:x,streaming:L}=v;return{masto:x,streaming:L,client:v,authenticated:!0,instance:y}}else throw new Error("Access token not found")}if(s||a)if(s=s||ga(a),s){const g=s.accessToken,_=s.instanceURL.toLowerCase().trim(),b=((f=Pe[_])==null?void 0:f[g])||Ne({instance:_,accessToken:g}),{masto:y,streaming:v}=b;return{masto:y,streaming:v,client:b,authenticated:!0,instance:_}}else throw new Error(`Account ${a} not found`);const o=Ot();if(t){if((ge==null?void 0:ge.instance)===t)return{masto:ge.masto,streaming:ge.streaming,client:ge,authenticated:!0,instance:t};if((o==null?void 0:o.instanceURL)===t){const{accessToken:x}=o;return ge=((d=Pe[t])==null?void 0:d[x])||Ne({instance:t,accessToken:x}),{masto:ge.masto,streaming:ge.streaming,client:ge,authenticated:!0,instance:t}}const g=Ro(t);if(g){const x=g.accessToken,L=((p=Pe[t])==null?void 0:p[x])||Ne({instance:t,accessToken:x}),{masto:S,streaming:w}=L;return{masto:S,streaming:w,client:L,authenticated:!0,instance:t}}const _=Rt[t]||Ne({instance:t}),{masto:b,streaming:y,accessToken:v}=_;return{masto:b,streaming:y,client:_,authenticated:!!v,instance:t}}if(ge)return{masto:ge.masto,streaming:ge.streaming,client:ge,authenticated:!0,instance:ge.instance};if(o){const{accessToken:g,instanceURL:_}=o;return ge=((h=Pe[_])==null?void 0:h[g])||Ne({instance:_,accessToken:g}),{masto:ge.masto,streaming:ge.streaming,client:ge,authenticated:!0,instance:_}}const r=Rt[Pt]||Ne({instance:Pt}),{masto:c,streaming:l}=r;return{masto:c,streaming:l,client:r,authenticated:!1,instance:Pt}}window.__API__={currentAccountApi:ge,apis:Rt,accountApis:Pe};window._showToast=Ae;function Ae(t){typeof t=="string"&&(t={text:t});const{onClick:n,delay:a,...s}=t,o=Za({className:`${n||t.destination?"shiny-pill":""}`,gravity:"bottom",position:"center",...s,onClick:()=>{n==null||n(o)}});return a?setTimeout(()=>{o.showToast()},a):o.showToast(),o}function ba(t){try{const{pathname:n,hash:a}=new URL(t);return/^\/.*\/\d+$/i.test(n)||/^\/(@[^/]+|users\/[^/]+)\/(statuses|posts)\/\w+\/?$/i.test(n)||/^\/notes\/[a-z0-9]+$/i.test(n)||/^\/(notice|objects)\/[a-z0-9-]+$/i.test(n)||/#\/[^\/]+\.[^\/]+\/s\/.+/i.test(a)}catch{return!1}}window._moize=ca;function qe(t,n={}){return ca(t,{...n,maxSize:50,isDeepEqual:!0})}function zt(t,n={}){return qe(t,{isPromise:!0,...n})}function No(t,n){let a=[],s=!1;function o(){if(a.length===0){s=!1;return}a.shift()(),setTimeout(o,n)}return function(...r){const c=()=>t.apply(this,r);a.push(c),s||(s=!0,setTimeout(o,n))}}const Bo=la({limit:1,interval:1e3}),Vo=/(twitter|github)\.com/i,jn={};function jo(t,n){var b;const a=Xa(M);if(Vo.test(n)||jn[n])return;if(new RegExp(t+"/").test((b=a.unfurledLinks[n])==null?void 0:b.url))return Promise.resolve(a.unfurledLinks[n]);let o,r=n;/\/\/elk\.[^\/]+\/[^\/]+\.[^\/]+/i.test(r)&&(r=r.replace(/elk\.[^\/]+\//i,"")),/\/\/trunks\.[^\/]+\/status\/[^\/]+\.[^\/]+/i.test(r)&&(r=r.replace(/trunks\.[^\/]+\/status\//i,"")),/\/#\/[^\/]+\.[^\/]+\/s\/.+/i.test(r)&&(r=`https://${r.split("/#/")[1].replace(/\/s\//i,"/@fakeUsername/")}`);let c;try{c=new URL(r)}catch{return}const l=c.hostname,m=c.pathname,d=/\/@([^@\/]+)@?([^\/]+)?\/(\d+)$/i.exec(m);if(d){const y=d[3],{masto:v}=Ke({instance:l});o=v.v1.statuses.$select(y).fetch().then(x=>{if(x!=null&&x.id)return{status:x,instance:l};throw new Error("No results")})}const{masto:p}=Ke({instance:t}),h=p.v2.search.fetch({q:r,type:"statuses",resolve:!0,limit:1}).then(y=>{if(y.statuses.length>0)return{status:y.statuses[0],instance:t};throw new Error("No results")});function g(y){const{status:v,instance:x}=y,{id:L}=v,S=`/${x}/s/${L}`,w={id:L,instance:x,url:S};return M.unfurledLinks[n]=w,De(v,x,{skipThreading:!0}),w}function _(y){jn[n]=!0}return o?Promise.race([h,new Promise((v,x)=>setTimeout(x,3e3))]).catch(()=>o.catch(()=>h)).then(g).catch(_):h.then(g).catch(_)}const ya=Bo(jo),ae=Qa({appVersion:{},prevLocation:null,currentLocation:null,statuses:{},statusThreadNumber:{},home:[],homeNew:[],homeLast:null,homeLastFetchTime:null,notifications:[],notificationsLast:null,notificationsNew:[],notificationsShowNew:!1,notificationsLastFetchTime:null,reloadStatusPage:0,reloadGenericAccounts:{id:null,counter:0},spoilers:{},spoilersMedia:{},scrollPositions:{},unfurledLinks:{},statusQuotes:{},statusFollowedTags:{},accounts:{},routeNotification:null,showCompose:!1,showSettings:!1,showAccount:!1,showAccounts:!1,showDrafts:!1,showMediaModal:!1,showShortcutsSettings:!1,showKeyboardShortcutsHelp:!1,showGenericAccounts:!1,showMediaAlt:!1,shortcuts:[],settings:{autoRefresh:!1,shortcutsViewMode:null,shortcutsColumnsMode:!1,boostsCarousel:!0,contentTranslation:!0,contentTranslationTargetLanguage:null,contentTranslationHideLanguages:[],contentTranslationAutoInline:!1,mediaAltGenerator:!1,cloakMode:!1}}),M=ae;function Lr(){ae.notificationsLast=O.account.get("notificationsLast")||null,ae.shortcuts=O.account.get("shortcuts")??[],ae.settings.autoRefresh=O.account.get("settings-autoRefresh")??!1,ae.settings.shortcutsViewMode=O.account.get("settings-shortcutsViewMode")??null,O.account.get("settings-shortcutsColumnsMode")&&(ae.settings.shortcutsColumnsMode=!0),ae.settings.boostsCarousel=O.account.get("settings-boostsCarousel")??!0,ae.settings.contentTranslation=O.account.get("settings-contentTranslation")??!0,ae.settings.contentTranslationTargetLanguage=O.account.get("settings-contentTranslationTargetLanguage")||null,ae.settings.contentTranslationHideLanguages=O.account.get("settings-contentTranslationHideLanguages")||[],ae.settings.contentTranslationAutoInline=O.account.get("settings-contentTranslationAutoInline")??!1,ae.settings.mediaAltGenerator=O.account.get("settings-mediaAltGenerator")??!1,ae.settings.cloakMode=O.account.get("settings-cloakMode")??!1}ua(ae,"notificationsLast",t=>{O.account.set("notificationsLast",ae.notificationsLast)});eo(ae,t=>{for(const[n,a,s,o]of t)a.join(".")==="settings.autoRefresh"&&O.account.set("settings-autoRefresh",!!s),a.join(".")==="settings.boostsCarousel"&&O.account.set("settings-boostsCarousel",!!s),a.join(".")==="settings.shortcutsViewMode"&&O.account.set("settings-shortcutsViewMode",s),a.join(".")==="settings.contentTranslation"&&O.account.set("settings-contentTranslation",!!s),a.join(".")==="settings.contentTranslationAutoInline"&&O.account.set("settings-contentTranslationAutoInline",!!s),a.join(".")==="settings.contentTranslationTargetLanguage"&&O.account.set("settings-contentTranslationTargetLanguage",s),/^settings\.contentTranslationHideLanguages/i.test(a.join("."))&&O.account.set("settings-contentTranslationHideLanguages",ae.settings.contentTranslationHideLanguages),a.join(".")==="settings.mediaAltGenerator"&&O.account.set("settings-mediaAltGenerator",!!s),(a==null?void 0:a[0])==="shortcuts"&&O.account.set("shortcuts",ae.shortcuts),a.join(".")==="settings.cloakMode"&&O.account.set("settings-cloakMode",!!s)});function Me(t,n){if(t)return n?`${n}/${t}`:t}function _a(t,n){if(n){const a=Me(t,n);return ae.statuses[a]}return ae.statuses[t]}function De(t,n,a){typeof n=="object"&&(a=n,n=null);const{override:s=!0,skipThreading:o=!1,skipUnfurling:r=!1}=a||{};if(!t)return;const c=_a(t.id,n);!s&&c||(queueMicrotask(()=>{const l=Me(t.id,n);if(c!=null&&c._pinned&&(t._pinned=c._pinned),ae.statuses[l]=t,t.reblog){const m=Me(t.reblog.id,n);ae.statuses[m]=t.reblog}}),o||queueMicrotask(()=>{Un(t,n),t.reblog&&queueMicrotask(()=>{Un(t.reblog,n)})}),r||queueMicrotask(()=>{Ho(t,n)}))}function Uo(t,n){const{masto:a,instance:s}=Ke({instance:n});let o=0;async function r(c,l=0){const{inReplyToId:m,inReplyToAccountId:f}=c;if(!m||f!==c.account.id)return[c];if(m&&f!==c.account.id)throw"Not a thread";const d=Me(m,s);let p=ae.statuses[d];if(!p){if(o++>3)throw"Too many fetches for thread";await new Promise(h=>setTimeout(h,500*o)),p=await Ko(m,a),De(p,s,{skipThreading:!0})}return[...await r(p,++l),c]}return r(t).then(c=>{c.length>1&&c.forEach((l,m)=>{const f=Me(l.id,s);ae.statusThreadNumber[f]=m+1})}).catch(c=>{})}const Un=No(Uo,100),Hn=document.createElement("div");function Ho(t,n){var r,c;const{instance:a}=Ke(),s=((r=t.reblog)==null?void 0:r.content)||t.content;if(/{const d=f.href;return!(d===t.url||d===t.uri)&&ba(d)}).forEach((f,d)=>{ya(a,f.href).then(p=>{p&&l&&(Array.isArray(ae.statusQuotes[l])||(ae.statusQuotes[l]=[]),ae.statusQuotes[l][d]||ae.statusQuotes[l].splice(d,0,p))})})}}const Ko=zt((t,n)=>n.v1.statuses.$select(t).fetch());function qo(t,n,a,s){const o=Q(t);fe(()=>{o.current=t},[t,a]),fe(()=>{!s||n===null||n===!1||o.current()},[s]),fe(()=>{if(n===null||n===!1)return;const c=setInterval(()=>o.current(),n);return()=>clearInterval(c)},[n])}function ka(t){const n=new URL("/compose/",window.location),{width:a,height:s}=window.screen,o=Math.max(0,(a-600)/2),r=Math.max(0,(s-450)/2),c=Math.min(a,600),l=Math.min(s,450),m=(t==null?void 0:t.uid)||Math.random(),f=window.open(n,"compose"+m,`width=${c},height=${l},left=${o},top=${r}`);return f?f.__COMPOSE__=t:alert("Looks like your browser is blocking popups."),f}const Wo="modulepreload",Go=function(t,n){return new URL(t,n).href},Kn={},k=function(n,a,s){let o=Promise.resolve();if(a&&a.length>0){const r=document.getElementsByTagName("link");o=Promise.all(a.map(c=>{if(c=Go(c,s),c in Kn)return;Kn[c]=!0;const l=c.endsWith(".css"),m=l?'[rel="stylesheet"]':"";if(!!s)for(let p=r.length-1;p>=0;p--){const h=r[p];if(h.href===c&&(!l||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${c}"]${m}`))return;const d=document.createElement("link");if(d.rel=l?"stylesheet":Wo,l||(d.as="script",d.crossOrigin=""),d.href=c,document.head.appendChild(d),l)return new Promise((p,h)=>{d.addEventListener("load",p),d.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${c}`)))})}))}return o.then(()=>n()).catch(r=>{const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=r,window.dispatchEvent(c),!c.defaultPrevented)throw r})},Yo={s:12,m:16,l:20,xl:24,xxl:32},Jo={x:()=>k(()=>import("./icons/close-line-YTE7hIJE.js"),__vite__mapDeps([]),import.meta.url),heart:()=>k(()=>import("./icons/heart-line-VwvWYh8h.js"),__vite__mapDeps([]),import.meta.url),bookmark:()=>k(()=>import("./icons/bookmark-line-D6jQ7QFs.js"),__vite__mapDeps([]),import.meta.url),"check-circle":()=>k(()=>import("./icons/check-circle-line-sE41WGxF.js"),__vite__mapDeps([]),import.meta.url),"x-circle":()=>k(()=>import("./icons/close-circle-line-qd3g541O.js"),__vite__mapDeps([]),import.meta.url),transfer:()=>k(()=>import("./icons/transfer-4-line-Q9QJoxz3.js"),__vite__mapDeps([]),import.meta.url),rocket:()=>k(()=>import("./icons/rocket-line-rZbVYYCZ.js"),__vite__mapDeps([]),import.meta.url),"arrow-left":()=>k(()=>import("./icons/arrow-left-line-_YC6-XGG.js"),__vite__mapDeps([]),import.meta.url),"arrow-right":()=>k(()=>import("./icons/arrow-right-line-PypiEqpu.js"),__vite__mapDeps([]),import.meta.url),"arrow-up":()=>k(()=>import("./icons/arrow-up-line-fcuKqhVE.js"),__vite__mapDeps([]),import.meta.url),"arrow-down":()=>k(()=>import("./icons/arrow-down-line-0TRJUP_K.js"),__vite__mapDeps([]),import.meta.url),earth:()=>k(()=>import("./icons/earth-line-t1Um8wpQ.js"),__vite__mapDeps([]),import.meta.url),lock:()=>k(()=>import("./icons/lock-line-0jNHqZpm.js"),__vite__mapDeps([]),import.meta.url),unlock:()=>k(()=>import("./icons/unlock-line-w3piJMVb.js"),__vite__mapDeps([]),import.meta.url),"eye-close":()=>k(()=>import("./icons/eye-close-line-lBiePPv9.js"),__vite__mapDeps([]),import.meta.url),"eye-open":()=>k(()=>import("./icons/eye-2-line-vz_Kw-rK.js"),__vite__mapDeps([]),import.meta.url),message:()=>k(()=>import("./icons/mail-line-5XLS6FEo.js"),__vite__mapDeps([]),import.meta.url),comment:()=>k(()=>import("./icons/chat-3-line-F0xcdpXY.js"),__vite__mapDeps([]),import.meta.url),comment2:()=>k(()=>import("./icons/comment-2-line-xEXuT-Ip.js"),__vite__mapDeps([]),import.meta.url),home:()=>k(()=>import("./icons/home-3-line-qJiZhXUH.js"),__vite__mapDeps([]),import.meta.url),notification:()=>k(()=>import("./icons/notification-line-olNPLtgS.js"),__vite__mapDeps([]),import.meta.url),follow:()=>k(()=>import("./icons/user-follow-line-k_GCWTtp.js"),__vite__mapDeps([]),import.meta.url),"follow-add":()=>k(()=>import("./icons/user-add-line-zzW9OULB.js"),__vite__mapDeps([]),import.meta.url),poll:[()=>k(()=>import("./icons/chart-bar-line-5r_DfN2w.js"),__vite__mapDeps([]),import.meta.url),"90deg"],pencil:()=>k(()=>import("./icons/pencil-line-bKXqElLR.js"),__vite__mapDeps([]),import.meta.url),quill:()=>k(()=>import("./icons/quill-pen-line-h_5-FsGz.js"),__vite__mapDeps([]),import.meta.url),at:()=>k(()=>import("./icons/at-line-9vJS_Hnl.js"),__vite__mapDeps([]),import.meta.url),attachment:()=>k(()=>import("./icons/attachment-line-C2PUa1Ke.js"),__vite__mapDeps([]),import.meta.url),upload:()=>k(()=>import("./icons/upload-3-line-Qsjvubiw.js"),__vite__mapDeps([]),import.meta.url),gear:()=>k(()=>import("./icons/settings-3-line-kt4MSpRv.js"),__vite__mapDeps([]),import.meta.url),more:()=>k(()=>import("./icons/more-3-line-wUD-Yhmj.js"),__vite__mapDeps([]),import.meta.url),external:()=>k(()=>import("./icons/external-link-line-8nOOkmFu.js"),__vite__mapDeps([]),import.meta.url),popout:()=>k(()=>import("./icons/external-link-line-8nOOkmFu.js"),__vite__mapDeps([]),import.meta.url),popin:[()=>k(()=>import("./icons/external-link-line-8nOOkmFu.js"),__vite__mapDeps([]),import.meta.url),"180deg"],plus:()=>k(()=>import("./icons/add-circle-line--O-MfyNy.js"),__vite__mapDeps([]),import.meta.url),"chevron-left":()=>k(()=>import("./icons/left-line-Jck0yVmC.js"),__vite__mapDeps([]),import.meta.url),"chevron-right":()=>k(()=>import("./icons/right-line-7VBoqLdz.js"),__vite__mapDeps([]),import.meta.url),"chevron-down":()=>k(()=>import("./icons/down-line-9PeS5YhF.js"),__vite__mapDeps([]),import.meta.url),reply:[()=>k(()=>import("./icons/share-forward-line-4jL-2Q4u.js"),__vite__mapDeps([]),import.meta.url),"180deg","horizontal"],thread:()=>k(()=>import("./icons/route-line-2YYy3958.js"),__vite__mapDeps([]),import.meta.url),group:()=>k(()=>import("./icons/group-line-JvhJklhQ.js"),__vite__mapDeps([]),import.meta.url),bot:()=>k(()=>import("./icons/android-2-line-uPwvVubH.js"),__vite__mapDeps([]),import.meta.url),menu:()=>k(()=>import("./icons/rows-4-line-SxGPYpTa.js"),__vite__mapDeps([]),import.meta.url),list:()=>k(()=>import("./icons/list-check-line-qNqx9Mm4.js"),__vite__mapDeps([]),import.meta.url),search:()=>k(()=>import("./icons/search-2-line-G39AynEw.js"),__vite__mapDeps([]),import.meta.url),hashtag:()=>k(()=>import("./icons/hashtag-line-SS3QMu1R.js"),__vite__mapDeps([]),import.meta.url),info:()=>k(()=>import("./icons/information-line-8SOch6cR.js"),__vite__mapDeps([]),import.meta.url),shortcut:()=>k(()=>import("./icons/lightning-line-JMYUlCZM.js"),__vite__mapDeps([]),import.meta.url),user:()=>k(()=>import("./icons/user-4-line-zT_bpOrS.js"),__vite__mapDeps([]),import.meta.url),following:()=>k(()=>import("./icons/walk-line-CF7a5s4t.js"),__vite__mapDeps([]),import.meta.url),pin:()=>k(()=>import("./icons/pin-line-ULyRQyWZ.js"),__vite__mapDeps([]),import.meta.url),bus:()=>k(()=>import("./icons/bus-2-line-XuQdDZ_w.js"),__vite__mapDeps([]),import.meta.url),link:()=>k(()=>import("./icons/link-2-line-BUqp1EwN.js"),__vite__mapDeps([]),import.meta.url),history:()=>k(()=>import("./icons/history-line-yoG7K8wL.js"),__vite__mapDeps([]),import.meta.url),share:()=>k(()=>import("./icons/share-2-line-PYo-zN94.js"),__vite__mapDeps([]),import.meta.url),sparkles:()=>k(()=>import("./icons/sparkles-line-wjZWGZ1a.js"),__vite__mapDeps([]),import.meta.url),sparkles2:()=>k(()=>import("./icons/sparkles-2-line-g2FqdZ0R.js"),__vite__mapDeps([]),import.meta.url),exit:()=>k(()=>import("./icons/exit-line-l-1uUgI7.js"),__vite__mapDeps([]),import.meta.url),translate:()=>k(()=>import("./icons/translate-line-HpDtlqS2.js"),__vite__mapDeps([]),import.meta.url),play:()=>k(()=>import("./icons/play-fill-Ey-zv2eL.js"),__vite__mapDeps([]),import.meta.url),trash:()=>k(()=>import("./icons/delete-2-line-pjUduCFs.js"),__vite__mapDeps([]),import.meta.url),mute:()=>k(()=>import("./icons/volume-mute-line-WthBoXru.js"),__vite__mapDeps([]),import.meta.url),unmute:()=>k(()=>import("./icons/volume-line-PZujbN8h.js"),__vite__mapDeps([]),import.meta.url),block:()=>k(()=>import("./icons/forbid-circle-line-3FxopGoP.js"),__vite__mapDeps([]),import.meta.url),unblock:[()=>k(()=>import("./icons/forbid-circle-line-3FxopGoP.js"),__vite__mapDeps([]),import.meta.url),"180deg"],flag:()=>k(()=>import("./icons/flag-4-line-M3u-PO0J.js"),__vite__mapDeps([]),import.meta.url),time:()=>k(()=>import("./icons/time-line-ThP0kTRr.js"),__vite__mapDeps([]),import.meta.url),refresh:()=>k(()=>import("./icons/refresh-2-line-t42qqclb.js"),__vite__mapDeps([]),import.meta.url),emoji2:()=>k(()=>import("./icons/emoji-2-line--uNVc2IC.js"),__vite__mapDeps([]),import.meta.url),filter:()=>k(()=>import("./icons/filter-2-line-KyjbFYlO.js"),__vite__mapDeps([]),import.meta.url),chart:()=>k(()=>import("./icons/chart-line-line-pHaLt6yC.js"),__vite__mapDeps([]),import.meta.url),react:()=>k(()=>import("./icons/react-line-YfZPqZem.js"),__vite__mapDeps([]),import.meta.url),layout4:()=>k(()=>import("./icons/layout-4-line-FOdnyEcZ.js"),__vite__mapDeps([]),import.meta.url),layout5:()=>k(()=>import("./icons/layout-5-line-9Kks7dle.js"),__vite__mapDeps([]),import.meta.url),announce:()=>k(()=>import("./icons/announcement-line-MSlAmDH1.js"),__vite__mapDeps([]),import.meta.url),alert:()=>k(()=>import("./icons/alert-line-zyc6hy8V.js"),__vite__mapDeps([]),import.meta.url),round:()=>k(()=>import("./icons/round-fill-a0rplSmV.js"),__vite__mapDeps([]),import.meta.url),"arrow-up-circle":()=>k(()=>import("./icons/arrow-up-circle-line-e3kZqEZN.js"),__vite__mapDeps([]),import.meta.url),"arrow-down-circle":()=>k(()=>import("./icons/arrow-down-circle-line-mpqFtRtO.js"),__vite__mapDeps([]),import.meta.url),clipboard:()=>k(()=>import("./icons/clipboard-line-9F_Yeo71.js"),__vite__mapDeps([]),import.meta.url),"account-edit":()=>k(()=>import("./icons/user-edit-line-9VnWCh0X.js"),__vite__mapDeps([]),import.meta.url),"account-warning":()=>k(()=>import("./icons/user-warning-line-gL3RGb1N.js"),__vite__mapDeps([]),import.meta.url),keyboard:()=>k(()=>import("./icons/keyboard-line-10AZQcVH.js"),__vite__mapDeps([]),import.meta.url),cloud:()=>k(()=>import("./icons/cloud-line-abe0HgFS.js"),__vite__mapDeps([]),import.meta.url),month:()=>k(()=>import("./icons/calendar-month-line-VoXZVWAe.js"),__vite__mapDeps([]),import.meta.url),media:()=>k(()=>import("./icons/photo-album-line--GdJqjfq.js"),__vite__mapDeps([]),import.meta.url),speak:()=>k(()=>import("./icons/radar-line-ndI8IhOG.js"),__vite__mapDeps([]),import.meta.url),building:()=>k(()=>import("./icons/building-5-line-ew7lu83B.js"),__vite__mapDeps([]),import.meta.url)},qn={};function T({icon:t,size:n="m",alt:a,title:s,class:o="",style:r={}}){if(!t)return null;const c=Yo[n];let l=Jo[t],m,f;Array.isArray(l)&&([l,m,f]=l);const[d,p]=Z(qn[t]),h=Q(t);return fe(()=>{d&&h.current===t||((async()=>{const g=await l();p(g.default),qn[t]=g.default})(),h.current=t)},[t]),e("span",{class:`icon ${o}`,title:s||a,style:{width:`${c}px`,height:`${c}px`,...r},children:d&&e("svg",{width:c,height:c,viewBox:`0 0 ${d.width} ${d.height}`,dangerouslySetInnerHTML:{__html:d.body},style:{transform:`${m?`rotate(${m})`:""} ${f?"scaleX(-1)":""}`}})})}function Zo(t,n=[]){!t||typeof t!="function"||fe(()=>{const a=new CloseWatcher;return a.addEventListener("close",t),()=>{a.destroy()}},n)}const wa=window.CloseWatcher?Zo:()=>{},Xo=document.getElementById("modal-container");function Nt({children:t,onClose:n,onClick:a,class:s}){if(!t)return null;const o=Q();fe(()=>{let m=setTimeout(()=>{var d;const f=(d=o.current)==null?void 0:d.querySelector('[tabindex="-1"]');f&&f.focus()},100);return()=>clearTimeout(m)},[]);const r=window.CloseWatcher,c=Ve("esc",()=>{setTimeout(()=>{n==null||n()},0)},{enabled:!r&&!!n,keydown:!1,keyup:!0},[n]);wa(n,[n]);const l=e("div",{ref:m=>{var f;o.current=m,c.current=((f=m==null?void 0:m.querySelector)==null?void 0:f.call(m,'[tabindex="-1"]'))||m},className:s,onClick:m=>{a==null||a(m),m.target===m.currentTarget&&(n==null||n(m))},tabIndex:"-1",onFocus:m=>{var f,d,p,h;m.target===m.currentTarget&&((h=(p=(d=(f=o.current)==null?void 0:f.querySelector)==null?void 0:d.call(f,'[tabindex="-1"]'))==null?void 0:p.focus)==null||h.call(p))},children:t});return to(l,Xo)}function Bt({abrupt:t,hidden:n,...a}){return e("span",{...a,class:`loader-container ${t?"abrupt":""} ${n?"hidden":""}`,children:e("span",{class:"loader"})})}const Wn={s:16,m:20,l:24,xl:32,xxl:50,xxxl:64},ut={},dt=window.OffscreenCanvas?new OffscreenCanvas(1,1):document.createElement("canvas"),en=dt.getContext("2d",{willReadFrequently:!0});function Qo({url:t,size:n,alt:a="",squircle:s,...o}){n=Wn[n]||n||Wn.m;const r=Q(),c=/missing\.png$/.test(t);return e("span",{ref:r,class:`avatar ${s?"squircle":""} ${ut[t]?"has-alpha":""}`,style:{width:n,height:n},title:a,...o,children:!!t&&e("img",{src:t,width:n,height:n,alt:a,loading:"lazy",decoding:"async",crossOrigin:ut[t]===void 0&&!c?"anonymous":void 0,onError:l=>{l.target.crossOrigin&&(l.target.crossOrigin=null,l.target.src=t)},onLoad:l=>{r.current&&(r.current.dataset.loaded=!0),ut[t]===void 0&&(c||queueMicrotask(()=>{try{const{width:m,height:f}=l.target;dt.width!==m&&(dt.width=m),dt.height!==f&&(dt.height=f),en.drawImage(l.target,0,0);const d=en.getImageData(0,0,m,f),p=d.data.filter((h,g)=>g%4===3&&h<=128).length/(d.data.length/4)>.1;p&&r.current.classList.add("has-alpha"),ut[t]=p,en.clearRect(0,0,m,f)}catch{ut[t]=!1}}))}})})}const Qe=qe(Qo),at=da((t,n)=>{let a;try{a=no()}catch{}let s=(location.hash||"").replace(/^#/,"").trim();s===""&&(s="/");const{to:o,...r}=t;if(s&&s!=="/"&&s.includes("?"))try{const l=new URL(s,location.origin);if(l.searchParams.size){const m=Array.from(l.searchParams.entries()).map(([f,d])=>`${f}=${encodeURIComponent(d)}`).join("&");s=l.pathname+"?"+m}}catch{}const c=s===o||decodeURIComponent(s)===o;return e("a",{ref:n,href:`#${o}`,...r,class:`${t.class||""} ${c?"is-active":""}`,onClick:l=>{var m,f,d;(f=(m=l.currentTarget)==null?void 0:m.parentNode)!=null&&f.closest("a")&&l.stopPropagation(),a&&(M.prevLocation=a),(d=t.onClick)==null||d.call(t,l)}})}),ei=document.documentElement,Ft=getComputedStyle(ei),ti=8;let xa=[0,0,0,0];function Ea(){const t=Ft.getPropertyValue("--sai-top"),n=Ft.getPropertyValue("--sai-right"),a=Ft.getPropertyValue("--sai-bottom"),s=Ft.getPropertyValue("--sai-left");xa=[Math.max(0,parseInt(t,10)),Math.max(0,parseInt(n,10)),Math.max(0,parseInt(a,10)),Math.max(0,parseInt(s,10))]}requestAnimationFrame(Ea);function Ta(t=[]){return xa.map((a,s)=>(a||ti)+(t[s]||0)).join(" ")}CSS.supports("top: env(safe-area-inset-top)")&&window.addEventListener("resize",Ea,{passive:!0});function fn(t){const{containerProps:n,instanceRef:a}=t,s=ao(),o=a!=null&&a.current?a:Q();return e(oo,{boundingBoxPadding:Ta(),repositionFlag:`${s.width}x${s.height}`,unmountOnClose:!0,...t,instanceRef:o,containerProps:{onClick:r=>{var c,l,m;r.target===r.currentTarget&&((l=(c=o.current)==null?void 0:c.closeMenu)==null||l.call(c)),(m=n==null?void 0:n.onClick)==null||m.call(n,r)},...n}})}function tn({subMenu:t=!1,confirm:n=!0,confirmLabel:a,menuItemClassName:s,menuFooter:o,...r}){const{children:c,onClick:l,...m}=r;if(!n)return t?e(Te,{...r}):l?io(c,{onClick:l}):c;const f=t?ro:fn,d=Q();return e(f,{instanceRef:d,openTrigger:"clickOnly",direction:"bottom",overflow:"auto",gap:-8,shift:8,menuClassName:"menu-emphasized",...m,menuButton:t?void 0:c,label:t?c:void 0,itemProps:{onPointerMove:p=>{var h,g;p.pointerType==="touch"&&((g=(h=d.current)==null?void 0:h.openMenu)==null||g.call(h))},onPointerLeave:p=>{var h,g;p.pointerType==="touch"&&((g=(h=d.current)==null?void 0:h.openMenu)==null||g.call(h))}},children:[e(Te,{className:s,onClick:l,children:a}),o]})}function vt({text:t,emojis:n}){if(!t)return"";if(!(n!=null&&n.length)||t.indexOf(":")===-1)return t;const a=new RegExp(`:(${n.map(o=>o.shortcode).join("|")}):`,"g");return t.split(a).map(o=>{const r=n.find(c=>c.shortcode===o);if(r){const{url:c,staticUrl:l}=r;return e("picture",{children:[e("source",{srcset:l,media:"(prefers-reduced-motion: reduce)"}),e("img",{src:c,alt:o,class:"shortcode-emoji emoji",width:"16",height:"16",loading:"lazy",decoding:"async"},o)]})}return o})}const ni=new Intl.Collator("en",{sensitivity:"base"});function ai({account:t,instance:n,showAvatar:a,showAcct:s,short:o,external:r,onClick:c}){const{acct:l,avatar:m,avatarStatic:f,id:d,url:p,displayName:h,emojis:g,bot:_}=t;let{username:b}=t;const[y,v,x]=l.match(/([^@]+)(@.+)/i)||[,l],L=b.toLowerCase().trim(),S=(h||"").toLowerCase().trim(),w=S.replace(/(\:(\w|\+|\-)+\:)(?=|[\!\.\?]|$)/g,"").replace(/\s+/g,""),P=w.replace(/[^a-z0-9]/gi,"");return!o&&(L===S||L===w||L===P||ni.compare(L,w)===0)&&(b=null),e("a",{class:`name-text ${s?"show-acct":""} ${o?"short":""}`,href:p,target:r?"_blank":null,title:`${h?`${h} `:""}@${l}`,onClick:C=>{if(!r){if(C.preventDefault(),C.stopPropagation(),c)return c(C);M.showAccount={account:t,instance:n}}},children:[a&&e(W,{children:[e(Qe,{url:f||m,squircle:_})," "]}),h&&!o?e(W,{children:[e("b",{children:e(vt,{text:h,emojis:g})}),!s&&b&&e(W,{children:[" ",e("i",{children:["@",b]})]})]}):o?e("i",{children:b}):e("b",{children:b}),s&&e(W,{children:[e("br",{}),e("i",{children:["@",v,e("span",{class:"ib",children:x})]})]})]})}const mt=pn(ai);gt.extend(so);gt.extend(co);gt.extend(lo);const oi=new Intl.DateTimeFormat;function bt({datetime:t,format:n}){if(!t)return null;const a=gt(t);let s;if(n==="micro"){const o=gt();o.diff(a,"day")<=1||o.year()===a.year()?s=a.twitter():s=oi.format(a.toDate())}else s=a.fromNow();return e("time",{datetime:a.toISOString(),title:a.format("LLLL"),children:s})}const ii=[{code:"af",name:"Afrikaans"},{code:"sq",name:"Albanian"},{code:"am",name:"Amharic"},{code:"ar",name:"Arabic"},{code:"hy",name:"Armenian"},{code:"as",name:"Assamese"},{code:"ay",name:"Aymara"},{code:"az",name:"Azerbaijani"},{code:"bm",name:"Bambara"},{code:"eu",name:"Basque"},{code:"be",name:"Belarusian"},{code:"bn",name:"Bengali"},{code:"bho",name:"Bhojpuri"},{code:"bs",name:"Bosnian"},{code:"bg",name:"Bulgarian"},{code:"ca",name:"Catalan"},{code:"ceb",name:"Cebuano"},{code:"ny",name:"Chichewa"},{code:"zh",name:"Chinese"},{code:"zh_HANT",name:"Chinese (Traditional)"},{code:"co",name:"Corsican"},{code:"hr",name:"Croatian"},{code:"cs",name:"Czech"},{code:"da",name:"Danish"},{code:"dv",name:"Dhivehi"},{code:"doi",name:"Dogri"},{code:"nl",name:"Dutch"},{code:"en",name:"English"},{code:"eo",name:"Esperanto"},{code:"et",name:"Estonian"},{code:"ee",name:"Ewe"},{code:"tl",name:"Filipino"},{code:"fi",name:"Finnish"},{code:"fr",name:"French"},{code:"fy",name:"Frisian"},{code:"gl",name:"Galician"},{code:"ka",name:"Georgian"},{code:"de",name:"German"},{code:"el",name:"Greek"},{code:"gn",name:"Guarani"},{code:"gu",name:"Gujarati"},{code:"ht",name:"Haitian Creole"},{code:"ha",name:"Hausa"},{code:"haw",name:"Hawaiian"},{code:"iw",name:"Hebrew"},{code:"hi",name:"Hindi"},{code:"hmn",name:"Hmong"},{code:"hu",name:"Hungarian"},{code:"is",name:"Icelandic"},{code:"ig",name:"Igbo"},{code:"ilo",name:"Ilocano"},{code:"id",name:"Indonesian"},{code:"ga",name:"Irish"},{code:"it",name:"Italian"},{code:"ja",name:"Japanese"},{code:"jw",name:"Javanese"},{code:"kn",name:"Kannada"},{code:"kk",name:"Kazakh"},{code:"km",name:"Khmer"},{code:"rw",name:"Kinyarwanda"},{code:"gom",name:"Konkani"},{code:"ko",name:"Korean"},{code:"kri",name:"Krio"},{code:"ku",name:"Kurdish (Kurmanji)"},{code:"ckb",name:"Kurdish (Sorani)"},{code:"ky",name:"Kyrgyz"},{code:"lo",name:"Lao"},{code:"la",name:"Latin"},{code:"lv",name:"Latvian"},{code:"ln",name:"Lingala"},{code:"lt",name:"Lithuanian"},{code:"lg",name:"Luganda"},{code:"lb",name:"Luxembourgish"},{code:"mk",name:"Macedonian"},{code:"mai",name:"Maithili"},{code:"mg",name:"Malagasy"},{code:"ms",name:"Malay"},{code:"ml",name:"Malayalam"},{code:"mt",name:"Maltese"},{code:"mi",name:"Maori"},{code:"mr",name:"Marathi"},{code:"mni-Mtei",name:"Meiteilon (Manipuri)"},{code:"lus",name:"Mizo"},{code:"mn",name:"Mongolian"},{code:"my",name:"Myanmar (Burmese)"},{code:"ne",name:"Nepali"},{code:"no",name:"Norwegian"},{code:"or",name:"Odia (Oriya)"},{code:"om",name:"Oromo"},{code:"ps",name:"Pashto"},{code:"fa",name:"Persian"},{code:"pl",name:"Polish"},{code:"pt",name:"Portuguese"},{code:"pa",name:"Punjabi"},{code:"qu",name:"Quechua"},{code:"ro",name:"Romanian"},{code:"ru",name:"Russian"},{code:"sm",name:"Samoan"},{code:"sa",name:"Sanskrit"},{code:"gd",name:"Scots Gaelic"},{code:"nso",name:"Sepedi"},{code:"sr",name:"Serbian"},{code:"st",name:"Sesotho"},{code:"sn",name:"Shona"},{code:"sd",name:"Sindhi"},{code:"si",name:"Sinhala"},{code:"sk",name:"Slovak"},{code:"sl",name:"Slovenian"},{code:"so",name:"Somali"},{code:"es",name:"Spanish"},{code:"su",name:"Sundanese"},{code:"sw",name:"Swahili"},{code:"sv",name:"Swedish"},{code:"tg",name:"Tajik"},{code:"ta",name:"Tamil"},{code:"tt",name:"Tatar"},{code:"te",name:"Telugu"},{code:"th",name:"Thai"},{code:"ti",name:"Tigrinya"},{code:"ts",name:"Tsonga"},{code:"tr",name:"Turkish"},{code:"tk",name:"Turkmen"},{code:"ak",name:"Twi"},{code:"uk",name:"Ukrainian"},{code:"ur",name:"Urdu"},{code:"ug",name:"Uyghur"},{code:"uz",name:"Uzbek"},{code:"vi",name:"Vietnamese"},{code:"cy",name:"Welsh"},{code:"xh",name:"Xhosa"},{code:"yi",name:"Yiddish"},{code:"yo",name:"Yoruba"},{code:"zu",name:"Zulu"}];function ri(...t){try{return uo(...t)}catch{return t[2]||!1}}const Dt=qe(ri),si=[new Intl.DateTimeFormat().resolvedOptions().locale,...navigator.languages],ci=Dt(si,ii.map(t=>t.code.replace("_","-")),"en");function La(t=!1){if(t){const{contentTranslationTargetLanguage:n}=M.settings;if(n)return n}return ci}function nn(t){try{return new Intl.DisplayNames(navigator.languages,{type:"language"}).of(t)}catch{return null}}function gn(t,n=[]){return t?(!n.length||t.indexOf(":")===-1||n.forEach(a=>{const{shortcode:s,staticUrl:o,url:r}=a;t=t.replace(new RegExp(`:${s}:`,"g"),`:${s}:`)}),t):""}const tt=document.createElement("div"),li=["u-url","mention","hashtag"];function ui(t,n={}){const{emojis:a,postEnhanceDOM:s=()=>{}}=n;let o=t;const r=document.createElement("div");r.innerHTML=o;const c=/{p.setAttribute("target","_blank")}),r.querySelectorAll("a[class]").forEach(p=>{p.classList.forEach(h=>{li.includes(h)||p.classList.remove(h)})})),c&&r.querySelectorAll("a[href]").forEach(d=>{/^https?:\/\//i.test(d.textContent.trim())&&d.classList.add("has-url-text")}),c){const f=r.querySelectorAll("a[href]"),d=[];f.forEach(p=>{const h=p.innerText.trim(),g=p.querySelector("*");if(/^@[^@]+(@[^@]+)?$/g.test(h)){const[_,b,y]=h.split("@");g||(!d.some(([v])=>v===b)||d.some(([v,x])=>v===b&&x===y)?(p.innerHTML=`@${b}`,d.push([b,y])):p.innerHTML=`@${b}@${y}`),p.classList.add("mention")}/^#[^#]+$/g.test(h)&&(g||(p.innerHTML=`#${h.slice(1)}`),p.classList.add("mention","hashtag"))})}let m;if(o.includes(":")&&(m=an(r),m.forEach(f=>{let d=f.nodeValue.replace(/&/g,"&").replace(//g,">");a&&(d=gn(d,a)),tt.innerHTML=d,f.replaceWith(...tt.childNodes)})),l&&[...r.querySelectorAll("p")].filter(d=>/^```[^]+```$/g.test(d.innerText.trim())).forEach(d=>{const p=document.createElement("pre");d.querySelectorAll("br").forEach(h=>h.replaceWith(` `)),p.innerHTML=`${d.innerHTML.trim()}`,d.replaceWith(p)}),l&&[...r.querySelectorAll("p")].filter(p=>/^```/g.test(p.innerText)).forEach(p=>{const h=[p];let g=!1,_=p;for(;_.nextElementSibling;){const b=_.nextElementSibling;if(b&&b.tagName==="P")if(/```$/g.test(b.innerText)){h.push(b),g=!0;break}else h.push(b);else break;_=b}if(g){const b=document.createElement("pre");h.forEach(v=>{v.querySelectorAll("br").forEach(x=>x.replaceWith(` `))});const y=h.map(v=>v.innerHTML).join(` `);b.innerHTML=`${y}`,p.replaceWith(b),h.forEach(v=>v.remove())}}),o.includes("`")&&(m=an(r),m.forEach(f=>{let d=f.nodeValue.replace(/&/g,"&").replace(//g,">");/`[^`]+`/g.test(d)&&(d=d.replaceAll(/(`[^]+?`)/g,"$1")),tt.innerHTML=d,f.replaceWith(...tt.childNodes)})),/twitter\.com/i.test(o)&&(m=an(r,{rejectFilter:["A"]}),m.forEach(f=>{let d=f.nodeValue.replace(/&/g,"&").replace(//g,">");/@[a-zA-Z0-9_]+@twitter\.com/g.test(d)&&(d=d.replaceAll(/(@([a-zA-Z0-9_]+)@twitter\.com)/g,'$1')),tt.innerHTML=d,f.replaceWith(...tt.childNodes)})),o.includes("#")){let f=null;const d=[...r.querySelectorAll("p")].filter((p,h)=>{let g=0;for(let _=0;_3||g>1&&f&&h===f+1)return f=h,!0});d!=null&&d.length&&d.forEach(p=>{p.classList.add("hashtag-stuffing"),p.title=p.innerText})}return s&&queueMicrotask(()=>s(r)),o=r.innerHTML,o}const Aa=qe(ui),di=["STYLE","IMG","VIDEO","AUDIO","AREA","MAP","TRACK","EMBED","IFRAME","OBJECT","PICTURE","PORTAL","SOURCE","SVG","MATH","CANVAS","NOSCRIPT","SCRIPT","INPUT","OPTION","TEXTAREA","SLOT","TEMPLATE"],mi=Object.fromEntries(di.map(t=>[t,!0]));function an(t,n={}){var c;const a=[],s=Object.assign({},mi,(c=n.rejectFilter)==null?void 0:c.reduce((l,m)=>(l[m]=!0,l),{})),o=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,{acceptNode(l){return s[l.parentNode.nodeName]?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}},!1);let r;for(;r=o.nextNode();)a.push(r);return a}const on=document.createElement("div");function hi(t){return t?(on.innerHTML=t.replace(/<\/p>/g,`

`).replace(/<\/li>/g,` `),on.querySelectorAll("br").forEach(n=>{n.replaceWith(` `)}),on.innerText.replace(/[\r\n]{3,}/g,` `).trim()):""}const vn=qe(hi);function pi(t){const{mentions:n=[],instance:a,previewMode:s,statusURL:o}=t||{};return r=>{var d,p;let{target:c}=r;if(c=c.closest("a"),!c||r.metaKey||r.ctrlKey||r.shiftKey||r.altKey||r.which===2)return;const l=(d=c.previousSibling)==null?void 0:d.textContent,m=l==null?void 0:l.endsWith("@"),f=c.innerText.startsWith("@");if(c.classList.contains("u-url")&&f||m&&!f){const h=(c.querySelector("span")||c).innerText.trim(),g=h.replace(/^@/,""),_=c.getAttribute("href"),b=n.find(y=>y.username===g||y.acct===g||y.url===_);if(b)r.preventDefault(),r.stopPropagation(),M.showAccount={account:b.acct,instance:a};else if(!/^http/i.test(h)){r.preventDefault(),r.stopPropagation();const y=c.getAttribute("href");M.showAccount={account:y,instance:a}}}else if(!s){const h=l==null?void 0:l.endsWith("#");if(c.classList.contains("hashtag")||h){r.preventDefault(),r.stopPropagation();const g=c.innerText.replace(/^#/,"").trim(),_=a?`#/${a}/t/${g}`:`#/t/${g}`;location.hash=_}else(p=M.unfurledLinks[c.href])!=null&&p.url&&o!==c.href&&(r.preventDefault(),r.stopPropagation(),M.prevLocation={pathname:location.hash.replace(/^#/,"")},location.hash=`#${M.unfurledLinks[c.href].url}`)}}}const{locale:fi}=new Intl.DateTimeFormat().resolvedOptions(),gi=t=>{const{dateYear:n,hideTime:a,formatOpts:s}=t||{},o=new Date().getFullYear();return Intl.DateTimeFormat(fi,{year:n===o?void 0:"numeric",month:"short",day:"numeric",hour:a?void 0:"numeric",minute:a?void 0:"numeric",...s})},vi=qe(gi);function Mt(t,n){return t instanceof Date||(t=new Date(t)),vi({dateYear:t.getFullYear(),...n}).format(t)}const{locale:bi}=Intl.NumberFormat().resolvedOptions(),He=Intl.NumberFormat(bi,{notation:"compact"}).format;function yi({skeleton:t,account:n,avatarSize:a="xl",useAvatarStatic:s=!1,instance:o,external:r,internal:c,onClick:l,showActivity:m=!1,showStats:f=!1,accountInstance:d,hideDisplayName:p=!1,relationship:h={},excludeRelationshipAttrs:g=[]}){if(t)return e("div",{class:"account-block skeleton",children:[e(Qe,{size:a}),e("span",{children:[e("b",{children:"████████"}),e("br",{}),e("span",{class:"account-block-acct",children:"@██████"})]})]});if(!n)return null;const{id:_,acct:b,avatar:y,avatarStatic:v,displayName:x,username:L,emojis:S,url:w,statusesCount:P,lastStatusAt:C,bot:N,fields:Y,note:B,group:R,followersCount:V}=n;let[U,be,le]=b.match(/([^@]+)(@.+)/i)||[,b];d&&(le=`@${d}`);const ve=Y==null?void 0:Y.find(j=>!!j.verifiedAt&&!!j.value),A={};for(const j in h)g.includes(j)||(A[j]=h[j]);const oe=A.following||A.followedBy||A.requested;return e("a",{class:"account-block",href:w,target:r?"_blank":null,title:`@${b}`,onClick:j=>{if(!r){if(j.preventDefault(),l)return l(j);c?location.hash=`/${o}/a/${_}`:M.showAccount={account:n,instance:o}}},children:[e(Qe,{url:s?v:y||v,size:a,squircle:N}),e("span",{class:"account-block-content",children:[!p&&e(W,{children:x?e("b",{children:e(vt,{text:x,emojis:S})}):e("b",{children:L})})," ",e("span",{class:"account-block-acct",children:["@",be,e("wbr",{}),le]}),m&&e(W,{children:[e("br",{}),e("small",{class:"last-status-at insignificant",children:["Posts: ",P,!!C&&e(W,{children:[" ","· Last posted:"," ",Mt(C,{hideTime:!0})]})]})]}),f&&e("div",{class:"account-block-stats",children:[N&&e(W,{children:e("span",{class:"tag collapsed",children:[e(T,{icon:"bot"})," Automated"]})}),!!R&&e(W,{children:e("span",{class:"tag collapsed",children:[e(T,{icon:"group"})," Group"]})}),oe&&e("div",{class:"shazam-container-horizontal",children:e("div",{class:"shazam-container-inner",children:A.following&&A.followedBy?e("span",{class:"tag minimal",children:"Mutual"}):A.requested?e("span",{class:"tag minimal",children:"Requested"}):A.following?e("span",{class:"tag minimal",children:"Following"}):A.followedBy?e("span",{class:"tag minimal",children:"Follows you"}):null})},h.id),!!V&&e("span",{class:"ib",children:[He(V)," ",V===1?"follower":"followers"]}),!!ve&&e("span",{class:"verified-field",children:[e(T,{icon:"check-circle",size:"s"})," ",e("span",{dangerouslySetInnerHTML:{__html:Aa(ve.value,{emojis:S})}})]})]})]})]})}const _i={"@mastodon/edit-media-attributes":">=4.1","@mastodon/list-exclusive":">=4.2"},rn={};function Ca(t){try{const{version:n,domain:a}=va(),s=`${a}-${t}`;if(rn[s])return rn[s];const o=_i[t];return o?rn[s]=mo(n,o,{includePrerelease:!0,loose:!0}):!1}catch{return!1}}const ki=[{code:"auto",name:"Detect"},{code:"af",name:"Afrikaans"},{code:"sq",name:"Albanian"},{code:"am",name:"Amharic"},{code:"ar",name:"Arabic"},{code:"hy",name:"Armenian"},{code:"as",name:"Assamese"},{code:"ay",name:"Aymara"},{code:"az",name:"Azerbaijani"},{code:"bm",name:"Bambara"},{code:"eu",name:"Basque"},{code:"be",name:"Belarusian"},{code:"bn",name:"Bengali"},{code:"bho",name:"Bhojpuri"},{code:"bs",name:"Bosnian"},{code:"bg",name:"Bulgarian"},{code:"ca",name:"Catalan"},{code:"ceb",name:"Cebuano"},{code:"ny",name:"Chichewa"},{code:"zh",name:"Chinese"},{code:"co",name:"Corsican"},{code:"hr",name:"Croatian"},{code:"cs",name:"Czech"},{code:"da",name:"Danish"},{code:"dv",name:"Dhivehi"},{code:"doi",name:"Dogri"},{code:"nl",name:"Dutch"},{code:"en",name:"English"},{code:"eo",name:"Esperanto"},{code:"et",name:"Estonian"},{code:"ee",name:"Ewe"},{code:"tl",name:"Filipino"},{code:"fi",name:"Finnish"},{code:"fr",name:"French"},{code:"fy",name:"Frisian"},{code:"gl",name:"Galician"},{code:"ka",name:"Georgian"},{code:"de",name:"German"},{code:"el",name:"Greek"},{code:"gn",name:"Guarani"},{code:"gu",name:"Gujarati"},{code:"ht",name:"Haitian Creole"},{code:"ha",name:"Hausa"},{code:"haw",name:"Hawaiian"},{code:"iw",name:"Hebrew"},{code:"hi",name:"Hindi"},{code:"hmn",name:"Hmong"},{code:"hu",name:"Hungarian"},{code:"is",name:"Icelandic"},{code:"ig",name:"Igbo"},{code:"ilo",name:"Ilocano"},{code:"id",name:"Indonesian"},{code:"ga",name:"Irish"},{code:"it",name:"Italian"},{code:"ja",name:"Japanese"},{code:"jw",name:"Javanese"},{code:"kn",name:"Kannada"},{code:"kk",name:"Kazakh"},{code:"km",name:"Khmer"},{code:"rw",name:"Kinyarwanda"},{code:"gom",name:"Konkani"},{code:"ko",name:"Korean"},{code:"kri",name:"Krio"},{code:"ku",name:"Kurdish (Kurmanji)"},{code:"ckb",name:"Kurdish (Sorani)"},{code:"ky",name:"Kyrgyz"},{code:"lo",name:"Lao"},{code:"la",name:"Latin"},{code:"lv",name:"Latvian"},{code:"ln",name:"Lingala"},{code:"lt",name:"Lithuanian"},{code:"lg",name:"Luganda"},{code:"lb",name:"Luxembourgish"},{code:"mk",name:"Macedonian"},{code:"mai",name:"Maithili"},{code:"mg",name:"Malagasy"},{code:"ms",name:"Malay"},{code:"ml",name:"Malayalam"},{code:"mt",name:"Maltese"},{code:"mi",name:"Maori"},{code:"mr",name:"Marathi"},{code:"mni-Mtei",name:"Meiteilon (Manipuri)"},{code:"lus",name:"Mizo"},{code:"mn",name:"Mongolian"},{code:"my",name:"Myanmar (Burmese)"},{code:"ne",name:"Nepali"},{code:"no",name:"Norwegian"},{code:"or",name:"Odia (Oriya)"},{code:"om",name:"Oromo"},{code:"ps",name:"Pashto"},{code:"fa",name:"Persian"},{code:"pl",name:"Polish"},{code:"pt",name:"Portuguese"},{code:"pa",name:"Punjabi"},{code:"qu",name:"Quechua"},{code:"ro",name:"Romanian"},{code:"ru",name:"Russian"},{code:"sm",name:"Samoan"},{code:"sa",name:"Sanskrit"},{code:"gd",name:"Scots Gaelic"},{code:"nso",name:"Sepedi"},{code:"sr",name:"Serbian"},{code:"st",name:"Sesotho"},{code:"sn",name:"Shona"},{code:"sd",name:"Sindhi"},{code:"si",name:"Sinhala"},{code:"sk",name:"Slovak"},{code:"sl",name:"Slovenian"},{code:"so",name:"Somali"},{code:"es",name:"Spanish"},{code:"su",name:"Sundanese"},{code:"sw",name:"Swahili"},{code:"sv",name:"Swedish"},{code:"tg",name:"Tajik"},{code:"ta",name:"Tamil"},{code:"tt",name:"Tatar"},{code:"te",name:"Telugu"},{code:"th",name:"Thai"},{code:"ti",name:"Tigrinya"},{code:"ts",name:"Tsonga"},{code:"tr",name:"Turkish"},{code:"tk",name:"Turkmen"},{code:"ak",name:"Twi"},{code:"uk",name:"Ukrainian"},{code:"ur",name:"Urdu"},{code:"ug",name:"Uyghur"},{code:"uz",name:"Uzbek"},{code:"vi",name:"Vietnamese"},{code:"cy",name:"Welsh"},{code:"xh",name:"Xhosa"},{code:"yi",name:"Yiddish"},{code:"yo",name:"Yoruba"},{code:"zu",name:"Zulu"}];var wi={PHANPY_CLIENT_NAME:"Phanpy",PHANPY_WEBSITE:"https://phanpy.social",PHANPY_LINGVA_INSTANCES:"lingva.phanpy.social lingva.lunar.icu lingva.garudalinux.org translate.plausibility.cloud",PHANPY_PRIVACY_POLICY_URL:"https://github.com/cheeaun/phanpy/blob/main/PRIVACY.MD",VITE_APP_ENV:"production",BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{PHANPY_LINGVA_INSTANCES:Gn}=wi,ft=Gn?Gn.split(/\s+/):[],xi=la({limit:1,interval:2e3});let sn=0;function Ei(t,n,a){return ho(()=>{let o=ft[sn];return fetch(`https://${o}/api/v1/${n}/${a}/${encodeURIComponent(t)}`).then(r=>{if(!r.ok)throw new Error(r.statusText);return r.json()}).then(r=>{var c;return{provider:"lingva",content:r.translation,detectedSourceLanguage:(c=r.info)==null?void 0:c.detectedSource,info:r.info}})},{retries:3,onFailedAttempt:o=>{sn=(sn+1)%ft.length}})}const Fa=1e3*60*60,Sa=zt(Ei,{maxAge:Fa}),Ti=zt(xi(Sa),{maxAge:Fa});function Li({forceTranslate:t,sourceLanguage:n,onTranslate:a,text:s="",mini:o}){const r=La(!0),[c,l]=Z("default"),[m,f]=Z(null),[d,p]=Z(null),[h,g]=Z(null),_=Q(),b=n?nn(n):null,y=nn(r),v=Q("auto");a||(a=o?Ti:Sa);const x=async()=>{var L,S;l("loading");try{const{content:w,detectedSourceLanguage:P,provider:C,error:N,...Y}=await a(s,v.current,r);if(w){if(P){const B=nn(P);g(B)}if(C==="lingva"){const B=(S=(L=Y==null?void 0:Y.info)==null?void 0:L.pronunciation)==null?void 0:S.query;B&&f(B)}p(w),l("default"),!o&&w.trim()!==s.trim()&&(_.current.open=!0,_.current.scrollIntoView({behavior:"smooth",block:"nearest"}))}else l("error")}catch{l("error")}};return fe(()=>{t&&x()},[t]),o?d&&d.trim()!==s.trim()&&h!==y?e("div",{class:"shazam-container",children:e("div",{class:"shazam-container-inner",children:e("div",{class:"status-translation-block-mini",children:[e(T,{icon:"translate",alt:`Auto-translated from ${b}`}),e("output",{lang:r,dir:"auto",title:m||"",children:d})]})})}):null:e("div",{class:"status-translation-block",onClick:L=>{L.preventDefault()},children:e("details",{ref:_,children:[e("summary",{children:e("button",{type:"button",onClick:async L=>{L.preventDefault(),L.stopPropagation(),_.current.open=!_.current.open,c!=="loading"&&(d||x())},children:[e(T,{icon:"translate"})," ",e("span",{children:c==="loading"?"Translating…":n&&b&&!h?`Translate from ${b}`:"Translate"})]})}),e("div",{class:"translated-block",children:[e("div",{class:"translation-info insignificant",children:[e("select",{class:"translated-source-select",disabled:c==="loading",onChange:L=>{v.current=L.target.value,x()},children:ki.map(L=>e("option",{value:L.code,children:L.code==="auto"?`Auto (${h??"…"})`:L.name}))})," ",e("span",{children:["→ ",y]}),e(Bt,{abrupt:!0,hidden:c!=="loading"})]}),c==="error"?e("p",{class:"ui-state",children:"Failed to translate"}):!!d&&e(W,{children:[e("output",{class:"translated-content",lang:r,dir:"auto",children:d}),!!m&&e("output",{class:"translated-pronunciation-content",tabIndex:-1,onClick:L=>{L.target.classList.toggle("expand")},children:m})]})]})]})})}const Ai=ft!=null&&ft.length?Li:()=>null,bn=[["aa","Afar","Afaraf"],["ab","Abkhaz","аҧсуа бызшәа"],["ae","Avestan","avesta"],["af","Afrikaans","Afrikaans"],["ak","Akan","Akan"],["am","Amharic","አማርኛ"],["an","Aragonese","aragonés"],["ar","Arabic","اللغة العربية"],["as","Assamese","অসমীয়া"],["av","Avaric","авар мацӀ"],["ay","Aymara","aymar aru"],["az","Azerbaijani","azərbaycan dili"],["ba","Bashkir","башҡорт теле"],["be","Belarusian","беларуская мова"],["bg","Bulgarian","български език"],["bh","Bihari","भोजपुरी"],["bi","Bislama","Bislama"],["bm","Bambara","bamanankan"],["bn","Bengali","বাংলা"],["bo","Tibetan","བོད་ཡིག"],["br","Breton","brezhoneg"],["bs","Bosnian","bosanski jezik"],["ca","Catalan","Català"],["ce","Chechen","нохчийн мотт"],["ch","Chamorro","Chamoru"],["co","Corsican","corsu"],["cr","Cree","ᓀᐦᐃᔭᐍᐏᐣ"],["cs","Czech","čeština"],["cu","Old Church Slavonic","ѩзыкъ словѣньскъ"],["cv","Chuvash","чӑваш чӗлхи"],["cy","Welsh","Cymraeg"],["da","Danish","dansk"],["de","German","Deutsch"],["dv","Divehi","Dhivehi"],["dz","Dzongkha","རྫོང་ཁ"],["ee","Ewe","Eʋegbe"],["el","Greek","Ελληνικά"],["en","English","English"],["eo","Esperanto","Esperanto"],["es","Spanish","Español"],["et","Estonian","eesti"],["eu","Basque","euskara"],["fa","Persian","فارسی"],["ff","Fula","Fulfulde"],["fi","Finnish","suomi"],["fj","Fijian","Vakaviti"],["fo","Faroese","føroyskt"],["fr","French","Français"],["fy","Western Frisian","Frysk"],["ga","Irish","Gaeilge"],["gd","Scottish Gaelic","Gàidhlig"],["gl","Galician","galego"],["gu","Gujarati","ગુજરાતી"],["gv","Manx","Gaelg"],["ha","Hausa","هَوُسَ"],["he","Hebrew","עברית"],["hi","Hindi","हिन्दी"],["ho","Hiri Motu","Hiri Motu"],["hr","Croatian","Hrvatski"],["ht","Haitian","Kreyòl ayisyen"],["hu","Hungarian","magyar"],["hy","Armenian","Հայերեն"],["hz","Herero","Otjiherero"],["ia","Interlingua","Interlingua"],["id","Indonesian","Bahasa Indonesia"],["ie","Interlingue","Interlingue"],["ig","Igbo","Asụsụ Igbo"],["ii","Nuosu","ꆈꌠ꒿ Nuosuhxop"],["ik","Inupiaq","Iñupiaq"],["io","Ido","Ido"],["is","Icelandic","Íslenska"],["it","Italian","Italiano"],["iu","Inuktitut","ᐃᓄᒃᑎᑐᑦ"],["ja","Japanese","日本語"],["jv","Javanese","basa Jawa"],["ka","Georgian","ქართული"],["kg","Kongo","Kikongo"],["ki","Kikuyu","Gĩkũyũ"],["kj","Kwanyama","Kuanyama"],["kk","Kazakh","қазақ тілі"],["kl","Kalaallisut","kalaallisut"],["km","Khmer","ខេមរភាសា"],["kn","Kannada","ಕನ್ನಡ"],["ko","Korean","한국어"],["kr","Kanuri","Kanuri"],["ks","Kashmiri","कश्मीरी"],["ku","Kurmanji (Kurdish)","Kurmancî"],["kv","Komi","коми кыв"],["kw","Cornish","Kernewek"],["ky","Kyrgyz","Кыргызча"],["la","Latin","latine"],["lb","Luxembourgish","Lëtzebuergesch"],["lg","Ganda","Luganda"],["li","Limburgish","Limburgs"],["ln","Lingala","Lingála"],["lo","Lao","ລາວ"],["lt","Lithuanian","lietuvių kalba"],["lu","Luba-Katanga","Tshiluba"],["lv","Latvian","latviešu valoda"],["mg","Malagasy","fiteny malagasy"],["mh","Marshallese","Kajin M̧ajeļ"],["mi","Māori","te reo Māori"],["mk","Macedonian","македонски јазик"],["ml","Malayalam","മലയാളം"],["mn","Mongolian","Монгол хэл"],["mr","Marathi","मराठी"],["ms","Malay","Bahasa Melayu"],["mt","Maltese","Malti"],["my","Burmese","ဗမာစာ"],["na","Nauru","Ekakairũ Naoero"],["nb","Norwegian Bokmål","Norsk bokmål"],["nd","Northern Ndebele","isiNdebele"],["ne","Nepali","नेपाली"],["ng","Ndonga","Owambo"],["nl","Dutch","Nederlands"],["nn","Norwegian Nynorsk","Norsk Nynorsk"],["no","Norwegian","Norsk"],["nr","Southern Ndebele","isiNdebele"],["nv","Navajo","Diné bizaad"],["ny","Chichewa","chiCheŵa"],["oc","Occitan","occitan"],["oj","Ojibwe","ᐊᓂᔑᓈᐯᒧᐎᓐ"],["om","Oromo","Afaan Oromoo"],["or","Oriya","ଓଡ଼ିଆ"],["os","Ossetian","ирон æвзаг"],["pa","Panjabi","ਪੰਜਾਬੀ"],["pi","Pāli","पाऴि"],["pl","Polish","Polski"],["ps","Pashto","پښتو"],["pt","Portuguese","Português"],["qu","Quechua","Runa Simi"],["rm","Romansh","rumantsch grischun"],["rn","Kirundi","Ikirundi"],["ro","Romanian","Română"],["ru","Russian","Русский"],["rw","Kinyarwanda","Ikinyarwanda"],["sa","Sanskrit","संस्कृतम्"],["sc","Sardinian","sardu"],["sd","Sindhi","सिन्धी"],["se","Northern Sami","Davvisámegiella"],["sg","Sango","yângâ tî sängö"],["si","Sinhala","සිංහල"],["sk","Slovak","slovenčina"],["sl","Slovenian","slovenščina"],["sn","Shona","chiShona"],["so","Somali","Soomaaliga"],["sq","Albanian","Shqip"],["sr","Serbian","српски језик"],["ss","Swati","SiSwati"],["st","Southern Sotho","Sesotho"],["su","Sundanese","Basa Sunda"],["sv","Swedish","Svenska"],["sw","Swahili","Kiswahili"],["ta","Tamil","தமிழ்"],["te","Telugu","తెలుగు"],["tg","Tajik","тоҷикӣ"],["th","Thai","ไทย"],["ti","Tigrinya","ትግርኛ"],["tk","Turkmen","Türkmen"],["tl","Tagalog","Wikang Tagalog"],["tn","Tswana","Setswana"],["to","Tonga","faka Tonga"],["tr","Turkish","Türkçe"],["ts","Tsonga","Xitsonga"],["tt","Tatar","татар теле"],["tw","Twi","Twi"],["ty","Tahitian","Reo Tahiti"],["ug","Uyghur","ئۇيغۇرچە‎"],["uk","Ukrainian","Українська"],["ur","Urdu","اردو"],["uz","Uzbek","Ўзбек"],["ve","Venda","Tshivenḓa"],["vi","Vietnamese","Tiếng Việt"],["vo","Volapük","Volapük"],["wa","Walloon","walon"],["wo","Wolof","Wollof"],["xh","Xhosa","isiXhosa"],["yi","Yiddish","ייִדיש"],["yo","Yoruba","Yorùbá"],["za","Zhuang","Saɯ cueŋƅ"],["zh","Chinese","中文"],["zu","Zulu","isiZulu"],["zh-CN","Chinese (China)","简体中文"],["zh-HK","Chinese (Hong Kong)","繁體中文(香港)"],["zh-TW","Chinese (Taiwan)","繁體中文(臺灣)"],["zh-YUE","Cantonese","廣東話"],["ast","Asturian","Asturianu"],["chr","Cherokee","ᏣᎳᎩ ᎦᏬᏂᎯᏍᏗ"],["ckb","Sorani (Kurdish)","سۆرانی"],["cnr","Montenegrin","crnogorski"],["jbo","Lojban","la .lojban."],["kab","Kabyle","Taqbaylit"],["kmr","Kurmanji (Kurdish)","Kurmancî"],["ldn","Láadan","Láadan"],["lfn","Lingua Franca Nova","lingua franca nova"],["sco","Scots","Scots"],["sma","Southern Sami","Åarjelsaemien Gïele"],["smj","Lule Sami","Julevsámegiella"],["szl","Silesian","ślůnsko godka"],["tok","Toki Pona","toki pona"],["xal","Kalmyk","Хальмг келн"],["zba","Balaibalan","باليبلن"],["zgh","Standard Moroccan Tamazight","ⵜⴰⵎⴰⵣⵉⵖⵜ"]],Ci="(((?:[^A-Za-z0-9@@$##\\uFFFE\\uFEFF\\uFFFF]|[\\u202A-\\u202E\\u061C\\u200E\\u200F\\u2066\\u2067\\u2068\\u2069]|^))((https?:\\/\\/)((?:(?:(?:[^/\\!'#%&'\\(\\)*\\+,\\\\\\-\\.\\/:;<=>\\?@\\[\\]\\^_{|}~\\$//\\x09-\\x0D\\x20\\x85\\xA0\\u1680\\u180E\\u2000-\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000//\\uFFFE\\uFEFF\\uFFFF//\\u202A-\\u202E\\u061C\\u200E\\u200F\\u2066\\u2067\\u2068\\u2069/](?:[_-]|[^/\\!'#%&'\\(\\)*\\+,\\\\\\-\\.\\/:;<=>\\?@\\[\\]\\^_{|}~\\$//\\x09-\\x0D\\x20\\x85\\xA0\\u1680\\u180E\\u2000-\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000//\\uFFFE\\uFEFF\\uFFFF//\\u202A-\\u202E\\u061C\\u200E\\u200F\\u2066\\u2067\\u2068\\u2069/])*)?[^/\\!'#%&'\\(\\)*\\+,\\\\\\-\\.\\/:;<=>\\?@\\[\\]\\^_{|}~\\$//\\x09-\\x0D\\x20\\x85\\xA0\\u1680\\u180E\\u2000-\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000//\\uFFFE\\uFEFF\\uFFFF//\\u202A-\\u202E\\u061C\\u200E\\u200F\\u2066\\u2067\\u2068\\u2069/]\\.)*(?:(?:[^/\\!'#%&'\\(\\)*\\+,\\\\\\-\\.\\/:;<=>\\?@\\[\\]\\^_{|}~\\$//\\x09-\\x0D\\x20\\x85\\xA0\\u1680\\u180E\\u2000-\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000//\\uFFFE\\uFEFF\\uFFFF//\\u202A-\\u202E\\u061C\\u200E\\u200F\\u2066\\u2067\\u2068\\u2069/](?:-|[^/\\!'#%&'\\(\\)*\\+,\\\\\\-\\.\\/:;<=>\\?@\\[\\]\\^_{|}~\\$//\\x09-\\x0D\\x20\\x85\\xA0\\u1680\\u180E\\u2000-\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000//\\uFFFE\\uFEFF\\uFFFF//\\u202A-\\u202E\\u061C\\u200E\\u200F\\u2066\\u2067\\u2068\\u2069/])*)?[^/\\!'#%&'\\(\\)*\\+,\\\\\\-\\.\\/:;<=>\\?@\\[\\]\\^_{|}~\\$//\\x09-\\x0D\\x20\\x85\\xA0\\u1680\\u180E\\u2000-\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000//\\uFFFE\\uFEFF\\uFFFF//\\u202A-\\u202E\\u061C\\u200E\\u200F\\u2066\\u2067\\u2068\\u2069/]\\.)(?:(?:(?:삼성|닷컴|닷넷|香格里拉|餐厅|食品|飞利浦|電訊盈科|集团|通販|购物|谷歌|诺基亚|联通|网络|网站|网店|网址|组织机构|移动|珠宝|点看|游戏|淡马锡|机构|書籍|时尚|新闻|政府|政务|招聘|手表|手机|我爱你|慈善|微博|广东|工行|家電|娱乐|天主教|大拿|大众汽车|在线|嘉里大酒店|嘉里|商标|商店|商城|公益|公司|八卦|健康|信息|佛山|企业|中文网|中信|世界|ポイント|ファッション|セール|ストア|コム|グーグル|クラウド|みんな|คอม|संगठन|नेट|कॉम|همراه|موقع|موبايلي|كوم|كاثوليك|عرب|شبكة|بيتك|بازار|العليان|ارامكو|اتصالات|ابوظبي|קום|сайт|рус|орг|онлайн|москва|ком|католик|дети|zuerich|zone|zippo|zip|zero|zara|zappos|yun|youtube|you|yokohama|yoga|yodobashi|yandex|yamaxun|yahoo|yachts|xyz|xxx|xperia|xin|xihuan|xfinity|xerox|xbox|wtf|wtc|wow|world|works|work|woodside|wolterskluwer|wme|winners|wine|windows|win|williamhill|wiki|wien|whoswho|weir|weibo|wedding|wed|website|weber|webcam|weatherchannel|weather|watches|watch|warman|wanggou|wang|walter|walmart|wales|vuelos|voyage|voto|voting|vote|volvo|volkswagen|vodka|vlaanderen|vivo|viva|vistaprint|vista|vision|visa|virgin|vip|vin|villas|viking|vig|video|viajes|vet|versicherung|vermögensberatung|vermögensberater|verisign|ventures|vegas|vanguard|vana|vacations|ups|uol|uno|university|unicom|uconnect|ubs|ubank|tvs|tushu|tunes|tui|tube|trv|trust|travelersinsurance|travelers|travelchannel|travel|training|trading|trade|toys|toyota|town|tours|total|toshiba|toray|top|tools|tokyo|today|tmall|tkmaxx|tjx|tjmaxx|tirol|tires|tips|tiffany|tienda|tickets|tiaa|theatre|theater|thd|teva|tennis|temasek|telefonica|telecity|tel|technology|tech|team|tdk|tci|taxi|tax|tattoo|tatar|tatamotors|target|taobao|talk|taipei|tab|systems|symantec|sydney|swiss|swiftcover|swatch|suzuki|surgery|surf|support|supply|supplies|sucks|style|study|studio|stream|store|storage|stockholm|stcgroup|stc|statoil|statefarm|statebank|starhub|star|staples|stada|srt|srl|spreadbetting|spot|sport|spiegel|space|soy|sony|song|solutions|solar|sohu|software|softbank|social|soccer|sncf|smile|smart|sling|skype|sky|skin|ski|site|singles|sina|silk|shriram|showtime|show|shouji|shopping|shop|shoes|shiksha|shia|shell|shaw|sharp|shangrila|sfr|sexy|sex|sew|seven|ses|services|sener|select|seek|security|secure|seat|search|scot|scor|scjohnson|science|schwarz|schule|school|scholarships|schmidt|schaeffler|scb|sca|sbs|sbi|saxo|save|sas|sarl|sapo|sap|sanofi|sandvikcoromant|sandvik|samsung|samsclub|salon|sale|sakura|safety|safe|saarland|ryukyu|rwe|run|ruhr|rugby|rsvp|room|rogers|rodeo|rocks|rocher|rmit|rip|rio|ril|rightathome|ricoh|richardli|rich|rexroth|reviews|review|restaurant|rest|republican|report|repair|rentals|rent|ren|reliance|reit|reisen|reise|rehab|redumbrella|redstone|red|recipes|realty|realtor|realestate|read|raid|radio|racing|qvc|quest|quebec|qpon|pwc|pub|prudential|pru|protection|property|properties|promo|progressive|prof|productions|prod|pro|prime|press|praxi|pramerica|post|porn|politie|poker|pohl|pnc|plus|plumbing|playstation|play|place|pizza|pioneer|pink|ping|pin|pid|pictures|pictet|pics|piaget|physio|photos|photography|photo|phone|philips|phd|pharmacy|pfizer|pet|pccw|pay|passagens|party|parts|partners|pars|paris|panerai|panasonic|pamperedchef|page|ovh|ott|otsuka|osaka|origins|orientexpress|organic|org|orange|oracle|open|ooo|onyourside|online|onl|ong|one|omega|ollo|oldnavy|olayangroup|olayan|okinawa|office|off|observer|obi|nyc|ntt|nrw|nra|nowtv|nowruz|now|norton|northwesternmutual|nokia|nissay|nissan|ninja|nikon|nike|nico|nhk|ngo|nfl|nexus|nextdirect|next|news|newholland|new|neustar|network|netflix|netbank|net|nec|nba|navy|natura|nationwide|name|nagoya|nadex|nab|mutuelle|mutual|museum|mtr|mtpc|mtn|msd|movistar|movie|mov|motorcycles|moto|moscow|mortgage|mormon|mopar|montblanc|monster|money|monash|mom|moi|moe|moda|mobily|mobile|mobi|mma|mls|mlb|mitsubishi|mit|mint|mini|mil|microsoft|miami|metlife|merckmsd|meo|menu|men|memorial|meme|melbourne|meet|media|med|mckinsey|mcdonalds|mcd|mba|mattel|maserati|marshalls|marriott|markets|marketing|market|map|mango|management|man|makeup|maison|maif|madrid|macys|luxury|luxe|lupin|lundbeck|ltda|ltd|lplfinancial|lpl|love|lotto|lotte|london|lol|loft|locus|locker|loans|loan|llp|llc|lixil|living|live|lipsy|link|linde|lincoln|limo|limited|lilly|like|lighting|lifestyle|lifeinsurance|life|lidl|liaison|lgbt|lexus|lego|legal|lefrak|leclerc|lease|lds|lawyer|law|latrobe|latino|lat|lasalle|lanxess|landrover|land|lancome|lancia|lancaster|lamer|lamborghini|ladbrokes|lacaixa|kyoto|kuokgroup|kred|krd|kpn|kpmg|kosher|komatsu|koeln|kiwi|kitchen|kindle|kinder|kim|kia|kfh|kerryproperties|kerrylogistics|kerryhotels|kddi|kaufen|juniper|juegos|jprs|jpmorgan|joy|jot|joburg|jobs|jnj|jmp|jll|jlc|jio|jewelry|jetzt|jeep|jcp|jcb|java|jaguar|iwc|iveco|itv|itau|istanbul|ist|ismaili|iselect|irish|ipiranga|investments|intuit|international|intel|int|insure|insurance|institute|ink|ing|info|infiniti|industries|inc|immobilien|immo|imdb|imamat|ikano|iinet|ifm|ieee|icu|ice|icbc|ibm|hyundai|hyatt|hughes|htc|hsbc|how|house|hotmail|hotels|hoteles|hot|hosting|host|hospital|horse|honeywell|honda|homesense|homes|homegoods|homedepot|holiday|holdings|hockey|hkt|hiv|hitachi|hisamitsu|hiphop|hgtv|hermes|here|helsinki|help|healthcare|health|hdfcbank|hdfc|hbo|haus|hangout|hamburg|hair|guru|guitars|guide|guge|gucci|guardian|group|grocery|gripe|green|gratis|graphics|grainger|gov|got|gop|google|goog|goodyear|goodhands|goo|golf|goldpoint|gold|godaddy|gmx|gmo|gmbh|gmail|globo|global|gle|glass|glade|giving|gives|gifts|gift|ggee|george|genting|gent|gea|gdn|gbiz|gay|garden|gap|games|game|gallup|gallo|gallery|gal|fyi|futbol|furniture|fund|fun|fujixerox|fujitsu|ftr|frontier|frontdoor|frogans|frl|fresenius|free|fox|foundation|forum|forsale|forex|ford|football|foodnetwork|food|foo|fly|flsmidth|flowers|florist|flir|flights|flickr|fitness|fit|fishing|fish|firmdale|firestone|fire|financial|finance|final|film|fido|fidelity|fiat|ferrero|ferrari|feedback|fedex|fast|fashion|farmers|farm|fans|fan|family|faith|fairwinds|fail|fage|extraspace|express|exposed|expert|exchange|everbank|events|eus|eurovision|etisalat|esurance|estate|esq|erni|ericsson|equipment|epson|epost|enterprises|engineering|engineer|energy|emerck|email|education|edu|edeka|eco|eat|earth|dvr|dvag|durban|dupont|duns|dunlop|duck|dubai|dtv|drive|download|dot|doosan|domains|doha|dog|dodge|doctor|docs|dnp|diy|dish|discover|discount|directory|direct|digital|diet|diamonds|dhl|dev|design|desi|dentist|dental|democrat|delta|deloitte|dell|delivery|degree|deals|dealer|deal|dds|dclk|day|datsun|dating|date|data|dance|dad|dabur|cyou|cymru|cuisinella|csc|cruises|cruise|crs|crown|cricket|creditunion|creditcard|credit|cpa|courses|coupons|coupon|country|corsica|coop|cool|cookingchannel|cooking|contractors|contact|consulting|construction|condos|comsec|computer|compare|company|community|commbank|comcast|com|cologne|college|coffee|codes|coach|clubmed|club|cloud|clothing|clinique|clinic|click|cleaning|claims|cityeats|city|citic|citi|citadel|cisco|circle|cipriani|church|chrysler|chrome|christmas|chloe|chintai|cheap|chat|chase|charity|channel|chanel|cfd|cfa|cern|ceo|center|ceb|cbs|cbre|cbn|cba|catholic|catering|cat|casino|cash|caseih|case|casa|cartier|cars|careers|career|care|cards|caravan|car|capitalone|capital|capetown|canon|cancerresearch|camp|camera|cam|calvinklein|call|cal|cafe|cab|bzh|buzz|buy|business|builders|build|bugatti|budapest|brussels|brother|broker|broadway|bridgestone|bradesco|box|boutique|bot|boston|bostik|bosch|boots|booking|book|boo|bond|bom|bofa|boehringer|boats|bnpparibas|bnl|bmw|bms|blue|bloomberg|blog|blockbuster|blanco|blackfriday|black|biz|bio|bingo|bing|bike|bid|bible|bharti|bet|bestbuy|best|berlin|bentley|beer|beauty|beats|bcn|bcg|bbva|bbt|bbc|bayern|bauhaus|basketball|baseball|bargains|barefoot|barclays|barclaycard|barcelona|bar|bank|band|bananarepublic|banamex|baidu|baby|azure|axa|aws|avianca|autos|auto|author|auspost|audio|audible|audi|auction|attorney|athleta|associates|asia|asda|arte|art|arpa|army|archi|aramco|arab|aquarelle|apple|app|apartments|aol|anz|anquan|android|analytics|amsterdam|amica|amfam|amex|americanfamily|americanexpress|alstom|alsace|ally|allstate|allfinanz|alipay|alibaba|alfaromeo|akdn|airtel|airforce|airbus|aigo|aig|agency|agakhan|africa|afl|afamilycompany|aetna|aero|aeg|adult|ads|adac|actor|active|aco|accountants|accountant|accenture|academy|abudhabi|abogado|able|abc|abbvie|abbott|abb|abarth|aarp|aaa|onion)(?=[^0-9a-zA-Z@+-]|$))|(?:(?:한국|香港|澳門|新加坡|台灣|台湾|中國|中国|გე|ລາວ|ไทย|ලංකා|ഭാരതം|ಭಾರತ|భారత్|சிங்கப்பூர்|இலங்கை|இந்தியா|ଭାରତ|ભારત|ਭਾਰਤ|ভাৰত|ভারত|বাংলা|भारोत|भारतम्|भारत|ڀارت|پاکستان|موريتانيا|مليسيا|مصر|قطر|فلسطين|عمان|عراق|سورية|سودان|تونس|بھارت|بارت|ایران|امارات|المغرب|السعودية|الجزائر|البحرين|الاردن|հայ|қаз|укр|срб|рф|мон|мкд|ею|бел|бг|ευ|ελ|zw|zm|za|yt|ye|ws|wf|vu|vn|vi|vg|ve|vc|va|uz|uy|us|um|uk|ug|ua|tz|tw|tv|tt|tr|tp|to|tn|tm|tl|tk|tj|th|tg|tf|td|tc|sz|sy|sx|sv|su|st|ss|sr|so|sn|sm|sl|sk|sj|si|sh|sg|se|sd|sc|sb|sa|rw|ru|rs|ro|re|qa|py|pw|pt|ps|pr|pn|pm|pl|pk|ph|pg|pf|pe|pa|om|nz|nu|nr|np|no|nl|ni|ng|nf|ne|nc|na|mz|my|mx|mw|mv|mu|mt|ms|mr|mq|mp|mo|mn|mm|ml|mk|mh|mg|mf|me|md|mc|ma|ly|lv|lu|lt|ls|lr|lk|li|lc|lb|la|kz|ky|kw|kr|kp|kn|km|ki|kh|kg|ke|jp|jo|jm|je|it|is|ir|iq|io|in|im|il|ie|id|hu|ht|hr|hn|hm|hk|gy|gw|gu|gt|gs|gr|gq|gp|gn|gm|gl|gi|gh|gg|gf|ge|gd|gb|ga|fr|fo|fm|fk|fj|fi|eu|et|es|er|eh|eg|ee|ec|dz|do|dm|dk|dj|de|cz|cy|cx|cw|cv|cu|cr|co|cn|cm|cl|ck|ci|ch|cg|cf|cd|cc|ca|bz|by|bw|bv|bt|bs|br|bq|bo|bn|bm|bl|bj|bi|bh|bg|bf|be|bd|bb|ba|az|ax|aw|au|at|as|ar|aq|ao|an|am|al|ai|ag|af|ae|ad|ac)(?=[^0-9a-zA-Z@+-]|$))|(?:xn--[\\-0-9a-z]+))))(?::([0-9]+))?(\\/(?:(?:[a-z\\u0400-\\u04FF0-9!\\*';:=\\+,\\.\\$\\/%#\\[\\]\\-\\u2013_~@\\|&\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\xFF\\u0100-\\u024F\\u0253\\u0254\\u0256\\u0257\\u0259\\u025B\\u0263\\u0268\\u026F\\u0272\\u0289\\u028B\\u02BB\\u0300-\\u036F\\u1E00-\\u1EFF]*(?:\\((?:[a-z\\u0400-\\u04FF0-9!\\*';:=\\+,\\.\\$\\/%#\\[\\]\\-\\u2013_~@\\|&\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\xFF\\u0100-\\u024F\\u0253\\u0254\\u0256\\u0257\\u0259\\u025B\\u0263\\u0268\\u026F\\u0272\\u0289\\u028B\\u02BB\\u0300-\\u036F\\u1E00-\\u1EFF]+|(?:[a-z\\u0400-\\u04FF0-9!\\*';:=\\+,\\.\\$\\/%#\\[\\]\\-\\u2013_~@\\|&\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\xFF\\u0100-\\u024F\\u0253\\u0254\\u0256\\u0257\\u0259\\u025B\\u0263\\u0268\\u026F\\u0272\\u0289\\u028B\\u02BB\\u0300-\\u036F\\u1E00-\\u1EFF]*\\([a-z\\u0400-\\u04FF0-9!\\*';:=\\+,\\.\\$\\/%#\\[\\]\\-\\u2013_~@\\|&\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\xFF\\u0100-\\u024F\\u0253\\u0254\\u0256\\u0257\\u0259\\u025B\\u0263\\u0268\\u026F\\u0272\\u0289\\u028B\\u02BB\\u0300-\\u036F\\u1E00-\\u1EFF]+\\)[a-z\\u0400-\\u04FF0-9!\\*';:=\\+,\\.\\$\\/%#\\[\\]\\-\\u2013_~@\\|&\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\xFF\\u0100-\\u024F\\u0253\\u0254\\u0256\\u0257\\u0259\\u025B\\u0263\\u0268\\u026F\\u0272\\u0289\\u028B\\u02BB\\u0300-\\u036F\\u1E00-\\u1EFF]*))\\)[a-z\\u0400-\\u04FF0-9!\\*';:=\\+,\\.\\$\\/%#\\[\\]\\-\\u2013_~@\\|&\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\xFF\\u0100-\\u024F\\u0253\\u0254\\u0256\\u0257\\u0259\\u025B\\u0263\\u0268\\u026F\\u0272\\u0289\\u028B\\u02BB\\u0300-\\u036F\\u1E00-\\u1EFF]*)*[\\+\\-a-z\\u0400-\\u04FF0-9=_#\\/\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\xFF\\u0100-\\u024F\\u0253\\u0254\\u0256\\u0257\\u0259\\u025B\\u0263\\u0268\\u026F\\u0272\\u0289\\u028B\\u02BB\\u0300-\\u036F\\u1E00-\\u1EFF]|(?:\\((?:[a-z\\u0400-\\u04FF0-9!\\*';:=\\+,\\.\\$\\/%#\\[\\]\\-\\u2013_~@\\|&\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\xFF\\u0100-\\u024F\\u0253\\u0254\\u0256\\u0257\\u0259\\u025B\\u0263\\u0268\\u026F\\u0272\\u0289\\u028B\\u02BB\\u0300-\\u036F\\u1E00-\\u1EFF]+|(?:[a-z\\u0400-\\u04FF0-9!\\*';:=\\+,\\.\\$\\/%#\\[\\]\\-\\u2013_~@\\|&\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\xFF\\u0100-\\u024F\\u0253\\u0254\\u0256\\u0257\\u0259\\u025B\\u0263\\u0268\\u026F\\u0272\\u0289\\u028B\\u02BB\\u0300-\\u036F\\u1E00-\\u1EFF]*\\([a-z\\u0400-\\u04FF0-9!\\*';:=\\+,\\.\\$\\/%#\\[\\]\\-\\u2013_~@\\|&\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\xFF\\u0100-\\u024F\\u0253\\u0254\\u0256\\u0257\\u0259\\u025B\\u0263\\u0268\\u026F\\u0272\\u0289\\u028B\\u02BB\\u0300-\\u036F\\u1E00-\\u1EFF]+\\)[a-z\\u0400-\\u04FF0-9!\\*';:=\\+,\\.\\$\\/%#\\[\\]\\-\\u2013_~@\\|&\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\xFF\\u0100-\\u024F\\u0253\\u0254\\u0256\\u0257\\u0259\\u025B\\u0263\\u0268\\u026F\\u0272\\u0289\\u028B\\u02BB\\u0300-\\u036F\\u1E00-\\u1EFF]*))\\)))|(?:@[a-z\\u0400-\\u04FF0-9!\\*';:=\\+,\\.\\$\\/%#\\[\\]\\-\\u2013_~@\\|&\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\xFF\\u0100-\\u024F\\u0253\\u0254\\u0256\\u0257\\u0259\\u025B\\u0263\\u0268\\u026F\\u0272\\u0289\\u028B\\u02BB\\u0300-\\u036F\\u1E00-\\u1EFF]+\\/))*)?(\\?[a-z0-9!?\\*'@\\(\\);:&=\\+\\$\\/%#\\[\\]\\-_\\.,~|]*[a-z0-9\\-_&=#\\/])?))",Fi="gi",Yn={source:Ci,flags:Fi},Je=po("drafts-db","drafts-store"),Si={set:(t,n)=>fo(t,n,Je),get:t=>go(t,Je),getMany:t=>vo(t,Je),del:t=>bo(t,Je),delMany:t=>yo(t,Je),clear:()=>_o(Je),keys:()=>ko(Je)},Jn={drafts:Si},nt={public:"earth",unlisted:"group",private:"lock",direct:"message"};function $i({poll:t,lang:n,readOnly:a,refresh:s=()=>{},votePoll:o=()=>{}}){const[r,c]=Z("default"),{expired:l,expiresAt:m,id:f,multiple:d,options:p,ownVotes:h,voted:g,votersCount:_,votesCount:b,emojis:y}=t,v=!!m&&new Date(m),x=_||b;let L=0;x<=1e3?L=0:x<=1e4?L=1:x<=1e5&&(L=2);const[S,w]=Z(!1),P=p.every(C=>C.votesCount!==null);return e("div",{lang:n,dir:"auto",class:`poll ${a?"read-only":""} ${r==="loading"?"loading":""}`,children:[S&&P||g||l?e(W,{children:[e("div",{class:"poll-options",children:p.map((C,N)=>{const{title:Y,votesCount:B}=C,R=x?(B/x*100).toFixed(L):0,V=B>0&&B===Math.max(...p.map(U=>U.votesCount));return e("div",{class:`poll-option poll-result ${V?"poll-option-leading":""}`,style:{"--percentage":`${R}%`},children:[e("div",{class:"poll-option-title",children:[e("span",{children:e(vt,{text:Y,emojis:y})}),g&&h.includes(N)&&e(W,{children:[" ",e(T,{icon:"check-circle"})]})]}),e("div",{class:"poll-option-votes",title:`${B} vote${B===1?"":"s"}`,children:[R,"%"]})]},`${N}-${Y}-${B}`)})}),!l&&!g&&e("button",{class:"poll-vote-button plain2",disabled:r==="loading",onClick:C=>{C.preventDefault(),w(!1)},children:[e(T,{icon:"arrow-left",size:"s"})," Hide results"]})]}):e("form",{onSubmit:async C=>{C.preventDefault();const N=C.target,Y=new FormData(N),B=[];Y.forEach((R,V)=>{V==="poll"&&B.push(R)}),B.length&&(c("loading"),await o(B),c("default"))},children:[e("div",{class:"poll-options",children:p.map((C,N)=>{const{title:Y}=C;return e("div",{class:"poll-option",children:e("label",{class:"poll-label",children:[e("input",{type:d?"checkbox":"radio",name:"poll",value:N,disabled:r==="loading",readOnly:a}),e("span",{class:"poll-option-title",children:e(vt,{text:Y,emojis:y})})]})})})}),!a&&e("button",{class:"poll-vote-button",type:"submit",disabled:r==="loading",children:"Vote"})]}),e("p",{class:"poll-meta",children:[!l&&!a&&e("button",{type:"button",class:"plain small",disabled:r==="loading",style:{marginLeft:-8},onClick:C=>{C.preventDefault(),c("loading"),(async()=>(await s(),c("default")))()},title:"Refresh",children:e(T,{icon:"refresh",alt:"Refresh"})}),!g&&!l&&!a&&P&&e("button",{type:"button",class:"plain small",disabled:r==="loading",onClick:C=>{C.preventDefault(),w(!S)},title:S?"Hide results":"Show results",children:[e(T,{icon:S?"eye-open":"eye-close",alt:S?"Hide results":"Show results"})," "]}),!l&&!a&&" ",e("span",{title:b,children:He(b)})," vote",b===1?"":"s",!!_&&_!==b&&e(W,{children:[" ","• ",e("span",{title:_,children:He(_)})," ","voter",_===1?"":"s"]})," ","• ",l?"Ended":"Ending"," ",!!v&&e(bt,{datetime:v})]})," "]})}const Pi=wo();function Ii(t,n){if(!(t!=null&&t.length))return!1;const a=t.filter(r=>{const{filter:c}=r,l=c.context.includes(n);return l?c.expiresAt?new Date(c.expiresAt)>new Date:l:!1});if(!a.length)return!1;if(a.some(r=>r.filter.filterAction==="hide"))return{action:"hide"};if(a.some(r=>r.filter.filterAction==="warn")){const r=a.map(c=>c.filter.title);return{action:"warn",titles:r,titlesStr:r.join(" • ")}}return!1}const $a=qe(Ii);function Ri(t,n,a){var c;const{filtered:s}=t;if(!(s!=null&&s.length)||a&&((c=t.account)==null?void 0:c.id)===a)return!0;const r=$a(s,n);return r?r.action!=="hide":!0}function Ar(t,n){if(!(t!=null&&t.length))return[];if(!n)return t;const a=O.session.get("currentAccount");return t.filter(s=>Ri(s,n,a))}const cn=document.createElement("div");function ln(t){return t?(cn.innerHTML=t,cn.querySelectorAll(".invisible").forEach(n=>{n.remove()}),cn.innerText.length):0}const ht="speechSynthesis"in window;function Zn(t,n){if(ht)try{speechSynthesis.speaking&&speechSynthesis.cancel();const a=new SpeechSynthesisUtterance(t);n&&(a.lang=n),speechSynthesis.speak(a)}catch(a){alert(a)}}function Di(t){const{spoilerText:n,content:a,poll:s,mediaAttachments:o}=t;let r="";return n!=null&&n.trim()?r+=n:r+=vn(a),r=r.trim(),s&&(r+=" 📊"),o!=null&&o.length&&(r+=" "+o.map(c=>({image:"🖼️",gifv:"🎞️",video:"📹",audio:"🎵",unknown:""})[c.type]||"").join("")),r}function It({className:t="truncated"}={}){const n=Q(),a=ma(({height:s})=>{if(n.current){const{scrollHeight:o}=n.current;let r=o>s;if(r){const{height:c,maxHeight:l}=getComputedStyle(n.current),m=parseInt(l||c,10);r=o>m}n.current.classList.toggle(t,r)}},300);return xo({ref:n,box:"border-box",onResize:a}),n}const Mi=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Oi="ALT",un=t=>{const{alt:n,lang:a,index:s,...o}=t;return!n||!n.trim()?null:e("button",{type:"button",class:"alt-badge clickable",...o,onClick:r=>{r.stopPropagation(),r.preventDefault(),M.showMediaAlt={alt:n,lang:a}},title:"Media description",children:[Oi,!!s&&e("sup",{children:s})]})},zi=140,Pa=qe(t=>t!=null&&t.length?t.length>zi||/[\n\r].*[\n\r]/.test(t.trim()):!1);function Ni({class:t="",media:n,to:a,lang:s,showOriginal:o,autoAnimate:r,showCaption:c,altIndex:l,onClick:m=()=>{}}){const{blurhash:f,description:d,meta:p,previewRemoteUrl:h,previewUrl:g,remoteUrl:_,url:b,type:y}=n,{original:v={},small:x,focus:L}=p||{},S=o?v==null?void 0:v.width:x==null?void 0:x.width,w=o?v==null?void 0:v.height:x==null?void 0:x.height,P=o?b:g||b,C=o?_:h||_,N=S>=w?"landscape":"portrait",Y=f?ha(f):null,B=Q();let R;if(L){const G=(L.x+1)/2*100,ie=(1-L.y)/2*100;R=`${G.toFixed(0)}% ${ie.toFixed(0)}%`}const V=Q(),U=pa(({x:G,y:ie,scale:ee})=>{const{current:Ce}=V;if(Ce){const he=Eo({x:G,y:ie,scale:ee});ee===1?Ce.style.removeProperty("transform"):Ce.style.setProperty("transform",he),Ce.closest(".media-zoom").style.touchAction=ee<=1.01?"pan-x":""}},[]),[be,le]=Z(!1),ve={enabled:be,draggableUnZoomed:!1,inertiaFriction:.9,doubleTapZoomOutOnMaxScale:!0,containerProps:{className:"media-zoom",style:{overflow:"visible"}},onUpdate:U},A=$e(()=>a?G=>e(at,{to:a,...G}):"div",[a]),oe=y==="unknown"&&/\.(mp4|m4a|m4p|m4b|m4r|m4v|mov|webm)$/i.test(C),j=y==="image"||y==="unknown"&&g&&!oe,K=Q(),[de,me]=Z(!1);mn(()=>{if(!j||!o||!K.current)return;const{offsetWidth:G,offsetHeight:ie}=K.current,ee=S{const{children:ie,...ee}=G;return e("figure",{...ee,children:[ie,e("figcaption",{class:"media-caption",lang:s,dir:"auto",onClick:Ce=>{Ce.preventDefault(),Ce.stopPropagation(),M.showMediaAlt={alt:d,lang:s}},children:d})]})}:W;if(j)return ve.containerProps.style.display="inherit",mn(()=>{Mi&&o&&(async()=>{try{await fetch(P,{mode:"no-cors"}),V.current.src=P}catch{}})()},[P]),e(ce,{children:e(A,{ref:K,class:`media media-image ${t}`,onClick:m,"data-orientation":N,"data-has-alt":!te,style:o?{backgroundImage:`url(${g})`,backgroundSize:de?`${S}px ${w}px`:void 0,...Ie}:xe,children:o?e(zn,{...ve,children:e("img",{ref:V,src:P,alt:d,width:S,height:w,"data-orientation":N,loading:"eager",decoding:"sync",onLoad:G=>{G.target.closest(".media-image").style.backgroundImage="",G.target.closest(".media-zoom").style.display="",le(!0)},onError:G=>{const{src:ie}=G.target;ie===P&&P!==C&&(G.target.src=C)}})}):e(W,{children:[e("img",{src:P,alt:te?"":d,width:S,height:w,"data-orientation":N,loading:"lazy",style:{objectPosition:R||"center","--anim-duration":`${Math.min(Math.max(Math.max(S,w)/100,5),120)}s`},onLoad:G=>{G.target.dataset.loaded=!0},onError:G=>{const{src:ie}=G.target;ie===P&&P!==C&&(G.target.src=C)}}),!te&&e(un,{alt:d,lang:s,index:l})]})})});if(y==="gifv"||y==="video"||oe){const G=v.duration<31,ie=y==="gifv"&&G,ee=v.duration<61,Ce=ea(v.duration),he=!o&&!r&&ie,Ee=!o&&r&&ie,ke=v.duration>5,Fe=` `;return e(ce,{children:e(A,{class:`media ${t} media-${ie?"gif":"video"} ${Ee?"media-contain":""} ${he?"media-hover-animate":""}`,"data-orientation":N,"data-formatted-duration":o?void 0:Ce,"data-label":ie&&!o&&!Ee?"GIF":"","data-has-alt":!te,style:!o&&xe,onClick:ne=>{if(he)try{B.current.pause()}catch{}m(ne)},onMouseEnter:()=>{if(he)try{B.current.play()}catch{}},onMouseLeave:()=>{if(he)try{B.current.pause()}catch{}},onFocus:()=>{if(he)try{B.current.play()}catch{}},onBlur:()=>{if(he)try{B.current.pause()}catch{}},children:[o||Ee?ie&&o?e(zn,{...ve,enabled:!0,children:e("div",{ref:V,dangerouslySetInnerHTML:{__html:Fe}})}):e("div",{class:"video-container",dangerouslySetInnerHTML:{__html:Fe}}):ie?e("video",{ref:B,src:b,poster:g,width:S,height:w,"data-orientation":N,preload:"auto",playsinline:!0,loop:!0,muted:!0,onTimeUpdate:ke?ne=>{const{target:we}=ne,ot=we==null?void 0:we.closest(".media-gif");if(ot){const Re=we.currentTime/we.duration*100;ot.style.setProperty("--progress",`${Re}%`)}}:void 0}):e(W,{children:[e("img",{src:g,alt:te?"":d,width:S,height:w,"data-orientation":N,loading:"lazy"}),e("div",{class:"media-play",children:e(T,{icon:"play",size:"xl"})})]}),!o&&!te&&e(un,{alt:d,lang:s,index:l})]})})}else if(y==="audio"){const G=ea(v.duration);return e(ce,{children:e(A,{class:`media media-audio ${t}`,"data-formatted-duration":o?void 0:G,"data-has-alt":!te,onClick:m,style:!o&&xe,children:[o?e("audio",{src:_||b,preload:"none",controls:!0,autoplay:!0}):g?e("img",{src:g,alt:te?"":d,width:S,height:w,"data-orientation":N,loading:"lazy"}):null,!o&&e(W,{children:[e("div",{class:"media-play",children:e(T,{icon:"play",size:"xl"})}),!te&&e(un,{alt:d,lang:s,index:l})]})]})})}}function Xn(t){return e(To,{children:({ref:n,closeMenu:a})=>e(at,{...t,ref:n,onClick:({detail:s})=>a(s===0?"Enter":void 0)})})}const Bi=280,Vi=140;function ji(t,n){return n.v1.accounts.$select(t).fetch()}const Ui=zt(ji),pt={public:"Public",unlisted:"Unlisted",private:"Followers only",direct:"Private mention"},Hi=window.ontouchstart!==void 0&&/iPad|iPhone|iPod/.test(navigator.userAgent),Qn=80;function Ki(t){var n;return(n=t==null?void 0:t.options)!=null&&n.length?`📊: ${t.options.map(a=>`- ${a.title}${a.votesCount>=0?` (${a.votesCount})`:""}`).join(` `)}`:""}function dn(t){const{spoilerText:n,content:a,poll:s}=t;return(n?`${n} `:"")+vn(a)+Ki(s)}function Xe({statusID:t,status:n,instance:a,size:s="m",contentTextWeight:o,readOnly:r,enableCommentHint:c,withinContext:l,skeleton:m,enableTranslate:f,forceTranslate:d,previewMode:p,onMediaClick:h,quoted:g,onStatusLinkClick:_=()=>{},showFollowedTags:b}){var In,Rn,Dn;if(m)return e("div",{class:"status skeleton",children:[e(Qe,{size:"xxl"}),e("div",{class:"container",children:[e("div",{class:"meta",children:"███ ████████"}),e("div",{class:"content-container",children:e("div",{class:"content",children:e("p",{children:"████ ████████"})})})]})]});const{masto:y,instance:v,authenticated:x}=Ke({instance:a}),{instance:L}=Ke(),S=v===L;let w=Me(t||(n==null?void 0:n.id),v);const P=yt(M);if(n||(n=P.statuses[w]||P.statuses[t],w=Me(n==null?void 0:n.id,v)),!n)return null;const{account:{acct:C,avatar:N,avatarStatic:Y,id:B,url:R,displayName:V,username:U,emojis:be,bot:le,group:ve},id:A,repliesCount:oe,reblogged:j,reblogsCount:K,favourited:de,favouritesCount:me,bookmarked:ye,poll:se,muted:Ie,sensitive:xe,spoilerText:_e,visibility:te,language:ce,editedAt:G,filtered:ie,card:ee,createdAt:Ce,inReplyToId:he,inReplyToAccountId:Ee,content:ke,mentions:Fe,mediaAttachments:ne,reblog:we,uri:ot,url:Re,emojis:et,tags:E,_deleted:F,_pinned:D}=n,$=$e(()=>O.session.get("currentAccount"),[]),J=$e(()=>$&&$===B,[B,$]),q=Lo(Pi),z=!J&&!r&&!p&&$a(ie,q);if((z==null?void 0:z.action)==="hide")return null;const H=u=>{u.shiftKey};if(s!=="l"&&z)return e(Ji,{status:n,filterInfo:z,instance:v,containerProps:{onMouseEnter:H},showFollowedTags:!0});const re=new Date(Ce),Le=new Date(G);let Oe=Fe==null?void 0:Fe.find(u=>u.id===Ee);!Oe&&Ee===A&&(Oe={url:R,username:U,displayName:V});const[Se,We]=Z(Oe);if(!l&&!Se&&Ee){const u=M.accounts[Ee];u?We(u):Ui(Ee,y).then(I=>{We(I),M.accounts[I.id]=I}).catch(I=>{})}const _t=Ee===$||(Fe==null?void 0:Fe.find(u=>u.id===$)),Ge=$e(()=>!!(O.account.get("preferences")||{})["reading:expand:spoilers"],[]),kt=$e(()=>(O.account.get("preferences")||{})["reading:expand:media"]||"default",[]),ze=p||Ge||!!P.spoilers[A],it=p||kt==="show_all"||!!P.spoilersMedia[A];if(we)return ve?e("div",{"data-state-post-id":w,class:"status-group",onMouseEnter:H,children:[e("div",{class:"status-pre-meta",children:[e(T,{icon:"group",size:"l",alt:"Group"})," ",e(mt,{account:n.account,instance:v,showAvatar:!0})]}),e(Xe,{status:t?null:we,statusID:t?we.id:null,instance:v,size:s,contentTextWeight:o,readOnly:r})]}):e("div",{"data-state-post-id":w,class:"status-reblog",onMouseEnter:H,children:[e("div",{class:"status-pre-meta",children:[e(T,{icon:"rocket",size:"l"})," ",e(mt,{account:n.account,instance:v,showAvatar:!0})," ",e("span",{children:"boosted"})]}),e(Xe,{status:t?null:we,statusID:t?we.id:null,instance:v,size:s,contentTextWeight:o,readOnly:r,enableCommentHint:!0})]});if(b&&((In=P.statusFollowedTags[w])!=null&&In.length))return e("div",{"data-state-post-id":w,class:"status-followed-tags",onMouseEnter:H,children:[e("div",{class:"status-pre-meta",children:[e(T,{icon:"hashtag",size:"l"})," ",P.statusFollowedTags[w].slice(0,3).map(u=>e(at,{to:v?`/${v}/t/${u}`:`/t/${u}`,class:"status-followed-tag-item",children:u},u))]}),e(Xe,{status:t?null:n,statusID:t?n.id:null,instance:v,size:s,contentTextWeight:o,readOnly:r,enableCommentHint:!0})]});const ue=s==="l",[Vt,Da]=Z(d),yn=La(!0),Ma=P.settings.contentTranslationHideLanguages||[],{contentTranslation:jt,contentTranslationAutoInline:_n}=P.settings;jt||(f=!1);const kn=$e(()=>{if(!jt||!_n||r||l&&!ue||p||_e||xe||se||ee||ne!=null&&ne.length)return!1;const u=ln(ke);return u>0&&u<=Vi},[jt,_n,r,l,ue,p,_e,xe,se,ee,ne,ke]),[Ut,wt]=Z(!1),Oa=It(),za=It(),Na=It(),wn="Read more →",Ht=Q(null),rt="Sorry, your current logged-in instance can't interact with this post from another instance.",xn=pa(()=>Math.max(Math.round((_e.length+ln(ke))/140)||1,1),[_e,ke]),En=Mt(re),Tn=G&&Mt(Le);let st=x&&te!=="direct"&&te!=="private";te==="private"&&J&&(st=!0);const Kt=u=>{var I;if(!S||!x)return alert(rt);(u!=null&&u.shiftKey||(I=u==null?void 0:u.syntheticEvent)!=null&&I.shiftKey)&&ka({replyToStatus:n})||(M.showCompose={replyToStatus:n})},qt=$e(()=>ne.some(u=>{var I,X;return!((X=(I=u.description)==null?void 0:I.trim)!=null&&X.call(I))}),[ne]),yr=async()=>{if(!S||!x)return alert(rt),!1;try{if(!j){let u="Boost this post?";if(qt&&(u+=` ⚠️ Some media have no descriptions.`),!confirm(u))return!1}if(M.statuses[w]={...n,reblogged:!j,reblogsCount:K+(j?-1:1)},j){const u=await y.v1.statuses.$select(A).unreblog();return De(u,v),!0}else{const u=await y.v1.statuses.$select(A).reblog();return De(u,v),!0}}catch{return M.statuses[w]=n,!1}},Wt=async()=>{if(!S||!x)return alert(rt),!1;try{if(M.statuses[w]={...n,reblogged:!j,reblogsCount:K+(j?-1:1)},j){const u=await y.v1.statuses.$select(A).unreblog();return De(u,v),!0}else{const u=await y.v1.statuses.$select(A).reblog();return De(u,v),!0}}catch{return M.statuses[w]=n,!1}},Gt=async()=>{if(!S||!x)return alert(rt);try{if(M.statuses[w]={...n,favourited:!de,favouritesCount:me+(de?-1:1)},de){const u=await y.v1.statuses.$select(A).unfavourite();De(u,v)}else{const u=await y.v1.statuses.$select(A).favourite();De(u,v)}}catch{M.statuses[w]=n}},Yt=async()=>{if(!S||!x)return alert(rt);try{if(M.statuses[w]={...n,bookmarked:!ye},ye){const u=await y.v1.statuses.$select(A).unbookmark();De(u,v)}else{const u=await y.v1.statuses.$select(A).bookmark();De(u,v)}}catch{M.statuses[w]=n}},Ln=!!ce&&ce!==yn&&!Dt([ce],[yn])&&!Ma.find(u=>ce===u||Dt([ce],[u])),An=Q(),Cn=Q();async function Ba(u){var pe,Ye,Mn,On;u&&(An.current=y.v1.statuses.$select(t).rebloggedBy.list({limit:Qn}),Cn.current=y.v1.statuses.$select(t).favouritedBy.list({limit:Qn}));const[{value:I},{value:X}]=await Promise.allSettled([An.current.next(),Cn.current.next()]);if((pe=I.value)!=null&&pe.length||(Ye=X.value)!=null&&Ye.length){const Zt=[];return(Mn=I.value)!=null&&Mn.length&&Zt.push(...I.value.map(lt=>(lt._types=["reblog"],lt))),(On=X.value)!=null&&On.length&&Zt.push(...X.value.map(lt=>(lt._types=["favourite"],lt))),{value:Zt,done:I.done&&X.done}}return{value:[],done:!0}}const _r=Q(),Fn=e(W,{children:[!ue&&e(W,{children:[e(Ao,{children:[e("span",{class:"ib",children:[e(T,{icon:nt[te],size:"s"})," ",e("span",{children:pt[te]})]})," ",e("span",{class:"ib",children:[oe>0&&e("span",{children:[e(T,{icon:"comment2",alt:"Replies",size:"s"})," ",e("span",{children:He(oe)})]})," ",K>0&&e("span",{children:[e(T,{icon:"rocket",alt:"Boosts",size:"s"})," ",e("span",{children:He(K)})]})," ",me>0&&e("span",{children:[e(T,{icon:"heart",alt:"Likes",size:"s"})," ",e("span",{children:He(me)})]})]}),e("br",{}),En]}),e(Xn,{to:v?`/${v}/s/${A}`:`/s/${A}`,onClick:u=>{_(u,n)},children:[e(T,{icon:"arrow-right"}),e("span",{children:["View post by @",U||C]})]})]}),!!G&&e(Te,{onClick:()=>{wt(A)},children:[e(T,{icon:"history"}),e("span",{children:["Show Edit History",e("br",{}),e("small",{class:"more-insignificant",children:["Edited: ",Tn]})]})]}),(!ue||!!G)&&e(Xt,{}),ue&&e(Te,{onClick:()=>{M.showGenericAccounts={heading:"Boosted/Liked by…",fetchAccounts:Ba,instance:v,showReactions:!0}},children:[e(T,{icon:"react"}),e("span",{children:["Boosted/Liked by",e("span",{class:"more-insignificant",children:"…"})]})]}),!ue&&S&&e(W,{children:[e("div",{class:"menu-horizontal",children:[e(tn,{subMenu:!0,confirmLabel:e(W,{children:[e(T,{icon:"rocket"}),e("span",{children:j?"Unboost?":"Boost to everyone?"})]}),menuFooter:qt&&!j&&e("div",{class:"footer",children:[e(T,{icon:"alert"}),"Some media have no descriptions."]}),disabled:!st,onClick:async()=>{try{const u=await Wt();!ue&&u&&Ae(j?`Unboosted @${U||C}'s post`:`Boosted @${U||C}'s post`)}catch{}},children:[e(T,{icon:"rocket",style:{color:j&&"var(--reblog-color)"}}),e("span",{children:j?"Unboost":"Boost…"})]}),e(Te,{onClick:()=>{try{Gt(),ue||Ae(de?`Unliked @${U||C}'s post`:`Liked @${U||C}'s post`)}catch{}},children:[e(T,{icon:"heart",style:{color:de&&"var(--favourite-color)"}}),e("span",{children:de?"Unlike":"Like"})]})]}),e("div",{class:"menu-horizontal",children:[e(Te,{onClick:Kt,children:[e(T,{icon:"reply"}),e("span",{children:"Reply"})]}),e(Te,{onClick:()=>{try{Yt(),ue||Ae(ye?`Unbookmarked @${U||C}'s post`:`Bookmarked @${U||C}'s post`)}catch{}},children:[e(T,{icon:"bookmark",style:{color:ye&&"var(--link-color)"}}),e("span",{children:ye?"Unbookmark":"Bookmark"})]})]})]}),f?e("div",{class:ht?"menu-horizontal":"",children:[e(Te,{disabled:Vt,onClick:()=>{Da(!0)},children:[e(T,{icon:"translate"}),e("span",{children:"Translate"})]}),ht&&e(Te,{onClick:()=>{const u=dn(n);u&&Zn(u,ce)},children:[e(T,{icon:"speak"}),e("span",{children:"Speak"})]})]}):(!ce||Ln)&&e("div",{class:ht?"menu-horizontal":"",children:[e(Xn,{to:`${v?`/${v}`:""}/s/${A}?translate=1`,children:[e(T,{icon:"translate"}),e("span",{children:"Translate"})]}),ht&&e(Te,{onClick:()=>{const u=dn(n);u&&Zn(u,ce)},children:[e(T,{icon:"speak"}),e("span",{children:"Speak"})]})]}),(!ue&&S||f)&&e(Xt,{}),e(Te,{href:Re,target:"_blank",children:[e(T,{icon:"external"}),e("small",{class:"menu-double-lines",children:Yi(Re)})]}),e("div",{class:"menu-horizontal",children:[e(Te,{onClick:()=>{try{navigator.clipboard.writeText(Re),Ae("Link copied")}catch{Ae("Unable to copy link")}},children:[e(T,{icon:"link"}),e("span",{children:"Copy"})]}),(navigator==null?void 0:navigator.share)&&((Rn=navigator==null?void 0:navigator.canShare)==null?void 0:Rn.call(navigator,{url:Re}))&&e(Te,{onClick:()=>{try{navigator.share({url:Re})}catch{alert("Sharing doesn't seem to work.")}},children:[e(T,{icon:"share"}),e("span",{children:"Share…"})]})]}),(J||_t)&&e(Xt,{}),(J||_t)&&e(Te,{onClick:async()=>{try{const u=await y.v1.statuses.$select(A)[Ie?"unmute":"mute"]();De(u,v),Ae(Ie?"Conversation unmuted":"Conversation muted")}catch{Ae(Ie?"Unable to unmute conversation":"Unable to mute conversation")}},children:Ie?e(W,{children:[e(T,{icon:"unmute"}),e("span",{children:"Unmute conversation"})]}):e(W,{children:[e(T,{icon:"mute"}),e("span",{children:"Mute conversation"})]})}),J&&e("div",{class:"menu-horizontal",children:[e(Te,{onClick:()=>{M.showCompose={editStatus:n}},children:[e(T,{icon:"pencil"}),e("span",{children:"Edit"})]}),ue&&e(tn,{subMenu:!0,confirmLabel:e(W,{children:[e(T,{icon:"trash"}),e("span",{children:"Delete this post?"})]}),menuItemClassName:"danger",onClick:()=>{(async()=>{try{await y.v1.statuses.$select(A).remove();const u=_a(A,v);u._deleted=!0,Ae("Deleted")}catch{Ae("Unable to delete")}})()},children:[e(T,{icon:"trash"}),e("span",{children:"Delete…"})]})]})]}),Sn=Q(),[$n,xt]=Z(!1),[Et,Jt]=Z({}),Tt=!ue&&!p&&!F&&!g,Va=fa(Hi&&Tt?u=>{var Ye;if(u.pointerType==="mouse")return;const{clientX:I,clientY:X}=((Ye=u.touches)==null?void 0:Ye[0])||u,pe=u.target.closest("a");pe&&/^https?:\/\//.test(pe.getAttribute("href"))||(u.preventDefault(),Jt({anchorPoint:{x:I,y:X},direction:"right"}),xt(!0))}:null,{threshold:600,captureEvent:!0,detect:"touch",cancelOnMovement:2}),Lt=!r&&!p&&!g,ja=Ve("r, shift+r",Kt,{enabled:Lt}),Ua=Ve("f, l",()=>{try{Gt(),ue||Ae(de?`Unliked @${U||C}'s post`:`Liked @${U||C}'s post`)}catch{}},{enabled:Lt}),Ha=Ve("d",()=>{try{Yt(),ue||Ae(ye?`Unbookmarked @${U||C}'s post`:`Bookmarked @${U||C}'s post`)}catch{}},{enabled:Lt}),Ka=Ve("shift+b",()=>{(async()=>{try{const u=await Wt();!ue&&u&&Ae(j?`Unboosted @${U||C}'s post`:`Boosted @${U||C}'s post`)}catch{}})()},{enabled:Lt&&st}),qa=Ve("x",u=>{const I=document.activeElement.closest(".status-link, .status-focus");if(I){const X=I.querySelector(".spoiler-button:not(.spoiling)");if(X)u.stopPropagation(),X.click();else{const pe=I.querySelector(".spoiler-media-button:not(.spoiling)");pe&&(u.stopPropagation(),pe.click())}}}),At=ne.slice(0,ue?void 0:4),Ct=ne.length>1&&At.some(u=>!!u.description&&!Pa(u.description)),Wa=$e(()=>{if(!Ct)return null;const u=[];return At.forEach((I,X)=>{if(!I.description)return;const pe=u.findIndex(Ye=>Ye.media.description===I.description);pe===-1?u.push({media:I,indices:[X]}):u[pe].indices.push(X)}),u.map(({media:I,indices:X})=>e("div",{"data-caption-index":X.map(pe=>pe+1).join(" "),onClick:pe=>{pe.preventDefault(),pe.stopPropagation(),M.showMediaAlt={alt:I.description,lang:ce}},title:I.description,children:[e("sup",{children:X.map(pe=>pe+1).join(" ")})," ",I.description]},I.id))},[Ct,At,ce]),ct=$e(()=>{var u;return!!he&&Ee===((u=n.account)==null?void 0:u.id)||!!P.statusThreadNumber[w]},[he,Ee,(Dn=n.account)==null?void 0:Dn.id,P.statusThreadNumber[w]]),Ga=$e(()=>c&&!ct&&!l&&!he&&te==="public"&&oe>0,[c,ct,l,he,oe,te]),Pn=$e(()=>{if(ee||se||xe||_e||ne!=null&&ne.length||ct||l||he||oe<=0||!/[???︖❓❔⁇⁈⁉¿‽؟]/.test(ke))return!1;const X=ln(ke);if(X>0&&X<=Bi)return!0},[ee,se,xe,_e,ne,we,ct,l,he,oe,ke]);return e("article",{"data-state-post-id":w,ref:u=>{var X;Ht.current=u;const I=((X=u==null?void 0:u.closest)==null?void 0:X.call(u,".timeline-item, .timeline-item-alt, .status-link, .status-focus"))||u;ja.current=I,Ua.current=I,Ha.current=I,Ka.current=I,qa.current=I},tabindex:"-1",class:`status ${!l&&he&&Se?"status-reply-to":""} visibility-${te} ${D?"status-pinned":""} ${{s:"small",m:"medium",l:"large"}[s]} ${F?"status-deleted":""} ${g?"status-card":""}`,onMouseEnter:H,onContextMenu:u=>{if(!Tt||u.metaKey)return;const I=u.target.closest("a");I&&/^https?:\/\//.test(I.getAttribute("href"))||(u.preventDefault(),Jt({anchorPoint:{x:u.clientX,y:u.clientY},direction:"right"}),xt(!0))},...Tt?Va():{},children:[Tt&&e(Co,{ref:Sn,state:$n?"open":void 0,...Et,onClose:u=>{var I,X,pe;xt(!1),(u==null?void 0:u.reason)==="click"&&((pe=(X=(I=Ht.current)==null?void 0:I.closest("[tabindex]"))==null?void 0:X.focus)==null||pe.call(X))},portal:{target:document.body},containerProps:{style:{zIndex:1001},onClick:()=>{var u,I;(I=(u=Sn.current)==null?void 0:u.closeMenu)==null||I.call(u)}},overflow:"auto",boundingBoxPadding:Ta(),unmountOnClose:!0,children:Fn}),s!=="l"&&e("div",{class:"status-badge",children:[j&&e(T,{class:"reblog",icon:"rocket",size:"s"}),de&&e(T,{class:"favourite",icon:"heart",size:"s"}),ye&&e(T,{class:"bookmark",icon:"bookmark",size:"s"}),D&&e(T,{class:"pin",icon:"pin",size:"s"})]}),s!=="s"&&e("a",{href:R,tabindex:"-1",title:`@${C}`,onClick:u=>{u.preventDefault(),u.stopPropagation(),M.showAccount={account:n.account,instance:v}},children:e(Qe,{url:Y||N,size:"xxl",squircle:le})}),e("div",{class:"container",children:[e("div",{class:"meta",children:[e("span",{class:"meta-name",children:e(mt,{account:n.account,instance:v,showAvatar:s==="s",showAcct:ue})})," ",s!=="l"&&(F?e("span",{class:"status-deleted-tag",children:"Deleted"}):Re&&!p&&!g?e(at,{to:v?`/${v}/s/${A}`:`/s/${A}`,onClick:u=>{u.metaKey||u.ctrlKey||u.shiftKey||u.altKey||u.which===2||(u.preventDefault(),u.stopPropagation(),_==null||_(u,n),Jt({anchorRef:{current:u.currentTarget},align:"end",direction:"bottom",gap:4}),xt(!0))},class:`time ${$n&&(Et!=null&&Et.anchorRef)?"is-open":""}`,children:[Ga&&!Pn?e(T,{icon:"comment2",size:"s",alt:`${oe} ${oe===1?"reply":"replies"}`}):e(T,{icon:nt[te],alt:pt[te],size:"s"})," ",e(bt,{datetime:re,format:"micro"})]}):e("span",{class:"time",children:[e(T,{icon:nt[te],alt:pt[te],size:"s"})," ",e(bt,{datetime:re,format:"micro"})]}))]}),te==="direct"&&e(W,{children:[e("div",{class:"status-direct-badge",children:"Private mention"})," "]}),!l&&e(W,{children:ct?e("div",{class:"status-thread-badge",children:[e(T,{icon:"thread",size:"s"}),"Thread",P.statusThreadNumber[w]?` ${P.statusThreadNumber[w]}/X`:""]}):!!he&&!!Se&&(!!_e||!Fe.find(u=>u.id===Ee))&&e("div",{class:"status-reply-badge",children:[e(T,{icon:"reply"})," ",e(mt,{account:Se,instance:v,short:!0})]})}),e("div",{class:`content-container ${_e||xe?"has-spoiler":""} ${ze?"show-spoiler":""} ${it?"show-media":""}`,"data-content-text-weight":o?xn():null,style:(ue||o)&&{"--content-text-weight":xn()},children:[!!_e&&e(W,{children:[e("div",{class:"content spoiler-content",lang:ce,dir:"auto",ref:Oa,"data-read-more":wn,children:e("p",{children:e(vt,{text:_e,emojis:et})})}),Ge||p?e("div",{class:"spoiler-divider",children:[e(T,{icon:"eye-open"})," Content warning"]}):e("button",{class:`light spoiler-button ${ze?"spoiling":""}`,type:"button",onClick:u=>{u.preventDefault(),u.stopPropagation(),ze?(delete M.spoilers[A],Ge||delete M.spoilersMedia[A]):(M.spoilers[A]=!0,Ge||(M.spoilersMedia[A]=!0))},children:[e(T,{icon:ze?"eye-open":"eye-close"})," ",ze?"Show less":"Show content"]})]}),!!ke&&e("div",{class:"content",ref:za,"data-read-more":wn,children:[e("div",{lang:ce,dir:"auto",class:"inner-content",onClick:pi({mentions:Fe,instance:v,previewMode:p,statusURL:Re}),dangerouslySetInnerHTML:{__html:Aa(ke,{emojis:et,postEnhanceDOM:u=>{u.querySelectorAll('a.u-url[target="_blank"]').forEach(I=>{/http/i.test(I.innerText.trim())||I.removeAttribute("target")})}})}}),e(Zi,{id:A,instance:v,level:g})]}),!!se&&e($i,{lang:ce,poll:se,readOnly:r||!S||!x,onUpdate:u=>{M.statuses[w].poll=u},refresh:()=>y.v1.polls.$select(se.id).fetch().then(u=>{M.statuses[w].poll=u}).catch(u=>{}),votePoll:u=>y.v1.polls.$select(se.id).votes.create({choices:u}).then(I=>{M.statuses[w].poll=I}).catch(I=>{})}),((f||kn)&&!!ke.trim()&&!!vn(gn(ke,et))&&Ln||Vt)&&e(Ai,{forceTranslate:Vt||kn,mini:!ue&&!l,sourceLanguage:ce,text:dn(n)}),!p&&xe&&!!ne.length&&kt!=="show_all"&&e("button",{class:`plain spoiler-media-button ${it?"spoiling":""}`,type:"button",hidden:!Ge&&!!_e,onClick:u=>{u.preventDefault(),u.stopPropagation(),it?delete M.spoilersMedia[A]:M.spoilersMedia[A]=!0},children:[e(T,{icon:it?"eye-open":"eye-close"})," ",it?"Show less":"Show media"]}),!!ne.length&&e(qi,{lang:ce,enabled:Ct,captionChildren:Wa,children:e("div",{ref:Na,class:`media-container media-eq${ne.length} ${ne.length>2?"media-gt2":""} ${ne.length>4?"media-gt4":""}`,children:At.map((u,I)=>e(Ni,{media:u,autoAnimate:ue,showCaption:ne.length===1,lang:ce,altIndex:Ct&&!!u.description&&I+1,to:`/${v}/s/${A}?${l?"media":"media-only"}=${I+1}`,onClick:h?X=>{h(X,I,u,n)}:void 0},u.id))})}),!!ee&&/^https/i.test(ee==null?void 0:ee.url)&&!xe&&!_e&&!se&&!ne.length&&!P.statusQuotes[w]&&e(Wi,{card:ee,selfReferential:(ee==null?void 0:ee.url)===n.url||(ee==null?void 0:ee.url)===n.uri,instance:L})]}),!ue&&Pn&&e("div",{class:"content-comment-hint insignificant",children:[e(T,{icon:"comment2",alt:"Replies"})," ",oe]}),ue&&e(W,{children:[e("div",{class:"extra-meta",children:F?e("span",{class:"status-deleted-tag",children:"Deleted"}):e(W,{children:[e(T,{icon:nt[te],alt:pt[te]})," ",e("a",{href:Re,target:"_blank",rel:"noopener noreferrer",children:e("time",{class:"created",datetime:re.toISOString(),title:re.toLocaleString(),children:En})}),G&&e(W,{children:[" ","• ",e(T,{icon:"pencil",alt:"Edited"})," ",e("time",{tabIndex:"0",class:"edited",datetime:Le.toISOString(),onClick:()=>{wt(A)},children:Tn})]})]})}),e("div",{class:`actions ${F?"disabled":""}`,children:[e("div",{class:"action has-count",children:e(St,{title:"Reply",alt:"Comments",class:"reply-button",icon:"comment",count:oe,onClick:Kt})}),e(tn,{disabled:!st,onClick:Wt,confirmLabel:e(W,{children:[e(T,{icon:"rocket"}),e("span",{children:j?"Unboost?":"Boost to everyone?"})]}),menuFooter:qt&&!j&&e("div",{class:"footer",children:[e(T,{icon:"alert"}),"Some media have no descriptions."]}),children:e("div",{class:"action has-count",children:e(St,{checked:j,title:["Boost","Unboost"],alt:["Boost","Boosted"],class:"reblog-button",icon:"rocket",count:K,disabled:!st})})}),e("div",{class:"action has-count",children:e(St,{checked:de,title:["Like","Unlike"],alt:["Like","Liked"],class:"favourite-button",icon:"heart",count:me,onClick:Gt})}),e("div",{class:"action",children:e(St,{checked:ye,title:["Bookmark","Unbookmark"],alt:["Bookmark","Bookmarked"],class:"bookmark-button",icon:"bookmark",onClick:Yt})}),e(fn,{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(T,{icon:"more",size:"l",alt:"More"})})}),children:Fn})]})]})]}),!!Ut&&e(Nt,{class:"light",onClick:u=>{u.target===u.currentTarget&&wt(!1)},children:e(Gi,{statusID:Ut,instance:v,fetchStatusHistory:()=>y.v1.statuses.$select(Ut).history.list(),onClose:()=>{var u;wt(!1),(u=Ht.current)==null||u.focus()}})})]})}function qi(t){const{enabled:n,children:a,lang:s,captionChildren:o}=t;return!n||!o?a:e("figure",{class:"media-figure-multiple",children:[a,e("figcaption",{lang:s,dir:"auto",children:o})]})}function Wi({card:t,selfReferential:n,instance:a}){var B;const s=yt(M),{blurhash:o,title:r,description:c,html:l,providerName:m,providerUrl:f,authorName:d,authorUrl:p,width:h,height:g,image:_,imageDescription:b,url:y,type:v,embedUrl:x,language:L,publishedAt:S}=t,w=r||m||d,C=h/g>=1.2?"large":"",[N,Y]=Z(null);if(fe(()=>{w&&_&&!n&&ba(y)&&ya(a,y).then(R=>{if(!R)return;const{id:V,url:U}=R;Y("#"+U)})},[w,_,n]),s.unfurledLinks[y])return null;if(w&&(_||v==="photo"&&o)){const R=new URL(y).hostname.replace(/^www\./,"").replace(/\/$/,"");let V;const U=_&&o?ha(o):null;if(!_){const ve=Fo(o,44,44),A=document.createElement("canvas");A.width=44,A.height=44;const oe=A.getContext("2d"),j=oe.createImageData(44,44);j.data.set(ve),oe.putImageData(j,0,0),V=A.toDataURL()}return e("a",{href:N||y,target:N?null:"_blank",rel:"nofollow noopener noreferrer",class:`card link ${V?"":C}`,lang:L,dir:"auto",style:{"--average-color":U&&`rgb(${U.join(",")})`},children:[e("div",{class:"card-image",children:e("img",{src:_||V,width:h,height:g,loading:"lazy",alt:b||"",onError:be=>{try{be.target.style.display="none"}catch{}}})}),e("div",{class:"meta-container",children:[e("p",{class:"meta domain",dir:"auto",children:R}),e("p",{class:"title",dir:"auto",children:r}),e("p",{class:"meta",dir:"auto",children:c||!!S&&e(bt,{datetime:S,format:"micro"})})]})]})}else{if(v==="photo")return e("a",{href:y,target:"_blank",rel:"nofollow noopener noreferrer",class:"card photo",children:e("img",{src:x,width:h,height:g,alt:r||c,loading:"lazy",style:{height:"auto",aspectRatio:`${h}/${g}`}})});if(v==="video"){if(/youtube/i.test(m)){const R=(B=y.match(/watch\?v=([^&]+)/))==null?void 0:B[1];if(R)return e("lite-youtube",{videoid:R,nocookie:!0})}return e("div",{class:"card video",style:{aspectRatio:`${h}/${g}`},dangerouslySetInnerHTML:{__html:l}})}else if(w&&!_){const R=new URL(y).hostname.replace(/^www\./,"");return e("a",{href:N||y,target:N?null:"_blank",rel:"nofollow noopener noreferrer",class:"card link no-image",lang:L,children:e("div",{class:"meta-container",children:[e("p",{class:"meta domain",children:[e(T,{icon:"link",size:"s"})," ",e("span",{children:R})]}),e("p",{class:"title",children:r}),e("p",{class:"meta",children:c||m||d})]})})}}}function Gi({statusID:t,instance:n,fetchStatusHistory:a=()=>{},onClose:s}){const[o,r]=Z("default"),[c,l]=Z([]);return fe(()=>{r("loading"),(async()=>{try{const m=await a();l(m),r("default")}catch{r("error")}})()},[]),e("div",{id:"edit-history",class:"sheet",children:[!!s&&e("button",{type:"button",class:"sheet-close",onClick:s,children:e(T,{icon:"x"})}),e("header",{children:[e("h2",{children:"Edit History"}),o==="error"&&e("p",{children:"Failed to load history"}),o==="loading"&&e("p",{children:[e(Bt,{abrupt:!0})," Loading…"]})]}),e("main",{tabIndex:"-1",children:c.length>0&&e("ol",{children:c.map(m=>{const{createdAt:f}=m,d=new Date(f);return e("li",{class:"history-item",children:[e("h3",{children:e("time",{children:Mt(d,{formatOpts:{weekday:"short",second:"numeric"}})})}),e(Xe,{status:m,instance:n,size:"s",withinContext:!0,readOnly:!0,previewMode:!0})]},f)})})})]})}function St({checked:t,count:n,class:a,title:s,alt:o,icon:r,onClick:c,...l}){typeof s=="string"&&(s=[s,s]),typeof o=="string"&&(o=[o,o]);const[m,f]=Z(s[0]||""),[d,p]=Z(o[0]||"");return fe(()=>{t?(f(s[1]||""),p(o[1]||"")):(f(s[0]||""),p(o[0]||""))},[t,s,o]),e("button",{type:"button",title:m,class:`plain ${a} ${t?"checked":""}`,onClick:h=>{c&&(h.preventDefault(),h.stopPropagation(),c(h))},...l,children:[e(T,{icon:r,size:"l",alt:d}),!!n&&e(W,{children:[" ",e("small",{title:n,children:He(n)})]})]})}function ea(t){if(!t)return;let n=Math.floor(t/3600),a=Math.floor(t%3600/60),s=Math.round(t%60);return n===0?`${a}:${s.toString().padStart(2,"0")}`:`${n}:${a.toString().padStart(2,"0")}:${s.toString().padStart(2,"0")}`}function Yi(t){if(!t)return;const n=new URL(t),{host:a,pathname:s}=n,o=s.replace(/\/$/,""),[r,c,l]=o.match(/\/(@[^\/]+)\/(.*)/)||[];return e(W,{children:[a,c?e(W,{children:["/",c,e("wbr",{}),e("span",{class:"more-insignificant",children:["/",l]})]}):e("span",{class:"more-insignificant",children:o})]})}function Ji({status:t,filterInfo:n,instance:a,containerProps:s={},showFollowedTags:o}){var R;const r=yt(M),{id:c,account:{avatar:l,avatarStatic:m,bot:f,group:d},createdAt:p,visibility:h,reblog:g}=t,_=!!g,b=(n==null?void 0:n.titlesStr)||"",y=new Date(p),v=Di(t.reblog||t),[x,L]=Z(!1),S=fa(()=>{L(!0)},{threshold:600,captureEvent:!0,detect:"touch",cancelOnMovement:2}),w=It(),P=Me(t.id,a),C=Me(t.id,a)+" "+(Me(g==null?void 0:g.id,a)||""),N=(g==null?void 0:g.id)||c,Y=a?`/${a}/s/${N}`:`/s/${N}`,B=o&&!!((R=r.statusFollowedTags[P])!=null&&R.length);return e("div",{class:_?d?"status-group":"status-reblog":B?"status-followed-tags":"",...s,title:v,onContextMenu:V=>{V.preventDefault(),L(!0)},...S(),children:[e("article",{"data-state-post-id":C,class:"status filtered",tabindex:"-1",children:[e("b",{class:"status-filtered-badge clickable badge-meta",title:b,onClick:V=>{V.preventDefault(),L(!0)},children:[e("span",{children:"Filtered"}),e("span",{children:b})]})," ",e(Qe,{url:m||l,squircle:f}),e("span",{class:"status-filtered-info",children:[e("span",{class:"status-filtered-info-1",children:[e(mt,{account:t.account,instance:a})," ",e(T,{icon:nt[h],alt:pt[h],size:"s"})," ",_?"boosted":B?e("span",{children:r.statusFollowedTags[P].slice(0,3).map(V=>e("span",{class:"status-followed-tag-item",children:["#",V]},V))}):e(bt,{datetime:y,format:"micro"})]}),e("span",{class:"status-filtered-info-2",children:[_&&e(W,{children:[e(Qe,{url:g.account.avatarStatic||g.account.avatar,squircle:f})," "]}),v]})]})]}),!!x&&e(Nt,{class:"light",onClick:V=>{V.target===V.currentTarget&&L(!1)},children:e("div",{id:"filtered-status-peek",class:"sheet",children:[e("button",{type:"button",class:"sheet-close",onClick:()=>L(!1),children:e(T,{icon:"x"})}),e("header",{children:[e("b",{class:"status-filtered-badge",children:"Filtered"})," ",b]}),e("main",{tabIndex:"-1",children:e(at,{ref:w,class:"status-link",to:Y,onClick:()=>{L(!1)},"data-read-more":"Read more →",children:e(Xe,{status:t,instance:a,size:"s",readOnly:!0})})})]})})]})}const Zi=pn(({id:t,instance:n,level:a=0})=>{if(!t||!n)return;const s=yt(M),o=Me(t,n),r=s.statusQuotes[o],c=r==null?void 0:r.filter((l,m,f)=>f.findIndex(d=>d.url===l.url)===m);if(c!=null&&c.length&&!(a>2))return c.map(l=>e(at,{to:`${l.instance?`/${l.instance}`:""}/s/${l.id}`,class:"status-card-link","data-read-more":"Read more →",children:e(Xe,{statusID:l.id,instance:l.instance,size:"s",quoted:a+1,enableCommentHint:!0})},l.instance+l.id))}),ta=pn(Xe);var Xi={PHANPY_CLIENT_NAME:"Phanpy",PHANPY_WEBSITE:"https://phanpy.social",PHANPY_LINGVA_INSTANCES:"lingva.phanpy.social lingva.lunar.icu lingva.garudalinux.org translate.plausibility.cloud",PHANPY_PRIVACY_POLICY_URL:"https://github.com/cheeaun/phanpy/blob/main/PRIVACY.MD",VITE_APP_ENV:"production",BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{PHANPY_IMG_ALT_API_URL:na}=Xi,Qi=bn.reduce((t,n)=>{const[a,s,o]=n;return t[a]={common:s,native:o},t},{}),Ia={"5 minutes":5*60,"30 minutes":30*60,"1 hour":60*60,"6 hours":6*60*60,"12 hours":12*60*60,"1 day":24*60*60,"3 days":3*24*60*60,"7 days":7*24*60*60},er=Object.values(Ia),aa=24*60*60,oa=t=>{if(!t)return aa;const n=(new Date(t).getTime()-Date.now())/1e3;return er.find(a=>a>=n)||aa},Ue=document.createElement("ul");Ue.role="listbox";Ue.className="text-expander-menu";const tr=16,nr=new IntersectionObserver(t=>{t.forEach(n=>{if(n.isIntersecting){const{left:a,width:s}=n.boundingClientRect,{innerWidth:o}=window;a+s>o&&(Ue.style.left=o-s-tr+"px")}})});nr.observe(Ue);const Ze=Dt([new Intl.DateTimeFormat().resolvedOptions().locale,...navigator.languages],bn.map(t=>t[0]),"en"),Ra=new RegExp(Yn.source,Yn.flags),ar=/(^|[^\/\w])@(([a-z0-9_]+)@[a-z0-9\.\-]+[a-z0-9]+)/gi,or="$2xxxxxxxxxxxxxxxxxxxxxxx";function ir(t){return t.replace(Ra,or).replace(ar,"$1@$3")}const rr=/[a-z0-9_]+([a-z0-9_.-]+[a-z0-9_]+)?/i,sr=new RegExp(`(^|[^=\\/\\w])(@${rr.source}(?:@[\\p{L}\\w.-]+[\\w]+)?)`,"uig"),cr=new RegExp("(^|[^=\\/\\w])(#[a-z0-9_]+([a-z0-9_.-]+[a-z0-9_]+)?)(?![\\/\\w])","ig"),lr="[a-zA-Z0-9_]{2,}",ur=new RegExp(`([^A-Za-z0-9_:\\n]|^)(:${lr}:)(?=[^A-Za-z0-9_:]|$)`,"g");function dr(t,{maxCharacters:n=1/0}){let a=t;const{composerCharacterCount:s}=M;let o="";return s>n?(o=''+Nn(a,n)+"",a=Nn(a,0,n),a+o):a.replace(Ra,'$2$3').replace(sr,'$1$2').replace(cr,'$1$2').replace(ur,'$1$2')}function Cr({onClose:t,replyToStatus:n,editStatus:a,draftStatus:s,standalone:o,hasOpener:r}){var et;const{masto:c,instance:l}=Ke(),[m,f]=Z("default"),d=Q((s==null?void 0:s.uid)||So()),p=Ot(),h=p.info,g=Oo(),{statuses:{maxCharacters:_,maxMediaAttachments:b,charactersReservedPerUrl:y}={},mediaAttachments:{supportedMimeTypes:v=[],imageSizeLimit:x,imageMatrixLimit:L,videoSizeLimit:S,videoMatrixLimit:w,videoFrameRateLimit:P}={},polls:{maxOptions:C,maxCharactersPerOption:N,maxExpiration:Y,minExpiration:B}={}}=g||{},R=Q(),V=Q(),[U,be]=Z("public"),[le,ve]=Z(!1),[A,oe]=Z(O.session.get("currentLanguage")||Ze),j=Q(A),[K,de]=Z([]),[me,ye]=Z(null),se=O.account.get("preferences")||{},Ie=()=>{R.current&&R.current.dispatchEvent(new Event("input"))},xe=()=>{setTimeout(()=>{var E;(E=R.current)==null||E.focus()},300)};fe(()=>{if(n){const{spoilerText:E,visibility:F,language:D,sensitive:$}=n;E&&V.current&&(V.current.value=E);const q=[...new Set([n.account.acct,...n.mentions.map(z=>z.acct)])].filter(z=>z!==h.acct);q.length>0&&(R.current.value=`${q.map(z=>`@${z}`).join(" ")} `,Ie()),xe(),be(F==="public"&&se["posting:default:visibility"]?se["posting:default:visibility"]:F),oe(D||se.postingDefaultLanguage||Ze),ve($&&!!E)}else if(a){const{visibility:E,language:F,sensitive:D,poll:$,mediaAttachments:J}=a,q=!!($!=null&&$.options)&&{...$,options:$.options.map(z=>(z==null?void 0:z.title)||z),expiresIn:($==null?void 0:$.expiresIn)||oa($.expiresAt)};f("loading"),(async()=>{try{const z=await c.v1.statuses.$select(a.id).source.fetch(),{text:H,spoilerText:re}=z;R.current.value=H,R.current.dataset.source=H,Ie(),xe(),V.current.value=re,be(E),oe(F||presf.postingDefaultLanguage||Ze),ve(D),ye(q),de(J),f("default")}catch(z){alert((z==null?void 0:z.reason)||z),f("error")}})()}else xe(),se["posting:default:visibility"]&&be(se["posting:default:visibility"]),se["posting:default:language"]&&oe(se["posting:default:language"]),se["posting:default:sensitive"]&&ve(se["posting:default:sensitive"]);if(s){const{status:E,spoilerText:F,visibility:D,language:$,sensitive:J,poll:q,mediaAttachments:z}=s,H=!!(q!=null&&q.options)&&{...q,options:q.options.map(re=>(re==null?void 0:re.title)||re),expiresIn:(q==null?void 0:q.expiresIn)||oa(q.expiresAt)};R.current.value=E,Ie(),xe(),F&&(V.current.value=F),D&&be(D),oe($||se.postingDefaultLanguage||Ze),J!==null&&ve(J),H&&ye(H),z&&de(z)}},[s,a,n]);const _e=Q(),te="You have unsaved changes. Discard this post?",ce=()=>{const{value:E,dataset:F}=R.current;if(m==="loading")return!1;const D=K.length>0;if(!E&&!D||K.length>0&&K.every(H=>H.id))return!0;const J=(n==null?void 0:n.account.id)===h.id,q=n&&E.trim()===`@${n.account.acct}`;return!!(!J&&q||E===(F==null?void 0:F.source))},G=()=>ce()?!0:confirm(te);fe(()=>{const E=F=>{ce()||(F.preventDefault(),F.returnValue=te)};return window.addEventListener("beforeunload",E,{capture:!0}),()=>window.removeEventListener("beforeunload",E,{capture:!0})},[]);const ie=()=>{const{value:E}=R.current,{value:F}=V.current;return Bn(ir(E))+Bn(F)},ee=()=>{const E=ie();M.composerCharacterCount=E};fe(ee,[]);const Ce=window.CloseWatcher,he=Q(!1);Ve("esc",()=>{he.current=!0},{enabled:!Ce,enableOnFormTags:!0}),Ve("esc",()=>{!o&&he.current&&G()&&t(),he.current=!1},{enabled:!Ce,enableOnFormTags:!0,keyup:!0,ignoreEventWhen:E=>{const F=document.querySelectorAll("#modal-container > *"),D=!!F,$=F.length===1&&F[0].querySelector("#compose-container");return D&&!$}}),wa(()=>{!o&&G()&&t()},[o,G,t]);const Ee=Q({}),ke=()=>`${$t()}#${d.current}`,Fe=()=>{if(a)return;const E=ke(),F={key:E,replyTo:n?{id:n.id,account:{id:n.account.id,username:n.account.username,acct:n.account.acct}}:null,draftStatus:{uid:d.current,status:R.current.value,spoilerText:V.current.value,visibility:U,language:A,sensitive:le,poll:me,mediaAttachments:K}};!$o(F,Ee.current)&&!ce()&&(Jn.drafts.set(E,{...F,state:"unsaved",updatedAt:Date.now()}).then(()=>{}).catch(D=>{}),Ee.current=structuredClone(F))};qo(Fe,5e3),fe(()=>(Fe(),()=>{Jn.drafts.del(ke())}),[]),fe(()=>{const E=D=>{const{items:$}=D.clipboardData||D.dataTransfer,J=[];for(let q=0;q<$.length;q++){const z=$[q];if(z.kind==="file"){const H=z.getAsFile();H&&v.includes(H.type)&&J.push(H)}}if(J.length>0&&K.length>=b){alert(`You can only attach up to ${b} files.`);return}if(J.length>0){D.preventDefault(),D.stopPropagation();const q=b-K.length,z=J.slice(0,q);if(z.length<=0){alert(`You can only attach up to ${b} files.`);return}const H=z.map(re=>({file:re,type:re.type,size:re.size,url:URL.createObjectURL(re),id:null,description:null}));de([...K,...H])}};window.addEventListener("paste",E);const F=D=>{D.dataTransfer.items.length>0&&(D.preventDefault(),D.stopPropagation())};return window.addEventListener("dragover",F),window.addEventListener("drop",E),()=>{window.removeEventListener("paste",E),window.removeEventListener("dragover",F),window.removeEventListener("drop",E)}},[K]);const[ne,we]=Z(!1),[ot,Re]=$e(()=>{const E=[],F=[],{contentTranslationHideLanguages:D=[]}=M.settings;return bn.forEach($=>{const[J]=$;J===A||J===j.current||J===Ze||D.includes(J)?E.push($):F.push($)}),E.sort(([$,J],[q,z])=>$===A?-1:q===A?1:J.localeCompare(z)),F.sort(([$,J],[q,z])=>J.localeCompare(z)),[E,F]},[A]);return e("div",{id:"compose-container-outer",children:[e("div",{id:"compose-container",class:o?"standalone":"",children:[e("div",{class:"compose-top",children:[(h==null?void 0:h.avatarStatic)&&e(yi,{account:h,accountInstance:p.instanceURL,hideDisplayName:!0,useAvatarStatic:!0}),o?r&&e("button",{type:"button",class:"light pop-button",disabled:m==="loading",onClick:()=>{if(!window.opener){alert("Looks like you closed the parent window.");return}window.opener.__STATES__.showCompose&&!confirm("Looks like you already have a compose field open in the parent window. Popping in this window will discard the changes you made in the parent window. Continue?")||t({fn:()=>{const E={editStatus:a,replyToStatus:n,draftStatus:{uid:d.current,status:R.current.value,spoilerText:V.current.value,visibility:U,language:A,sensitive:le,poll:me,mediaAttachments:K}};window.opener.__COMPOSE__=E,window.opener.__STATES__.showCompose=!0}})},children:e(T,{icon:"popin",alt:"Pop in"})}):e("span",{children:[e("button",{type:"button",class:"light pop-button",disabled:m==="loading",onClick:()=>{ka({editStatus:a,replyToStatus:n,draftStatus:{uid:d.current,status:R.current.value,spoilerText:V.current.value,visibility:U,language:A,sensitive:le,poll:me,mediaAttachments:K}})&&t()},children:e(T,{icon:"popout",alt:"Pop out"})})," ",e("button",{type:"button",class:"light close-button",disabled:m==="loading",onClick:()=>{G()&&t()},children:e(T,{icon:"x"})})]})]}),!!n&&e("div",{class:"status-preview",children:[e(ta,{status:n,size:"s",previewMode:!0}),e("div",{class:"status-preview-legend reply-to",children:["Replying to @",n.account.acct||n.account.username,"’s post"]})]}),!!a&&e("div",{class:"status-preview",children:[e(ta,{status:a,size:"s",previewMode:!0}),e("div",{class:"status-preview-legend",children:"Editing source post"})]}),e("form",{ref:_e,class:`form-visibility-${U}`,style:{pointerEvents:m==="loading"?"none":"auto",opacity:m==="loading"?.5:1},onKeyDown:E=>{E.key==="Enter"&&(E.ctrlKey||E.metaKey)&&_e.current.dispatchEvent(new Event("submit",{cancelable:!0}))},onSubmit:E=>{E.preventDefault();const F=new FormData(E.target),D=Object.fromEntries(F.entries());let{status:$,visibility:J,sensitive:q,spoilerText:z}=D;if(q=q==="on",me){if(me.options.length<2){alert("Poll must have at least 2 options");return}if(me.options.some(H=>H==="")){alert("Some poll choices are empty");return}}K.length>0&&K.some(re=>{var Le,Oe;return!((Oe=(Le=re.description)==null?void 0:Le.trim)!=null&&Oe.call(Le))})&&!confirm("Some media have no descriptions. Continue?")||(z=q&&z||void 0,$=$===""?void 0:$,f("loading"),(async()=>{try{if(K.length>0){const Le=K.map(Se=>{const{file:We,description:_t,id:Ge}=Se;if(Ge)return Se;{const kt=ra({file:We,description:_t});return c.v2.media.create(kt).then(ze=>(ze.id&&(Se.id=ze.id),ze))}}),Oe=await Promise.allSettled(Le);if(Oe.some(Se=>{var We;return Se.status==="rejected"||!((We=Se.value)!=null&&We.id)})){f("error"),Oe.forEach(Se=>{Se.status==="rejected"&&alert(Se.reason||`Attachment #${i} failed`)});return}}let H={status:$,spoiler_text:z,language:A,sensitive:q,poll:me,media_ids:K.map(Le=>Le.id)};a&&Ca("@mastodon/edit-media-attributes")?H.media_attributes=K.map(Le=>({id:Le.id,description:Le.description})):a||(H.visibility=J,H.in_reply_to_id=(n==null?void 0:n.id)||void 0),H=ra(H);let re;if(a)re=await c.v1.statuses.$select(a.id).update(H),De(re,l,{skipThreading:!0});else try{re=await c.v1.statuses.create(H,{idempotencyKey:d.current})}catch{re=await c.v1.statuses.create(H)}f("default"),t({type:a?"edit":n?"reply":"post",newStatus:re,instance:l})}catch(H){alert((H==null?void 0:H.reason)||H),f("error")}})())},children:[e("div",{class:"toolbar stretch",children:[e("input",{ref:V,type:"text",name:"spoilerText",placeholder:"Content warning",disabled:m==="loading",class:"spoiler-text-field",lang:A,spellCheck:"true",dir:"auto",style:{opacity:le?1:0,pointerEvents:le?"auto":"none"},onInput:()=>{ee()}}),e("label",{class:`toolbar-button ${le?"highlight":""}`,title:"Content warning or sensitive media",children:[e("input",{name:"sensitive",type:"checkbox",checked:le,disabled:m==="loading",onChange:E=>{var D,$;const F=E.target.checked;ve(F),F?(D=V.current)==null||D.focus():($=R.current)==null||$.focus()}}),e(T,{icon:`eye-${le?"close":"open"}`})]})," ",e("label",{class:`toolbar-button ${U!=="public"&&!le?"show-field":""} ${U!=="public"?"highlight":""}`,title:`Visibility: ${U}`,children:[e(T,{icon:nt[U],alt:U}),e("select",{name:"visibility",value:U,onChange:E=>{be(E.target.value)},disabled:m==="loading"||!!a,children:[e("option",{value:"public",children:["Public ",e(T,{icon:"earth"})]}),e("option",{value:"unlisted",children:"Unlisted"}),e("option",{value:"private",children:"Followers only"}),e("option",{value:"direct",children:"Private mention"})]})]})," "]}),e(mr,{ref:R,placeholder:n?"Post your reply":a?"Edit your post":"What are you doing?",required:(K==null?void 0:K.length)===0,disabled:m==="loading",lang:A,onInput:()=>{ee()},maxCharacters:_,performSearch:E=>{const{type:F,q:D,limit:$}=E;return F==="accounts"?c.v1.accounts.search.list({q:D,limit:$,resolve:!1}):c.v2.search.fetch(E)}}),(K==null?void 0:K.length)>0&&e("div",{class:"media-attachments",children:[K.map((E,F)=>{const{id:D,file:$}=E,J=($==null?void 0:$.size)+($==null?void 0:$.type)+($==null?void 0:$.name);return e(pr,{attachment:E,disabled:m==="loading",lang:A,onDescriptionChange:q=>{de(z=>{const H=[...z];return H[F].description=q,H})},onRemove:()=>{de(q=>q.filter((z,H)=>H!==F))}},D||J||F)}),e("label",{class:"media-sensitive",children:[e("input",{name:"sensitive",type:"checkbox",checked:le,disabled:m==="loading",onChange:E=>{const F=E.target.checked;ve(F)}})," ",e("span",{children:"Mark media as sensitive"})," ",e(T,{icon:`eye-${le?"close":"open"}`})]})]}),!!me&&e(fr,{lang:A,maxOptions:C,maxExpiration:Y,minExpiration:B,maxCharactersPerOption:N,poll:me,disabled:m==="loading",onInput:E=>{if(E){const F={...E};ye(F)}else ye(null)}}),e("div",{class:"toolbar wrap",style:{justifyContent:"flex-end"},children:[e("span",{children:[e("label",{class:"toolbar-button",children:[e("input",{type:"file",accept:v.join(","),multiple:K.length=b||!!me,onChange:E=>{const F=E.target.files;if(!F)return;const D=Array.from(F).map($=>({file:$,type:$.type,size:$.size,url:URL.createObjectURL($),id:null,description:null}));K.length+D.length>b?alert(`You can only attach up to ${b} files.`):de($=>$.concat(D)),E.target.value=""}}),e(T,{icon:"attachment"})]})," ",e("button",{type:"button",class:"toolbar-button",disabled:m==="loading"||!!me||!!K.length,onClick:()=>{ye({options:["",""],expiresIn:24*60*60,multiple:!1})},children:e(T,{icon:"poll",alt:"Add poll"})})," ",e("button",{type:"button",class:"toolbar-button",disabled:m==="loading",onClick:()=>{we(!0)},children:e(T,{icon:"emoji2"})})]}),e("div",{class:"spacer"}),m==="loading"?e(Bt,{abrupt:!0}):e(hr,{maxCharacters:_,hidden:m==="loading"}),e("label",{class:`toolbar-button ${A!==j.current?"highlight":""}`,children:[e("span",{class:"icon-text",children:(et=Qi[A])==null?void 0:et.native}),e("select",{name:"language",value:A,onChange:E=>{const{value:F}=E.target;oe(F||Ze),O.session.set("currentLanguage",F||Ze)},disabled:m==="loading",children:[ot.map(([E,F,D])=>e("option",{value:E,children:[F," (",D,")"]},E)),e("hr",{}),Re.map(([E,F,D])=>e("option",{value:E,children:[F," (",D,")"]},E))]})]})," ",e("button",{type:"submit",class:"large",disabled:m==="loading",children:n?"Reply":a?"Update":"Post"})]})]})]}),ne&&e(Nt,{class:"light",onClick:E=>{E.target===E.currentTarget&&we(!1)},children:e(vr,{masto:c,instance:l,onClose:()=>{we(!1)},onSelect:E=>{const F=` ${E} `,D=R.current;if(!D)return;const{selectionStart:$,selectionEnd:J}=D,q=D.value,z=q.slice(0,$)+F+q.slice(J);D.value=z,D.selectionStart=D.selectionEnd=J+F.length,D.focus(),D.dispatchEvent(new Event("input"))}})})]})}function ia(t){if(!t)return;const{value:n,offsetHeight:a,scrollHeight:s,clientHeight:o}=t;if(a{var _;const{masto:a}=Ke(),[s,o]=Z(((_=n.current)==null?void 0:_.value)||""),{maxCharacters:r,performSearch:c=()=>{},...l}=t,m=Q();fe(()=>{(async()=>{try{const b=await a.v1.customEmojis.list();m.current=b}catch{}})()},[]);const f=Q(),d=Q("");fe(()=>{let b,y,v;return f.current&&(b=x=>{const{key:L,provide:S,text:w}=x.detail;if(d.current=w,w===""){S(Promise.resolve({matched:!1}));return}if(L===":"){const C=gr(m.current,w);let N="";C.forEach(Y=>{const{shortcode:B,url:R}=Y;N+=`
  • :${Be(B)}:
  • `}),Ue.innerHTML=N,S(Promise.resolve({matched:C.length>0,fragment:Ue}));return}const P={"@":"accounts","#":"hashtags"}[L];S(new Promise(C=>{c({type:P,q:w,limit:5}).then(Y=>{if(w!==d.current)return;const B=Y[P]||Y;let R="";B.forEach(V=>{var de;const{name:U,avatarStatic:be,displayName:le,username:ve,acct:A,emojis:oe,history:j}=V,K=gn(le,oe);if(A)R+=`
  • ${K||ve}
    @${Be(A)}
  • `;else{const me=(de=j==null?void 0:j.reduce)==null?void 0:de.call(j,(ye,se)=>ye+ +se.uses,0);R+=`
  • #${Be(U)} ${me?`${He(me)}`:""}
  • `}Ue.innerHTML=R}),C({matched:B.length>0,fragment:Ue})})}))},f.current.addEventListener("text-expander-change",b),y=x=>{const{key:L,item:S}=x.detail;L===":"?x.detail.value=`:${S.dataset.value}:`:x.detail.value=`${L}${S.dataset.value}`},f.current.addEventListener("text-expander-value",y),v=x=>{const{input:L}=x.detail;if(o(L.value),n.current){const S=new Event("input",{bubbles:!0});n.current.dispatchEvent(S)}},f.current.addEventListener("text-expander-committed",v)),()=>{f.current&&(f.current.removeEventListener("text-expander-change",b),f.current.removeEventListener("text-expander-value",y),f.current.removeEventListener("text-expander-committed",v))}},[]),fe(()=>{const b=n.current;if(!b)return;new ResizeObserver(()=>{if(f.current){const{height:v}=b.getBoundingClientRect();f.current.style.height=v+"px"}}).observe(b)},[]);const p=Q(0),h=Q(),g=ma(b=>{var x;if(!h.current)return;if(p.current>3){h.current.innerHTML="",h.current=null,(x=g==null?void 0:g.cancel)==null||x.call(g);return}let y,v;p.current<=3&&(y=Date.now()),h.current.innerHTML=dr(b,{maxCharacters:r})+` `,p.current<=3&&(v=Date.now()),y&&v&&v-y>50&&p.current++},500);return e("text-expander",{ref:f,keys:"@ # :",class:"compose-field-container",children:[e("textarea",{class:"compose-field",autoCapitalize:"sentences",autoComplete:"on",autoCorrect:"on",spellCheck:"true",dir:"auto",rows:"6",cols:"50",...l,ref:n,name:"status",value:s,onKeyDown:b=>{const{key:y,target:v}=b;if(y==="Enter")try{const{value:x,selectionStart:L}=v,w=x.slice(0,L).split(` `).slice(-1)[0];if(w&&/^\s*(-|\d+\.)\s/.test(w)){const[P,C,N,Y,B]=w.match(/^(\s*)(-|\d+\.)(\s+)(.+)?/)||[];if(B){b.preventDefault();const[R]=N.match(/\d+/)||[],V=R?`${+R+1}.`:"-",U=` ${C}${V}${Y}`;v.setRangeText(U,L,L);const be=L+U.length;v.setSelectionRange(be,be)}else{const R=L-w.length;v.setRangeText("",R,L)}ia(v),v.dispatchEvent(new Event("input"))}}catch{}h.current&&(h.current.scrollTop=v.scrollTop)},onInput:b=>{var x;const{target:y}=b,v=y.value;o(v),ia(y),(x=t.onInput)==null||x.call(t,b),g(v)},style:{width:"100%",height:"4em"},onScroll:b=>{if(h.current){const{scrollTop:y}=b.target;h.current.scrollTop=y}}}),e("div",{ref:h,class:"compose-highlight","aria-hidden":"true"})]})});function hr({maxCharacters:t=500,hidden:n}){const s=yt(M).composerCharacterCount,o=t-s;return n?e("meter",{class:"donut",hidden:!0}):e("meter",{class:`donut ${o<=-10?"explode":o<=0?"danger":o<=20?"warning":""}`,value:s,max:t,"data-left":o,title:`${o}/${t}`,style:{"--percentage":s/t*100}})}function pr({attachment:t,disabled:n,lang:a,onDescriptionChange:s=()=>{},onRemove:o=()=>{}}){const[r,c]=Z("default"),l=Ca("@mastodon/edit-media-attributes"),{type:m,id:f,file:d}=t,p=$e(()=>d?URL.createObjectURL(d):t.url,[d,t.url]),[h,g]=Z(t.description),[_,b]=m.split("/"),y=Po(s,250),[v,x]=Z(!1),L=Q(null);fe(()=>{let P;return v&&L.current&&(P=setTimeout(()=>{L.current.focus()},100)),()=>{clearTimeout(P)}},[v]);const S=e(W,{children:f&&!l?e("div",{class:"media-desc",children:[e("span",{class:"tag",children:"Uploaded"}),e("p",{title:h,children:t.description||e("i",{children:"No description"})})]}):e("textarea",{ref:L,value:h||"",lang:a,placeholder:{image:"Image description",video:"Video description",audio:"Audio description"}[_],autoCapitalize:"sentences",autoComplete:"on",autoCorrect:"on",spellCheck:"true",dir:"auto",disabled:n||r==="loading",class:r==="loading"?"loading":"",maxlength:"1500",onInput:P=>{const{value:C}=P.target;g(C),y(C)}})}),w=Q(null);return fe(()=>()=>{var P,C;(C=(P=w.current)==null?void 0:P.hideToast)==null||C.call(P)},[]),e(W,{children:[e("div",{class:"media-attachment",children:[e("div",{class:"media-preview",tabIndex:"0",onClick:()=>{x(!0)},children:_==="image"?e("img",{src:p,alt:""}):_==="video"||_==="gifv"?e("video",{src:p,playsinline:!0,muted:!0}):_==="audio"?e("audio",{src:p,controls:!0}):null}),S,e("div",{class:"media-aside",children:e("button",{type:"button",class:"plain close-button",disabled:n,onClick:o,children:e(T,{icon:"x"})})})]}),v&&e(Nt,{class:"light",onClick:P=>{P.target===P.currentTarget&&x(!1)},children:e("div",{id:"media-sheet",class:"sheet sheet-max",children:[e("button",{type:"button",class:"sheet-close",onClick:()=>{x(!1)},children:e(T,{icon:"x"})}),e("header",{children:e("h2",{children:{image:"Edit image description",video:"Edit video description",audio:"Edit audio description"}[_]})}),e("main",{tabIndex:"-1",children:[e("div",{class:"media-preview",children:_==="image"?e("img",{src:p,alt:""}):_==="video"||_==="gifv"?e("video",{src:p,playsinline:!0,controls:!0}):_==="audio"?e("audio",{src:p,controls:!0}):null}),e("div",{class:"media-form",children:[S,e("footer",{children:[_==="image"&&/^(png|jpe?g|gif|webp)$/i.test(b)&&!!M.settings.mediaAltGenerator&&!!na&&e(fn,{portal:{target:document.body},containerProps:{style:{zIndex:1001}},align:"center",position:"anchor",overflow:"auto",menuButton:e("button",{type:"button",title:"More",class:"plain",children:e(T,{icon:"more",size:"l",alt:"More"})}),children:e(Te,{disabled:r==="loading",onClick:()=>{c("loading"),w.current=Ae({text:"Generating description. Please wait...",duration:-1}),async function(){var P,C;try{const N=new FormData;N.append("image",d);const Y=await fetch(na,{method:"POST",body:N}).then(B=>B.json());g(Y.description)}catch{Ae("Failed to generate description")}finally{c("default"),(C=(P=w.current)==null?void 0:P.hideToast)==null||C.call(P)}}()},children:[e(T,{icon:"sparkles2"}),e("span",{children:"Generate description…"})]})}),e("button",{type:"button",class:"light block",onClick:()=>{x(!1)},disabled:r==="loading",children:"Done"})]})]})]})]})})]})}function fr({lang:t,poll:n,disabled:a,onInput:s=()=>{},maxOptions:o,maxExpiration:r,minExpiration:c,maxCharactersPerOption:l}){const{options:m,expiresIn:f,multiple:d}=n;return e("div",{class:`poll ${d?"multiple":""}`,children:[e("div",{class:"poll-choices",children:m.map((p,h)=>e("div",{class:"poll-choice",children:[e("input",{required:!0,type:"text",value:p,disabled:a,maxlength:l,placeholder:`Choice ${h+1}`,lang:t,spellCheck:"true",dir:"auto",onInput:g=>{const{value:_}=g.target;m[h]=_,s(n)}}),e("button",{type:"button",class:"plain2 poll-button",disabled:a||m.length<=1,onClick:()=>{m.splice(h,1),s(n)},children:e(T,{icon:"x",size:"s"})})]},h))}),e("div",{class:"poll-toolbar",children:[e("button",{type:"button",class:"plain2 poll-button",disabled:a||m.length>=o,onClick:()=>{m.push(""),s(n)},children:"+"})," ",e("label",{class:"multiple-choices",children:[e("input",{type:"checkbox",checked:d,disabled:a,onChange:p=>{const{checked:h}=p.target;n.multiple=h,s(n)}})," ","Multiple choices"]}),e("label",{class:"expires-in",children:["Duration"," ",e("select",{value:f,disabled:a,onChange:p=>{const{value:h}=p.target;n.expiresIn=h,s(n)},children:Object.entries(Ia).filter(([p,h])=>h>=c&&h<=r).map(([p,h])=>e("option",{value:h,children:p},h))})]})]}),e("div",{class:"poll-toolbar",children:e("button",{type:"button",class:"plain remove-poll-button",disabled:a,onClick:()=>{s(null)},children:"Remove poll"})})]})}function gr(t,n){return n=n.toLowerCase(),t.sort((a,s)=>{let o=a.shortcode.toLowerCase(),r=s.shortcode.toLowerCase(),c=o.startsWith(n),l=r.startsWith(n),m=o.includes(n),f=r.includes(n);return c&&l?a.length-s.length:c?-1:l?1:m&&f?a.length-s.length:m?-1:f?1:0}).slice(0,5)}function Be(t){return t.replace(/[&<>"']/g,function(n){return"&#"+n.charCodeAt(0)+";"})}function ra(t){for(let n in t)(t[n]===null||t[n]===void 0)&&delete t[n];return t}function vr({masto:t,instance:n,onClose:a=()=>{},onSelect:s=()=>{}}){const[o,r]=Z("default"),c=Q([]),[l,m]=Z({}),f=$e(()=>O.account.get("recentlyUsedCustomEmojis")||[]);return fe(()=>{r("loading"),(async()=>{try{const d=await t.v1.customEmojis.list(),p={"--recent--":f.filter(g=>d.find(_=>_.shortcode===g.shortcode))},h=[];d.forEach(g=>{var _,b;if(g.visibleInPicker){if((b=(_=c.current)==null?void 0:_.push)==null||b.call(_,g),!g.category){h.push(g);return}p[g.category]||(p[g.category]=[]),p[g.category].push(g)}}),h.length&&(p["--others--"]=h),m(p),r("default")}catch{r("error")}})()},[]),e("div",{id:"custom-emojis-sheet",class:"sheet",children:[!!a&&e("button",{type:"button",class:"sheet-close",onClick:a,children:e(T,{icon:"x"})}),e("header",{children:[e("b",{children:"Custom emojis"})," ",o==="loading"?e(Bt,{}):e("small",{class:"insignificant",children:[" • ",n]})]}),e("main",{children:e("div",{class:"custom-emojis-list",children:[o==="error"&&e("div",{class:"ui-state",children:e("p",{children:"Error loading custom emojis"})}),o==="default"&&Object.entries(l).map(([d,p])=>!!(p!=null&&p.length)&&e(W,{children:[e("div",{class:"section-header",children:{"--recent--":"Recently used","--others--":"Others"}[d]||d}),e("section",{children:p.map(h=>e("button",{type:"button",class:"plain4",onClick:()=>{a(),requestAnimationFrame(()=>{s(`:${h.shortcode}:`)});let g=O.account.get("recentlyUsedCustomEmojis")||[];const _=g.findIndex(b=>b.shortcode===h.shortcode);_!==-1?(g.splice(_,1),g.unshift(h)):(g.unshift(h),g=g.filter(b=>{var y,v;return(v=(y=c.current)==null?void 0:y.find)==null?void 0:v.call(y,x=>x.shortcode===b.shortcode)}),g=g.slice(0,10)),O.account.set("recentlyUsedCustomEmojis",g)},title:`:${h.shortcode}:`,children:e("picture",{children:[!!h.staticUrl&&e("source",{srcset:h.staticUrl,media:"(prefers-reduced-motion: reduce)"}),e("img",{class:"shortcode-emoji",src:h.url||h.staticUrl,alt:h.shortcode,width:"16",height:"16",loading:"lazy",decoding:"async"})]})},h))})]}))]})})]})}var br={PHANPY_CLIENT_NAME:"Phanpy",PHANPY_WEBSITE:"https://phanpy.social",PHANPY_LINGVA_INSTANCES:"lingva.phanpy.social lingva.lunar.icu lingva.garudalinux.org translate.plausibility.cloud",PHANPY_PRIVACY_POLICY_URL:"https://github.com/cheeaun/phanpy/blob/main/PRIVACY.MD",VITE_APP_ENV:"production",BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{PHANPY_CLIENT_NAME:sa}=br;function Fr(t,n){function a(){const{currentLocation:s}=M,o=Array.isArray(n);let r=o?n:[];!o&&/:?\w+\?/.test(n)&&(r.push(n.replace(/(:\w+)\?/g,"$1")),r.push(n.replace(/\/?:\w+\?/g,"")));let c=!1;r.length?c=r.some(l=>Vn(l,s)):n&&(c=Vn(n,s)),c&&(document.title=t?`${t} / ${sa}`:sa)}mn(()=>{const s=ua(M,"currentLocation",a);return a(),s},[t,n])}export{Jo as $,Qe as A,ht as B,Zn as C,Ni as D,vt as E,Xn as F,Cr as G,It as H,T as I,Io as J,Me as K,at as L,Nt as M,mt as N,Pi as O,$a as P,Ta as Q,bt as R,ta as S,Ai as T,Ar as U,Di as V,Fr as W,_a as X,va as Y,Un as Z,ln as _,Ke as a,Ne as a0,xr as a1,Er as a2,Lr as a3,Tr as a4,De as b,Ae as c,O as d,fn as e,tn as f,Ot as g,La as h,Ca as i,yi as j,pi as k,nn as l,Aa as m,He as n,ka as o,zt as p,Mt as q,wr as r,M as s,ii as t,qo as u,Bt as v,vn as w,Jn as x,$t as y,Dt as z}; //# sourceMappingURL=useTitle-zvzl1Hla.js.map function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { __vite__mapDeps.viteFileDeps = [] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) }