import{ao as Jt,W as xt,e as r,d as V,q as Et,A as N,_ as $e,y as Q,I as Xi,ap as Na,l as lt,S as ke,h as kr,aq as Fa,ar as io,as as za,at as Qi,V as Ji,k as F,M as rn,$ as Bt,G as so,E as Dt,s as H,a8 as A,au as Ba,x as Va,n as Ha,av as ja,u as Yt,a as An,H as Ka,aw as Ua,ax as Wa,T as R,g as Cr,ay as ts,az as Za,aA as es,p as po,z as ns,aB as qa,aC as Ot,aD as Ga,aE as Ya,aF as Hn,P as ce,c as Ln,aG as Xa,aH as Qa,a0 as os,aI as rs,t as Ja,b as we,aJ as tc}from"./useTitle-Ck4QBWzz.js";const is=["shift","alt","meta","mod","ctrl","control"],ec={esc:"escape",return:"enter",left:"arrowleft",right:"arrowright",up:"arrowup",down:"arrowdown",ShiftLeft:"shift",ShiftRight:"shift",AltLeft:"alt",AltRight:"alt",MetaLeft:"meta",MetaRight:"meta",OSLeft:"meta",OSRight:"meta",ControlLeft:"ctrl",ControlRight:"ctrl"};function Ae(t){return(ec[t.trim()]||t.trim()).toLowerCase().replace(/key|digit|numpad/,"")}function ss(t){return is.includes(t)}function Io(t,e=","){return t.toLowerCase().split(e)}function Lo(t,e="+",n=">",o=!1,i){let a=[],s=!1;t.includes(n)?(s=!0,a=t.toLocaleLowerCase().split(n).map(d=>Ae(d))):a=t.toLocaleLowerCase().split(e).map(d=>Ae(d));const c={alt:a.includes("alt"),ctrl:a.includes("ctrl")||a.includes("control"),shift:a.includes("shift"),meta:a.includes("meta"),mod:a.includes("mod"),useKey:o},l=a.filter(d=>!is.includes(d));return{...c,keys:l,description:i,isSequence:s}}typeof document<"u"&&(document.addEventListener("keydown",t=>{t.code!==void 0&&as([Ae(t.code)])}),document.addEventListener("keyup",t=>{t.code!==void 0&&cs([Ae(t.code)])})),typeof window<"u"&&(window.addEventListener("blur",()=>{he.clear()}),window.addEventListener("contextmenu",()=>{setTimeout(()=>{he.clear()},0)}));const he=new Set;function Sr(t){return Array.isArray(t)}function nc(t,e=","){return(Sr(t)?t:t.split(e)).every(n=>he.has(n.trim().toLowerCase()))}function as(t){const e=Array.isArray(t)?t:[t];he.has("meta")&&he.forEach(n=>!ss(n)&&he.delete(n.toLowerCase())),e.forEach(n=>he.add(n.toLowerCase()))}function cs(t){const e=Array.isArray(t)?t:[t];t==="meta"?he.clear():e.forEach(n=>he.delete(n.toLowerCase()))}function oc(t,e,n){(typeof n=="function"&&n(t,e)||n===!0)&&t.preventDefault()}function rc(t,e,n){return typeof n=="function"?n(t,e):n===!0||n===void 0}function ic(t){return ls(t,["input","textarea","select"])}function ls(t,e=!1){const{target:n,composed:o}=t;let i;return sc(n)&&o?i=t.composedPath()[0]&&t.composedPath()[0].tagName:i=n&&n.tagName,Sr(e)?!!(i&&e&&e.some(a=>a.toLowerCase()===i.toLowerCase())):!!(i&&e&&e)}function sc(t){return!!t.tagName&&!t.tagName.startsWith("-")&&t.tagName.includes("-")}function ac(t,e){return t.length===0&&e?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a '),!0):e?t.some(n=>e.includes(n))||t.includes("*"):!0}const cc=(t,e,n=!1)=>{const{alt:o,meta:i,mod:a,shift:s,ctrl:c,keys:l,useKey:d}=e,{code:h,key:u,ctrlKey:f,metaKey:m,shiftKey:p,altKey:g}=t,v=Ae(h);if(d&&l?.length===1&&l.includes(u))return!0;if(!(l!=null&&l.includes(v))&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(v))return!1;if(!n){if(o!==g&&v!=="alt"||s!==p&&v!=="shift")return!1;if(a){if(!m&&!f)return!1}else if(i!==m&&v!=="meta"&&v!=="os"||c!==f&&v!=="ctrl"&&v!=="control")return!1}return l&&l.length===1&&l.includes(v)?!0:l?nc(l):!l},lc=Jt(void 0),uc=()=>xt(lc);function us(t,e){return t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(t).length===Object.keys(e).length&&Object.keys(t).reduce((n,o)=>n&&us(t[o],e[o]),!0):t===e}const dc=Jt({hotkeys:[],activeScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),hc=()=>xt(dc);function fc(t){const e=N(void 0);return us(e.current,t)||(e.current=t),e.current}const ii=t=>{t.stopPropagation(),t.preventDefault(),t.stopImmediatePropagation()},mc=typeof window<"u"?$e:Q;function Ge(t,e,n,o){const i=N(null),a=N(!1),s=n instanceof Array?o instanceof Array?void 0:o:n,c=Sr(t)?t.join(s?.delimiter):t,l=n instanceof Array?n:o instanceof Array?o:void 0,d=Et(e,l??[]),h=N(d);l?h.current=d:h.current=e;const u=fc(s),{activeScopes:f}=hc(),m=uc();return mc(()=>{if(u?.enabled===!1||!ac(f,u?.scopes))return;let p=[],g;const v=(T,y=!1)=>{var S;if(!(ic(T)&&!ls(T,u?.enableOnFormTags))){if(i.current!==null){const b=i.current.getRootNode();if((b instanceof Document||b instanceof ShadowRoot)&&b.activeElement!==i.current&&!i.current.contains(b.activeElement)){ii(T);return}}(S=T.target)!=null&&S.isContentEditable&&!(u!=null&&u.enableOnContentEditable)||Io(c,u?.delimiter).forEach(b=>{var x,P,D,C;if(b.includes(u?.splitKey??"+")&&b.includes(u?.sequenceSplitKey??">")){console.warn(`Hotkey ${b} contains both ${u?.splitKey??"+"} and ${u?.sequenceSplitKey??">"} which is not supported.`);return}const L=Lo(b,u?.splitKey,u?.sequenceSplitKey,u?.useKey,u?.description);if(L.isSequence){g=setTimeout(()=>{p=[]},u?.sequenceTimeoutMs??1e3);const O=L.useKey?T.key:Ae(T.code);if(ss(O.toLowerCase()))return;p.push(O);const I=(x=L.keys)==null?void 0:x[p.length-1];if(O!==I){p=[],g&&clearTimeout(g);return}p.length===((P=L.keys)==null?void 0:P.length)&&(h.current(T,L),g&&clearTimeout(g),p=[])}else if(cc(T,L,u?.ignoreModifiers)||(D=L.keys)!=null&&D.includes("*")){if((C=u?.ignoreEventWhen)!=null&&C.call(u,T)||y&&a.current)return;if(oc(T,L,u?.preventDefault),!rc(T,L,u?.enabled)){ii(T);return}h.current(T,L),y||(a.current=!0)}})}},E=T=>{T.code!==void 0&&(as(Ae(T.code)),(u?.keydown===void 0&&u?.keyup!==!0||u!=null&&u.keydown)&&v(T))},w=T=>{T.code!==void 0&&(cs(Ae(T.code)),a.current=!1,u!=null&&u.keyup&&v(T,!0))},k=i.current||s?.document||document;return k.addEventListener("keyup",w,s?.eventListenerOptions),k.addEventListener("keydown",E,s?.eventListenerOptions),m&&Io(c,u?.delimiter).forEach(T=>m.addHotkey(Lo(T,u?.splitKey,u?.sequenceSplitKey,u?.useKey,u?.description))),()=>{k.removeEventListener("keyup",w,s?.eventListenerOptions),k.removeEventListener("keydown",E,s?.eventListenerOptions),m&&Io(c,u?.delimiter).forEach(T=>m.removeHotkey(Lo(T,u?.splitKey,u?.sequenceSplitKey,u?.useKey,u?.description))),p=[],g&&clearTimeout(g)}},[c,u,f]),i}var eo={exports:{}};/*!
* Toastify js 1.12.0
* https://github.com/apvarun/toastify-js
* @license MIT licensed
*
* Copyright (C) 2018 Varun A P
*/var pc=eo.exports,si;function gc(){return si||(si=1,function(t){(function(e,n){t.exports?t.exports=n():e.Toastify=n()})(pc,function(e){var n=function(s){return new n.lib.init(s)},o="1.12.0";n.defaults={oldestFirst:!0,text:"Toastify is awesome!",node:void 0,duration:3e3,selector:void 0,callback:function(){},destination:void 0,newWindow:!1,close:!1,gravity:"toastify-top",positionLeft:!1,position:"",backgroundColor:"",avatar:"",className:"",stopOnFocus:!0,onClick:function(){},offset:{x:0,y:0},escapeMarkup:!0,ariaLive:"polite",style:{background:""}},n.lib=n.prototype={toastify:o,constructor:n,init:function(s){return s||(s={}),this.options={},this.toastElement=null,this.options.text=s.text||n.defaults.text,this.options.node=s.node||n.defaults.node,this.options.duration=s.duration===0?0:s.duration||n.defaults.duration,this.options.selector=s.selector||n.defaults.selector,this.options.callback=s.callback||n.defaults.callback,this.options.destination=s.destination||n.defaults.destination,this.options.newWindow=s.newWindow||n.defaults.newWindow,this.options.close=s.close||n.defaults.close,this.options.gravity=s.gravity==="bottom"?"toastify-bottom":n.defaults.gravity,this.options.positionLeft=s.positionLeft||n.defaults.positionLeft,this.options.position=s.position||n.defaults.position,this.options.backgroundColor=s.backgroundColor||n.defaults.backgroundColor,this.options.avatar=s.avatar||n.defaults.avatar,this.options.className=s.className||n.defaults.className,this.options.stopOnFocus=s.stopOnFocus===void 0?n.defaults.stopOnFocus:s.stopOnFocus,this.options.onClick=s.onClick||n.defaults.onClick,this.options.offset=s.offset||n.defaults.offset,this.options.escapeMarkup=s.escapeMarkup!==void 0?s.escapeMarkup:n.defaults.escapeMarkup,this.options.ariaLive=s.ariaLive||n.defaults.ariaLive,this.options.style=s.style||n.defaults.style,s.backgroundColor&&(this.options.style.background=s.backgroundColor),this},buildToast:function(){if(!this.options)throw"Toastify is not initialized";var s=document.createElement("div");s.className="toastify on "+this.options.className,this.options.position?s.className+=" toastify-"+this.options.position:this.options.positionLeft===!0?(s.className+=" toastify-left",console.warn("Property `positionLeft` will be depreciated in further versions. Please use `position` instead.")):s.className+=" toastify-right",s.className+=" "+this.options.gravity,this.options.backgroundColor&&console.warn('DEPRECATION NOTICE: "backgroundColor" is being deprecated. Please use the "style.background" property.');for(var c in this.options.style)s.style[c]=this.options.style[c];if(this.options.ariaLive&&s.setAttribute("aria-live",this.options.ariaLive),this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE)s.appendChild(this.options.node);else if(this.options.escapeMarkup?s.innerText=this.options.text:s.innerHTML=this.options.text,this.options.avatar!==""){var l=document.createElement("img");l.src=this.options.avatar,l.className="toastify-avatar",this.options.position=="left"||this.options.positionLeft===!0?s.appendChild(l):s.insertAdjacentElement("afterbegin",l)}if(this.options.close===!0){var d=document.createElement("button");d.type="button",d.setAttribute("aria-label","Close"),d.className="toast-close",d.innerHTML="✖",d.addEventListener("click",(function(v){v.stopPropagation(),this.removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)}).bind(this));var h=window.innerWidth>0?window.innerWidth:screen.width;(this.options.position=="left"||this.options.positionLeft===!0)&&h>360?s.insertAdjacentElement("afterbegin",d):s.appendChild(d)}if(this.options.stopOnFocus&&this.options.duration>0){var u=this;s.addEventListener("mouseover",function(v){window.clearTimeout(s.timeOutValue)}),s.addEventListener("mouseleave",function(){s.timeOutValue=window.setTimeout(function(){u.removeElement(s)},u.options.duration)})}if(typeof this.options.destination<"u"&&s.addEventListener("click",(function(v){v.stopPropagation(),this.options.newWindow===!0?window.open(this.options.destination,"_blank"):window.location=this.options.destination}).bind(this)),typeof this.options.onClick=="function"&&typeof this.options.destination>"u"&&s.addEventListener("click",(function(v){v.stopPropagation(),this.options.onClick()}).bind(this)),typeof this.options.offset=="object"){var f=i("x",this.options),m=i("y",this.options),p=this.options.position=="left"?f:"-"+f,g=this.options.gravity=="toastify-top"?m:"-"+m;s.style.transform="translate("+p+","+g+")"}return s},showToast:function(){this.toastElement=this.buildToast();var s;if(typeof this.options.selector=="string"?s=document.getElementById(this.options.selector):this.options.selector instanceof HTMLElement||typeof ShadowRoot<"u"&&this.options.selector instanceof ShadowRoot?s=this.options.selector:s=document.body,!s)throw"Root element is not defined";var c=n.defaults.oldestFirst?s.firstChild:s.lastChild;return s.insertBefore(this.toastElement,c),n.reposition(),this.options.duration>0&&(this.toastElement.timeOutValue=window.setTimeout((function(){this.removeElement(this.toastElement)}).bind(this),this.options.duration)),this},hideToast:function(){this.toastElement.timeOutValue&&clearTimeout(this.toastElement.timeOutValue),this.removeElement(this.toastElement)},removeElement:function(s){s.className=s.className.replace(" on",""),window.setTimeout((function(){this.options.node&&this.options.node.parentNode&&this.options.node.parentNode.removeChild(this.options.node),s.parentNode&&s.parentNode.removeChild(s),this.options.callback.call(s),n.reposition()}).bind(this),400)}},n.reposition=function(){for(var s={top:15,bottom:15},c={top:15,bottom:15},l={top:15,bottom:15},d=document.getElementsByClassName("toastify"),h,u=0;u0?window.innerWidth:screen.width;p<=360?(d[u].style[h]=l[h]+"px",l[h]+=f+m):a(d[u],"toastify-left")===!0?(d[u].style[h]=s[h]+"px",s[h]+=f+m):(d[u].style[h]=c[h]+"px",c[h]+=f+m)}return this};function i(s,c){return c.offset[s]?isNaN(c.offset[s])?c.offset[s]:c.offset[s]+"px":"0px"}function a(s,c){return!s||typeof c!="string"?!1:!!(s.className&&s.className.trim().split(/\s+/gi).indexOf(c)>-1)}return n.lib.init.prototype=n.lib,n})}(eo)),eo.exports}var vc=gc();const _c=Xi(vc);window._showToast=kt;function kt(t){typeof t=="string"&&(t={text:t});const{onClick:e,delay:n,...o}=t,i=_c({className:`${e||t.destination?"shiny-pill":""}`,gravity:"bottom",position:"center",...o,onClick:()=>{e?.(i)}});return n?setTimeout(()=>{i.showToast()},n):i.showToast(),i}function Mv(t,e,n,o){const i=N(t);Q(()=>{i.current=t},[t,n]),Q(()=>{!o||e===null||e===!1||i.current()},[o]),Q(()=>{if(e===null||e===!1)return;const s=setInterval(()=>i.current(),e);return()=>clearInterval(s)},[e])}const xr=t=>!!t&&t[0]==="o",er=Na,kn=(t,e)=>t===!0||!!(t&&t[e]),Ht=(t,e)=>typeof t=="function"?t(e):t,yc="_szhsinMenu",bc=t=>t[yc];const sn=(t,e)=>(e&&Object.keys(e).forEach(n=>{const o=t[n],i=e[n];typeof i=="function"&&o?t[n]=(...a)=>{i(...a),o(...a)}:t[n]=i}),t),wc=t=>{if(typeof t!="string")return{top:0,right:0,bottom:0,left:0};const e=t.trim().split(/\s+/,4).map(parseFloat),n=isNaN(e[0])?0:e[0],o=isNaN(e[1])?n:e[1];return{top:n,right:o,bottom:isNaN(e[2])?n:e[2],left:isNaN(e[3])?o:e[3]}},Do=t=>{for(;t;){if(t=t.parentNode,!t||t===document.body||!t.parentNode)return;const{overflow:e,overflowX:n,overflowY:o}=getComputedStyle(t);if(/auto|scroll|overlay|hidden/.test(e+o+n))return t}};function go(t,e){return{"aria-disabled":t||void 0,tabIndex:e?0:-1}}function ai(t,e){for(let n=0;nlt(()=>{const i=e?`${t}__${e}`:t;let a=i;n&&Object.keys(n).forEach(c=>{const l=n[c];l&&(a+=` ${i}--${l===!0?c:`${c}-${l}`}`)});let s=typeof o=="function"?o(n):o;return typeof s=="string"&&(s=s.trim(),s&&(a+=` ${s}`)),a},[t,e,n,o]),Ec="szh-menu-container",le="szh-menu";const Tc="arrow",Ir="item",Ac="divider",kc="header",Cc="group",Sc="submenu";const ds=Jt(),Lr=Jt({}),ao=Jt({}),Dr=Jt({}),xc=Jt({}),vo=Jt({}),$t=Object.freeze({ENTER:"Enter",ESC:"Escape",SPACE:" ",HOME:"Home",END:"End",LEFT:"ArrowLeft",RIGHT:"ArrowRight",UP:"ArrowUp",DOWN:"ArrowDown"}),wt=Object.freeze({RESET:0,SET:1,UNSET:2,INCREASE:3,DECREASE:4,FIRST:5,LAST:6,SET_INDEX:7}),Cn=Object.freeze({CLICK:"click",CANCEL:"cancel",BLUR:"blur",SCROLL:"scroll"}),Ye=Object.freeze({FIRST:"first",LAST:"last"}),Ic=Object.freeze({entering:"opening",entered:"open",exiting:"closing",exited:"closed"}),ci="absolute",Mr="none",Pr="menuitem",nr={preventScroll:!0};const Lc=({className:t,containerRef:e,containerProps:n,children:o,isOpen:i,theming:a,transition:s,onClose:c})=>{const l=kn(s,"item");return r("div",{...sn({onKeyDown:({key:u})=>{switch(u){case $t.ESC:Ht(c,{key:u,reason:Cn.CANCEL});break}},onBlur:u=>{i&&!u.currentTarget.contains(u.relatedTarget)&&Ht(c,{reason:Cn.BLUR})}},n),className:ue({block:Ec,modifiers:lt(()=>({theme:a,itemTransition:l}),[a,l]),className:t}),style:{position:"absolute",...n?.style},ref:e,children:o})},Dc=()=>{let t,e=0;return{toggle:n=>{n?e++:e--,e=Math.max(e,0)},on:(n,o,i)=>{e?t||(t=setTimeout(()=>{t=0,o()},n)):i?.()},off:()=>{t&&(clearTimeout(t),t=0)}}},Mc=t=>{const[e,n]=V(),i=N({items:[],hoverIndex:-1,sorted:!1}).current,a=Et((c,l)=>{const{items:d}=i;if(!c)i.items=[];else if(l)d.push(c);else{const h=d.indexOf(c);h>-1&&(d.splice(h,1),c.contains(document.activeElement)&&(t.current.focus(nr),n()))}i.hoverIndex=-1,i.sorted=!1},[i,t]),s=Et((c,l,d)=>{const{items:h,hoverIndex:u}=i,f=()=>{if(i.sorted)return;const g=t.current.querySelectorAll(".szh-menu__item");h.sort((v,E)=>ai(g,v)-ai(g,E)),i.sorted=!0};let m=-1,p;switch(c){case wt.RESET:break;case wt.SET:p=l;break;case wt.UNSET:p=g=>g===l?void 0:g;break;case wt.FIRST:f(),m=0,p=h[m];break;case wt.LAST:f(),m=h.length-1,p=h[m];break;case wt.SET_INDEX:f(),m=d,p=h[m];break;case wt.INCREASE:f(),m=u,m<0&&(m=h.indexOf(l)),m++,m>=h.length&&(m=0),p=h[m];break;case wt.DECREASE:f(),m=u,m<0&&(m=h.indexOf(l)),m--,m<0&&(m=h.length-1),p=h[m];break;default:}p||(m=-1),n(p),i.hoverIndex=m},[t,i]);return{hoverItem:e,dispatch:s,updateItems:a}},li=(t,e)=>Math.round(t)===e?t:e,hs=t=>{const e=t.getBoundingClientRect();return e.width=li(e.width,t.offsetWidth),e.height=li(e.height,t.offsetHeight),e},Pc=(t,e,n,o)=>{const i=hs(e),a=t.getBoundingClientRect(),s=n===window?{left:0,top:0,right:document.documentElement.clientWidth,bottom:window.innerHeight}:n.getBoundingClientRect(),c=wc(o),l=p=>p+a.left-s.left-c.left,d=p=>p+a.left+i.width-s.right+c.right,h=p=>p+a.top-s.top-c.top,u=p=>p+a.top+i.height-s.bottom+c.bottom;return{menuRect:i,containerRect:a,getLeftOverflow:l,getRightOverflow:d,getTopOverflow:h,getBottomOverflow:u,confineHorizontally:p=>{let g=l(p);if(g<0)p-=g;else{const v=d(p);v>0&&(p-=v,g=l(p),g<0&&(p-=g))}return p},confineVertically:p=>{let g=h(p);if(g<0)p-=g;else{const v=u(p);v>0&&(p-=v,g=h(p),g<0&&(p-=g))}return p}}},Rc=({arrowRef:t,menuY:e,anchorRect:n,containerRect:o,menuRect:i})=>{let a=n.top-o.top-e+n.height/2;const s=t.current.offsetHeight*1.25;return a=Math.max(s,a),a=Math.min(a,i.height-s),a},Oc=({anchorRect:t,containerRect:e,menuRect:n,placeLeftorRightY:o,placeLeftX:i,placeRightX:a,getLeftOverflow:s,getRightOverflow:c,confineHorizontally:l,confineVertically:d,arrowRef:h,arrow:u,direction:f,position:m})=>{let p=f,g=o;m!=="initial"&&(g=d(g),m==="anchor"&&(g=Math.min(g,t.bottom-e.top),g=Math.max(g,t.top-e.top-n.height)));let v,E,w;return p==="left"?(v=i,m!=="initial"&&(E=s(v),E<0&&(w=c(a),(w<=0||-E>w)&&(v=a,p="right")))):(v=a,m!=="initial"&&(w=c(v),w>0&&(E=s(i),(E>=0||-E{let a=n.left-o.left-e+n.width/2;const s=t.current.offsetWidth*1.25;return a=Math.max(s,a),a=Math.min(a,i.width-s),a},Nc=({anchorRect:t,containerRect:e,menuRect:n,placeToporBottomX:o,placeTopY:i,placeBottomY:a,getTopOverflow:s,getBottomOverflow:c,confineHorizontally:l,confineVertically:d,arrowRef:h,arrow:u,direction:f,position:m})=>{let p=f==="top"?"top":"bottom",g=o;m!=="initial"&&(g=l(g),m==="anchor"&&(g=Math.min(g,t.right-e.left),g=Math.max(g,t.left-e.left-n.width)));let v,E,w;return p==="top"?(v=i,m!=="initial"&&(E=s(v),E<0&&(w=c(a),(w<=0||-E>w)&&(v=a,p="bottom")))):(v=a,m!=="initial"&&(w=c(v),w>0&&(E=s(i),(E>=0||-E{const{menuRect:d,containerRect:h}=l,u=n==="left"||n==="right";let f=u?o:i,m=u?i:o;if(t){const y=c.current;u?f+=y.offsetWidth:m+=y.offsetHeight}const p=s.left-h.left-d.width-f,g=s.right-h.left+f,v=s.top-h.top-d.height-m,E=s.bottom-h.top+m;let w,k;e==="end"?(w=s.right-h.left-d.width,k=s.bottom-h.top-d.height):e==="center"?(w=s.left-h.left-(d.width-s.width)/2,k=s.top-h.top-(d.height-s.height)/2):(w=s.left-h.left,k=s.top-h.top),w+=f,k+=m;const T={...l,anchorRect:s,placeLeftX:p,placeRightX:g,placeLeftorRightY:k,placeTopY:v,placeBottomY:E,placeToporBottomX:w,arrowRef:c,arrow:t,direction:n,position:a};switch(n){case"left":case"right":return Oc(T);case"top":case"bottom":default:return Nc(T)}},Xe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?$e:Q;function ui(t,e){typeof t=="function"?t(e):t.current=e}const an=(t,e)=>lt(()=>t?e?n=>{ui(t,n),ui(e,n)}:t:e,[t,e]),di=-9999,fs=({ariaLabel:t,menuClassName:e,menuStyle:n,arrow:o,arrowProps:i={},anchorPoint:a,anchorRef:s,containerRef:c,containerProps:l,externalRef:d,parentScrollingRef:h,align:u="start",direction:f="bottom",position:m="auto",overflow:p="visible",setDownOverflow:g,repositionFlag:v,captureFocus:E=!0,state:w,endTransition:k,isDisabled:T,menuItemFocus:y,gap:S=0,shift:b=0,children:x,onClose:P,focusProps:D,...C})=>{const[L,O]=V({x:di,y:di}),[I,z]=V({}),[B,bt]=V(),[G,ut]=V(f),[nt]=V(Dc),[vt,ot]=kr(X=>X+1,1),{transition:rt,boundingBoxRef:et,boundingBoxPadding:Mt,rootMenuRef:ft,rootAnchorRef:Ut,scrollNodesRef:Xt,reposition:Qt,viewScroll:U,submenuCloseDelay:Tt}=xt(vo),{submenuCtx:mt,reposSubmenu:te=v}=xt(ao),_t=N(),Wt=N(),tt=N(!1),{hoverItem:pt,dispatch:Ct,updateItems:dt}=Mc(_t),J=xr(w),gt=kn(rt,"open"),_e=kn(rt,"close"),It=Xt.current,Fe=X=>{switch(X.key){case $t.HOME:Ct(wt.FIRST);break;case $t.END:Ct(wt.LAST);break;case $t.UP:Ct(wt.DECREASE,pt);break;case $t.DOWN:Ct(wt.INCREASE,pt);break;case $t.SPACE:X.target&&X.target.className.indexOf(le)!==-1&&X.preventDefault();return;default:return}X.preventDefault(),X.stopPropagation()},j=()=>{w==="closing"&&bt(),Ht(k)},Y=X=>{X.stopPropagation(),nt.on(Tt,()=>{Ct(wt.RESET),_t.current.focus(nr)})},W=X=>{X.target===X.currentTarget&&nt.off()},q=Et(X=>{const St=_t.current,zt=c.current;if(!St||!zt)return;const Zt=s?s.current?.getBoundingClientRect():a?{left:a.x,right:a.x,top:a.y,bottom:a.y,width:0,height:0}:null;if(!Zt)return;It.menu||(It.menu=(et?et.current:Do(ft.current))||window);const Z=Pc(zt,St,It.menu,Mt);let{arrowX:ye,arrowY:Se,x:de,y:Be,computedDirection:qt}=Fc({arrow:o,align:u,direction:f,gap:S,shift:b,position:m,anchorRect:Zt,arrowRef:Wt,positionHelpers:Z});const{menuRect:xe}=Z,Gt=xe.height;if(!X&&p!=="visible"){const{getTopOverflow:Mn,getBottomOverflow:cn}=Z;let ee,Ve;const He=cn(Be);if(He>0)ee=Gt-He,Ve=He;else{const Ie=Mn(Be);Ie<0&&(ee=Gt+Ie,Ve=0-Ie,ee>=0&&(Be-=Ie))}ee>=0&&bt({height:ee,overflowAmt:Ve})}o&&z({x:ye,y:Se}),O({x:de,y:Be}),ut(qt)},[o,u,Mt,f,S,b,m,p,a,s,c,et,ft,It]);Xe(()=>{J&&(q(),tt.current&&ot()),tt.current=J},[J,q,te]),Xe(()=>{B&&!g&&(_t.current.scrollTop=0)},[B,g]),Xe(()=>dt,[dt]),Q(()=>{let{menu:X}=It;if(!J||!X)return;if(X=X.addEventListener?X:window,!It.anchors){It.anchors=[];let Z=Do(Ut&&Ut.current);for(;Z&&Z!==X;)It.anchors.push(Z),Z=Do(Z)}let St=U;if(It.anchors.length&&St==="initial"&&(St="auto"),St==="initial")return;const zt=()=>{St==="auto"?er(()=>q(!0)):Ht(P,{reason:Cn.SCROLL})},Zt=It.anchors.concat(U!=="initial"?X:[]);return Zt.forEach(Z=>Z.addEventListener("scroll",zt)),()=>Zt.forEach(Z=>Z.removeEventListener("scroll",zt))},[Ut,It,J,P,U,q]);const at=!!B&&B.overflowAmt>0;Q(()=>{if(at||!J||!h)return;const X=()=>er(q),St=h.current;return St.addEventListener("scroll",X),()=>St.removeEventListener("scroll",X)},[J,at,h,q]),Q(()=>{if(!J||typeof ResizeObserver!="function"||Qt==="initial")return;const X=[],St=new ResizeObserver(Z=>Z.forEach(({target:ye})=>{X.indexOf(ye)<0?X.push(ye):Fa(()=>{q(),ot()})})),zt={box:"border-box"};St.observe(_t.current,zt);const Zt=s?.current;return Zt&&St.observe(Zt,zt),()=>St.disconnect()},[J,Qt,s,q]),Q(()=>{if(!J){Ct(wt.RESET),_e||bt();return}const{position:X,alwaysUpdate:St}=y||{},zt=()=>{X===Ye.FIRST?Ct(wt.FIRST):X===Ye.LAST?Ct(wt.LAST):X>=-1&&Ct(wt.SET_INDEX,void 0,X)};if(St)zt();else if(E){const Zt=setTimeout(()=>{const Z=_t.current;Z&&!Z.contains(document.activeElement)&&(Z.focus(nr),zt())},gt?170:100);return()=>clearTimeout(Zt)}},[J,gt,_e,E,y,Ct]);const Pt=lt(()=>({isParentOpen:J,submenuCtx:nt,dispatch:Ct,updateItems:dt}),[J,nt,Ct,dt]);let it,Nt;B&&(g?Nt=B.overflowAmt:it=B.height);const ze=lt(()=>({reposSubmenu:vt,submenuCtx:nt,overflow:p,overflowAmt:Nt,parentMenuRef:_t,parentDir:G}),[vt,nt,p,Nt,G]),jt=it>=0?{maxHeight:it,overflow:p}:void 0,yt=lt(()=>({state:w,align:u,dir:G}),[w,u,G]),Rt=lt(()=>({dir:G}),[G]),Ft=ue({block:le,element:Tc,modifiers:Rt,className:i.className}),Lt=r("ul",{role:"menu","aria-label":t,...go(T),...sn({onPointerEnter:mt?.off,onPointerMove:Y,onPointerLeave:W,onKeyDown:Fe,onAnimationEnd:j},C),ref:an(d,_t),className:ue({block:le,modifiers:yt,className:e}),style:{...n,...jt,margin:0,display:w==="closed"?"none":void 0,position:ci,left:L.x,top:L.y},children:[o&&r("li",{"aria-hidden":!0,...i,className:Ft,style:{display:"block",position:ci,left:I.x,top:I.y,...i.style},ref:Wt}),r(ao.Provider,{value:ze,children:r(Lr.Provider,{value:Pt,children:r(ds.Provider,{value:pt,children:Ht(x,yt)})})})]});return l?r(Lc,{...l,isOpen:J,children:Lt}):Lt},ms=ke(function({"aria-label":e,className:n,containerProps:o,initialMounted:i,unmountOnClose:a,transition:s,transitionTimeout:c,boundingBoxRef:l,boundingBoxPadding:d,reposition:h="auto",submenuOpenDelay:u=300,submenuCloseDelay:f=150,viewScroll:m="initial",portal:p,theming:g,onItemClick:v,...E},w){const k=N(null),T=N({}),{anchorRef:y,state:S,onClose:b}=E,x=lt(()=>({initialMounted:i,unmountOnClose:a,transition:s,transitionTimeout:c,boundingBoxRef:l,boundingBoxPadding:d,rootMenuRef:k,rootAnchorRef:y,scrollNodesRef:T,reposition:h,viewScroll:m,submenuOpenDelay:u,submenuCloseDelay:f}),[i,a,s,c,y,l,d,h,m,u,f]),P=lt(()=>({handleClick(C,L){C.stopPropagation||Ht(v,C);let O=C.keepOpen;O===void 0&&(O=L&&C.key===$t.SPACE),O||Ht(b,{value:C.value,key:C.key,reason:Cn.CLICK})},handleClose(C){Ht(b,{key:C,reason:Cn.CLICK})}}),[v,b]);if(!S)return null;const D=r(vo.Provider,{value:x,children:r(Dr.Provider,{value:P,children:r(fs,{...E,ariaLabel:e||"Menu",externalRef:w,containerRef:k,containerProps:{className:n,containerRef:k,containerProps:o,theming:g,transition:s,onClose:b}})})});return p===!0&&typeof document<"u"?io(D,document.body):p?p.target?io(D,p.target):p.stablePosition?null:D:D}),or=0,rr=1,co=2,lo=3,uo=4,zc=5,ps=6,Bc=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],gs=t=>({_s:t,status:Bc[t],isEnter:tuo}),ir=t=>t?ps:zc,Vc=(t,e)=>{switch(t){case rr:case or:return co;case uo:case lo:return ir(e)}},Hc=t=>typeof t=="object"?[t.enter,t.exit]:[t,t],jc=(t,e)=>setTimeout(()=>{isNaN(document.body.offsetTop)||t(e+1)},0),hi=(t,e,n,o,i)=>{clearTimeout(o.current);const a=gs(t);e(a),n.current=a,i&&i({current:a})},Kc=({enter:t=!0,exit:e=!0,preEnter:n,preExit:o,timeout:i,initialEntered:a,mountOnEnter:s,unmountOnExit:c,onStateChange:l}={})=>{const[d,h]=V(()=>gs(a?co:ir(s))),u=N(d),f=N(),[m,p]=Hc(i),g=Et(()=>{const E=Vc(u.current._s,c);E&&hi(E,h,u,f,l)},[l,c]),v=Et(E=>{const w=T=>{switch(hi(T,h,u,f,l),T){case rr:m>=0&&(f.current=setTimeout(g,m));break;case uo:p>=0&&(f.current=setTimeout(g,p));break;case or:case lo:f.current=jc(w,T);break}},k=u.current.isEnter;typeof E!="boolean"&&(E=!k),E?!k&&w(t?n?or:rr:co):k&&w(e?o?lo:uo:ir(c))},[g,l,t,e,n,o,m,p,c]);return[d,v,g]};const Uc=({initialOpen:t,initialMounted:e,unmountOnClose:n,transition:o,transitionTimeout:i=500,onMenuChange:a}={})=>{const s=kn(o,"open"),c=kn(o,"close"),[{status:l},d,h]=Kc({initialEntered:t,mountOnEnter:!e,unmountOnExit:n,timeout:i,enter:s,exit:c,onStateChange:Et(({current:{isEnter:u,isResolved:f}})=>{!a||u&&s&&f||!u&&c&&f||a({open:u})},[a,s,c])});return[{state:Ic[l],endTransition:h},d]},vs=t=>{const[e,n]=Uc(t),[o,i]=V(),a=(s,c)=>{i({position:s,alwaysUpdate:c}),n(!0)};return[{menuItemFocus:o,...e},n,a]},Wc=(t,e)=>{const[n]=V({});return{onMouseDown:()=>{n.v=t&&t!=="closed"},onClick:o=>n.v?n.v=!1:e(!0,o)}},Zc=parseInt(za)<19,qc=ke(function({"aria-label":e,captureFocus:n,initialOpen:o,menuButton:i,instanceRef:a,onMenuChange:s,...c},l){const[d,h,u]=vs({...c,onMenuChange:s}),{state:f}=d,m=xr(f),p=N(null),g=Wc(f,(y,S)=>u(S.detail?void 0:Ye.FIRST)),v=Et(y=>{h(!1),y.key&&p.current.focus()},[h]),E=y=>{switch(y.key){case $t.UP:u(Ye.LAST);break;case $t.DOWN:u(Ye.FIRST);break;default:return}y.preventDefault()},w=Ht(i,{open:m});if(!w||!w.type)throw new Error("Menu requires a menuButton prop.");const k={...sn({onKeyDown:E,...g},w.props),ref:an(Zc?w.ref:w.props.ref,p)};bc(w.type)==="MenuButton"&&(k.isOpen=m);const T=Qi(w,k);return Ji(a,()=>({openMenu:u,closeMenu:()=>h(!1)})),r(F,{children:[T,r(ms,{...c,...d,"aria-label":e||(typeof w.props.children=="string"?w.props.children:"Menu"),anchorRef:p,ref:l,onClose:v})]})}),Rr=(t,e)=>{const n=rn(e),o=ke((i,a)=>{const s=N(null);return r(n,{...i,itemRef:s,externalRef:a,isHovering:xt(ds)===s.current})});return o.displayName=`WithHovering(${t})`,o},_s=t=>{const[e,n]=V(!1);return Q(()=>{!t&&n(!1)},[t]),[e,()=>!e&&n(!0),()=>n(!1)]},ys=(t,e,n)=>{Xe(()=>{if(t)return;const o=e.current;return n(o,!0),()=>{n(o)}},[t,e,n])},Gc=Rr("SubMenu",function({"aria-label":e,className:n,disabled:o,direction:i,label:a,openTrigger:s,onMenuChange:c,isHovering:l,instanceRef:d,itemRef:h,captureFocus:u,repositionFlag:f,itemProps:m={},...p}){const g=xt(vo),{rootMenuRef:v,submenuOpenDelay:E,submenuCloseDelay:w}=g,{parentMenuRef:k,parentDir:T,overflow:y}=xt(ao),{isParentOpen:S,submenuCtx:b,dispatch:x,updateItems:P}=xt(Lr),D=y!=="visible",[C,L,O]=vs({...g,onMenuChange:c}),[I,z,B]=_s(l),{state:bt}=C,G=!!o,ut=xr(bt),nt=N(null),[vt]=V({v:0}),ot=()=>{b.off(),vt.v&&(clearTimeout(vt.v),vt.v=0)},rt=(...tt)=>{ot(),et(),!G&&O(...tt)},et=()=>!l&&!G&&x(wt.SET,h.current),Mt=tt=>{et(),s||(vt.v=setTimeout(()=>er(rt),Math.max(tt,0)))},ft=tt=>{G||(tt.stopPropagation(),z(),!(vt.v||ut)&&b.on(w,()=>Mt(E-w),()=>Mt(E)))},Ut=()=>{B(),ot(),ut||x(wt.UNSET,h.current)},Xt=tt=>{if(l)switch(tt.key){case $t.ENTER:tt.preventDefault();case $t.SPACE:case $t.RIGHT:s!=="none"&&rt(Ye.FIRST)}},Qt=tt=>{let pt=!1;switch(tt.key){case $t.LEFT:ut&&(h.current.focus(),L(!1),pt=!0);break;case $t.RIGHT:ut||(pt=!0);break}pt&&(tt.preventDefault(),tt.stopPropagation())};ys(G,h,P),Q(()=>b.toggle(ut),[b,ut]),Q(()=>()=>{clearTimeout(vt.v),b.toggle(!1)},[vt,b]),Q(()=>{l&&S?h.current.focus():L(!1)},[l,S,L,h]),Ji(d,()=>({openMenu:(...tt)=>{S&&rt(...tt)},closeMenu:()=>{ut&&(h.current.focus(),L(!1))}}));const U=lt(()=>({open:ut,hover:I||l,disabled:G,submenu:!0}),[ut,l,G,I]),{ref:Tt,className:mt,...te}=m,_t=sn({onPointerEnter:b.off,onPointerMove:ft,onPointerLeave:Ut,onKeyDown:Xt,onClick:()=>s!=="none"&&rt()},te),Wt=()=>{const tt=r(fs,{...p,...C,ariaLabel:e||(typeof a=="string"?a:"Submenu"),anchorRef:h,containerRef:D?v:nt,direction:i||(T==="right"||T==="left"?T:"right"),parentScrollingRef:D&&k,isDisabled:G}),pt=v.current;return D&&pt?io(tt,pt):tt};return r("li",{className:ue({block:le,element:Sc,className:n}),style:{position:"relative"},role:Mr,ref:nt,onKeyDown:Qt,children:[r("div",{role:Pr,"aria-haspopup":!0,"aria-expanded":ut,...go(G,l),..._t,ref:an(Tt,h),className:ue({block:le,element:Ir,modifiers:U,className:mt}),children:lt(()=>Ht(a,U),[a,U])}),bt&&Wt()]})}),bs=(t,e,n,o)=>{const[i,a,s]=_s(n),{submenuCloseDelay:c}=xt(vo),{isParentOpen:l,submenuCtx:d,dispatch:h,updateItems:u}=xt(Lr),f=()=>{!n&&!o&&h(wt.SET,t.current)},m=()=>{!o&&h(wt.UNSET,t.current)},p=E=>{n&&!E.currentTarget.contains(E.relatedTarget)&&m()},g=E=>{o||(E.stopPropagation(),a(),d.on(c,f,f))},v=(E,w)=>{s(),d.off(),!w&&m()};return ys(o,t,u),Q(()=>{n&&l&&e.current&&e.current.focus()},[e,n,l]),{mouseOver:i,setHover:f,onBlur:p,onPointerMove:g,onPointerLeave:v}},At=Rr("MenuItem",function({className:e,value:n,href:o,type:i,checked:a,disabled:s,children:c,onClick:l,isHovering:d,itemRef:h,externalRef:u,...f}){const m=!!s,{mouseOver:p,setHover:g,...v}=bs(h,h,d,m),E=xt(Dr),w=xt(xc),k=i==="radio",T=i==="checkbox",y=!!o&&!m&&!k&&!T,S=k?w.value===n:T?!!a:!1,b=L=>{if(m){L.stopPropagation(),L.preventDefault();return}const O={value:n,syntheticEvent:L};L.key!==void 0&&(O.key=L.key),T&&(O.checked=!S),k&&(O.name=w.name),Ht(l,O),k&&Ht(w.onRadioChange,O),E.handleClick(O,T||k)},x=L=>{if(d)switch(L.key){case $t.ENTER:L.preventDefault();case $t.SPACE:y?h.current.click():b(L)}},P=lt(()=>({type:i,disabled:m,hover:p||d,checked:S,anchor:y}),[i,m,p,d,S,y]),D=sn({...v,onPointerDown:g,onKeyDown:x,onClick:b},f),C={role:k?"menuitemradio":T?"menuitemcheckbox":Pr,"aria-checked":k||T?S:void 0,...go(m,d),...D,ref:an(u,h),className:ue({block:le,element:Ir,modifiers:P,className:e}),children:lt(()=>Ht(c,P),[c,P])};return y?r("li",{role:Mr,children:r("a",{href:o,...C})}):r("li",{...C})}),Yc=Rr("FocusableItem",function({className:e,disabled:n,children:o,isHovering:i,itemRef:a,externalRef:s,...c}){const l=!!n,d=N(null),{mouseOver:h,setHover:u,onPointerLeave:f,...m}=bs(a,d,i,l),{handleClose:p}=xt(Dr),g=lt(()=>({disabled:l,hover:h||i,focusable:!0}),[l,i,h]),v=lt(()=>Ht(o,{...g,ref:d,closeMenu:p}),[o,g,p]),E=sn({...m,onPointerLeave:w=>f(w,!0),onFocus:u},c);return r("li",{role:Pr,...go(l),...E,ref:an(s,a),className:ue({block:le,element:Ir,modifiers:g,className:e}),children:v})}),hn=rn(ke(function({className:e,...n},o){return r("li",{role:"separator",...n,ref:o,className:ue({block:le,element:Ac,className:e})})})),Pv=rn(ke(function({className:e,...n},o){return r("li",{role:Mr,...n,ref:o,className:ue({block:le,element:kc,className:e})})})),Rv=ke(function({className:e,style:n,takeOverflow:o,...i},a){const s=N(null),[c,l]=V(),{overflow:d,overflowAmt:h}=xt(ao);return Xe(()=>{let u;o&&h>=0&&(u=hs(s.current).height-h,u<0&&(u=0)),l(u>=0?{maxHeight:u,overflow:d}:void 0)},[o,d,h]),Xe(()=>{c&&(s.current.scrollTop=0)},[c]),r("div",{...i,ref:an(a,s),className:ue({block:le,element:Cc,className:e}),style:{...n,...c}})});var vn=(t=>(t.Mouse="mouse",t.Touch="touch",t.Pointer="pointer",t))(vn||{}),_n=(t=>(t.CancelledByMovement="cancelled-by-movement",t.CancelledByRelease="cancelled-by-release",t.CancelledOutsideElement="cancelled-outside-element",t))(_n||{});const Xc=["mousedown","mousemove","mouseup","mouseleave","mouseout"],Qc=["touchstart","touchmove","touchend","touchcancel"],Jc=["pointerdown","pointermove","pointerup","pointerleave","pointerout"];function tl(t){return typeof t=="object"&&t!==null&&"pageX"in t&&typeof t.pageX=="number"&&"pageY"in t&&typeof t.pageY=="number"}function el(t){var e;return Xc.includes((e=t?.nativeEvent)==null?void 0:e.type)}function ws(t){var e;return Qc.includes((e=t?.nativeEvent)==null?void 0:e.type)||"touches"in t}function nl(t){const{nativeEvent:e}=t;return e?Jc.includes(e?.type)||"pointerId"in e:!1}function Mo(t){return el(t)||ws(t)||nl(t)}function fi(t){var e;const n=ws(t)?(e=t?.touches)==null?void 0:e[0]:t;return tl(n)?{x:n.pageX,y:n.pageY}:null}function ol(t){return{target:t.target,currentTarget:t.currentTarget,nativeEvent:t,persist:()=>{}}}function Es(t,{threshold:e=400,captureEvent:n=!1,detect:o=vn.Pointer,cancelOnMovement:i=!1,cancelOutsideElement:a=!0,filterEvents:s,onStart:c,onMove:l,onFinish:d,onCancel:h}={}){const u=N(!1),f=N(!1),m=N(),p=N(),g=N(t),v=N(null),E=Et(y=>S=>{f.current||Mo(S)&&(s!==void 0&&!s(S)||(n&&S.persist(),c?.(S,{context:y}),v.current=fi(S),f.current=!0,m.current=S.currentTarget,p.current=setTimeout(()=>{g.current&&(g.current(S,{context:y}),u.current=!0)},e)))},[n,s,c,e]),w=Et(y=>(S,b)=>{Mo(S)&&f.current&&(v.current=null,n&&S.persist(),u.current?d?.(S,{context:y}):f.current&&h?.(S,{context:y,reason:b??_n.CancelledByRelease}),u.current=!1,f.current=!1,p.current!==void 0&&clearTimeout(p.current))},[n,d,h]),k=Et(y=>S=>{if(Mo(S)&&(l?.(S,{context:y}),i!==!1&&v.current)){const b=fi(S);if(b){const x=i===!0?25:i,P={x:Math.abs(b.x-v.current.x),y:Math.abs(b.y-v.current.y)};(P.x>x||P.y>x)&&w(y)(S,_n.CancelledByMovement)}}},[w,i,l]),T=Et(y=>{if(t===null)return{};switch(o){case vn.Mouse:{const S={onMouseDown:E(y),onMouseMove:k(y),onMouseUp:w(y)};return a&&(S.onMouseLeave=b=>{w(y)(b,_n.CancelledOutsideElement)}),S}case vn.Touch:return{onTouchStart:E(y),onTouchMove:k(y),onTouchEnd:w(y)};case vn.Pointer:{const S={onPointerDown:E(y),onPointerMove:k(y),onPointerUp:w(y)};return a&&(S.onPointerLeave=b=>w(y)(b,_n.CancelledOutsideElement)),S}}},[t,w,a,o,k,E]);return Q(()=>{function y(S){const b=ol(S);w()(b)}return window.addEventListener("mouseup",y),window.addEventListener("touchend",y),window.addEventListener("pointerup",y),()=>{window.removeEventListener("mouseup",y),window.removeEventListener("touchend",y),window.removeEventListener("pointerup",y)}},[w]),Q(()=>()=>{p.current!==void 0&&clearTimeout(p.current)},[]),Q(()=>{g.current=t},[t]),T}function rl(){const t=[...navigator.languages];try{const e=new Intl.DateTimeFormat().resolvedOptions().locale;t.includes(e)||t.unshift(e)}catch{}return t}let mi=rl();const Po=Bt((t,e={})=>{try{return new Intl.Locale(t,e)}catch{if(!t)return null;const[n,...o]=t.split("-",4),i=o.pop()||null,a={language:n,region:i,...e,toString:()=>{const s=a.language,c=o.length>0?`-${o.join("-")}-`:"-",l=a.region;return l?`${s}${c}${l}`:s}};return a}}),il=(t,e)=>{const n=e,o=Po(t);let i=null;for(const c of mi){const l=Po(c)?.region;if(l){i=l;break}}const a=i&&o&&o.region!==i?Po(o.language,{...o,region:i})?.toString():null,s=so([a,t,t?.replace(/-[a-z]+$/i,"")],mi,t);try{return new Intl.DateTimeFormat(s,n)}catch{return new Intl.DateTimeFormat(void 0,n)}},sr=Bt(il);function Sn(t,e){t instanceof Date||(t=new Date(t));const{hideTime:n,formatOpts:o,forceOpts:i}=e||{},a=new Date().getFullYear(),s=i||{year:t.getFullYear()===a?void 0:"numeric",month:"short",day:"numeric",hour:n?void 0:"numeric",minute:n?void 0:"numeric",...o};return sr(Dt.locale,s).format(t)}function sl(t){const e=URL.parse("./compose/",window.location),{width:n,height:o}=window.screen,i=Math.max(0,(n-600)/2),a=Math.max(0,(o-450)/2),s=Math.min(n,600),c=Math.min(o,450),l=t?.uid||Math.random(),d=window.open(e,"compose"+l,`width=${s},height=${c},left=${i},top=${a}`);return d?d.__COMPOSE__=t:alert(Dt._({id:"4S86wI"})),d}const al=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);function cl(){if(al){const t=document.createElement("input");t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.opacity="0",document.body.appendChild(t),t.focus(),setTimeout(()=>{document.body.removeChild(t)},500)}}const ll=document.documentElement,jn=getComputedStyle(ll),ul=8;let Ts=[0,0,0,0];function As(){const t=jn.getPropertyValue("--sai-top"),e=jn.getPropertyValue("--sai-right"),n=jn.getPropertyValue("--sai-bottom"),o=jn.getPropertyValue("--sai-left");Ts=[Math.max(0,parseInt(t,10)),Math.max(0,parseInt(e,10)),Math.max(0,parseInt(n,10)),Math.max(0,parseInt(o,10))]}requestAnimationFrame(As);function ks(t=[]){return Ts.map((n,o)=>(n||ul)+(t[o]||0)).join(" ")}CSS.supports("top: env(safe-area-inset-top)")&&window.addEventListener("resize",As,{passive:!0});const pi=5e3;function Kn(t){if(t||(t=!0),H.showCompose){H.composerState.minimized?kt({duration:pi,text:Dt._({id:"/4fHR1"})}):kt({duration:pi,text:Dt._({id:"vvl08N"})});return}cl(),H.showCompose=t}const Ue=document.createElement("div");function dl(t,e){if(!t)return"";const{preProcess:n}=e||{};return Ue.innerHTML=t.replace(/<\/p>/g,`
`).replace(/<\/li>/g,`
`),Ue.querySelectorAll("br").forEach(o=>{o.replaceWith(`
`)}),n?.(Ue),Ue.querySelectorAll(".invisible").forEach(o=>{o.remove()}),Ue.querySelectorAll(".ellipsis").forEach(o=>{o.append("...")}),Ue.innerText.replace(/[\r\n]{3,}/g,`
`).trim()}const _o=Bt(dl);function Cs(t){const{spoilerText:e,content:n,poll:o,mediaAttachments:i}=t;let a="";return e?.trim()?a+=e:a+=_o(n),a=a.trim(),o?.options?.length&&(a+=`
📊:
${o.options.map(s=>`${o.multiple?"▪️":"•"} ${s.title}`).join(`
`)}`),i?.length&&(a+=" "+i.map(s=>({image:"🖼️",gifv:"🎞️",video:"📹",audio:"🎵",unknown:""})[s.type]||"").join("")),a}const hl=/[&<>"']/g,fl={"&":"&","<":"<",">":">",'"':""","'":"'"};function no(t){return t.replace(hl,e=>fl[e])}const Ss={x:()=>A(()=>import("./icons/close-line-Bfj902o4.js"),[],import.meta.url),heart:()=>A(()=>import("./icons/heart-line-vi3QqJTo.js"),[],import.meta.url),bookmark:()=>A(()=>import("./icons/bookmark-line-BMGZc_Mc.js"),[],import.meta.url),"check-circle":()=>A(()=>import("./icons/check-circle-line-CSlVj8QA.js"),[],import.meta.url),"x-circle":()=>A(()=>import("./icons/close-circle-line-DlCWcUwK.js"),[],import.meta.url),transfer:()=>A(()=>import("./icons/transfer-4-line-BHXBUumZ.js"),[],import.meta.url),rocket:()=>A(()=>import("./icons/rocket-line-B7gBxy4I.js"),[],import.meta.url),"arrow-left":{module:()=>A(()=>import("./icons/arrow-left-line-BGgZ0udH.js"),[],import.meta.url),rtl:!0},"arrow-right":{module:()=>A(()=>import("./icons/arrow-right-line-zKtS4vm5.js"),[],import.meta.url),rtl:!0},"arrow-up":()=>A(()=>import("./icons/arrow-up-line-Bow_AQZ6.js"),[],import.meta.url),"arrow-down":()=>A(()=>import("./icons/arrow-down-line-RSwsrALM.js"),[],import.meta.url),earth:()=>A(()=>import("./icons/world-2-line-BqQ1RIgL.js"),[],import.meta.url),lock:()=>A(()=>import("./icons/lock-line-BbTC1fux.js"),[],import.meta.url),unlock:()=>A(()=>import("./icons/unlock-line-CGrzBxul.js"),[],import.meta.url),"eye-close":()=>A(()=>import("./icons/eye-close-line-DQnawnJE.js"),[],import.meta.url),"eye-open":()=>A(()=>import("./icons/eye-2-line-Dvog5oyl.js"),[],import.meta.url),message:()=>A(()=>import("./icons/mail-line-Cadg2cpP.js"),[],import.meta.url),comment:{module:()=>A(()=>import("./icons/chat-3-line-C4e7R0Zy.js"),[],import.meta.url),rtl:!0},comment2:{module:()=>A(()=>import("./icons/comment-2-line-DfD-95ou.js"),[],import.meta.url),rtl:!0},home:()=>A(()=>import("./icons/home-3-line-BLD1YYP8.js"),[],import.meta.url),notification:()=>A(()=>import("./icons/notification-line-Cc2m6sh5.js"),[],import.meta.url),follow:()=>A(()=>import("./icons/user-follow-line-CsL-DB1N.js"),[],import.meta.url),"follow-add":()=>A(()=>import("./icons/user-add-line-DuegJyfy.js"),[],import.meta.url),poll:[()=>A(()=>import("./icons/chart-bar-line-W9BuvVdR.js"),[],import.meta.url),"90deg"],pencil:()=>A(()=>import("./icons/pencil-line-BwUdLENj.js"),[],import.meta.url),quill:()=>A(()=>import("./icons/quill-pen-line-oAx8SSeF.js"),[],import.meta.url),at:()=>A(()=>import("./icons/at-line-C4-OGRKX.js"),[],import.meta.url),attachment:()=>A(()=>import("./icons/attachment-line-C4ysC1zZ.js"),[],import.meta.url),upload:()=>A(()=>import("./icons/upload-3-line-BB2RA_2Z.js"),[],import.meta.url),gear:()=>A(()=>import("./icons/settings-3-line-BGrM7a5R.js"),[],import.meta.url),more:()=>A(()=>import("./icons/more-3-line-WfszpsFu.js"),[],import.meta.url),more2:()=>A(()=>import("./icons/more-1-fill-Cnnj9cLP.js"),[],import.meta.url),external:{module:()=>A(()=>import("./icons/external-link-line-BYXsdcMa.js"),[],import.meta.url),rtl:!0},popout:{module:()=>A(()=>import("./icons/external-link-line-BYXsdcMa.js"),[],import.meta.url),rtl:!0},popin:{module:()=>A(()=>import("./icons/external-link-line-BYXsdcMa.js"),[],import.meta.url),rotate:"180deg",rtl:!0},plus:()=>A(()=>import("./icons/add-circle-line-VUOz5dLS.js"),[],import.meta.url),"chevron-left":{module:()=>A(()=>import("./icons/left-line-8vYaPuok.js"),[],import.meta.url),rtl:!0},"chevron-right":{module:()=>A(()=>import("./icons/right-line-E80CeS1Q.js"),[],import.meta.url),rtl:!0},"chevron-down":()=>A(()=>import("./icons/down-line-PlS1iUy8.js"),[],import.meta.url),reply:{module:()=>A(()=>import("./icons/share-forward-line-DX1QbiUu.js"),[],import.meta.url),rotate:"180deg",flip:"horizontal",rtl:!0},thread:()=>A(()=>import("./icons/route-line-D10jSVCO.js"),[],import.meta.url),group:{module:()=>A(()=>import("./icons/group-line-Cw2Phg9p.js"),[],import.meta.url),rtl:!0},bot:()=>A(()=>import("./icons/android-2-line-C7qVwx2U.js"),[],import.meta.url),menu:()=>A(()=>import("./icons/rows-4-line-DIXu-DVG.js"),[],import.meta.url),list:{module:()=>A(()=>import("./icons/list-check-line-BaMf8v8i.js"),[],import.meta.url),rtl:!0},search:()=>A(()=>import("./icons/search-2-line-CoCbFBVR.js"),[],import.meta.url),hashtag:()=>A(()=>import("./icons/hashtag-line-Cml-0qv2.js"),[],import.meta.url),info:()=>A(()=>import("./icons/information-line-Dn255DD5.js"),[],import.meta.url),shortcut:()=>A(()=>import("./icons/lightning-line-cvW5NR-M.js"),[],import.meta.url),user:()=>A(()=>import("./icons/user-4-line-C89P3h09.js"),[],import.meta.url),following:()=>A(()=>import("./icons/walk-line-BZwRwcxJ.js"),[],import.meta.url),pin:()=>A(()=>import("./icons/pin-line-BqseDe3t.js"),[],import.meta.url),unpin:[()=>A(()=>import("./icons/pin-line-BqseDe3t.js"),[],import.meta.url),"180deg"],bus:()=>A(()=>import("./icons/bus-2-line-CfBaNBAi.js"),[],import.meta.url),link:()=>A(()=>import("./icons/link-2-line-SnIkQ_rZ.js"),[],import.meta.url),history:()=>A(()=>import("./icons/history-line-Bi2So-je.js"),[],import.meta.url),share:()=>A(()=>import("./icons/share-2-line-C2byQ30z.js"),[],import.meta.url),sparkles:()=>A(()=>import("./icons/sparkles-line-DWyRj8uB.js"),[],import.meta.url),sparkles2:()=>A(()=>import("./icons/sparkles-2-line-H731KO3v.js"),[],import.meta.url),exit:{module:()=>A(()=>import("./icons/exit-line-NjC63GxM.js"),[],import.meta.url),rtl:!0},translate:()=>A(()=>import("./icons/translate-line-cdOWN72F.js"),[],import.meta.url),play:()=>A(()=>import("./icons/play-fill-D1o3ePO2.js"),[],import.meta.url),trash:()=>A(()=>import("./icons/delete-2-line-C-lQIJNC.js"),[],import.meta.url),mute:{module:()=>A(()=>import("./icons/volume-mute-line-BluUkhVT.js"),[],import.meta.url),rtl:!0},unmute:{module:()=>A(()=>import("./icons/volume-line-dtC5ZFr8.js"),[],import.meta.url),rtl:!0},block:()=>A(()=>import("./icons/forbid-circle-line-f_JQE7a8.js"),[],import.meta.url),unblock:[()=>A(()=>import("./icons/forbid-circle-line-f_JQE7a8.js"),[],import.meta.url),"180deg"],flag:()=>A(()=>import("./icons/flag-1-line-sWzx_4o4.js"),[],import.meta.url),time:()=>A(()=>import("./icons/time-line-CHAmvUdg.js"),[],import.meta.url),refresh:()=>A(()=>import("./icons/refresh-2-line-B3CD5yz0.js"),[],import.meta.url),emoji2:()=>A(()=>import("./icons/emoji-2-line-DODV8bnC.js"),[],import.meta.url),filter:()=>A(()=>import("./icons/filter-2-line-DLBEPhKS.js"),[],import.meta.url),filters:()=>A(()=>import("./icons/filter-line-CuUlgBZU.js"),[],import.meta.url),chart:()=>A(()=>import("./icons/chart-line-line-noCpZUdN.js"),[],import.meta.url),react:()=>A(()=>import("./icons/react-line-C6TecPWI.js"),[],import.meta.url),layout4:{module:()=>A(()=>import("./icons/layout-4-line-BFFb1cPy.js"),[],import.meta.url),rtl:!0},layout5:()=>A(()=>import("./icons/layout-5-line-tauINoiF.js"),[],import.meta.url),announce:{module:()=>A(()=>import("./icons/announcement-line-BdsFnqjO.js"),[],import.meta.url),rtl:!0},alert:()=>A(()=>import("./icons/alert-line-CcwmWSBO.js"),[],import.meta.url),round:()=>A(()=>import("./icons/round-fill-CaZIeOWe.js"),[],import.meta.url),"arrow-up-circle":()=>A(()=>import("./icons/arrow-up-circle-line-SO68bPTf.js"),[],import.meta.url),"arrow-down-circle":()=>A(()=>import("./icons/arrow-down-circle-line-SfuiravZ.js"),[],import.meta.url),clipboard:{module:()=>A(()=>import("./icons/clipboard-line-CIOFpSsX.js"),[],import.meta.url),rtl:!0},"account-edit":()=>A(()=>import("./icons/user-edit-line-CC6Y-fJT.js"),[],import.meta.url),"account-warning":()=>A(()=>import("./icons/user-warning-line-BLfdr8Bj.js"),[],import.meta.url),"account-add":()=>A(()=>import("./icons/user-add-2-line-BbaxtCjf.js"),[],import.meta.url),keyboard:()=>A(()=>import("./icons/keyboard-line-BRd9ohM1.js"),[],import.meta.url),cloud:()=>A(()=>import("./icons/cloud-line-CCOdtB64.js"),[],import.meta.url),month:{module:()=>A(()=>import("./icons/calendar-month-line-DGpTEHfi.js"),[],import.meta.url),rtl:!0},media:()=>A(()=>import("./icons/photo-album-line-DkklX4P5.js"),[],import.meta.url),speak:()=>A(()=>import("./icons/radar-line-Dch2zZ5p.js"),[],import.meta.url),building:()=>A(()=>import("./icons/building-5-line-jPUf3HeC.js"),[],import.meta.url),history2:{module:()=>A(()=>import("./icons/history-2-line-C2uKqj-3.js"),[],import.meta.url),rtl:!0},document:()=>A(()=>import("./icons/document-line-ewA3UKpU.js"),[],import.meta.url),"arrows-right":{module:()=>A(()=>import("./icons/arrows-right-line-B7gMPCMB.js"),[],import.meta.url),rtl:!0},code:()=>A(()=>import("./icons/code-line-_8nrb8Yp.js"),[],import.meta.url),copy:()=>A(()=>import("./icons/copy-2-line-SBRewLs-.js"),[],import.meta.url),quote:{module:()=>A(()=>import("./icons/quote-left-line-D0CgS7V6.js"),[],import.meta.url),rtl:!0},settings:()=>A(()=>import("./icons/settings-6-line-3dTfr4F6.js"),[],import.meta.url),"heart-break":()=>A(()=>import("./icons/heart-crack-line-BlrTdexG.js"),[],import.meta.url),"user-x":()=>A(()=>import("./icons/user-x-line-Dahn1YZg.js"),[],import.meta.url),minimize:()=>A(()=>import("./icons/down-line-PlS1iUy8.js"),[],import.meta.url),celebrate:()=>A(()=>import("./icons/celebrate-line-CwClz8eZ.js"),[],import.meta.url),schedule:()=>A(()=>import("./icons/calendar-time-add-line-BwP_cVys.js"),[],import.meta.url),day:()=>A(()=>import("./icons/calendar-day-line-zQlj2fPr.js"),[],import.meta.url),camera:()=>A(()=>import("./icons/camera-line-DK82q_yA.js"),[],import.meta.url),endorsement:{module:()=>A(()=>import("./icons/user-star-line-jCNS7JD6.js"),[],import.meta.url),rtl:!0},formula:()=>A(()=>import("./icons/formula-line-DHbN6ztn.js"),[],import.meta.url),edit:()=>A(()=>import("./icons/edit-4-line-B3lvLrpT.js"),[],import.meta.url),"zoom-in":()=>A(()=>import("./icons/zoom-in-line-a0TkUNno.js"),[],import.meta.url),"zoom-out":()=>A(()=>import("./icons/zoom-out-line-wfKlvfFM.js"),[],import.meta.url),"cursor-hand":()=>A(()=>import("./icons/hand-finger-2-line-QNYxa4H_.js"),[],import.meta.url)},ml={xs:8,s:12,m:16,l:20,xl:24,xxl:32},gi={},pl=/[^a-zA-Z0-9]/g,gl=Ba(function({icon:t,title:e,width:n,height:o,body:i,rotate:a,flip:s}){const c=e?.replace(pl,"-")||"",l=`icon-${t}-${c}`,d=e?`${no(e)}${i}`:i;return r("svg",{role:e?"img":"presentation","aria-labelledby":l,viewBox:`0 0 ${n} ${o}`,dangerouslySetInnerHTML:{__html:d},style:{transform:`${a?`rotate(${a})`:""} ${s?"scaleX(-1)":""}`}})},{isShallowEqual:!0,maxSize:Object.keys(Ss).length,matchesArg:(t,e)=>t.icon===e.icon&&t.title===e.title&&t.body===e.body});function M({icon:t,size:e="m",alt:n,title:o,class:i="",style:a={}}){if(!t)return null;const s=ml[e];let c=Ss[t];if(!c)return null;let l,d,h=!1;Array.isArray(c)?[c,l,d]=c:typeof c=="object"&&({rotate:l,flip:d,rtl:h}=c,c=c.module);const[u,f]=V(gi[t]),m=N(t);return Q(()=>{u&&m.current===t||((async()=>{const p=await c();f(p.default),gi[t]=p.default})(),m.current=t)},[t]),r("span",{class:`icon ${i} ${h?"rtl-flip":""}`,style:{width:`${s}px`,height:`${s}px`,...a},"data-icon":t,children:u&&r(gl,{icon:t,title:o||n,width:u.width,height:u.height,body:u.body,rotate:l,flip:d})})}const Je=ke((t,e)=>{let n;try{n=Va()}catch{}let o=(location.hash||"").replace(/^#/,"").trim();o===""&&(o="/");const{to:i,...a}=t;if(o&&o!=="/"&&o.includes("?")){const c=URL.parse(o,location.origin);if(c?.searchParams?.size){const l=Array.from(c.searchParams.entries()).map(([d,h])=>`${d}=${encodeURIComponent(h)}`).join("&");o=c.pathname+"?"+l}}const s=o===i||decodeURIComponent(o)===i;return r("a",{ref:e,href:`#${i}`,...a,class:`${t.class||""} ${s?"is-active":""}`,onClick:c=>{c.currentTarget?.parentNode?.closest("a")&&c.stopPropagation(),n&&(H.prevLocation=n),t.onClick?.(c)}})});function vi(t){const{className:e,disabled:n,...o}=t;return r(Yc,{className:e,disabled:n,children:({ref:i,closeMenu:a})=>r(Je,{...o,ref:i,onClick:({detail:s})=>a(s===0?"Enter":void 0)})})}const xs=Bt(t=>new Intl.RelativeTimeFormat(t||void 0));function _i(t){if(t instanceof Date)return!isNaN(t.getTime());{const e=new Date(t);return!isNaN(e.getTime())}}const tn=60,en=60*tn,Me=24*en,vl=t=>{const e=xs(Dt.locale),n=(t.getTime()-Date.now())/1e3,o=Math.abs(n);return o{const e=(Date.now()-t.getTime())/1e3;return el+1,0),i=lt(()=>new Date(t),[t]),[a,s,c]=lt(()=>{if(!_i(i))return[""+(typeof t=="string"?t:""),"",""];let l;if(e==="micro"){const d=new Date;(d.getTime()-i.getTime())/1e3/Me<=1?l=_l(i):d.getFullYear()===i.getFullYear()?l=sr(Dt.locale,{year:void 0,month:"short",day:"numeric"}).format(i):l=sr(Dt.locale,{dateStyle:"short"}).format(i)}return l||(l=vl(i)),[l,i.toISOString(),i.toLocaleString()]},[i,e,n]);return Q(()=>{if(!_i(i))return;let l,d;function h(){d=requestAnimationFrame(()=>{o(),u()})}function u(){const f=(Date.now()-i.getTime())/1e3;f{clearTimeout(l),cancelAnimationFrame(d)}},[]),r("time",{datetime:s,title:c,children:a})}function yl(t){const e=N();return r(Gc,{...t,instanceRef:e,itemProps:{onPointerMove:n=>{n.pointerType==="touch"&&e.current?.openMenu?.()},onPointerLeave:n=>{n.pointerType==="touch"&&e.current?.openMenu?.()},...t.itemProps}})}function bl(t,e=[]){!t||typeof t!="function"||Q(()=>{const n=new CloseWatcher;return n.addEventListener("close",t),()=>{n.destroy()}},e)}const wl=window.CloseWatcher?bl:()=>{},El=document.getElementById("modal-container");function yi(){return getComputedStyle(document.documentElement).getPropertyValue("--backdrop-theme-color")}function ar({children:t,onClose:e,onClick:n,class:o,minimized:i}){if(!t)return null;const a=N();Q(()=>{let u=setTimeout(()=>{const f=a.current?.querySelector('[tabindex="-1"]');f&&f.focus()},100);return()=>clearTimeout(u)},[]);const s=window.CloseWatcher,c=Ge("esc",()=>{setTimeout(()=>{e?.()},0)},{enabled:!s&&!!e,keydown:!1,keyup:!0,useKey:!0,ignoreEventWhen:u=>u.metaKey||u.ctrlKey||u.altKey||u.shiftKey},[e]);wl(e,[e]),Q(()=>{const u=document.querySelectorAll(".deck-container");if(i){const f=u[u.length-1];f&&f.tabIndex===-1&&f.focus()}else t?u.forEach(f=>{f.setAttribute("inert","")}):u.forEach(f=>{f.removeAttribute("inert")});return()=>{u.forEach(f=>{f.removeAttribute("inert")})}},[t,i]);const l=N(),d=N();$e(()=>{if(t&&!i)if(Ha.local.get("theme")){const f=yi();l.current=document.querySelector('meta[name="theme-color"][data-theme-setting="manual"]'),l.current&&(d.current=l.current.content,l.current.content=f)}else{const f=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",m=yi();l.current=document.querySelector(`meta[name="theme-color"][media*="${f}"]`),l.current&&(d.current=l.current.content,l.current.content=m)}else l.current&&d.current&&(l.current.content=d.current);return()=>{l.current&&d.current&&(l.current.content=d.current)}},[t,i]);const h=r("div",{ref:u=>{a.current=u,c.current=u?.querySelector?.('[tabindex="-1"]')||u},className:o,onClick:u=>{n?.(u),u.target===u.currentTarget&&e?.(u)},tabIndex:i?0:"-1",inert:i,onFocus:u=>{try{if(u.target===u.currentTarget){const f=a.current?.querySelector('[tabindex="-1"]'),m=!!f&&getComputedStyle(f)?.pointerEvents!=="none";f&&m&&f.focus()}}catch{}},children:t});return io(h,El)}const bi={s:16,m:20,l:24,xl:32,xxl:50,xxxl:64},fn={},yn=window.OffscreenCanvas?new OffscreenCanvas(1,1):document.createElement("canvas"),oo=yn.getContext("2d",{willReadFrequently:!0});oo.imageSmoothingEnabled=!1;const Tl=/missing\.png$/;function Al({url:t,staticUrl:e,size:n,alt:o="",squircle:i,...a}){n=bi[n]||n||bi.m;const s=N(),c=Tl.test(t);return r("picture",{ref:s,class:`avatar ${i?"squircle":""} ${fn[t]?"has-alpha":""}`,style:{width:n,height:n},title:o,...a,children:[!!e&&r("source",{srcset:e,media:"(prefers-reduced-motion: reduce)"}),!!t&&r("img",{src:t,width:n,height:n,alt:o,loading:"lazy",decoding:"async",fetchPriority:"low",crossOrigin:fn[t]===void 0&&!c?"anonymous":void 0,onError:l=>{l.target.crossOrigin&&(l.target.crossOrigin=null,l.target.src=t)},onLoad:l=>{s.current&&(s.current.dataset.loaded=!0),fn[t]===void 0&&(c||setTimeout(()=>{try{const{width:d,height:h}=l.target;yn.width!==d&&(yn.width=d),yn.height!==h&&(yn.height=h),oo.drawImage(l.target,0,0);const u=oo.getImageData(0,0,d,h),f=u.data.filter((m,p)=>p%4===3&&m<=128).length/(u.data.length/4)>.1;f&&s.current.classList.add("has-alpha"),fn[t]=f,oo.clearRect(0,0,d,h)}catch{fn[t]=!1}},1))}})]})}const pe=Bt(Al);let cr=!1;const kl=new MutationObserver(t=>{t.forEach(e=>{if(e.type==="attributes"){const{dir:n}=e.target;n==="rtl"?cr=!0:cr=!1}})});kl.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});function lr(){return cr}function Cl(){const[t,e]=V({width:null,height:null});return $e(()=>{const n=()=>{e({width:window.innerWidth,height:window.innerHeight})};return n(),window.addEventListener("resize",n,{passive:!0}),()=>{window.removeEventListener("resize",n)}},[]),t}function Is(t){const{containerProps:e,instanceRef:n,align:o}=t,i=Cl(),a=n?.current?n:N(),s=lr()?o==="end"?"start":o==="start"?"end":o:o;return r(qc,{boundingBoxPadding:ks(),repositionFlag:`${i.width}x${i.height}`,unmountOnClose:!0,...t,align:s,instanceRef:a,containerProps:{onClick:c=>{c.target===c.currentTarget&&a.current?.closeMenu?.(),e?.onClick?.(c)},...e}})}function Ro({subMenu:t=!1,confirm:e=!0,confirmLabel:n,menuItemClassName:o,menuFooter:i,menuExtras:a,...s}){const{children:c,onClick:l,...d}=s;return e?r(t?yl:Is,{openTrigger:"clickOnly",direction:"bottom",overflow:"auto",gap:-8,shift:8,menuClassName:"menu-emphasized",...d,menuButton:t?void 0:c,label:t?c:void 0,children:[r(At,{className:o,onClick:l,children:n}),a,i]}):t?r(At,{...s}):l?ja(c,{onClick:l}):c}const Qe=2147483647,ie=36,Or=1,xn=26,Sl=38,xl=700,Ls=72,Ds=128,Ms="-",Il=/^xn--/,Ll=/[^\0-\x7F]/,Dl=/[\x2E\u3002\uFF0E\uFF61]/g,Ml={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Oo=ie-Or,se=Math.floor,$o=String.fromCharCode;function Ee(t){throw new RangeError(Ml[t])}function Pl(t,e){const n=[];let o=t.length;for(;o--;)n[o]=e(t[o]);return n}function Ps(t,e){const n=t.split("@");let o="";n.length>1&&(o=n[0]+"@",t=n[1]),t=t.replace(Dl,".");const i=t.split("."),a=Pl(i,e).join(".");return o+a}function Rs(t){const e=[];let n=0;const o=t.length;for(;n=55296&&i<=56319&&nString.fromCodePoint(...t),Ol=function(t){return t>=48&&t<58?26+(t-48):t>=65&&t<91?t-65:t>=97&&t<123?t-97:ie},wi=function(t,e){return t+22+75*(t<26)-((e!=0)<<5)},Os=function(t,e,n){let o=0;for(t=n?se(t/xl):t>>1,t+=se(t/e);t>Oo*xn>>1;o+=ie)t=se(t/Oo);return se(o+(Oo+1)*t/(t+Sl))},$s=function(t){const e=[],n=t.length;let o=0,i=Ds,a=Ls,s=t.lastIndexOf(Ms);s<0&&(s=0);for(let c=0;c=128&&Ee("not-basic"),e.push(t.charCodeAt(c));for(let c=s>0?s+1:0;c=n&&Ee("invalid-input");const f=Ol(t.charCodeAt(c++));f>=ie&&Ee("invalid-input"),f>se((Qe-o)/h)&&Ee("overflow"),o+=f*h;const m=u<=a?Or:u>=a+xn?xn:u-a;if(fse(Qe/p)&&Ee("overflow"),h*=p}const d=e.length+1;a=Os(o-l,d,l==0),se(o/d)>Qe-i&&Ee("overflow"),i+=se(o/d),o%=d,e.splice(o++,0,i)}return String.fromCodePoint(...e)},Ns=function(t){const e=[];t=Rs(t);const n=t.length;let o=Ds,i=0,a=Ls;for(const l of t)l<128&&e.push($o(l));const s=e.length;let c=s;for(s&&e.push(Ms);c=o&&hse((Qe-i)/d)&&Ee("overflow"),i+=(l-o)*d,o=l;for(const h of t)if(hQe&&Ee("overflow"),h===o){let u=i;for(let f=ie;;f+=ie){const m=f<=a?Or:f>=a+xn?xn:f-a;if(u{try{o.target.dataset.isLarger=o.target.naturalWidth>o.target.width*2||o.target.naturalHeight>o.target.height*2}catch{}}},e||n)]})}const zl=Bt(t=>new RegExp(`:(${t.join("|")}):`,"g"));function Bl({text:t,emojis:e,staticEmoji:n}){if(!t)return"";if(!e?.length||t.indexOf(":")===-1)return t;const o=zl(e.map(a=>a.shortcode));return t.split(o).map((a,s)=>{const c=e.find(l=>l.shortcode===a);if(c){const{url:l,staticUrl:d}=c;return r(ur,{staticUrl:n?void 0:d,alt:a,url:n&&d||l},a+"-"+s)}return a})}const nn=Bt(Bl),Vl=Bt(t=>{const e={sensitivity:"base"};try{return new Intl.Collator(t||void 0,e)}catch{return new Intl.Collator(void 0,e)}}),Hl=/([^@]+)(@.+)/i,jl=/(\:(\w|\+|\-)+\:)(?=|[\!\.\?]|$)/g,Kl=/\s+/g,Ul=/[^a-z0-9@\.]/gi;function Wl({account:t,instance:e,showAvatar:n,showAcct:o,short:i,external:a,onClick:s}){const{i18n:c}=Yt();if(!t)return null;const{acct:l,avatar:d,avatarStatic:h,id:u,url:f,displayName:m,emojis:p,bot:g,username:v,roles:E}=t,[w,k,T]=l.match(Hl)||[,l];e||(e=An().instance);const y=ho(f),S=v.toLowerCase().trim(),b=(m||"").toLowerCase().trim(),x=b.replace(jl,"").replace(Kl,""),P=x.replace(Ul,""),D=!i&&(S===b||S===x||S===P||Vl(c.locale).compare(S,x)===0)||P===l.toLowerCase();return r("a",{class:`name-text ${o?"show-acct":""} ${i?"short":""}`,href:f,target:a?"_blank":null,title:m?`${m} (${T?"":"@"}${l})`:`${T?"":"@"}${l}`,onClick:C=>{if(!a&&!C.shiftKey){if(C.preventDefault(),C.stopPropagation(),s)return s(C);if(C.metaKey||C.ctrlKey||C.shiftKey||C.which===2){const L=`#/${e}/a/${u}`;window.open(L,"_blank");return}H.showAccount={account:t,instance:e}}},children:[n&&r(F,{children:[r(pe,{url:h||d,squircle:g})," "]}),m&&!i?r(F,{children:[r("b",{dir:"auto",children:r(nn,{text:m,emojis:p,staticEmoji:!0})}),!o&&!D&&r(F,{children:[" ",r("i",{class:"bidi-isolate",children:["@",v]}),E?.map(C=>r(F,{children:[" ",r("span",{class:"tag collapsed",children:[C.name,!!y&&r(F,{children:[" ",r("span",{class:"more-insignificant",children:y})]})]})]}))]})]}):i?r("i",{children:v}):r("b",{children:v}),o&&r(F,{children:[r("br",{}),r("i",{class:"bidi-isolate",children:[T?"":"@",k,!!T&&r("span",{class:"ib",children:T})]}),E?.map(C=>r(F,{children:[" ",r("span",{class:"tag collapsed",children:[C.name,!!y&&r(F,{children:[" ",r("span",{class:"more-insignificant",children:y})]})]})]}))]})]})}const Te=Bt(Wl),Zl="Аҧсшәа",ql="Acèh",Gl="Lëbacoli",Yl="Afár",Xl="Afrikaans",Ql="Shqip",Jl="Dhalur",tu="አማርኛ",eu="العربية",nu="Հայերեն",ou="অসমীয়া",ru="Авар мацӀ",iu="अवधी",su="Aymar aru",au="Azərbaycanca",cu="Basa Bali",lu="بلوچی",uu="Bamanankan",du="Baoulé",hu="Башҡортса",fu="Euskara",mu="Batak Karo",pu="Batak Simalungun",gu="Batak Toba",vu="Беларуская",_u="Ichibemba",yu="বাংলা",bu="Betawi",wu="भोजपुरी",Eu="Bikol",Tu="Bosanski",Au="Brezhoneg",ku="Български",Cu="Буряад",Su="粵語",xu="Català",Iu="Cebuano",Lu="Chamoru",Du="Нохчийн мотт",Mu="Chichewa",Pu="Kapasen Chuuk",Ru="Чӑвашла",Ou="Corsu",$u="Qırımtatarca (Кирилл)",Nu="Hrvatski",Fu="Čeština",zu="Dansk",Bu="ދިވެހި",Vu="Thuɔŋjäŋ",Hu="डोगरी",ju="Dombe",Ku="Nederlands",Uu="Jula",Wu="རྫོང་ཁ",Zu="English",qu="Esperanto",Gu="Eesti",Yu="Eʋegbe",Xu="Føroyskt",Qu="Vosa Vakaviti",Ju="Tagalog",td="Suomi",ed="Fon",nd="Français",od="Frysk",rd="Furlan",id="Fulfulde",sd="Gã",ad="Galego",cd="ქართული",ld="Deutsch",ud="Ελληνικά",dd="Avañe'ẽ",hd="ગુજરાતી",fd="Kreyòl ayisyen",md="Hakha Chin",pd="Hausa",gd="ʻŌlelo Hawaiʻi",vd="עברית",_d="Hiligaynon",yd="हिन्दी",bd="Hmoob",wd="Magyar",Ed="Hunsrik",Td="Iban",Ad="Íslenska",kd="Igbo",Cd="Iloko",Sd="Bahasa Indonesia",xd="ᐃᓄᒃᑎᑐᑦ",Id="Gaeilge",Ld="Italiano",Dd="Patwa",Md="日本語",Pd="Basa Jawa",Rd="Jinghpaw",Od="Kalaallisut",$d="ಕನ್ನಡ",Nd="Kanuri",Fd="Kapampangan",zd="Қазақша",Bd="Khasi",Vd="ភាសាខ្មែរ",Hd="Rukiga",jd="Kikongo",Kd="Kinyarwanda",Ud="Kituba",Wd="Kokborok",Zd="Коми кыв",qd="कोंकणी",Gd="한국어",Yd="Krio",Xd="Kurdî (Kurmancî)",Qd="کوردی (سۆرانی)",Jd="Кыргызча",th="ລາວ",eh="Latgaļu",nh="Latina",oh="Latviešu",rh="Ligure",ih="Limburgs",sh="Lingála",ah="Lietuvių",ch="Lombard",lh="Luganda",uh="Dholuo",dh="Lëtzebuergesch",hh="Македонски",fh="Madhurâ",mh="मैथिली",ph="Makassar",gh="Malagasy",vh="Bahasa Melayu",_h="മലയാളം",yh="Malti",bh="Mam",wh="Gaelg",Eh="Te Reo Māori",Th="मराठी",Ah="Kajin M̧ajeļ",kh="मारवाड़ी",Ch="Kreol Morisien",Sh="Олык марий",xh="Baso Minang",Ih="Mizo ṭawng",Lh="Монгол",Dh="မြန်မာစာ",Mh="Náhuatl",Ph="isiNdebele",Rh="नेपाली",Oh="Norsk",$h="Thok Nath",Nh="Occitan",Fh="ଓଡ଼ିଆ",zh="Afaan Oromoo",Bh="Ирон æвзаг",Vh="Pangasinan",Hh="Papiamentu",jh="پښتو",Kh="فارسی",Uh="Polski",Wh="Português (Brasil)",Zh="ਪੰਜਾਬੀ",qh="Runa Simi",Gh="Qʼeqchiʼ",Yh="Romani čhib",Xh="Română",Qh="Ikirundi",Jh="Русский",tf="Davvisámegiella",ef="Gagana Samoa",nf="Sängö",of="संस्कृतम्",rf="ᱥᱟᱱᱛᱟᱲᱤ",sf="Gàidhlig",af="Sepedi",cf="Српски",lf="Sesotho",uf="Kreol seselwa",df="လိၵ်ႈတႆး",hf="chiShona",ff="Sicilianu",mf="Ślōnskŏ",pf="سنڌي",gf="සිංහල",vf="Slovenčina",_f="Slovenščina",yf="Soomaali",bf="Español",wf="Basa Sunda",Ef="Susu",Tf="Kiswahili",Af="siSwati",kf="Svenska",Cf="Reo Tahiti",Sf="Тоҷикӣ",xf="ⵜⴰⵎⴰⵣⵉⵖⵜ",If="தமிழ்",Lf="Татарча",Df="తెలుగు",Mf="Tetun",Pf="ไทย",Rf="བོད་ཡིག",Of="ትግርኛ",$f="Tiv",Nf="Tok Pisin",Ff="Lea fakatonga",zf="Tshiluba",Bf="Xitsonga",Vf="Setswana",Hf="ತುಳು",jf="chiTumbuka",Kf="Türkçe",Uf="Türkmençe",Wf="Тыва дыл",Zf="Akankasa",qf="Удмурт кыл",Gf="Українська",Yf="اردو",Xf="ئۇيغۇرچە",Qf="Oʻzbekcha",Jf="Tshivenḓa",tm="Vèneto",em="Tiếng Việt",nm="Winaray",om="Cymraeg",rm="Wolof",im="isiXhosa",sm="Саха тыла",am="ייִדיש",cm="Yorùbá",lm="Màaya T'àan",um="Didxazá",dm="isiZulu",hm={ab:Zl,ace:ql,ach:Gl,aa:Yl,af:Xl,sq:Ql,alz:Jl,am:tu,ar:eu,hy:nu,as:ou,av:ru,awa:iu,ay:su,az:au,ban:cu,bal:lu,bm:uu,bci:du,ba:hu,eu:fu,btx:mu,bts:pu,bbc:gu,be:vu,bem:_u,bn:yu,bew:bu,bho:wu,bik:Eu,bs:Tu,br:Au,bg:ku,bua:Cu,yue:Su,ca:xu,ceb:Iu,ch:Lu,ce:Du,ny:Mu,"zh-CN":"简体中文","zh-TW":"繁體中文",chk:Pu,cv:Ru,co:Ou,crh:$u,"crh-Latn":"Qırımtatarca (Latin)",hr:Nu,cs:Fu,da:zu,"fa-AF":"درى",dv:Bu,din:Vu,doi:Hu,dov:ju,nl:Ku,dyu:Uu,dz:Wu,en:Zu,eo:qu,et:Gu,ee:Yu,fo:Xu,fj:Qu,tl:Ju,fi:td,fon:ed,fr:nd,"fr-CA":"Français (Canada)",fy:od,fur:rd,ff:id,gaa:sd,gl:ad,ka:cd,de:ld,el:ud,gn:dd,gu:hd,ht:fd,cnh:md,ha:pd,haw:gd,iw:vd,hil:_d,hi:yd,hmn:bd,hu:wd,hrx:Ed,iba:Td,is:Ad,ig:kd,ilo:Cd,id:Sd,"iu-Latn":"Inuktitut (Latin)",iu:xd,ga:Id,it:Ld,jam:Dd,ja:Md,jw:Pd,kac:Rd,kl:Od,kn:$d,kr:Nd,pam:Fd,kk:zd,kha:Bd,km:Vd,cgg:Hd,kg:jd,rw:Kd,ktu:Ud,trp:Wd,kv:Zd,gom:qd,ko:Gd,kri:Yd,ku:Xd,ckb:Qd,ky:Jd,lo:th,ltg:eh,la:nh,lv:oh,lij:rh,li:ih,ln:sh,lt:ah,lmo:ch,lg:lh,luo:uh,lb:dh,mk:hh,mad:fh,mai:mh,mak:ph,mg:gh,ms:vh,"ms-Arab":"بهاس ملايو",ml:_h,mt:yh,mam:bh,gv:wh,mi:Eh,mr:Th,mh:Ah,mwr:kh,mfe:Ch,chm:Sh,"mni-Mtei":"ꯃꯤꯇꯩꯂꯣꯟ",min:xh,lus:Ih,mn:Lh,my:Dh,nhe:Mh,"ndc-ZW":"Ndau",nr:Ph,new:"नेपाल भाषा",ne:Rh,"bm-Nkoo":"ߒߞߏ",no:Oh,nus:$h,oc:Nh,or:Fh,om:zh,os:Bh,pag:Vh,pap:Hh,ps:jh,fa:Kh,pl:Uh,pt:Wh,"pt-PT":"Português (Portugal)",pa:Zh,"pa-Arab":"پنجابی",qu:qh,kek:Gh,rom:Yh,ro:Xh,rn:Qh,ru:Jh,se:tf,sm:ef,sg:nf,sa:of,"sat-Latn":"Santali (Latin)",sat:rf,gd:sf,nso:af,sr:cf,st:lf,crs:uf,shn:df,sn:hf,scn:ff,szl:mf,sd:pf,si:gf,sk:vf,sl:_f,so:yf,es:bf,su:wf,sus:Ef,sw:Tf,ss:Af,sv:kf,ty:Cf,tg:Sf,"ber-Latn":"Tamazight (Latin)",ber:xf,ta:If,tt:Lf,te:Df,tet:Mf,th:Pf,bo:Rf,ti:Of,tiv:$f,tpi:Nf,to:Ff,lua:zf,ts:Bf,tn:Vf,tcy:Hf,tum:jf,tr:Kf,tk:Uf,tyv:Wf,ak:Zf,udm:qf,uk:Gf,ur:Yf,ug:Xf,uz:Qf,ve:Jf,vec:tm,vi:em,war:nm,cy:om,wo:rm,xh:im,sah:sm,yi:am,yo:cm,yua:lm,zap:um,zu:dm},Un={"zh-YUE":"YUE",zh_HANT:"zh-Hant"},No=Bt(t=>new Intl.DisplayNames(t||void 0,{type:"language"}));function fm(t){let e,n;typeof t=="object"&&({code:t,locale:e,fallback:n}=t);try{const o=No(e||Dt.locale).of(t);if(o!==t)return o;if(!n){const i=No(t).of(t);if(i!==t)return i;const a=hm?.[e];if(a!==t)return a}return n||""}catch{if(Un[t])try{const i=No(Un[e]||e||Dt.locale).of(Un[t]);return i!==Un[t]?i:n||""}catch{}return n||""}}const mn=Bt(fm),mm={auto:"Detect language",ab:"Abkhaz",ace:"Acehnese",ach:"Acholi",aa:"Afar",af:"Afrikaans",sq:"Albanian",alz:"Alur",am:"Amharic",ar:"Arabic",hy:"Armenian",as:"Assamese",av:"Avar",awa:"Awadhi",ay:"Aymara",az:"Azerbaijani",ban:"Balinese",bal:"Baluchi",bm:"Bambara",bci:"Baoulé",ba:"Bashkir",eu:"Basque",btx:"Batak Karo",bts:"Batak Simalungun",bbc:"Batak Toba",be:"Belarusian",bem:"Bemba",bn:"Bengali",bew:"Betawi",bho:"Bhojpuri",bik:"Bikol",bs:"Bosnian",br:"Breton",bg:"Bulgarian",bua:"Buryat",yue:"Cantonese",ca:"Catalan",ceb:"Cebuano",ch:"Chamorro",ce:"Chechen",ny:"Chichewa","zh-CN":"Chinese (Simplified)","zh-TW":"Chinese (Traditional)",chk:"Chuukese",cv:"Chuvash",co:"Corsican",crh:"Crimean Tatar (Cyrillic)","crh-Latn":"Crimean Tatar (Latin)",hr:"Croatian",cs:"Czech",da:"Danish","fa-AF":"Dari",dv:"Dhivehi",din:"Dinka",doi:"Dogri",dov:"Dombe",nl:"Dutch",dyu:"Dyula",dz:"Dzongkha",en:"English",eo:"Esperanto",et:"Estonian",ee:"Ewe",fo:"Faroese",fj:"Fijian",tl:"Filipino",fi:"Finnish",fon:"Fon",fr:"French","fr-CA":"French (Canada)",fy:"Frisian",fur:"Friulian",ff:"Fulani",gaa:"Ga",gl:"Galician",ka:"Georgian",de:"German",el:"Greek",gn:"Guarani",gu:"Gujarati",ht:"Haitian Creole",cnh:"Hakha Chin",ha:"Hausa",haw:"Hawaiian",iw:"Hebrew",hil:"Hiligaynon",hi:"Hindi",hmn:"Hmong",hu:"Hungarian",hrx:"Hunsrik",iba:"Iban",is:"Icelandic",ig:"Igbo",ilo:"Ilocano",id:"Indonesian","iu-Latn":"Inuktut (Latin)",iu:"Inuktut (Syllabics)",ga:"Irish",it:"Italian",jam:"Jamaican Patois",ja:"Japanese",jw:"Javanese",kac:"Jingpo",kl:"Kalaallisut",kn:"Kannada",kr:"Kanuri",pam:"Kapampangan",kk:"Kazakh",kha:"Khasi",km:"Khmer",cgg:"Kiga",kg:"Kikongo",rw:"Kinyarwanda",ktu:"Kituba",trp:"Kokborok",kv:"Komi",gom:"Konkani",ko:"Korean",kri:"Krio",ku:"Kurdish (Kurmanji)",ckb:"Kurdish (Sorani)",ky:"Kyrgyz",lo:"Lao",ltg:"Latgalian",la:"Latin",lv:"Latvian",lij:"Ligurian",li:"Limburgish",ln:"Lingala",lt:"Lithuanian",lmo:"Lombard",lg:"Luganda",luo:"Luo",lb:"Luxembourgish",mk:"Macedonian",mad:"Madurese",mai:"Maithili",mak:"Makassar",mg:"Malagasy",ms:"Malay","ms-Arab":"Malay (Jawi)",ml:"Malayalam",mt:"Maltese",mam:"Mam",gv:"Manx",mi:"Maori",mr:"Marathi",mh:"Marshallese",mwr:"Marwadi",mfe:"Mauritian Creole",chm:"Meadow Mari","mni-Mtei":"Meiteilon (Manipuri)",min:"Minang",lus:"Mizo",mn:"Mongolian",my:"Myanmar (Burmese)",nhe:"Nahuatl (Eastern Huasteca)","ndc-ZW":"Ndau",nr:"Ndebele (South)",new:"Nepalbhasa (Newari)",ne:"Nepali","bm-Nkoo":"NKo",no:"Norwegian",nus:"Nuer",oc:"Occitan",or:"Odia (Oriya)",om:"Oromo",os:"Ossetian",pag:"Pangasinan",pap:"Papiamento",ps:"Pashto",fa:"Persian",pl:"Polish",pt:"Portuguese (Brazil)","pt-PT":"Portuguese (Portugal)",pa:"Punjabi (Gurmukhi)","pa-Arab":"Punjabi (Shahmukhi)",qu:"Quechua",kek:"Qʼeqchiʼ",rom:"Romani",ro:"Romanian",rn:"Rundi",ru:"Russian",se:"Sami (North)",sm:"Samoan",sg:"Sango",sa:"Sanskrit","sat-Latn":"Santali (Latin)",sat:"Santali (Ol Chiki)",gd:"Scots Gaelic",nso:"Sepedi",sr:"Serbian",st:"Sesotho",crs:"Seychellois Creole",shn:"Shan",sn:"Shona",scn:"Sicilian",szl:"Silesian",sd:"Sindhi",si:"Sinhala",sk:"Slovak",sl:"Slovenian",so:"Somali",es:"Spanish",su:"Sundanese",sus:"Susu",sw:"Swahili",ss:"Swati",sv:"Swedish",ty:"Tahitian",tg:"Tajik","ber-Latn":"Tamazight",ber:"Tamazight (Tifinagh)",ta:"Tamil",tt:"Tatar",te:"Telugu",tet:"Tetum",th:"Thai",bo:"Tibetan",ti:"Tigrinya",tiv:"Tiv",tpi:"Tok Pisin",to:"Tongan",lua:"Tshiluba",ts:"Tsonga",tn:"Tswana",tcy:"Tulu",tum:"Tumbuka",tr:"Turkish",tk:"Turkmen",tyv:"Tuvan",ak:"Twi",udm:"Udmurt",uk:"Ukrainian",ur:"Urdu",ug:"Uyghur",uz:"Uzbek",ve:"Venda",vec:"Venetian",vi:"Vietnamese",war:"Waray",cy:"Welsh",wo:"Wolof",xh:"Xhosa",sah:"Yakut",yi:"Yiddish",yo:"Yoruba",yua:"Yucatec Maya",zap:"Zapotec",zu:"Zulu"},pm={ab:"Abkhaz",ace:"Acehnese",ach:"Acholi",aa:"Afar",af:"Afrikaans",sq:"Albanian",alz:"Alur",am:"Amharic",ar:"Arabic",hy:"Armenian",as:"Assamese",av:"Avar",awa:"Awadhi",ay:"Aymara",az:"Azerbaijani",ban:"Balinese",bal:"Baluchi",bm:"Bambara",bci:"Baoulé",ba:"Bashkir",eu:"Basque",btx:"Batak Karo",bts:"Batak Simalungun",bbc:"Batak Toba",be:"Belarusian",bem:"Bemba",bn:"Bengali",bew:"Betawi",bho:"Bhojpuri",bik:"Bikol",bs:"Bosnian",br:"Breton",bg:"Bulgarian",bua:"Buryat",yue:"Cantonese",ca:"Catalan",ceb:"Cebuano",ch:"Chamorro",ce:"Chechen",ny:"Chichewa","zh-CN":"Chinese (Simplified)","zh-TW":"Chinese (Traditional)",chk:"Chuukese",cv:"Chuvash",co:"Corsican",crh:"Crimean Tatar (Cyrillic)","crh-Latn":"Crimean Tatar (Latin)",hr:"Croatian",cs:"Czech",da:"Danish","fa-AF":"Dari",dv:"Dhivehi",din:"Dinka",doi:"Dogri",dov:"Dombe",nl:"Dutch",dyu:"Dyula",dz:"Dzongkha",en:"English",eo:"Esperanto",et:"Estonian",ee:"Ewe",fo:"Faroese",fj:"Fijian",tl:"Filipino",fi:"Finnish",fon:"Fon",fr:"French","fr-CA":"French (Canada)",fy:"Frisian",fur:"Friulian",ff:"Fulani",gaa:"Ga",gl:"Galician",ka:"Georgian",de:"German",el:"Greek",gn:"Guarani",gu:"Gujarati",ht:"Haitian Creole",cnh:"Hakha Chin",ha:"Hausa",haw:"Hawaiian",iw:"Hebrew",hil:"Hiligaynon",hi:"Hindi",hmn:"Hmong",hu:"Hungarian",hrx:"Hunsrik",iba:"Iban",is:"Icelandic",ig:"Igbo",ilo:"Ilocano",id:"Indonesian","iu-Latn":"Inuktut (Latin)",iu:"Inuktut (Syllabics)",ga:"Irish",it:"Italian",jam:"Jamaican Patois",ja:"Japanese",jw:"Javanese",kac:"Jingpo",kl:"Kalaallisut",kn:"Kannada",kr:"Kanuri",pam:"Kapampangan",kk:"Kazakh",kha:"Khasi",km:"Khmer",cgg:"Kiga",kg:"Kikongo",rw:"Kinyarwanda",ktu:"Kituba",trp:"Kokborok",kv:"Komi",gom:"Konkani",ko:"Korean",kri:"Krio",ku:"Kurdish (Kurmanji)",ckb:"Kurdish (Sorani)",ky:"Kyrgyz",lo:"Lao",ltg:"Latgalian",la:"Latin",lv:"Latvian",lij:"Ligurian",li:"Limburgish",ln:"Lingala",lt:"Lithuanian",lmo:"Lombard",lg:"Luganda",luo:"Luo",lb:"Luxembourgish",mk:"Macedonian",mad:"Madurese",mai:"Maithili",mak:"Makassar",mg:"Malagasy",ms:"Malay","ms-Arab":"Malay (Jawi)",ml:"Malayalam",mt:"Maltese",mam:"Mam",gv:"Manx",mi:"Maori",mr:"Marathi",mh:"Marshallese",mwr:"Marwadi",mfe:"Mauritian Creole",chm:"Meadow Mari","mni-Mtei":"Meiteilon (Manipuri)",min:"Minang",lus:"Mizo",mn:"Mongolian",my:"Myanmar (Burmese)",nhe:"Nahuatl (Eastern Huasteca)","ndc-ZW":"Ndau",nr:"Ndebele (South)",new:"Nepalbhasa (Newari)",ne:"Nepali","bm-Nkoo":"NKo",no:"Norwegian",nus:"Nuer",oc:"Occitan",or:"Odia (Oriya)",om:"Oromo",os:"Ossetian",pag:"Pangasinan",pap:"Papiamento",ps:"Pashto",fa:"Persian",pl:"Polish",pt:"Portuguese (Brazil)","pt-PT":"Portuguese (Portugal)",pa:"Punjabi (Gurmukhi)","pa-Arab":"Punjabi (Shahmukhi)",qu:"Quechua",kek:"Qʼeqchiʼ",rom:"Romani",ro:"Romanian",rn:"Rundi",ru:"Russian",se:"Sami (North)",sm:"Samoan",sg:"Sango",sa:"Sanskrit","sat-Latn":"Santali (Latin)",sat:"Santali (Ol Chiki)",gd:"Scots Gaelic",nso:"Sepedi",sr:"Serbian",st:"Sesotho",crs:"Seychellois Creole",shn:"Shan",sn:"Shona",scn:"Sicilian",szl:"Silesian",sd:"Sindhi",si:"Sinhala",sk:"Slovak",sl:"Slovenian",so:"Somali",es:"Spanish",su:"Sundanese",sus:"Susu",sw:"Swahili",ss:"Swati",sv:"Swedish",ty:"Tahitian",tg:"Tajik","ber-Latn":"Tamazight",ber:"Tamazight (Tifinagh)",ta:"Tamil",tt:"Tatar",te:"Telugu",tet:"Tetum",th:"Thai",bo:"Tibetan",ti:"Tigrinya",tiv:"Tiv",tpi:"Tok Pisin",to:"Tongan",lua:"Tshiluba",ts:"Tsonga",tn:"Tswana",tcy:"Tulu",tum:"Tumbuka",tr:"Turkish",tk:"Turkmen",tyv:"Tuvan",ak:"Twi",udm:"Udmurt",uk:"Ukrainian",ur:"Urdu",ug:"Uyghur",uz:"Uzbek",ve:"Venda",vec:"Venetian",vi:"Vietnamese",war:"Waray",cy:"Welsh",wo:"Wolof",xh:"Xhosa",sah:"Yakut",yi:"Yiddish",yo:"Yoruba",yua:"Yucatec Maya",zap:"Zapotec",zu:"Zulu"},gm={},zs={sl:mm,tl:pm,al:gm},vm=Object.entries(zs.tl).map(([t,{name:e}])=>({code:t,name:e})),dr=[...navigator.languages];try{const t=new Intl.DateTimeFormat().resolvedOptions().locale;dr.includes(t)||dr.unshift(t)}catch{}const _m=()=>so(dr,vm.map(t=>t.code.replace("_","-")),"en");function Bs(t=!1){if(t){const{contentTranslationTargetLanguage:e}=H.settings;if(e)return e}return _m()}const Ei=["byte","kilobyte","megabyte","gigabyte","terabyte","petabyte"];function Ov(t){const e=Math.min(Math.floor(Math.log2(t)/10),Ei.length-1),n=t/1024**e;return Dt.number(n,{style:"unit",unit:Ei[e],unitDisplay:"narrow",maximumFractionDigits:0})}function hr(t,e=[]){return t?(!e.length||t.indexOf(":")===-1||e.forEach(n=>{const{shortcode:o,staticUrl:i,url:a}=n;t=t.replace(new RegExp(`:${o}:`,"g"),`
`)}),t):""}const We=document.createElement("div"),ym=["u-url","mention","hashtag"],bm=/{}}=e;let a=t;const s=Mm(a,o),c=bm.test(a),l=a.includes("```");if(c){const h=s.querySelectorAll('a:not([target="_blank"])');for(const f of h)f.setAttribute("target","_blank");const u=s.querySelectorAll("a[class]");for(const f of u)for(const m of f.classList)ym.includes(m)||f.classList.remove(m)}if(c){const h=s.querySelectorAll("a[href]");for(const u of h)wm.test(u.textContent.trim())&&(u.classList.add("has-url-text"),Nm(u))}if(c){const h=s.querySelectorAll("a[href]"),u=[];for(const f of h){const m=f.innerText.trim(),p=f.querySelector("*");if(Em.test(m)){const[g,v,E]=m.split("@");p||(!u.some(([w])=>w===v)||u.some(([w,k])=>w===v&&k===E)?(f.innerHTML=`@${v}`,u.push([v,E])):f.innerHTML=`@${v}@${E}`),f.classList.add("mention")}Tm.test(m)&&(p||(f.innerHTML=`#${m.slice(1)}`),f.classList.add("mention","hashtag"))}}let d;if(a.includes(":")&&n?.length){d=zo(s);for(const h of d){let u=no(h.nodeValue);u=hr(u,n),We.innerHTML=u,h.replaceWith(...We.childNodes)}}if(l){const h=[...s.querySelectorAll("p")].filter(u=>Am.test(u.innerText.trim()));for(const u of h){const f=document.createElement("pre");for(const m of u.querySelectorAll("br"))m.replaceWith(`
`);f.innerHTML=`${u.innerHTML.trim()}
`,u.replaceWith(f)}}if(l){const u=[...s.querySelectorAll("p")].filter(f=>km.test(f.innerText));for(const f of u){const m=[f];let p=!1,g=f;for(;g.nextElementSibling;){const v=g.nextElementSibling;if(v&&v.tagName==="P")if(Cm.test(v.innerText)){m.push(v),p=!0;break}else m.push(v);else break;g=v}if(p){const v=document.createElement("pre");for(const w of m)for(const k of w.querySelectorAll("br"))k.replaceWith(`
`);const E=m.map(w=>w.innerHTML).join(`
`);v.innerHTML=`${E}
`,f.replaceWith(v);for(const w of m)w.remove()}}}if(a.includes("`")){d=zo(s);for(const h of d){let u=no(h.nodeValue);Sm.test(u)&&(u=u.replaceAll(Dm,"$1
")),We.innerHTML=u,h.replaceWith(...We.childNodes)}}if(xm.test(a)){d=zo(s,{rejectFilter:["A"]});for(const h of d){let u=no(h.nodeValue);Im.test(u)&&(u=u.replaceAll(Lm,'$1')),We.innerHTML=u,h.replaceWith(...We.childNodes)}}if(a.includes("#")){let h=null;const u=[...s.querySelectorAll("p")].filter((f,m)=>{let p=0;for(let g=0;g3||p>1&&h&&m===h+1)return h=m,!0});if(u?.length)for(const f of u)f.classList.add("hashtag-stuffing"),f.title=f.innerText}if(a.includes("
i(s)),o?s:s.innerHTML}const Vs=Bt(Pm),Rm=["STYLE","IMG","VIDEO","AUDIO","AREA","MAP","TRACK","EMBED","IFRAME","OBJECT","PICTURE","PORTAL","SOURCE","SVG","MATH","CANVAS","NOSCRIPT","SCRIPT","INPUT","OPTION","TEXTAREA","SLOT","TEMPLATE"],Om=Object.fromEntries(Rm.map(t=>[t,!0])),$m=/^(https?:\/\/(www\.)?|xmpp:)/,Fo=30;function Nm(t){if(!(!t||t.querySelector?.("*")))try{const e=t.innerText.trim(),n=(e.match($m)||[])[0]||"";if(!n)return;const o=e.slice(n.length,n.length+Fo),i=e.slice(n.length+Fo),a=e.slice(n.length).length>Fo;t.innerHTML=`${n}${o}${i}`}catch{}}function zo(t,e={}){const n=[],o=Object.assign({},Om,e.rejectFilter?.reduce((s,c)=>(s[c]=!0,s),{})),i=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,{acceptNode(s){return o[s.parentNode.nodeName]?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}},!1);let a;for(;a=i.nextNode();)n.push(a);return n}const Fm=window.matchMedia("(hover: hover)").matches;function zm(t){const{mentions:e=[],instance:n,previewMode:o,statusURL:i}=t||{};return a=>{if(a.metaKey||a.ctrlKey||a.shiftKey||a.altKey||a.which===2)return;let{target:s}=a;if(s.closest(".shortcode-emoji")){const{naturalWidth:u,naturalHeight:f,width:m,height:p}=s,g=2;if(u>m*g||f>p*g){a.preventDefault(),a.stopPropagation(),H.showMediaModal={mediaAttachments:[{type:"image",url:s.src,description:s.title||s.alt}]};return}}if(s=s.closest("a"),!s||!a.currentTarget.contains(s))return;const{href:c}=s,l=s.previousSibling?.textContent,d=l?.endsWith("@"),h=s.innerText.startsWith("@");if((s.classList.contains("u-url")||s.classList.contains("mention"))&&h||d&&!h){const u=(s.querySelector("span")||s).innerText.trim(),f=u.replace(/^@/,""),m=e.find(p=>p.url===c)||e.find(p=>p.acct===f||p.username===f);if(m){a.preventDefault(),a.stopPropagation(),H.showAccount={account:m.acct,instance:n};return}else if(!/^http/i.test(u)){a.preventDefault(),a.stopPropagation(),H.showAccount={account:c,instance:n};return}}else if(!o){const u=l?.endsWith("#");if(s.classList.contains("hashtag")||u){a.preventDefault(),a.stopPropagation();const f=s.innerText.replace(/^#/,"").trim(),m=n?`#/${n}/t/${f}`:`#/t/${f}`;location.hash=m;return}else if(H.unfurledLinks[c]?.url&&i!==c){a.preventDefault(),a.stopPropagation(),H.prevLocation={pathname:location.hash.replace(/^#/,"")},location.hash=`#${H.unfurledLinks[c].url}`;return}}try{const f=URL.parse(c).hostname.replace(/^www\./i,"");if(!s.innerText.toLowerCase().includes(f.toLowerCase())&&!Fm){a.preventDefault(),a.stopPropagation();const p=s.innerText.trim();H.showOpenLink={url:c,linkText:p}}}catch{}}}function fe(t){try{return Dt.number(t,{notation:"compact",roundingMode:"floor"})}catch{return t}}const Bm={"@mastodon/edit-media-attributes":">=4.1","@mastodon/list-exclusive":">=4.2","@gotosocial/list-exclusive":">=0.17","@mastodon/filtered-notifications":"~4.3 || >=4.3","@mastodon/fetch-multiple-statuses":"~4.3 || >=4.3","@mastodon/trending-link-posts":"~4.3 || >=4.3","@mastodon/annual-report":"~4.4 || >=4.4","@mastodon/endorsements":"~4.4 || >=4.4"},Bo=/pixelfed/i,re=/^(?!.*pixelfed).*$/i,Vm=/pleroma/i,Hm=/akkoma/i;const Ti={"@mastodon/lists":re,"@mastodon/filters":re,"@mastodon/mentions":re,"@mastodon/trending-hashtags":re,"@mastodon/trending-links":re,"@mastodon/post-bookmark":re,"@mastodon/post-edit":re,"@mastodon/profile-edit":re,"@mastodon/profile-private-note":re,"@mastodon/pinned-posts":re,"@pixelfed/trending":Bo,"@pixelfed/home-include-reblogs":Bo,"@pixelfed/global-feed":Bo,"@pleroma/local-visibility-post":Vm,"@akkoma/local-visibility-post":Hm},Wn={};function Zn(t){try{let{version:e,domain:n}=Ka(),o=Ua()?.software?.name||"mastodon";o==="hometown"&&(o="mastodon");const i=`${n}-${t}`;if(Wn[i])return Wn[i];if(Ti[t])return Wn[i]=Ti[t].test(e);const a=Bm[t];if(!a)return!1;const c=t.match(/^@([a-z]+)\//)[1]===o.toLowerCase();return Wn[i]=c&&Wa(e,a,{includePrerelease:!0,loose:!0})}catch{return!1}}function $v({skeleton:t,account:e,avatarSize:n="xl",useAvatarStatic:o=!1,instance:i,external:a,internal:s,onClick:c,showActivity:l=!1,showStats:d=!1,accountInstance:h,hideDisplayName:u=!1,relationship:f={},excludeRelationshipAttrs:m=[]}){const{_:p}=Yt();if(t)return r("div",{class:"account-block skeleton",children:[r(pe,{size:n}),r("span",{children:[r("b",{children:"████████"}),r("br",{}),r("span",{class:"account-block-acct",children:"██████"})]})]});if(!e)return null;const{id:g,acct:v,avatar:E,avatarStatic:w,displayName:k,username:T,emojis:y,url:S,statusesCount:b,lastStatusAt:x,bot:P,fields:D,note:C,group:L,followersCount:O,createdAt:I,locked:z,roles:B}=e;let[bt,G,ut]=v.match(/([^@]+)(@.+)/i)||[,v];h&&(ut=`@${h}`);const nt=ho(S),vt=D?.find(et=>!!et.verifiedAt&&!!et.value),ot={};for(const et in f)m.includes(et)||(ot[et]=f[et]);const rt=ot.following||ot.followedBy||ot.requested;return r("a",{class:"account-block",href:S,target:a?"_blank":null,title:ut?v:`@${v}`,onClick:et=>{if(!a){if(et.preventDefault(),c)return c(et);s?location.hash=`/${i}/a/${g}`:H.showAccount={account:e,instance:i}}},children:[r("div",{class:"avatar-container",children:r(pe,{url:o?w:E||w,staticUrl:o?void 0:w,size:n,squircle:P})}),r("span",{class:"account-block-content",children:[!u&&r(F,{children:k?r("b",{children:r(nn,{text:k,emojis:y})}):r("b",{children:T})})," ",r("span",{class:"account-block-acct bidi-isolate",children:[ut?"":"@",G,r("wbr",{}),ut,z&&r(F,{children:[" ",r(M,{icon:"lock",size:"s",alt:p({id:"G2fuEb"})})]})]}),B?.map(et=>r(F,{children:[" ",r("span",{class:"tag collapsed",children:[et.name,!!nt&&r(F,{children:[" ",r("span",{class:"more-insignificant",children:nt})]})]})]})),l&&r("div",{class:"account-block-stats",children:[r(R,{id:"ajzDof",values:{0:fe(b)}}),!!x&&r(F,{children:[" ","·"," ",r(R,{id:"f8bJ3C",values:{0:Sn(x,{hideTime:!0})}})]})]}),d&&r("div",{class:"account-block-stats",children:[P&&r(F,{children:r("span",{class:"tag collapsed",children:[r(M,{icon:"bot"})," ",r(R,{id:"9Vdq+j"})]})}),!!L&&r(F,{children:r("span",{class:"tag collapsed",children:[r(M,{icon:"group"})," ",r(R,{id:"L8fEEm"})]})}),rt&&r("div",{class:"shazam-container-horizontal",children:r("div",{class:"shazam-container-inner",children:ot.following&&ot.followedBy?r("span",{class:"tag minimal",children:r(R,{id:"7oRLbi"})}):ot.requested?r("span",{class:"tag minimal",children:r(R,{id:"Yx0Ud8"})}):ot.following?r("span",{class:"tag minimal",children:r(R,{id:"y6sq5j"})}):ot.followedBy?r("span",{class:"tag minimal",children:r(R,{id:"p3UO/y"})}):null})},f.id),!!O&&r("span",{class:"ib",children:r(R,{id:"Mn1E9C",values:{followersCount:O}})}),!!vt&&r("span",{class:"verified-field",children:[r(M,{icon:"check-circle",size:"s",alt:p({id:"QDEWii"})})," ",r("span",{dangerouslySetInnerHTML:{__html:Vs(vt.value,{emojis:y})}})]}),!P&&!L&&!rt&&!O&&!vt&&!!I&&r("span",{class:"created-at",children:r(R,{id:"PCcEFZ",values:{0:Sn(I,{hideTime:!0})},components:{0:r("time",{datetime:I})}})})]})]})]})}async function Nv(t,e={}){if(!t?.length)return;const{masto:n}=An(),o=Cr(),i=t.reduce((a,s)=>(!a.includes(s.id)&&!e[s.id]&&s.id!==o&&a.push(s.id),a),[]);if(!i.length)return null;try{return(await n.v1.accounts.relationships.fetch({id:i})).reduce((c,l)=>(c[l.id]=l,c),{})}catch{return null}}function Fv(t,e){return()=>Dt.number(t,{style:"unit",unit:e,unitDisplay:"long"})}const jm=Object.prototype.toString,Km=t=>jm.call(t)==="[object Error]",Um=new Set(["network error","Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Load failed","Network request failed","fetch failed","terminated"]);function Wm(t){return t&&Km(t)&&t.name==="TypeError"&&typeof t.message=="string"?t.message==="Load failed"?t.stack===void 0:Um.has(t.message):!1}function Zm(t){if(typeof t=="number"){if(t<0)throw new TypeError("Expected `retries` to be a non-negative number.");if(Number.isNaN(t))throw new TypeError("Expected `retries` to be a valid number or Infinity, got NaN.")}else if(t!==void 0)throw new TypeError("Expected `retries` to be a number or Infinity.")}function qn(t,e,{min:n=0,allowInfinity:o=!1}={}){if(e!==void 0){if(typeof e!="number"||Number.isNaN(e))throw new TypeError(`Expected \`${t}\` to be a number${o?" or Infinity":""}.`);if(!o&&!Number.isFinite(e))throw new TypeError(`Expected \`${t}\` to be a finite number.`);if(e{const o=n.retries-(e-1);return Object.freeze({error:t,attemptNumber:e,retriesLeft:o})};function Ym(t,e){const n=e.randomize?Math.random()+1:1;let o=Math.round(n*Math.max(e.minTimeout,1)*e.factor**(t-1));return o=Math.min(o,e.maxTimeout),o}async function Xm(t,e,n,o,i){let a=t;if(a instanceof Error||(a=new TypeError(`Non-error was thrown: "${a}". You should only throw errors.`)),a instanceof qm)throw a.originalError;if(a instanceof TypeError&&!Wm(a))throw a;const s=Gm(a,e,n);await n.onFailedAttempt(s);const c=Date.now();if(c-o>=i||e>=n.retries+1||!await n.shouldRetry(s))throw a;const l=Ym(e,n),d=i-(c-o);if(d<=0)throw a;const h=Math.min(l,d);h>0&&await new Promise((u,f)=>{const m=()=>{clearTimeout(p),n.signal?.removeEventListener("abort",m),f(n.signal.reason)},p=setTimeout(()=>{n.signal?.removeEventListener("abort",m),u()},h);n.unref&&p.unref?.(),n.signal?.addEventListener("abort",m,{once:!0})}),n.signal?.throwIfAborted()}async function Qm(t,e={}){if(e={...e},Zm(e.retries),Object.hasOwn(e,"forever"))throw new Error("The `forever` option is no longer supported. For many use-cases, you can set `retries: Infinity` instead.");e.retries??=10,e.factor??=2,e.minTimeout??=1e3,e.maxTimeout??=Number.POSITIVE_INFINITY,e.randomize??=!1,e.onFailedAttempt??=()=>{},e.shouldRetry??=()=>!0,qn("factor",e.factor,{min:0,allowInfinity:!1}),qn("minTimeout",e.minTimeout,{min:0,allowInfinity:!1}),qn("maxTimeout",e.maxTimeout,{min:0,allowInfinity:!0});const n=e.maxRetryTime??Number.POSITIVE_INFINITY;qn("maxRetryTime",n,{min:0,allowInfinity:!0}),e.factor>0||(e.factor=1),e.signal?.throwIfAborted();let o=0;const i=Date.now(),a=n;for(;o{try{const t=await LanguageDetector.availability();if(t==="unavailable")return;t==="available"?Oe=await LanguageDetector.create():(Oe=await LanguageDetector.create({monitor(e){e.addEventListener("downloadprogress",n=>{})}}),await Oe.ready)}catch{}})();const tp=async(t,e,n)=>{let o;const i=e;if(e==="auto"){if(!Oe?.detect)return{error:"No language detector"};try{e=(await Oe.detect(t))[0].detectedLanguage,o=e}catch(s){return{error:s}}}const a=`💬 BROWSER TRANSLATE ${t}`;console.groupCollapsed(a);try{const s=await Translator.availability({sourceLanguage:e,targetLanguage:n});if(s==="unavailable")return console.groupEnd(a),{error:`Unsupported language pair: ${e} -> ${n}`};let c;s==="available"?c=await Translator.create({sourceLanguage:e,targetLanguage:n}):(c=await Translator.create({sourceLanguage:e,targetLanguage:n,monitor(d){d.addEventListener("downloadprogress",h=>{})}}),await c.ready);const l=await c.translate(t);return console.groupEnd(a),{content:l,detectedSourceLanguage:o,provider:"browser"}}catch(s){return console.groupEnd(a),{error:s}}};var ep=Object.defineProperty,np=(t,e,n)=>e in t?ep(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Gn=(t,e,n)=>np(t,typeof e!="symbol"?e+"":e,n),fr=new Map,Yn=new WeakMap,Ai=0,op=void 0;function rp(t){return t?(Yn.has(t)||(Ai+=1,Yn.set(t,Ai.toString())),Yn.get(t)):"0"}function ip(t){return Object.keys(t).sort().filter(e=>t[e]!==void 0).map(e=>`${e}_${e==="root"?rp(t.root):t[e]}`).toString()}function sp(t){const e=ip(t);let n=fr.get(e);if(!n){const o=new Map;let i;const a=new IntersectionObserver(s=>{s.forEach(c=>{var l;const d=c.isIntersecting&&i.some(h=>c.intersectionRatio>=h);t.trackVisibility&&typeof c.isVisible>"u"&&(c.isVisible=d),(l=o.get(c.target))==null||l.forEach(h=>{h(d,c)})})},t);i=a.thresholds||(Array.isArray(t.threshold)?t.threshold:[t.threshold||0]),n={id:e,observer:a,elements:o},fr.set(e,n)}return n}function js(t,e,n={},o=op){if(typeof window.IntersectionObserver>"u"&&o!==void 0){const l=t.getBoundingClientRect();return e(o,{isIntersecting:o,target:t,intersectionRatio:typeof n.threshold=="number"?n.threshold:0,time:0,boundingClientRect:l,intersectionRect:l,rootBounds:l}),()=>{}}const{id:i,observer:a,elements:s}=sp(n),c=s.get(t)||[];return s.has(t)||s.set(t,c),c.push(e),a.observe(t),function(){c.splice(c.indexOf(e),1),c.length===0&&(s.delete(t),a.unobserve(t)),s.size===0&&(a.disconnect(),fr.delete(i))}}function ap(t){return typeof t.children!="function"}var zv=class extends ts{constructor(t){super(t),Gn(this,"node",null),Gn(this,"_unobserveCb",null),Gn(this,"handleNode",e=>{this.node&&(this.unobserve(),!e&&!this.props.triggerOnce&&!this.props.skip&&this.setState({inView:!!this.props.initialInView,entry:void 0})),this.node=e||null,this.observeNode()}),Gn(this,"handleChange",(e,n)=>{e&&this.props.triggerOnce&&this.unobserve(),ap(this.props)||this.setState({inView:e,entry:n}),this.props.onChange&&this.props.onChange(e,n)}),this.state={inView:!!t.initialInView,entry:void 0}}componentDidMount(){this.unobserve(),this.observeNode()}componentDidUpdate(t){(t.rootMargin!==this.props.rootMargin||t.root!==this.props.root||t.threshold!==this.props.threshold||t.skip!==this.props.skip||t.trackVisibility!==this.props.trackVisibility||t.delay!==this.props.delay)&&(this.unobserve(),this.observeNode())}componentWillUnmount(){this.unobserve()}observeNode(){if(!this.node||this.props.skip)return;const{threshold:t,root:e,rootMargin:n,trackVisibility:o,delay:i,fallbackInView:a}=this.props;this._unobserveCb=js(this.node,this.handleChange,{threshold:t,root:e,rootMargin:n,trackVisibility:o,delay:i},a)}unobserve(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)}render(){const{children:t}=this.props;if(typeof t=="function"){const{inView:m,entry:p}=this.state;return t({inView:m,entry:p,ref:this.handleNode})}const{as:e,triggerOnce:n,threshold:o,root:i,rootMargin:a,onChange:s,skip:c,trackVisibility:l,delay:d,initialInView:h,fallbackInView:u,...f}=this.props;return Za(e||"div",{ref:this.handleNode,...f},t)}};function cp({threshold:t,delay:e,trackVisibility:n,rootMargin:o,root:i,triggerOnce:a,skip:s,initialInView:c,fallbackInView:l,onChange:d}={}){var h;const[u,f]=V(null),m=N(d),[p,g]=V({inView:!!c,entry:void 0});m.current=d,Q(()=>{if(s||!u)return;let k;return k=js(u,(T,y)=>{g({inView:T,entry:y}),m.current&&m.current(T,y),y.isIntersecting&&a&&k&&(k(),k=void 0)},{root:i,rootMargin:o,threshold:t,trackVisibility:n,delay:e},l),()=>{k&&k()}},[Array.isArray(t)?t.toString():t,u,i,o,a,s,n,l,e]);const v=(h=p.entry)==null?void 0:h.target,E=N(void 0);!u&&v&&!a&&!s&&E.current!==v&&(E.current=v,g({inView:!!c,entry:void 0}));const w=[f,p.inView,p.entry];return w.ref=w[0],w.inView=w[1],w.entry=w[2],w}const ki=48,Vo={};function Ks({id:t,children:e}){const n=N(),o=!!Vo[t],[i,a]=V(!1),[s,c]=V(o||!1),{ref:l}=cp({root:null,rootMargin:`-${ki}px 0px 0px 0px`,trackVisibility:!0,delay:1e3,onChange:d=>{d&&(a(!0),t&&(Vo[t]=!0))},triggerOnce:!0,skip:s||i});return Q(()=>{if(!n.current)return;const d=n.current.getBoundingClientRect();d.bottom>ki&&(d.top({code:t,name:e})),{PHANPY_TRANSLANG_INSTANCES:Ci}=lp,mr=Ci?Ci.split(/\s+/):[],Us=es({limit:1,interval:2e3}),Ws=1e3*60*60;let Ho=0;function dp(t,e,n){return Qm(()=>{let i=mr[Ho];const a=t.length>2e3;let s;return a?s=fetch(`https://${i}/api/v1/translate`,{method:"POST",priority:"low",referrerPolicy:"no-referrer",headers:{"Content-Type":"application/json"},body:JSON.stringify({sl:e,tl:n,text:t})}):s=fetch(`https://${i}/api/v1/translate?sl=${encodeURIComponent(e)}&tl=${encodeURIComponent(n)}&text=${encodeURIComponent(t)}`,{priority:"low",referrerPolicy:"no-referrer"}),s.then(c=>{if(!c.ok)throw new Error(c.statusText);return c.json()}).then(c=>({provider:"translang",content:c.translated_text,detectedSourceLanguage:c.detected_language,pronunciation:c.pronunciation}))},{retries:3,onFailedAttempt:i=>{Ho=(Ho+1)%mr.length}})}const Zs=po(dp,{maxAge:Ws}),hp=po(Us(Zs),{maxAge:Ws}),fp=Us(tp);function mp({forceTranslate:t,sourceLanguage:e,onTranslate:n,text:o="",mini:i,autoDetected:a}){const{_:s}=Yt(),c=Bs(!0),[l,d]=V("default"),[h,u]=V(null),[f,m]=V(null),[p,g]=V(null),v=N(),E=e?mn(e):null,w=mn(c),k=N("auto");n||(n=async(...y)=>{if(Jm){const S=await fp(...y);if(S&&!S.error)return S}return i?await hp(...y):await Zs(...y)});const T=async()=>{d("loading");try{const{content:y,detectedSourceLanguage:S,provider:b,error:x,...P}=await n(o,k.current,c);if(y){if(S){const D=mn(S);g(D)}if(b==="translang"){const D=P?.pronunciation;D&&u(D)}m(y),d("default"),!i&&y.trim()!==o.trim()&&(v.current.open=!0,v.current.scrollIntoView({behavior:"smooth",block:"nearest"}))}else d("error")}catch{d("error")}};return Q(()=>{t&&T()},[t]),i?f&&f.trim()!==o.trim()&&p!==w?r(Ks,{children:r("div",{class:"status-translation-block-mini",children:[r(M,{icon:"translate",alt:s({id:"zVJKbG",values:{sourceLangText:E}})}),r("output",{lang:c,dir:"auto",title:h||"",children:f})]})}):null:r("div",{class:"status-translation-block",onClick:y=>{y.preventDefault()},children:r("details",{ref:v,children:[r("summary",{children:r("button",{type:"button",onClick:async y=>{y.preventDefault(),y.stopPropagation(),v.current.open=!v.current.open,l!=="loading"&&(f||T())},children:[r(M,{icon:"translate"})," ",r("span",{children:s(l==="loading"?{id:"Zxkt/v"}:e&&E&&!p?a?{id:"R20Yf9",values:{sourceLangText:E}}:{id:"h8zDAI",values:{sourceLangText:E}}:{id:"pi8x/S"})})]})}),r("div",{class:"translated-block",children:[r("div",{class:"translation-info insignificant",children:[r("select",{class:"translated-source-select",disabled:l==="loading",onChange:y=>{k.current=y.target.value,T()},children:up.map(y=>{const S=mn({code:y.code,fallback:y.name}),b=mn({code:y.code,locale:y.code}),x=b&&S!==b;return r("option",{value:y.code,children:y.code==="auto"?s({id:"Bze3gr",values:{0:p??"…"}}):x?`${b} - ${S}`:S})})})," ",r("span",{children:["→ ",w]}),r(ns,{abrupt:!0,hidden:l!=="loading"})]}),l==="error"?r("p",{class:"ui-state",children:r(R,{id:"m5LihO"})}):!!f&&r(F,{children:[r("output",{class:"translated-content",lang:c,dir:"auto",children:f}),!!h&&r("output",{class:"translated-pronunciation-content",tabIndex:-1,onClick:y=>{y.target.classList.toggle("expand")},children:h})]})]})]})})}const pp=mr?.length?mp:()=>null;function ve(t){return new Promise((e,n)=>{t.oncomplete=t.onsuccess=()=>e(t.result),t.onabort=t.onerror=()=>n(t.error)})}function qs(t,e){let n;const o=()=>{if(n)return n;const i=indexedDB.open(t);return i.onupgradeneeded=()=>i.result.createObjectStore(e),n=ve(i),n.then(a=>{a.onclose=()=>n=void 0},()=>{}),n};return(i,a)=>o().then(s=>a(s.transaction(e,i).objectStore(e)))}let jo;function Ne(){return jo||(jo=qs("keyval-store","keyval")),jo}function gp(t,e=Ne()){return e("readonly",n=>ve(n.get(t)))}function vp(t,e,n=Ne()){return n("readwrite",o=>(o.put(e,t),ve(o.transaction)))}function _p(t,e=Ne()){return e("readonly",n=>Promise.all(t.map(o=>ve(n.get(o)))))}function yp(t,e=Ne()){return e("readwrite",n=>(n.delete(t),ve(n.transaction)))}function bp(t,e=Ne()){return e("readwrite",n=>(t.forEach(o=>n.delete(o)),ve(n.transaction)))}function wp(t=Ne()){return t("readwrite",e=>(e.clear(),ve(e.transaction)))}function Ep(t,e){return t.openCursor().onsuccess=function(){this.result&&(e(this.result),this.result.continue())},ve(t.transaction)}function Tp(t=Ne()){return t("readonly",e=>{if(e.getAllKeys)return ve(e.getAllKeys());const n=[];return Ep(e,o=>n.push(o.key)).then(()=>n)})}function Si(t,e){const n=qs(t,e);return{set:(o,i)=>vp(o,i,n),get:o=>gp(o,n),getMany:o=>_p(o,n),del:o=>yp(o,n),delMany:o=>bp(o,n),clear:()=>wp(n),keys:()=>Tp(n)}}const Bv={drafts:Si("drafts-db","drafts-store"),catchup:Si("catchup-db","catchup-store")},Gs=Jt({}),Ap=!!document.startViewTransition;function Vv({children:t,statusID:e}){const n=N([]),[o,i]=V(!1),[a,s]=V(0);function c(m){m!==a&&(Ap?document.startViewTransition(()=>{s(m)}):s(m))}async function l(){const{masto:m}=An(),p=await m.v1.statuses.$select(e).history.list();p.sort((g,v)=>Date.parse(v.createdAt)-Date.parse(g.createdAt)),n.current=p}async function d(){try{await l(),i(!0),c(0)}catch{i(!1)}}function h(){n.current=[],i(!1),c(0)}function u(){c(m=>Math.min(m+1,n.current.length-1))}function f(){c(m=>Math.max(m-1,0))}return r(Gs.Provider,{value:{editHistoryRef:n,initEditHistory:d,exitEditHistory:h,editHistoryMode:o,editedAtIndex:a,prevEditedAt:u,nextEditedAt:f},children:t})}function kp(){return xt(Gs)}const $r=Jt();function Cp(t,e){if(!t?.length)return!1;const n=t.filter(s=>{const{filter:c}=s,l=c.context.includes(e);return l?c.expiresAt?Date.parse(c.expiresAt)>Date.now():l:!1});if(!n.length)return!1;if(n.some(s=>s.filter.filterAction==="hide"))return{action:"hide"};if(n.every(s=>s.filter.filterAction==="blur")){const s=n.map(c=>c.filter.title);return{action:"blur",titles:s,titlesStr:s.join(" • ")}}if(n.some(s=>!!s.filter.filterAction)){const s=n.map(c=>c.filter.title);return{action:"warn",titles:s,titlesStr:s.join(" • ")}}return!1}const yo=Bt(Cp);function Sp(t,e,n){const{filtered:o}=t;if(!o?.length||n&&t.account?.id===n)return!0;const a=yo(o,e);return a?a.action!=="hide":!0}function Hv(t,e){if(!t?.length)return[];if(!e)return t;const n=Cr();return t.filter(o=>Sp(o,e,n))}const Ko=document.createElement("div");function Uo(t){return t?(Ko.innerHTML=t,Ko.querySelectorAll(".invisible").forEach(e=>{e.remove()}),Ko.innerText.length):0}const pr="speechSynthesis"in window;function xp(t,e){if(pr)try{speechSynthesis.speaking&&speechSynthesis.cancel();const n=new SpeechSynthesisUtterance(t);e&&(n.lang=e),speechSynthesis.speak(n)}catch(n){alert(n)}}function Ip(t,e,n,o){var i=this,a=N(null),s=N(0),c=N(0),l=N(null),d=N([]),h=N(),u=N(),f=N(t),m=N(!0);f.current=t;var p=typeof window<"u",g=!e&&e!==0&&p;if(typeof t!="function")throw new TypeError("Expected a function");e=+e||0;var v=!!(n=n||{}).leading,E=!("trailing"in n)||!!n.trailing,w="maxWait"in n,k="debounceOnServer"in n&&!!n.debounceOnServer,T=w?Math.max(+n.maxWait||0,e):null;Q(function(){return m.current=!0,function(){m.current=!1}},[]);var y=lt(function(){var S=function(O){var I=d.current,z=h.current;return d.current=h.current=null,s.current=O,c.current=c.current||O,u.current=f.current.apply(z,I)},b=function(O,I){g&&cancelAnimationFrame(l.current),l.current=g?requestAnimationFrame(O):setTimeout(O,I)},x=function(O){if(!m.current)return!1;var I=O-a.current;return!a.current||I>=e||I<0||w&&O-s.current>=T},P=function(O){return l.current=null,E&&d.current?S(O):(d.current=h.current=null,u.current)},D=function O(){var I=Date.now();if(v&&c.current===s.current&&C(),x(I))return P(I);if(m.current){var z=e-(I-a.current),B=w?Math.min(z,T-(I-s.current)):z;b(O,B)}},C=function(){o&&o({})},L=function(){if(p||k){var O=Date.now(),I=x(O);if(d.current=[].slice.call(arguments),h.current=i,a.current=O,I){if(!l.current&&m.current)return s.current=a.current,b(D,e),v?S(a.current):u.current;if(w)return b(D,e),S(a.current)}return l.current||b(D,e),u.current}};return L.cancel=function(){var O=l.current;O&&(g?cancelAnimationFrame(l.current):clearTimeout(l.current)),s.current=0,d.current=a.current=h.current=l.current=null,O&&o&&o({})},L.isPending=function(){return!!l.current},L.flush=function(){return l.current?P(Date.now()):u.current},L},[v,w,e,T,E,g,p,k,o]);return y}function Lp(t,e,n){var o=n===void 0?{}:n,i=o.leading,a=o.trailing;return Ip(t,e,{maxWait:e,leading:i===void 0||i,trailing:a===void 0||a})}function Dp(t,e){var n=N(null),o=N(null);o.current=e;var i=N(null);Q(function(){a()});var a=Et(function(){var s=i.current,c=o.current,l=s||(c?c instanceof Element?c:c.current:null);n.current&&n.current.element===l&&n.current.subscriber===t||(n.current&&n.current.cleanup&&n.current.cleanup(),n.current={element:l,subscriber:t,cleanup:l?t(l):void 0})},[t]);return Q(function(){return function(){n.current&&n.current.cleanup&&(n.current.cleanup(),n.current=null)}},[]),Et(function(s){i.current=s,a()},[a])}function xi(t,e,n){return t[e]?t[e][0]?t[e][0][n]:t[e][n]:e==="contentBoxSize"?t.contentRect[n==="inlineSize"?"width":"height"]:void 0}function Mp(t){t===void 0&&(t={});var e=t.onResize,n=N(void 0);n.current=e;var o=t.round||Math.round,i=N(),a=V({width:void 0,height:void 0}),s=a[0],c=a[1],l=N(!1);Q(function(){return l.current=!1,function(){l.current=!0}},[]);var d=N({width:void 0,height:void 0}),h=Dp(Et(function(u){return(!i.current||i.current.box!==t.box||i.current.round!==o)&&(i.current={box:t.box,round:o,instance:new ResizeObserver(function(f){var m=f[0],p=t.box==="border-box"?"borderBoxSize":t.box==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",g=xi(m,p,"inlineSize"),v=xi(m,p,"blockSize"),E=g?o(g):void 0,w=v?o(v):void 0;if(d.current.width!==E||d.current.height!==w){var k={width:E,height:w};d.current.width=E,d.current.height=w,n.current?n.current(k):l.current||c(k)}})}),i.current.instance.observe(u,{box:t.box}),function(){i.current&&i.current.instance.unobserve(u)}},[t.box,o]),t.ref);return lt(function(){return{ref:h,width:s.width,height:s.height}},[h,s.width,s.height])}function bn({className:t="truncated"}={}){const e=N(),n=Lp(({height:o})=>{if(e.current){const{scrollHeight:i}=e.current;let a=i>o;if(a){const{height:s,maxHeight:c}=getComputedStyle(e.current),l=parseInt(c||s,10);a=i>l}e.current.classList.toggle(t,a)}},300);return Mp({ref:e,box:"border-box",onResize:n}),e}const wn={public:"earth",unlisted:"group",private:"lock",direct:"message",local:"building"},Re={public:{id:"7d1a0d"},local:{id:"d5zxa4"},unlisted:{id:"pPYeIN"},private:{id:"x5LEuB"},direct:{id:"IV4QaU"}},Pp=["\\\\\\[[\\s\\S]*?\\\\\\]","\\\\\\([\\s\\S]*?\\\\\\)"],Ii=new RegExp(Pp.join("|"),"g");function Rp(t){const e=["\\\\\\[","\\\\\\("],n=new RegExp(`(${e.join("|")})`),o=document.createTreeWalker(t,NodeFilter.SHOW_TEXT),i=[];let a;for(;a=o.nextNode();)i.push(a);for(const s of i){const c=s.textContent,l=c.match(n);if(!l)continue;const h=l[0]==="\\["?"\\]":"\\)",u=[s];let f=s,m=!1,p=c;if(c.includes(h))m=!0;else for(;f.nextSibling&&!m;){const g=f.nextSibling;if(g.nodeType===Node.TEXT_NODE)u.push(g),p+=g.textContent,g.textContent.includes(h)&&(m=!0);else if(g.nodeType===Node.ELEMENT_NODE&&g.tagName==="BR")u.push(g),p+=`
`;else break;f=g}if(m&&u.length>1){s.textContent=p;for(let g=1;g{if(Ii.lastIndex=0,!Ii.test(t))return null;const{_:i}=Yt(),[a,s]=V(!1),c=Et(async l=>{if(l.preventDefault(),l.stopPropagation(),a)s(!1),n();else try{const d=window.temml||(window.temml=(await A(async()=>{const{default:m}=await import("./temml-D21kwrgi.js");return{default:m}},[],import.meta.url))?.default);Rp(e.current);const h=e.current.innerHTML;d.renderMathInElement(e.current,{fences:"(",annotate:!0,throwOnError:!0,errorCallback:m=>{}});const u=e.current.querySelector("math.tml-display"),f=e.current.innerHTML!==h;u&&f?s(!0):(kt(i({id:"HBIZeo"})),s(!1),n())}catch{}},[a]);return r("div",{class:"math-block",children:[r(M,{icon:"formula",size:"s"})," ",r("span",{children:i({id:"/nf2x7"})})," ",r("button",{type:"button",class:"light small",onClick:c,children:i(a?{id:"AJqQb+"}:{id:"dP6iYK"})})]})},Ys=new Uint8Array(128);for(let t=0;t<83;t++)Ys["0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz#$%*+,-.:;=?@[]^_{|}~".charCodeAt(t)]=t;const ro=(t,e,n)=>{let o=0;for(;et>10.31475?Xs(t/Js+.052132,2.4):t/Qs,Wo=t=>~~(t>1227e-8?Js*Xs(t,.416666)-13.025:t*Qs+1),En=t=>(t<0?-1:1)*t*t,Li=t=>{for(t+=In/2;t>In;)t-=$p;const e=1.27323954*t-.405284735*En(t);return .225*(En(e)-e)+e};function Nr(t){const e=ro(t,2,6);return[e>>16,e>>8&255,e&255]}function Fp(t,e,n,o){const i=ro(t,0,1),a=i%9+1,s=~~(i/9)+1,c=a*s;let l=0,d=0,h=0,u=0,f=0,m=0,p=0,g=0,v=0,E=0,w=0,k=0;const T=(ro(t,1,2)+1)/13446*(o|1),y=new Float64Array(c*3),S=Nr(t);for(l=0;l<3;l++)y[l]=Np(S[l]);for(l=1;l"u",Vp=function(){return!Bp&&("ontouchstart"in window||navigator.maxTouchPoints>0)};var Hp=function(t){var e=t.x,n=t.y,o=t.scale;return"scale3d(".concat(o,",").concat(o,", 1) translate3d(").concat(e,"px, ").concat(n,"px, 0)")};var jp=Math.min,Kp=Math.max;function Di(t){var e=t.containerDimension,n=t.childDimension,o=t.padding,i=t.centerContained,a=n-e;return a+2*o<=0&&i?[a/2,a/2]:[jp(a+o,0)-o,Kp(0,a+o)]}var Mi=function(t,e){return e?"".concat(t," ").concat(e):t},Xn=Math.abs,Up=Math.min,Wp=Math.sqrt,na=typeof window>"u",Zp=na?!1:/(Mac)/i.test(navigator.platform),Ze=function(t){return t==="drag"},pn=function(t){return t==="zoom"},qp=function(t){return Zp&&t.ctrlKey},gn=function(t){t.stopPropagation(),t.preventDefault()},Pi=function(t,e){var n=t.x-e.x,o=t.y-e.y;return Wp(n*n+o*o)},Gp=function(t,e){var n=Pi(t[0],t[1]),o=Pi(e[0],e[1]);return o/n},Yp=function(t,e){return t>e-.01&&te?e:n},tg=function(t){return!(t.ctrlKey||t.metaKey)},eg=function(t){if(t){var e=t.offsetWidth,n=t.offsetHeight;if(e&&n)return{width:e,height:n};var o=getComputedStyle(t),i=parseFloat(o.width),a=parseFloat(o.height);if(a&&i)return{width:i,height:a}}return{width:0,height:0}},ng=function(t,e){return{x:e.x-t.x,y:e.y-t.y}},og=function(t,e){return t.x===e.x&&t.y===e.y},De=function(){},Jn={x:0,y:0},Oi=function(t){qa(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n._prevDragMovePoint=null,n._containerObserver=null,n._fingers=0,n._firstMove=!0,n._initialOffset=Ot({},Jn),n._interaction=null,n._isDoubleTap=!1,n._isOffsetsSet=!1,n._lastDragPosition=null,n._lastScale=1,n._lastTouchStart=0,n._lastZoomCenter=null,n._listenMouseMove=!1,n._nthZoom=0,n._offset=Ot({},Jn),n._startOffset=Ot({},Jn),n._startTouches=null,n._updatePlaned=!1,n._wheelTimeOut=null,n._zoomFactor=1,n._initialZoomFactor=1,n._draggingPoint=Ot({},Jn),n._ignoreNextClick=!1,n._containerRef=Ga(),n._handleClick=function(o){n._ignoreNextClick&&(n._ignoreNextClick=!1,o.stopPropagation())},n._onResize=function(){var o;!((o=n._containerRef)===null||o===void 0)&&o.current&&(n._updateInitialZoomFactor(),n._setupOffsets(),n._update())},n._handlerOnTouchEnd=n._handlerIfEnable(function(o){n._fingers=o.touches.length,n.props.shouldCancelHandledTouchEndEvents&&(pn(n._interaction)||Ze(n._interaction)&&(n._startOffset.x!==n._offset.x||n._startOffset.y!==n._offset.y))&&gn(o),Ze(n._interaction)&&!n._enoughToDrag()&&n._handleClick(o),n._updateInteraction(o)}),n._handlerOnTouchStart=n._handlerIfEnable(function(o){n._firstMove=!0,n._fingers=o.touches.length,n._detectDoubleTap(o)}),n._handlerOnTouchMove=n._handlerIfEnable(function(o){n._isDoubleTap||(n._collectInertia(o),n._firstMove?(n._updateInteraction(o),n._interaction&&gn(o),n._startOffset=Ot({},n._offset),n._startTouches=Qn(o.touches)):(pn(n._interaction)?n._startTouches&&n._startTouches.length===2&&o.touches.length===2&&n._handleZoom(o,Gp(n._startTouches,Qn(o.touches))):Ze(n._interaction)&&n._handleDrag(o),n._interaction&&(gn(o),n._update())),n._firstMove=!1)}),n._handlerWheel=function(o){if(!n.props.shouldInterceptWheel(o)){gn(o);var i=o.pageX,a=o.pageY,s=o.deltaY,c=o.deltaMode,l=1;(qp(o)||c===1)&&(l=15);var d={touches:[{pageX:i,pageY:a}]},h=n._getOffsetByFirstTouch(d),u=s*l;n._stopAnimation(),n._scaleTo(n._zoomFactor-u/n.props.wheelScaleFactor,h),n._update(),clearTimeout(n._wheelTimeOut),n._wheelTimeOut=setTimeout(function(){return n._sanitize()},100)}},n._handlers=n.props.isTouch()?[["touchstart",n._handlerOnTouchStart],["touchend",n._handlerOnTouchEnd],["touchmove",n._handlerOnTouchMove]]:[["mousemove",n.simulate(n._handlerOnTouchMove),n.props._document],["mouseup",n.simulate(n._handlerOnTouchEnd),n.props._document],["mousedown",n.simulate(n._handlerOnTouchStart)],["click",n._handleClick],["wheel",n._handlerWheel]],n}return e.prototype._handleDragStart=function(n){this._ignoreNextClick=!0,this.props.onDragStart(),this._stopAnimation(),this._resetInertia(),this._lastDragPosition=null,this._hasInteraction=!0,this._draggingPoint=this._offset,this._handleDrag(n)},e.prototype._handleDrag=function(n){var o=this._getOffsetByFirstTouch(n);this._enoughToDrag()?this._drag(o,this._lastDragPosition):this._virtualDrag(o,this._lastDragPosition),this._offset=this._sanitizeOffset(this._offset),this._lastDragPosition=o},e.prototype._resetInertia=function(){this._velocity=null,this._prevDragMovePoint=null},e.prototype._realizeInertia=function(){var n=this,o=this.props,i=o.inertiaFriction,a=o.inertia;if(!(!a||!this._velocity)){var s=this._velocity,c=s.x,l=s.y;if(c||l){this._stopAnimation(),this._resetInertia();var d=function(){if(c*=i,l*=i,!c&&!l)return n._stopAnimation();var h=Ot({},n._offset);if(n._addOffset({x:c,y:l}),n._offset=n._sanitizeOffset(n._offset),og(h,n._offset))return n._stopAnimation();n._update({isAnimation:!0})};this._animate(d,{duration:9999})}}},e.prototype._collectInertia=function(n){var o=n.touches;if(this.props.inertia){var i=Qn(o)[0],a=this._prevDragMovePoint;a&&(this._velocity=ng(i,a)),this._prevDragMovePoint=i}},e.prototype._handleDragEnd=function(){this.props.onDragEnd(),this._end(),this._realizeInertia()},e.prototype._handleZoomStart=function(){this.props.onZoomStart(),this._stopAnimation(),this._lastScale=1,this._nthZoom=0,this._lastZoomCenter=null,this._hasInteraction=!0},e.prototype._handleZoom=function(n,o){var i=Jp(this._getOffsetTouches(n)),a=o/this._lastScale;this._lastScale=o,this._nthZoom+=1,this._nthZoom>3&&(this._scale(a,i),this._drag(i,this._lastZoomCenter),this.props.enforceBoundsDuringZoom&&(this._offset=this._sanitizeOffset(this._offset))),this._lastZoomCenter=i},e.prototype._handleZoomEnd=function(){this.props.onZoomEnd(),this._end()},e.prototype._handleDoubleTap=function(n){var o=this;if(!(this._hasInteraction||this.props.tapZoomFactor===0)){var i=this.props.doubleTapZoomOutOnMaxScale&&this._zoomFactor===this.props.maxZoom||this.props.doubleTapToggleZoom&&this._zoomFactor>1;this.props.onDoubleTap(),this._ignoreNextClick=!0;var a=this._zoomFactor+this.props.tapZoomFactor,s=this._zoomFactor,c=function(d){o._scaleTo(s+d*(a-s),l)},l=this._getOffsetByFirstTouch(n);this._isDoubleTap=!0,s>a&&(l=this._getCurrentZoomCenter()),i?this._zoomOutAnimation():this._animate(c)}},e.prototype._computeInitialOffset=function(){var n=this._getContainerRect(),o=this._getChildSize(),i=o.width,a=o.height,s=-Xn(i*this._getInitialZoomFactor()-n.width)/2,c=-Xn(a*this._getInitialZoomFactor()-n.height)/2;this._initialOffset={x:s,y:c}},e.prototype._resetOffset=function(){this._offset=Ot({},this._initialOffset)},e.prototype._setupOffsets=function(){this.props.setOffsetsOnce&&this._isOffsetsSet||(this._isOffsetsSet=!0,this._computeInitialOffset(),this._resetOffset())},e.prototype._sanitizeOffset=function(n){var o=this._getContainerRect(),i=this._getChildSize(),a=i.width,s=i.height,c=a*this._getInitialZoomFactor()*this._zoomFactor,l=s*this._getInitialZoomFactor()*this._zoomFactor,d=Di({containerDimension:o.width,childDimension:c,padding:this.props.horizontalPadding,centerContained:this.props.centerContained}),h=d[0],u=d[1],f=Di({containerDimension:o.height,childDimension:l,padding:this.props.verticalPadding,centerContained:this.props.centerContained}),m=f[0],p=f[1];return{x:Zo(h,u,n.x),y:Zo(m,p,n.y)}},e.prototype.alignCenter=function(n){var o=this,i=Ot({duration:250,animated:!0},n),a=i.x,s=i.y,c=i.scale,l=i.animated,d=i.duration,h=a*this._initialZoomFactor,u=s*this._initialZoomFactor,f=this._zoomFactor,m=Ot({},this._offset),p=this._getContainerRect(),g={x:p.width/2,y:p.height/2};if(this._zoomFactor=1,this._offset={x:-(g.x-h),y:-(g.y-u)},this._scaleTo(c,g),this._stopAnimation(),!l)return this._update();var v=this._zoomFactor-f,E={x:this._offset.x-m.x,y:this._offset.y-m.y};this._zoomFactor=f,this._offset=Ot({},m);var w=function(k){var T=m.x+E.x*k,y=m.y+E.y*k;o._zoomFactor=f+v*k,o._offset=o._sanitizeOffset({x:T,y}),o._update()};this._animate(w,{callback:function(){return o._sanitize()},duration:d})},e.prototype.scaleTo=function(n){var o=this,i=Ot({duration:250,animated:!0},n),a=i.x,s=i.y,c=i.scale,l=i.animated,d=i.duration,h=this._zoomFactor,u=Ot({},this._offset);if(this._zoomFactor=1,this._offset={x:0,y:0},this._scaleTo(c,{x:a,y:s}),this._stopAnimation(),!l)return this._update();var f=this._zoomFactor-h,m={x:this._offset.x-u.x,y:this._offset.y-u.y};this._zoomFactor=h,this._offset=Ot({},u);var p=function(g){var v=u.x+m.x*g,E=u.y+m.y*g;o._zoomFactor=h+f*g,o._offset={x:v,y:E},o._update()};this._animate(p,{callback:function(){return o._sanitize()},duration:d})},e.prototype._scaleTo=function(n,o){this._scale(n/this._zoomFactor,o),this._offset=this._sanitizeOffset(this._offset)},e.prototype._scale=function(n,o){n=this._scaleZoomFactor(n),this._addOffset({x:(n-1)*(o.x+this._offset.x),y:(n-1)*(o.y+this._offset.y)}),this.props.onZoomUpdate()},e.prototype._scaleZoomFactor=function(n){var o=this._zoomFactor;return this._zoomFactor*=n,this._zoomFactor=Zo(this.props.minZoom,this.props.maxZoom,this._zoomFactor),this._zoomFactor/o},e.prototype._canDrag=function(){return this.props.draggableUnZoomed||!Yp(this._zoomFactor,1)},e.prototype._drag=function(n,o){if(o){var i=-(n.y-o.y),a=-(n.x-o.x);this.props.lockDragAxis?Xn(a)>Xn(i)?this._addOffset({x:a,y:0}):this._addOffset({y:i,x:0}):this._addOffset({x:a,y:i}),this.props.onDragUpdate()}},e.prototype._virtualDrag=function(n,o){if(o){var i=-(n.y-o.y),a=-(n.x-o.x);this._draggingPoint={x:a+this._draggingPoint.x,y:i+this._draggingPoint.y}}},e.prototype._addOffset=function(n){var o=this._offset,i=o.x,a=o.y;this._offset={x:i+n.x,y:a+n.y}},e.prototype._sanitize=function(){this._zoomFactor=d?(n(1),i._stopAnimation(),l(),i._update()):(f=c(f),n(f),i._update({isAnimation:!0}),requestAnimationFrame(h))}};this._inAnimation=!0,requestAnimationFrame(h)},e.prototype._stopAnimation=function(){this._inAnimation=!1},e.prototype._end=function(){this._hasInteraction=!1,this._sanitize(),this._update()},e.prototype._getContainerRect=function(){var n=this._containerRef.current;return n.getBoundingClientRect()},e.prototype._getChildSize=function(){var n=this._containerRef.current;return eg(n?.firstElementChild)},e.prototype._updateInitialZoomFactor=function(){var n=this._getContainerRect(),o=this._getChildSize(),i=n.width/o.width,a=n.height/o.height;this._initialZoomFactor=Up(i,a)},e.prototype._bindEvents=function(){var n=this,o=this._containerRef.current;window.ResizeObserver?(this._containerObserver=new ResizeObserver(this._onResize),this._containerObserver.observe(o)):window.addEventListener("resize",this._onResize),this._handlers.forEach(function(i){var a=i[0],s=i[1],c=i[2];(c||o).addEventListener(a,s,!0)}),Array.from(o.querySelectorAll("img")).forEach(function(i){return i.addEventListener("load",n._onResize)})},e.prototype._unSubscribe=function(){var n=this,o=this._containerRef.current;this._containerObserver&&(this._containerObserver.disconnect(),this._containerObserver=null),window.removeEventListener("resize",this._onResize),this._handlers.forEach(function(i){var a=i[0],s=i[1],c=i[2];(c||o).removeEventListener(a,s,!0)}),Array.from(o.querySelectorAll("img")).forEach(function(i){return i.removeEventListener("load",n._onResize)})},e.prototype._update=function(n){var o=this;if(!this._updatePlaned){var i=function(){var a=o._getInitialZoomFactor()*o._zoomFactor,s=-o._offset.x/a,c=-o._offset.y/a;o.props.onUpdate({scale:a,x:s,y:c})};if(n?.isAnimation)return i();this._updatePlaned=!0,requestAnimationFrame(function(){o._updatePlaned=!1,i()})}},e.prototype._handlerIfEnable=function(n){var o=this;return function(){for(var i=[],a=0;ao?n-o:o-n},e.prototype._enoughToDrag=function(){return this._distanceBetweenNumbers(this._startOffset.x,this._draggingPoint.x)>5||this._distanceBetweenNumbers(this._startOffset.y,this._draggingPoint.y)>5},e.prototype._updateInteraction=function(n){var o=this._fingers;if(o===2)return this._setInteraction("zoom",n);if(o===1&&this._canDrag())return this._setInteraction("drag",n);this._setInteraction(null,n)},e.prototype._detectDoubleTap=function(n){var o=new Date().getTime();this._fingers>1&&(this._lastTouchStart=0),o-this._lastTouchStart<300?(gn(n),this._handleDoubleTap(n),pn(this._interaction)?this._handleZoomEnd():Ze(this._interaction)&&this._handleDragEnd()):this._isDoubleTap=!1,this._fingers===1&&(this._lastTouchStart=o)},e.prototype.simulate=function(n){var o=this;return function(i){var a=i.pageX,s=i.pageY,c=i.type,l=c==="mouseup",d=c==="mousedown";d&&(i.preventDefault(),o._listenMouseMove=!0),o._listenMouseMove&&(i.touches=l?[]:[{pageX:a,pageY:s}],n(i)),l&&(o._listenMouseMove=!1)}},e.prototype.componentDidMount=function(){this._bindEvents(),this._update()},e.prototype.componentWillUnmount=function(){this._stopAnimation(),this._unSubscribe()},e.prototype.render=function(){var n=this.props,o=n.children,i=n.containerProps,a=Ya.only(o),s=i||{};return Hn.createElement(Hn.Fragment,null,Hn.createElement("style",null,zp),Hn.createElement("div",Ot({},s,{ref:this._containerRef,className:Mi(ta,s.className)}),Qi(a,{className:Mi(ea,a.props.className)})))},e.defaultProps={animationDuration:250,draggableUnZoomed:!0,enforceBoundsDuringZoom:!1,centerContained:!1,enabled:!0,inertia:!0,inertiaFriction:.96,horizontalPadding:0,isTouch:Vp,lockDragAxis:!1,maxZoom:5,minZoom:.5,onDoubleTap:De,onDragEnd:De,onDragStart:De,onDragUpdate:De,onZoomEnd:De,onZoomStart:De,onZoomUpdate:De,setOffsetsOnce:!1,shouldInterceptWheel:tg,shouldCancelHandledTouchEndEvents:!1,tapZoomFactor:1,verticalPadding:0,wheelScaleFactor:1500,zoomOutFactor:1.3,doubleTapZoomOutOnMaxScale:!1,doubleTapToggleZoom:!1,_document:na?null:window.document},e}(ts);if(0)var jv,Kv,Uv,Wv,Zv,qv,Gv;function qo(t){if(!t)return;let e=Math.floor(t/3600),n=Math.floor(t%3600/60),o=Math.round(t%60);return e===0?`${n}:${o.toString().padStart(2,"0")}`:`${e}:${n.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}`}const rg=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),ig="ALT",Go=t=>{const{_:e}=Yt(),{alt:n,lang:o,index:i,...a}=t;return!n||!n.trim()?null:r("button",{type:"button",class:"alt-badge clickable",...a,onClick:s=>{s.stopPropagation(),s.preventDefault(),H.showMediaAlt={alt:n,lang:o}},title:e({id:"5gfDMm"}),children:[ig,!!i&&r("sup",{children:i})]})},sg=140,ag=280,oa=Bt(t=>t?.length?t.length>sg||/[\n\r].*[\n\r]/.test(t.trim()):!1);function cg({class:t="",media:e,to:n,lang:o,showOriginal:i,autoAnimate:a,showCaption:s,allowLongerCaption:c,altIndex:l,checkAspectRatio:d=!0,onClick:h}){let{id:u,blurhash:f,description:m,meta:p,previewRemoteUrl:g,previewUrl:v,remoteUrl:E,url:w,type:k}=e;/no\-preview\./i.test(v)&&(v=null);const T=lg(u||f||w),{original:y={},small:S,focus:b}=p||{},x=i?y?.width:S?.width||y?.width,P=i?y?.height:S?.height||y?.height,D=i?w:v||w,C=i?E:g||E,L=S?.width&&S?.height,I=x&&P?x>P?"landscape":"portrait":null,z=f?Nr(f):null,B=N();let bt;if(b){const j=(b.x+1)/2*100,Y=(1-b.y)/2*100;bt=`${j.toFixed(0)}% ${Y.toFixed(0)}%`}const G=N(),ut=Et(({x:j,y:Y,scale:W})=>{const{current:q}=G;if(q){const at=Hp({x:j,y:Y,scale:W});W===1?q.style.removeProperty("transform"):q.style.setProperty("transform",at),q.closest(".media-zoom").style.touchAction=W<=1.01?"pan-x":""}},[]),[nt,vt]=V(!1),ot={enabled:nt,draggableUnZoomed:!1,inertiaFriction:.9,tapZoomFactor:2,doubleTapToggleZoom:!0,containerProps:{className:"media-zoom",style:{overflow:"visible"}},onUpdate:ut},[rt,et]=V(!1),Mt=lt(()=>n&&!rt?j=>r(Je,{to:n,...j}):"div",[n,rt]),ft=C?$i(C):null,Ut=k==="unknown"&&ft&&/\.(mp4|m4r|m4v|mov|webm)$/i.test(ft.pathname),Xt=k==="unknown"&&ft&&/\.(mp3|ogg|wav|m4a|m4p|m4b)$/i.test(ft.pathname),Qt=k==="image"||k==="unknown"&&v&&!Ut&&!Xt,U=v&&/\.(mp4|m4r|m4v|mov|webm)$/i.test($i(v).pathname),Tt=N(),[mt,te]=V(!1);$e(()=>{if(!Qt||!i||!Tt.current)return;const{offsetWidth:j,offsetHeight:Y}=Tt.current,W=x{const{children:Y,...W}=j;return r("figure",{...W,children:[Y,r("figcaption",{class:"media-caption",lang:o,dir:"auto",onClick:q=>{q.preventDefault(),q.stopPropagation(),H.showMediaAlt={alt:m,lang:o}},children:m})]})}:F,[gt,_e]=V(void 0),It=()=>window.matchMedia("(min-width: calc(40em + 350px))").matches?"large":"small",Fe=Et(j=>{const Y=j.target.closest(".status-deck");if(i||It()==="large"&&Y||!document.startViewTransition){h?.(j);return}const W=j.target.closest("[data-view-transition-name]")||j.target.querySelector("[data-view-transition-name]");if(W)if(h)h(j);else if(j.preventDefault(),W.dataset.viewTransitioned){W.style.viewTransitionName=T;try{document.startViewTransition(()=>{W.style.viewTransitionName="",location.hash=`#${n}`})}catch{W.style.viewTransitionName="",location.hash=`#${n}`}}else location.hash=`#${n}`;else h?.(j)},[T,i,h]);if(Qt)return ot.containerProps.style.display="inherit",$e(()=>{rg&&i&&(async()=>{try{await fetch(D,{mode:"no-cors"}),G.current.src=D}catch{}})()},[D]),r(J,{children:[r(Mt,{ref:Tt,class:`media media-image ${t}`,onClick:Fe,"data-orientation":I,"data-has-alt":!dt||void 0,"data-has-natural-aspect-ratio":gt||void 0,style:i?{backgroundImage:`url(${v})`,"--bg-image":`url(${v})`,backgroundSize:mt?`${x}px ${P}px`:void 0,...tt}:pt,children:i?r(Oi,{...ot,children:r("img",{ref:G,src:D,alt:m,width:x,height:P,"data-orientation":I,loading:"eager",decoding:"sync",style:{"view-transition-name":T},onLoad:j=>{const Y=j.target,W=Y.closest(".media-image");W&&(W.style.backgroundImage=`url(${Y.src})`,W.style.removeProperty("--bg-image")),Y.closest(".media-zoom").style.display="",vt(!0)},onError:j=>{const{src:Y}=j.target;Y===D&&C&&D!==C&&(j.target.src=C)}})}):r(F,{children:[r("img",{src:D,alt:dt?"":m,width:x,height:P,"data-orientation":I,loading:"lazy","data-view-transition-name":T,style:{objectPosition:bt||"center","--anim-duration":`${Math.min(Math.max(Math.max(x,P)/100,5),120)}s`},onLoad:j=>{j.target.dataset.loaded=!0;const Y=j.target.closest(".media");if(!L&&Y){const{naturalWidth:W,naturalHeight:q}=j.target;Y.dataset.orientation=W>q?"landscape":"portrait",Y.style.setProperty("--width",`${W}px`),Y.style.setProperty("--height",`${q}px`),Y.style.aspectRatio=`${W}/${q}`}if(d&&Y){const{clientWidth:W,clientHeight:q,naturalWidth:at,naturalHeight:Pt}=j.target;if(W&&q&&at&&Pt)if(at<88||Pt<88)Y.dataset.hasSmallDimension=!0;else{const Nt=Pt*W/at;Math.abs(Nt-q)<5&&_e(!0)}}},onError:j=>{const{src:Y}=j.target;Y===D&&D!==C?j.target.src=C:et(!0)}}),!dt&&r(Go,{alt:m,lang:o,index:l})]})}),rt&&r("div",{children:r("a",{href:E,class:"button plain6 small",target:"_blank",children:[r(M,{icon:"external"})," ",r("span",{children:r(R,{id:"9npOH9"})})]})})]});if(k==="gifv"||k==="video"||Ut){const j=y.duration>0,Y=y.duration<31,W=k==="gifv"&&Y,q=y.duration<61,at=qo(y.duration),Pt=!i&&!a&&W,it=!i&&a&&W,Nt=y.duration>5,ze=`
`,jt=`
`;return r(J,{children:r(Mt,{ref:Tt,class:`media ${t} media-${W?"gif":"video"} ${it?"media-contain":""} ${Pt?"media-hover-animate":""}`,"data-orientation":I,"data-formatted-duration":i?void 0:at,"data-label":W&&!i&&!it?"GIF":void 0,"data-has-alt":!dt||void 0,style:!i&&pt,onClick:yt=>{if(Pt)try{B.current.pause()}catch{}Fe(yt)},onMouseEnter:()=>{if(Pt)try{B.current.play()}catch{}},onMouseLeave:()=>{if(Pt)try{B.current.pause()}catch{}},onFocus:()=>{if(Pt)try{B.current.play()}catch{}},onBlur:()=>{if(Pt)try{B.current.pause()}catch{}},children:[i||it?W&&i?r(Oi,{...ot,enabled:!0,children:r("div",{ref:G,dangerouslySetInnerHTML:{__html:ze}})}):W?r("div",{class:"video-container",dangerouslySetInnerHTML:{__html:ze}}):r("div",{class:"video-container",dangerouslySetInnerHTML:{__html:jt}}):W?r("video",{ref:B,src:w,poster:v,width:x,height:P,"data-orientation":I,"data-view-transition-name":T,preload:"auto",playsinline:!0,loop:!0,muted:!0,onTimeUpdate:Nt?yt=>{const{target:Rt}=yt,Ft=Rt?.closest(".media-gif");if(Ft){const Lt=Rt.currentTime/Rt.duration*100;Ft.style.setProperty("--progress",`${Lt}%`)}}:void 0}):r(F,{children:[v&&!U?r("img",{src:v,alt:dt?"":m,width:x,height:P,"data-orientation":I,loading:"lazy",decoding:"async","data-view-transition-name":T,onLoad:yt=>{if(!L){const Rt=yt.target.closest(".media");if(Rt){const{naturalHeight:Ft,naturalWidth:Lt}=yt.target;Rt.dataset.orientation=Lt>Ft?"landscape":"portrait",Rt.style.setProperty("--width",`${Lt}px`),Rt.style.setProperty("--height",`${Ft}px`),Rt.style.aspectRatio=`${Lt}/${Ft}`}}}}):r("video",{src:w+"#t=0.1",width:x,height:P,"data-orientation":I,"data-view-transition-name":T,preload:"metadata",muted:!0,disablePictureInPicture:!0,onLoadedMetadata:yt=>{if(!j){const{duration:Rt}=yt.target;if(Rt){const Ft=qo(Rt),Lt=yt.target.closest(".media-video");Lt&&(Lt.dataset.formattedDuration=Ft)}}}}),r("div",{class:"media-play",children:r(M,{icon:"play",size:"xl",alt:"▶"})})]}),!i&&!dt&&r(Go,{alt:m,lang:o,index:l})]})})}else if(k==="audio"||Xt){const j=qo(y.duration);return r(J,{children:r(Mt,{class:`media media-audio ${t}`,"data-formatted-duration":i?void 0:j,"data-has-alt":!dt||void 0,onClick:h,style:!i&&pt,children:[i?r("audio",{src:E||w,preload:"none",controls:!0,autoPlay:!0}):v?r("img",{src:v,alt:dt?"":m,width:x,height:P,"data-orientation":I,loading:"lazy",onError:Y=>{try{Y.target?.remove?.()}catch{}}}):null,!i&&r(F,{children:[r("div",{class:"media-play",children:r(M,{icon:"play",size:"xl",alt:"▶"})}),!dt&&r(Go,{alt:m,lang:o,index:l})]})]})})}}function $i(t){return URL.parse(t,location.origin)}function lg(t){let e=t.replace(/[^a-zA-Z0-9_-]/g,"-");return e.match(/^[0-9-]/)&&(e="vt-"+e),e}const gr=rn(cg,(t,e)=>{const n=t.media||{},o=e.media||{};return n?.id===o?.id&&n.url===o.url&&t.to===e.to&&t.class===e.class});function ug(t){const{mediaAttachments:e,language:n,postID:o,instance:i}=t,a=e.length>1,s=N(),[c,l]=V(0);return Q(()=>{let d=()=>{const{clientWidth:h,scrollLeft:u}=s.current,f=Math.round(Math.abs(u)/h);l(f)};return s.current&&s.current.addEventListener("scroll",d,{passive:!0}),()=>{s.current&&s.current.removeEventListener("scroll",d)}},[]),r(F,{children:[r("div",{class:"media-first-container",children:[r("div",{class:"media-first-carousel",ref:s,children:e.map((d,h)=>r("div",{class:"media-first-item",children:r(gr,{media:d,lang:n,to:`/${i}/s/${o}?media=${h+1}`})},d.id))}),a&&r("div",{class:"media-carousel-controls",children:[r("div",{class:"carousel-indexer",children:[c+1,"/",e.length]}),r("label",{class:"media-carousel-button",children:r("button",{type:"button",class:"carousel-button",hidden:c===0,onClick:d=>{d.preventDefault(),d.stopPropagation(),s.current.focus(),s.current.scrollTo({left:s.current.clientWidth*(c-1)*(lr()?-1:1),behavior:"smooth"})},children:r(M,{icon:"arrow-left"})})}),r("label",{class:"media-carousel-button",children:r("button",{type:"button",class:"carousel-button",hidden:c===e.length-1,onClick:d=>{d.preventDefault(),d.stopPropagation(),s.current.focus(),s.current.scrollTo({left:s.current.clientWidth*(c+1)*(lr()?-1:1),behavior:"smooth"})},children:r(M,{icon:"arrow-right"})})})]})]}),a&&r("div",{class:"media-carousel-dots",style:{"--dots-count":e.length},children:e.map((d,h)=>r("span",{class:`carousel-dot ${h===c?"active":""}`},d.id))})]})}function dg(t){const{enabled:e,children:n,lang:o,captionChildren:i}=t;return!e||!i?n:r("figure",{class:"media-figure-multiple",children:[n,r("figcaption",{lang:o,dir:"auto",children:i})]})}function hg({poll:t,lang:e,readOnly:n,refresh:o=()=>{},votePoll:i=()=>{}}){const{_:a}=Yt(),[s,c]=V("default"),{expired:l,expiresAt:d,id:h,multiple:u,options:f,ownVotes:m,voted:p,votersCount:g,votesCount:v=0,emojis:E}=t,w=!!d&&new Date(d),k=u&&g||v;let T=0;k<=1e3?T=0:k<=1e4?T=1:k<=1e5&&(T=2);const[y,S]=V(!1),b=f.every(x=>x.votesCount!==null);return r("div",{lang:e,dir:"auto",class:`poll ${n?"read-only":""} ${s==="loading"?"loading":""}`,children:[y&&b||p||l?r(F,{children:[r("div",{class:"poll-options",children:f.map((x,P)=>{const{title:D,votesCount:C}=x,L=k?C/k:0,O=L?L.toLocaleString(Dt.locale||void 0,{style:"percent",maximumFractionDigits:T}):"0%",I=C>0&&C===Math.max(...f.map(z=>z.votesCount));return r("div",{class:`poll-option poll-result ${I?"poll-option-leading":""}`,style:{"--percentage":`${L*100}%`},children:[r("div",{class:"poll-option-title",children:[r("span",{children:r(nn,{text:D,emojis:E})}),p&&m.includes(P)&&r(F,{children:[" ",r(M,{icon:"check-circle",alt:a({id:"IeO7us"})})]})]}),r("div",{class:"poll-option-votes",title:Dt._({id:"+syLpm",values:{optionVotesCount:C}}),children:O})]},`${P}-${D}-${C}`)})}),!l&&!p&&r("button",{class:"poll-vote-button plain2",disabled:s==="loading",onClick:x=>{x.preventDefault(),S(!1)},children:[r(M,{icon:"arrow-left",size:"s"})," ",r(R,{id:"L96xSt"})]})]}):r("form",{onSubmit:async x=>{x.preventDefault();const P=x.target,D=new FormData(P),C=[];D.forEach((L,O)=>{O==="poll"&&C.push(L)}),C.length&&(c("loading"),await i(C),c("default"))},children:[r("div",{class:"poll-options",children:f.map((x,P)=>{const{title:D}=x;return r("div",{class:"poll-option",children:r("label",{class:"poll-label",children:[r("input",{type:u?"checkbox":"radio",name:"poll",value:P,disabled:s==="loading",readOnly:n}),r("span",{class:"poll-option-title",children:r(nn,{text:D,emojis:E})})]})})})}),!n&&r("button",{class:"poll-vote-button",type:"submit",disabled:s==="loading",children:r(R,{id:"lQXQKs"})})]}),r("p",{class:"poll-meta",children:[!l&&!n&&r("button",{type:"button",class:"plain small",disabled:s==="loading",onClick:x=>{x.preventDefault(),c("loading"),(async()=>(await o(),c("default")))()},title:a({id:"lCF0wC"}),children:r(M,{icon:"refresh",alt:a({id:"lCF0wC"})})}),!p&&!l&&!n&&b&&r("button",{type:"button",class:"plain small",disabled:s==="loading",onClick:x=>{x.preventDefault(),S(!y)},title:a(y?{id:"L96xSt"}:{id:"zCjei3"}),children:[r(M,{icon:y?"eye-open":"eye-close",alt:a(y?{id:"L96xSt"}:{id:"zCjei3"})})," "]}),!l&&!n&&" ",r(R,{id:"k7v0Rh",values:{0:fe(v),1:fe(v),votesCount:v},components:{0:r("span",{title:v}),1:r("span",{title:v})}}),!!g&&g!==v&&r(F,{children:[" ","•"," ",r(R,{id:"jf1i1L",values:{0:fe(g),1:fe(g),votersCount:g},components:{0:r("span",{title:g}),1:r("span",{title:g})}})]})," ","•"," ",l?w?r(R,{id:"5LwCCI",components:{0:r(me,{datetime:w})}}):a({id:"237hSL"}):w?r(R,{id:"ooHDPY",components:{0:r(me,{datetime:w})}}):a({id:"O2tNG0"})]})]})}const fg=/^http/i,Ni=({post:t,instance:e,previewMode:n})=>{const{content:o,emojis:i,language:a,mentions:s,url:c}=t,l=N();return $e(()=>{if(!l.current)return;const d=Vs(o,{emojis:i,returnDOM:!0});for(const h of d.querySelectorAll('a.u-url[target="_blank"]'))fg.test(h.innerText.trim())||h.removeAttribute("target");l.current.replaceChildren(d.cloneNode(!0))},[o,i?.length]),r("div",{ref:l,lang:a,dir:"auto",class:"inner-content",onClick:zm({mentions:s,instance:e,previewMode:n,statusURL:c})})};var Yo,Fi;function mg(){return Fi||(Fi=1,Yo=(e,n={})=>{const o=n.char||" ",i=n.count||2;let a=0;const s=[];return e.reverse().reduce((c,l)=>{s.length&&a&&s[a]&&s[a]===l.substring(1,s[a].length+1)&&(s.splice(a,1),a--);const h=[`${o.repeat(a?a*i:0)}${l}`,...c];return l.substring(0,2)===""&&(a++,s[a]=l.substring(2,l.length-1)),h},[]).join(`
`)}),Yo}var Xo,zi;function pg(){if(zi)return Xo;zi=1;const t=n=>n.trim().replace(/(^(\s|\t)+|(( |\t)+)$)/gm,"");return Xo={mergeAttributesWithElements:n=>{const o=t(n).split(`
`),i=[];let a="";for(let s=0;s")){i.push(`${a}${c.slice(0,-2)} />`),a="";continue}if(c.endsWith(">")){i.push(`${a}${c.startsWith(">")||c.startsWith("<")?"":" "}${c}`),a="";continue}a+=a.length?` ${c}`:c}return i},removeEmptyLines:t},Xo}var Qo,Bi;function gg(){if(Bi)return Qo;Bi=1;const t=mg(),{mergeAttributesWithElements:e}=pg();return Qo=(o,i={})=>{const a=e(o);return t(a,i)},Qo}var vg=gg();const _g=Xi(vg);function ra(t,e,n=0){const{account:{url:o,displayName:i,acct:a,username:s,emojis:c,bot:l,group:d},id:h,poll:u,spoilerText:f,language:m,editedAt:p,createdAt:g,content:v,mediaAttachments:E,url:w,emojis:k}=t,T=ce(h,e),S=(H.statusQuotes[T]||[]).filter((C,L,O)=>O.findIndex(I=>I.url===C.url)===L),b=S.length&&n<=2?S.map(C=>{const{id:L,instance:O}=C,I=ce(L,O),z=H.statuses[I];if(z)return ra(z,O,++n)}).join(""):"",x=new Date(g),P=hr(v,k)+`
`+b+`
`+(u?.options?.length?`
📊:
${u.options.map(C=>`
-
${C.title}
${C.votesCount>=0?` (${C.votesCount})`:""}
`).join("")}
`:"")+(E.length>0?`
`+E.map(C=>{const{description:L,meta:O,previewRemoteUrl:I,previewUrl:z,remoteUrl:B,url:bt,type:G}=C,{original:ut={},small:nt}=O||{},vt=nt?.width||ut?.width,ot=nt?.height||ut?.height,rt=B||bt,et=I||z,Mt=et||rt,ft=rt?URL.parse(rt):null,Ut=G==="unknown"&&ft&&/\.(mp4|m4r|m4v|mov|webm)$/i.test(ft.pathname),Xt=G==="unknown"&&ft&&/\.(mp3|ogg|wav|m4a|m4p|m4b)$/i.test(ft.pathname),Qt=G==="image"||G==="unknown"&&et&&!Ut&&!Xt,U=G==="gifv"||G==="video"||Ut,Tt=G==="audio"||Xt;let mt="";return Qt?mt=`
`:U?mt=`
${L?`${L}`:""}
`:Tt?mt=`
${L?`${L}`:""}
`:mt=`
📄 ${L||rt}
`,`${mt}`}).join(`
`):""),D=`
${f?`
${f}
${P}
`:P}
`;return _g(D)}function yg({post:t,instance:e,onClose:n}){const{_:o}=Yt(),{account:{url:i,displayName:a,username:s,emojis:c,bot:l,group:d},id:h,poll:u,spoilerText:f,language:m,editedAt:p,createdAt:g,content:v,mediaAttachments:E,url:w,emojis:k}=t,T=ra(t,e);return r("div",{id:"embed-post",class:"sheet",children:[!!n&&r("button",{type:"button",class:"sheet-close",onClick:n,children:r(M,{icon:"x",alt:o({id:"yz7wBu"})})}),r("header",{children:r("h2",{children:r(R,{id:"jdVwsS"})})}),r("main",{tabIndex:"-1",children:[r("h3",{children:r(R,{id:"GkS6YG"})}),r("textarea",{class:"embed-code",readonly:!0,onClick:y=>{y.target.select()},dir:"auto",children:T}),r("button",{type:"button",onClick:()=>{try{navigator.clipboard.writeText(T),kt(o({id:"bl7nrg"}))}catch{kt(o({id:"/KEBaP"}))}},children:[r(M,{icon:"clipboard"})," ",r("span",{children:r(R,{id:"he3ygx"})})]}),!!E?.length&&r("section",{children:[r("p",{children:r(R,{id:"/2mUza"})}),r("ol",{class:"links-list",children:E.map(y=>r("li",{children:r("a",{href:y.remoteUrl||y.url,target:"_blank",download:!0,children:y.remoteUrl||y.url})},y.id))})]}),!!c?.length&&r("section",{children:[r("p",{children:r(R,{id:"AeM/di"})}),r("ul",{children:c.map(y=>r("li",{children:[r("picture",{children:[r("source",{srcset:y.staticUrl,media:"(prefers-reduced-motion: reduce)"}),r("img",{class:"shortcode-emoji emoji",src:y.url,alt:`:${y.shortcode}:`,width:"16",height:"16",loading:"lazy",decoding:"async"})]})," ",r("code",{children:[":",y.shortcode,":"]})," (",r("a",{href:y.url,target:"_blank",download:!0,children:"URL"}),")",y.staticUrl?r(F,{children:[" ","(",r("a",{href:y.staticUrl,target:"_blank",download:!0,children:r(R,{id:"xiropL"})}),")"]}):null]},y.shortcode))})]}),!!k?.length&&r("section",{children:[r("p",{children:r(R,{id:"jzjjJh"})}),r("ul",{children:k.map(y=>r("li",{children:[r("picture",{children:[r("source",{srcset:y.staticUrl,media:"(prefers-reduced-motion: reduce)"}),r("img",{class:"shortcode-emoji emoji",src:y.url,alt:`:${y.shortcode}:`,width:"16",height:"16",loading:"lazy",decoding:"async"})]})," ",r("code",{children:[":",y.shortcode,":"]})," (",r("a",{href:y.url,target:"_blank",download:!0,children:"URL"}),")",y.staticUrl?r(F,{children:[" ","(",r("a",{href:y.staticUrl,target:"_blank",download:!0,children:r(R,{id:"xiropL"})}),")"]}):null]},y.shortcode))})]}),r("section",{children:r("small",{children:[r("p",{children:r(R,{id:"TnJgwX"})}),r("ul",{children:[r("li",{children:r(R,{id:"0OHPem"})}),r("li",{children:r(R,{id:"AzZ5zv"})}),r("li",{children:r(R,{id:"NU7wa/"})}),r("li",{children:r(R,{id:"R4PmPA"})})]})]})}),r("h3",{children:r(R,{id:"rdUucN"})}),r("output",{class:"embed-preview",dangerouslySetInnerHTML:{__html:T},dir:"auto"}),r("p",{children:r("small",{children:r(R,{id:"j0kZfi"})})})]})]})}const qe=ke((t,e)=>{let{checked:n,count:o,class:i,title:a,alt:s,size:c,icon:l,iconSize:d="l",onClick:h,...u}=t;typeof a=="string"&&(a=[a,a]),typeof s=="string"&&(s=[s,s]);const[f,m]=V(a[0]||""),[p,g]=V(s[0]||"");return Q(()=>{n?(m(a[1]||""),g(s[1]||"")):(m(a[0]||""),g(s[0]||""))},[n,a,s]),r("button",{ref:e,type:"button",title:f,class:`plain ${c?"small":""} ${i} ${n?"checked":""}`,onClick:v=>{h&&(v.preventDefault(),v.stopPropagation(),h(v))},...u,children:[r(M,{icon:l,size:d,alt:p}),!!o&&r(F,{children:[" ",r("small",{title:o,children:fe(o)})]})]})});class Vt extends HTMLElement{constructor(){super(),this.isIframeLoaded=!1,this.setupDom()}static get observedAttributes(){return["videoid","playlistid","videoplay","videotitle"]}connectedCallback(){this.addEventListener("pointerover",()=>Vt.warmConnections(this),{once:!0}),this.addEventListener("click",()=>this.addIframe())}get videoId(){return encodeURIComponent(this.getAttribute("videoid")||"")}set videoId(e){this.setAttribute("videoid",e)}get playlistId(){return encodeURIComponent(this.getAttribute("playlistid")||"")}set playlistId(e){this.setAttribute("playlistid",e)}get videoTitle(){return this.getAttribute("videotitle")||"Video"}set videoTitle(e){this.setAttribute("videotitle",e)}get videoPlay(){return this.getAttribute("videoplay")||"Play"}set videoPlay(e){this.setAttribute("videoplay",e)}get videoStartAt(){return this.getAttribute("videoStartAt")||"0"}get autoLoad(){return this.hasAttribute("autoload")}get autoPause(){return this.hasAttribute("autopause")}get noCookie(){return this.hasAttribute("nocookie")}get posterQuality(){return this.getAttribute("posterquality")||"hqdefault"}get posterLoading(){return this.getAttribute("posterloading")||"lazy"}get params(){return`start=${this.videoStartAt}&${this.getAttribute("params")}`}set params(e){this.setAttribute("params",e)}set posterQuality(e){this.setAttribute("posterquality",e)}get disableNoscript(){return this.hasAttribute("disablenoscript")}setupDom(){const e=this.attachShadow({mode:"open"});let n="";window.liteYouTubeNonce&&(n=`nonce="${window.liteYouTubeNonce}"`),e.innerHTML=`
`,this.domRefFrame=e.querySelector("#frame"),this.domRefImg={fallback:e.querySelector("#fallbackPlaceholder"),webp:e.querySelector("#webpPlaceholder"),jpeg:e.querySelector("#jpegPlaceholder")},this.domRefPlayButton=e.querySelector("#playButton")}setupComponent(){this.shadowRoot.querySelector("slot[name=image]").assignedNodes().length===0&&this.initImagePlaceholder(),this.domRefPlayButton.setAttribute("aria-label",`${this.videoPlay}: ${this.videoTitle}`),this.setAttribute("title",`${this.videoPlay}: ${this.videoTitle}`),(this.autoLoad||this.isYouTubeShort()||this.autoPause)&&this.initIntersectionObserver(),this.disableNoscript||this.injectSearchNoScript()}attributeChangedCallback(e,n,o){n!==o&&(this.setupComponent(),this.domRefFrame.classList.contains("activated")&&(this.domRefFrame.classList.remove("activated"),this.shadowRoot.querySelector("iframe").remove(),this.isIframeLoaded=!1))}injectSearchNoScript(){const e=document.createElement("noscript");this.prepend(e),e.innerHTML=this.generateIframe()}generateIframe(e=!1){let n=e?0:1,o=this.autoPause?"&enablejsapi=1":"";const i=this.noCookie?"-nocookie":"";let a;return this.playlistId?a=`?listType=playlist&list=${this.playlistId}&`:a=`${this.videoId}?`,this.isYouTubeShort()&&(this.params=`loop=1&mute=1&modestbranding=1&playsinline=1&rel=0&enablejsapi=1&playlist=${this.videoId}`,n=1),`
`}addIframe(e=!1){if(!this.isIframeLoaded){const n=this.generateIframe(e);this.domRefFrame.insertAdjacentHTML("beforeend",n),this.domRefFrame.classList.add("activated"),this.isIframeLoaded=!0,this.attemptShortAutoPlay(),this.dispatchEvent(new CustomEvent("liteYoutubeIframeLoaded",{detail:{videoId:this.videoId},bubbles:!0,cancelable:!0}))}}initImagePlaceholder(){this.testPosterImage(),this.domRefImg.fallback.setAttribute("aria-label",`${this.videoPlay}: ${this.videoTitle}`),this.domRefImg?.fallback?.setAttribute("alt",`${this.videoPlay}: ${this.videoTitle}`)}async testPosterImage(){setTimeout(()=>{const e=`https://i.ytimg.com/vi_webp/${this.videoId}/${this.posterQuality}.webp`,n=new Image;n.fetchPriority="low",n.referrerPolicy="origin",n.src=e,n.onload=async o=>{const i=o.target;i?.naturalHeight==90&&i?.naturalWidth==120&&(this.posterQuality="hqdefault");const s=`https://i.ytimg.com/vi_webp/${this.videoId}/${this.posterQuality}.webp`;this.domRefImg.webp.srcset=s;const c=`https://i.ytimg.com/vi/${this.videoId}/${this.posterQuality}.jpg`;this.domRefImg.fallback.loading=this.posterLoading,this.domRefImg.jpeg.srcset=c,this.domRefImg.fallback.src=c,this.domRefImg.fallback.loading=this.posterLoading}},100)}initIntersectionObserver(){const e={root:null,rootMargin:"0px",threshold:0};new IntersectionObserver((o,i)=>{o.forEach(a=>{a.isIntersecting&&!this.isIframeLoaded&&(Vt.warmConnections(this),this.addIframe(!0),i.unobserve(this))})},e).observe(this),this.autoPause&&new IntersectionObserver((i,a)=>{i.forEach(s=>{s.intersectionRatio!==1&&this.shadowRoot.querySelector("iframe")?.contentWindow?.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")})},{threshold:1}).observe(this)}attemptShortAutoPlay(){this.isYouTubeShort()&&setTimeout(()=>{this.shadowRoot.querySelector("iframe")?.contentWindow?.postMessage('{"event":"command","func":"playVideo","args":""}',"*")},2e3)}isYouTubeShort(){return this.getAttribute("short")===""&&window.matchMedia("(max-width: 40em)").matches}static addPrefetch(e,n){const o=document.createElement("link");o.rel=e,o.href=n,o.crossOrigin="true",document.head.append(o)}static warmConnections(e){Vt.isPreconnected||window.liteYouTubeIsPreconnected||(Vt.addPrefetch("preconnect","https://i.ytimg.com/"),Vt.addPrefetch("preconnect","https://s.ytimg.com"),e.noCookie?Vt.addPrefetch("preconnect","https://www.youtube-nocookie.com"):(Vt.addPrefetch("preconnect","https://www.youtube.com"),Vt.addPrefetch("preconnect","https://www.google.com"),Vt.addPrefetch("preconnect","https://googleads.g.doubleclick.net"),Vt.addPrefetch("preconnect","https://static.doubleclick.net")),Vt.isPreconnected=!0,window.liteYouTubeIsPreconnected=!0)}}Vt.isPreconnected=!1;customElements.define("lite-youtube",Vt);function bg({authors:t,hidden:e,children:n}){if(e||!t?.[0]?.account?.id)return n;const o=t[0].account;return r("div",{class:"card-byline",children:[n,r("div",{class:"card-byline-author",children:[r(M,{icon:"link",size:"s"})," ",r("small",{children:r(R,{id:"4LHHK6",components:{0:r(Te,{account:o,showAvatar:!0})}})})]})]})}function Vi(t){return["x.com","twitter.com","threads.net","bsky.app","bsky.brid.gy","fed.brid.gy"].includes(t)}function wg({card:t,selfReferential:e,selfAuthor:n,instance:o}){const i=Ln(H),{blurhash:a,title:s,description:c,html:l,providerName:d,providerUrl:h,authorName:u,authorUrl:f,width:m,height:p,image:g,imageDescription:v,url:E,type:w,embedUrl:k,language:T,publishedAt:y,authors:S}=t,b=s||d||u,P=m/p>=1.2?"large":"",[D,C]=V(null);if(Q(()=>{b&&g&&!e&&Xa(E)&&Qa(o,E).then(B=>{if(!B)return;const{id:bt,url:G}=B;C("#"+G)})},[b,g,e]),i.unfurledLinks[E])return null;const L=/