Files
phanpy-cz/assets/ScheduledAtField-DOwsX15z.js
2025-07-18 19:23:55 +02:00

194 lines
206 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

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

import{ao as ye,W as Pt,e as r,d as U,q as _t,A as N,_ as Oe,y as X,I as yr,ap as Ma,l as ot,S as ke,h as br,aq as Pa,ar as eo,as as Ra,at as Yi,V as Xi,k as B,M as Je,$ as kt,G as bn,z as It,s as W,a8 as k,au as Oa,x as $a,n as Na,av as Fa,u as te,a as no,g as wr,H as Ba,aw as za,ax as Va,T as P,ay as Qi,az as Ha,aA as Ji,p as lo,E as ts,aB as Ka,aC as $t,aD as ja,aE as Ua,aF as Bn,P as le,c as Cn,t as Wa,b as we,a0 as es,aG as Za,aH as qa,aI as Ga}from"./useTitle-BuJm5pdu.js";const ns=["shift","alt","meta","mod","ctrl","control"],Ya={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(Ya[t.trim()]||t.trim()).toLowerCase().replace(/key|digit|numpad/,"")}function os(t){return ns.includes(t)}function To(t,e=","){return t.toLowerCase().split(e)}function Ao(t,e="+",n=">",o=!1,i){let a=[],s=!1;t.includes(n)?(s=!0,a=t.toLocaleLowerCase().split(n).map(h=>Ae(h))):a=t.toLocaleLowerCase().split(e).map(h=>Ae(h));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(h=>!ns.includes(h));return{...c,keys:l,description:i,isSequence:s}}typeof document<"u"&&(document.addEventListener("keydown",t=>{t.code!==void 0&&rs([Ae(t.code)])}),document.addEventListener("keyup",t=>{t.code!==void 0&&is([Ae(t.code)])})),typeof window<"u"&&(window.addEventListener("blur",()=>{me.clear()}),window.addEventListener("contextmenu",()=>{setTimeout(()=>{me.clear()},0)}));const me=new Set;function Er(t){return Array.isArray(t)}function Xa(t,e=","){return(Er(t)?t:t.split(e)).every(n=>me.has(n.trim().toLowerCase()))}function rs(t){const e=Array.isArray(t)?t:[t];me.has("meta")&&me.forEach(n=>!os(n)&&me.delete(n.toLowerCase())),e.forEach(n=>me.add(n.toLowerCase()))}function is(t){const e=Array.isArray(t)?t:[t];t==="meta"?me.clear():e.forEach(n=>me.delete(n.toLowerCase()))}function Qa(t,e,n){(typeof n=="function"&&n(t,e)||n===!0)&&t.preventDefault()}function Ja(t,e,n){return typeof n=="function"?n(t,e):n===!0||n===void 0}function tc(t){return ss(t,["input","textarea","select"])}function ss(t,e=!1){const{target:n,composed:o}=t;let i;return ec(n)&&o?i=t.composedPath()[0]&&t.composedPath()[0].tagName:i=n&&n.tagName,Er(e)?!!(i&&e&&e.some(a=>a.toLowerCase()===i.toLowerCase())):!!(i&&e&&e)}function ec(t){return!!t.tagName&&!t.tagName.startsWith("-")&&t.tagName.includes("-")}function nc(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 <HotkeysProvider>'),!0):e?t.some(n=>e.includes(n))||t.includes("*"):!0}const oc=(t,e,n=!1)=>{const{alt:o,meta:i,mod:a,shift:s,ctrl:c,keys:l,useKey:h}=e,{code:d,key:u,ctrlKey:f,metaKey:m,shiftKey:p,altKey:g}=t,v=Ae(d);if(h&&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?Xa(l):!l},rc=ye(void 0),ic=()=>Pt(rc);function as(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&&as(t[o],e[o]),!0):t===e}const sc=ye({hotkeys:[],activeScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),ac=()=>Pt(sc);function cc(t){const e=N(void 0);return as(e.current,t)||(e.current=t),e.current}const ti=t=>{t.stopPropagation(),t.preventDefault(),t.stopImmediatePropagation()},lc=typeof window<"u"?Oe:X;function je(t,e,n,o){const i=N(null),a=N(!1),s=n instanceof Array?o instanceof Array?void 0:o:n,c=Er(t)?t.join(s?.delimiter):t,l=n instanceof Array?n:o instanceof Array?o:void 0,h=_t(e,l??[]),d=N(h);l?d.current=h:d.current=e;const u=cc(s),{activeScopes:f}=ac(),m=ic();return lc(()=>{if(u?.enabled===!1||!nc(f,u?.scopes))return;let p=[],g;const v=(T,y=!1)=>{var b;if(!(tc(T)&&!ss(T,u?.enableOnFormTags))){if(i.current!==null){const I=i.current.getRootNode();if((I instanceof Document||I instanceof ShadowRoot)&&I.activeElement!==i.current&&!i.current.contains(I.activeElement)){ti(T);return}}(b=T.target)!=null&&b.isContentEditable&&!(u!=null&&u.enableOnContentEditable)||To(c,u?.delimiter).forEach(I=>{var L,x,C,O;if(I.includes(u?.splitKey??"+")&&I.includes(u?.sequenceSplitKey??">")){console.warn(`Hotkey ${I} contains both ${u?.splitKey??"+"} and ${u?.sequenceSplitKey??">"} which is not supported.`);return}const M=Ao(I,u?.splitKey,u?.sequenceSplitKey,u?.useKey,u?.description);if(M.isSequence){g=setTimeout(()=>{p=[]},u?.sequenceTimeoutMs??1e3);const R=M.useKey?T.key:Ae(T.code);if(os(R.toLowerCase()))return;p.push(R);const S=(L=M.keys)==null?void 0:L[p.length-1];if(R!==S){p=[],g&&clearTimeout(g);return}p.length===((x=M.keys)==null?void 0:x.length)&&(d.current(T,M),g&&clearTimeout(g),p=[])}else if(oc(T,M,u?.ignoreModifiers)||(C=M.keys)!=null&&C.includes("*")){if((O=u?.ignoreEventWhen)!=null&&O.call(u,T)||y&&a.current)return;if(Qa(T,M,u?.preventDefault),!Ja(T,M,u?.enabled)){ti(T);return}d.current(T,M),y||(a.current=!0)}})}},E=T=>{T.code!==void 0&&(rs(Ae(T.code)),(u?.keydown===void 0&&u?.keyup!==!0||u!=null&&u.keydown)&&v(T))},w=T=>{T.code!==void 0&&(is(Ae(T.code)),a.current=!1,u!=null&&u.keyup&&v(T,!0))},A=i.current||s?.document||document;return A.addEventListener("keyup",w,s?.eventListenerOptions),A.addEventListener("keydown",E,s?.eventListenerOptions),m&&To(c,u?.delimiter).forEach(T=>m.addHotkey(Ao(T,u?.splitKey,u?.sequenceSplitKey,u?.useKey,u?.description))),()=>{A.removeEventListener("keyup",w,s?.eventListenerOptions),A.removeEventListener("keydown",E,s?.eventListenerOptions),m&&To(c,u?.delimiter).forEach(T=>m.removeHotkey(Ao(T,u?.splitKey,u?.sequenceSplitKey,u?.useKey,u?.description))),p=[],g&&clearTimeout(g)}},[c,u,f]),i}var Xn={exports:{}};/*!
* Toastify js 1.12.0
* https://github.com/apvarun/toastify-js
* @license MIT licensed
*
* Copyright (C) 2018 Varun A P
*/var uc=Xn.exports,ei;function dc(){return ei||(ei=1,function(t){(function(e,n){t.exports?t.exports=n():e.Toastify=n()})(uc,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 h=document.createElement("button");h.type="button",h.setAttribute("aria-label","Close"),h.className="toast-close",h.innerHTML="&#10006;",h.addEventListener("click",(function(v){v.stopPropagation(),this.removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)}).bind(this));var d=window.innerWidth>0?window.innerWidth:screen.width;(this.options.position=="left"||this.options.positionLeft===!0)&&d>360?s.insertAdjacentElement("afterbegin",h):s.appendChild(h)}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},h=document.getElementsByClassName("toastify"),d,u=0;u<h.length;u++){a(h[u],"toastify-top")===!0?d="toastify-top":d="toastify-bottom";var f=h[u].offsetHeight;d=d.substr(9,d.length-1);var m=15,p=window.innerWidth>0?window.innerWidth:screen.width;p<=360?(h[u].style[d]=l[d]+"px",l[d]+=f+m):a(h[u],"toastify-left")===!0?(h[u].style[d]=s[d]+"px",s[d]+=f+m):(h[u].style[d]=c[d]+"px",c[d]+=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})}(Xn)),Xn.exports}var hc=dc();const fc=yr(hc);window._showToast=Et;function Et(t){typeof t=="string"&&(t={text:t});const{onClick:e,delay:n,...o}=t,i=fc({className:`${e||t.destination?"shiny-pill":""}`,gravity:"bottom",position:"center",...o,onClick:()=>{e?.(i)}});return n?setTimeout(()=>{i.showToast()},n):i.showToast(),i}function kv(t,e,n,o){const i=N(t);X(()=>{i.current=t},[t,n]),X(()=>{!o||e===null||e===!1||i.current()},[o]),X(()=>{if(e===null||e===!1)return;const s=setInterval(()=>i.current(),e);return()=>clearInterval(s)},[e])}const Tr=t=>!!t&&t[0]==="o",Qo=Ma,wn=(t,e)=>t===!0||!!(t&&t[e]),Gt=(t,e)=>typeof t=="function"?t(e):t,mc="_szhsinMenu",pc=t=>t[mc];const tn=(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),gc=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]}},ko=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 uo(t,e){return{"aria-disabled":t||void 0,tabIndex:e?0:-1}}function ni(t,e){for(let n=0;n<t.length;n++)if(t[n]===e)return n;return-1}const de=({block:t,element:e,modifiers:n,className:o})=>ot(()=>{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]),vc="szh-menu-container",ue="szh-menu";const _c="arrow",Ar="item",yc="divider",bc="header",wc="group",Ec="submenu";const cs=ye(),kr=ye({}),oo=ye({}),Cr=ye({}),Tc=ye({}),ho=ye({}),Nt=Object.freeze({ENTER:"Enter",ESC:"Escape",SPACE:" ",HOME:"Home",END:"End",LEFT:"ArrowLeft",RIGHT:"ArrowRight",UP:"ArrowUp",DOWN:"ArrowDown"}),vt=Object.freeze({RESET:0,SET:1,UNSET:2,INCREASE:3,DECREASE:4,FIRST:5,LAST:6,SET_INDEX:7}),En=Object.freeze({CLICK:"click",CANCEL:"cancel",BLUR:"blur",SCROLL:"scroll"}),Ue=Object.freeze({FIRST:"first",LAST:"last"}),Ac=Object.freeze({entering:"opening",entered:"open",exiting:"closing",exited:"closed"}),oi="absolute",Sr="none",xr="menuitem",Jo={preventScroll:!0};const kc=({className:t,containerRef:e,containerProps:n,children:o,isOpen:i,theming:a,transition:s,onClose:c})=>{const l=wn(s,"item");return r("div",{...tn({onKeyDown:({key:u})=>{switch(u){case Nt.ESC:Gt(c,{key:u,reason:En.CANCEL});break}},onBlur:u=>{i&&!u.currentTarget.contains(u.relatedTarget)&&Gt(c,{reason:En.BLUR})}},n),className:de({block:vc,modifiers:ot(()=>({theme:a,itemTransition:l}),[a,l]),className:t}),style:{position:"absolute",...n?.style},ref:e,children:o})},Cc=()=>{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)}}},Sc=t=>{const[e,n]=U(),i=N({items:[],hoverIndex:-1,sorted:!1}).current,a=_t((c,l)=>{const{items:h}=i;if(!c)i.items=[];else if(l)h.push(c);else{const d=h.indexOf(c);d>-1&&(h.splice(d,1),c.contains(document.activeElement)&&(t.current.focus(Jo),n()))}i.hoverIndex=-1,i.sorted=!1},[i,t]),s=_t((c,l,h)=>{const{items:d,hoverIndex:u}=i,f=()=>{if(i.sorted)return;const g=t.current.querySelectorAll(".szh-menu__item");d.sort((v,E)=>ni(g,v)-ni(g,E)),i.sorted=!0};let m=-1,p;switch(c){case vt.RESET:break;case vt.SET:p=l;break;case vt.UNSET:p=g=>g===l?void 0:g;break;case vt.FIRST:f(),m=0,p=d[m];break;case vt.LAST:f(),m=d.length-1,p=d[m];break;case vt.SET_INDEX:f(),m=h,p=d[m];break;case vt.INCREASE:f(),m=u,m<0&&(m=d.indexOf(l)),m++,m>=d.length&&(m=0),p=d[m];break;case vt.DECREASE:f(),m=u,m<0&&(m=d.indexOf(l)),m--,m<0&&(m=d.length-1),p=d[m];break;default:}p||(m=-1),n(p),i.hoverIndex=m},[t,i]);return{hoverItem:e,dispatch:s,updateItems:a}},ri=(t,e)=>Math.round(t)===e?t:e,ls=t=>{const e=t.getBoundingClientRect();return e.width=ri(e.width,t.offsetWidth),e.height=ri(e.height,t.offsetHeight),e},xc=(t,e,n,o)=>{const i=ls(e),a=t.getBoundingClientRect(),s=n===window?{left:0,top:0,right:document.documentElement.clientWidth,bottom:window.innerHeight}:n.getBoundingClientRect(),c=gc(o),l=p=>p+a.left-s.left-c.left,h=p=>p+a.left+i.width-s.right+c.right,d=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:h,getTopOverflow:d,getBottomOverflow:u,confineHorizontally:p=>{let g=l(p);if(g<0)p-=g;else{const v=h(p);v>0&&(p-=v,g=l(p),g<0&&(p-=g))}return p},confineVertically:p=>{let g=d(p);if(g<0)p-=g;else{const v=u(p);v>0&&(p-=v,g=d(p),g<0&&(p-=g))}return p}}},Ic=({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},Lc=({anchorRect:t,containerRect:e,menuRect:n,placeLeftorRightY:o,placeLeftX:i,placeRightX:a,getLeftOverflow:s,getRightOverflow:c,confineHorizontally:l,confineVertically:h,arrowRef:d,arrow:u,direction:f,position:m})=>{let p=f,g=o;m!=="initial"&&(g=h(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<w)&&(v=i,p="left")))),m==="auto"&&(v=l(v)),{arrowY:u?Ic({menuY:g,arrowRef:d,anchorRect:t,containerRect:e,menuRect:n}):void 0,x:v,y:g,computedDirection:p}},Dc=({arrowRef:t,menuX:e,anchorRect:n,containerRect:o,menuRect:i})=>{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},Mc=({anchorRect:t,containerRect:e,menuRect:n,placeToporBottomX:o,placeTopY:i,placeBottomY:a,getTopOverflow:s,getBottomOverflow:c,confineHorizontally:l,confineVertically:h,arrowRef:d,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<w)&&(v=i,p="top")))),m==="auto"&&(v=h(v)),{arrowX:u?Dc({menuX:g,arrowRef:d,anchorRect:t,containerRect:e,menuRect:n}):void 0,x:g,y:v,computedDirection:p}},Pc=({arrow:t,align:e,direction:n,gap:o,shift:i,position:a,anchorRect:s,arrowRef:c,positionHelpers:l})=>{const{menuRect:h,containerRect:d}=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-d.left-h.width-f,g=s.right-d.left+f,v=s.top-d.top-h.height-m,E=s.bottom-d.top+m;let w,A;e==="end"?(w=s.right-d.left-h.width,A=s.bottom-d.top-h.height):e==="center"?(w=s.left-d.left-(h.width-s.width)/2,A=s.top-d.top-(h.height-s.height)/2):(w=s.left-d.left,A=s.top-d.top),w+=f,A+=m;const T={...l,anchorRect:s,placeLeftX:p,placeRightX:g,placeLeftorRightY:A,placeTopY:v,placeBottomY:E,placeToporBottomX:w,arrowRef:c,arrow:t,direction:n,position:a};switch(n){case"left":case"right":return Lc(T);case"top":case"bottom":default:return Mc(T)}},We=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?Oe:X;function ii(t,e){typeof t=="function"?t(e):t.current=e}const en=(t,e)=>ot(()=>t?e?n=>{ii(t,n),ii(e,n)}:t:e,[t,e]),si=-9999,us=({ariaLabel:t,menuClassName:e,menuStyle:n,arrow:o,arrowProps:i={},anchorPoint:a,anchorRef:s,containerRef:c,containerProps:l,externalRef:h,parentScrollingRef:d,align:u="start",direction:f="bottom",position:m="auto",overflow:p="visible",setDownOverflow:g,repositionFlag:v,captureFocus:E=!0,state:w,endTransition:A,isDisabled:T,menuItemFocus:y,gap:b=0,shift:I=0,children:L,onClose:x,focusProps:C,...O})=>{const[M,R]=U({x:si,y:si}),[S,Z]=U({}),[H,ft]=U(),[G,rt]=U(f),[et]=U(Cc),[lt,Y]=br(V=>V+1,1),{transition:at,boundingBoxRef:Lt,boundingBoxPadding:Rt,rootMenuRef:K,rootAnchorRef:mt,scrollNodesRef:ut,reposition:Kt,viewScroll:pt,submenuCloseDelay:Ot}=Pt(ho),{submenuCtx:Tt,reposSubmenu:Ft=v}=Pt(oo),Dt=N(),Bt=N(),q=N(!1),{hoverItem:J,dispatch:Ct,updateItems:dt}=Sc(Dt),yt=Tr(w),zt=wn(at,"open"),he=wn(at,"close"),ct=ut.current,Vt=V=>{switch(V.key){case Nt.HOME:Ct(vt.FIRST);break;case Nt.END:Ct(vt.LAST);break;case Nt.UP:Ct(vt.DECREASE,J);break;case Nt.DOWN:Ct(vt.INCREASE,J);break;case Nt.SPACE:V.target&&V.target.className.indexOf(ue)!==-1&&V.preventDefault();return;default:return}V.preventDefault(),V.stopPropagation()},z=()=>{w==="closing"&&ft(),Gt(A)},Q=V=>{V.stopPropagation(),et.on(Ot,()=>{Ct(vt.RESET),Dt.current.focus(Jo)})},F=V=>{V.target===V.currentTarget&&et.off()},tt=_t(V=>{const bt=Dt.current,Mt=c.current;if(!bt||!Mt)return;const xt=s?s.current?.getBoundingClientRect():a?{left:a.x,right:a.x,top:a.y,bottom:a.y,width:0,height:0}:null;if(!xt)return;ct.menu||(ct.menu=(Lt?Lt.current:ko(K.current))||window);const gt=xc(Mt,bt,ct.menu,Rt);let{arrowX:Ht,arrowY:Se,x:Jt,y:xe,computedDirection:nn}=Pc({arrow:o,align:u,direction:f,gap:b,shift:I,position:m,anchorRect:xt,arrowRef:Bt,positionHelpers:gt});const{menuRect:Ne}=gt,on=Ne.height;if(!V&&p!=="visible"){const{getTopOverflow:xn,getBottomOverflow:In}=gt;let Wt,Fe;const Zt=In(xe);if(Zt>0)Wt=on-Zt,Fe=Zt;else{const oe=xn(xe);oe<0&&(Wt=on+oe,Fe=0-oe,Wt>=0&&(xe-=oe))}Wt>=0&&ft({height:Wt,overflowAmt:Fe})}o&&Z({x:Ht,y:Se}),R({x:Jt,y:xe}),rt(nn)},[o,u,Rt,f,b,I,m,p,a,s,c,Lt,K,ct]);We(()=>{yt&&(tt(),q.current&&Y()),q.current=yt},[yt,tt,Ft]),We(()=>{H&&!g&&(Dt.current.scrollTop=0)},[H,g]),We(()=>dt,[dt]),X(()=>{let{menu:V}=ct;if(!yt||!V)return;if(V=V.addEventListener?V:window,!ct.anchors){ct.anchors=[];let gt=ko(mt&&mt.current);for(;gt&&gt!==V;)ct.anchors.push(gt),gt=ko(gt)}let bt=pt;if(ct.anchors.length&&bt==="initial"&&(bt="auto"),bt==="initial")return;const Mt=()=>{bt==="auto"?Qo(()=>tt(!0)):Gt(x,{reason:En.SCROLL})},xt=ct.anchors.concat(pt!=="initial"?V:[]);return xt.forEach(gt=>gt.addEventListener("scroll",Mt)),()=>xt.forEach(gt=>gt.removeEventListener("scroll",Mt))},[mt,ct,yt,x,pt,tt]);const Qt=!!H&&H.overflowAmt>0;X(()=>{if(Qt||!yt||!d)return;const V=()=>Qo(tt),bt=d.current;return bt.addEventListener("scroll",V),()=>bt.removeEventListener("scroll",V)},[yt,Qt,d,tt]),X(()=>{if(!yt||typeof ResizeObserver!="function"||Kt==="initial")return;const V=[],bt=new ResizeObserver(gt=>gt.forEach(({target:Ht})=>{V.indexOf(Ht)<0?V.push(Ht):Pa(()=>{tt(),Y()})})),Mt={box:"border-box"};bt.observe(Dt.current,Mt);const xt=s?.current;return xt&&bt.observe(xt,Mt),()=>bt.disconnect()},[yt,Kt,s,tt]),X(()=>{if(!yt){Ct(vt.RESET),he||ft();return}const{position:V,alwaysUpdate:bt}=y||{},Mt=()=>{V===Ue.FIRST?Ct(vt.FIRST):V===Ue.LAST?Ct(vt.LAST):V>=-1&&Ct(vt.SET_INDEX,void 0,V)};if(bt)Mt();else if(E){const xt=setTimeout(()=>{const gt=Dt.current;gt&&!gt.contains(document.activeElement)&&(gt.focus(Jo),Mt())},zt?170:100);return()=>clearTimeout(xt)}},[yt,zt,he,E,y,Ct]);const ht=ot(()=>({isParentOpen:yt,submenuCtx:et,dispatch:Ct,updateItems:dt}),[yt,et,Ct,dt]);let jt,fe;H&&(g?fe=H.overflowAmt:jt=H.height);const ee=ot(()=>({reposSubmenu:lt,submenuCtx:et,overflow:p,overflowAmt:fe,parentMenuRef:Dt,parentDir:G}),[lt,et,p,fe,G]),ne=jt>=0?{maxHeight:jt,overflow:p}:void 0,At=ot(()=>({state:w,align:u,dir:G}),[w,u,G]),St=ot(()=>({dir:G}),[G]),Ut=de({block:ue,element:_c,modifiers:St,className:i.className}),Yt=r("ul",{role:"menu","aria-label":t,...uo(T),...tn({onPointerEnter:Tt?.off,onPointerMove:Q,onPointerLeave:F,onKeyDown:Vt,onAnimationEnd:z},O),ref:en(h,Dt),className:de({block:ue,modifiers:At,className:e}),style:{...n,...ne,margin:0,display:w==="closed"?"none":void 0,position:oi,left:M.x,top:M.y},children:[o&&r("li",{"aria-hidden":!0,...i,className:Ut,style:{display:"block",position:oi,left:S.x,top:S.y,...i.style},ref:Bt}),r(oo.Provider,{value:ee,children:r(kr.Provider,{value:ht,children:r(cs.Provider,{value:J,children:Gt(L,At)})})})]});return l?r(kc,{...l,isOpen:yt,children:Yt}):Yt},ds=ke(function({"aria-label":e,className:n,containerProps:o,initialMounted:i,unmountOnClose:a,transition:s,transitionTimeout:c,boundingBoxRef:l,boundingBoxPadding:h,reposition:d="auto",submenuOpenDelay:u=300,submenuCloseDelay:f=150,viewScroll:m="initial",portal:p,theming:g,onItemClick:v,...E},w){const A=N(null),T=N({}),{anchorRef:y,state:b,onClose:I}=E,L=ot(()=>({initialMounted:i,unmountOnClose:a,transition:s,transitionTimeout:c,boundingBoxRef:l,boundingBoxPadding:h,rootMenuRef:A,rootAnchorRef:y,scrollNodesRef:T,reposition:d,viewScroll:m,submenuOpenDelay:u,submenuCloseDelay:f}),[i,a,s,c,y,l,h,d,m,u,f]),x=ot(()=>({handleClick(O,M){O.stopPropagation||Gt(v,O);let R=O.keepOpen;R===void 0&&(R=M&&O.key===Nt.SPACE),R||Gt(I,{value:O.value,key:O.key,reason:En.CLICK})},handleClose(O){Gt(I,{key:O,reason:En.CLICK})}}),[v,I]);if(!b)return null;const C=r(ho.Provider,{value:L,children:r(Cr.Provider,{value:x,children:r(us,{...E,ariaLabel:e||"Menu",externalRef:w,containerRef:A,containerProps:{className:n,containerRef:A,containerProps:o,theming:g,transition:s,onClose:I}})})});return p===!0&&typeof document<"u"?eo(C,document.body):p?p.target?eo(C,p.target):p.stablePosition?null:C:C}),tr=0,er=1,ro=2,io=3,so=4,Rc=5,hs=6,Oc=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],fs=t=>({_s:t,status:Oc[t],isEnter:t<io,isMounted:t!==hs,isResolved:t===ro||t>so}),nr=t=>t?hs:Rc,$c=(t,e)=>{switch(t){case er:case tr:return ro;case so:case io:return nr(e)}},Nc=t=>typeof t=="object"?[t.enter,t.exit]:[t,t],Fc=(t,e)=>setTimeout(()=>{isNaN(document.body.offsetTop)||t(e+1)},0),ai=(t,e,n,o,i)=>{clearTimeout(o.current);const a=fs(t);e(a),n.current=a,i&&i({current:a})},Bc=({enter:t=!0,exit:e=!0,preEnter:n,preExit:o,timeout:i,initialEntered:a,mountOnEnter:s,unmountOnExit:c,onStateChange:l}={})=>{const[h,d]=U(()=>fs(a?ro:nr(s))),u=N(h),f=N(),[m,p]=Nc(i),g=_t(()=>{const E=$c(u.current._s,c);E&&ai(E,d,u,f,l)},[l,c]),v=_t(E=>{const w=T=>{switch(ai(T,d,u,f,l),T){case er:m>=0&&(f.current=setTimeout(g,m));break;case so:p>=0&&(f.current=setTimeout(g,p));break;case tr:case io:f.current=Fc(w,T);break}},A=u.current.isEnter;typeof E!="boolean"&&(E=!A),E?!A&&w(t?n?tr:er:ro):A&&w(e?o?io:so:nr(c))},[g,l,t,e,n,o,m,p,c]);return[h,v,g]};const zc=({initialOpen:t,initialMounted:e,unmountOnClose:n,transition:o,transitionTimeout:i=500,onMenuChange:a}={})=>{const s=wn(o,"open"),c=wn(o,"close"),[{status:l},h,d]=Bc({initialEntered:t,mountOnEnter:!e,unmountOnExit:n,timeout:i,enter:s,exit:c,onStateChange:_t(({current:{isEnter:u,isResolved:f}})=>{!a||u&&s&&f||!u&&c&&f||a({open:u})},[a,s,c])});return[{state:Ac[l],endTransition:d},h]},ms=t=>{const[e,n]=zc(t),[o,i]=U(),a=(s,c)=>{i({position:s,alwaysUpdate:c}),n(!0)};return[{menuItemFocus:o,...e},n,a]},Vc=(t,e)=>{const[n]=U({});return{onMouseDown:()=>{n.v=t&&t!=="closed"},onClick:o=>n.v?n.v=!1:e(!0,o)}},Hc=parseInt(Ra)<19,Kc=ke(function({"aria-label":e,captureFocus:n,initialOpen:o,menuButton:i,instanceRef:a,onMenuChange:s,...c},l){const[h,d,u]=ms({...c,onMenuChange:s}),{state:f}=h,m=Tr(f),p=N(null),g=Vc(f,(y,b)=>u(b.detail?void 0:Ue.FIRST)),v=_t(y=>{d(!1),y.key&&p.current.focus()},[d]),E=y=>{switch(y.key){case Nt.UP:u(Ue.LAST);break;case Nt.DOWN:u(Ue.FIRST);break;default:return}y.preventDefault()},w=Gt(i,{open:m});if(!w||!w.type)throw new Error("Menu requires a menuButton prop.");const A={...tn({onKeyDown:E,...g},w.props),ref:en(Hc?w.ref:w.props.ref,p)};pc(w.type)==="MenuButton"&&(A.isOpen=m);const T=Yi(w,A);return Xi(a,()=>({openMenu:u,closeMenu:()=>d(!1)})),r(B,{children:[T,r(ds,{...c,...h,"aria-label":e||(typeof w.props.children=="string"?w.props.children:"Menu"),anchorRef:p,ref:l,onClose:v})]})}),Ir=(t,e)=>{const n=Je(e),o=ke((i,a)=>{const s=N(null);return r(n,{...i,itemRef:s,externalRef:a,isHovering:Pt(cs)===s.current})});return o.displayName=`WithHovering(${t})`,o},ps=t=>{const[e,n]=U(!1);return X(()=>{!t&&n(!1)},[t]),[e,()=>!e&&n(!0),()=>n(!1)]},gs=(t,e,n)=>{We(()=>{if(t)return;const o=e.current;return n(o,!0),()=>{n(o)}},[t,e,n])},jc=Ir("SubMenu",function({"aria-label":e,className:n,disabled:o,direction:i,label:a,openTrigger:s,onMenuChange:c,isHovering:l,instanceRef:h,itemRef:d,captureFocus:u,repositionFlag:f,itemProps:m={},...p}){const g=Pt(ho),{rootMenuRef:v,submenuOpenDelay:E,submenuCloseDelay:w}=g,{parentMenuRef:A,parentDir:T,overflow:y}=Pt(oo),{isParentOpen:b,submenuCtx:I,dispatch:L,updateItems:x}=Pt(kr),C=y!=="visible",[O,M,R]=ms({...g,onMenuChange:c}),[S,Z,H]=ps(l),{state:ft}=O,G=!!o,rt=Tr(ft),et=N(null),[lt]=U({v:0}),Y=()=>{I.off(),lt.v&&(clearTimeout(lt.v),lt.v=0)},at=(...q)=>{Y(),Lt(),!G&&R(...q)},Lt=()=>!l&&!G&&L(vt.SET,d.current),Rt=q=>{Lt(),s||(lt.v=setTimeout(()=>Qo(at),Math.max(q,0)))},K=q=>{G||(q.stopPropagation(),Z(),!(lt.v||rt)&&I.on(w,()=>Rt(E-w),()=>Rt(E)))},mt=()=>{H(),Y(),rt||L(vt.UNSET,d.current)},ut=q=>{if(l)switch(q.key){case Nt.ENTER:q.preventDefault();case Nt.SPACE:case Nt.RIGHT:s!=="none"&&at(Ue.FIRST)}},Kt=q=>{let J=!1;switch(q.key){case Nt.LEFT:rt&&(d.current.focus(),M(!1),J=!0);break;case Nt.RIGHT:rt||(J=!0);break}J&&(q.preventDefault(),q.stopPropagation())};gs(G,d,x),X(()=>I.toggle(rt),[I,rt]),X(()=>()=>{clearTimeout(lt.v),I.toggle(!1)},[lt,I]),X(()=>{l&&b?d.current.focus():M(!1)},[l,b,M,d]),Xi(h,()=>({openMenu:(...q)=>{b&&at(...q)},closeMenu:()=>{rt&&(d.current.focus(),M(!1))}}));const pt=ot(()=>({open:rt,hover:S||l,disabled:G,submenu:!0}),[rt,l,G,S]),{ref:Ot,className:Tt,...Ft}=m,Dt=tn({onPointerEnter:I.off,onPointerMove:K,onPointerLeave:mt,onKeyDown:ut,onClick:()=>s!=="none"&&at()},Ft),Bt=()=>{const q=r(us,{...p,...O,ariaLabel:e||(typeof a=="string"?a:"Submenu"),anchorRef:d,containerRef:C?v:et,direction:i||(T==="right"||T==="left"?T:"right"),parentScrollingRef:C&&A,isDisabled:G}),J=v.current;return C&&J?eo(q,J):q};return r("li",{className:de({block:ue,element:Ec,className:n}),style:{position:"relative"},role:Sr,ref:et,onKeyDown:Kt,children:[r("div",{role:xr,"aria-haspopup":!0,"aria-expanded":rt,...uo(G,l),...Dt,ref:en(Ot,d),className:de({block:ue,element:Ar,modifiers:pt,className:Tt}),children:ot(()=>Gt(a,pt),[a,pt])}),ft&&Bt()]})}),vs=(t,e,n,o)=>{const[i,a,s]=ps(n),{submenuCloseDelay:c}=Pt(ho),{isParentOpen:l,submenuCtx:h,dispatch:d,updateItems:u}=Pt(kr),f=()=>{!n&&!o&&d(vt.SET,t.current)},m=()=>{!o&&d(vt.UNSET,t.current)},p=E=>{n&&!E.currentTarget.contains(E.relatedTarget)&&m()},g=E=>{o||(E.stopPropagation(),a(),h.on(c,f,f))},v=(E,w)=>{s(),h.off(),!w&&m()};return gs(o,t,u),X(()=>{n&&l&&e.current&&e.current.focus()},[e,n,l]),{mouseOver:i,setHover:f,onBlur:p,onPointerMove:g,onPointerLeave:v}},wt=Ir("MenuItem",function({className:e,value:n,href:o,type:i,checked:a,disabled:s,children:c,onClick:l,isHovering:h,itemRef:d,externalRef:u,...f}){const m=!!s,{mouseOver:p,setHover:g,...v}=vs(d,d,h,m),E=Pt(Cr),w=Pt(Tc),A=i==="radio",T=i==="checkbox",y=!!o&&!m&&!A&&!T,b=A?w.value===n:T?!!a:!1,I=M=>{if(m){M.stopPropagation(),M.preventDefault();return}const R={value:n,syntheticEvent:M};M.key!==void 0&&(R.key=M.key),T&&(R.checked=!b),A&&(R.name=w.name),Gt(l,R),A&&Gt(w.onRadioChange,R),E.handleClick(R,T||A)},L=M=>{if(h)switch(M.key){case Nt.ENTER:M.preventDefault();case Nt.SPACE:y?d.current.click():I(M)}},x=ot(()=>({type:i,disabled:m,hover:p||h,checked:b,anchor:y}),[i,m,p,h,b,y]),C=tn({...v,onPointerDown:g,onKeyDown:L,onClick:I},f),O={role:A?"menuitemradio":T?"menuitemcheckbox":xr,"aria-checked":A||T?b:void 0,...uo(m,h),...C,ref:en(u,d),className:de({block:ue,element:Ar,modifiers:x,className:e}),children:ot(()=>Gt(c,x),[c,x])};return y?r("li",{role:Sr,children:r("a",{href:o,...O})}):r("li",{...O})}),Uc=Ir("FocusableItem",function({className:e,disabled:n,children:o,isHovering:i,itemRef:a,externalRef:s,...c}){const l=!!n,h=N(null),{mouseOver:d,setHover:u,onPointerLeave:f,...m}=vs(a,h,i,l),{handleClose:p}=Pt(Cr),g=ot(()=>({disabled:l,hover:d||i,focusable:!0}),[l,i,d]),v=ot(()=>Gt(o,{...g,ref:h,closeMenu:p}),[o,g,p]),E=tn({...m,onPointerLeave:w=>f(w,!0),onFocus:u},c);return r("li",{role:xr,...uo(l),...E,ref:en(s,a),className:de({block:ue,element:Ar,modifiers:g,className:e}),children:v})}),ln=Je(ke(function({className:e,...n},o){return r("li",{role:"separator",...n,ref:o,className:de({block:ue,element:yc,className:e})})})),Cv=Je(ke(function({className:e,...n},o){return r("li",{role:Sr,...n,ref:o,className:de({block:ue,element:bc,className:e})})})),Sv=ke(function({className:e,style:n,takeOverflow:o,...i},a){const s=N(null),[c,l]=U(),{overflow:h,overflowAmt:d}=Pt(oo);return We(()=>{let u;o&&d>=0&&(u=ls(s.current).height-d,u<0&&(u=0)),l(u>=0?{maxHeight:u,overflow:h}:void 0)},[o,h,d]),We(()=>{c&&(s.current.scrollTop=0)},[c]),r("div",{...i,ref:en(a,s),className:de({block:ue,element:wc,className:e}),style:{...n,...c}})});var mn=(t=>(t.Mouse="mouse",t.Touch="touch",t.Pointer="pointer",t))(mn||{}),pn=(t=>(t.CancelledByMovement="cancelled-by-movement",t.CancelledByRelease="cancelled-by-release",t.CancelledOutsideElement="cancelled-outside-element",t))(pn||{});const Wc=["mousedown","mousemove","mouseup","mouseleave","mouseout"],Zc=["touchstart","touchmove","touchend","touchcancel"],qc=["pointerdown","pointermove","pointerup","pointerleave","pointerout"];function Gc(t){return typeof t=="object"&&t!==null&&"pageX"in t&&typeof t.pageX=="number"&&"pageY"in t&&typeof t.pageY=="number"}function Yc(t){var e;return Wc.includes((e=t?.nativeEvent)==null?void 0:e.type)}function _s(t){var e;return Zc.includes((e=t?.nativeEvent)==null?void 0:e.type)||"touches"in t}function Xc(t){const{nativeEvent:e}=t;return e?qc.includes(e?.type)||"pointerId"in e:!1}function Co(t){return Yc(t)||_s(t)||Xc(t)}function ci(t){var e;const n=_s(t)?(e=t?.touches)==null?void 0:e[0]:t;return Gc(n)?{x:n.pageX,y:n.pageY}:null}function Qc(t){return{target:t.target,currentTarget:t.currentTarget,nativeEvent:t,persist:()=>{}}}function ys(t,{threshold:e=400,captureEvent:n=!1,detect:o=mn.Pointer,cancelOnMovement:i=!1,cancelOutsideElement:a=!0,filterEvents:s,onStart:c,onMove:l,onFinish:h,onCancel:d}={}){const u=N(!1),f=N(!1),m=N(),p=N(),g=N(t),v=N(null),E=_t(y=>b=>{f.current||Co(b)&&(s!==void 0&&!s(b)||(n&&b.persist(),c?.(b,{context:y}),v.current=ci(b),f.current=!0,m.current=b.currentTarget,p.current=setTimeout(()=>{g.current&&(g.current(b,{context:y}),u.current=!0)},e)))},[n,s,c,e]),w=_t(y=>(b,I)=>{Co(b)&&f.current&&(v.current=null,n&&b.persist(),u.current?h?.(b,{context:y}):f.current&&d?.(b,{context:y,reason:I??pn.CancelledByRelease}),u.current=!1,f.current=!1,p.current!==void 0&&clearTimeout(p.current))},[n,h,d]),A=_t(y=>b=>{if(Co(b)&&(l?.(b,{context:y}),i!==!1&&v.current)){const I=ci(b);if(I){const L=i===!0?25:i,x={x:Math.abs(I.x-v.current.x),y:Math.abs(I.y-v.current.y)};(x.x>L||x.y>L)&&w(y)(b,pn.CancelledByMovement)}}},[w,i,l]),T=_t(y=>{if(t===null)return{};switch(o){case mn.Mouse:{const b={onMouseDown:E(y),onMouseMove:A(y),onMouseUp:w(y)};return a&&(b.onMouseLeave=I=>{w(y)(I,pn.CancelledOutsideElement)}),b}case mn.Touch:return{onTouchStart:E(y),onTouchMove:A(y),onTouchEnd:w(y)};case mn.Pointer:{const b={onPointerDown:E(y),onPointerMove:A(y),onPointerUp:w(y)};return a&&(b.onPointerLeave=I=>w(y)(I,pn.CancelledOutsideElement)),b}}},[t,w,a,o,A,E]);return X(()=>{function y(b){const I=Qc(b);w()(I)}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]),X(()=>()=>{p.current!==void 0&&clearTimeout(p.current)},[]),X(()=>{g.current=t},[t]),T}const Jc=kt(()=>new Intl.DateTimeFormat().resolvedOptions().locale),tl=t=>{const{locale:e,dateYear:n,hideTime:o,formatOpts:i,forceOpts:a}=t||{},s=e.replace(/-[a-z]+$/i,""),c=bn([s],[Jc],e),l=new Date().getFullYear(),h=a||{year:n===l?void 0:"numeric",month:"short",day:"numeric",hour:o?void 0:"numeric",minute:o?void 0:"numeric",...i};try{return Intl.DateTimeFormat(c,h)}catch{}try{return Intl.DateTimeFormat(e,h)}catch{}return Intl.DateTimeFormat(void 0,h)},el=kt(tl);function Tn(t,e){return t instanceof Date||(t=new Date(t)),el({dateYear:t.getFullYear(),locale:It.locale,...e}).format(t)}function nl(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(),h=window.open(e,"compose"+l,`width=${s},height=${c},left=${i},top=${a}`);return h?h.__COMPOSE__=t:alert(It._({id:"4S86wI"})),h}const ol=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);function rl(){if(ol){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 il=document.documentElement,zn=getComputedStyle(il),sl=8;let bs=[0,0,0,0];function ws(){const t=zn.getPropertyValue("--sai-top"),e=zn.getPropertyValue("--sai-right"),n=zn.getPropertyValue("--sai-bottom"),o=zn.getPropertyValue("--sai-left");bs=[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(ws);function Es(t=[]){return bs.map((n,o)=>(n||sl)+(t[o]||0)).join(" ")}CSS.supports("top: env(safe-area-inset-top)")&&window.addEventListener("resize",ws,{passive:!0});const li=5e3;function Vn(t){if(t||(t=!0),W.showCompose){W.composerState.minimized?Et({duration:li,text:It._({id:"/4fHR1"})}):Et({duration:li,text:It._({id:"vvl08N"})});return}rl(),W.showCompose=t}const ze=document.createElement("div");function al(t,e){if(!t)return"";const{preProcess:n}=e||{};return ze.innerHTML=t.replace(/<\/p>/g,`</p>
`).replace(/<\/li>/g,`</li>
`),ze.querySelectorAll("br").forEach(o=>{o.replaceWith(`
`)}),n?.(ze),ze.querySelectorAll(".invisible").forEach(o=>{o.remove()}),ze.querySelectorAll(".ellipsis").forEach(o=>{o.append("...")}),ze.innerText.replace(/[\r\n]{3,}/g,`
`).trim()}const fo=kt(al);function Ts(t){const{spoilerText:e,content:n,poll:o,mediaAttachments:i}=t;let a="";return e?.trim()?a+=e:a+=fo(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 As={x:()=>k(()=>import("./icons/close-line-Bfj902o4.js"),[],import.meta.url),heart:()=>k(()=>import("./icons/heart-line-vi3QqJTo.js"),[],import.meta.url),bookmark:()=>k(()=>import("./icons/bookmark-line-BMGZc_Mc.js"),[],import.meta.url),"check-circle":()=>k(()=>import("./icons/check-circle-line-CSlVj8QA.js"),[],import.meta.url),"x-circle":()=>k(()=>import("./icons/close-circle-line-DlCWcUwK.js"),[],import.meta.url),transfer:()=>k(()=>import("./icons/transfer-4-line-BHXBUumZ.js"),[],import.meta.url),rocket:()=>k(()=>import("./icons/rocket-line-B7gBxy4I.js"),[],import.meta.url),"arrow-left":{module:()=>k(()=>import("./icons/arrow-left-line-BGgZ0udH.js"),[],import.meta.url),rtl:!0},"arrow-right":{module:()=>k(()=>import("./icons/arrow-right-line-zKtS4vm5.js"),[],import.meta.url),rtl:!0},"arrow-up":()=>k(()=>import("./icons/arrow-up-line-Bow_AQZ6.js"),[],import.meta.url),"arrow-down":()=>k(()=>import("./icons/arrow-down-line-RSwsrALM.js"),[],import.meta.url),earth:()=>k(()=>import("./icons/earth-line-DW_CwNjP.js"),[],import.meta.url),lock:()=>k(()=>import("./icons/lock-line-BbTC1fux.js"),[],import.meta.url),unlock:()=>k(()=>import("./icons/unlock-line-CGrzBxul.js"),[],import.meta.url),"eye-close":()=>k(()=>import("./icons/eye-close-line-DQnawnJE.js"),[],import.meta.url),"eye-open":()=>k(()=>import("./icons/eye-2-line-Dvog5oyl.js"),[],import.meta.url),message:()=>k(()=>import("./icons/mail-line-Cadg2cpP.js"),[],import.meta.url),comment:{module:()=>k(()=>import("./icons/chat-3-line-C4e7R0Zy.js"),[],import.meta.url),rtl:!0},comment2:{module:()=>k(()=>import("./icons/comment-2-line-DfD-95ou.js"),[],import.meta.url),rtl:!0},home:()=>k(()=>import("./icons/home-3-line-BLD1YYP8.js"),[],import.meta.url),notification:()=>k(()=>import("./icons/notification-line-Cc2m6sh5.js"),[],import.meta.url),follow:()=>k(()=>import("./icons/user-follow-line-CsL-DB1N.js"),[],import.meta.url),"follow-add":()=>k(()=>import("./icons/user-add-line-DuegJyfy.js"),[],import.meta.url),poll:[()=>k(()=>import("./icons/chart-bar-line-W9BuvVdR.js"),[],import.meta.url),"90deg"],pencil:()=>k(()=>import("./icons/pencil-line-BwUdLENj.js"),[],import.meta.url),quill:()=>k(()=>import("./icons/quill-pen-line-oAx8SSeF.js"),[],import.meta.url),at:()=>k(()=>import("./icons/at-line-C4-OGRKX.js"),[],import.meta.url),attachment:()=>k(()=>import("./icons/attachment-line-C4ysC1zZ.js"),[],import.meta.url),upload:()=>k(()=>import("./icons/upload-3-line-BB2RA_2Z.js"),[],import.meta.url),gear:()=>k(()=>import("./icons/settings-3-line-BGrM7a5R.js"),[],import.meta.url),more:()=>k(()=>import("./icons/more-3-line-WfszpsFu.js"),[],import.meta.url),more2:()=>k(()=>import("./icons/more-1-fill-Cnnj9cLP.js"),[],import.meta.url),external:{module:()=>k(()=>import("./icons/external-link-line-BYXsdcMa.js"),[],import.meta.url),rtl:!0},popout:{module:()=>k(()=>import("./icons/external-link-line-BYXsdcMa.js"),[],import.meta.url),rtl:!0},popin:{module:()=>k(()=>import("./icons/external-link-line-BYXsdcMa.js"),[],import.meta.url),rotate:"180deg",rtl:!0},plus:()=>k(()=>import("./icons/add-circle-line-VUOz5dLS.js"),[],import.meta.url),"chevron-left":{module:()=>k(()=>import("./icons/left-line-8vYaPuok.js"),[],import.meta.url),rtl:!0},"chevron-right":{module:()=>k(()=>import("./icons/right-line-E80CeS1Q.js"),[],import.meta.url),rtl:!0},"chevron-down":()=>k(()=>import("./icons/down-line-PlS1iUy8.js"),[],import.meta.url),reply:{module:()=>k(()=>import("./icons/share-forward-line-DX1QbiUu.js"),[],import.meta.url),rotate:"180deg",flip:"horizontal",rtl:!0},thread:()=>k(()=>import("./icons/route-line-D10jSVCO.js"),[],import.meta.url),group:{module:()=>k(()=>import("./icons/group-line-Cw2Phg9p.js"),[],import.meta.url),rtl:!0},bot:()=>k(()=>import("./icons/android-2-line-C7qVwx2U.js"),[],import.meta.url),menu:()=>k(()=>import("./icons/rows-4-line-DIXu-DVG.js"),[],import.meta.url),list:{module:()=>k(()=>import("./icons/list-check-line-BaMf8v8i.js"),[],import.meta.url),rtl:!0},search:()=>k(()=>import("./icons/search-2-line-CoCbFBVR.js"),[],import.meta.url),hashtag:()=>k(()=>import("./icons/hashtag-line-Cml-0qv2.js"),[],import.meta.url),info:()=>k(()=>import("./icons/information-line-Dn255DD5.js"),[],import.meta.url),shortcut:()=>k(()=>import("./icons/lightning-line-cvW5NR-M.js"),[],import.meta.url),user:()=>k(()=>import("./icons/user-4-line-C89P3h09.js"),[],import.meta.url),following:()=>k(()=>import("./icons/walk-line-BZwRwcxJ.js"),[],import.meta.url),pin:()=>k(()=>import("./icons/pin-line-BqseDe3t.js"),[],import.meta.url),unpin:[()=>k(()=>import("./icons/pin-line-BqseDe3t.js"),[],import.meta.url),"180deg"],bus:()=>k(()=>import("./icons/bus-2-line-CfBaNBAi.js"),[],import.meta.url),link:()=>k(()=>import("./icons/link-2-line-SnIkQ_rZ.js"),[],import.meta.url),history:()=>k(()=>import("./icons/history-line-Bi2So-je.js"),[],import.meta.url),share:()=>k(()=>import("./icons/share-2-line-C2byQ30z.js"),[],import.meta.url),sparkles:()=>k(()=>import("./icons/sparkles-line-DWyRj8uB.js"),[],import.meta.url),sparkles2:()=>k(()=>import("./icons/sparkles-2-line-H731KO3v.js"),[],import.meta.url),exit:{module:()=>k(()=>import("./icons/exit-line-NjC63GxM.js"),[],import.meta.url),rtl:!0},translate:()=>k(()=>import("./icons/translate-line-cdOWN72F.js"),[],import.meta.url),play:()=>k(()=>import("./icons/play-fill-D1o3ePO2.js"),[],import.meta.url),trash:()=>k(()=>import("./icons/delete-2-line-C-lQIJNC.js"),[],import.meta.url),mute:{module:()=>k(()=>import("./icons/volume-mute-line-BluUkhVT.js"),[],import.meta.url),rtl:!0},unmute:{module:()=>k(()=>import("./icons/volume-line-dtC5ZFr8.js"),[],import.meta.url),rtl:!0},block:()=>k(()=>import("./icons/forbid-circle-line-f_JQE7a8.js"),[],import.meta.url),unblock:[()=>k(()=>import("./icons/forbid-circle-line-f_JQE7a8.js"),[],import.meta.url),"180deg"],flag:()=>k(()=>import("./icons/flag-1-line-sWzx_4o4.js"),[],import.meta.url),time:()=>k(()=>import("./icons/time-line-CHAmvUdg.js"),[],import.meta.url),refresh:()=>k(()=>import("./icons/refresh-2-line-B3CD5yz0.js"),[],import.meta.url),emoji2:()=>k(()=>import("./icons/emoji-2-line-DODV8bnC.js"),[],import.meta.url),filter:()=>k(()=>import("./icons/filter-2-line-DLBEPhKS.js"),[],import.meta.url),filters:()=>k(()=>import("./icons/filter-line-CuUlgBZU.js"),[],import.meta.url),chart:()=>k(()=>import("./icons/chart-line-line-noCpZUdN.js"),[],import.meta.url),react:()=>k(()=>import("./icons/react-line-C6TecPWI.js"),[],import.meta.url),layout4:{module:()=>k(()=>import("./icons/layout-4-line-BFFb1cPy.js"),[],import.meta.url),rtl:!0},layout5:()=>k(()=>import("./icons/layout-5-line-tauINoiF.js"),[],import.meta.url),announce:{module:()=>k(()=>import("./icons/announcement-line-BdsFnqjO.js"),[],import.meta.url),rtl:!0},alert:()=>k(()=>import("./icons/alert-line-CcwmWSBO.js"),[],import.meta.url),round:()=>k(()=>import("./icons/round-fill-CaZIeOWe.js"),[],import.meta.url),"arrow-up-circle":()=>k(()=>import("./icons/arrow-up-circle-line-SO68bPTf.js"),[],import.meta.url),"arrow-down-circle":()=>k(()=>import("./icons/arrow-down-circle-line-SfuiravZ.js"),[],import.meta.url),clipboard:{module:()=>k(()=>import("./icons/clipboard-line-CIOFpSsX.js"),[],import.meta.url),rtl:!0},"account-edit":()=>k(()=>import("./icons/user-edit-line-CC6Y-fJT.js"),[],import.meta.url),"account-warning":()=>k(()=>import("./icons/user-warning-line-BLfdr8Bj.js"),[],import.meta.url),"account-add":()=>k(()=>import("./icons/user-add-2-line-BbaxtCjf.js"),[],import.meta.url),keyboard:()=>k(()=>import("./icons/keyboard-line-BRd9ohM1.js"),[],import.meta.url),cloud:()=>k(()=>import("./icons/cloud-line-CCOdtB64.js"),[],import.meta.url),month:{module:()=>k(()=>import("./icons/calendar-month-line-DGpTEHfi.js"),[],import.meta.url),rtl:!0},media:()=>k(()=>import("./icons/photo-album-line-DkklX4P5.js"),[],import.meta.url),speak:()=>k(()=>import("./icons/radar-line-Dch2zZ5p.js"),[],import.meta.url),building:()=>k(()=>import("./icons/building-5-line-jPUf3HeC.js"),[],import.meta.url),history2:{module:()=>k(()=>import("./icons/history-2-line-C2uKqj-3.js"),[],import.meta.url),rtl:!0},document:()=>k(()=>import("./icons/document-line-ewA3UKpU.js"),[],import.meta.url),"arrows-right":{module:()=>k(()=>import("./icons/arrows-right-line-B7gMPCMB.js"),[],import.meta.url),rtl:!0},code:()=>k(()=>import("./icons/code-line-_8nrb8Yp.js"),[],import.meta.url),copy:()=>k(()=>import("./icons/copy-2-line-SBRewLs-.js"),[],import.meta.url),quote:{module:()=>k(()=>import("./icons/quote-left-line-D0CgS7V6.js"),[],import.meta.url),rtl:!0},settings:()=>k(()=>import("./icons/settings-6-line-3dTfr4F6.js"),[],import.meta.url),"heart-break":()=>k(()=>import("./icons/heart-crack-line-BlrTdexG.js"),[],import.meta.url),"user-x":()=>k(()=>import("./icons/user-x-line-Dahn1YZg.js"),[],import.meta.url),minimize:()=>k(()=>import("./icons/arrows-down-line-4JmRUmoO.js"),[],import.meta.url),celebrate:()=>k(()=>import("./icons/celebrate-line-CwClz8eZ.js"),[],import.meta.url),schedule:()=>k(()=>import("./icons/calendar-time-add-line-BwP_cVys.js"),[],import.meta.url),day:()=>k(()=>import("./icons/calendar-day-line-zQlj2fPr.js"),[],import.meta.url),camera:()=>k(()=>import("./icons/camera-line-DK82q_yA.js"),[],import.meta.url),endorsement:{module:()=>k(()=>import("./icons/user-star-line-jCNS7JD6.js"),[],import.meta.url),rtl:!0},formula:()=>k(()=>import("./icons/formula-line-DHbN6ztn.js"),[],import.meta.url)},cl={xs:8,s:12,m:16,l:20,xl:24,xxl:32},ui={},ll=Oa(function({width:t,height:e,body:n,rotate:o,flip:i}){return r("svg",{viewBox:`0 0 ${t} ${e}`,dangerouslySetInnerHTML:{__html:n},style:{transform:`${o?`rotate(${o})`:""} ${i?"scaleX(-1)":""}`}})},{isShallowEqual:!0,maxSize:Object.keys(As).length,matchesArg:(t,e)=>t.icon===e.icon&&t.body===e.body});function D({icon:t,size:e="m",alt:n,title:o,class:i="",style:a={}}){if(!t)return null;const s=cl[e];let c=As[t];if(!c)return null;let l,h,d=!1;Array.isArray(c)?[c,l,h]=c:typeof c=="object"&&({rotate:l,flip:h,rtl:d}=c,c=c.module);const[u,f]=U(ui[t]),m=N(t);return X(()=>{u&&m.current===t||((async()=>{const p=await c();f(p.default),ui[t]=p.default})(),m.current=t)},[t]),r("span",{class:`icon ${i} ${d?"rtl-flip":""}`,title:o||n,style:{width:`${s}px`,height:`${s}px`,...a},"data-icon":t,children:u&&r(ll,{icon:t,width:u.width,height:u.height,body:u.body,rotate:l,flip:h})})}const qe=ke((t,e)=>{let n;try{n=$a()}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(([h,d])=>`${h}=${encodeURIComponent(d)}`).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&&(W.prevLocation=n),t.onClick?.(c)}})});function di(t){const{className:e,disabled:n,...o}=t;return r(Uc,{className:e,disabled:n,children:({ref:i,closeMenu:a})=>r(qe,{...o,ref:i,onClick:({detail:s})=>a(s===0?"Enter":void 0)})})}function hi(t){if(t instanceof Date)return!isNaN(t.getTime());{const e=new Date(t);return!isNaN(e.getTime())}}const ul=kt(()=>new Intl.DateTimeFormat().resolvedOptions().locale),fi=kt((t,e={})=>{const n=t.replace(/-[a-z]+$/i,""),o=bn([n],[ul()],t);try{return new Intl.DateTimeFormat(o,e)}catch{}try{return new Intl.DateTimeFormat(t,e)}catch{}return new Intl.DateTimeFormat(void 0,e)}),dl=kt(t=>new Intl.RelativeTimeFormat(t||void 0)),Ge=60,Ye=60*Ge,De=24*Ye,hl=t=>{const e=dl(It.locale),n=(t.getTime()-Date.now())/1e3,o=Math.abs(n);return o<Ge?e.format(Math.floor(n),"second"):o<Ye?e.format(Math.floor(n/Ge),"minute"):o<De?e.format(Math.floor(n/Ye),"hour"):o<30*De?e.format(Math.floor(n/De),"day"):o<365*De?e.format(Math.floor(n/De/30),"month"):e.format(Math.floor(n/De/365),"year")},fl=t=>{const e=(Date.now()-t.getTime())/1e3;return e<Ge?It._({id:"NnRCUm",values:{0:e<1?1:Math.floor(e)}}):e<Ye?It._({id:"ZSWUwq",values:{0:Math.floor(e/Ge)}}):It._({id:"NSSJsj",values:{0:Math.floor(e/Ye)}})};function ge({datetime:t,format:e}){if(!t)return null;const[n,o]=br(l=>l+1,0),i=ot(()=>new Date(t),[t]),[a,s,c]=ot(()=>{if(!hi(i))return[""+(typeof t=="string"?t:""),"",""];let l;if(e==="micro"){const h=new Date;(h.getTime()-i.getTime())/1e3/De<=1?l=fl(i):h.getFullYear()===i.getFullYear()?l=fi(It.locale,{year:void 0,month:"short",day:"numeric"}).format(i):l=fi(It.locale,{dateStyle:"short"}).format(i)}return l||(l=hl(i)),[l,i.toISOString(),i.toLocaleString()]},[i,e,n]);return X(()=>{if(!hi(i))return;let l,h;function d(){h=requestAnimationFrame(()=>{o(),u()})}function u(){const f=(Date.now()-i.getTime())/1e3;f<Ge?l=setTimeout(d,1e4):f<Ye&&(l=setTimeout(d,6e4))}return u(),()=>{clearTimeout(l),cancelAnimationFrame(h)}},[]),r("time",{datetime:s,title:c,children:a})}function ml(t){const e=N();return r(jc,{...t,instanceRef:e,itemProps:{onPointerMove:n=>{n.pointerType==="touch"&&e.current?.openMenu?.()},onPointerLeave:n=>{n.pointerType==="touch"&&e.current?.openMenu?.()},...t.itemProps}})}function pl(t,e=[]){!t||typeof t!="function"||X(()=>{const n=new CloseWatcher;return n.addEventListener("close",t),()=>{n.destroy()}},e)}const gl=window.CloseWatcher?pl:()=>{},vl=document.getElementById("modal-container");function mi(){return getComputedStyle(document.documentElement).getPropertyValue("--backdrop-theme-color")}function or({children:t,onClose:e,onClick:n,class:o,minimized:i}){if(!t)return null;const a=N();X(()=>{let u=setTimeout(()=>{const f=a.current?.querySelector('[tabindex="-1"]');f&&f.focus()},100);return()=>clearTimeout(u)},[]);const s=window.CloseWatcher,c=je("esc",()=>{setTimeout(()=>{e?.()},0)},{enabled:!s&&!!e,keydown:!1,keyup:!0,useKey:!0,ignoreEventWhen:u=>u.metaKey||u.ctrlKey||u.altKey||u.shiftKey},[e]);gl(e,[e]),X(()=>{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(),h=N();Oe(()=>{if(t&&!i)if(Na.local.get("theme")){const f=mi();l.current=document.querySelector('meta[name="theme-color"][data-theme-setting="manual"]'),l.current&&(h.current=l.current.content,l.current.content=f)}else{const f=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",m=mi();l.current=document.querySelector(`meta[name="theme-color"][media*="${f}"]`),l.current&&(h.current=l.current.content,l.current.content=m)}else l.current&&h.current&&(l.current.content=h.current);return()=>{l.current&&h.current&&(l.current.content=h.current)}},[t,i]);const d=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 eo(d,vl)}const pi={s:16,m:20,l:24,xl:32,xxl:50,xxxl:64},un={},gn=window.OffscreenCanvas?new OffscreenCanvas(1,1):document.createElement("canvas"),Qn=gn.getContext("2d",{willReadFrequently:!0});Qn.imageSmoothingEnabled=!1;const _l=/missing\.png$/;function yl({url:t,staticUrl:e,size:n,alt:o="",squircle:i,...a}){n=pi[n]||n||pi.m;const s=N(),c=_l.test(t);return r("picture",{ref:s,class:`avatar ${i?"squircle":""} ${un[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:un[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),un[t]===void 0&&(c||setTimeout(()=>{try{const{width:h,height:d}=l.target;gn.width!==h&&(gn.width=h),gn.height!==d&&(gn.height=d),Qn.drawImage(l.target,0,0);const u=Qn.getImageData(0,0,h,d),f=u.data.filter((m,p)=>p%4===3&&m<=128).length/(u.data.length/4)>.1;f&&s.current.classList.add("has-alpha"),un[t]=f,Qn.clearRect(0,0,h,d)}catch{un[t]=!1}},1))}})]})}const ve=kt(yl);let rr=!1;const bl=new MutationObserver(t=>{t.forEach(e=>{if(e.type==="attributes"){const{dir:n}=e.target;n==="rtl"?rr=!0:rr=!1}})});bl.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});function ir(){return rr}function wl(){const[t,e]=U({width:null,height:null});return Oe(()=>{const n=()=>{e({width:window.innerWidth,height:window.innerHeight})};return n(),window.addEventListener("resize",n,{passive:!0}),()=>{window.removeEventListener("resize",n)}},[]),t}function ks(t){const{containerProps:e,instanceRef:n,align:o}=t,i=wl(),a=n?.current?n:N(),s=ir()?o==="end"?"start":o==="start"?"end":o:o;return r(Kc,{boundingBoxPadding:Es(),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 So({subMenu:t=!1,confirm:e=!0,confirmLabel:n,menuItemClassName:o,menuFooter:i,menuExtras:a,...s}){const{children:c,onClick:l,...h}=s;return e?r(t?ml:ks,{openTrigger:"clickOnly",direction:"bottom",overflow:"auto",gap:-8,shift:8,menuClassName:"menu-emphasized",...h,menuButton:t?void 0:c,label:t?c:void 0,children:[r(wt,{className:o,onClick:l,children:n}),a,i]}):t?r(wt,{...s}):l?Fa(c,{onClick:l}):c}function sr({staticUrl:t,alt:e,url:n}){return r("picture",{children:[t&&r("source",{srcset:t,media:"(prefers-reduced-motion: reduce)"}),r("img",{src:n,alt:e,class:"shortcode-emoji emoji",width:"16",height:"16",loading:"lazy",decoding:"async",fetchPriority:"low"},e||n)]})}const El=kt(t=>new RegExp(`:(${t.join("|")}):`,"g"));function Tl({text:t,emojis:e}){if(!t)return"";if(!e?.length||t.indexOf(":")===-1)return t;const n=El(e.map(i=>i.shortcode));return t.split(n).map((i,a)=>{const s=e.find(c=>c.shortcode===i);if(s){const{url:c,staticUrl:l}=s;return r(sr,{staticUrl:l,alt:i,url:c},i+"-"+a)}return i})}const Xe=kt(Tl),Al=kt(t=>{const e={sensitivity:"base"};try{return new Intl.Collator(t||void 0,e)}catch{return new Intl.Collator(void 0,e)}}),kl=/([^@]+)(@.+)/i,Cl=/(\:(\w|\+|\-)+\:)(?=|[\!\.\?]|$)/g,Sl=/\s+/g,xl=/[^a-z0-9@\.]/gi;function Il({account:t,instance:e,showAvatar:n,showAcct:o,short:i,external:a,onClick:s}){const{i18n:c}=te();if(!t)return null;const{acct:l,avatar:h,avatarStatic:d,id:u,url:f,displayName:m,emojis:p,bot:g,username:v}=t,[E,w,A]=l.match(kl)||[,l];e||(e=no().instance);const T=v.toLowerCase().trim(),y=(m||"").toLowerCase().trim(),b=y.replace(Cl,"").replace(Sl,""),I=b.replace(xl,""),L=!i&&(T===y||T===b||T===I||Al(c.locale).compare(T,b)===0)||I===l.toLowerCase();return r("a",{class:`name-text ${o?"show-acct":""} ${i?"short":""}`,href:f,target:a?"_blank":null,title:m?`${m} (${A?"":"@"}${l})`:`${A?"":"@"}${l}`,onClick:x=>{if(!a&&!x.shiftKey){if(x.preventDefault(),x.stopPropagation(),s)return s(x);if(x.metaKey||x.ctrlKey||x.shiftKey||x.which===2){const C=`#/${e}/a/${u}`;window.open(C,"_blank");return}W.showAccount={account:t,instance:e}}},children:[n&&r(B,{children:[r(ve,{url:d||h,squircle:g})," "]}),m&&!i?r(B,{children:[r("b",{dir:"auto",children:r(Xe,{text:m,emojis:p})}),!o&&!L&&r(B,{children:[" ",r("i",{class:"bidi-isolate",children:["@",v]})]})]}):i?r("i",{children:v}):r("b",{children:v}),o&&r(B,{children:[r("br",{}),r("i",{class:"bidi-isolate",children:[A?"":"@",w,!!A&&r("span",{class:"ib",children:A})]})]})]})}const Te=kt(Il),Ll="Аҧсшәа",Dl="Acèh",Ml="Lëbacoli",Pl="Afár",Rl="Afrikaans",Ol="Shqip",$l="Dhalur",Nl="አማርኛ",Fl="العربية",Bl="Հայերեն",zl="অসমীয়া",Vl="Авар мацӀ",Hl="अवधी",Kl="Aymar aru",jl="Azərbaycanca",Ul="Basa Bali",Wl="بلوچی",Zl="Bamanankan",ql="Baoulé",Gl="Башҡортса",Yl="Euskara",Xl="Batak Karo",Ql="Batak Simalungun",Jl="Batak Toba",tu="Беларуская",eu="Ichibemba",nu="বাংলা",ou="Betawi",ru="भोजपुरी",iu="Bikol",su="Bosanski",au="Brezhoneg",cu="Български",lu="Буряад",uu="粵語",du="Català",hu="Cebuano",fu="Chamoru",mu="Нохчийн мотт",pu="Chichewa",gu="Kapasen Chuuk",vu="Чӑвашла",_u="Corsu",yu="Qırımtatarca (Кирилл)",bu="Hrvatski",wu="Čeština",Eu="Dansk",Tu="ދިވެހި",Au="Thuɔŋjäŋ",ku="डोगरी",Cu="Dombe",Su="Nederlands",xu="Jula",Iu="རྫོང་ཁ",Lu="English",Du="Esperanto",Mu="Eesti",Pu="Eʋegbe",Ru="Føroyskt",Ou="Vosa Vakaviti",$u="Tagalog",Nu="Suomi",Fu="Fon",Bu="Français",zu="Frysk",Vu="Furlan",Hu="Fulfulde",Ku="Gã",ju="Galego",Uu="ქართული",Wu="Deutsch",Zu="Ελληνικά",qu="Avañe'ẽ",Gu="ગુજરાતી",Yu="Kreyòl ayisyen",Xu="Hakha Chin",Qu="Hausa",Ju="ʻŌlelo Hawaiʻi",td="עברית",ed="Hiligaynon",nd="हिन्दी",od="Hmoob",rd="Magyar",id="Hunsrik",sd="Iban",ad="Íslenska",cd="Igbo",ld="Iloko",ud="Bahasa Indonesia",dd="ᐃᓄᒃᑎᑐᑦ",hd="Gaeilge",fd="Italiano",md="Patwa",pd="日本語",gd="Basa Jawa",vd="Jinghpaw",_d="Kalaallisut",yd="ಕನ್ನಡ",bd="Kanuri",wd="Kapampangan",Ed="Қазақша",Td="Khasi",Ad="ភាសាខ្មែរ",kd="Rukiga",Cd="Kikongo",Sd="Kinyarwanda",xd="Kituba",Id="Kokborok",Ld="Коми кыв",Dd="कोंकणी",Md="한국어",Pd="Krio",Rd="Kurdî (Kurmancî)",Od="کوردی (سۆرانی)",$d="Кыргызча",Nd="ລາວ",Fd="Latgaļu",Bd="Latina",zd="Latviešu",Vd="Ligure",Hd="Limburgs",Kd="Lingála",jd="Lietuvių",Ud="Lombard",Wd="Luganda",Zd="Dholuo",qd="Lëtzebuergesch",Gd="Македонски",Yd="Madhurâ",Xd="मैथिली",Qd="Makassar",Jd="Malagasy",th="Bahasa Melayu",eh="മലയാളം",nh="Malti",oh="Mam",rh="Gaelg",ih="Te Reo Māori",sh="मराठी",ah="Kajin M̧ajeļ",ch="मारवाड़ी",lh="Kreol Morisien",uh="Олык марий",dh="Baso Minang",hh="Mizo ṭawng",fh="Монгол",mh="မြန်မာစာ",ph="Náhuatl",gh="isiNdebele",vh="नेपाली",_h="Norsk",yh="Thok Nath",bh="Occitan",wh="ଓଡ଼ିଆ",Eh="Afaan Oromoo",Th="Ирон æвзаг",Ah="Pangasinan",kh="Papiamentu",Ch="پښتو",Sh="فارسی",xh="Polski",Ih="Português (Brasil)",Lh="ਪੰਜਾਬੀ",Dh="Runa Simi",Mh="Qʼeqchiʼ",Ph="Romani čhib",Rh="Română",Oh="Ikirundi",$h="Русский",Nh="Davvisámegiella",Fh="Gagana Samoa",Bh="Sängö",zh="संस्कृतम्",Vh="ᱥᱟᱱᱛᱟᱲᱤ",Hh="Gàidhlig",Kh="Sepedi",jh="Српски",Uh="Sesotho",Wh="Kreol seselwa",Zh="လိၵ်ႈတႆး",qh="chiShona",Gh="Sicilianu",Yh="Ślōnskŏ",Xh="سنڌي",Qh="සිංහල",Jh="Slovenčina",tf="Slovenščina",ef="Soomaali",nf="Español",of="Basa Sunda",rf="Susu",sf="Kiswahili",af="siSwati",cf="Svenska",lf="Reo Tahiti",uf="Тоҷикӣ",df="ⵜⴰⵎⴰⵣⵉⵖⵜ",hf="தமிழ்",ff="Татарча",mf="తెలుగు",pf="Tetun",gf="ไทย",vf="བོད་ཡིག",_f="ትግርኛ",yf="Tiv",bf="Tok Pisin",wf="Lea fakatonga",Ef="Tshiluba",Tf="Xitsonga",Af="Setswana",kf="ತುಳು",Cf="chiTumbuka",Sf="Türkçe",xf="Türkmençe",If="Тыва дыл",Lf="Akankasa",Df="Удмурт кыл",Mf="Українська",Pf="اردو",Rf="ئۇيغۇرچە",Of="Oʻzbekcha",$f="Tshivenḓa",Nf="Vèneto",Ff="Tiếng Việt",Bf="Winaray",zf="Cymraeg",Vf="Wolof",Hf="isiXhosa",Kf="Саха тыла",jf="ייִדיש",Uf="Yorùbá",Wf="Màaya T'àan",Zf="Didxazá",qf="isiZulu",Gf={ab:Ll,ace:Dl,ach:Ml,aa:Pl,af:Rl,sq:Ol,alz:$l,am:Nl,ar:Fl,hy:Bl,as:zl,av:Vl,awa:Hl,ay:Kl,az:jl,ban:Ul,bal:Wl,bm:Zl,bci:ql,ba:Gl,eu:Yl,btx:Xl,bts:Ql,bbc:Jl,be:tu,bem:eu,bn:nu,bew:ou,bho:ru,bik:iu,bs:su,br:au,bg:cu,bua:lu,yue:uu,ca:du,ceb:hu,ch:fu,ce:mu,ny:pu,"zh-CN":"简体中文","zh-TW":"繁體中文",chk:gu,cv:vu,co:_u,crh:yu,"crh-Latn":"Qırımtatarca (Latin)",hr:bu,cs:wu,da:Eu,"fa-AF":"درى",dv:Tu,din:Au,doi:ku,dov:Cu,nl:Su,dyu:xu,dz:Iu,en:Lu,eo:Du,et:Mu,ee:Pu,fo:Ru,fj:Ou,tl:$u,fi:Nu,fon:Fu,fr:Bu,"fr-CA":"Français (Canada)",fy:zu,fur:Vu,ff:Hu,gaa:Ku,gl:ju,ka:Uu,de:Wu,el:Zu,gn:qu,gu:Gu,ht:Yu,cnh:Xu,ha:Qu,haw:Ju,iw:td,hil:ed,hi:nd,hmn:od,hu:rd,hrx:id,iba:sd,is:ad,ig:cd,ilo:ld,id:ud,"iu-Latn":"Inuktitut (Latin)",iu:dd,ga:hd,it:fd,jam:md,ja:pd,jw:gd,kac:vd,kl:_d,kn:yd,kr:bd,pam:wd,kk:Ed,kha:Td,km:Ad,cgg:kd,kg:Cd,rw:Sd,ktu:xd,trp:Id,kv:Ld,gom:Dd,ko:Md,kri:Pd,ku:Rd,ckb:Od,ky:$d,lo:Nd,ltg:Fd,la:Bd,lv:zd,lij:Vd,li:Hd,ln:Kd,lt:jd,lmo:Ud,lg:Wd,luo:Zd,lb:qd,mk:Gd,mad:Yd,mai:Xd,mak:Qd,mg:Jd,ms:th,"ms-Arab":"بهاس ملايو",ml:eh,mt:nh,mam:oh,gv:rh,mi:ih,mr:sh,mh:ah,mwr:ch,mfe:lh,chm:uh,"mni-Mtei":"ꯃꯤꯇꯩꯂꯣꯟ",min:dh,lus:hh,mn:fh,my:mh,nhe:ph,"ndc-ZW":"Ndau",nr:gh,new:"नेपाल भाषा",ne:vh,"bm-Nkoo":"ߒߞߏ",no:_h,nus:yh,oc:bh,or:wh,om:Eh,os:Th,pag:Ah,pap:kh,ps:Ch,fa:Sh,pl:xh,pt:Ih,"pt-PT":"Português (Portugal)",pa:Lh,"pa-Arab":"پنجابی",qu:Dh,kek:Mh,rom:Ph,ro:Rh,rn:Oh,ru:$h,se:Nh,sm:Fh,sg:Bh,sa:zh,"sat-Latn":"Santali (Latin)",sat:Vh,gd:Hh,nso:Kh,sr:jh,st:Uh,crs:Wh,shn:Zh,sn:qh,scn:Gh,szl:Yh,sd:Xh,si:Qh,sk:Jh,sl:tf,so:ef,es:nf,su:of,sus:rf,sw:sf,ss:af,sv:cf,ty:lf,tg:uf,"ber-Latn":"Tamazight (Latin)",ber:df,ta:hf,tt:ff,te:mf,tet:pf,th:gf,bo:vf,ti:_f,tiv:yf,tpi:bf,to:wf,lua:Ef,ts:Tf,tn:Af,tcy:kf,tum:Cf,tr:Sf,tk:xf,tyv:If,ak:Lf,udm:Df,uk:Mf,ur:Pf,ug:Rf,uz:Of,ve:$f,vec:Nf,vi:Ff,war:Bf,cy:zf,wo:Vf,xh:Hf,sah:Kf,yi:jf,yo:Uf,yua:Wf,zap:Zf,zu:qf},Hn={"zh-YUE":"YUE",zh_HANT:"zh-Hant"},xo=kt(t=>new Intl.DisplayNames(t||void 0,{type:"language"}));function Yf(t){let e,n;typeof t=="object"&&({code:t,locale:e,fallback:n}=t);try{const o=xo(e||It.locale).of(t);if(o!==t)return o;if(!n){const i=xo(t).of(t);if(i!==t)return i;const a=Gf?.[e];if(a!==t)return a}return n||""}catch{if(Hn[t])try{const i=xo(Hn[e]||e||It.locale).of(Hn[t]);return i!==Hn[t]?i:n||""}catch{}return n||""}}const dn=kt(Yf),Xf={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"},Qf={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"},Jf={},Cs={sl:Xf,tl:Qf,al:Jf},tm=Object.entries(Cs.tl).map(([t,{name:e}])=>({code:t,name:e})),em=kt(()=>[new Intl.DateTimeFormat().resolvedOptions().locale,...navigator.languages]),nm=()=>bn(em(),tm.map(t=>t.code.replace("_","-")),"en");function Ss(t=!1){if(t){const{contentTranslationTargetLanguage:e}=W.settings;if(e)return e}return nm()}const gi=["byte","kilobyte","megabyte","gigabyte","terabyte","petabyte"];function xv(t){const e=Math.min(Math.floor(Math.log2(t)/10),gi.length-1),n=t/1024**e;return It.number(n,{style:"unit",unit:gi[e],unitDisplay:"narrow",maximumFractionDigits:0})}const Ze=2147483647,se=36,Lr=1,An=26,om=38,rm=700,xs=72,Is=128,Ls="-",im=/^xn--/,sm=/[^\0-\x7F]/,am=/[\x2E\u3002\uFF0E\uFF61]/g,cm={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Io=se-Lr,ae=Math.floor,Lo=String.fromCharCode;function Ee(t){throw new RangeError(cm[t])}function lm(t,e){const n=[];let o=t.length;for(;o--;)n[o]=e(t[o]);return n}function Ds(t,e){const n=t.split("@");let o="";n.length>1&&(o=n[0]+"@",t=n[1]),t=t.replace(am,".");const i=t.split("."),a=lm(i,e).join(".");return o+a}function Ms(t){const e=[];let n=0;const o=t.length;for(;n<o;){const i=t.charCodeAt(n++);if(i>=55296&&i<=56319&&n<o){const a=t.charCodeAt(n++);(a&64512)==56320?e.push(((i&1023)<<10)+(a&1023)+65536):(e.push(i),n--)}else e.push(i)}return e}const um=t=>String.fromCodePoint(...t),dm=function(t){return t>=48&&t<58?26+(t-48):t>=65&&t<91?t-65:t>=97&&t<123?t-97:se},vi=function(t,e){return t+22+75*(t<26)-((e!=0)<<5)},Ps=function(t,e,n){let o=0;for(t=n?ae(t/rm):t>>1,t+=ae(t/e);t>Io*An>>1;o+=se)t=ae(t/Io);return ae(o+(Io+1)*t/(t+om))},Rs=function(t){const e=[],n=t.length;let o=0,i=Is,a=xs,s=t.lastIndexOf(Ls);s<0&&(s=0);for(let c=0;c<s;++c)t.charCodeAt(c)>=128&&Ee("not-basic"),e.push(t.charCodeAt(c));for(let c=s>0?s+1:0;c<n;){const l=o;for(let d=1,u=se;;u+=se){c>=n&&Ee("invalid-input");const f=dm(t.charCodeAt(c++));f>=se&&Ee("invalid-input"),f>ae((Ze-o)/d)&&Ee("overflow"),o+=f*d;const m=u<=a?Lr:u>=a+An?An:u-a;if(f<m)break;const p=se-m;d>ae(Ze/p)&&Ee("overflow"),d*=p}const h=e.length+1;a=Ps(o-l,h,l==0),ae(o/h)>Ze-i&&Ee("overflow"),i+=ae(o/h),o%=h,e.splice(o++,0,i)}return String.fromCodePoint(...e)},Os=function(t){const e=[];t=Ms(t);const n=t.length;let o=Is,i=0,a=xs;for(const l of t)l<128&&e.push(Lo(l));const s=e.length;let c=s;for(s&&e.push(Ls);c<n;){let l=Ze;for(const d of t)d>=o&&d<l&&(l=d);const h=c+1;l-o>ae((Ze-i)/h)&&Ee("overflow"),i+=(l-o)*h,o=l;for(const d of t)if(d<o&&++i>Ze&&Ee("overflow"),d===o){let u=i;for(let f=se;;f+=se){const m=f<=a?Lr:f>=a+An?An:f-a;if(u<m)break;const p=u-m,g=se-m;e.push(Lo(vi(m+p%g,0))),u=ae(p/g)}e.push(Lo(vi(u,0))),a=Ps(i,h,c===s),i=0,++c}++i,++o}return e.join("")},hm=function(t){return Ds(t,function(e){return im.test(e)?Rs(e.slice(4).toLowerCase()):e})},fm=function(t){return Ds(t,function(e){return sm.test(e)?"xn--"+Os(e):e})},$s={version:"2.3.1",ucs2:{decode:Ms,encode:um},decode:Rs,encode:Os,toASCII:fm,toUnicode:hm};function ar(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"),`<picture><source srcset="${i}" media="(prefers-reduced-motion: reduce)"></source><img class="shortcode-emoji emoji" src="${a}" alt=":${o}:" title=":${o}:" width="16" height="16" loading="lazy" decoding="async" fetchPriority="low" /></picture>`)}),t):""}const Ve=document.createElement("div"),mm=["u-url","mention","hashtag"],pm=/[&<>]/g;function Do(t){return t.replace(pm,e=>({"&":"&amp;","<":"&lt;",">":"&gt;"})[e])}const gm=/<a/i,vm=/^https?:\/\//i,_m=/^@[^@]+(@[^@]+)?$/,ym=/^#[^#]+$/,bm=/^```[^]+```$/,wm=/^```/,Em=/```$/,Tm=/`[^`]+`/,Am=/(twitter|x)\.com/i,km=/@[a-zA-Z0-9_]+@(twitter|x)\.com/,Cm=/(@([a-zA-Z0-9_]+)@(twitter|x)\.com)/g,Sm=/(`[^]+?`)/g;function xm(t,e){if(e){const n=document.createElement("template");return n.innerHTML=t,n.content}else{const n=document.createElement("div");return n.innerHTML=t,n}}function Im(t,e={}){if(!t)return"";const{emojis:n,returnDOM:o,postEnhanceDOM:i=()=>{}}=e;let a=t;const s=xm(a,o),c=gm.test(a),l=a.includes("```");if(c){const d=s.querySelectorAll('a:not([target="_blank"])');for(const f of d)f.setAttribute("target","_blank");const u=s.querySelectorAll("a[class]");for(const f of u)for(const m of f.classList)mm.includes(m)||f.classList.remove(m)}if(c){const d=s.querySelectorAll("a[href]");for(const u of d)vm.test(u.textContent.trim())&&(u.classList.add("has-url-text"),Pm(u))}if(c){const d=s.querySelectorAll("a[href]"),u=[];for(const f of d){const m=f.innerText.trim(),p=f.querySelector("*");if(_m.test(m)){const[g,v,E]=m.split("@");p||(!u.some(([w])=>w===v)||u.some(([w,A])=>w===v&&A===E)?(f.innerHTML=`@<span>${v}</span>`,u.push([v,E])):f.innerHTML=`@<span>${v}@${E}</span>`),f.classList.add("mention")}ym.test(m)&&(p||(f.innerHTML=`#<span>${m.slice(1)}</span>`),f.classList.add("mention","hashtag"))}}let h;if(a.includes(":")&&n?.length){h=Po(s);for(const d of h){let u=Do(d.nodeValue);u=ar(u,n),Ve.innerHTML=u,d.replaceWith(...Ve.childNodes)}}if(l){const d=[...s.querySelectorAll("p")].filter(u=>bm.test(u.innerText.trim()));for(const u of d){const f=document.createElement("pre");for(const m of u.querySelectorAll("br"))m.replaceWith(`
`);f.innerHTML=`<code>${u.innerHTML.trim()}</code>`,u.replaceWith(f)}}if(l){const u=[...s.querySelectorAll("p")].filter(f=>wm.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(Em.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 A of w.querySelectorAll("br"))A.replaceWith(`
`);const E=m.map(w=>w.innerHTML).join(`
`);v.innerHTML=`<code tabindex="0">${E}</code>`,f.replaceWith(v);for(const w of m)w.remove()}}}if(a.includes("`")){h=Po(s);for(const d of h){let u=Do(d.nodeValue);Tm.test(u)&&(u=u.replaceAll(Sm,"<code>$1</code>")),Ve.innerHTML=u,d.replaceWith(...Ve.childNodes)}}if(Am.test(a)){h=Po(s,{rejectFilter:["A"]});for(const d of h){let u=Do(d.nodeValue);km.test(u)&&(u=u.replaceAll(Cm,'<a href="https://twitter.com/$2" rel="nofollow noopener" target="_blank">$1</a>')),Ve.innerHTML=u,d.replaceWith(...Ve.childNodes)}}if(a.includes("#")){let d=null;const u=[...s.querySelectorAll("p")].filter((f,m)=>{let p=0;for(let g=0;g<f.childNodes.length;g++){const v=f.childNodes[g];if(v.nodeType===Node.TEXT_NODE){if(v.textContent.trim()!=="")return!1}else if(v.tagName!=="BR")if(v.tagName==="A"){const E=v.textContent.trim();if(!E||!E.startsWith("#"))return!1;p++}else return!1}if(p>3||p>1&&d&&m===d+1)return d=m,!0});if(u?.length)for(const f of u)f.classList.add("hashtag-stuffing"),f.title=f.innerText}if(a.includes("<img")){const d=s.querySelectorAll("img");for(let u=0;u<d.length;u++){const f=d[u],m=f.getAttribute("width")||f.naturalWidth,p=f.getAttribute("height")||f.naturalHeight;m&&p&&f.style.setProperty("--original-aspect-ratio",`${m}/${p}`)}}for(const d of s.childNodes)if(d.nodeType===Node.TEXT_NODE&&d.textContent.trim?.()){const u=document.createElement("span");u.textContent=d.textContent,s.replaceChild(u,d)}return i&&queueMicrotask(()=>i(s)),o?s:s.innerHTML}const Ns=kt(Im),Lm=["STYLE","IMG","VIDEO","AUDIO","AREA","MAP","TRACK","EMBED","IFRAME","OBJECT","PICTURE","PORTAL","SOURCE","SVG","MATH","CANVAS","NOSCRIPT","SCRIPT","INPUT","OPTION","TEXTAREA","SLOT","TEMPLATE"],Dm=Object.fromEntries(Lm.map(t=>[t,!0])),Mm=/^(https?:\/\/(www\.)?|xmpp:)/,Mo=30;function Pm(t){if(!(!t||t.querySelector?.("*")))try{const e=t.innerText.trim(),n=(e.match(Mm)||[])[0]||"";if(!n)return;const o=e.slice(n.length,n.length+Mo),i=e.slice(n.length+Mo),a=e.slice(n.length).length>Mo;t.innerHTML=`<span class="invisible">${n}</span><span class=${a?"ellipsis":""}>${o}</span><span class="invisible">${i}</span>`}catch{}}function Po(t,e={}){const n=[],o=Object.assign({},Dm,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}function Rm(t){const{mentions:e=[],instance:n,previewMode:o,statusURL:i}=t||{};return a=>{let{target:s}=a;if(s=s.closest("a"),!s||a.metaKey||a.ctrlKey||a.shiftKey||a.altKey||a.which===2)return;const c=s.previousSibling?.textContent,l=c?.endsWith("@"),h=s.innerText.startsWith("@");if((s.classList.contains("u-url")||s.classList.contains("mention"))&&h||l&&!h){const d=(s.querySelector("span")||s).innerText.trim(),u=d.replace(/^@/,""),f=s.getAttribute("href"),m=e.find(p=>p.url===f)||e.find(p=>p.acct===u||p.username===u);if(m)a.preventDefault(),a.stopPropagation(),W.showAccount={account:m.acct,instance:n};else if(!/^http/i.test(d)){a.preventDefault(),a.stopPropagation();const p=s.getAttribute("href");W.showAccount={account:p,instance:n}}}else if(!o){const d=c?.endsWith("#");if(s.classList.contains("hashtag")||d){a.preventDefault(),a.stopPropagation();const u=s.innerText.replace(/^#/,"").trim(),f=n?`#/${n}/t/${u}`:`#/t/${u}`;location.hash=f}else W.unfurledLinks[s.href]?.url&&i!==s.href&&(a.preventDefault(),a.stopPropagation(),W.prevLocation={pathname:location.hash.replace(/^#/,"")},location.hash=`#${W.unfurledLinks[s.href].url}`)}}}function Iv(t,e){return()=>It.number(t,{style:"unit",unit:e,unitDisplay:"long"})}async function Lv(t,e={}){if(!t?.length)return;const{masto:n}=no(),o=wr(),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 pe(t){try{return It.number(t,{notation:"compact",roundingMode:"floor"})}catch{return t}}const Om={"@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"},Ro=/pixelfed/i,ie=/^(?!.*pixelfed).*$/i,$m=/pleroma/i,Nm=/akkoma/i;const _i={"@mastodon/lists":ie,"@mastodon/filters":ie,"@mastodon/mentions":ie,"@mastodon/trending-hashtags":ie,"@mastodon/trending-links":ie,"@mastodon/post-bookmark":ie,"@mastodon/post-edit":ie,"@mastodon/profile-edit":ie,"@mastodon/profile-private-note":ie,"@mastodon/pinned-posts":ie,"@pixelfed/trending":Ro,"@pixelfed/home-include-reblogs":Ro,"@pixelfed/global-feed":Ro,"@pleroma/local-visibility-post":$m,"@akkoma/local-visibility-post":Nm},Kn={};function jn(t){try{let{version:e,domain:n}=Ba(),o=za()?.software?.name||"mastodon";o==="hometown"&&(o="mastodon");const i=`${n}-${t}`;if(Kn[i])return Kn[i];if(_i[t])return Kn[i]=_i[t].test(e);const a=Om[t];if(!a)return!1;const c=t.match(/^@([a-z]+)\//)[1]===o.toLowerCase();return Kn[i]=c&&Va(e,a,{includePrerelease:!0,loose:!0})}catch{return!1}}function Dv({skeleton:t,account:e,avatarSize:n="xl",useAvatarStatic:o=!1,instance:i,external:a,internal:s,onClick:c,showActivity:l=!1,showStats:h=!1,accountInstance:d,hideDisplayName:u=!1,relationship:f={},excludeRelationshipAttrs:m=[]}){const{_:p}=te();if(t)return r("div",{class:"account-block skeleton",children:[r(ve,{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:A,username:T,emojis:y,url:b,statusesCount:I,lastStatusAt:L,bot:x,fields:C,note:O,group:M,followersCount:R,createdAt:S,locked:Z}=e;let[H,ft,G]=v.match(/([^@]+)(@.+)/i)||[,v];d&&(G=`@${d}`);const rt=C?.find(Y=>!!Y.verifiedAt&&!!Y.value),et={};for(const Y in f)m.includes(Y)||(et[Y]=f[Y]);const lt=et.following||et.followedBy||et.requested;return r("a",{class:"account-block",href:b,target:a?"_blank":null,title:G?v:`@${v}`,onClick:Y=>{if(!a){if(Y.preventDefault(),c)return c(Y);s?location.hash=`/${i}/a/${g}`:W.showAccount={account:e,instance:i}}},children:[r("div",{class:"avatar-container",children:r(ve,{url:o?w:E||w,staticUrl:o?void 0:w,size:n,squircle:x})}),r("span",{class:"account-block-content",children:[!u&&r(B,{children:A?r("b",{children:r(Xe,{text:A,emojis:y})}):r("b",{children:T})})," ",r("span",{class:"account-block-acct bidi-isolate",children:[G?"":"@",ft,r("wbr",{}),G,Z&&r(B,{children:[" ",r(D,{icon:"lock",size:"s",alt:p({id:"G2fuEb"})})]})]}),l&&r("div",{class:"account-block-stats",children:[r(P,{id:"ajzDof",values:{0:pe(I)}}),!!L&&r(B,{children:[" ","·"," ",r(P,{id:"f8bJ3C",values:{0:Tn(L,{hideTime:!0})}})]})]}),h&&r("div",{class:"account-block-stats",children:[x&&r(B,{children:r("span",{class:"tag collapsed",children:[r(D,{icon:"bot"})," ",r(P,{id:"9Vdq+j"})]})}),!!M&&r(B,{children:r("span",{class:"tag collapsed",children:[r(D,{icon:"group"})," ",r(P,{id:"L8fEEm"})]})}),lt&&r("div",{class:"shazam-container-horizontal",children:r("div",{class:"shazam-container-inner",children:et.following&&et.followedBy?r("span",{class:"tag minimal",children:r(P,{id:"7oRLbi"})}):et.requested?r("span",{class:"tag minimal",children:r(P,{id:"Yx0Ud8"})}):et.following?r("span",{class:"tag minimal",children:r(P,{id:"y6sq5j"})}):et.followedBy?r("span",{class:"tag minimal",children:r(P,{id:"p3UO/y"})}):null})},f.id),!!R&&r("span",{class:"ib",children:r(P,{id:"Mn1E9C",values:{followersCount:R}})}),!!rt&&r("span",{class:"verified-field",children:[r(D,{icon:"check-circle",size:"s",alt:p({id:"QDEWii"})})," ",r("span",{dangerouslySetInnerHTML:{__html:Ns(rt.value,{emojis:y})}})]}),!x&&!M&&!lt&&!R&&!rt&&!!S&&r("span",{class:"created-at",children:r(P,{id:"PCcEFZ",values:{0:Tn(S,{hideTime:!0})},components:{0:r("time",{datetime:S})}})})]})]})]})}var Oo={},$o,yi;function Fm(){if(yi)return $o;yi=1;function t(e,n){typeof n=="boolean"&&(n={forever:n}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=n||{},this._maxRetryTime=n&&n.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}return $o=t,t.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)},t.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null},t.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var n=new Date().getTime();if(e&&n-this._operationStart>=this._maxRetryTime)return this._errors.push(e),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var o=this._timeouts.shift();if(o===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),o=this._cachedTimeouts.slice(-1);else return!1;var i=this;return this._timer=setTimeout(function(){i._attempts++,i._operationTimeoutCb&&(i._timeout=setTimeout(function(){i._operationTimeoutCb(i._attempts)},i._operationTimeout),i._options.unref&&i._timeout.unref()),i._fn(i._attempts)},o),this._options.unref&&this._timer.unref(),!0},t.prototype.attempt=function(e,n){this._fn=e,n&&(n.timeout&&(this._operationTimeout=n.timeout),n.cb&&(this._operationTimeoutCb=n.cb));var o=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){o._operationTimeoutCb()},o._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)},t.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)},t.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)},t.prototype.start=t.prototype.try,t.prototype.errors=function(){return this._errors},t.prototype.attempts=function(){return this._attempts},t.prototype.mainError=function(){if(this._errors.length===0)return null;for(var e={},n=null,o=0,i=0;i<this._errors.length;i++){var a=this._errors[i],s=a.message,c=(e[s]||0)+1;e[s]=c,c>=o&&(n=a,o=c)}return n},$o}var bi;function Bm(){return bi||(bi=1,function(t){var e=Fm();t.operation=function(n){var o=t.timeouts(n);return new e(o,{forever:n&&(n.forever||n.retries===1/0),unref:n&&n.unref,maxRetryTime:n&&n.maxRetryTime})},t.timeouts=function(n){if(n instanceof Array)return[].concat(n);var o={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var i in n)o[i]=n[i];if(o.minTimeout>o.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var a=[],s=0;s<o.retries;s++)a.push(this.createTimeout(s,o));return n&&n.forever&&!a.length&&a.push(this.createTimeout(s,o)),a.sort(function(c,l){return c-l}),a},t.createTimeout=function(n,o){var i=o.randomize?Math.random()+1:1,a=Math.round(i*Math.max(o.minTimeout,1)*Math.pow(o.factor,n));return a=Math.min(a,o.maxTimeout),a},t.wrap=function(n,o,i){if(o instanceof Array&&(i=o,o=null),!i){i=[];for(var a in n)typeof n[a]=="function"&&i.push(a)}for(var s=0;s<i.length;s++){var c=i[s],l=n[c];n[c]=(function(d){var u=t.operation(o),f=Array.prototype.slice.call(arguments,1),m=f.pop();f.push(function(p){u.retry(p)||(p&&(arguments[0]=u.mainError()),m.apply(this,arguments))}),u.attempt(function(){d.apply(n,f)})}).bind(n,l),n[c].options=o}}}(Oo)),Oo}var No,wi;function zm(){return wi||(wi=1,No=Bm()),No}var Vm=zm();const Hm=yr(Vm),Km=Object.prototype.toString,jm=t=>Km.call(t)==="[object Error]",Um=new Set(["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Load failed","Network request failed","fetch failed"]);function Wm(t){return t&&jm(t)&&t.name==="TypeError"&&typeof t.message=="string"?t.message==="Load failed"?t.stack===void 0:Um.has(t.message):!1}class Zm extends Error{constructor(e){super(),e instanceof Error?(this.originalError=e,{message:e}=e):(this.originalError=new Error(e),this.originalError.stack=this.stack),this.name="AbortError",this.message=e}}const Ei=(t,e,n)=>{const o=n.retries-(e-1);return t.attemptNumber=e,t.retriesLeft=o,t};async function qm(t,e){return new Promise((n,o)=>{e={...e},e.onFailedAttempt??=()=>{},e.shouldRetry??=()=>!0,e.retries??=10;const i=Hm.operation(e),a=()=>{i.stop(),o(e.signal?.reason)};e.signal&&!e.signal.aborted&&e.signal.addEventListener("abort",a,{once:!0});const s=()=>{e.signal?.removeEventListener("abort",a),i.stop()};i.attempt(async c=>{try{const l=await t(c);s(),n(l)}catch(l){try{if(!(l instanceof Error))throw new TypeError(`Non-error was thrown: "${l}". You should only throw errors.`);if(l instanceof Zm)throw l.originalError;if(l instanceof TypeError&&!Wm(l))throw l;if(Ei(l,c,e),await e.shouldRetry(l)||(i.stop(),o(l)),await e.onFailedAttempt(l),!i.retry(l))throw i.mainError()}catch(h){Ei(h,c,e),s(),o(h)}}})})}const Fs="LanguageDetector"in self,Gm=Fs&&"Translator"in self;let Re;Fs&&(async()=>{try{const t=await LanguageDetector.availability();if(t==="unavailable")return;t==="available"?Re=await LanguageDetector.create():(Re=await LanguageDetector.create({monitor(e){e.addEventListener("downloadprogress",n=>{})}}),await Re.ready)}catch{}})();const Ym=async(t,e,n)=>{let o;const i=e;if(e==="auto"){if(!Re?.detect)return{error:"No language detector"};try{e=(await Re.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(h){h.addEventListener("downloadprogress",d=>{})}}),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 Xm=Object.defineProperty,Qm=(t,e,n)=>e in t?Xm(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Un=(t,e,n)=>Qm(t,typeof e!="symbol"?e+"":e,n),cr=new Map,Wn=new WeakMap,Ti=0,Jm=void 0;function tp(t){return t?(Wn.has(t)||(Ti+=1,Wn.set(t,Ti.toString())),Wn.get(t)):"0"}function ep(t){return Object.keys(t).sort().filter(e=>t[e]!==void 0).map(e=>`${e}_${e==="root"?tp(t.root):t[e]}`).toString()}function np(t){const e=ep(t);let n=cr.get(e);if(!n){const o=new Map;let i;const a=new IntersectionObserver(s=>{s.forEach(c=>{var l;const h=c.isIntersecting&&i.some(d=>c.intersectionRatio>=d);t.trackVisibility&&typeof c.isVisible>"u"&&(c.isVisible=h),(l=o.get(c.target))==null||l.forEach(d=>{d(h,c)})})},t);i=a.thresholds||(Array.isArray(t.threshold)?t.threshold:[t.threshold||0]),n={id:e,observer:a,elements:o},cr.set(e,n)}return n}function Bs(t,e,n={},o=Jm){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}=np(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(),cr.delete(i))}}function op(t){return typeof t.children!="function"}var Mv=class extends Qi{constructor(t){super(t),Un(this,"node",null),Un(this,"_unobserveCb",null),Un(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()}),Un(this,"handleChange",(e,n)=>{e&&this.props.triggerOnce&&this.unobserve(),op(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=Bs(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:h,initialInView:d,fallbackInView:u,...f}=this.props;return Ha(e||"div",{ref:this.handleNode,...f},t)}};function rp({threshold:t,delay:e,trackVisibility:n,rootMargin:o,root:i,triggerOnce:a,skip:s,initialInView:c,fallbackInView:l,onChange:h}={}){var d;const[u,f]=U(null),m=N(h),[p,g]=U({inView:!!c,entry:void 0});m.current=h,X(()=>{if(s||!u)return;let A;return A=Bs(u,(T,y)=>{g({inView:T,entry:y}),m.current&&m.current(T,y),y.isIntersecting&&a&&A&&(A(),A=void 0)},{root:i,rootMargin:o,threshold:t,trackVisibility:n,delay:e},l),()=>{A&&A()}},[Array.isArray(t)?t.toString():t,u,i,o,a,s,n,l,e]);const v=(d=p.entry)==null?void 0:d.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 Ai=48,Fo={};function zs({id:t,children:e}){const n=N(),o=!!Fo[t],[i,a]=U(!1),[s,c]=U(o||!1),{ref:l}=rp({root:null,rootMargin:`-${Ai}px 0px 0px 0px`,trackVisibility:!0,delay:1e3,onChange:h=>{h&&(a(!0),t&&(Fo[t]=!0))},triggerOnce:!0,skip:s||i});return X(()=>{if(!n.current)return;const h=n.current.getBoundingClientRect();h.bottom>Ai&&(h.top<window.innerHeight?a(!0):c(!0),t&&(Fo[t]=!0))},[]),s?e:r("div",{ref:n,class:"shazam-container no-animation",hidden:!i,children:r("div",{ref:l,class:"shazam-container-inner",children:e})})}const ip={BASE_URL:"./",DEV:!1,MODE:"production",PHANPY_CLIENT_NAME:"Phanpy",PHANPY_LINGVA_INSTANCES:"lingva.phanpy.social lingva.lunar.icu lingva.garudalinux.org translate.plausibility.cloud",PHANPY_PRIVACY_POLICY_URL:"https://github.com/cheeaun/phanpy/blob/main/PRIVACY.MD",PHANPY_TRANSLANG_INSTANCES:"translang.phanpy.social",PHANPY_WEBSITE:"https://phanpy.social",PROD:!0,SSR:!1,VITE_APP_ENV:"production"},sp=Object.entries(Cs.sl).map(([t,e])=>({code:t,name:e})),{PHANPY_TRANSLANG_INSTANCES:ki}=ip,lr=ki?ki.split(/\s+/):[],Vs=Ji({limit:1,interval:2e3}),Hs=1e3*60*60;let Bo=0;function ap(t,e,n){return qm(()=>{let i=lr[Bo];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=>{Bo=(Bo+1)%lr.length}})}const Ks=lo(ap,{maxAge:Hs}),cp=lo(Vs(Ks),{maxAge:Hs}),lp=Vs(Ym);function up({forceTranslate:t,sourceLanguage:e,onTranslate:n,text:o="",mini:i,autoDetected:a}){const{_:s}=te(),c=Ss(!0),[l,h]=U("default"),[d,u]=U(null),[f,m]=U(null),[p,g]=U(null),v=N(),E=e?dn(e):null,w=dn(c),A=N("auto");n||(n=async(...y)=>{if(Gm){const b=await lp(...y);if(b&&!b.error)return b}return i?await cp(...y):await Ks(...y)});const T=async()=>{h("loading");try{const{content:y,detectedSourceLanguage:b,provider:I,error:L,...x}=await n(o,A.current,c);if(y){if(b){const C=dn(b);g(C)}if(I==="translang"){const C=x?.pronunciation;C&&u(C)}m(y),h("default"),!i&&y.trim()!==o.trim()&&(v.current.open=!0,v.current.scrollIntoView({behavior:"smooth",block:"nearest"}))}else h("error")}catch{h("error")}};return X(()=>{t&&T()},[t]),i?f&&f.trim()!==o.trim()&&p!==w?r(zs,{children:r("div",{class:"status-translation-block-mini",children:[r(D,{icon:"translate",alt:s({id:"zVJKbG",values:{sourceLangText:E}})}),r("output",{lang:c,dir:"auto",title:d||"",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(D,{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=>{A.current=y.target.value,T()},children:sp.map(y=>{const b=dn({code:y.code,fallback:y.name}),I=dn({code:y.code,locale:y.code}),L=I&&b!==I;return r("option",{value:y.code,children:y.code==="auto"?s({id:"Bze3gr",values:{0:p??"…"}}):L?`${I} - ${b}`:b})})})," ",r("span",{children:["→ ",w]}),r(ts,{abrupt:!0,hidden:l!=="loading"})]}),l==="error"?r("p",{class:"ui-state",children:r(P,{id:"m5LihO"})}):!!f&&r(B,{children:[r("output",{class:"translated-content",lang:c,dir:"auto",children:f}),!!d&&r("output",{class:"translated-pronunciation-content",tabIndex:-1,onClick:y=>{y.target.classList.toggle("expand")},children:d})]})]})]})})}const dp=lr?.length?up:()=>null;function be(t){return new Promise((e,n)=>{t.oncomplete=t.onsuccess=()=>e(t.result),t.onabort=t.onerror=()=>n(t.error)})}function js(t,e){let n;const o=()=>{if(n)return n;const i=indexedDB.open(t);return i.onupgradeneeded=()=>i.result.createObjectStore(e),n=be(i),n.then(a=>{a.onclose=()=>n=void 0},()=>{}),n};return(i,a)=>o().then(s=>a(s.transaction(e,i).objectStore(e)))}let zo;function $e(){return zo||(zo=js("keyval-store","keyval")),zo}function hp(t,e=$e()){return e("readonly",n=>be(n.get(t)))}function fp(t,e,n=$e()){return n("readwrite",o=>(o.put(e,t),be(o.transaction)))}function mp(t,e=$e()){return e("readonly",n=>Promise.all(t.map(o=>be(n.get(o)))))}function pp(t,e=$e()){return e("readwrite",n=>(n.delete(t),be(n.transaction)))}function gp(t,e=$e()){return e("readwrite",n=>(t.forEach(o=>n.delete(o)),be(n.transaction)))}function vp(t=$e()){return t("readwrite",e=>(e.clear(),be(e.transaction)))}function _p(t,e){return t.openCursor().onsuccess=function(){this.result&&(e(this.result),this.result.continue())},be(t.transaction)}function yp(t=$e()){return t("readonly",e=>{if(e.getAllKeys)return be(e.getAllKeys());const n=[];return _p(e,o=>n.push(o.key)).then(()=>n)})}function Ci(t,e){const n=js(t,e);return{set:(o,i)=>fp(o,i,n),get:o=>hp(o,n),getMany:o=>mp(o,n),del:o=>pp(o,n),delMany:o=>gp(o,n),clear:()=>vp(n),keys:()=>yp(n)}}const Pv={drafts:Ci("drafts-db","drafts-store"),catchup:Ci("catchup-db","catchup-store")};class qt extends HTMLElement{constructor(){super(),this.isIframeLoaded=!1,this.setupDom()}static get observedAttributes(){return["videoid","playlistid","videoplay","videotitle"]}connectedCallback(){this.addEventListener("pointerover",()=>qt.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=`
<style ${n}>
:host {
--aspect-ratio: var(--lite-youtube-aspect-ratio, 16 / 9);
--aspect-ratio-short: var(--lite-youtube-aspect-ratio-short, 9 / 16);
--frame-shadow-visible: var(--lite-youtube-frame-shadow-visible, yes);
contain: content;
display: block;
position: relative;
width: 100%;
aspect-ratio: var(--aspect-ratio);
}
@media (max-width: 40em) {
:host([short]) {
aspect-ratio: var(--aspect-ratio-short);
}
}
#frame, #fallbackPlaceholder, iframe {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
}
#frame {
cursor: pointer;
}
#fallbackPlaceholder, slot[name=image]::slotted(*) {
object-fit: cover;
width: 100%;
}
@container style(--frame-shadow-visible: yes) {
#frame::before {
content: '';
display: block;
position: absolute;
top: 0;
background-image: linear-gradient(180deg, #111 -20%, transparent 90%);
height: 60px;
width: 100%;
z-index: 1;
}
}
#playButton {
width: 68px;
height: 48px;
background-color: transparent;
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 68 48"><path d="M66.52 7.74c-.78-2.93-2.49-5.41-5.42-6.19C55.79.13 34 0 34 0S12.21.13 6.9 1.55c-2.93.78-4.63 3.26-5.42 6.19C.06 13.05 0 24 0 24s.06 10.95 1.48 16.26c.78 2.93 2.49 5.41 5.42 6.19C12.21 47.87 34 48 34 48s21.79-.13 27.1-1.55c2.93-.78 4.64-3.26 5.42-6.19C67.94 34.95 68 24 68 24s-.06-10.95-1.48-16.26z" fill="red"/><path d="M45 24 27 14v20" fill="white"/></svg>');
z-index: 1;
border: 0;
border-radius: inherit;
}
#playButton:before {
content: '';
border-style: solid;
border-width: 11px 0 11px 19px;
border-color: transparent transparent transparent #fff;
}
#playButton,
#playButton:before {
position: absolute;
top: 50%;
left: 50%;
transform: translate3d(-50%, -50%, 0);
cursor: inherit;
}
/* Post-click styles */
.activated {
cursor: unset;
}
#frame.activated::before,
#frame.activated > #playButton {
display: none;
}
</style>
<div id="frame">
<picture>
<slot name="image">
<source id="webpPlaceholder" type="image/webp">
<source id="jpegPlaceholder" type="image/jpeg">
<img id="fallbackPlaceholder" referrerpolicy="origin" loading="lazy">
</slot>
</picture>
<button id="playButton" part="playButton"></button>
</div>
`,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),`
<iframe credentialless frameborder="0" title="${this.videoTitle}"
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen
src="https://www.youtube${i}.com/embed/${a}autoplay=${n}${o}&${this.params}"
></iframe>`}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&&(qt.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){qt.isPreconnected||window.liteYouTubeIsPreconnected||(qt.addPrefetch("preconnect","https://i.ytimg.com/"),qt.addPrefetch("preconnect","https://s.ytimg.com"),e.noCookie?qt.addPrefetch("preconnect","https://www.youtube-nocookie.com"):(qt.addPrefetch("preconnect","https://www.youtube.com"),qt.addPrefetch("preconnect","https://www.google.com"),qt.addPrefetch("preconnect","https://googleads.g.doubleclick.net"),qt.addPrefetch("preconnect","https://static.doubleclick.net")),qt.isPreconnected=!0,window.liteYouTubeIsPreconnected=!0)}}qt.isPreconnected=!1;customElements.define("lite-youtube",qt);const Us=new Uint8Array(128);for(let t=0;t<83;t++)Us["0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz#$%*+,-.:;=?@[]^_{|}~".charCodeAt(t)]=t;const Jn=(t,e,n)=>{let o=0;for(;e<n;)o*=83,o+=Us[t.charCodeAt(e++)];return o},Ws=Math.pow,kn=Math.PI,bp=kn*2,Zs=3294.6,qs=269.025,wp=t=>t>10.31475?Ws(t/qs+.052132,2.4):t/Zs,Vo=t=>~~(t>1227e-8?qs*Ws(t,.416666)-13.025:t*Zs+1),vn=t=>(t<0?-1:1)*t*t,Si=t=>{for(t+=kn/2;t>kn;)t-=bp;const e=1.27323954*t-.405284735*vn(t);return .225*(vn(e)-e)+e};function Dr(t){const e=Jn(t,2,6);return[e>>16,e>>8&255,e&255]}function Ep(t,e,n,o){const i=Jn(t,0,1),a=i%9+1,s=~~(i/9)+1,c=a*s;let l=0,h=0,d=0,u=0,f=0,m=0,p=0,g=0,v=0,E=0,w=0,A=0;const T=(Jn(t,1,2)+1)/13446*(o|1),y=new Float64Array(c*3),b=Dr(t);for(l=0;l<3;l++)y[l]=wp(b[l]);for(l=1;l<c;l++)A=Jn(t,4+l*2,6+l*2),y[l*3]=vn(~~(A/361)-9)*T,y[l*3+1]=vn(~~(A/19)%19-9)*T,y[l*3+2]=vn(A%19-9)*T;const I=new Float64Array(s*n),L=new Float64Array(a*e);for(h=0;h<s;h++)for(u=0;u<n;u++)I[h*n+u]=Si(kn*u*h/n);for(l=0;l<a;l++)for(d=0;d<e;d++)L[l*e+d]=Si(kn*d*l/e);const x=e*4,C=new Uint8ClampedArray(x*n);for(u=0;u<n;u++)for(d=0;d<e;d++){for(f=m=p=0,h=0;h<s;h++)for(v=I[h*n+u],l=0;l<a;l++)g=L[l*e+d]*v,E=(l+h*a)*3,f+=y[E]*g,m+=y[E+1]*g,p+=y[E+2]*g;w=4*d+u*x,C[w]=Vo(f),C[w+1]=Vo(m),C[w+2]=Vo(p),C[w+3]=255}return C}var Ho,xi;function Tp(){return xi||(xi=1,Ho=(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 d=[`${o.repeat(a?a*i:0)}${l}`,...c];return l.substring(0,2)==="</"&&(a++,s[a]=l.substring(2,l.length-1)),d},[]).join(`
`)}),Ho}var Ko,Ii;function Ap(){if(Ii)return Ko;Ii=1;const t=n=>n.trim().replace(/(^(\s|\t)+|(( |\t)+)$)/gm,"");return Ko={mergeAttributesWithElements:n=>{const o=t(n).split(`
`),i=[];let a="";for(let s=0;s<o.length;s+=1){const c=o[s];if(c.endsWith("/>")){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},Ko}var jo,Li;function kp(){if(Li)return jo;Li=1;const t=Tp(),{mergeAttributesWithElements:e}=Ap();return jo=(o,i={})=>{const a=e(o);return t(a,i)},jo}var Cp=kp();const Sp=yr(Cp);function xp({poll:t,lang:e,readOnly:n,refresh:o=()=>{},votePoll:i=()=>{}}){const{_:a}=te(),[s,c]=U("default"),{expired:l,expiresAt:h,id:d,multiple:u,options:f,ownVotes:m,voted:p,votersCount:g,votesCount:v=0,emojis:E}=t,w=!!h&&new Date(h),A=u&&g||v;let T=0;A<=1e3?T=0:A<=1e4?T=1:A<=1e5&&(T=2);const[y,b]=U(!1),I=f.every(L=>L.votesCount!==null);return r("div",{lang:e,dir:"auto",class:`poll ${n?"read-only":""} ${s==="loading"?"loading":""}`,children:[y&&I||p||l?r(B,{children:[r("div",{class:"poll-options",children:f.map((L,x)=>{const{title:C,votesCount:O}=L,M=A?O/A:0,R=M?M.toLocaleString(It.locale||void 0,{style:"percent",maximumFractionDigits:T}):"0%",S=O>0&&O===Math.max(...f.map(Z=>Z.votesCount));return r("div",{class:`poll-option poll-result ${S?"poll-option-leading":""}`,style:{"--percentage":`${M*100}%`},children:[r("div",{class:"poll-option-title",children:[r("span",{children:r(Xe,{text:C,emojis:E})}),p&&m.includes(x)&&r(B,{children:[" ",r(D,{icon:"check-circle",alt:a({id:"IeO7us"})})]})]}),r("div",{class:"poll-option-votes",title:It._({id:"+syLpm",values:{optionVotesCount:O}}),children:R})]},`${x}-${C}-${O}`)})}),!l&&!p&&r("button",{class:"poll-vote-button plain2",disabled:s==="loading",onClick:L=>{L.preventDefault(),b(!1)},children:[r(D,{icon:"arrow-left",size:"s"})," ",r(P,{id:"L96xSt"})]})]}):r("form",{onSubmit:async L=>{L.preventDefault();const x=L.target,C=new FormData(x),O=[];C.forEach((M,R)=>{R==="poll"&&O.push(M)}),O.length&&(c("loading"),await i(O),c("default"))},children:[r("div",{class:"poll-options",children:f.map((L,x)=>{const{title:C}=L;return r("div",{class:"poll-option",children:r("label",{class:"poll-label",children:[r("input",{type:u?"checkbox":"radio",name:"poll",value:x,disabled:s==="loading",readOnly:n}),r("span",{class:"poll-option-title",children:r(Xe,{text:C,emojis:E})})]})})})}),!n&&r("button",{class:"poll-vote-button",type:"submit",disabled:s==="loading",children:r(P,{id:"lQXQKs"})})]}),r("p",{class:"poll-meta",children:[!l&&!n&&r("button",{type:"button",class:"plain small",disabled:s==="loading",onClick:L=>{L.preventDefault(),c("loading"),(async()=>(await o(),c("default")))()},title:a({id:"lCF0wC"}),children:r(D,{icon:"refresh",alt:a({id:"lCF0wC"})})}),!p&&!l&&!n&&I&&r("button",{type:"button",class:"plain small",disabled:s==="loading",onClick:L=>{L.preventDefault(),b(!y)},title:a(y?{id:"L96xSt"}:{id:"zCjei3"}),children:[r(D,{icon:y?"eye-open":"eye-close",alt:a(y?{id:"L96xSt"}:{id:"zCjei3"})})," "]}),!l&&!n&&" ",r(P,{id:"k7v0Rh",values:{0:pe(v),1:pe(v),votesCount:v},components:{0:r("span",{title:v}),1:r("span",{title:v})}}),!!g&&g!==v&&r(B,{children:[" ","•"," ",r(P,{id:"jf1i1L",values:{0:pe(g),1:pe(g),votersCount:g},components:{0:r("span",{title:g}),1:r("span",{title:g})}})]})," ","•"," ",l?w?r(P,{id:"5LwCCI",components:{0:r(ge,{datetime:w})}}):a({id:"237hSL"}):w?r(P,{id:"ooHDPY",components:{0:r(ge,{datetime:w})}}):a({id:"O2tNG0"})]})]})}const Mr=ye();function Ip(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?new Date(c.expiresAt)>new Date: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 mo=kt(Ip);function Lp(t,e,n){const{filtered:o}=t;if(!o?.length||n&&t.account?.id===n)return!0;const a=mo(o,e);return a?a.action!=="hide":!0}function Rv(t,e){if(!t?.length)return[];if(!e)return t;const n=wr();return t.filter(o=>Lp(o,e,n))}function Di(t){try{return $s.toUnicode(URL.parse(t).hostname.replace(/^www\./,"").replace(/\/$/,""))}catch{return""}}const Uo=document.createElement("div");function Wo(t){return t?(Uo.innerHTML=t,Uo.querySelectorAll(".invisible").forEach(e=>{e.remove()}),Uo.innerText.length):0}const ur="speechSynthesis"in window;function Dp(t,e){if(ur)try{speechSynthesis.speaking&&speechSynthesis.cancel();const n=new SpeechSynthesisUtterance(t);e&&(n.lang=e),speechSynthesis.speak(n)}catch(n){alert(n)}}function Mp(t,e,n,o){var i=this,a=N(null),s=N(0),c=N(0),l=N(null),h=N([]),d=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,A="debounceOnServer"in n&&!!n.debounceOnServer,T=w?Math.max(+n.maxWait||0,e):null;X(function(){return m.current=!0,function(){m.current=!1}},[]);var y=ot(function(){var b=function(R){var S=h.current,Z=d.current;return h.current=d.current=null,s.current=R,c.current=c.current||R,u.current=f.current.apply(Z,S)},I=function(R,S){g&&cancelAnimationFrame(l.current),l.current=g?requestAnimationFrame(R):setTimeout(R,S)},L=function(R){if(!m.current)return!1;var S=R-a.current;return!a.current||S>=e||S<0||w&&R-s.current>=T},x=function(R){return l.current=null,E&&h.current?b(R):(h.current=d.current=null,u.current)},C=function R(){var S=Date.now();if(v&&c.current===s.current&&O(),L(S))return x(S);if(m.current){var Z=e-(S-a.current),H=w?Math.min(Z,T-(S-s.current)):Z;I(R,H)}},O=function(){o&&o({})},M=function(){if(p||A){var R=Date.now(),S=L(R);if(h.current=[].slice.call(arguments),d.current=i,a.current=R,S){if(!l.current&&m.current)return s.current=a.current,I(C,e),v?b(a.current):u.current;if(w)return I(C,e),b(a.current)}return l.current||I(C,e),u.current}};return M.cancel=function(){l.current&&(g?cancelAnimationFrame(l.current):clearTimeout(l.current)),s.current=0,h.current=a.current=d.current=l.current=null},M.isPending=function(){return!!l.current},M.flush=function(){return l.current?x(Date.now()):u.current},M},[v,w,e,T,E,g,p,A,o]);return y}function Pp(t,e,n){var o=n===void 0?{}:n,i=o.leading,a=o.trailing;return Mp(t,e,{maxWait:e,leading:i===void 0||i,trailing:a===void 0||a})}function Rp(t,e){var n=N(null),o=N(null);o.current=e;var i=N(null);X(function(){a()});var a=_t(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 X(function(){return function(){n.current&&n.current.cleanup&&(n.current.cleanup(),n.current=null)}},[]),_t(function(s){i.current=s,a()},[a])}function Mi(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 Op(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=U({width:void 0,height:void 0}),s=a[0],c=a[1],l=N(!1);X(function(){return l.current=!1,function(){l.current=!0}},[]);var h=N({width:void 0,height:void 0}),d=Rp(_t(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=Mi(m,p,"inlineSize"),v=Mi(m,p,"blockSize"),E=g?o(g):void 0,w=v?o(v):void 0;if(h.current.width!==E||h.current.height!==w){var A={width:E,height:w};h.current.width=E,h.current.height=w,n.current?n.current(A):l.current||c(A)}})}),i.current.instance.observe(u,{box:t.box}),function(){i.current&&i.current.instance.unobserve(u)}},[t.box,o]),t.ref);return ot(function(){return{ref:d,width:s.width,height:s.height}},[d,s.width,s.height])}function to({className:t="truncated"}={}){const e=N(),n=Pp(({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 Op({ref:e,box:"border-box",onResize:n}),e}const _n={public:"earth",unlisted:"group",private:"lock",direct:"message",local:"building"};var Gs="kvfysmfp",Ys="ufhsfnkm",$p=".".concat(Gs,"{overflow:hidden;touch-action:none}.").concat(Ys,"{transform-origin: 0 0}"),Np=typeof window>"u",Fp=function(){return!Np&&("ontouchstart"in window||navigator.maxTouchPoints>0)};var Bp=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 zp=Math.min,Vp=Math.max;function Pi(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]:[zp(a+o,0)-o,Vp(0,a+o)]}var Ri=function(t,e){return e?"".concat(t," ").concat(e):t},Zn=Math.abs,Hp=Math.min,Kp=Math.sqrt,Xs=typeof window>"u",jp=Xs?!1:/(Mac)/i.test(navigator.platform),He=function(t){return t==="drag"},hn=function(t){return t==="zoom"},Up=function(t){return jp&&t.ctrlKey},fn=function(t){t.stopPropagation(),t.preventDefault()},Oi=function(t,e){var n=t.x-e.x,o=t.y-e.y;return Kp(n*n+o*o)},Wp=function(t,e){var n=Oi(t[0],t[1]),o=Oi(e[0],e[1]);return o/n},Zp=function(t,e){return t>e-.01&&t<e+.01},qp=function(t){return-Math.cos(t*Math.PI)/2+.5},Gp=function(t){return{x:t.pageX,y:t.pageY}},qn=function(t){return Array.from(t).map(Gp)},$i=function(t,e){return t+e},Yp=function(t){return{x:t.map(function(e){var n=e.x;return n}).reduce($i,0)/t.length,y:t.map(function(e){var n=e.y;return n}).reduce($i,0)/t.length}},Zo=function(t,e,n){return n<t?t:n>e?e:n},Xp=function(t){return!(t.ctrlKey||t.metaKey)},Qp=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}},Jp=function(t,e){return{x:e.x-t.x,y:e.y-t.y}},tg=function(t,e){return t.x===e.x&&t.y===e.y},Le=function(){},Gn={x:0,y:0},Ni=function(t){Ka(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=$t({},Gn),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=$t({},Gn),n._startOffset=$t({},Gn),n._startTouches=null,n._updatePlaned=!1,n._wheelTimeOut=null,n._zoomFactor=1,n._initialZoomFactor=1,n._draggingPoint=$t({},Gn),n._ignoreNextClick=!1,n._containerRef=ja(),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&&(hn(n._interaction)||He(n._interaction)&&(n._startOffset.x!==n._offset.x||n._startOffset.y!==n._offset.y))&&fn(o),He(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&&fn(o),n._startOffset=$t({},n._offset),n._startTouches=qn(o.touches)):(hn(n._interaction)?n._startTouches&&n._startTouches.length===2&&o.touches.length===2&&n._handleZoom(o,Wp(n._startTouches,qn(o.touches))):He(n._interaction)&&n._handleDrag(o),n._interaction&&(fn(o),n._update())),n._firstMove=!1)}),n._handlerWheel=function(o){if(!n.props.shouldInterceptWheel(o)){fn(o);var i=o.pageX,a=o.pageY,s=o.deltaY,c=o.deltaMode,l=1;(Up(o)||c===1)&&(l=15);var h={touches:[{pageX:i,pageY:a}]},d=n._getOffsetByFirstTouch(h),u=s*l;n._stopAnimation(),n._scaleTo(n._zoomFactor-u/n.props.wheelScaleFactor,d),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 h=function(){if(c*=i,l*=i,!c&&!l)return n._stopAnimation();var d=$t({},n._offset);if(n._addOffset({x:c,y:l}),n._offset=n._sanitizeOffset(n._offset),tg(d,n._offset))return n._stopAnimation();n._update({isAnimation:!0})};this._animate(h,{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=Jp(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=Yp(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(h){o._scaleTo(s+h*(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=-Zn(i*this._getInitialZoomFactor()-n.width)/2,c=-Zn(a*this._getInitialZoomFactor()-n.height)/2;this._initialOffset={x:s,y:c}},e.prototype._resetOffset=function(){this._offset=$t({},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,h=Pi({containerDimension:o.width,childDimension:c,padding:this.props.horizontalPadding,centerContained:this.props.centerContained}),d=h[0],u=h[1],f=Pi({containerDimension:o.height,childDimension:l,padding:this.props.verticalPadding,centerContained:this.props.centerContained}),m=f[0],p=f[1];return{x:Zo(d,u,n.x),y:Zo(m,p,n.y)}},e.prototype.alignCenter=function(n){var o=this,i=$t({duration:250,animated:!0},n),a=i.x,s=i.y,c=i.scale,l=i.animated,h=i.duration,d=a*this._initialZoomFactor,u=s*this._initialZoomFactor,f=this._zoomFactor,m=$t({},this._offset),p=this._getContainerRect(),g={x:p.width/2,y:p.height/2};if(this._zoomFactor=1,this._offset={x:-(g.x-d),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=$t({},m);var w=function(A){var T=m.x+E.x*A,y=m.y+E.y*A;o._zoomFactor=f+v*A,o._offset=o._sanitizeOffset({x:T,y}),o._update()};this._animate(w,{callback:function(){return o._sanitize()},duration:h})},e.prototype.scaleTo=function(n){var o=this,i=$t({duration:250,animated:!0},n),a=i.x,s=i.y,c=i.scale,l=i.animated,h=i.duration,d=this._zoomFactor,u=$t({},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-d,m={x:this._offset.x-u.x,y:this._offset.y-u.y};this._zoomFactor=d,this._offset=$t({},u);var p=function(g){var v=u.x+m.x*g,E=u.y+m.y*g;o._zoomFactor=d+f*g,o._offset={x:v,y:E},o._update()};this._animate(p,{callback:function(){return o._sanitize()},duration:h})},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||!Zp(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?Zn(a)>Zn(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<this.props.zoomOutFactor?(this._resetInertia(),this._zoomOutAnimation()):this._isInsaneOffset()&&this._sanitizeOffsetAnimation()},e.prototype._isInsaneOffset=function(){var n=this._offset,o=this._sanitizeOffset(n);return o.x!==n.x||o.y!==n.y},e.prototype._sanitizeOffsetAnimation=function(){var n=this,o=this._sanitizeOffset(this._offset),i=$t({},this._offset),a=function(s){var c=i.x+s*(o.x-i.x),l=i.y+s*(o.y-i.y);n._offset={x:c,y:l},n._update()};this._animate(a)},e.prototype._zoomOutAnimation=function(){var n=this;if(this._zoomFactor!==1){var o=this._zoomFactor,i=1,a=this._getCurrentZoomCenter(),s=function(c){var l=o+c*(i-o);n._scaleTo(l,a)};this._animate(s)}},e.prototype._getInitialZoomFactor=function(){return this._initialZoomFactor},e.prototype._getCurrentZoomCenter=function(){var n=this._offset,o=n.x,i=n.y,a=o-this._initialOffset.x,s=i-this._initialOffset.y;return{x:-1*o-a/(1/this._zoomFactor-1),y:-1*i-s/(1/this._zoomFactor-1)}},e.prototype._getOffsetByFirstTouch=function(n){return this._getOffsetTouches(n)[0]},e.prototype._getOffsetTouches=function(n){var o=this.props._document,i=o.documentElement,a=o.body,s=this._getContainerRect(),c=s.top,l=s.left,h=i.scrollTop||a.scrollTop,d=i.scrollLeft||a.scrollLeft,u=c+h,f=l+d;return qn(n.touches).map(function(m){var p=m.x,g=m.y;return{x:p-f,y:g-u}})},e.prototype._animate=function(n,o){var i=this,a=new Date().getTime(),s=$t({timeFn:qp,callback:function(){},duration:this.props.animationDuration},o),c=s.timeFn,l=s.callback,h=s.duration,d=function(){if(i._inAnimation){var u=new Date().getTime()-a,f=u/h;u>=h?(n(1),i._stopAnimation(),l(),i._update()):(f=c(f),n(f),i._update({isAnimation:!0}),requestAnimationFrame(d))}};this._inAnimation=!0,requestAnimationFrame(d)},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 Qp(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=Hp(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;a<arguments.length;a++)i[a]=arguments[a];o.props.enabled&&n.apply(void 0,i)}},e.prototype._setInteraction=function(n,o){var i=this._interaction;i!==n&&(i&&!n&&(hn(i)?this._handleZoomEnd():He(i)&&this._handleDragEnd()),hn(n)?this._handleZoomStart():He(n)&&this._handleDragStart(o)),this._interaction=n},e.prototype._distanceBetweenNumbers=function(n,o){return n>o?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?(fn(n),this._handleDoubleTap(n),hn(this._interaction)?this._handleZoomEnd():He(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",h=c==="mousedown";h&&(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=Ua.only(o),s=i||{};return Bn.createElement(Bn.Fragment,null,Bn.createElement("style",null,$p),Bn.createElement("div",$t({},s,{ref:this._containerRef,className:Ri(Gs,s.className)}),Yi(a,{className:Ri(Ys,a.props.className)})))},e.defaultProps={animationDuration:250,draggableUnZoomed:!0,enforceBoundsDuringZoom:!1,centerContained:!1,enabled:!0,inertia:!0,inertiaFriction:.96,horizontalPadding:0,isTouch:Fp,lockDragAxis:!1,maxZoom:5,minZoom:.5,onDoubleTap:Le,onDragEnd:Le,onDragStart:Le,onDragUpdate:Le,onZoomEnd:Le,onZoomStart:Le,onZoomUpdate:Le,setOffsetsOnce:!1,shouldInterceptWheel:Xp,shouldCancelHandledTouchEndEvents:!1,tapZoomFactor:1,verticalPadding:0,wheelScaleFactor:1500,zoomOutFactor:1.3,doubleTapZoomOutOnMaxScale:!1,doubleTapToggleZoom:!1,_document:Xs?null:window.document},e}(Qi);if(0)var Ov,$v,Nv,Fv,Bv,zv,Vv;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 eg=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),ng="ALT",Go=t=>{const{_:e}=te(),{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(),W.showMediaAlt={alt:n,lang:o}},title:e({id:"5gfDMm"}),children:[ng,!!i&&r("sup",{children:i})]})},og=140,rg=280,Qs=kt(t=>t?.length?t.length>og||/[\n\r].*[\n\r]/.test(t.trim()):!1);function ig({class:t="",media:e,to:n,lang:o,showOriginal:i,autoAnimate:a,showCaption:s,allowLongerCaption:c,altIndex:l,checkAspectRatio:h=!0,onClick:d}){let{id:u,blurhash:f,description:m,meta:p,previewRemoteUrl:g,previewUrl:v,remoteUrl:E,url:w,type:A}=e;/no\-preview\./i.test(v)&&(v=null);const T=sg(u||f||w),{original:y={},small:b,focus:I}=p||{},L=i?y?.width:b?.width||y?.width,x=i?y?.height:b?.height||y?.height,C=i?w:v||w,O=i?E:g||E,M=b?.width&&b?.height,S=L&&x?L>x?"landscape":"portrait":null,Z=f?Dr(f):null,H=N();let ft;if(I){const z=(I.x+1)/2*100,Q=(1-I.y)/2*100;ft=`${z.toFixed(0)}% ${Q.toFixed(0)}%`}const G=N(),rt=_t(({x:z,y:Q,scale:F})=>{const{current:tt}=G;if(tt){const Qt=Bp({x:z,y:Q,scale:F});F===1?tt.style.removeProperty("transform"):tt.style.setProperty("transform",Qt),tt.closest(".media-zoom").style.touchAction=F<=1.01?"pan-x":""}},[]),[et,lt]=U(!1),Y={enabled:et,draggableUnZoomed:!1,inertiaFriction:.9,tapZoomFactor:2,doubleTapToggleZoom:!0,containerProps:{className:"media-zoom",style:{overflow:"visible"}},onUpdate:rt},[at,Lt]=U(!1),Rt=ot(()=>n&&!at?z=>r(qe,{to:n,...z}):"div",[n,at]),K=O?Fi(O):null,mt=A==="unknown"&&K&&/\.(mp4|m4r|m4v|mov|webm)$/i.test(K.pathname),ut=A==="unknown"&&K&&/\.(mp3|ogg|wav|m4a|m4p|m4b)$/i.test(K.pathname),Kt=A==="image"||A==="unknown"&&v&&!mt&&!ut,pt=v&&/\.(mp4|m4r|m4v|mov|webm)$/i.test(Fi(v).pathname),Ot=N(),[Tt,Ft]=U(!1);Oe(()=>{if(!Kt||!i||!Ot.current)return;const{offsetWidth:z,offsetHeight:Q}=Ot.current,F=L<z&&x<Q;F&&Ft(F)},[L,x]);const Dt=window.innerHeight*(S==="portrait"?.45:.33),Bt=S==="portrait"?0:160,q={"--average-color":Z&&`rgb(${Z.join(",")})`},J=L&&x?{"--width":`${L}px`,"--height":`${x}px`,"--aspectWidth":`${L/x*Math.max(Bt,Dt)}px`,aspectRatio:`${L} / ${x}`,...q}:{...q},Ct=Qs(m);let dt=!!s&&!i&&!!m&&!Ct;c&&!dt&&m?.length<=rg&&(dt=!0);const yt=dt?z=>{const{children:Q,...F}=z;return r("figure",{...F,children:[Q,r("figcaption",{class:"media-caption",lang:o,dir:"auto",onClick:tt=>{tt.preventDefault(),tt.stopPropagation(),W.showMediaAlt={alt:m,lang:o}},children:m})]})}:B,[zt,he]=U(void 0),ct=()=>window.matchMedia("(min-width: calc(40em + 350px))").matches?"large":"small",Vt=_t(z=>{const Q=z.target.closest(".status-deck");if(i||ct()==="large"&&Q||!document.startViewTransition){d?.(z);return}const F=z.target.closest("[data-view-transition-name]")||z.target.querySelector("[data-view-transition-name]");if(F)if(d)d(z);else if(z.preventDefault(),F.dataset.viewTransitioned){F.style.viewTransitionName=T;try{document.startViewTransition(()=>{F.style.viewTransitionName="",location.hash=`#${n}`})}catch{F.style.viewTransitionName="",location.hash=`#${n}`}}else location.hash=`#${n}`;else d?.(z)},[T,i,d]);if(Kt)return Y.containerProps.style.display="inherit",Oe(()=>{eg&&i&&(async()=>{try{await fetch(C,{mode:"no-cors"}),G.current.src=C}catch{}})()},[C]),r(yt,{children:[r(Rt,{ref:Ot,class:`media media-image ${t}`,onClick:Vt,"data-orientation":S,"data-has-alt":!dt||void 0,"data-has-natural-aspect-ratio":zt||void 0,style:i?{backgroundImage:`url(${v})`,"--bg-image":`url(${v})`,backgroundSize:Tt?`${L}px ${x}px`:void 0,...q}:J,children:i?r(Ni,{...Y,children:r("img",{ref:G,src:C,alt:m,width:L,height:x,"data-orientation":S,loading:"eager",decoding:"sync",style:{"view-transition-name":T},onLoad:z=>{const Q=z.target,F=Q.closest(".media-image");F&&(F.style.backgroundImage=`url(${Q.src})`,F.style.removeProperty("--bg-image")),Q.closest(".media-zoom").style.display="",lt(!0)},onError:z=>{const{src:Q}=z.target;Q===C&&O&&C!==O&&(z.target.src=O)}})}):r(B,{children:[r("img",{src:C,alt:dt?"":m,width:L,height:x,"data-orientation":S,loading:"lazy","data-view-transition-name":T,style:{objectPosition:ft||"center","--anim-duration":`${Math.min(Math.max(Math.max(L,x)/100,5),120)}s`},onLoad:z=>{z.target.dataset.loaded=!0;const Q=z.target.closest(".media");if(!M&&Q){const{naturalWidth:F,naturalHeight:tt}=z.target;Q.dataset.orientation=F>tt?"landscape":"portrait",Q.style.setProperty("--width",`${F}px`),Q.style.setProperty("--height",`${tt}px`),Q.style.aspectRatio=`${F}/${tt}`}if(h&&Q){const{clientWidth:F,clientHeight:tt,naturalWidth:Qt,naturalHeight:ht}=z.target;if(F&&tt&&Qt&&ht)if(Qt<88||ht<88)Q.dataset.hasSmallDimension=!0;else{const fe=ht*F/Qt;Math.abs(fe-tt)<5&&he(!0)}}},onError:z=>{const{src:Q}=z.target;Q===C&&C!==O?z.target.src=O:Lt(!0)}}),!dt&&r(Go,{alt:m,lang:o,index:l})]})}),at&&r("div",{children:r("a",{href:E,class:"button plain6 small",target:"_blank",children:[r(D,{icon:"external"})," ",r("span",{children:r(P,{id:"9npOH9"})})]})})]});if(A==="gifv"||A==="video"||mt){const z=y.duration>0,Q=y.duration<31,F=A==="gifv"&&Q,tt=y.duration<61,Qt=qo(y.duration),ht=!i&&!a&&F,jt=!i&&a&&F,fe=y.duration>5,ee=`
<video
src="${w}"
poster="${v}"
width="${L}"
height="${x}"
data-orientation="${S}"
style="view-transition-name: ${T}"
preload="auto"
autoplay
muted
playsinline
${tt?"loop":""}
ondblclick="this.paused ? this.play() : this.pause()"
${fe?"ontimeupdate=\"this.closest('.media-gif') && this.closest('.media-gif').style.setProperty('--progress', `${~~((this.currentTime / this.duration) * 100)}%`)\"":""}
></video>
`,ne=`
<video
src="${w}"
poster="${v}"
width="${L}"
height="${x}"
data-orientation="${S}"
style="view-transition-name: ${T}"
preload="auto"
autoplay
playsinline
${tt?"loop":""}
controls
></video>
`;return r(yt,{children:r(Rt,{ref:Ot,class:`media ${t} media-${F?"gif":"video"} ${jt?"media-contain":""} ${ht?"media-hover-animate":""}`,"data-orientation":S,"data-formatted-duration":i?void 0:Qt,"data-label":F&&!i&&!jt?"GIF":void 0,"data-has-alt":!dt||void 0,style:!i&&J,onClick:At=>{if(ht)try{H.current.pause()}catch{}Vt(At)},onMouseEnter:()=>{if(ht)try{H.current.play()}catch{}},onMouseLeave:()=>{if(ht)try{H.current.pause()}catch{}},onFocus:()=>{if(ht)try{H.current.play()}catch{}},onBlur:()=>{if(ht)try{H.current.pause()}catch{}},children:[i||jt?F&&i?r(Ni,{...Y,enabled:!0,children:r("div",{ref:G,dangerouslySetInnerHTML:{__html:ee}})}):F?r("div",{class:"video-container",dangerouslySetInnerHTML:{__html:ee}}):r("div",{class:"video-container",dangerouslySetInnerHTML:{__html:ne}}):F?r("video",{ref:H,src:w,poster:v,width:L,height:x,"data-orientation":S,"data-view-transition-name":T,preload:"auto",playsinline:!0,loop:!0,muted:!0,onTimeUpdate:fe?At=>{const{target:St}=At,Ut=St?.closest(".media-gif");if(Ut){const Yt=St.currentTime/St.duration*100;Ut.style.setProperty("--progress",`${Yt}%`)}}:void 0}):r(B,{children:[v&&!pt?r("img",{src:v,alt:dt?"":m,width:L,height:x,"data-orientation":S,loading:"lazy",decoding:"async","data-view-transition-name":T,onLoad:At=>{if(!M){const St=At.target.closest(".media");if(St){const{naturalHeight:Ut,naturalWidth:Yt}=At.target;St.dataset.orientation=Yt>Ut?"landscape":"portrait",St.style.setProperty("--width",`${Yt}px`),St.style.setProperty("--height",`${Ut}px`),St.style.aspectRatio=`${Yt}/${Ut}`}}}}):r("video",{src:w+"#t=0.1",width:L,height:x,"data-orientation":S,"data-view-transition-name":T,preload:"metadata",muted:!0,disablePictureInPicture:!0,onLoadedMetadata:At=>{if(!z){const{duration:St}=At.target;if(St){const Ut=qo(St),Yt=At.target.closest(".media-video");Yt&&(Yt.dataset.formattedDuration=Ut)}}}}),r("div",{class:"media-play",children:r(D,{icon:"play",size:"xl",alt:"▶"})})]}),!i&&!dt&&r(Go,{alt:m,lang:o,index:l})]})})}else if(A==="audio"||ut){const z=qo(y.duration);return r(yt,{children:r(Rt,{class:`media media-audio ${t}`,"data-formatted-duration":i?void 0:z,"data-has-alt":!dt||void 0,onClick:d,style:!i&&J,children:[i?r("audio",{src:E||w,preload:"none",controls:!0,autoPlay:!0}):v?r("img",{src:v,alt:dt?"":m,width:L,height:x,"data-orientation":S,loading:"lazy",onError:Q=>{try{Q.target?.remove?.()}catch{}}}):null,!i&&r(B,{children:[r("div",{class:"media-play",children:r(D,{icon:"play",size:"xl",alt:"▶"})}),!dt&&r(Go,{alt:m,lang:o,index:l})]})]})})}}function Fi(t){return URL.parse(t,location.origin)}function sg(t){let e=t.replace(/[^a-zA-Z0-9_-]/g,"-");return e.match(/^[0-9-]/)&&(e="vt-"+e),e}const dr=Je(ig,(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}),ag=280,cg=140,lg=Ji({limit:1,interval:1e3});function ug(t,e){return e.v1.accounts.$select(t).fetch()}const dg=lo(lg(ug)),Pe={public:{id:"7d1a0d"},local:{id:"d5zxa4"},unlisted:{id:"WDcQq9"},private:{id:"o34OrG"},direct:{id:"IV4QaU"}},hg=window.ontouchstart!==void 0&&/iPad|iPhone|iPod/.test(navigator.userAgent),fg=kt(t=>new Intl.RelativeTimeFormat(t||void 0)),Bi=80;function mg(t){return t?.options?.length?`📊:
${t.options.map(e=>`- ${e.title}${e.votesCount>=0?` (${e.votesCount})`:""}`).join(`
`)}`:""}function Yo(t,e){const{maskCustomEmojis:n,maskURLs:o}=e||{},{spoilerText:i,poll:a,emojis:s}=t;let{content:c}=t;if(n&&s?.length){const l=new RegExp(`:(${s.map(h=>h.shortcode).join("|")}):`,"g");c=c.replace(l,"⬚")}return(i?`${i}
`:"")+fo(c,{preProcess:o&&(l=>{for(const h of l.querySelectorAll("a")){const d=h.innerText.trim();/^https?:\/\//i.test(d)&&h.replaceWith("«🔗»")}})})+mg(a)}function Js(t=[],e=document){for(const n of t)try{return e.querySelectorAll(n)}catch{}return[]}function pg(t,e){if(!t)return!1;if(e?.length){const o=new RegExp(`:(${e.map(i=>i.shortcode).join("|")}):`,"g");t=t.replace(o,"")}return t=t.trim(),t?!!fo(t,{preProcess:o=>{for(const i of Js([".mention, pre, code, a:has(.invisible)",".mention, pre, code"],o))i.remove()}}):!1}function gg(t,e){if(e?.length){const n=new RegExp(`:(${e.map(o=>o.shortcode).join("|")}):`,"g");t=t.replace(n,"")}return fo(t,{preProcess:n=>{for(const o of Js([".mention, .hashtag, pre, code, a:has(.invisible)",".mention, .hashtag, pre, code"],n))o.remove();for(const o of n.querySelectorAll("a")){const i=o.innerText.trim();(i.startsWith("https://")||i.startsWith("http://"))&&o.remove()}}})}const vg=/^http/i,_g=["\\\\\\[[\\s\\S]*?\\\\\\]","\\\\\\([\\s\\S]*?\\\\\\)"],zi=new RegExp(_g.join("|"),"g");function yg(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 d=l[0]==="\\["?"\\]":"\\)",u=[s];let f=s,m=!1,p=c;if(c.includes(d))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(d)&&(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<u.length;g++)u[g].remove()}}}const bg=({content:t,contentRef:e,onRevert:n})=>{if(zi.lastIndex=0,!zi.test(t))return null;const{_:i}=te(),[a,s]=U(!1),c=_t(async l=>{if(l.preventDefault(),l.stopPropagation(),a)s(!1),n();else try{const h=window.temml||(window.temml=(await k(async()=>{const{default:m}=await import("./temml-BWesIjnj.js");return{default:m}},[],import.meta.url))?.default);yg(e.current);const d=e.current.innerHTML;h.renderMathInElement(e.current,{fences:"(",annotate:!0,throwOnError:!0,errorCallback:m=>{}});const u=e.current.querySelector("math.tml-display"),f=e.current.innerHTML!==d;u&&f?s(!0):(Et(i({id:"HBIZeo"})),s(!1),n())}catch{}},[a]);return r("div",{class:"math-block",children:[r(D,{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"})})]})},Vi=({post:t,instance:e,previewMode:n})=>{const{content:o,emojis:i,language:a,mentions:s,url:c}=t,l=N();return Oe(()=>{if(!l.current)return;const h=Ns(o,{emojis:i,returnDOM:!0});for(const d of h.querySelectorAll('a.u-url[target="_blank"]'))vg.test(d.innerText.trim())||d.removeAttribute("target");l.current.replaceChildren(h.cloneNode(!0))},[o,i?.length]),r("div",{ref:l,lang:a,dir:"auto",class:"inner-content",onClick:Rm({mentions:s,instance:e,previewMode:n,statusURL:c})})},wg={s:"small",m:"medium",l:"large"},Eg=lo(async t=>{if(t=t?.trim(),t?.length>500)return null;if(Re){const i=await Re.detect(t);console.groupCollapsed("💬 DETECTLANG BROWSER",i.slice(0,3).map(s=>s.detectedLanguage)),console.groupEnd();const a=i[0];if(a?.detectedLanguage&&a?.confidence>.5)return a.detectedLanguage}const{detectAll:e}=await k(async()=>{const{detectAll:i}=await import("./tinyld.light.node-D9KYf3Y3.js");return{detectAll:i}},[],import.meta.url),n=e(t);console.groupCollapsed("💬 DETECTLANG TINYLD",n.slice(0,3).map(i=>i.lang)),console.groupEnd();const o=n[0];return o?.lang&&o?.accuracy>.5?o.lang:null}),yn={id:"8fZueG"},hr={},Hi=(t,e=[])=>{if(!t)return!1;const n=Ss(!0),o=t!==n&&!bn([t],[n])&&!e.find(i=>t===i||bn([t],[i]));return o&&(hr[t+e]=!0),o},Pr=kt(()=>wr(),{maxAge:60*1e3});function Qe({statusID:t,status:e,instance:n,size:o="m",contentTextWeight:i,readOnly:a,enableCommentHint:s,withinContext:c,skeleton:l,enableTranslate:h,forceTranslate:d,previewMode:u,allowFilters:f,onMediaClick:m,quoted:p,onStatusLinkClick:g=()=>{},showFollowedTags:v,allowContextMenu:E,showActionsBar:w,showReplyParent:A,mediaFirst:T}){const{_:y,_:b,i18n:I}=te(),L=fg(I.locale);if(l)return r("div",{class:`status skeleton ${T?"status-media-first small":""}`,children:[!T&&r(ve,{size:"xxl"}),r("div",{class:"container",children:[r("div",{class:"meta",children:[(o==="s"||T)&&r(ve,{size:"m"})," ███ ████████"]}),r("div",{class:"content-container",children:[T&&r("div",{class:"media-first-container"}),r("div",{class:`content ${T?"media-first-content":""}`,children:r("p",{children:"████ ████████"})})]})]})]});const{masto:x,instance:C,authenticated:O}=no({instance:n}),{instance:M}=no(),R=C===M;let S=le(t||e?.id,C);const Z=Cn(W);if(e||(e=Z.statuses[S]||Z.statuses[t],S=le(e?.id,C)),!e)return null;const{account:{acct:H,avatar:ft,avatarStatic:G,id:rt,url:et,displayName:lt,username:Y,emojis:at,bot:Lt,group:Rt}={},id:K,repliesCount:mt,reblogged:ut,reblogsCount:Kt,favourited:pt,favouritesCount:Ot,bookmarked:Tt,poll:Ft,muted:Dt,sensitive:Bt,spoilerText:q,visibility:J,language:Ct,editedAt:dt,filtered:yt,card:zt,createdAt:he,inReplyToId:ct,inReplyToAccountId:Vt,content:z,mentions:Q,mediaAttachments:F=[],reblog:tt,uri:Qt,url:ht,emojis:jt,tags:fe,pinned:ee,_deleted:ne,_pinned:At,emojiReactions:St}=e,[Ut,Yt]=U(null);X(()=>{if(!z||Ct||Ut)return;let _;return _=setTimeout(async()=>{let $=await Eg(gg(z,jt));Yt($)},1e3),()=>clearTimeout(_)},[z,Ct]);const V=Ct||Ut,bt=!!F?.length;T&&bt&&(o="s");const Mt=Pr(),xt=ot(()=>Mt&&Mt===rt,[rt,Mt]),gt=Pt(Mr),Ht=!xt&&(!a&&!u||f)&&mo(yt,gt);if(Ht?.action==="hide")return null;const Se=_=>{_.shiftKey};if((f||o!=="l")&&Ht&&Ht.action!=="blur")return r(Dg,{status:e,filterInfo:Ht,instance:C,containerProps:{onMouseEnter:Se},showFollowedTags:!0,quoted:p});const Jt=new Date(he),xe=new Date(dt);let nn=Q?.find(_=>_.id===Vt);!nn&&Vt===K&&(nn={url:et,username:Y,displayName:lt});const[Ne,on]=U(nn);if(!c&&!Ne&&Vt){const _=W.accounts[Vt];_?on(_):dg(Vt,x).then($=>{on($),W.accounts[$.id]=$}).catch($=>{})}const xn=Vt===Mt||Q?.find(_=>_.id===Mt),In=Wa(),Wt=!!In["reading:expand:spoilers"],Fe=In["reading:expand:media"]?.toLowerCase()||"default",Zt=u||Wt||!!Z.spoilers[K],oe=u||Fe==="show_all"&&Ht?.action!=="blur"||!!Z.spoilersMedia[K];if(tt)return Rt?r("div",{"data-state-post-id":S,class:"status-group",onMouseEnter:Se,children:[r("div",{class:"status-pre-meta",children:[r(D,{icon:"group",size:"l",alt:b({id:"L8fEEm"})})," ",r(Te,{account:e.account,instance:C,showAvatar:!0})]}),r(Qe,{status:t?null:tt,statusID:t?tt.id:null,instance:C,size:o,contentTextWeight:i,readOnly:a,mediaFirst:T})]}):r("div",{"data-state-post-id":S,class:"status-reblog",onMouseEnter:Se,children:[r("div",{class:"status-pre-meta",children:[r(D,{icon:"rocket",size:"l"})," ",r(P,{id:"DlhB4J",components:{0:r(Te,{account:e.account,instance:C,showAvatar:!0}),1:r("span",{})}})]}),r(Qe,{status:t?null:tt,statusID:t?tt.id:null,instance:C,size:o,contentTextWeight:i,readOnly:a,enableCommentHint:!0,mediaFirst:T})]});const da=_t(({children:_})=>r("div",{"data-state-post-id":S,class:"status-followed-tags",onMouseEnter:Se,children:[r("div",{class:"status-pre-meta",children:[r(D,{icon:"hashtag",size:"l"})," ",Z.statusFollowedTags[S].slice(0,3).map($=>r(qe,{to:C?`/${C}/t/${$}`:`/t/${$}`,class:"status-followed-tag-item",children:$},$))]}),_]}),[S,C,Z.statusFollowedTags[S]]),ha=v&&Z.statusFollowedTags[S]?.length?da:B,it=o==="l",[po,fa]=U(d),{contentTranslation:go,contentTranslationAutoInline:Or}=Z.settings;go||(h=!1);const $r=ot(()=>{if(!go||!Or||a||c&&!it||u||q||Bt||Ft||zt)return!1;const _=Wo(z);return _>0&&_<=cg},[go,Or,a,c,it,u,q,Bt,Ft,zt,F,z]),[vo,Ln]=U(!1),[ma,_o]=U(!1),Nr=to(),yo=to(),pa=to(),Be=N(null),[ga,va]=br(_=>_+1,0),Dn=b({id:"7jyUKe"}),Fr=_t(()=>Math.max(Math.round(((q?.length||0)+Wo(z))/140)||1,1),[q,z]),Br=he&&Tn(Jt),zr=dt&&Tn(xe);let rn=O&&J!=="direct"&&J!=="private";J==="private"&&xt&&(rn=!0);const Mn=_=>{if(!R||!O)return alert(Dn);(_?.shiftKey||_?.syntheticEvent?.shiftKey)&&nl({replyToStatus:e})||Vn({replyToStatus:e})},_a=ot(()=>F.some(_=>!_.description?.trim?.()),[F]),Vr=ot(()=>Math.floor((new Date-Jt)/(1e3*60*60*24*30)),[Jt]),bo=async()=>{if(!R||!O)return alert(Dn),!1;try{if(W.statuses[S]={...e,reblogged:!ut,reblogsCount:Kt+(ut?-1:1)},ut){const _=await x.v1.statuses.$select(K).unreblog();we(_,C)}else{const _=await x.v1.statuses.$select(K).reblog();we(_,C)}return!0}catch{return W.statuses[S]=e,!1}},Hr=async()=>{if(!R||!O)return alert(Dn),!1;try{if(W.statuses[S]={...e,favourited:!pt,favouritesCount:Ot+(pt?-1:1)},pt){const _=await x.v1.statuses.$select(K).unfavourite();we(_,C)}else{const _=await x.v1.statuses.$select(K).favourite();we(_,C)}return!0}catch{return W.statuses[S]=e,!1}},wo=async()=>{try{const _=await Hr();!it&&_&&Et(b(pt?{id:"sZvpIt",values:{0:Y||H}}:{id:"yUngDO",values:{0:Y||H}}))}catch{}},Kr=async()=>{if(jn("@mastodon/post-bookmark")){if(!R||!O)return alert(Dn),!1;try{if(W.statuses[S]={...e,bookmarked:!Tt},Tt){const _=await x.v1.statuses.$select(K).unbookmark();we(_,C)}else{const _=await x.v1.statuses.$select(K).bookmark();we(_,C)}return!0}catch{return W.statuses[S]=e,!1}}},jr=async()=>{try{const _=await Kr();!it&&_&&Et(b(Tt?{id:"lWQguj",values:{0:Y||H}}:{id:"Fb2K8h",values:{0:Y||H}}))}catch{}},sn=Z.settings.contentTranslationHideLanguages||[],[Ie,Ur]=U(()=>hr[V+sn]||Hi(V,sn));X(()=>{if(!V||Ie)return;if(!Ie&&hr[V+sn]){Ur(!0);return}let _=setTimeout(()=>{const $=Hi(V,sn);$&&Ur($)},1);return()=>clearTimeout(_)},[V,Ie,sn]);const Wr=N(),Zr=N();async function ya(_){_&&(Wr.current=x.v1.statuses.$select(t).rebloggedBy.list({limit:Bi}).values(),Zr.current=x.v1.statuses.$select(t).favouritedBy.list({limit:Bi}).values());const[{value:$},{value:nt}]=await Promise.allSettled([Wr.current.next(),Zr.current.next()]);if($.value?.length||nt.value?.length){const st=[];return $.value?.length&&st.push(...$.value.map(re=>(re._types=["reblog"],re))),nt.value?.length&&st.push(...nt.value.map(re=>(re._types=["favourite"],re))),{value:st,done:$.done&&nt.done}}return{value:[],done:!0}}const ba=N(),qr=["public","unlisted"].includes(J),wa=["public","unlisted","private"].includes(J),Gr=_a&&!ut?r("div",{class:"footer",children:[r(D,{icon:"alert"}),r(P,{id:"MB+wJL"})]}):Vr>=3&&r("div",{class:"footer",children:[r(D,{icon:"info"}),r("span",{children:r(P,{id:"dBme/4",values:{0:L.format(-Vr,"month")},components:{0:r("strong",{})}})})]}),Yr=r(B,{children:[!it&&R&&r(B,{children:r("div",{class:"menu-control-group-horizontal status-menu",children:[r(wt,{onClick:Mn,children:[r(D,{icon:"comment"}),r("span",{children:mt>0?pe(mt):b({id:"ImOQa9"})})]}),r(So,{subMenu:!0,confirmLabel:r(B,{children:[r(D,{icon:"rocket"}),r("span",{children:b(ut?{id:"QzzGsY"}:{id:"kulphB"})})]}),className:`menu-reblog ${ut?"checked":""}`,menuExtras:r(wt,{onClick:()=>{Vn({draftStatus:{status:`
${ht}`}})},children:[r(D,{icon:"quote"}),r("span",{children:r(P,{id:"ZhhOwV"})})]}),menuFooter:Gr,disabled:!rn,onClick:async()=>{try{const _=await bo();!it&&_&&Et(b(ut?{id:"bpDheH",values:{0:Y||H}}:{id:"dbNZdP",values:{0:Y||H}}))}catch{}},children:[r(D,{icon:"rocket"}),r("span",{children:Kt>0?pe(Kt):b(ut?{id:"QzzGsY"}:{id:"PiVIlD"})})]}),r(wt,{onClick:wo,className:`menu-favourite ${pt?"checked":""}`,children:[r(D,{icon:"heart"}),r("span",{children:Ot>0?pe(Ot):b(pt?{id:"OcUmcH"}:{id:"W9FRBT"})})]}),jn("@mastodon/post-bookmark")&&r(wt,{onClick:jr,className:`menu-bookmark ${Tt?"checked":""}`,children:[r(D,{icon:"bookmark"}),r("span",{children:b(Tt?{id:"q8EQYI"}:{id:"PZlHt8"})})]})]})}),!it&&R&&(it||w)&&r(ln,{}),(it||w)&&r(B,{children:r(wt,{onClick:()=>{W.showGenericAccounts={heading:b({id:"+XOeb+"}),fetchAccounts:ya,instance:C,showReactions:!0,postID:S}},children:[r(D,{icon:"react"}),r("span",{children:r(P,{id:"+XOeb+"})})]})}),(it||!T&&(h||!V||Ie))&&r(ln,{}),!T&&(h||!V||Ie)&&r("div",{class:ur?"menu-horizontal":"",children:[h?r(wt,{disabled:po,onClick:()=>fa(!0),children:[r(D,{icon:"translate"}),r("span",{children:r(P,{id:"pi8x/S"})})]}):r(di,{to:`${C?`/${C}`:""}/s/${K}?translate=1`,children:[r(D,{icon:"translate"}),r("span",{children:r(P,{id:"pi8x/S"})})]}),ur&&r(wt,{onClick:()=>{try{const _=Yo(e);_&&Dp(_,V)}catch{}},children:[r(D,{icon:"speak"}),r("span",{children:r(P,{id:"yIBLq8"})})]})]}),it&&r(wt,{onClick:()=>{try{const _=Yo(e);navigator.clipboard.writeText(_),Et(b({id:"iSRQvy"}))}catch{Et(b({id:"N1MyiN"}))}},children:[r(D,{icon:"clipboard"}),r("span",{children:r(P,{id:"iQgJaz"})})]}),(!it&&R||h||!V||Ie)&&r(ln,{}),!it&&r(B,{children:r(di,{to:C?`/${C}/s/${K}`:`/s/${K}`,onClick:_=>{g(_,e)},children:[r(D,{icon:"arrows-right"}),r("small",{children:[r(P,{id:"8MkSAW",values:{0:Y||H},components:{0:r("span",{class:"bidi-isolate"})}}),r("br",{}),r("span",{class:"more-insignificant",children:[y(Pe[J])," • ",Br]})]})]})}),!!dt&&r(B,{children:r(wt,{onClick:()=>{Ln(K)},children:[r(D,{icon:"history"}),r("small",{children:[r(P,{id:"QL+7Jw"}),r("br",{}),r("span",{class:"more-insignificant",children:r(P,{id:"DuJJm9",values:{editedDateText:zr}})})]})]})}),r(wt,{href:ht,target:"_blank",children:[r(D,{icon:"external"}),r("small",{class:"menu-double-lines",style:{maxWidth:"16em"},children:Ig(ht)})]}),r("div",{class:"menu-horizontal",children:[r(wt,{onClick:()=>{try{navigator.clipboard.writeText(ht),Et(b({id:"edWbV6"}))}catch{Et(b({id:"W1ewR0"}))}},children:[r(D,{icon:"link"}),r("span",{children:r(P,{id:"he3ygx"})})]}),qr&&navigator?.share&&navigator?.canShare?.({url:ht})&&r(wt,{onClick:()=>{try{navigator.share({url:ht})}catch{alert(b({id:"TtG3Uh"}))}},children:[r(D,{icon:"share"}),r("span",{children:r(P,{id:"LFKLqp"})})]})]}),qr&&it&&r(wt,{onClick:()=>{_o(!0)},children:[r(D,{icon:"code"}),r("span",{children:r(P,{id:"jdVwsS"})})]}),(xt||xn)&&r(ln,{}),(xt||xn)&&r(wt,{onClick:async()=>{try{const _=await x.v1.statuses.$select(K)[Dt?"unmute":"mute"]();we(_,C),Et(b(Dt?{id:"Pm+5jw"}:{id:"ywB7JM"}))}catch{Et(b(Dt?{id:"c6jxNY"}:{id:"8SN9kN"}))}},children:Dt?r(B,{children:[r(D,{icon:"unmute"}),r("span",{children:r(P,{id:"i51zUR"})})]}):r(B,{children:[r(D,{icon:"mute"}),r("span",{children:r(P,{id:"OiUYO5"})})]})}),xt&&wa&&r(wt,{onClick:async()=>{try{const _=await x.v1.statuses.$select(K)[ee?"unpin":"pin"]();we(_,C),Et(b(ee?{id:"Yx809+"}:{id:"S6P6E+"}))}catch{Et(b(ee?{id:"A6cs15"}:{id:"vgUfWO"}))}},children:ee?r(B,{children:[r(D,{icon:"unpin"}),r("span",{children:r(P,{id:"XQMQZw"})})]}):r(B,{children:[r(D,{icon:"pin"}),r("span",{children:r(P,{id:"lfHLsx"})})]})}),xt&&r("div",{class:"menu-horizontal",children:[jn("@mastodon/post-edit")&&r(wt,{onClick:()=>{Vn({editStatus:e})},children:[r(D,{icon:"pencil"}),r("span",{children:r(P,{id:"ePK91l"})})]}),it&&r(So,{subMenu:!0,confirmLabel:r(B,{children:[r(D,{icon:"trash"}),r("span",{children:r(P,{id:"FbPNuJ"})})]}),itemProps:{className:"danger"},menuItemClassName:"danger",onClick:()=>{(async()=>{try{await x.v1.statuses.$select(K).remove();const _=es(K,C);_._deleted=!0,Et(b({id:"KiyvHV"}))}catch{Et(b({id:"Yb6p2q"}))}})()},children:[r(D,{icon:"trash"}),r("span",{children:r(P,{id:"Jb6/SB"})})]})]}),!xt&&it&&r(B,{children:[r(ln,{}),r(wt,{className:"danger",onClick:()=>{W.showReportModal={account:e.account,post:e}},children:[r(D,{icon:"flag"}),r("span",{children:r(P,{id:"7PQAMY"})})]})]})]}),Xr=N(),[Pn,an]=U(!1),[Qr,Rn]=U({}),On=E||!it&&!u&&!ne&&!p,Ea=ys(hg&&On?_=>{if(_.pointerType==="mouse")return;const{clientX:$,clientY:nt}=_.touches?.[0]||_,st=_.target.closest("a");st&&Be.current.contains(st)&&!st.getAttribute("href").startsWith("#")||(_.preventDefault(),Rn({anchorPoint:{x:$,y:nt},direction:"right"}),an(!0))}:null,{threshold:600,captureEvent:!0,detect:"touch",cancelOnMovement:2}),$n=!a&&!u&&!p,Ta=je("r, shift+r",Mn,{enabled:$n,useKey:!0,ignoreEventWhen:_=>_.metaKey||_.ctrlKey||_.altKey}),Aa=je("f, l",wo,{enabled:$n,ignoreEventWhen:_=>_.metaKey||_.ctrlKey||_.altKey||_.shiftKey,useKey:!0}),ka=je("d",jr,{enabled:$n,useKey:!0,ignoreEventWhen:_=>_.metaKey||_.ctrlKey||_.altKey||_.shiftKey}),Ca=je("shift+b",_=>{_.shiftKey&&(async()=>{try{const $=await bo();!it&&$&&Et(b(ut?{id:"bpDheH",values:{0:Y||H}}:{id:"dbNZdP",values:{0:Y||H}}))}catch{}})()},{enabled:$n&&rn,useKey:!0,ignoreEventWhen:_=>_.metaKey||_.ctrlKey||_.altKey}),Sa=je("x",_=>{const $=document.activeElement.closest(".status-link, .status-focus");if($){const nt=$.querySelector(".spoiler-button:not(.spoiling)");if(nt)_.stopPropagation(),nt.click();else{const st=$.querySelector(".spoiler-media-button:not(.spoiling)");st&&(_.stopPropagation(),st.click())}}},{useKey:!0,ignoreEventWhen:_=>_.metaKey||_.ctrlKey||_.altKey||_.shiftKey}),Nn=F.slice(0,it?void 0:4),Fn=F.length>1&&Nn.some(_=>!!_.description&&!Qs(_.description)),xa=ot(()=>{if(!Fn)return null;const _=[];return Nn.forEach(($,nt)=>{if(!$.description)return;const st=_.findIndex(re=>re.media.description===$.description);st===-1?_.push({media:$,indices:[nt]}):_[st].indices.push(nt)}),_.map(({media:$,indices:nt})=>r("div",{"data-caption-index":nt.map(st=>st+1).join(" "),onClick:st=>{st.preventDefault(),st.stopPropagation(),W.showMediaAlt={alt:$.description,lang:V}},title:$.description,children:[r("sup",{children:nt.map(st=>st+1).join(" ")})," ",$.description]},$.id))},[Fn,Nn,V]),cn=ot(()=>!!ct&&Vt===e.account?.id||!!Z.statusThreadNumber[S],[ct,Vt,e.account?.id,Z.statusThreadNumber[S]]),Ia=ot(()=>s&&!cn&&!c&&!ct&&J==="public"&&mt>0,[s,cn,c,ct,mt,J]),Jr=ot(()=>{if(zt||Ft||Bt||q||F?.length||cn||c||ct||mt<=0||!/[???︖❓❔⁇⁈⁉¿‽؟]/.test(z))return!1;const nt=Wo(z);if(nt>0&&nt<=ag)return!0},[zt,Ft,Bt,q,F,tt,cn,c,ct,mt,z]);return r(ha,{children:[A&&!!(ct&&Vt)&&r(Lg,{sKey:S}),r("article",{"data-state-post-id":S,ref:_=>{Be.current=_;const $=_?.closest?.(".timeline-item, .timeline-item-alt, .status-link, .status-focus")||_;Ta.current=$,Aa.current=$,ka.current=$,Ca.current=$,Sa.current=$},tabindex:"-1",class:`status ${!c&&ct&&Ne?"status-reply-to":""} visibility-${J} ${At?"status-pinned":""} ${wg[o]} ${ne?"status-deleted":""} ${p?"status-card":""} ${Pn?"status-menu-open":""} ${T&&bt?"status-media-first":""}`,onMouseEnter:Se,onContextMenu:_=>{if(!On||_.metaKey)return;const $=_.target.closest("a");if($&&Be.current.contains($)&&!$.getAttribute("href").startsWith("#"))return;const nt=window.getSelection?.();if(nt.toString().length>0){const{anchorNode:st}=nt;if(Be.current?.contains(st))return}_.preventDefault(),Rn({anchorPoint:{x:_.clientX,y:_.clientY},direction:"right"}),an(!0)},...On?Ea():{},children:[On&&r(ds,{ref:Xr,state:Pn?"open":void 0,...Qr,onClose:_=>{an(!1),_?.reason==="click"&&Be.current?.closest("[tabindex]")?.focus?.()},portal:{target:document.body},containerProps:{style:{zIndex:1001},onClick:()=>{Xr.current?.closeMenu?.()}},overflow:"auto",boundingBoxPadding:Es(),unmountOnClose:!0,children:Yr}),w&&o!=="l"&&!u&&!a&&!ne&&!p&&r("div",{class:`status-actions ${Pn==="actions-bar"?"open":""}`,ref:ba,children:[r(Ke,{size:"s",title:b({id:"ImOQa9"}),alt:b({id:"ImOQa9"}),class:"reply-button",icon:"comment",iconSize:"m",onClick:Mn}),r(Ke,{size:"s",checked:pt,title:[b({id:"W9FRBT"}),b({id:"OcUmcH"})],alt:[b({id:"W9FRBT"}),b({id:"8ab1sR"})],class:"favourite-button",icon:"heart",iconSize:"m",count:Ot,onClick:wo}),r("button",{type:"button",title:b({id:"2FYpfJ"}),class:"plain more-button",onClick:_=>{_.preventDefault(),_.stopPropagation(),Rn({anchorRef:{current:_.currentTarget},align:"start",direction:"left",gap:0,shift:-8}),an("actions-bar")},children:r(D,{icon:"more2",size:"m",alt:b({id:"2FYpfJ"})})})]}),o!=="l"&&r("div",{class:"status-badge",children:[ut&&r(D,{class:"reblog",icon:"rocket",size:"s",alt:b({id:"b7T5Zj"})}),pt&&r(D,{class:"favourite",icon:"heart",size:"s",alt:b({id:"8ab1sR"})}),Tt&&r(D,{class:"bookmark",icon:"bookmark",size:"s",alt:b({id:"1C/9Sa"})}),At&&r(D,{class:"pin",icon:"pin",size:"s",alt:b({id:"kNiQp6"})})]}),o!=="s"&&r("a",{href:et,tabindex:"-1",title:`@${H}`,onClick:_=>{_.preventDefault(),_.stopPropagation(),W.showAccount={account:e.account,instance:C}},children:r(ve,{url:G||ft,size:"xxl",squircle:Lt})}),r("div",{class:"container",children:[!!(e.account||he)&&r("div",{class:"meta",children:[r("span",{class:"meta-name",children:r(Te,{account:e.account,instance:C,showAvatar:o==="s",showAcct:it})})," ",o!=="l"&&(ne?r("span",{class:"status-deleted-tag",children:r(P,{id:"vGjmyl"})}):ht&&!u&&!a&&!p?r(qe,{to:C?`/${C}/s/${K}`:`/s/${K}`,onClick:_=>{_.metaKey||_.ctrlKey||_.shiftKey||_.altKey||_.which===2||(_.preventDefault(),_.stopPropagation(),g?.(_,e),Rn({anchorRef:{current:_.currentTarget},align:"end",direction:"bottom",gap:4}),an(!0))},class:`time ${Pn&&Qr?.anchorRef?"is-open":""}`,children:[Ia&&!Jr?r(D,{icon:"comment2",size:"s",alt:It._({id:"RXmXDR",values:{repliesCount:mt}})}):J!=="public"&&J!=="direct"&&r(D,{icon:_n[J],alt:y(Pe[J]),size:"s"})," ",r(ge,{datetime:Jt,format:"micro"}),!u&&!a&&r(D,{icon:"more2",class:"more",alt:b({id:"2FYpfJ"})})]}):r("span",{class:"time",children:[J!=="public"&&J!=="direct"&&r(B,{children:[r(D,{icon:_n[J],alt:y(Pe[J]),size:"s"})," "]}),r(ge,{datetime:Jt,format:"micro"})]}))]}),J==="direct"&&r(B,{children:[r("div",{class:"status-direct-badge",children:r(P,{id:"IV4QaU"})})," "]}),!c&&r(B,{children:cn?r("div",{class:"status-thread-badge",children:[r(D,{icon:"thread",size:"s"}),r(P,{id:"lQ8zCz",values:{0:Z.statusThreadNumber[S]?` ${Z.statusThreadNumber[S]}/X`:""}})]}):!!ct&&!!Ne&&(!!q||!Q.find(_=>_.id===Vt))&&r("div",{class:"status-reply-badge",children:[r(D,{icon:"reply"})," ",r(Te,{account:Ne,instance:C,short:!0})]})}),r("div",{class:`content-container ${q||Bt||Ht?.action==="blur"?"has-spoiler":""} ${Zt?"show-spoiler":""} ${oe?"show-media":""}`,"data-content-text-weight":i?Fr():null,style:(it||i)&&{"--content-text-weight":Fr()},children:T&&bt?r(B,{children:[(!!q||!!Bt)&&!Wt&&r(B,{children:[!!q&&r("span",{class:"spoiler-content media-first-spoiler-content",lang:V,dir:"auto",ref:Nr,"data-read-more":y(yn),children:[r(Xe,{text:q,emojis:jt})," "]}),r("button",{class:`light spoiler-button media-first-spoiler-button ${Zt?"spoiling":""}`,type:"button",onClick:_=>{_.preventDefault(),_.stopPropagation(),Zt?(delete W.spoilers[K],Wt||delete W.spoilersMedia[K]):(W.spoilers[K]=!0,Wt||(W.spoilersMedia[K]=!0))},children:[r(D,{icon:Zt?"eye-open":"eye-close"})," ",b(Zt?{id:"6lGV3K"}:{id:"lqBX03"})]})]}),r(Ag,{mediaAttachments:F,language:V,postID:K,instance:C}),!!z&&r("div",{class:"media-first-content content",ref:yo,children:r(Vi,{post:e,instance:C,previewMode:u})})]}):r(B,{children:[!!q&&r(B,{children:[r("div",{class:"content spoiler-content",lang:V,dir:"auto",ref:Nr,"data-read-more":y(yn),children:r("p",{children:r(Xe,{text:q,emojis:jt})})}),Wt||u?r("div",{class:"spoiler-divider",children:[r(D,{icon:"eye-open"})," ",r(P,{id:"gnKo7f"})]}):r("button",{class:`light spoiler-button ${Zt?"spoiling":""}`,type:"button",onClick:_=>{_.preventDefault(),_.stopPropagation(),Zt?(delete W.spoilers[K],Wt||delete W.spoilersMedia[K]):(W.spoilers[K]=!0,Wt||(W.spoilersMedia[K]=!0))},children:[r(D,{icon:Zt?"eye-open":"eye-close"})," ",b(Zt?{id:"6lGV3K"}:{id:"lqBX03"})]})]}),!!z&&r("div",{class:"content",ref:yo,"data-read-more":y(yn),inert:q&&!Zt?!0:void 0,children:[r(Vi,{post:e,instance:C,previewMode:u},ga),r(Rg,{id:K,instance:C,level:p})]}),!!z&&r(bg,{content:z,contentRef:yo,onRevert:va}),!!Ft&&r(xp,{lang:V,poll:Ft,readOnly:a||!R||!O,onUpdate:_=>{W.statuses[S].poll=_},refresh:()=>x.v1.polls.$select(Ft.id).fetch().then(_=>{W.statuses[S].poll=_}).catch(_=>{}),votePoll:_=>x.v1.polls.$select(Ft.id).votes.create({choices:_}).then($=>{W.statuses[S].poll=$}).catch($=>{})}),((h||$r)&&pg(z,jt)&&Ie||po)&&r(dp,{forceTranslate:po||$r,mini:!it&&!c,sourceLanguage:V,autoDetected:Ut,text:Yo(e,{maskCustomEmojis:!0,maskURLs:!0})}),!u&&(Bt||Ht?.action==="blur")&&!!F.length&&(Fe!=="show_all"||Ht?.action==="blur")&&r("button",{class:`plain spoiler-media-button ${oe?"spoiling":""}`,type:"button",hidden:!Wt&&!!q,onClick:_=>{_.preventDefault(),_.stopPropagation(),oe?delete W.spoilersMedia[K]:W.spoilersMedia[K]=!0},children:[r(D,{icon:oe?"eye-open":"eye-close"})," ",r("span",{children:[Ht?.action==="blur"&&r("small",{children:[r(P,{id:"suKjh3",values:{0:Ht?.titlesStr}}),r("br",{})]}),b(oe?{id:"6lGV3K"}:{id:"9ZCilh"})]})]}),!!F.length&&(F.length>1&&(it||c&&o==="m")?r("div",{class:"media-large-container",children:F.map((_,$)=>r("div",{class:"media-container media-eq1",children:r(dr,{media:_,autoAnimate:!0,showCaption:!0,allowLongerCaption:!z||it,lang:V,to:`/${C}/s/${K}?${c?"media":"media-only"}=${$+1}`,onClick:m?nt=>m(nt,$,_,e):void 0})},_.id))}):r(Tg,{lang:V,enabled:Fn,captionChildren:xa,children:r("div",{ref:pa,class:`media-container media-eq${F.length} ${F.length>2?"media-gt2":""} ${F.length>4?"media-gt4":""}`,children:Nn.map((_,$)=>r(dr,{media:_,autoAnimate:it,showCaption:F.length===1,allowLongerCaption:!z&&F.length===1,lang:V,altIndex:Fn&&!!_.description&&$+1,to:`/${C}/s/${K}?${c?"media":"media-only"}=${$+1}`,onClick:m?nt=>{m(nt,$,_,e)}:void 0,checkAspectRatio:F.length===1},_.id))})})),!!zt&&/^https/i.test(zt?.url)&&!Bt&&!q&&!Ft&&!F.length&&!Z.statusQuotes[S]&&r(Cg,{card:zt,selfReferential:zt?.url===e.url||zt?.url===e.uri,selfAuthor:zt?.authors?.some(_=>_.account?.url===et),instance:M})]})}),!it&&Jr&&r("div",{class:"content-comment-hint insignificant",children:[r(D,{icon:"comment2",alt:b({id:"N8UzTV"})})," ",mt]}),it&&r(B,{children:[r("div",{class:"extra-meta",children:ne?r("span",{class:"status-deleted-tag",children:r(P,{id:"vGjmyl"})}):r(B,{children:[r("span",{children:y(Pe[J])})," •"," ",r("a",{href:ht,target:"_blank",rel:"noopener",children:[new Date().getTime()-Jt.getTime()<864e5&&r(B,{children:[r(ge,{datetime:Jt,format:"micro"})," ",""," "]}),!!he&&r("time",{class:"created",datetime:Jt.toISOString(),title:Jt.toLocaleString(),children:Br})]}),dt&&r(B,{children:[" ","• ",r(D,{icon:"pencil",alt:b({id:"MRZxAn"})})," ",r("time",{tabIndex:"0",class:"edited",datetime:xe.toISOString(),onClick:()=>{Ln(K)},children:zr})]})]})}),!!St?.length&&r("div",{class:"emoji-reactions",children:St.map(_=>{const{name:$,count:nt,me:st,url:re,staticUrl:La}=_;if(re)return r("span",{class:`emoji-reaction tag ${st?"":"insignificant"}`,children:[r(sr,{alt:$,url:re,staticUrl:La})," ",nt]});if(/^:.+?:$/.test($)){const Eo=jt.find(Da=>Da.shortcode===$.replace(/^:/,"").replace(/:$/,""));if(Eo)return r("span",{class:`emoji-reaction tag ${st?"":"insignificant"}`,children:[r(sr,{alt:$,url:Eo.url,staticUrl:Eo.staticUrl})," ",nt]})}return r("span",{class:`emoji-reaction tag ${st?"":"insignificant"}`,children:[$," ",nt]})})}),r("div",{class:`actions ${ne?"disabled":""}`,children:[r("div",{class:"action has-count",children:r(Ke,{title:b({id:"ImOQa9"}),alt:b({id:"VbyRUy"}),class:"reply-button",icon:"comment",count:mt,onClick:Mn})}),r("div",{class:"action has-count",children:r(So,{disabled:!rn,onClick:bo,confirmLabel:r(B,{children:[r(D,{icon:"rocket"}),r("span",{children:b(ut?{id:"QzzGsY"}:{id:"kulphB"})})]}),menuExtras:r(wt,{onClick:()=>{Vn({draftStatus:{status:`
${ht}`}})},children:[r(D,{icon:"quote"}),r("span",{children:r(P,{id:"ZhhOwV"})})]}),menuFooter:Gr,children:r(Ke,{checked:ut,title:[b({id:"kulphB"}),b({id:"QzzGsY"})],alt:[b({id:"kulphB"}),b({id:"b7T5Zj"})],class:"reblog-button",icon:"rocket",count:Kt,disabled:!rn})})}),r("div",{class:"action has-count",children:r(Ke,{checked:pt,title:[b({id:"W9FRBT"}),b({id:"OcUmcH"})],alt:[b({id:"W9FRBT"}),b({id:"8ab1sR"})],class:"favourite-button",icon:"heart",count:Ot,onClick:Hr})}),jn("@mastodon/post-bookmark")&&r("div",{class:"action",children:r(Ke,{checked:Tt,title:[b({id:"PZlHt8"}),b({id:"q8EQYI"})],alt:[b({id:"PZlHt8"}),b({id:"1C/9Sa"})],class:"bookmark-button",icon:"bookmark",onClick:Kr})}),r(ks,{portal:{target:document.querySelector(".status-deck")||document.body},align:"end",gap:4,overflow:"auto",viewScroll:"close",menuButton:r("div",{class:"action",children:r("button",{type:"button",title:b({id:"2FYpfJ"}),class:"plain more-button",children:r(D,{icon:"more",size:"l",alt:b({id:"2FYpfJ"})})})}),children:[Yr," "]})]})]})]}),!!vo&&r(or,{onClick:_=>{_.target===_.currentTarget&&Ln(!1)},children:r(Sg,{statusID:vo,instance:C,fetchStatusHistory:()=>x.v1.statuses.$select(vo).history.list(),onClose:()=>{Ln(!1),Be.current?.focus()}})}),!!ma&&r(or,{onClick:_=>{_.target===_.currentTarget&&_o(!1)},children:r(xg,{post:e,instance:C,onClose:()=>{_o(!1)}})})]})]})}function Tg(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 Ag(t){const{mediaAttachments:e,language:n,postID:o,instance:i}=t,a=e.length>1,s=N(),[c,l]=U(0);return X(()=>{let h=()=>{const{clientWidth:d,scrollLeft:u}=s.current,f=Math.round(Math.abs(u)/d);l(f)};return s.current&&s.current.addEventListener("scroll",h,{passive:!0}),()=>{s.current&&s.current.removeEventListener("scroll",h)}},[]),r(B,{children:[r("div",{class:"media-first-container",children:[r("div",{class:"media-first-carousel",ref:s,children:e.map((h,d)=>r("div",{class:"media-first-item",children:r(dr,{media:h,lang:n,to:`/${i}/s/${o}?media=${d+1}`})},h.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:h=>{h.preventDefault(),h.stopPropagation(),s.current.focus(),s.current.scrollTo({left:s.current.clientWidth*(c-1)*(ir()?-1:1),behavior:"smooth"})},children:r(D,{icon:"arrow-left"})})}),r("label",{class:"media-carousel-button",children:r("button",{type:"button",class:"carousel-button",hidden:c===e.length-1,onClick:h=>{h.preventDefault(),h.stopPropagation(),s.current.focus(),s.current.scrollTo({left:s.current.clientWidth*(c+1)*(ir()?-1:1),behavior:"smooth"})},children:r(D,{icon:"arrow-right"})})})]})]}),a&&r("div",{class:"media-carousel-dots",style:{"--dots-count":e.length},children:e.map((h,d)=>r("span",{class:`carousel-dot ${d===c?"active":""}`},h.id))})]})}function Ki(t){return["x.com","twitter.com","threads.net","bsky.app","bsky.brid.gy","fed.brid.gy"].includes(t)}function kg({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(D,{icon:"link",size:"s"})," ",r("small",{children:r(P,{id:"4LHHK6",components:{0:r(Te,{account:o,showAvatar:!0})}})})]})]})}function Cg({card:t,selfReferential:e,selfAuthor:n,instance:o}){const i=Cn(W),{blurhash:a,title:s,description:c,html:l,providerName:h,providerUrl:d,authorName:u,authorUrl:f,width:m,height:p,image:g,imageDescription:v,url:E,type:w,embedUrl:A,language:T,publishedAt:y,authors:b}=t,I=s||h||u,x=m/p>=1.2?"large":"",[C,O]=U(null);if(X(()=>{I&&g&&!e&&Za(E)&&qa(o,E).then(H=>{if(!H)return;const{id:ft,url:G}=H;O("#"+G)})},[I,g,e]),i.unfurledLinks[E])return null;const M=/<iframe/i.test(l),R=_t(H=>{M&&(H.preventDefault(),W.showEmbedModal={html:l,url:E||A,width:m,height:p})},[M]),[S,Z]=U(null);if(I&&(g||w==="photo"&&a)){const H=Di(E),ft=g&&a?Dr(a):null;if(!g){const lt=Ep(a,44,44),Y=window.OffscreenCanvas?new OffscreenCanvas(1,1):document.createElement("canvas");Y.width=44,Y.height=44;const at=Y.getContext("2d");at.imageSmoothingEnabled=!1;const Lt=at.createImageData(44,44);Lt.data.set(lt),at.putImageData(Lt,0,0);try{window.OffscreenCanvas?Y.convertToBlob().then(Rt=>{Z(URL.createObjectURL(Rt))}):Z(Y.toDataURL())}catch{}}const G=Ki(H);return r(kg,{hidden:!!n,authors:b,children:r("a",{href:C||E,target:C?null:"_blank",rel:"nofollow noopener",class:`card link ${G?"card-post":""} ${S?"":x}`,style:{"--average-color":ft&&`rgb(${ft.join(",")})`},onClick:R,children:[r("div",{class:"card-image",children:r("img",{src:g||S,width:m,height:p,loading:"lazy",decoding:"async",fetchPriority:"low",alt:v||"",onError:rt=>{try{rt.target.style.display="none"}catch{}},style:{"--anim-duration":m&&p&&`${Math.min(Math.max(Math.max(m,p)/100,5),120)}s`}})}),r("div",{class:"meta-container",lang:T,children:[r("p",{class:"meta domain",children:[r("span",{class:"domain",children:H})," ",!!y&&r(B,{children:"· "}),!!y&&r(B,{children:r(ge,{datetime:y,format:"micro"})})]}),r("p",{class:"title",dir:"auto",title:s,children:s}),r("p",{class:"meta",dir:"auto",title:c,children:c||!!y&&r(ge,{datetime:y,format:"micro"})})]})]})})}else{if(w==="photo")return r("a",{href:E,target:"_blank",rel:"nofollow noopener",class:"card photo",onClick:R,children:r("img",{src:A,width:m,height:p,alt:s||c,loading:"lazy",style:{height:"auto",aspectRatio:`${m}/${p}`}})});if(w==="video"&&/youtube/i.test(h)){const H=E.match(/watch\?v=([^&]+)/)?.[1];if(H)return r("a",{class:"card video",onClick:R,children:r("lite-youtube",{videoid:H,nocookie:!0,autoPause:!0})})}if(I&&!g){const H=Di(E),ft=Ki(H);return r("a",{href:C||E,target:C?null:"_blank",rel:"nofollow noopener",class:`card link ${ft?"card-post":""} no-image`,lang:T,dir:"auto",onClick:R,children:r("div",{class:"meta-container",children:[r("p",{class:"meta domain",children:[r("span",{class:"domain",children:[r(D,{icon:"link",size:"s"})," ",r("span",{children:H})]})," ",!!y&&r(B,{children:"· "}),!!y&&r(B,{children:r(ge,{datetime:y,format:"micro"})})]}),r("p",{class:"title",title:s,children:s}),r("p",{class:"meta",title:c||h||u,children:c||h||u})]})})}}}function Sg({statusID:t,instance:e,fetchStatusHistory:n=()=>{},onClose:o}){const{_:i}=te(),[a,s]=U("default"),[c,l]=U([]);return X(()=>{s("loading"),(async()=>{try{const h=await n();l(h),s("default")}catch{s("error")}})()},[]),r("div",{id:"edit-history",class:"sheet",children:[!!o&&r("button",{type:"button",class:"sheet-close",onClick:o,children:r(D,{icon:"x",alt:i({id:"yz7wBu"})})}),r("header",{children:[r("h2",{children:r(P,{id:"OKiofn"})}),a==="error"&&r("p",{children:r(P,{id:"EANWES"})}),a==="loading"&&r("p",{children:[r(ts,{abrupt:!0})," ",r(P,{id:"Pwqkdw"})]})]}),r("main",{tabIndex:"-1",children:c.length>0&&r("ol",{children:c.map(h=>{const{createdAt:d}=h,u=new Date(d);return r("li",{class:"history-item",children:[r("h3",{children:r("time",{children:Tn(u,{formatOpts:{weekday:"short",second:"numeric"}})})}),r(Qe,{status:h,instance:e,size:"s",withinContext:!0,readOnly:!0,previewMode:!0})]},d)})})})]})}function ta(t,e,n=0){const{account:{url:o,displayName:i,acct:a,username:s,emojis:c,bot:l,group:h},id:d,poll:u,spoilerText:f,language:m,editedAt:p,createdAt:g,content:v,mediaAttachments:E,url:w,emojis:A}=t,T=le(d,e),b=(W.statusQuotes[T]||[]).filter((O,M,R)=>R.findIndex(S=>S.url===O.url)===M),I=b.length&&n<=2?b.map(O=>{const{id:M,instance:R}=O,S=le(M,R),Z=W.statuses[S];if(Z)return ta(Z,R,++n)}).join(""):"",L=new Date(g),x=ar(v,A)+`
`+I+`
`+(u?.options?.length?`
<p>📊:</p>
<ul>
${u.options.map(O=>`
<li>
${O.title}
${O.votesCount>=0?` (${O.votesCount})`:""}
</li>
`).join("")}
</ul>`:"")+(E.length>0?`
`+E.map(O=>{const{description:M,meta:R,previewRemoteUrl:S,previewUrl:Z,remoteUrl:H,url:ft,type:G}=O,{original:rt={},small:et}=R||{},lt=et?.width||rt?.width,Y=et?.height||rt?.height,at=H||ft,Lt=S||Z,Rt=Lt||at,K=at?URL.parse(at):null,mt=G==="unknown"&&K&&/\.(mp4|m4r|m4v|mov|webm)$/i.test(K.pathname),ut=G==="unknown"&&K&&/\.(mp3|ogg|wav|m4a|m4p|m4b)$/i.test(K.pathname),Kt=G==="image"||G==="unknown"&&Lt&&!mt&&!ut,pt=G==="gifv"||G==="video"||mt,Ot=G==="audio"||ut;let Tt="";return Kt?Tt=`<img src="${Rt}" width="${lt}" height="${Y}" alt="${M}" loading="lazy" />`:pt?Tt=`
<video src="${at}" width="${lt}" height="${Y}" controls preload="auto" poster="${Lt}" loading="lazy"></video>
${M?`<figcaption>${M}</figcaption>`:""}
`:Ot?Tt=`
<audio src="${at}" controls preload="auto"></audio>
${M?`<figcaption>${M}</figcaption>`:""}
`:Tt=`
<a href="${at}">📄 ${M||at}</a>
`,`<figure>${Tt}</figure>`}).join(`
`):""),C=`
<blockquote lang="${m}" cite="${w}" data-source="fediverse">
${f?`
<details>
<summary>${f}</summary>
${x}
</details>
`:x}
<footer>
${ar(i,c)} (@${a}) ${g?`<a href="${w}"><time datetime="${L.toISOString()}">${L.toLocaleString()}</time></a>`:""}
</footer>
</blockquote>
`;return Sp(C)}function xg({post:t,instance:e,onClose:n}){const{_:o}=te(),{account:{url:i,displayName:a,username:s,emojis:c,bot:l,group:h},id:d,poll:u,spoilerText:f,language:m,editedAt:p,createdAt:g,content:v,mediaAttachments:E,url:w,emojis:A}=t,T=ta(t,e);return r("div",{id:"embed-post",class:"sheet",children:[!!n&&r("button",{type:"button",class:"sheet-close",onClick:n,children:r(D,{icon:"x",alt:o({id:"yz7wBu"})})}),r("header",{children:r("h2",{children:r(P,{id:"jdVwsS"})})}),r("main",{tabIndex:"-1",children:[r("h3",{children:r(P,{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),Et(o({id:"bl7nrg"}))}catch{Et(o({id:"/KEBaP"}))}},children:[r(D,{icon:"clipboard"})," ",r("span",{children:r(P,{id:"he3ygx"})})]}),!!E?.length&&r("section",{children:[r("p",{children:r(P,{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(P,{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(B,{children:[" ","(",r("a",{href:y.staticUrl,target:"_blank",download:!0,children:r(P,{id:"xiropL"})}),")"]}):null]},y.shortcode))})]}),!!A?.length&&r("section",{children:[r("p",{children:r(P,{id:"jzjjJh"})}),r("ul",{children:A.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(B,{children:[" ","(",r("a",{href:y.staticUrl,target:"_blank",download:!0,children:r(P,{id:"xiropL"})}),")"]}):null]},y.shortcode))})]}),r("section",{children:r("small",{children:[r("p",{children:r(P,{id:"TnJgwX"})}),r("ul",{children:[r("li",{children:r(P,{id:"0OHPem"})}),r("li",{children:r(P,{id:"AzZ5zv"})}),r("li",{children:r(P,{id:"NU7wa/"})}),r("li",{children:r(P,{id:"R4PmPA"})})]})]})}),r("h3",{children:r(P,{id:"rdUucN"})}),r("output",{class:"embed-preview",dangerouslySetInnerHTML:{__html:T},dir:"auto"}),r("p",{children:r("small",{children:r(P,{id:"j0kZfi"})})})]})]})}const Ke=ke((t,e)=>{let{checked:n,count:o,class:i,title:a,alt:s,size:c,icon:l,iconSize:h="l",onClick:d,...u}=t;typeof a=="string"&&(a=[a,a]),typeof s=="string"&&(s=[s,s]);const[f,m]=U(a[0]||""),[p,g]=U(s[0]||"");return X(()=>{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=>{d&&(v.preventDefault(),v.stopPropagation(),d(v))},...u,children:[r(D,{icon:l,size:h,alt:p}),!!o&&r(B,{children:[" ",r("small",{title:o,children:pe(o)})]})]})});function Ig(t){if(!t)return;const e=URL.parse(t);if(!e)return;const{host:n,pathname:o}=e,i=o.replace(/\/$/,""),[a,s,c]=i.match(/\/(@[^\/]+)\/(.*)/)||[];return r(B,{children:[$s.toUnicode(n),s?r(B,{children:["/",s,r("wbr",{}),r("span",{class:"more-insignificant",children:["/",c]})]}):r("span",{class:"more-insignificant",children:i})]})}function Lg({sKey:t}){const n=Cn(W).statusReply[t];if(!n)return null;const{id:o,instance:i}=n,a=es(o,i);if(!a)return null;const{account:{id:s},sensitive:c,spoilerText:l,account:{avatar:h,avatarStatic:d,bot:u}={},visibility:f,content:m,language:p,filtered:g}=a;if(c||l||!m)return null;const v=le(o,i),E=Ts(a),w=Pr(),A=w&&w===s,T=Pt(Mr);let y=!A&&mo(g,T);if(y?.action==="blur"&&(y=null),y?.action==="hide")return null;const b=y?.titlesStr||"";return r("article",{class:`status compact-reply shazam ${f==="direct"?"visibility-direct":""}`,tabindex:"-1","data-state-post-id":v,children:[r(ve,{url:d||h,squircle:u}),r("div",{class:"content-compact",title:E,lang:p,dir:"auto",children:y?r("b",{class:"status-filtered-badge badge-meta",title:b,children:[r("span",{children:r(P,{id:"03Qqf9"})}),r("span",{children:b})]}):r("span",{children:E})})]})}function Dg({status:t,filterInfo:e,instance:n,containerProps:o={},showFollowedTags:i,quoted:a}){const{_:s,_:c}=te(),l=Cn(W),{id:h,account:{avatar:d,avatarStatic:u,bot:f,group:m},createdAt:p,visibility:g,reblog:v}=t,E=!!v,w=e?.titlesStr||"",A=new Date(p),T=Ts(t.reblog||t),[y,b]=U(!1),I=ys(()=>{b(!0)},{threshold:600,captureEvent:!0,detect:"touch",cancelOnMovement:2}),L=to(),x=le(t.id,n),C=le(t.id,n)+" "+(le(v?.id,n)||""),O=v?.id||h,M=n?`/${n}/s/${O}`:`/s/${O}`,R=i&&!!l.statusFollowedTags[x]?.length;return r("div",{class:`${a?"":E?m?"status-group":"status-reblog":R?"status-followed-tags":""} visibility-${g}`,...o,onContextMenu:S=>{S.preventDefault(),b(!0)},...I(),children:[r("article",{"data-state-post-id":C,class:`status filtered ${a?"status-card":""}`,tabindex:"-1",children:[r("b",{class:"status-filtered-badge clickable badge-meta",title:w,onClick:S=>{S.preventDefault(),b(!0)},children:[r("span",{children:r(P,{id:"03Qqf9"})}),r("span",{children:w})]})," ",r(ve,{url:u||d,squircle:f}),r("span",{class:"status-filtered-info",children:[r("span",{class:"status-filtered-info-1",children:E?r(P,{id:"zJyf/5",components:{0:r(Te,{account:t.account,instance:n}),1:r(D,{icon:_n[g],alt:s(Pe[g]),size:"s"})}}):R?r(B,{children:[r(Te,{account:t.account,instance:n})," ",r(D,{icon:_n[g],alt:s(Pe[g]),size:"s"})," ",r("span",{children:l.statusFollowedTags[x].slice(0,3).map(S=>r("span",{class:"status-followed-tag-item",children:["#",S]},S))})]}):r(B,{children:[r(Te,{account:t.account,instance:n})," ",r(D,{icon:_n[g],alt:s(Pe[g]),size:"s"})," ",r(ge,{datetime:A,format:"micro"})]})}),r("span",{class:"status-filtered-info-2",children:[E&&r(B,{children:[r(ve,{url:v.account.avatarStatic||v.account.avatar,squircle:f})," "]}),T]})]})]}),!!y&&r(or,{onClick:S=>{S.target===S.currentTarget&&b(!1)},children:r("div",{id:"filtered-status-peek",class:"sheet",children:[r("button",{type:"button",class:"sheet-close",onClick:()=>b(!1),children:r(D,{icon:"x",alt:c({id:"yz7wBu"})})}),r("header",{children:[r("b",{class:"status-filtered-badge",children:r(P,{id:"03Qqf9"})})," ",w]}),r("main",{tabIndex:"-1",children:r(qe,{ref:L,class:"status-link",to:M,onClick:()=>{b(!1)},"data-read-more":s(yn),children:r(Qe,{status:t,instance:n,size:"s",readOnly:!0})})})]})})]})}const Mg=["deleted","unauthorized","pending","rejected","revoked"],Pg={filterHidden:{id:"XC9Jpz"},deleted:{id:"3pYmlJ"},unauthorized:{id:"egEppQ"},pending:{id:"BjH06l"},rejected:{id:"hFaNP3"},revoked:{id:"hFaNP3"}},Rg=Je(({id:t,instance:e,level:n=0})=>{if(!t||!e)return;const{_:o}=te(),i=Cn(W),a=le(t,e),c=i.statusQuotes[a]?.filter((d,u,f)=>f.findIndex(m=>m.url===d.url)===u);if(!c?.length||n>2)return;const l=Pt(Mr),h=Pr();return c.map(d=>{let u;const f=i.statuses[le(d.id,d.instance)];if(f&&(!(h&&h===f.account?.id)&&mo(f.filtered,l))?.action==="hide"&&(u="filterHidden"),u||(u=Mg.find(p=>d.state===p)),u)return r("div",{class:`status-card-unfulfilled ${u==="filterHidden"?"status-card-ghost":""}`,children:[r(D,{icon:"quote"}),r("i",{children:o(Pg[u])})]});const m=d.native?B:zs;return r(m,{id:d.instance+d.id,children:r(qe,{to:`${d.instance?`/${d.instance}`:""}/s/${d.id}`,class:`status-card-link ${d.native?"quote-post-native":""}`,"data-read-more":o(yn),children:r(Qe,{statusID:d.id,instance:d.instance,size:"s",quoted:n+1,enableCommentHint:!0})},d.instance+d.id)},d.instance+d.id)})}),Hv=Je(Qe,(t,e)=>{const{status:n,...o}=t,{status:i,...a}=e;return n?.id===i?.id&&Ga(o,a)});var ji=36,ea="";for(;ji--;)ea+=ji.toString(36);function Kv(t){for(var e="",n=t||11;n--;)e+=ea[Math.random()*36|0];return e}function _e(t){return Array.isArray?Array.isArray(t):ra(t)==="[object Array]"}const Og=1/0;function $g(t){if(typeof t=="string")return t;let e=t+"";return e=="0"&&1/t==-Og?"-0":e}function Ng(t){return t==null?"":$g(t)}function ce(t){return typeof t=="string"}function na(t){return typeof t=="number"}function Fg(t){return t===!0||t===!1||Bg(t)&&ra(t)=="[object Boolean]"}function oa(t){return typeof t=="object"}function Bg(t){return oa(t)&&t!==null}function Xt(t){return t!=null}function Xo(t){return!t.trim().length}function ra(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const zg="Incorrect 'index' type",Vg=t=>`Invalid value for key ${t}`,Hg=t=>`Pattern length exceeds max of ${t}.`,Kg=t=>`Missing ${t} property in key`,jg=t=>`Property 'weight' in key '${t}' must be a positive integer`,Ui=Object.prototype.hasOwnProperty;class Ug{constructor(e){this._keys=[],this._keyMap={};let n=0;e.forEach(o=>{let i=ia(o);this._keys.push(i),this._keyMap[i.id]=i,n+=i.weight}),this._keys.forEach(o=>{o.weight/=n})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function ia(t){let e=null,n=null,o=null,i=1,a=null;if(ce(t)||_e(t))o=t,e=Wi(t),n=fr(t);else{if(!Ui.call(t,"name"))throw new Error(Kg("name"));const s=t.name;if(o=s,Ui.call(t,"weight")&&(i=t.weight,i<=0))throw new Error(jg(s));e=Wi(s),n=fr(s),a=t.getFn}return{path:e,id:n,weight:i,src:o,getFn:a}}function Wi(t){return _e(t)?t:t.split(".")}function fr(t){return _e(t)?t.join("."):t}function Wg(t,e){let n=[],o=!1;const i=(a,s,c)=>{if(Xt(a))if(!s[c])n.push(a);else{let l=s[c];const h=a[l];if(!Xt(h))return;if(c===s.length-1&&(ce(h)||na(h)||Fg(h)))n.push(Ng(h));else if(_e(h)){o=!0;for(let d=0,u=h.length;d<u;d+=1)i(h[d],s,c+1)}else s.length&&i(h,s,c+1)}};return i(t,ce(e)?e.split("."):e,0),o?n:n[0]}const Zg={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},qg={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,e)=>t.score===e.score?t.idx<e.idx?-1:1:t.score<e.score?-1:1},Gg={location:0,threshold:.6,distance:100},Yg={useExtendedSearch:!1,getFn:Wg,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var j={...qg,...Zg,...Gg,...Yg};const Xg=/[^ ]+/g;function Qg(t=1,e=3){const n=new Map,o=Math.pow(10,e);return{get(i){const a=i.match(Xg).length;if(n.has(a))return n.get(a);const s=1/Math.pow(a,.5*t),c=parseFloat(Math.round(s*o)/o);return n.set(a,c),c},clear(){n.clear()}}}class Rr{constructor({getFn:e=j.getFn,fieldNormWeight:n=j.fieldNormWeight}={}){this.norm=Qg(n,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((n,o)=>{this._keysMap[n.id]=o})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,ce(this.docs[0])?this.docs.forEach((e,n)=>{this._addString(e,n)}):this.docs.forEach((e,n)=>{this._addObject(e,n)}),this.norm.clear())}add(e){const n=this.size();ce(e)?this._addString(e,n):this._addObject(e,n)}removeAt(e){this.records.splice(e,1);for(let n=e,o=this.size();n<o;n+=1)this.records[n].i-=1}getValueForItemAtKeyId(e,n){return e[this._keysMap[n]]}size(){return this.records.length}_addString(e,n){if(!Xt(e)||Xo(e))return;let o={v:e,i:n,n:this.norm.get(e)};this.records.push(o)}_addObject(e,n){let o={i:n,$:{}};this.keys.forEach((i,a)=>{let s=i.getFn?i.getFn(e):this.getFn(e,i.path);if(Xt(s)){if(_e(s)){let c=[];const l=[{nestedArrIndex:-1,value:s}];for(;l.length;){const{nestedArrIndex:h,value:d}=l.pop();if(Xt(d))if(ce(d)&&!Xo(d)){let u={v:d,i:h,n:this.norm.get(d)};c.push(u)}else _e(d)&&d.forEach((u,f)=>{l.push({nestedArrIndex:f,value:u})})}o.$[a]=c}else if(ce(s)&&!Xo(s)){let c={v:s,n:this.norm.get(s)};o.$[a]=c}}}),this.records.push(o)}toJSON(){return{keys:this.keys,records:this.records}}}function sa(t,e,{getFn:n=j.getFn,fieldNormWeight:o=j.fieldNormWeight}={}){const i=new Rr({getFn:n,fieldNormWeight:o});return i.setKeys(t.map(ia)),i.setSources(e),i.create(),i}function Jg(t,{getFn:e=j.getFn,fieldNormWeight:n=j.fieldNormWeight}={}){const{keys:o,records:i}=t,a=new Rr({getFn:e,fieldNormWeight:n});return a.setKeys(o),a.setIndexRecords(i),a}function Yn(t,{errors:e=0,currentLocation:n=0,expectedLocation:o=0,distance:i=j.distance,ignoreLocation:a=j.ignoreLocation}={}){const s=e/t.length;if(a)return s;const c=Math.abs(o-n);return i?s+c/i:c?1:s}function tv(t=[],e=j.minMatchCharLength){let n=[],o=-1,i=-1,a=0;for(let s=t.length;a<s;a+=1){let c=t[a];c&&o===-1?o=a:!c&&o!==-1&&(i=a-1,i-o+1>=e&&n.push([o,i]),o=-1)}return t[a-1]&&a-o>=e&&n.push([o,a-1]),n}const Me=32;function ev(t,e,n,{location:o=j.location,distance:i=j.distance,threshold:a=j.threshold,findAllMatches:s=j.findAllMatches,minMatchCharLength:c=j.minMatchCharLength,includeMatches:l=j.includeMatches,ignoreLocation:h=j.ignoreLocation}={}){if(e.length>Me)throw new Error(Hg(Me));const d=e.length,u=t.length,f=Math.max(0,Math.min(o,u));let m=a,p=f;const g=c>1||l,v=g?Array(u):[];let E;for(;(E=t.indexOf(e,p))>-1;){let I=Yn(e,{currentLocation:E,expectedLocation:f,distance:i,ignoreLocation:h});if(m=Math.min(I,m),p=E+d,g){let L=0;for(;L<d;)v[E+L]=1,L+=1}}p=-1;let w=[],A=1,T=d+u;const y=1<<d-1;for(let I=0;I<d;I+=1){let L=0,x=T;for(;L<x;)Yn(e,{errors:I,currentLocation:f+x,expectedLocation:f,distance:i,ignoreLocation:h})<=m?L=x:T=x,x=Math.floor((T-L)/2+L);T=x;let C=Math.max(1,f-x+1),O=s?u:Math.min(f+x,u)+d,M=Array(O+2);M[O+1]=(1<<I)-1;for(let S=O;S>=C;S-=1){let Z=S-1,H=n[t.charAt(Z)];if(g&&(v[Z]=+!!H),M[S]=(M[S+1]<<1|1)&H,I&&(M[S]|=(w[S+1]|w[S])<<1|1|w[S+1]),M[S]&y&&(A=Yn(e,{errors:I,currentLocation:Z,expectedLocation:f,distance:i,ignoreLocation:h}),A<=m)){if(m=A,p=Z,p<=f)break;C=Math.max(1,2*f-p)}}if(Yn(e,{errors:I+1,currentLocation:f,expectedLocation:f,distance:i,ignoreLocation:h})>m)break;w=M}const b={isMatch:p>=0,score:Math.max(.001,A)};if(g){const I=tv(v,c);I.length?l&&(b.indices=I):b.isMatch=!1}return b}function nv(t){let e={};for(let n=0,o=t.length;n<o;n+=1){const i=t.charAt(n);e[i]=(e[i]||0)|1<<o-n-1}return e}const ao=String.prototype.normalize?t=>t.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,""):t=>t;class aa{constructor(e,{location:n=j.location,threshold:o=j.threshold,distance:i=j.distance,includeMatches:a=j.includeMatches,findAllMatches:s=j.findAllMatches,minMatchCharLength:c=j.minMatchCharLength,isCaseSensitive:l=j.isCaseSensitive,ignoreDiacritics:h=j.ignoreDiacritics,ignoreLocation:d=j.ignoreLocation}={}){if(this.options={location:n,threshold:o,distance:i,includeMatches:a,findAllMatches:s,minMatchCharLength:c,isCaseSensitive:l,ignoreDiacritics:h,ignoreLocation:d},e=l?e:e.toLowerCase(),e=h?ao(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const u=(m,p)=>{this.chunks.push({pattern:m,alphabet:nv(m),startIndex:p})},f=this.pattern.length;if(f>Me){let m=0;const p=f%Me,g=f-p;for(;m<g;)u(this.pattern.substr(m,Me),m),m+=Me;if(p){const v=f-Me;u(this.pattern.substr(v),v)}}else u(this.pattern,0)}searchIn(e){const{isCaseSensitive:n,ignoreDiacritics:o,includeMatches:i}=this.options;if(e=n?e:e.toLowerCase(),e=o?ao(e):e,this.pattern===e){let g={isMatch:!0,score:0};return i&&(g.indices=[[0,e.length-1]]),g}const{location:a,distance:s,threshold:c,findAllMatches:l,minMatchCharLength:h,ignoreLocation:d}=this.options;let u=[],f=0,m=!1;this.chunks.forEach(({pattern:g,alphabet:v,startIndex:E})=>{const{isMatch:w,score:A,indices:T}=ev(e,g,v,{location:a+E,distance:s,threshold:c,findAllMatches:l,minMatchCharLength:h,includeMatches:i,ignoreLocation:d});w&&(m=!0),f+=A,w&&T&&(u=[...u,...T])});let p={isMatch:m,score:m?f/this.chunks.length:1};return m&&i&&(p.indices=u),p}}class Ce{constructor(e){this.pattern=e}static isMultiMatch(e){return Zi(e,this.multiRegex)}static isSingleMatch(e){return Zi(e,this.singleRegex)}search(){}}function Zi(t,e){const n=t.match(e);return n?n[1]:null}class ov extends Ce{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const n=e===this.pattern;return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class rv extends Ce{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const o=e.indexOf(this.pattern)===-1;return{isMatch:o,score:o?0:1,indices:[0,e.length-1]}}}class iv extends Ce{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const n=e.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class sv extends Ce{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const n=!e.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}}class av extends Ce{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const n=e.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class cv extends Ce{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const n=!e.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}}class ca extends Ce{constructor(e,{location:n=j.location,threshold:o=j.threshold,distance:i=j.distance,includeMatches:a=j.includeMatches,findAllMatches:s=j.findAllMatches,minMatchCharLength:c=j.minMatchCharLength,isCaseSensitive:l=j.isCaseSensitive,ignoreDiacritics:h=j.ignoreDiacritics,ignoreLocation:d=j.ignoreLocation}={}){super(e),this._bitapSearch=new aa(e,{location:n,threshold:o,distance:i,includeMatches:a,findAllMatches:s,minMatchCharLength:c,isCaseSensitive:l,ignoreDiacritics:h,ignoreLocation:d})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class la extends Ce{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let n=0,o;const i=[],a=this.pattern.length;for(;(o=e.indexOf(this.pattern,n))>-1;)n=o+a,i.push([o,n-1]);const s=!!i.length;return{isMatch:s,score:s?0:1,indices:i}}}const mr=[ov,la,iv,sv,cv,av,rv,ca],qi=mr.length,lv=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,uv="|";function dv(t,e={}){return t.split(uv).map(n=>{let o=n.trim().split(lv).filter(a=>a&&!!a.trim()),i=[];for(let a=0,s=o.length;a<s;a+=1){const c=o[a];let l=!1,h=-1;for(;!l&&++h<qi;){const d=mr[h];let u=d.isMultiMatch(c);u&&(i.push(new d(u,e)),l=!0)}if(!l)for(h=-1;++h<qi;){const d=mr[h];let u=d.isSingleMatch(c);if(u){i.push(new d(u,e));break}}}return i})}const hv=new Set([ca.type,la.type]);class fv{constructor(e,{isCaseSensitive:n=j.isCaseSensitive,ignoreDiacritics:o=j.ignoreDiacritics,includeMatches:i=j.includeMatches,minMatchCharLength:a=j.minMatchCharLength,ignoreLocation:s=j.ignoreLocation,findAllMatches:c=j.findAllMatches,location:l=j.location,threshold:h=j.threshold,distance:d=j.distance}={}){this.query=null,this.options={isCaseSensitive:n,ignoreDiacritics:o,includeMatches:i,minMatchCharLength:a,findAllMatches:c,ignoreLocation:s,location:l,threshold:h,distance:d},e=n?e:e.toLowerCase(),e=o?ao(e):e,this.pattern=e,this.query=dv(this.pattern,this.options)}static condition(e,n){return n.useExtendedSearch}searchIn(e){const n=this.query;if(!n)return{isMatch:!1,score:1};const{includeMatches:o,isCaseSensitive:i,ignoreDiacritics:a}=this.options;e=i?e:e.toLowerCase(),e=a?ao(e):e;let s=0,c=[],l=0;for(let h=0,d=n.length;h<d;h+=1){const u=n[h];c.length=0,s=0;for(let f=0,m=u.length;f<m;f+=1){const p=u[f],{isMatch:g,indices:v,score:E}=p.search(e);if(g){if(s+=1,l+=E,o){const w=p.constructor.type;hv.has(w)?c=[...c,...v]:c.push(v)}}else{l=0,s=0,c.length=0;break}}if(s){let f={isMatch:!0,score:l/s};return o&&(f.indices=c),f}}return{isMatch:!1,score:1}}}const pr=[];function mv(...t){pr.push(...t)}function gr(t,e){for(let n=0,o=pr.length;n<o;n+=1){let i=pr[n];if(i.condition(t,e))return new i(t,e)}return new aa(t,e)}const co={AND:"$and",OR:"$or"},vr={PATH:"$path",PATTERN:"$val"},_r=t=>!!(t[co.AND]||t[co.OR]),pv=t=>!!t[vr.PATH],gv=t=>!_e(t)&&oa(t)&&!_r(t),Gi=t=>({[co.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});function ua(t,e,{auto:n=!0}={}){const o=i=>{let a=Object.keys(i);const s=pv(i);if(!s&&a.length>1&&!_r(i))return o(Gi(i));if(gv(i)){const l=s?i[vr.PATH]:a[0],h=s?i[vr.PATTERN]:i[l];if(!ce(h))throw new Error(Vg(l));const d={keyId:fr(l),pattern:h};return n&&(d.searcher=gr(h,e)),d}let c={children:[],operator:a[0]};return a.forEach(l=>{const h=i[l];_e(h)&&h.forEach(d=>{c.children.push(o(d))})}),c};return _r(t)||(t=Gi(t)),o(t)}function vv(t,{ignoreFieldNorm:e=j.ignoreFieldNorm}){t.forEach(n=>{let o=1;n.matches.forEach(({key:i,norm:a,score:s})=>{const c=i?i.weight:null;o*=Math.pow(s===0&&c?Number.EPSILON:s,(c||1)*(e?1:a))}),n.score=o})}function _v(t,e){const n=t.matches;e.matches=[],Xt(n)&&n.forEach(o=>{if(!Xt(o.indices)||!o.indices.length)return;const{indices:i,value:a}=o;let s={indices:i,value:a};o.key&&(s.key=o.key.src),o.idx>-1&&(s.refIndex=o.idx),e.matches.push(s)})}function yv(t,e){e.score=t.score}function bv(t,e,{includeMatches:n=j.includeMatches,includeScore:o=j.includeScore}={}){const i=[];return n&&i.push(_v),o&&i.push(yv),t.map(a=>{const{idx:s}=a,c={item:e[s],refIndex:s};return i.length&&i.forEach(l=>{l(a,c)}),c})}class Sn{constructor(e,n={},o){this.options={...j,...n},this.options.useExtendedSearch,this._keyStore=new Ug(this.options.keys),this.setCollection(e,o)}setCollection(e,n){if(this._docs=e,n&&!(n instanceof Rr))throw new Error(zg);this._myIndex=n||sa(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){Xt(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const n=[];for(let o=0,i=this._docs.length;o<i;o+=1){const a=this._docs[o];e(a,o)&&(this.removeAt(o),o-=1,i-=1,n.push(a))}return n}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:n=-1}={}){const{includeMatches:o,includeScore:i,shouldSort:a,sortFn:s,ignoreFieldNorm:c}=this.options;let l=ce(e)?ce(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return vv(l,{ignoreFieldNorm:c}),a&&l.sort(s),na(n)&&n>-1&&(l=l.slice(0,n)),bv(l,this._docs,{includeMatches:o,includeScore:i})}_searchStringList(e){const n=gr(e,this.options),{records:o}=this._myIndex,i=[];return o.forEach(({v:a,i:s,n:c})=>{if(!Xt(a))return;const{isMatch:l,score:h,indices:d}=n.searchIn(a);l&&i.push({item:a,idx:s,matches:[{score:h,value:a,norm:c,indices:d}]})}),i}_searchLogical(e){const n=ua(e,this.options),o=(c,l,h)=>{if(!c.children){const{keyId:u,searcher:f}=c,m=this._findMatches({key:this._keyStore.get(u),value:this._myIndex.getValueForItemAtKeyId(l,u),searcher:f});return m&&m.length?[{idx:h,item:l,matches:m}]:[]}const d=[];for(let u=0,f=c.children.length;u<f;u+=1){const m=c.children[u],p=o(m,l,h);if(p.length)d.push(...p);else if(c.operator===co.AND)return[]}return d},i=this._myIndex.records,a={},s=[];return i.forEach(({$:c,i:l})=>{if(Xt(c)){let h=o(n,c,l);h.length&&(a[l]||(a[l]={idx:l,item:c,matches:[]},s.push(a[l])),h.forEach(({matches:d})=>{a[l].matches.push(...d)}))}}),s}_searchObjectList(e){const n=gr(e,this.options),{keys:o,records:i}=this._myIndex,a=[];return i.forEach(({$:s,i:c})=>{if(!Xt(s))return;let l=[];o.forEach((h,d)=>{l.push(...this._findMatches({key:h,value:s[d],searcher:n}))}),l.length&&a.push({idx:c,item:s,matches:l})}),a}_findMatches({key:e,value:n,searcher:o}){if(!Xt(n))return[];let i=[];if(_e(n))n.forEach(({v:a,i:s,n:c})=>{if(!Xt(a))return;const{isMatch:l,score:h,indices:d}=o.searchIn(a);l&&i.push({score:h,key:e,value:a,idx:s,norm:c,indices:d})});else{const{v:a,n:s}=n,{isMatch:c,score:l,indices:h}=o.searchIn(a);c&&i.push({score:l,key:e,value:a,norm:s,indices:h})}return i}}Sn.version="7.1.0";Sn.createIndex=sa;Sn.parseIndex=Jg;Sn.config=j;Sn.parseQuery=ua;mv(fv);const wv=6*60*1e3,Ev=90*24*60*60*1e3;function jv({scheduledAt:t,setScheduledAt:e}){if(!t||!(t instanceof Date))return;const[n,o]=U(),[i,a]=U(),s=t.getTimezoneOffset();X(()=>{function l(){const u=new Date(Date.now()+wv),f=new Date(u.getTime()-s*6e4).toISOString().slice(0,16);o(f)}l();function h(){const u=new Date(Date.now()+Ev),f=new Date(u.getTime()-s*6e4).toISOString().slice(0,16);a(f)}h();const d=setInterval(()=>{l(),h()},1e3*10);return()=>clearInterval(d)},[]);const c=t?new Date(t.getTime()-t.getTimezoneOffset()*6e4).toISOString().slice(0,16):null;return r("input",{type:"datetime-local",name:"scheduledAt",defaultValue:c,min:n,max:i,required:!0,onChange:l=>{e(new Date(l.target.value))}})}function Uv(){const t=new Date;return new Intl.DateTimeFormat(void 0,{timeZoneName:"long"}).formatToParts(t).find(i=>i.type==="timeZoneName")?.value}export{Kv as $,ve as A,Lv as B,ds as C,Pv as D,Xe as E,Hv as F,Mv as G,ur as H,D as I,Dp as J,ir as K,qe as L,di as M,Te as N,Dr as O,dr as P,sr as Q,ge as R,ml as S,dp as T,mo as U,ys as V,to as W,Pp as X,Mr as Y,Mp as Z,Rv as _,nl as a,Di as a0,Wo as a1,ar as a2,Cv as a3,Uc as a4,Sv as a5,Sn as a6,Uv as a7,jv as a8,sg as a9,qm as aa,fc as ab,As as ac,gl as ad,Op as ae,wv as af,_n as ag,Re as ah,Vn as b,Es as c,ln as d,wt as e,Ts as f,or as g,ks as h,So as i,Cs as j,Ss as k,dn as l,jn as m,Tn as n,rl as o,xv as p,Iv as q,$s as r,Et as s,Dv as t,kv as u,Ns as v,je as w,Rm as x,pe as y,fo as z};
//# sourceMappingURL=ScheduledAtField-DOwsX15z.js.map