phanpy/assets/useTitle-qcvAjFcD.js
Lim Chee Aun 0fd48e425c Imported from 2024.01.05.adf0b35.tar.gz.
SHA256:ba1790ff662cba5a5be4ec8e2880aaf410dee5cafeb786ec07d827ee8f97a78a
2024-01-06 12:29:42 +00:00

64 lines
135 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{L as Ya,O as Ja,E as Za,P as pn,Q as ca,U as Xa,V as Qa,x as la,i as eo,_ as Q,p as fe,a as e,h as Z,u as Ve,W as to,e as no,N as ua,X as ao,Y as oo,M as Te,Z as io,S as ro,g as W,w as fn,$ as so,a0 as gt,a1 as co,a2 as lo,a3 as uo,a4 as mo,D as ho,a5 as po,a6 as fo,a7 as go,a8 as vo,a9 as bo,aa as yo,ab as _o,ac as ko,ad as wo,m as da,ae as Eo,f as ma,af as xo,T as ha,F as $e,y as mn,ag as Nn,t as To,b as yt,q as Lo,r as Ao,d as Xt,J as pa,C as Co,ah as Fo,ai as Bn,aj as So,ak as Vn,al as $o,n as Io,z as jn}from"./vendor-jabuMAqb.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 fa(t){const n=O.local.getJSON("accounts")||[];return n.find(a=>a.info.id===t)||n[0]}function Po(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 fa(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 Er(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 ga(){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 u=(n==null?void 0:n.polls)||{};return r&&(u.maxCharactersPerOption??(u.maxCharactersPerOption=r.maxOptionChars),u.maxExpiration??(u.maxExpiration=r.maxExpiration),u.maxOptions??(u.maxOptions=r.maxOptions),u.minExpiration??(u.minExpiration=r.minExpiration)),{...n,statuses:c,polls:u}}function Oo(){const t=ga();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},It="mastodon.social",Rt={},Ie={};window.__ACCOUNT_APIS__=Ie;let ge;function Ne({instance:t,accessToken:n}){/^https?:\/\//.test(t)&&(t=t.replace(/^https?:\/\//,"").replace(/\/+$/,"").toLowerCase());const a=t?`https://${t}`:`https://${It}`,o={masto:Ya({url:a,accessToken:n,timeout:3e4}),instance:t,accessToken:n};return Rt[t]=o,Ie[t]||(Ie[t]={}),n&&(Ie[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:u,configuration:{urls:{streaming:d}={}}={}}=o,f=O.local.getJSON("instances")||{};if((r||u)&&(f[(u||r).replace(/^https?:\/\//,"").replace(/\/+$/,"").toLowerCase()]=o),n&&(f[n.toLowerCase()]=o),O.local.setJSON("instances",f),"WebSocket"in window&&(c||d)){const p=Ja({streamingApiUrl:d||c,accessToken:s,implementation:WebSocket});t.streaming=p}}async function Tr(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 Lr(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 d,f,h,p,m;if(t&&(t=t.toLowerCase().trim()),t&&n){const g=((d=Ie[t])==null?void 0:d[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 Ie)if(Ie[g][n]){const _=Ie[g][n],{masto:b,streaming:y}=_;return{masto:b,streaming:y,client:_,authenticated:!0,instance:g}}else{const _=Po(n);if(_){const b=_.accessToken,y=_.instanceURL.toLowerCase().trim(),v=Ne({instance:y,accessToken:b}),{masto:E,streaming:L}=v;return{masto:E,streaming:L,client:v,authenticated:!0,instance:y}}else throw new Error("Access token not found")}if(s||a)if(s=s||fa(a),s){const g=s.accessToken,_=s.instanceURL.toLowerCase().trim(),b=((f=Ie[_])==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:E}=o;return ge=((h=Ie[t])==null?void 0:h[E])||Ne({instance:t,accessToken:E}),{masto:ge.masto,streaming:ge.streaming,client:ge,authenticated:!0,instance:t}}const g=Ro(t);if(g){const E=g.accessToken,L=((p=Ie[t])==null?void 0:p[E])||Ne({instance:t,accessToken:E}),{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=((m=Ie[_])==null?void 0:m[g])||Ne({instance:_,accessToken:g}),{masto:ge.masto,streaming:ge.streaming,client:ge,authenticated:!0,instance:_}}const r=Rt[It]||Ne({instance:It}),{masto:c,streaming:u}=r;return{masto:c,streaming:u,client:r,authenticated:!1,instance:It}}window.__API__={currentAccountApi:ge,apis:Rt,accountApis:Ie};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 va(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=pn;function qe(t,n={}){return pn(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=ca({limit:1,interval:1e3}),Vo=/(twitter|github)\.com/i,Un={};function jo(t,n){var b;const a=Xa(M);if(Vo.test(n)||Un[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 u=c.hostname,d=c.pathname,h=/\/@([^@\/]+)@?([^\/]+)?\/(\d+)$/i.exec(d);if(h){const y=h[3],{masto:v}=Ke({instance:u});o=v.v1.statuses.$select(y).fetch().then(E=>{if(E!=null&&E.id)return{status:E,instance:u};throw new Error("No results")})}const{masto:p}=Ke({instance:t}),m=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:E}=y,{id:L}=v,S=`/${E}/s/${L}`,w={id:L,instance:E,url:S};return M.unfurledLinks[n]=w,De(v,E,{skipThreading:!0}),w}function _(y){Un[n]=!0}return o?Promise.race([m,new Promise((v,E)=>setTimeout(E,3e3))]).catch(()=>o.catch(()=>m)).then(g).catch(_):m.then(g).catch(_)}const ba=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 Ar(){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}la(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 ya(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=ya(t.id,n);!s&&c||(queueMicrotask(()=>{const u=Me(t.id,n);if(c!=null&&c._pinned&&(t._pinned=c._pinned),ae.statuses[u]=t,t.reblog){const d=Me(t.reblog.id,n);ae.statuses[d]=t.reblog}}),o||queueMicrotask(()=>{Ho(t.reblog||t,n)}),r||queueMicrotask(()=>{Ko(t.reblog||t,n)}))}function Uo(t,n){const{masto:a,instance:s}=Ke({instance:n});let o=0;async function r(c,u=0){const{inReplyToId:d,inReplyToAccountId:f}=c;if(!d||f!==c.account.id)return[c];if(d&&f!==c.account.id)throw"Not a thread";const h=Me(d,s);let p=ae.statuses[h];if(!p){if(o++>3)throw"Too many fetches for thread";await new Promise(m=>setTimeout(m,500*o)),p=await qo(d,a),De(p,s,{skipThreading:!0})}return[...await r(p,++u),c]}return r(t).then(c=>{c.length>1&&c.forEach((u,d)=>{const f=Me(u.id,s);ae.statusThreadNumber[f]=d+1})}).catch(c=>{})}const Ho=No(Uo,100),Hn=document.createElement("div");function Ko(t,n){const{instance:a}=Ke(),s=t==null?void 0:t.content;if(/<a/i.test(s)){const r=Me(t==null?void 0:t.id,n);Hn.innerHTML=s,[...Hn.querySelectorAll("a[href]:not(.u-url):not(.mention):not(.hashtag)")].filter(u=>{const d=u.href;return!(d===t.url||d===t.uri)&&va(d)}).forEach((u,d)=>{ba(a,u.href).then(f=>{f&&r&&(Array.isArray(ae.statusQuotes[r])||(ae.statusQuotes[r]=[]),ae.statusQuotes[r][d]||ae.statusQuotes[r].splice(d,0,f))})})}}const qo=zt((t,n)=>n.v1.statuses.$select(t).fetch());function Wo(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 _a(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),u=Math.min(s,450),d=(t==null?void 0:t.uid)||Math.random(),f=window.open(n,"compose"+d,`width=${c},height=${u},left=${o},top=${r}`);return f?f.__COMPOSE__=t:alert("Looks like your browser is blocking popups."),f}const Go="modulepreload",Yo=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=Yo(c,s),c in Kn)return;Kn[c]=!0;const u=c.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(!!s)for(let p=r.length-1;p>=0;p--){const m=r[p];if(m.href===c&&(!u||m.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${c}"]${d}`))return;const h=document.createElement("link");if(h.rel=u?"stylesheet":Go,u||(h.as="script",h.crossOrigin=""),h.href=c,document.head.appendChild(h),u)return new Promise((p,m)=>{h.addEventListener("load",p),h.addEventListener("error",()=>m(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})},Jo={s:12,m:16,l:20,xl:24,xxl:32},ka={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={},Zo=pn(function({size:t,width:n,height:a,body:s,rotate:o,flip:r}){return e("svg",{width:t,height:t,viewBox:`0 0 ${n} ${a}`,dangerouslySetInnerHTML:{__html:s},style:{transform:`${o?`rotate(${o})`:""} ${r?"scaleX(-1)":""}`}})},{isShallowEqual:!0,maxSize:Object.keys(ka).length});function T({icon:t,size:n="m",alt:a,title:s,class:o="",style:r={}}){if(!t)return null;const c=Jo[n];let u=ka[t];if(!u)return null;let d,f;Array.isArray(u)&&([u,d,f]=u);const[h,p]=Z(qn[t]),m=Q(t);return fe(()=>{h&&m.current===t||((async()=>{const g=await u();p(g.default),qn[t]=g.default})(),m.current=t)},[t]),e("span",{class:`icon ${o}`,title:s||a,style:{width:`${c}px`,height:`${c}px`,...r},children:h&&e(Zo,{size:c,width:h.width,height:h.height,body:h.body,rotate:d,flip:f})})}function Xo(t,n=[]){!t||typeof t!="function"||fe(()=>{const a=new CloseWatcher;return a.addEventListener("close",t),()=>{a.destroy()}},n)}const wa=window.CloseWatcher?Xo:()=>{},Qo=document.getElementById("modal-container");function Nt({children:t,onClose:n,onClick:a,class:s}){if(!t)return null;const o=Q();fe(()=>{let d=setTimeout(()=>{var h;const f=(h=o.current)==null?void 0:h.querySelector('[tabindex="-1"]');f&&f.focus()},100);return()=>clearTimeout(d)},[]);const r=window.CloseWatcher,c=Ve("esc",()=>{setTimeout(()=>{n==null||n()},0)},{enabled:!r&&!!n,keydown:!1,keyup:!0},[n]);wa(n,[n]);const u=e("div",{ref:d=>{var f;o.current=d,c.current=((f=d==null?void 0:d.querySelector)==null?void 0:f.call(d,'[tabindex="-1"]'))||d},className:s,onClick:d=>{a==null||a(d),d.target===d.currentTarget&&(n==null||n(d))},tabIndex:"-1",onFocus:d=>{var f,h,p,m;d.target===d.currentTarget&&((m=(p=(h=(f=o.current)==null?void 0:f.querySelector)==null?void 0:h.call(f,'[tabindex="-1"]'))==null?void 0:p.focus)==null||m.call(p))},children:t});return to(u,Qo)}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 ei({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:u=>{u.target.crossOrigin&&(u.target.crossOrigin=null,u.target.src=t)},onLoad:u=>{r.current&&(r.current.dataset.loaded=!0),ut[t]===void 0&&(c||queueMicrotask(()=>{try{const{width:d,height:f}=u.target;dt.width!==d&&(dt.width=d),dt.height!==f&&(dt.height=f),en.drawImage(u.target,0,0);const h=en.getImageData(0,0,d,f),p=h.data.filter((m,g)=>g%4===3&&m<=128).length/(h.data.length/4)>.1;p&&r.current.classList.add("has-alpha"),ut[t]=p,en.clearRect(0,0,d,f)}catch{ut[t]=!1}}))}})})}const Qe=qe(ei),at=ua((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 u=new URL(s,location.origin);if(u.searchParams.size){const d=Array.from(u.searchParams.entries()).map(([f,h])=>`${f}=${encodeURIComponent(h)}`).join("&");s=u.pathname+"?"+d}}catch{}const c=s===o||decodeURIComponent(s)===o;return e("a",{ref:n,href:`#${o}`,...r,class:`${t.class||""} ${c?"is-active":""}`,onClick:u=>{var d,f,h;(f=(d=u.currentTarget)==null?void 0:d.parentNode)!=null&&f.closest("a")&&u.stopPropagation(),a&&(M.prevLocation=a),(h=t.onClick)==null||h.call(t,u)}})}),ti=document.documentElement,Ft=getComputedStyle(ti),ni=8;let Ea=[0,0,0,0];function xa(){const t=Ft.getPropertyValue("--sai-top"),n=Ft.getPropertyValue("--sai-right"),a=Ft.getPropertyValue("--sai-bottom"),s=Ft.getPropertyValue("--sai-left");Ea=[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(xa);function Ta(t=[]){return Ea.map((a,s)=>(a||ni)+(t[s]||0)).join(" ")}CSS.supports("top: env(safe-area-inset-top)")&&window.addEventListener("resize",xa,{passive:!0});function gn(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,u,d;r.target===r.currentTarget&&((u=(c=o.current)==null?void 0:c.closeMenu)==null||u.call(c)),(d=n==null?void 0:n.onClick)==null||d.call(n,r)},...n}})}function tn({subMenu:t=!1,confirm:n=!0,confirmLabel:a,menuItemClassName:s,menuFooter:o,...r}){const{children:c,onClick:u,...d}=r;if(!n)return t?e(Te,{...r}):u?io(c,{onClick:u}):c;const f=t?ro:gn,h=Q();return e(f,{instanceRef:h,openTrigger:"clickOnly",direction:"bottom",overflow:"auto",gap:-8,shift:8,menuClassName:"menu-emphasized",...d,menuButton:t?void 0:c,label:t?c:void 0,itemProps:{onPointerMove:p=>{var m,g;p.pointerType==="touch"&&((g=(m=h.current)==null?void 0:m.openMenu)==null||g.call(m))},onPointerLeave:p=>{var m,g;p.pointerType==="touch"&&((g=(m=h.current)==null?void 0:m.openMenu)==null||g.call(m))}},children:[e(Te,{className:s,onClick:u,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:u}=r;return e("picture",{children:[e("source",{srcset:u,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 ai=new Intl.Collator("en",{sensitivity:"base"});function oi({account:t,instance:n,showAvatar:a,showAcct:s,short:o,external:r,onClick:c}){const{acct:u,avatar:d,avatarStatic:f,id:h,url:p,displayName:m,emojis:g,bot:_}=t;let{username:b}=t;const[y,v,E]=u.match(/([^@]+)(@.+)/i)||[,u],L=b.toLowerCase().trim(),S=(m||"").toLowerCase().trim(),w=S.replace(/(\:(\w|\+|\-)+\:)(?=|[\!\.\?]|$)/g,"").replace(/\s+/g,""),I=w.replace(/[^a-z0-9]/gi,"");return!o&&(L===S||L===w||L===I||ai.compare(L,w)===0)&&(b=null),e("a",{class:`name-text ${s?"show-acct":""} ${o?"short":""}`,href:p,target:r?"_blank":null,title:`${m?`${m} `:""}@${u}`,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||d,squircle:_})," "]}),m&&!o?e(W,{children:[e("b",{children:e(vt,{text:m,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:E})]})]})]})}const mt=fn(oi);gt.extend(so);gt.extend(co);gt.extend(lo);const ii=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=ii.format(a.toDate())}else s=a.fromNow();return e("time",{datetime:a.toISOString(),title:a.format("LLLL"),children:s})}const ri=[{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 si(...t){try{return uo(...t)}catch{return t[2]||!1}}const Dt=qe(si),ci=[new Intl.DateTimeFormat().resolvedOptions().locale,...navigator.languages],li=Dt(ci,ri.map(t=>t.code.replace("_","-")),"en");function La(t=!1){if(t){const{contentTranslationTargetLanguage:n}=M.settings;if(n)return n}return li}function nn(t){try{return new Intl.DisplayNames(navigator.languages,{type:"language"}).of(t)}catch{return null}}function vn(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"),`<picture><source srcset="${o}" media="(prefers-reduced-motion: reduce)"></source><img class="shortcode-emoji emoji" src="${r}" alt=":${s}:" width="16" height="16" loading="lazy" decoding="async" /></picture>`)}),t):""}const tt=document.createElement("div"),ui=["u-url","mention","hashtag"];function di(t,n={}){const{emojis:a,postEnhanceDOM:s=()=>{}}=n;let o=t;const r=document.createElement("div");r.innerHTML=o;const c=/<a/i.test(o),u=o.includes("```");if(c&&(r.querySelectorAll('a:not([target="_blank"])').forEach(p=>{p.setAttribute("target","_blank")}),r.querySelectorAll("a[class]").forEach(p=>{p.classList.forEach(m=>{ui.includes(m)||p.classList.remove(m)})})),c&&r.querySelectorAll("a[href]").forEach(h=>{/^https?:\/\//i.test(h.textContent.trim())&&h.classList.add("has-url-text")}),c){const f=r.querySelectorAll("a[href]"),h=[];f.forEach(p=>{const m=p.innerText.trim(),g=p.querySelector("*");if(/^@[^@]+(@[^@]+)?$/g.test(m)){const[_,b,y]=m.split("@");g||(!h.some(([v])=>v===b)||h.some(([v,E])=>v===b&&E===y)?(p.innerHTML=`@<span>${b}</span>`,h.push([b,y])):p.innerHTML=`@<span>${b}@${y}</span>`),p.classList.add("mention")}/^#[^#]+$/g.test(m)&&(g||(p.innerHTML=`#<span>${m.slice(1)}</span>`),p.classList.add("mention","hashtag"))})}let d;if(o.includes(":")&&(d=an(r),d.forEach(f=>{let h=f.nodeValue.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");a&&(h=vn(h,a)),tt.innerHTML=h,f.replaceWith(...tt.childNodes)})),u&&[...r.querySelectorAll("p")].filter(h=>/^```[^]+```$/g.test(h.innerText.trim())).forEach(h=>{const p=document.createElement("pre");h.querySelectorAll("br").forEach(m=>m.replaceWith(`
`)),p.innerHTML=`<code>${h.innerHTML.trim()}</code>`,h.replaceWith(p)}),u&&[...r.querySelectorAll("p")].filter(p=>/^```/g.test(p.innerText)).forEach(p=>{const m=[p];let g=!1,_=p;for(;_.nextElementSibling;){const b=_.nextElementSibling;if(b&&b.tagName==="P")if(/```$/g.test(b.innerText)){m.push(b),g=!0;break}else m.push(b);else break;_=b}if(g){const b=document.createElement("pre");m.forEach(v=>{v.querySelectorAll("br").forEach(E=>E.replaceWith(`
`))});const y=m.map(v=>v.innerHTML).join(`
`);b.innerHTML=`<code tabindex="0">${y}</code>`,p.replaceWith(b),m.forEach(v=>v.remove())}}),o.includes("`")&&(d=an(r),d.forEach(f=>{let h=f.nodeValue.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");/`[^`]+`/g.test(h)&&(h=h.replaceAll(/(`[^]+?`)/g,"<code>$1</code>")),tt.innerHTML=h,f.replaceWith(...tt.childNodes)})),/twitter\.com/i.test(o)&&(d=an(r,{rejectFilter:["A"]}),d.forEach(f=>{let h=f.nodeValue.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");/@[a-zA-Z0-9_]+@twitter\.com/g.test(h)&&(h=h.replaceAll(/(@([a-zA-Z0-9_]+)@twitter\.com)/g,'<a href="https://twitter.com/$2" rel="nofollow noopener noreferrer" target="_blank">$1</a>')),tt.innerHTML=h,f.replaceWith(...tt.childNodes)})),o.includes("#")){let f=null;const h=[...r.querySelectorAll("p")].filter((p,m)=>{let g=0;for(let _=0;_<p.childNodes.length;_++){const b=p.childNodes[_];if(b.nodeType===Node.TEXT_NODE){if(b.textContent.trim()!=="")return!1}else if(b.tagName!=="BR")if(b.tagName==="A"){const y=b.textContent.trim();if(!y||!y.startsWith("#"))return!1;g++}else return!1}if(g>3||g>1&&f&&m===f+1)return f=m,!0});h!=null&&h.length&&h.forEach(p=>{p.classList.add("hashtag-stuffing"),p.title=p.innerText})}return s&&queueMicrotask(()=>s(r)),o=r.innerHTML,o}const Aa=qe(di),mi=["STYLE","IMG","VIDEO","AUDIO","AREA","MAP","TRACK","EMBED","IFRAME","OBJECT","PICTURE","PORTAL","SOURCE","SVG","MATH","CANVAS","NOSCRIPT","SCRIPT","INPUT","OPTION","TEXTAREA","SLOT","TEMPLATE"],hi=Object.fromEntries(mi.map(t=>[t,!0]));function an(t,n={}){var c;const a=[],s=Object.assign({},hi,(c=n.rejectFilter)==null?void 0:c.reduce((u,d)=>(u[d]=!0,u),{})),o=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,{acceptNode(u){return s[u.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 pi(t){return t?(on.innerHTML=t.replace(/<\/p>/g,`</p>
`).replace(/<\/li>/g,`</li>
`),on.querySelectorAll("br").forEach(n=>{n.replaceWith(`
`)}),on.innerText.replace(/[\r\n]{3,}/g,`
`).trim()):""}const bn=qe(pi);function fi(t){const{mentions:n=[],instance:a,previewMode:s,statusURL:o}=t||{};return r=>{var h,p;let{target:c}=r;if(c=c.closest("a"),!c||r.metaKey||r.ctrlKey||r.shiftKey||r.altKey||r.which===2)return;const u=(h=c.previousSibling)==null?void 0:h.textContent,d=u==null?void 0:u.endsWith("@"),f=c.innerText.startsWith("@");if(c.classList.contains("u-url")&&f||d&&!f){const m=(c.querySelector("span")||c).innerText.trim(),g=m.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(m)){r.preventDefault(),r.stopPropagation();const y=c.getAttribute("href");M.showAccount={account:y,instance:a}}}else if(!s){const m=u==null?void 0:u.endsWith("#");if(c.classList.contains("hashtag")||m){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:gi}=new Intl.DateTimeFormat().resolvedOptions(),vi=t=>{const{dateYear:n,hideTime:a,formatOpts:s}=t||{},o=new Date().getFullYear();return Intl.DateTimeFormat(gi,{year:n===o?void 0:"numeric",month:"short",day:"numeric",hour:a?void 0:"numeric",minute:a?void 0:"numeric",...s})},bi=qe(vi);function Mt(t,n){return t instanceof Date||(t=new Date(t)),bi({dateYear:t.getFullYear(),...n}).format(t)}const{locale:yi}=Intl.NumberFormat().resolvedOptions(),He=Intl.NumberFormat(yi,{notation:"compact"}).format;function _i({skeleton:t,account:n,avatarSize:a="xl",useAvatarStatic:s=!1,instance:o,external:r,internal:c,onClick:u,showActivity:d=!1,showStats:f=!1,accountInstance:h,hideDisplayName:p=!1,relationship:m={},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:E,username:L,emojis:S,url:w,statusesCount:I,lastStatusAt:C,bot:N,fields:Y,note:B,group:R,followersCount:V}=n;let[U,be,le]=b.match(/([^@]+)(@.+)/i)||[,b];h&&(le=`@${h}`);const ve=Y==null?void 0:Y.find(j=>!!j.verifiedAt&&!!j.value),A={};for(const j in m)g.includes(j)||(A[j]=m[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(),u)return u(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:E?e("b",{children:e(vt,{text:E,emojis:S})}):e("b",{children:L})})," ",e("span",{class:"account-block-acct",children:["@",be,e("wbr",{}),le]}),d&&e(W,{children:[e("br",{}),e("small",{class:"last-status-at insignificant",children:["Posts: ",I,!!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})},m.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 ki={"@mastodon/edit-media-attributes":">=4.1","@mastodon/list-exclusive":">=4.2"},rn={};function Ca(t){try{const{version:n,domain:a}=ga(),s=`${a}-${t}`;if(rn[s])return rn[s];const o=ki[t];return o?rn[s]=mo(n,o,{includePrerelease:!0,loose:!0}):!1}catch{return!1}}const wi=[{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 Ei={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}=Ei,ft=Gn?Gn.split(/\s+/):[],xi=ca({limit:1,interval:2e3});let sn=0;function Ti(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(Ti,{maxAge:Fa}),Li=zt(xi(Sa),{maxAge:Fa});function Ai({forceTranslate:t,sourceLanguage:n,onTranslate:a,text:s="",mini:o}){const r=La(!0),[c,u]=Z("default"),[d,f]=Z(null),[h,p]=Z(null),[m,g]=Z(null),_=Q(),b=n?nn(n):null,y=nn(r),v=Q("auto");a||(a=o?Li:Sa);const E=async()=>{var L,S;u("loading");try{const{content:w,detectedSourceLanguage:I,provider:C,error:N,...Y}=await a(s,v.current,r);if(w){if(I){const B=nn(I);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),u("default"),!o&&w.trim()!==s.trim()&&(_.current.open=!0,_.current.scrollIntoView({behavior:"smooth",block:"nearest"}))}else u("error")}catch{u("error")}};return fe(()=>{t&&E()},[t]),o?h&&h.trim()!==s.trim()&&m!==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:d||"",children:h})]})})}):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"&&(h||E())},children:[e(T,{icon:"translate"})," ",e("span",{children:c==="loading"?"Translating…":n&&b&&!m?`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,E()},children:wi.map(L=>e("option",{value:L.code,children:L.code==="auto"?`Auto (${m??"…"})`:L.name}))})," ",e("span",{children:["→ ",y]}),e(Bt,{abrupt:!0,hidden:c!=="loading"})]}),c==="error"?e("p",{class:"ui-state",children:"Failed to translate"}):!!h&&e(W,{children:[e("output",{class:"translated-content",lang:r,dir:"auto",children:h}),!!d&&e("output",{class:"translated-pronunciation-content",tabIndex:-1,onClick:L=>{L.target.classList.toggle("expand")},children:d})]})]})]})})}const Ci=ft!=null&&ft.length?Ai:()=>null,yn=[["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","ⵜⴰⵎⴰⵣⵉⵖⵜ"]],Fi="(((?:[^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\\-_&=#\\/])?))",Si="gi",Yn={source:Fi,flags:Si},Je=po("drafts-db","drafts-store"),$i={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:$i},nt={public:"earth",unlisted:"group",private:"lock",direct:"message"};function Ii({poll:t,lang:n,readOnly:a,refresh:s=()=>{},votePoll:o=()=>{}}){const[r,c]=Z("default"),{expired:u,expiresAt:d,id:f,multiple:h,options:p,ownVotes:m,voted:g,votersCount:_,votesCount:b,emojis:y}=t,v=!!d&&new Date(d),E=_||b;let L=0;E<=1e3?L=0:E<=1e4?L=1:E<=1e5&&(L=2);const[S,w]=Z(!1),I=p.every(C=>C.votesCount!==null);return e("div",{lang:n,dir:"auto",class:`poll ${a?"read-only":""} ${r==="loading"?"loading":""}`,children:[S&&I||g||u?e(W,{children:[e("div",{class:"poll-options",children:p.map((C,N)=>{const{title:Y,votesCount:B}=C,R=E?(B/E*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&&m.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}`)})}),!u&&!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:h?"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:[!u&&!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&&!u&&!a&&I&&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"})," "]}),!u&&!a&&" ",e("span",{title:b,children:He(b)})," vote",b===1?"":"s",!!_&&_!==b&&e(W,{children:[" ","• ",e("span",{title:_,children:He(_)})," ","voter",_===1?"":"s"]})," ","• ",u?"Ended":"Ending"," ",!!v&&e(bt,{datetime:v})]})," "]})}const Pi=wo();function Ri(t,n){if(!(t!=null&&t.length))return!1;const a=t.filter(r=>{const{filter:c}=r,u=c.context.includes(n);return u?c.expiresAt?new Date(c.expiresAt)>new Date:u:!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(Ri);function Di(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 Cr(t,n){if(!(t!=null&&t.length))return[];if(!n)return t;const a=O.session.get("currentAccount");return t.filter(s=>Di(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 Mi(t){const{spoilerText:n,content:a,poll:s,mediaAttachments:o}=t;let r="";return n!=null&&n.trim()?r+=n:r+=bn(a),r=r.trim(),s&&(r+=" 📊"),o!=null&&o.length&&(r+=" "+o.map(c=>({image:"🖼️",gifv:"🎞️",video:"📹",audio:"🎵",unknown:""})[c.type]||"").join("")),r}function Pt({className:t="truncated"}={}){const n=Q(),a=da(({height:s})=>{if(n.current){const{scrollHeight:o}=n.current;let r=o>s;if(r){const{height:c,maxHeight:u}=getComputedStyle(n.current),d=parseInt(u||c,10);r=o>d}n.current.classList.toggle(t,r)}},300);return Eo({ref:n,box:"border-box",onResize:a}),n}const Oi=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),zi="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:[zi,!!s&&e("sup",{children:s})]})},Ni=140,Ia=qe(t=>t!=null&&t.length?t.length>Ni||/[\n\r].*[\n\r]/.test(t.trim()):!1);function Bi({class:t="",media:n,to:a,lang:s,showOriginal:o,autoAnimate:r,showCaption:c,altIndex:u,onClick:d=()=>{}}){const{blurhash:f,description:h,meta:p,previewRemoteUrl:m,previewUrl:g,remoteUrl:_,url:b,type:y}=n,{original:v={},small:E,focus:L}=p||{},S=o?v==null?void 0:v.width:E==null?void 0:E.width,w=o?v==null?void 0:v.height:E==null?void 0:E.height,I=o?b:g||b,C=o?_:m||_,N=S>=w?"landscape":"portrait",Y=f?ma(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=ha(({x:G,y:ie,scale:ee})=>{const{current:Ce}=V;if(Ce){const he=xo({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<G&&w<ie;ee&&me(ee)},[S,w]);const ye=window.innerHeight*(N==="portrait"?.45:.33),se=N==="portrait"?0:160,Pe={"--average-color":Y&&`rgb(${Y.join(",")})`},Ee=S&&w?{"--width":`${S}px`,"--height":`${w}px`,"--aspectWidth":`${S/w*Math.max(se,ye)}px`,aspectRatio:`${S} / ${w}`,...Pe}:{...Pe},_e=Ia(h),te=!!c&&!o&&!!h&&!_e,ce=te?G=>{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:h,lang:s}},children:h})]})}:W;if(j)return ve.containerProps.style.display="inherit",mn(()=>{Oi&&o&&(async()=>{try{await fetch(I,{mode:"no-cors"}),V.current.src=I}catch{}})()},[I]),e(ce,{children:e(A,{ref:K,class:`media media-image ${t}`,onClick:d,"data-orientation":N,"data-has-alt":!te,style:o?{backgroundImage:`url(${g})`,backgroundSize:de?`${S}px ${w}px`:void 0,...Pe}:Ee,children:o?e(Nn,{...ve,children:e("img",{ref:V,src:I,alt:h,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===I&&I!==C&&(G.target.src=C)}})}):e(W,{children:[e("img",{src:I,alt:te?"":h,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===I&&I!==C&&(G.target.src=C)}}),!te&&e(un,{alt:h,lang:s,index:u})]})})});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,xe=!o&&r&&ie,ke=v.duration>5,Fe=`
<video
src="${b}"
poster="${g}"
width="${S}"
height="${w}"
data-orientation="${N}"
preload="auto"
autoplay
muted="${ie}"
${ie?"":"controls"}
playsinline
loop="${ee}"
${ie?'ondblclick="this.paused ? this.play() : this.pause()"':""}
${ie&&ke?"ontimeupdate=\"this.closest('.media-gif') && this.closest('.media-gif').style.setProperty('--progress', `${~~((this.currentTime / this.duration) * 100)}%`)\"":""}
></video>
`;return e(ce,{children:e(A,{class:`media ${t} media-${ie?"gif":"video"} ${xe?"media-contain":""} ${he?"media-hover-animate":""}`,"data-orientation":N,"data-formatted-duration":o?void 0:Ce,"data-label":ie&&!o&&!xe?"GIF":"","data-has-alt":!te,style:!o&&Ee,onClick:ne=>{if(he)try{B.current.pause()}catch{}d(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||xe?ie&&o?e(Nn,{...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?"":h,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:h,lang:s,index:u})]})})}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:d,style:!o&&Ee,children:[o?e("audio",{src:_||b,preload:"none",controls:!0,autoplay:!0}):g?e("img",{src:g,alt:te?"":h,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:h,lang:s,index:u})]})]})})}}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 Vi=280,ji=140;function Ui(t,n){return n.v1.accounts.$select(t).fetch()}const Hi=zt(Ui),pt={public:"Public",unlisted:"Unlisted",private:"Followers only",direct:"Private mention"},Ki=window.ontouchstart!==void 0&&/iPad|iPhone|iPod/.test(navigator.userAgent),Qn=80;function qi(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}
`:"")+bn(a)+qi(s)}function Xe({statusID:t,status:n,instance:a,size:s="m",contentTextWeight:o,readOnly:r,enableCommentHint:c,withinContext:u,skeleton:d,enableTranslate:f,forceTranslate:h,previewMode:p,onMediaClick:m,quoted:g,onStatusLinkClick:_=()=>{},showFollowedTags:b}){var Rn,Dn,Mn;if(d)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:E}=Ke({instance:a}),{instance:L}=Ke(),S=v===L;let w=Me(t||(n==null?void 0:n.id),v);const I=yt(M);if(n||(n=I.statuses[w]||I.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:Pe,sensitive:Ee,spoilerText:_e,visibility:te,language:ce,editedAt:G,filtered:ie,card:ee,createdAt:Ce,inReplyToId:he,inReplyToAccountId:xe,content:ke,mentions:Fe,mediaAttachments:ne,reblog:we,uri:ot,url:Re,emojis:et,tags:x,_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=l=>{l.shiftKey};if(s!=="l"&&z)return e(Zi,{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(l=>l.id===xe);!Oe&&xe===A&&(Oe={url:R,username:U,displayName:V});const[Se,We]=Z(Oe);if(!u&&!Se&&xe){const l=M.accounts[xe];l?We(l):Hi(xe,y).then(P=>{We(P),M.accounts[P.id]=P}).catch(P=>{})}const _t=xe===$||(Fe==null?void 0:Fe.find(l=>l.id===$)),Ge=$e(()=>!!(O.account.get("preferences")||{})["reading:expand:spoilers"],[]),kt=$e(()=>(O.account.get("preferences")||{})["reading:expand:media"]||"default",[]),ze=p||Ge||!!I.spoilers[A],it=p||kt==="show_all"||!!I.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&&((Rn=I.statusFollowedTags[w])!=null&&Rn.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"})," ",I.statusFollowedTags[w].slice(0,3).map(l=>e(at,{to:v?`/${v}/t/${l}`:`/t/${l}`,class:"status-followed-tag-item",children:l},l))]}),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(h),_n=La(!0),Ma=I.settings.contentTranslationHideLanguages||[],{contentTranslation:jt,contentTranslationAutoInline:kn}=I.settings;jt||(f=!1);const wn=$e(()=>{if(!jt||!kn||r||u&&!ue||p||_e||Ee||se||ee||ne!=null&&ne.length)return!1;const l=ln(ke);return l>0&&l<=ji},[jt,kn,r,u,ue,p,_e,Ee,se,ee,ne,ke]),[Ut,wt]=Z(!1),Oa=Pt(),za=Pt(),Na=Pt(),En="Read more →",Ht=Q(null),rt="Sorry, your current logged-in instance can't interact with this post from another instance.",xn=ha(()=>Math.max(Math.round((_e.length+ln(ke))/140)||1,1),[_e,ke]),Tn=Mt(re),Ln=G&&Mt(Le);let st=E&&te!=="direct"&&te!=="private";te==="private"&&J&&(st=!0);const Kt=l=>{var P;if(!S||!E)return alert(rt);(l!=null&&l.shiftKey||(P=l==null?void 0:l.syntheticEvent)!=null&&P.shiftKey)&&_a({replyToStatus:n})||(M.showCompose={replyToStatus:n})},qt=$e(()=>ne.some(l=>{var P,X;return!((X=(P=l.description)==null?void 0:P.trim)!=null&&X.call(P))}),[ne]),_r=async()=>{if(!S||!E)return alert(rt),!1;try{if(!j){let l="Boost this post?";if(qt&&(l+=`
⚠️ Some media have no descriptions.`),!confirm(l))return!1}if(M.statuses[w]={...n,reblogged:!j,reblogsCount:K+(j?-1:1)},j){const l=await y.v1.statuses.$select(A).unreblog();return De(l,v),!0}else{const l=await y.v1.statuses.$select(A).reblog();return De(l,v),!0}}catch{return M.statuses[w]=n,!1}},Wt=async()=>{if(!S||!E)return alert(rt),!1;try{if(M.statuses[w]={...n,reblogged:!j,reblogsCount:K+(j?-1:1)},j){const l=await y.v1.statuses.$select(A).unreblog();return De(l,v),!0}else{const l=await y.v1.statuses.$select(A).reblog();return De(l,v),!0}}catch{return M.statuses[w]=n,!1}},Gt=async()=>{if(!S||!E)return alert(rt);try{if(M.statuses[w]={...n,favourited:!de,favouritesCount:me+(de?-1:1)},de){const l=await y.v1.statuses.$select(A).unfavourite();De(l,v)}else{const l=await y.v1.statuses.$select(A).favourite();De(l,v)}}catch{M.statuses[w]=n}},Yt=async()=>{if(!S||!E)return alert(rt);try{if(M.statuses[w]={...n,bookmarked:!ye},ye){const l=await y.v1.statuses.$select(A).unbookmark();De(l,v)}else{const l=await y.v1.statuses.$select(A).bookmark();De(l,v)}}catch{M.statuses[w]=n}},An=!!ce&&ce!==_n&&!Dt([ce],[_n])&&!Ma.find(l=>ce===l||Dt([ce],[l])),Cn=Q(),Fn=Q();async function Ba(l){var pe,Ye,On,zn;l&&(Cn.current=y.v1.statuses.$select(t).rebloggedBy.list({limit:Qn}),Fn.current=y.v1.statuses.$select(t).favouritedBy.list({limit:Qn}));const[{value:P},{value:X}]=await Promise.allSettled([Cn.current.next(),Fn.current.next()]);if((pe=P.value)!=null&&pe.length||(Ye=X.value)!=null&&Ye.length){const Zt=[];return(On=P.value)!=null&&On.length&&Zt.push(...P.value.map(lt=>(lt._types=["reblog"],lt))),(zn=X.value)!=null&&zn.length&&Zt.push(...X.value.map(lt=>(lt._types=["favourite"],lt))),{value:Zt,done:P.done&&X.done}}return{value:[],done:!0}}const kr=Q(),Sn=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",{}),Tn]}),e(Xn,{to:v?`/${v}/s/${A}`:`/s/${A}`,onClick:l=>{_(l,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: ",Ln]})]})]}),(!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 l=await Wt();!ue&&l&&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 l=dn(n);l&&Zn(l,ce)},children:[e(T,{icon:"speak"}),e("span",{children:"Speak"})]})]}):(!ce||An)&&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 l=dn(n);l&&Zn(l,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:Ji(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)&&((Dn=navigator==null?void 0:navigator.canShare)==null?void 0:Dn.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 l=await y.v1.statuses.$select(A)[Pe?"unmute":"mute"]();De(l,v),Ae(Pe?"Conversation unmuted":"Conversation muted")}catch{Ae(Pe?"Unable to unmute conversation":"Unable to mute conversation")}},children:Pe?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 l=ya(A,v);l._deleted=!0,Ae("Deleted")}catch{Ae("Unable to delete")}})()},children:[e(T,{icon:"trash"}),e("span",{children:"Delete…"})]})]})]}),$n=Q(),[In,Et]=Z(!1),[xt,Jt]=Z({}),Tt=!ue&&!p&&!F&&!g,Va=pa(Ki&&Tt?l=>{var Ye;if(l.pointerType==="mouse")return;const{clientX:P,clientY:X}=((Ye=l.touches)==null?void 0:Ye[0])||l,pe=l.target.closest("a");pe&&/^https?:\/\//.test(pe.getAttribute("href"))||(l.preventDefault(),Jt({anchorPoint:{x:P,y:X},direction:"right"}),Et(!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 l=await Wt();!ue&&l&&Ae(j?`Unboosted @${U||C}'s post`:`Boosted @${U||C}'s post`)}catch{}})()},{enabled:Lt&&st}),qa=Ve("x",l=>{const P=document.activeElement.closest(".status-link, .status-focus");if(P){const X=P.querySelector(".spoiler-button:not(.spoiling)");if(X)l.stopPropagation(),X.click();else{const pe=P.querySelector(".spoiler-media-button:not(.spoiling)");pe&&(l.stopPropagation(),pe.click())}}}),At=ne.slice(0,ue?void 0:4),Ct=ne.length>1&&At.some(l=>!!l.description&&!Ia(l.description)),Wa=$e(()=>{if(!Ct)return null;const l=[];return At.forEach((P,X)=>{if(!P.description)return;const pe=l.findIndex(Ye=>Ye.media.description===P.description);pe===-1?l.push({media:P,indices:[X]}):l[pe].indices.push(X)}),l.map(({media:P,indices:X})=>e("div",{"data-caption-index":X.map(pe=>pe+1).join(" "),onClick:pe=>{pe.preventDefault(),pe.stopPropagation(),M.showMediaAlt={alt:P.description,lang:ce}},title:P.description,children:[e("sup",{children:X.map(pe=>pe+1).join(" ")})," ",P.description]},P.id))},[Ct,At,ce]),ct=$e(()=>{var l;return!!he&&xe===((l=n.account)==null?void 0:l.id)||!!I.statusThreadNumber[w]},[he,xe,(Mn=n.account)==null?void 0:Mn.id,I.statusThreadNumber[w]]),Ga=$e(()=>c&&!ct&&!u&&!he&&te==="public"&&oe>0,[c,ct,u,he,oe,te]),Pn=$e(()=>{if(ee||se||Ee||_e||ne!=null&&ne.length||ct||u||he||oe<=0||!/[???︖❓❔⁇⁈⁉¿‽؟]/.test(ke))return!1;const X=ln(ke);if(X>0&&X<=Vi)return!0},[ee,se,Ee,_e,ne,we,ct,u,he,oe,ke]);return e("article",{"data-state-post-id":w,ref:l=>{var X;Ht.current=l;const P=((X=l==null?void 0:l.closest)==null?void 0:X.call(l,".timeline-item, .timeline-item-alt, .status-link, .status-focus"))||l;ja.current=P,Ua.current=P,Ha.current=P,Ka.current=P,qa.current=P},tabindex:"-1",class:`status ${!u&&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:l=>{if(!Tt||l.metaKey)return;const P=l.target.closest("a");P&&/^https?:\/\//.test(P.getAttribute("href"))||(l.preventDefault(),Jt({anchorPoint:{x:l.clientX,y:l.clientY},direction:"right"}),Et(!0))},...Tt?Va():{},children:[Tt&&e(Co,{ref:$n,state:In?"open":void 0,...xt,onClose:l=>{var P,X,pe;Et(!1),(l==null?void 0:l.reason)==="click"&&((pe=(X=(P=Ht.current)==null?void 0:P.closest("[tabindex]"))==null?void 0:X.focus)==null||pe.call(X))},portal:{target:document.body},containerProps:{style:{zIndex:1001},onClick:()=>{var l,P;(P=(l=$n.current)==null?void 0:l.closeMenu)==null||P.call(l)}},overflow:"auto",boundingBoxPadding:Ta(),unmountOnClose:!0,children:Sn}),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:l=>{l.preventDefault(),l.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:l=>{l.metaKey||l.ctrlKey||l.shiftKey||l.altKey||l.which===2||(l.preventDefault(),l.stopPropagation(),_==null||_(l,n),Jt({anchorRef:{current:l.currentTarget},align:"end",direction:"bottom",gap:4}),Et(!0))},class:`time ${In&&(xt!=null&&xt.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"})," "]}),!u&&e(W,{children:ct?e("div",{class:"status-thread-badge",children:[e(T,{icon:"thread",size:"s"}),"Thread",I.statusThreadNumber[w]?` ${I.statusThreadNumber[w]}/X`:""]}):!!he&&!!Se&&(!!_e||!Fe.find(l=>l.id===xe))&&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||Ee?"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":En,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:l=>{l.preventDefault(),l.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":En,children:[e("div",{lang:ce,dir:"auto",class:"inner-content",onClick:fi({mentions:Fe,instance:v,previewMode:p,statusURL:Re}),dangerouslySetInnerHTML:{__html:Aa(ke,{emojis:et,postEnhanceDOM:l=>{l.querySelectorAll('a.u-url[target="_blank"]').forEach(P=>{/http/i.test(P.innerText.trim())||P.removeAttribute("target")})}})}}),e(Xi,{id:A,instance:v,level:g})]}),!!se&&e(Ii,{lang:ce,poll:se,readOnly:r||!S||!E,onUpdate:l=>{M.statuses[w].poll=l},refresh:()=>y.v1.polls.$select(se.id).fetch().then(l=>{M.statuses[w].poll=l}).catch(l=>{}),votePoll:l=>y.v1.polls.$select(se.id).votes.create({choices:l}).then(P=>{M.statuses[w].poll=P}).catch(P=>{})}),((f||wn)&&!!ke.trim()&&!!bn(vn(ke,et))&&An||Vt)&&e(Ci,{forceTranslate:Vt||wn,mini:!ue&&!u,sourceLanguage:ce,text:dn(n)}),!p&&Ee&&!!ne.length&&kt!=="show_all"&&e("button",{class:`plain spoiler-media-button ${it?"spoiling":""}`,type:"button",hidden:!Ge&&!!_e,onClick:l=>{l.preventDefault(),l.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(Wi,{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((l,P)=>e(Bi,{media:l,autoAnimate:ue,showCaption:ne.length===1,lang:ce,altIndex:Ct&&!!l.description&&P+1,to:`/${v}/s/${A}?${u?"media":"media-only"}=${P+1}`,onClick:m?X=>{m(X,P,l,n)}:void 0},l.id))})}),!!ee&&/^https/i.test(ee==null?void 0:ee.url)&&!Ee&&!_e&&!se&&!ne.length&&!I.statusQuotes[w]&&e(Gi,{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:Tn})}),G&&e(W,{children:[" ","• ",e(T,{icon:"pencil",alt:"Edited"})," ",e("time",{tabIndex:"0",class:"edited",datetime:Le.toISOString(),onClick:()=>{wt(A)},children:Ln})]})]})}),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(gn,{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:Sn})]})]})]}),!!Ut&&e(Nt,{class:"light",onClick:l=>{l.target===l.currentTarget&&wt(!1)},children:e(Yi,{statusID:Ut,instance:v,fetchStatusHistory:()=>y.v1.statuses.$select(Ut).history.list(),onClose:()=>{var l;wt(!1),(l=Ht.current)==null||l.focus()}})})]})}function Wi(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 Gi({card:t,selfReferential:n,instance:a}){var B;const s=yt(M),{blurhash:o,title:r,description:c,html:u,providerName:d,providerUrl:f,authorName:h,authorUrl:p,width:m,height:g,image:_,imageDescription:b,url:y,type:v,embedUrl:E,language:L,publishedAt:S}=t,w=r||d||h,C=m/g>=1.2?"large":"",[N,Y]=Z(null);if(fe(()=>{w&&_&&!n&&va(y)&&ba(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?ma(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:m,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:E,width:m,height:g,alt:r||c,loading:"lazy",style:{height:"auto",aspectRatio:`${m}/${g}`}})});if(v==="video"){if(/youtube/i.test(d)){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:`${m}/${g}`},dangerouslySetInnerHTML:{__html:u}})}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||d||h})]})})}}}function Yi({statusID:t,instance:n,fetchStatusHistory:a=()=>{},onClose:s}){const[o,r]=Z("default"),[c,u]=Z([]);return fe(()=>{r("loading"),(async()=>{try{const d=await a();u(d),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(d=>{const{createdAt:f}=d,h=new Date(f);return e("li",{class:"history-item",children:[e("h3",{children:e("time",{children:Mt(h,{formatOpts:{weekday:"short",second:"numeric"}})})}),e(Xe,{status:d,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,...u}){typeof s=="string"&&(s=[s,s]),typeof o=="string"&&(o=[o,o]);const[d,f]=Z(s[0]||""),[h,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:d,class:`plain ${a} ${t?"checked":""}`,onClick:m=>{c&&(m.preventDefault(),m.stopPropagation(),c(m))},...u,children:[e(T,{icon:r,size:"l",alt:h}),!!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 Ji(t){if(!t)return;const n=new URL(t),{host:a,pathname:s}=n,o=s.replace(/\/$/,""),[r,c,u]=o.match(/\/(@[^\/]+)\/(.*)/)||[];return e(W,{children:[a,c?e(W,{children:["/",c,e("wbr",{}),e("span",{class:"more-insignificant",children:["/",u]})]}):e("span",{class:"more-insignificant",children:o})]})}function Zi({status:t,filterInfo:n,instance:a,containerProps:s={},showFollowedTags:o}){var R;const r=yt(M),{id:c,account:{avatar:u,avatarStatic:d,bot:f,group:h},createdAt:p,visibility:m,reblog:g}=t,_=!!g,b=(n==null?void 0:n.titlesStr)||"",y=new Date(p),v=Mi(t.reblog||t),[E,L]=Z(!1),S=pa(()=>{L(!0)},{threshold:600,captureEvent:!0,detect:"touch",cancelOnMovement:2}),w=Pt(),I=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[I])!=null&&R.length);return e("div",{class:_?h?"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:d||u,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[m],alt:pt[m],size:"s"})," ",_?"boosted":B?e("span",{children:r.statusFollowedTags[I].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]})]})]}),!!E&&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 Xi=fn(({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((u,d,f)=>f.findIndex(h=>h.url===u.url)===d);if(c!=null&&c.length&&!(a>2))return c.map(u=>e(at,{to:`${u.instance?`/${u.instance}`:""}/s/${u.id}`,class:"status-card-link","data-read-more":"Read more →",children:e(Xe,{statusID:u.id,instance:u.instance,size:"s",quoted:a+1,enableCommentHint:!0})},u.instance+u.id))}),ta=fn(Xe);var Qi={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}=Qi,er=yn.reduce((t,n)=>{const[a,s,o]=n;return t[a]={common:s,native:o},t},{}),Pa={"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},tr=Object.values(Pa),aa=24*60*60,oa=t=>{if(!t)return aa;const n=(new Date(t).getTime()-Date.now())/1e3;return tr.find(a=>a>=n)||aa},Ue=document.createElement("ul");Ue.role="listbox";Ue.className="text-expander-menu";const nr=16,ar=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-nr+"px")}})});ar.observe(Ue);const Ze=Dt([new Intl.DateTimeFormat().resolvedOptions().locale,...navigator.languages],yn.map(t=>t[0]),"en"),Ra=new RegExp(Yn.source,Yn.flags),or=/(^|[^\/\w])@(([a-z0-9_]+)@[a-z0-9\.\-]+[a-z0-9]+)/gi,ir="$2xxxxxxxxxxxxxxxxxxxxxxx";function rr(t){return t.replace(Ra,ir).replace(or,"$1@$3")}const sr=/[a-z0-9_]+([a-z0-9_.-]+[a-z0-9_]+)?/i,cr=new RegExp(`(^|[^=\\/\\w])(@${sr.source}(?:@[\\p{L}\\w.-]+[\\w]+)?)`,"uig"),lr=new RegExp("(^|[^=\\/\\w])(#[a-z0-9_]+([a-z0-9_.-]+[a-z0-9_]+)?)(?![\\/\\w])","ig"),ur="[a-zA-Z0-9_]{2,}",dr=new RegExp(`([^A-Za-z0-9_:\\n]|^)(:${ur}:)(?=[^A-Za-z0-9_:]|$)`,"g");function mr(t,{maxCharacters:n=1/0}){let a=t;const{composerCharacterCount:s}=M;let o="";return s>n?(o='<mark class="compose-highlight-exceeded">'+Bn(a,n)+"</mark>",a=Bn(a,0,n),a+o):a.replace(Ra,'$2<mark class="compose-highlight-url">$3</mark>').replace(cr,'$1<mark class="compose-highlight-mention">$2</mark>').replace(lr,'$1<mark class="compose-highlight-hashtag">$2</mark>').replace(dr,'$1<mark class="compose-highlight-emoji-shortcode">$2</mark>')}function Fr({onClose:t,replyToStatus:n,editStatus:a,draftStatus:s,standalone:o,hasOpener:r}){var et;const{masto:c,instance:u}=Ke(),[d,f]=Z("default"),h=Q((s==null?void 0:s.uid)||So()),p=Ot(),m=p.info,g=Oo(),{statuses:{maxCharacters:_,maxMediaAttachments:b,charactersReservedPerUrl:y}={},mediaAttachments:{supportedMimeTypes:v=[],imageSizeLimit:E,imageMatrixLimit:L,videoSizeLimit:S,videoMatrixLimit:w,videoFrameRateLimit:I}={},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")||{},Pe=()=>{R.current&&R.current.dispatchEvent(new Event("input"))},Ee=()=>{setTimeout(()=>{var x;(x=R.current)==null||x.focus()},300)};fe(()=>{if(n){const{spoilerText:x,visibility:F,language:D,sensitive:$}=n;x&&V.current&&(V.current.value=x);const q=[...new Set([n.account.acct,...n.mentions.map(z=>z.acct)])].filter(z=>z!==m.acct);q.length>0&&(R.current.value=`${q.map(z=>`@${z}`).join(" ")} `,Pe()),Ee(),be(F==="public"&&se["posting:default:visibility"]?se["posting:default:visibility"]:F),oe(D||se.postingDefaultLanguage||Ze),ve($&&!!x)}else if(a){const{visibility:x,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,Pe(),Ee(),V.current.value=re,be(x),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 Ee(),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:x,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=x,Pe(),Ee(),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:x,dataset:F}=R.current;if(d==="loading")return!1;const D=K.length>0;if(!x&&!D||K.length>0&&K.every(H=>H.id))return!0;const J=(n==null?void 0:n.account.id)===m.id,q=n&&x.trim()===`@${n.account.acct}`;return!!(!J&&q||x===(F==null?void 0:F.source))},G=()=>ce()?!0:confirm(te);fe(()=>{const x=F=>{ce()||(F.preventDefault(),F.returnValue=te)};return window.addEventListener("beforeunload",x,{capture:!0}),()=>window.removeEventListener("beforeunload",x,{capture:!0})},[]);const ie=()=>{const{value:x}=R.current,{value:F}=V.current;return Vn(rr(x))+Vn(F)},ee=()=>{const x=ie();M.composerCharacterCount=x};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:x=>{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 xe=Q({}),ke=()=>`${$t()}#${h.current}`,Fe=()=>{if(a)return;const x=ke(),F={key:x,replyTo:n?{id:n.id,account:{id:n.account.id,username:n.account.username,acct:n.account.acct}}:null,draftStatus:{uid:h.current,status:R.current.value,spoilerText:V.current.value,visibility:U,language:A,sensitive:le,poll:me,mediaAttachments:K}};!$o(F,xe.current)&&!ce()&&(Jn.drafts.set(x,{...F,state:"unsaved",updatedAt:Date.now()}).then(()=>{}).catch(D=>{}),xe.current=structuredClone(F))};Wo(Fe,5e3),fe(()=>(Fe(),()=>{Jn.drafts.del(ke())}),[]),fe(()=>{const x=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",x);const F=D=>{D.dataTransfer.items.length>0&&(D.preventDefault(),D.stopPropagation())};return window.addEventListener("dragover",F),window.addEventListener("drop",x),()=>{window.removeEventListener("paste",x),window.removeEventListener("dragover",F),window.removeEventListener("drop",x)}},[K]);const[ne,we]=Z(!1),[ot,Re]=$e(()=>{const x=[],F=[],{contentTranslationHideLanguages:D=[]}=M.settings;return yn.forEach($=>{const[J]=$;J===A||J===j.current||J===Ze||D.includes(J)?x.push($):F.push($)}),x.sort(([$,J],[q,z])=>$===A?-1:q===A?1:J.localeCompare(z)),F.sort(([$,J],[q,z])=>J.localeCompare(z)),[x,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:[(m==null?void 0:m.avatarStatic)&&e(_i,{account:m,accountInstance:p.instanceURL,hideDisplayName:!0,useAvatarStatic:!0}),o?r&&e("button",{type:"button",class:"light pop-button",disabled:d==="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 x={editStatus:a,replyToStatus:n,draftStatus:{uid:h.current,status:R.current.value,spoilerText:V.current.value,visibility:U,language:A,sensitive:le,poll:me,mediaAttachments:K}};window.opener.__COMPOSE__=x,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:d==="loading",onClick:()=>{_a({editStatus:a,replyToStatus:n,draftStatus:{uid:h.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:d==="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:d==="loading"?"none":"auto",opacity:d==="loading"?.5:1},onKeyDown:x=>{x.key==="Enter"&&(x.ctrlKey||x.metaKey)&&_e.current.dispatchEvent(new Event("submit",{cancelable:!0}))},onSubmit:x=>{x.preventDefault();const F=new FormData(x.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,u,{skipThreading:!0});else try{re=await c.v1.statuses.create(H,{idempotencyKey:h.current})}catch{re=await c.v1.statuses.create(H)}f("default"),t({type:a?"edit":n?"reply":"post",newStatus:re,instance:u})}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:d==="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:d==="loading",onChange:x=>{var D,$;const F=x.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:x=>{be(x.target.value)},disabled:d==="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(hr,{ref:R,placeholder:n?"Post your reply":a?"Edit your post":"What are you doing?",required:(K==null?void 0:K.length)===0,disabled:d==="loading",lang:A,onInput:()=>{ee()},maxCharacters:_,performSearch:x=>{const{type:F,q:D,limit:$}=x;return F==="accounts"?c.v1.accounts.search.list({q:D,limit:$,resolve:!1}):c.v2.search.fetch(x)}}),(K==null?void 0:K.length)>0&&e("div",{class:"media-attachments",children:[K.map((x,F)=>{const{id:D,file:$}=x,J=($==null?void 0:$.size)+($==null?void 0:$.type)+($==null?void 0:$.name);return e(fr,{attachment:x,disabled:d==="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:d==="loading",onChange:x=>{const F=x.target.checked;ve(F)}})," ",e("span",{children:"Mark media as sensitive"})," ",e(T,{icon:`eye-${le?"close":"open"}`})]})]}),!!me&&e(gr,{lang:A,maxOptions:C,maxExpiration:Y,minExpiration:B,maxCharactersPerOption:N,poll:me,disabled:d==="loading",onInput:x=>{if(x){const F={...x};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-1,disabled:d==="loading"||K.length>=b||!!me,onChange:x=>{const F=x.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)),x.target.value=""}}),e(T,{icon:"attachment"})]})," ",e("button",{type:"button",class:"toolbar-button",disabled:d==="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:d==="loading",onClick:()=>{we(!0)},children:e(T,{icon:"emoji2"})})]}),e("div",{class:"spacer"}),d==="loading"?e(Bt,{abrupt:!0}):e(pr,{maxCharacters:_,hidden:d==="loading"}),e("label",{class:`toolbar-button ${A!==j.current?"highlight":""}`,children:[e("span",{class:"icon-text",children:(et=er[A])==null?void 0:et.native}),e("select",{name:"language",value:A,onChange:x=>{const{value:F}=x.target;oe(F||Ze),O.session.set("currentLanguage",F||Ze)},disabled:d==="loading",children:[ot.map(([x,F,D])=>e("option",{value:x,children:[F," (",D,")"]},x)),e("hr",{}),Re.map(([x,F,D])=>e("option",{value:x,children:[F," (",D,")"]},x))]})]})," ",e("button",{type:"submit",class:"large",disabled:d==="loading",children:n?"Reply":a?"Update":"Post"})]})]})]}),ne&&e(Nt,{class:"light",onClick:x=>{x.target===x.currentTarget&&we(!1)},children:e(br,{masto:c,instance:u,onClose:()=>{we(!1)},onSelect:x=>{const F=` ${x} `,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<window.innerHeight){const r=a-o,c=n?s+r+"px":null;t.style.height=c}}const hr=ua((t,n)=>{var _;const{masto:a}=Ke(),[s,o]=Z(((_=n.current)==null?void 0:_.value)||""),{maxCharacters:r,performSearch:c=()=>{},...u}=t,d=Q();fe(()=>{(async()=>{try{const b=await a.v1.customEmojis.list();d.current=b}catch{}})()},[]);const f=Q(),h=Q("");fe(()=>{let b,y,v;return f.current&&(b=E=>{const{key:L,provide:S,text:w}=E.detail;if(h.current=w,w===""){S(Promise.resolve({matched:!1}));return}if(L===":"){const C=vr(d.current,w);let N="";C.forEach(Y=>{const{shortcode:B,url:R}=Y;N+=`
<li role="option" data-value="${Be(B)}">
<img src="${Be(R)}" width="16" height="16" alt="" loading="lazy" />
:${Be(B)}:
</li>`}),Ue.innerHTML=N,S(Promise.resolve({matched:C.length>0,fragment:Ue}));return}const I={"@":"accounts","#":"hashtags"}[L];S(new Promise(C=>{c({type:I,q:w,limit:5}).then(Y=>{if(w!==h.current)return;const B=Y[I]||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=vn(le,oe);if(A)R+=`
<li role="option" data-value="${Be(A)}">
<span class="avatar">
<img src="${Be(be)}" width="16" height="16" alt="" loading="lazy" />
</span>
<span>
<b>${K||ve}</b>
<br>@${Be(A)}
</span>
</li>
`;else{const me=(de=j==null?void 0:j.reduce)==null?void 0:de.call(j,(ye,se)=>ye+ +se.uses,0);R+=`
<li role="option" data-value="${Be(U)}">
<span class="grow">#<b>${Be(U)}</b></span>
${me?`<span class="count">${He(me)}</span>`:""}
</li>
`}Ue.innerHTML=R}),C({matched:B.length>0,fragment:Ue})})}))},f.current.addEventListener("text-expander-change",b),y=E=>{const{key:L,item:S}=E.detail;L===":"?E.detail.value=`:${S.dataset.value}:`:E.detail.value=`${L}${S.dataset.value}`},f.current.addEventListener("text-expander-value",y),v=E=>{const{input:L}=E.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),m=Q(),g=da(b=>{var E;if(!m.current)return;if(p.current>3){m.current.innerHTML="",m.current=null,(E=g==null?void 0:g.cancel)==null||E.call(g);return}let y,v;p.current<=3&&(y=Date.now()),m.current.innerHTML=mr(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",...u,ref:n,name:"status",value:s,onKeyDown:b=>{const{key:y,target:v}=b;if(y==="Enter")try{const{value:E,selectionStart:L}=v,w=E.slice(0,L).split(`
`).slice(-1)[0];if(w&&/^\s*(-|\d+\.)\s/.test(w)){const[I,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{}m.current&&(m.current.scrollTop=v.scrollTop)},onInput:b=>{var E;const{target:y}=b,v=y.value;o(v),ia(y),(E=t.onInput)==null||E.call(t,b),g(v)},style:{width:"100%",height:"4em"},onScroll:b=>{if(m.current){const{scrollTop:y}=b.target;m.current.scrollTop=y}}}),e("div",{ref:m,class:"compose-highlight","aria-hidden":"true"})]})});function pr({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 fr({attachment:t,disabled:n,lang:a,onDescriptionChange:s=()=>{},onRemove:o=()=>{}}){const[r,c]=Z("default"),u=Ca("@mastodon/edit-media-attributes"),{type:d,id:f,file:h}=t,p=$e(()=>h?URL.createObjectURL(h):t.url,[h,t.url]),[m,g]=Z(t.description),[_,b]=d.split("/"),y=Io(s,250),[v,E]=Z(!1),L=Q(null);fe(()=>{let I;return v&&L.current&&(I=setTimeout(()=>{L.current.focus()},100)),()=>{clearTimeout(I)}},[v]);const S=e(W,{children:f&&!u?e("div",{class:"media-desc",children:[e("span",{class:"tag",children:"Uploaded"}),e("p",{title:m,children:t.description||e("i",{children:"No description"})})]}):e("textarea",{ref:L,value:m||"",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:I=>{const{value:C}=I.target;g(C),y(C)}})}),w=Q(null);return fe(()=>()=>{var I,C;(C=(I=w.current)==null?void 0:I.hideToast)==null||C.call(I)},[]),e(W,{children:[e("div",{class:"media-attachment",children:[e("div",{class:"media-preview",tabIndex:"0",onClick:()=>{E(!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:I=>{I.target===I.currentTarget&&E(!1)},children:e("div",{id:"media-sheet",class:"sheet sheet-max",children:[e("button",{type:"button",class:"sheet-close",onClick:()=>{E(!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(gn,{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 I,C;try{const N=new FormData;N.append("image",h);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=(I=w.current)==null?void 0:I.hideToast)==null||C.call(I)}}()},children:[e(T,{icon:"sparkles2"}),e("span",{children:"Generate description…"})]})}),e("button",{type:"button",class:"light block",onClick:()=>{E(!1)},disabled:r==="loading",children:"Done"})]})]})]})]})})]})}function gr({lang:t,poll:n,disabled:a,onInput:s=()=>{},maxOptions:o,maxExpiration:r,minExpiration:c,maxCharactersPerOption:u}){const{options:d,expiresIn:f,multiple:h}=n;return e("div",{class:`poll ${h?"multiple":""}`,children:[e("div",{class:"poll-choices",children:d.map((p,m)=>e("div",{class:"poll-choice",children:[e("input",{required:!0,type:"text",value:p,disabled:a,maxlength:u,placeholder:`Choice ${m+1}`,lang:t,spellCheck:"true",dir:"auto",onInput:g=>{const{value:_}=g.target;d[m]=_,s(n)}}),e("button",{type:"button",class:"plain2 poll-button",disabled:a||d.length<=1,onClick:()=>{d.splice(m,1),s(n)},children:e(T,{icon:"x",size:"s"})})]},m))}),e("div",{class:"poll-toolbar",children:[e("button",{type:"button",class:"plain2 poll-button",disabled:a||d.length>=o,onClick:()=>{d.push(""),s(n)},children:"+"})," ",e("label",{class:"multiple-choices",children:[e("input",{type:"checkbox",checked:h,disabled:a,onChange:p=>{const{checked:m}=p.target;n.multiple=m,s(n)}})," ","Multiple choices"]}),e("label",{class:"expires-in",children:["Duration"," ",e("select",{value:f,disabled:a,onChange:p=>{const{value:m}=p.target;n.expiresIn=m,s(n)},children:Object.entries(Pa).filter(([p,m])=>m>=c&&m<=r).map(([p,m])=>e("option",{value:m,children:p},m))})]})]}),e("div",{class:"poll-toolbar",children:e("button",{type:"button",class:"plain remove-poll-button",disabled:a,onClick:()=>{s(null)},children:"Remove poll"})})]})}function vr(t,n){return n=n.toLowerCase(),t.sort((a,s)=>{let o=a.shortcode.toLowerCase(),r=s.shortcode.toLowerCase(),c=o.startsWith(n),u=r.startsWith(n),d=o.includes(n),f=r.includes(n);return c&&u?a.length-s.length:c?-1:u?1:d&&f?a.length-s.length:d?-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 br({masto:t,instance:n,onClose:a=()=>{},onSelect:s=()=>{}}){const[o,r]=Z("default"),c=Q([]),[u,d]=Z({}),f=$e(()=>O.account.get("recentlyUsedCustomEmojis")||[]);return fe(()=>{r("loading"),(async()=>{try{const h=await t.v1.customEmojis.list(),p={"--recent--":f.filter(g=>h.find(_=>_.shortcode===g.shortcode))},m=[];h.forEach(g=>{var _,b;if(g.visibleInPicker){if((b=(_=c.current)==null?void 0:_.push)==null||b.call(_,g),!g.category){m.push(g);return}p[g.category]||(p[g.category]=[]),p[g.category].push(g)}}),m.length&&(p["--others--"]=m),d(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(u).map(([h,p])=>!!(p!=null&&p.length)&&e(W,{children:[e("div",{class:"section-header",children:{"--recent--":"Recently used","--others--":"Others"}[h]||h}),e("section",{children:p.map(m=>e("button",{type:"button",class:"plain4",onClick:()=>{a(),requestAnimationFrame(()=>{s(`:${m.shortcode}:`)});let g=O.account.get("recentlyUsedCustomEmojis")||[];const _=g.findIndex(b=>b.shortcode===m.shortcode);_!==-1?(g.splice(_,1),g.unshift(m)):(g.unshift(m),g=g.filter(b=>{var y,v;return(v=(y=c.current)==null?void 0:y.find)==null?void 0:v.call(y,E=>E.shortcode===b.shortcode)}),g=g.slice(0,10)),O.account.set("recentlyUsedCustomEmojis",g)},title:`:${m.shortcode}:`,children:e("picture",{children:[!!m.staticUrl&&e("source",{srcset:m.staticUrl,media:"(prefers-reduced-motion: reduce)"}),e("img",{class:"shortcode-emoji",src:m.url||m.staticUrl,alt:m.shortcode,width:"16",height:"16",loading:"lazy",decoding:"async"})]})},m))})]}))]})})]})}var yr={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}=yr;function Sr(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(u=>jn(u,s)):n&&(c=jn(n,s)),c&&(document.title=t?`${t} / ${sa}`:sa)}mn(()=>{const s=la(M,"currentLocation",a);return a(),s},[t,n])}export{ka as $,Qe as A,ht as B,Zn as C,Bi as D,vt as E,Xn as F,Fr as G,Pt as H,T as I,Po 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,Ci as T,Cr as U,Mi as V,Sr as W,ya as X,ga as Y,Ho as Z,ln as _,Ke as a,Ne as a0,xr as a1,Tr as a2,Ar as a3,Lr as a4,De as b,Ae as c,O as d,gn as e,tn as f,Ot as g,La as h,Ca as i,_i as j,fi as k,nn as l,Aa as m,He as n,_a as o,zt as p,Mt as q,Er as r,M as s,ri as t,Wo as u,Bt as v,bn as w,Jn as x,$t as y,Dt as z};
//# sourceMappingURL=useTitle-qcvAjFcD.js.map
function __vite__mapDeps(indexes) {
if (!__vite__mapDeps.viteFileDeps) {
__vite__mapDeps.viteFileDeps = []
}
return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
}