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