190 lines
196 KiB
JavaScript
190 lines
196 KiB
JavaScript
import{ad as le,Q as Ot,d as o,h as H,q as At,A as O,_ as Ie,y as tt,B as bo,ae as Da,j as it,N as _e,f as Ji,af as La,ag as ir,ah as Ra,ai as ts,P as es,k as $,M as Ge,V as Rt,x as wn,r as kt,s as V,aj as S,ak as Ma,o as Pa,e as Qr,al as Oa,u as ne,a as sr,z as $a,am as Fa,an as Na,T as P,ao as ns,ap as Ba,aq as rs,p as hr,v as os,g as Eo,ar as za,as as Mt,at as Va,au as Ha,av as Un,I as ie,c as xn,b as he,W as is,aw as Ua,ax as ja,ay as Ka}from"./useTitle-BPGj25NY.js";function Jr(){return Jr=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Jr.apply(null,arguments)}var ss=["shift","alt","meta","mod","ctrl"],Wa={esc:"escape",return:"enter",".":"period",",":"comma","-":"slash"," ":"space","`":"backquote","#":"backslash","+":"bracketright",ShiftLeft:"shift",ShiftRight:"shift",AltLeft:"alt",AltRight:"alt",MetaLeft:"meta",MetaRight:"meta",OSLeft:"meta",OSRight:"meta",ControlLeft:"ctrl",ControlRight:"ctrl"};function pe(t){return(t&&Wa[t]||t||"").trim().toLowerCase().replace(/key|digit|numpad|arrow/,"")}function Za(t){return ss.includes(t)}function Ar(t,e){return e===void 0&&(e=","),t.split(e)}function Cr(t,e,n){e===void 0&&(e="+");var r=t.toLocaleLowerCase().split(e).map(function(s){return pe(s)}),i={alt:r.includes("alt"),ctrl:r.includes("ctrl")||r.includes("control"),shift:r.includes("shift"),meta:r.includes("meta"),mod:r.includes("mod")},a=r.filter(function(s){return!ss.includes(s)});return Jr({},i,{keys:a,description:n,hotkey:t})}(function(){typeof document<"u"&&(document.addEventListener("keydown",function(t){t.key!==void 0&&as([pe(t.key),pe(t.code)])}),document.addEventListener("keyup",function(t){t.key!==void 0&&cs([pe(t.key),pe(t.code)])})),typeof window<"u"&&window.addEventListener("blur",function(){ge.clear()})})();var ge=new Set;function wo(t){return Array.isArray(t)}function qa(t,e){e===void 0&&(e=",");var n=wo(t)?t:t.split(e);return n.every(function(r){return ge.has(r.trim().toLowerCase())})}function as(t){var e=Array.isArray(t)?t:[t];ge.has("meta")&&ge.forEach(function(n){return!Za(n)&&ge.delete(n.toLowerCase())}),e.forEach(function(n){return ge.add(n.toLowerCase())})}function cs(t){var e=Array.isArray(t)?t:[t];t==="meta"?ge.clear():e.forEach(function(n){return ge.delete(n.toLowerCase())})}function Ga(t,e,n){(typeof n=="function"&&n(t,e)||n===!0)&&t.preventDefault()}function Ya(t,e,n){return typeof n=="function"?n(t,e):n===!0||n===void 0}function Xa(t){return ls(t,["input","textarea","select"])}function ls(t,e){e===void 0&&(e=!1);var n=t.target,r=t.composed,i=null;return Qa(n)&&r?i=t.composedPath()[0]&&t.composedPath()[0].tagName:i=n&&n.tagName,wo(e)?!!(i&&e&&e.some(function(a){var s;return a.toLowerCase()===((s=i)==null?void 0:s.toLowerCase())})):!!(i&&e&&e)}function Qa(t){return!!t.tagName&&!t.tagName.startsWith("-")&&t.tagName.includes("-")}function Ja(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(function(n){return e.includes(n)})||t.includes("*"):!0}var tc=function(e,n,r){r===void 0&&(r=!1);var i=n.alt,a=n.meta,s=n.mod,c=n.shift,l=n.ctrl,u=n.keys,f=e.key,h=e.code,m=e.ctrlKey,d=e.metaKey,p=e.shiftKey,v=e.altKey,y=pe(h),E=f.toLowerCase();if(!(u!=null&&u.includes(y))&&!(u!=null&&u.includes(E))&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(y))return!1;if(!r){if(i===!v&&E!=="alt"||c===!p&&E!=="shift")return!1;if(s){if(!d&&!m)return!1}else if(a===!d&&E!=="meta"&&E!=="os"||l===!m&&E!=="ctrl"&&E!=="control")return!1}return u&&u.length===1&&(u.includes(E)||u.includes(y))?!0:u?qa(u):!u},ec=le(void 0),nc=function(){return Ot(ec)};function us(t,e){return t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(t).length===Object.keys(e).length&&Object.keys(t).reduce(function(n,r){return n&&us(t[r],e[r])},!0):t===e}var rc=le({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),oc=function(){return Ot(rc)};function ic(t){var e=O(void 0);return us(e.current,t)||(e.current=t),e.current}var ri=function(e){e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()},sc=typeof window<"u"?Ie:tt;function Be(t,e,n,r){var i=H(null),a=i[0],s=i[1],c=O(!1),l=n instanceof Array?r instanceof Array?void 0:r:n,u=wo(t)?t.join(l==null?void 0:l.splitKey):t,f=n instanceof Array?n:r instanceof Array?r:void 0,h=At(e,f??[]),m=O(h);f?m.current=h:m.current=e;var d=ic(l),p=oc(),v=p.enabledScopes,y=nc();return sc(function(){if(!((d==null?void 0:d.enabled)===!1||!Ja(v,d==null?void 0:d.scopes))){var E=function(A,T){var D;if(T===void 0&&(T=!1),!(Xa(A)&&!ls(A,d==null?void 0:d.enableOnFormTags))){if(a!==null){var M=a.getRootNode();if((M instanceof Document||M instanceof ShadowRoot)&&M.activeElement!==a&&!a.contains(M.activeElement)){ri(A);return}}(D=A.target)!=null&&D.isContentEditable&&!(d!=null&&d.enableOnContentEditable)||Ar(u,d==null?void 0:d.splitKey).forEach(function(L){var C,x=Cr(L,d==null?void 0:d.combinationKey);if(tc(A,x,d==null?void 0:d.ignoreModifiers)||(C=x.keys)!=null&&C.includes("*")){if(d!=null&&d.ignoreEventWhen!=null&&d.ignoreEventWhen(A)||T&&c.current)return;if(Ga(A,x,d==null?void 0:d.preventDefault),!Ya(A,x,d==null?void 0:d.enabled)){ri(A);return}m.current(A,x),T||(c.current=!0)}})}},b=function(A){A.key!==void 0&&(as(pe(A.code)),((d==null?void 0:d.keydown)===void 0&&(d==null?void 0:d.keyup)!==!0||d!=null&&d.keydown)&&E(A))},w=function(A){A.key!==void 0&&(cs(pe(A.code)),c.current=!1,d!=null&&d.keyup&&E(A,!0))},k=a||(l==null?void 0:l.document)||document;return k.addEventListener("keyup",w),k.addEventListener("keydown",b),y&&Ar(u,d==null?void 0:d.splitKey).forEach(function(g){return y.addHotkey(Cr(g,d==null?void 0:d.combinationKey,d==null?void 0:d.description))}),function(){k.removeEventListener("keyup",w),k.removeEventListener("keydown",b),y&&Ar(u,d==null?void 0:d.splitKey).forEach(function(g){return y.removeHotkey(Cr(g,d==null?void 0:d.combinationKey,d==null?void 0:d.description))})}}},[a,u,d,v]),s}var er={exports:{}};/*!
|
||
* Toastify js 1.12.0
|
||
* https://github.com/apvarun/toastify-js
|
||
* @license MIT licensed
|
||
*
|
||
* Copyright (C) 2018 Varun A P
|
||
*/var ac=er.exports,oi;function cc(){return oi||(oi=1,function(t){(function(e,n){t.exports?t.exports=n():e.Toastify=n()})(ac,function(e){var n=function(s){return new n.lib.init(s)},r="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:r,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(y){y.stopPropagation(),this.removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)}).bind(this));var f=window.innerWidth>0?window.innerWidth:screen.width;(this.options.position=="left"||this.options.positionLeft===!0)&&f>360?s.insertAdjacentElement("afterbegin",u):s.appendChild(u)}if(this.options.stopOnFocus&&this.options.duration>0){var h=this;s.addEventListener("mouseover",function(y){window.clearTimeout(s.timeOutValue)}),s.addEventListener("mouseleave",function(){s.timeOutValue=window.setTimeout(function(){h.removeElement(s)},h.options.duration)})}if(typeof this.options.destination<"u"&&s.addEventListener("click",(function(y){y.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(y){y.stopPropagation(),this.options.onClick()}).bind(this)),typeof this.options.offset=="object"){var m=i("x",this.options),d=i("y",this.options),p=this.options.position=="left"?m:"-"+m,v=this.options.gravity=="toastify-top"?d:"-"+d;s.style.transform="translate("+p+","+v+")"}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"),f,h=0;h<u.length;h++){a(u[h],"toastify-top")===!0?f="toastify-top":f="toastify-bottom";var m=u[h].offsetHeight;f=f.substr(9,f.length-1);var d=15,p=window.innerWidth>0?window.innerWidth:screen.width;p<=360?(u[h].style[f]=l[f]+"px",l[f]+=m+d):a(u[h],"toastify-left")===!0?(u[h].style[f]=s[f]+"px",s[f]+=m+d):(u[h].style[f]=c[f]+"px",c[f]+=m+d)}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})}(er)),er.exports}var lc=cc();const uc=bo(lc);window._showToast=Lt;function Lt(t){typeof t=="string"&&(t={text:t});const{onClick:e,delay:n,...r}=t,i=uc({className:`${e||t.destination?"shiny-pill":""}`,gravity:"bottom",position:"center",...r,onClick:()=>{e==null||e(i)}});return n?setTimeout(()=>{i.showToast()},n):i.showToast(),i}function Vf(t,e,n,r){const i=O(t);tt(()=>{i.current=t},[t,n]),tt(()=>{!r||e===null||e===!1||i.current()},[r]),tt(()=>{if(e===null||e===!1)return;const s=setInterval(()=>i.current(),e);return()=>clearInterval(s)},[e])}const To=t=>!!t&&t[0]==="o",to=Da,Tn=(t,e)=>t===!0||!!(t&&t[e]),Ht=(t,e)=>typeof t=="function"?t(e):t,dc="_szhsinMenu",fc=t=>t[dc];const Ye=(t,e)=>(e&&Object.keys(e).forEach(n=>{const r=t[n],i=e[n];typeof i=="function"&&r?t[n]=(...a)=>{i(...a),r(...a)}:t[n]=i}),t),hc=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],r=isNaN(e[1])?n:e[1];return{top:n,right:r,bottom:isNaN(e[2])?n:e[2],left:isNaN(e[3])?r:e[3]}},Sr=t=>{for(;t;){if(t=t.parentNode,!t||t===document.body||!t.parentNode)return;const{overflow:e,overflowX:n,overflowY:r}=getComputedStyle(t);if(/auto|scroll|overlay|hidden/.test(e+r+n))return t}};function mr(t,e){return{"aria-disabled":t||void 0,tabIndex:e?0:-1}}function ii(t,e){for(let n=0;n<t.length;n++)if(t[n]===e)return n;return-1}const ee=({block:t,element:e,modifiers:n,className:r})=>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 r=="function"?r(n):r;return typeof s=="string"&&(s=s.trim(),s&&(a+=` ${s}`)),a},[t,e,n,r]),mc="szh-menu-container",te="szh-menu";const pc="arrow",Ao="item",gc="divider",vc="header",_c="group",yc="submenu";const ds=le(),Co=le({}),ar=le({}),So=le({}),bc=le({}),pr=le({}),Pt=Object.freeze({ENTER:"Enter",ESC:"Escape",SPACE:" ",HOME:"Home",END:"End",LEFT:"ArrowLeft",RIGHT:"ArrowRight",UP:"ArrowUp",DOWN:"ArrowDown"}),_t=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"}),ze=Object.freeze({FIRST:"first",LAST:"last"}),Ec=Object.freeze({entering:"opening",entered:"open",exiting:"closing",exited:"closed"}),si="absolute",ko="none",xo="menuitem",eo={preventScroll:!0};const wc=({className:t,containerRef:e,containerProps:n,children:r,isOpen:i,theming:a,transition:s,onClose:c})=>{const l=Tn(s,"item");return o("div",{...Ye({onKeyDown:({key:h})=>{switch(h){case Pt.ESC:Ht(c,{key:h,reason:An.CANCEL});break}},onBlur:h=>{i&&!h.currentTarget.contains(h.relatedTarget)&&Ht(c,{reason:An.BLUR})}},n),className:ee({block:mc,modifiers:it(()=>({theme:a,itemTransition:l}),[a,l]),className:t}),style:{position:"absolute",...n==null?void 0:n.style},ref:e,children:r})},Tc=()=>{let t,e=0;return{toggle:n=>{n?e++:e--,e=Math.max(e,0)},on:(n,r,i)=>{e?t||(t=setTimeout(()=>{t=0,r()},n)):i==null||i()},off:()=>{t&&(clearTimeout(t),t=0)}}},Ac=t=>{const[e,n]=H(),i=O({items:[],hoverIndex:-1,sorted:!1}).current,a=At((c,l)=>{const{items:u}=i;if(!c)i.items=[];else if(l)u.push(c);else{const f=u.indexOf(c);f>-1&&(u.splice(f,1),c.contains(document.activeElement)&&(t.current.focus(eo),n()))}i.hoverIndex=-1,i.sorted=!1},[i,t]),s=At((c,l,u)=>{const{items:f,hoverIndex:h}=i,m=()=>{if(i.sorted)return;const v=t.current.querySelectorAll(".szh-menu__item");f.sort((y,E)=>ii(v,y)-ii(v,E)),i.sorted=!0};let d=-1,p;switch(c){case _t.RESET:break;case _t.SET:p=l;break;case _t.UNSET:p=v=>v===l?void 0:v;break;case _t.FIRST:m(),d=0,p=f[d];break;case _t.LAST:m(),d=f.length-1,p=f[d];break;case _t.SET_INDEX:m(),d=u,p=f[d];break;case _t.INCREASE:m(),d=h,d<0&&(d=f.indexOf(l)),d++,d>=f.length&&(d=0),p=f[d];break;case _t.DECREASE:m(),d=h,d<0&&(d=f.indexOf(l)),d--,d<0&&(d=f.length-1),p=f[d];break;default:}p||(d=-1),n(p),i.hoverIndex=d},[t,i]);return{hoverItem:e,dispatch:s,updateItems:a}},ai=(t,e)=>Math.round(t)===e?t:e,fs=t=>{const e=t.getBoundingClientRect();return e.width=ai(e.width,t.offsetWidth),e.height=ai(e.height,t.offsetHeight),e},Cc=(t,e,n,r)=>{const i=fs(e.current),a=t.current.getBoundingClientRect(),s=n===window?{left:0,top:0,right:document.documentElement.clientWidth,bottom:window.innerHeight}:n.getBoundingClientRect(),c=hc(r),l=p=>p+a.left-s.left-c.left,u=p=>p+a.left+i.width-s.right+c.right,f=p=>p+a.top-s.top-c.top,h=p=>p+a.top+i.height-s.bottom+c.bottom;return{menuRect:i,containerRect:a,getLeftOverflow:l,getRightOverflow:u,getTopOverflow:f,getBottomOverflow:h,confineHorizontally:p=>{let v=l(p);if(v<0)p-=v;else{const y=u(p);y>0&&(p-=y,v=l(p),v<0&&(p-=v))}return p},confineVertically:p=>{let v=f(p);if(v<0)p-=v;else{const y=h(p);y>0&&(p-=y,v=f(p),v<0&&(p-=v))}return p}}},Sc=({arrowRef:t,menuY:e,anchorRect:n,containerRect:r,menuRect:i})=>{let a=n.top-r.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},kc=({anchorRect:t,containerRect:e,menuRect:n,placeLeftorRightY:r,placeLeftX:i,placeRightX:a,getLeftOverflow:s,getRightOverflow:c,confineHorizontally:l,confineVertically:u,arrowRef:f,arrow:h,direction:m,position:d})=>{let p=m,v=r;d!=="initial"&&(v=u(v),d==="anchor"&&(v=Math.min(v,t.bottom-e.top),v=Math.max(v,t.top-e.top-n.height)));let y,E,b;return p==="left"?(y=i,d!=="initial"&&(E=s(y),E<0&&(b=c(a),(b<=0||-E>b)&&(y=a,p="right")))):(y=a,d!=="initial"&&(b=c(y),b>0&&(E=s(i),(E>=0||-E<b)&&(y=i,p="left")))),d==="auto"&&(y=l(y)),{arrowY:h?Sc({menuY:v,arrowRef:f,anchorRect:t,containerRect:e,menuRect:n}):void 0,x:y,y:v,computedDirection:p}},xc=({arrowRef:t,menuX:e,anchorRect:n,containerRect:r,menuRect:i})=>{let a=n.left-r.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:r,placeTopY:i,placeBottomY:a,getTopOverflow:s,getBottomOverflow:c,confineHorizontally:l,confineVertically:u,arrowRef:f,arrow:h,direction:m,position:d})=>{let p=m==="top"?"top":"bottom",v=r;d!=="initial"&&(v=l(v),d==="anchor"&&(v=Math.min(v,t.right-e.left),v=Math.max(v,t.left-e.left-n.width)));let y,E,b;return p==="top"?(y=i,d!=="initial"&&(E=s(y),E<0&&(b=c(a),(b<=0||-E>b)&&(y=a,p="bottom")))):(y=a,d!=="initial"&&(b=c(y),b>0&&(E=s(i),(E>=0||-E<b)&&(y=i,p="top")))),d==="auto"&&(y=u(y)),{arrowX:h?xc({menuX:v,arrowRef:f,anchorRect:t,containerRect:e,menuRect:n}):void 0,x:v,y,computedDirection:p}},Dc=({arrow:t,align:e,direction:n,gap:r,shift:i,position:a,anchorRect:s,arrowRef:c,positionHelpers:l})=>{const{menuRect:u,containerRect:f}=l,h=n==="left"||n==="right";let m=h?r:i,d=h?i:r;if(t){const g=c.current;h?m+=g.offsetWidth:d+=g.offsetHeight}const p=s.left-f.left-u.width-m,v=s.right-f.left+m,y=s.top-f.top-u.height-d,E=s.bottom-f.top+d;let b,w;e==="end"?(b=s.right-f.left-u.width,w=s.bottom-f.top-u.height):e==="center"?(b=s.left-f.left-(u.width-s.width)/2,w=s.top-f.top-(u.height-s.height)/2):(b=s.left-f.left,w=s.top-f.top),b+=m,w+=d;const k={...l,anchorRect:s,placeLeftX:p,placeRightX:v,placeLeftorRightY:w,placeTopY:y,placeBottomY:E,placeToporBottomX:b,arrowRef:c,arrow:t,direction:n,position:a};switch(n){case"left":case"right":return kc(k);case"top":case"bottom":default:return Ic(k)}},Ve=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?Ie:tt;function ci(t,e){typeof t=="function"?t(e):t.current=e}const Xe=(t,e)=>it(()=>t?e?n=>{ci(t,n),ci(e,n)}:t:e,[t,e]),li=-9999,hs=({ariaLabel:t,menuClassName:e,menuStyle:n,arrow:r,arrowProps:i={},anchorPoint:a,anchorRef:s,containerRef:c,containerProps:l,externalRef:u,parentScrollingRef:f,align:h="start",direction:m="bottom",position:d="auto",overflow:p="visible",setDownOverflow:v,repositionFlag:y,captureFocus:E=!0,state:b,endTransition:w,isDisabled:k,menuItemFocus:g,gap:A=0,shift:T=0,children:D,onClose:M,focusProps:L,...C})=>{const[x,F]=H({x:li,y:li}),[W,j]=H({}),[et,st]=H(),[ot,nt]=H(m),[J]=H(Tc),[vt,ht]=Ji(Z=>Z+1,1),{transition:N,boundingBoxRef:at,boundingBoxPadding:dt,rootMenuRef:xt,rootAnchorRef:mt,scrollNodesRef:zt,reposition:It,viewScroll:Et,submenuCloseDelay:Wt}=Ot(pr),{submenuCtx:yt,reposSubmenu:U=y}=Ot(ar),Q=O(),wt=O(),qt=O(!1),{hoverItem:be,dispatch:rt,updateItems:X}=Ac(Q),B=To(b),K=Tn(N,"open"),Y=Tn(N,"close"),ut=zt.current,G=Z=>{switch(Z.key){case Pt.HOME:rt(_t.FIRST);break;case Pt.END:rt(_t.LAST);break;case Pt.UP:rt(_t.DECREASE,be);break;case Pt.DOWN:rt(_t.INCREASE,be);break;case Pt.SPACE:Z.target&&Z.target.className.indexOf(te)!==-1&&Z.preventDefault();return;default:return}Z.preventDefault(),Z.stopPropagation()},Ut=()=>{b==="closing"&&st(),Ht(w)},Ee=Z=>{Z.stopPropagation(),J.on(Wt,()=>{rt(_t.RESET),Q.current.focus(eo)})},$t=Z=>{Z.target===Z.currentTarget&&J.off()},Ft=At(Z=>{var Gt;const Ct=s?(Gt=s.current)==null?void 0:Gt.getBoundingClientRect():a?{left:a.x,right:a.x,top:a.y,bottom:a.y,width:0,height:0}:null;if(!Ct)return;ut.menu||(ut.menu=(at?at.current:Sr(xt.current))||window);const St=Cc(c,Q,ut.menu,dt);let{arrowX:Bt,arrowY:ft,x:we,y:fe,computedDirection:Re}=Dc({arrow:r,align:h,direction:m,gap:A,shift:T,position:d,anchorRect:Ct,arrowRef:wt,positionHelpers:St});const{menuRect:Ln}=St,tn=Ln.height;if(!Z&&p!=="visible"){const{getTopOverflow:Rn,getBottomOverflow:Zt}=St;let Yt,en;const nn=Zt(fe);if(nn>0)Yt=tn-nn,en=nn;else{const ct=Rn(fe);ct<0&&(Yt=tn+ct,en=0-ct,Yt>=0&&(fe-=ct))}Yt>=0&&st({height:Yt,overflowAmt:en})}r&&j({x:Bt,y:ft}),F({x:we,y:fe}),nt(Re)},[r,h,dt,m,A,T,d,p,a,s,c,at,xt,ut]);Ve(()=>{B&&(Ft(),qt.current&&ht()),qt.current=B},[B,Ft,U]),Ve(()=>{et&&!v&&(Q.current.scrollTop=0)},[et,v]),Ve(()=>X,[X]),tt(()=>{let{menu:Z}=ut;if(!B||!Z)return;if(Z=Z.addEventListener?Z:window,!ut.anchors){ut.anchors=[];let ft=Sr(mt&&mt.current);for(;ft&&ft!==Z;)ut.anchors.push(ft),ft=Sr(ft)}let Ct=Et;if(ut.anchors.length&&Ct==="initial"&&(Ct="auto"),Ct==="initial")return;const St=()=>{Ct==="auto"?to(()=>Ft(!0)):Ht(M,{reason:An.SCROLL})},Bt=ut.anchors.concat(Et!=="initial"?Z:[]);return Bt.forEach(ft=>ft.addEventListener("scroll",St)),()=>Bt.forEach(ft=>ft.removeEventListener("scroll",St))},[mt,ut,B,M,Et,Ft]);const Dt=!!et&&et.overflowAmt>0;tt(()=>{if(Dt||!B||!f)return;const Z=()=>to(Ft),Ct=f.current;return Ct.addEventListener("scroll",Z),()=>Ct.removeEventListener("scroll",Z)},[B,Dt,f,Ft]),tt(()=>{if(!B||typeof ResizeObserver!="function"||It==="initial")return;const Z=[],Ct=new ResizeObserver(ft=>ft.forEach(({target:we})=>{Z.indexOf(we)<0?Z.push(we):La(()=>{Ft(),ht()})})),St={box:"border-box"};Ct.observe(Q.current,St);const Bt=s==null?void 0:s.current;return Bt&&Ct.observe(Bt,St),()=>Ct.disconnect()},[B,It,s,Ft]),tt(()=>{if(!B){rt(_t.RESET),Y||st();return}const{position:Z,alwaysUpdate:Ct}=g||{},St=()=>{Z===ze.FIRST?rt(_t.FIRST):Z===ze.LAST?rt(_t.LAST):Z>=-1&&rt(_t.SET_INDEX,void 0,Z)};if(Ct)St();else if(E){const Bt=setTimeout(()=>{const ft=Q.current;ft&&!ft.contains(document.activeElement)&&(ft.focus(eo),St())},K?170:100);return()=>clearTimeout(Bt)}},[B,K,Y,E,g,rt]);const gt=it(()=>({isParentOpen:B,submenuCtx:J,dispatch:rt,updateItems:X}),[B,J,rt,X]);let Tt,Nt;et&&(v?Nt=et.overflowAmt:Tt=et.height);const Le=it(()=>({reposSubmenu:vt,submenuCtx:J,overflow:p,overflowAmt:Nt,parentMenuRef:Q,parentDir:ot}),[vt,J,p,Nt,ot]),Qe=Tt>=0?{maxHeight:Tt,overflow:p}:void 0,Dn=it(()=>({state:b,align:h,dir:ot}),[b,h,ot]),pt=it(()=>({dir:ot}),[ot]),Je=ee({block:te,element:pc,modifiers:pt,className:i.className}),de=o("ul",{role:"menu","aria-label":t,...mr(k),...Ye({onPointerEnter:yt==null?void 0:yt.off,onPointerMove:Ee,onPointerLeave:$t,onKeyDown:G,onAnimationEnd:Ut},C),ref:Xe(u,Q),className:ee({block:te,modifiers:Dn,className:e}),style:{...n,...Qe,margin:0,display:b==="closed"?"none":void 0,position:si,left:x.x,top:x.y},children:[r&&o("li",{"aria-hidden":!0,...i,className:Je,style:{display:"block",position:si,left:W.x,top:W.y,...i.style},ref:wt}),o(ar.Provider,{value:Le,children:o(Co.Provider,{value:gt,children:o(ds.Provider,{value:be,children:Ht(D,Dn)})})})]});return l?o(wc,{...l,isOpen:B,children:de}):de},ms=_e(function({"aria-label":e,className:n,containerProps:r,initialMounted:i,unmountOnClose:a,transition:s,transitionTimeout:c,boundingBoxRef:l,boundingBoxPadding:u,reposition:f="auto",submenuOpenDelay:h=300,submenuCloseDelay:m=150,viewScroll:d="initial",portal:p,theming:v,onItemClick:y,...E},b){const w=O(null),k=O({}),{anchorRef:g,state:A,onClose:T}=E,D=it(()=>({initialMounted:i,unmountOnClose:a,transition:s,transitionTimeout:c,boundingBoxRef:l,boundingBoxPadding:u,rootMenuRef:w,rootAnchorRef:g,scrollNodesRef:k,reposition:f,viewScroll:d,submenuOpenDelay:h,submenuCloseDelay:m}),[i,a,s,c,g,l,u,f,d,h,m]),M=it(()=>({handleClick(C,x){C.stopPropagation||Ht(y,C);let F=C.keepOpen;F===void 0&&(F=x&&C.key===Pt.SPACE),F||Ht(T,{value:C.value,key:C.key,reason:An.CLICK})},handleClose(C){Ht(T,{key:C,reason:An.CLICK})}}),[y,T]);if(!A)return null;const L=o(pr.Provider,{value:D,children:o(So.Provider,{value:M,children:o(hs,{...E,ariaLabel:e||"Menu",externalRef:b,containerRef:w,containerProps:{className:n,containerRef:w,containerProps:r,theming:v,transition:s,onClose:T}})})});return p===!0&&typeof document<"u"?ir(L,document.body):p?p.target?ir(L,p.target):p.stablePosition?null:L:L}),no=0,ro=1,cr=2,lr=3,ur=4,Lc=5,ps=6,Rc=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],gs=t=>({_s:t,status:Rc[t],isEnter:t<lr,isMounted:t!==ps,isResolved:t===cr||t>ur}),oo=t=>t?ps:Lc,Mc=(t,e)=>{switch(t){case ro:case no:return cr;case ur:case lr:return oo(e)}},Pc=t=>typeof t=="object"?[t.enter,t.exit]:[t,t],Oc=(t,e)=>setTimeout(()=>{isNaN(document.body.offsetTop)||t(e+1)},0),ui=(t,e,n,r,i)=>{clearTimeout(r.current);const a=gs(t);e(a),n.current=a,i&&i({current:a})},$c=({enter:t=!0,exit:e=!0,preEnter:n,preExit:r,timeout:i,initialEntered:a,mountOnEnter:s,unmountOnExit:c,onStateChange:l}={})=>{const[u,f]=H(()=>gs(a?cr:oo(s))),h=O(u),m=O(),[d,p]=Pc(i),v=At(()=>{const E=Mc(h.current._s,c);E&&ui(E,f,h,m,l)},[l,c]),y=At(E=>{const b=k=>{switch(ui(k,f,h,m,l),k){case ro:d>=0&&(m.current=setTimeout(v,d));break;case ur:p>=0&&(m.current=setTimeout(v,p));break;case no:case lr:m.current=Oc(b,k);break}},w=h.current.isEnter;typeof E!="boolean"&&(E=!w),E?!w&&b(t?n?no:ro:cr):w&&b(e?r?lr:ur:oo(c))},[v,l,t,e,n,r,d,p,c]);return tt(()=>()=>clearTimeout(m.current),[]),[u,y,v]};const Fc=({initialOpen:t,initialMounted:e,unmountOnClose:n,transition:r,transitionTimeout:i=500,onMenuChange:a}={})=>{const s=Tn(r,"open"),c=Tn(r,"close"),[{status:l},u,f]=$c({initialEntered:t,mountOnEnter:!e,unmountOnExit:n,timeout:i,enter:s,exit:c,onStateChange:At(({current:{isEnter:h,isResolved:m}})=>{!a||h&&s&&m||!h&&c&&m||a({open:h})},[a,s,c])});return[{state:Ec[l],endTransition:f},u]},vs=t=>{const[e,n]=Fc(t),[r,i]=H(),a=(s,c)=>{i({position:s,alwaysUpdate:c}),n(!0)};return[{menuItemFocus:r,...e},n,a]},Nc=(t,e)=>{const[n]=H({});return{onMouseDown:()=>{n.v=t&&t!=="closed"},onClick:r=>n.v?n.v=!1:e(!0,r)}},Bc=parseInt(Ra)<19,zc=_e(function({"aria-label":e,captureFocus:n,initialOpen:r,menuButton:i,instanceRef:a,onMenuChange:s,...c},l){const[u,f,h]=vs({...c,onMenuChange:s}),{state:m}=u,d=To(m),p=O(null),v=Nc(m,(g,A)=>h(A.detail?void 0:ze.FIRST)),y=At(g=>{f(!1),g.key&&p.current.focus()},[f]),E=g=>{switch(g.key){case Pt.UP:h(ze.LAST);break;case Pt.DOWN:h(ze.FIRST);break;default:return}g.preventDefault()},b=Ht(i,{open:d});if(!b||!b.type)throw new Error("Menu requires a menuButton prop.");const w={...Ye({onKeyDown:E,...v},b.props),ref:Xe(Bc?b.ref:b.props.ref,p)};fc(b.type)==="MenuButton"&&(w.isOpen=d);const k=ts(b,w);return es(a,()=>({openMenu:h,closeMenu:()=>f(!1)})),o($,{children:[k,o(ms,{...c,...u,"aria-label":e||(typeof b.props.children=="string"?b.props.children:"Menu"),anchorRef:p,ref:l,onClose:y})]})}),Io=(t,e)=>{const n=Ge(e),r=_e((i,a)=>{const s=O(null);return o(n,{...i,itemRef:s,externalRef:a,isHovering:Ot(ds)===s.current})});return r.displayName=`WithHovering(${t})`,r},_s=(t,e,n)=>{Ve(()=>{if(t)return;const r=e.current;return n(r,!0),()=>{n(r)}},[t,e,n])},Vc=Io("SubMenu",function({"aria-label":e,className:n,disabled:r,direction:i,label:a,openTrigger:s,onMenuChange:c,isHovering:l,instanceRef:u,itemRef:f,captureFocus:h,repositionFlag:m,itemProps:d={},...p}){const v=Ot(pr),{rootMenuRef:y,submenuOpenDelay:E,submenuCloseDelay:b}=v,{parentMenuRef:w,parentDir:k,overflow:g}=Ot(ar),{isParentOpen:A,submenuCtx:T,dispatch:D,updateItems:M}=Ot(Co),L=g!=="visible",[C,x,F]=vs({...v,onMenuChange:c}),{state:W}=C,j=!!r,et=To(W),st=O(null),[ot]=H({v:0}),nt=()=>{T.off(),ot.v&&(clearTimeout(ot.v),ot.v=0)},J=(...U)=>{nt(),vt(),!j&&F(...U)},vt=()=>!l&&!j&&D(_t.SET,f.current),ht=U=>{vt(),s||(ot.v=setTimeout(()=>to(J),Math.max(U,0)))},N=U=>{j||(U.stopPropagation(),!(ot.v||et)&&T.on(b,()=>ht(E-b),()=>ht(E)))},at=()=>{nt(),et||D(_t.UNSET,f.current)},dt=U=>{if(l)switch(U.key){case Pt.ENTER:U.preventDefault();case Pt.SPACE:case Pt.RIGHT:s!=="none"&&J(ze.FIRST)}},xt=U=>{let Q=!1;switch(U.key){case Pt.LEFT:et&&(f.current.focus(),x(!1),Q=!0);break;case Pt.RIGHT:et||(Q=!0);break}Q&&(U.preventDefault(),U.stopPropagation())};_s(j,f,M),tt(()=>T.toggle(et),[T,et]),tt(()=>()=>clearTimeout(ot.v),[ot]),tt(()=>{l&&A?f.current.focus():x(!1)},[l,A,x,f]),es(u,()=>({openMenu:(...U)=>{A&&J(...U)},closeMenu:()=>{et&&(f.current.focus(),x(!1))}}));const mt=it(()=>({open:et,hover:l,disabled:j,submenu:!0}),[et,l,j]),{ref:zt,className:It,...Et}=d,Wt=Ye({onPointerEnter:T.off,onPointerMove:N,onPointerLeave:at,onKeyDown:dt,onClick:()=>s!=="none"&&J()},Et),yt=()=>{const U=o(hs,{...p,...C,ariaLabel:e||(typeof a=="string"?a:"Submenu"),anchorRef:f,containerRef:L?y:st,direction:i||(k==="right"||k==="left"?k:"right"),parentScrollingRef:L&&w,isDisabled:j}),Q=y.current;return L&&Q?ir(U,Q):U};return o("li",{className:ee({block:te,element:yc,className:n}),style:{position:"relative"},role:ko,ref:st,onKeyDown:xt,children:[o("div",{role:xo,"aria-haspopup":!0,"aria-expanded":et,...mr(j,l),...Wt,ref:Xe(zt,f),className:ee({block:te,element:Ao,modifiers:mt,className:It}),children:it(()=>Ht(a,mt),[a,mt])}),W&&yt()]})}),ys=(t,e,n,r)=>{const{submenuCloseDelay:i}=Ot(pr),{isParentOpen:a,submenuCtx:s,dispatch:c,updateItems:l}=Ot(Co),u=()=>{!n&&!r&&c(_t.SET,t.current)},f=()=>{!r&&c(_t.UNSET,t.current)},h=p=>{n&&!p.currentTarget.contains(p.relatedTarget)&&f()},m=p=>{r||(p.stopPropagation(),s.on(i,u,u))},d=(p,v)=>{s.off(),!v&&f()};return _s(r,t,l),tt(()=>{n&&a&&e.current&&e.current.focus()},[e,n,a]),{setHover:u,onBlur:h,onPointerMove:m,onPointerLeave:d}},bt=Io("MenuItem",function({className:e,value:n,href:r,type:i,checked:a,disabled:s,children:c,onClick:l,isHovering:u,itemRef:f,externalRef:h,...m}){const d=!!s,{setHover:p,...v}=ys(f,f,u,d),y=Ot(So),E=Ot(bc),b=i==="radio",w=i==="checkbox",k=!!r&&!d&&!b&&!w,g=b?E.value===n:w?!!a:!1,A=C=>{if(d){C.stopPropagation(),C.preventDefault();return}const x={value:n,syntheticEvent:C};C.key!==void 0&&(x.key=C.key),w&&(x.checked=!g),b&&(x.name=E.name),Ht(l,x),b&&Ht(E.onRadioChange,x),y.handleClick(x,w||b)},T=C=>{if(u)switch(C.key){case Pt.ENTER:C.preventDefault();case Pt.SPACE:k?f.current.click():A(C)}},D=it(()=>({type:i,disabled:d,hover:u,checked:g,anchor:k}),[i,d,u,g,k]),M=Ye({...v,onPointerDown:p,onKeyDown:T,onClick:A},m),L={role:b?"menuitemradio":w?"menuitemcheckbox":xo,"aria-checked":b||w?g:void 0,...mr(d,u),...M,ref:Xe(h,f),className:ee({block:te,element:Ao,modifiers:D,className:e}),children:it(()=>Ht(c,D),[c,D])};return k?o("li",{role:ko,children:o("a",{href:r,...L})}):o("li",{...L})}),Hc=Io("FocusableItem",function({className:e,disabled:n,children:r,isHovering:i,itemRef:a,externalRef:s,...c}){const l=!!n,u=O(null),{setHover:f,onPointerLeave:h,...m}=ys(a,u,i,l),{handleClose:d}=Ot(So),p=it(()=>({disabled:l,hover:i,focusable:!0}),[l,i]),v=it(()=>Ht(r,{...p,ref:u,closeMenu:d}),[r,p,d]),y=Ye({...m,onPointerLeave:E=>h(E,!0),onFocus:f},c);return o("li",{role:xo,...mr(l),...y,ref:Xe(s,a),className:ee({block:te,element:Ao,modifiers:p,className:e}),children:v})}),cn=Ge(_e(function({className:e,...n},r){return o("li",{role:"separator",...n,ref:r,className:ee({block:te,element:gc,className:e})})})),Hf=Ge(_e(function({className:e,...n},r){return o("li",{role:ko,...n,ref:r,className:ee({block:te,element:vc,className:e})})})),Uf=_e(function({className:e,style:n,takeOverflow:r,...i},a){const s=O(null),[c,l]=H(),{overflow:u,overflowAmt:f}=Ot(ar);return Ve(()=>{let h;r&&f>=0&&(h=fs(s.current).height-f,h<0&&(h=0)),l(h>=0?{maxHeight:h,overflow:u}:void 0)},[r,u,f]),Ve(()=>{c&&(s.current.scrollTop=0)},[c]),o("div",{...i,ref:Xe(a,s),className:ee({block:te,element:_c,className:e}),style:{...n,...c}})});var hn=(t=>(t.Mouse="mouse",t.Touch="touch",t.Pointer="pointer",t))(hn||{}),mn=(t=>(t.CancelledByMovement="cancelled-by-movement",t.CancelledByRelease="cancelled-by-release",t.CancelledOutsideElement="cancelled-outside-element",t))(mn||{});const bs=()=>typeof window=="object"?(window==null?void 0:window.PointerEvent)??null:null,Uc=()=>typeof window=="object"?(window==null?void 0:window.TouchEvent)??null:null;function Es(t){const{nativeEvent:e}=t,n=Uc();return n&&e instanceof n||"touches"in t}function ws(t){const e=bs();return t.nativeEvent instanceof MouseEvent&&!(e&&t.nativeEvent instanceof e)}function Ts(t){const{nativeEvent:e}=t;if(!e)return!1;const n=bs();return n&&e instanceof n||"pointerId"in e}function di(t){return ws(t)||Es(t)||Ts(t)}function fi(t){return Es(t)?{x:t.touches[0].pageX,y:t.touches[0].pageY}:ws(t)||Ts(t)?{x:t.pageX,y:t.pageY}:null}function jc(t){return{target:t.target,currentTarget:t.currentTarget,nativeEvent:t,persist:()=>{}}}function As(t,{threshold:e=400,captureEvent:n=!1,detect:r=hn.Pointer,cancelOnMovement:i=!1,cancelOutsideElement:a=!0,filterEvents:s,onStart:c,onMove:l,onFinish:u,onCancel:f}={}){const h=O(!1),m=O(!1),d=O(),p=O(),v=O(t),y=O(null),E=At(g=>A=>{m.current||di(A)&&(s!==void 0&&!s(A)||(n&&A.persist(),c==null||c(A,{context:g}),y.current=fi(A),m.current=!0,d.current=A.currentTarget,p.current=setTimeout(()=>{v.current&&(v.current(A,{context:g}),h.current=!0)},e)))},[n,s,c,e]),b=At(g=>(A,T)=>{di(A)&&m.current&&(y.current=null,n&&A.persist(),h.current?u==null||u(A,{context:g}):m.current&&(f==null||f(A,{context:g,reason:T??mn.CancelledByRelease})),h.current=!1,m.current=!1,p.current!==void 0&&clearTimeout(p.current))},[n,u,f]),w=At(g=>A=>{if(l==null||l(A,{context:g}),i!==!1&&y.current){const T=fi(A);if(T){const D=i===!0?25:i,M={x:Math.abs(T.x-y.current.x),y:Math.abs(T.y-y.current.y)};(M.x>D||M.y>D)&&b(g)(A,mn.CancelledByMovement)}}},[b,i,l]),k=At(g=>{if(t===null)return{};switch(r){case hn.Mouse:{const A={onMouseDown:E(g),onMouseMove:w(g),onMouseUp:b(g)};return a&&(A.onMouseLeave=T=>{b(g)(T,mn.CancelledOutsideElement)}),A}case hn.Touch:return{onTouchStart:E(g),onTouchMove:w(g),onTouchEnd:b(g)};case hn.Pointer:{const A={onPointerDown:E(g),onPointerMove:w(g),onPointerUp:b(g)};return a&&(A.onPointerLeave=T=>b(g)(T,mn.CancelledOutsideElement)),A}}},[t,b,a,r,w,E]);return tt(()=>{if(!window)return;function g(A){const T=jc(A);b()(T)}return window.addEventListener("mouseup",g),window.addEventListener("touchend",g),window.addEventListener("pointerup",g),()=>{window.removeEventListener("mouseup",g),window.removeEventListener("touchend",g),window.removeEventListener("pointerup",g)}},[b]),tt(()=>()=>{p.current!==void 0&&clearTimeout(p.current)},[]),tt(()=>{v.current=t},[t]),k}const Kc=Rt(()=>new Intl.DateTimeFormat().resolvedOptions().locale),Wc=t=>{const{locale:e,dateYear:n,hideTime:r,formatOpts:i,forceOpts:a}=t||{},s=e.replace(/-[a-z]+$/i,""),c=wn([s],[Kc],e),l=new Date().getFullYear(),u=a||{year:n===l?void 0:"numeric",month:"short",day:"numeric",hour:r?void 0:"numeric",minute:r?void 0:"numeric",...i};try{return Intl.DateTimeFormat(c,u)}catch{}try{return Intl.DateTimeFormat(e,u)}catch{}return Intl.DateTimeFormat(void 0,u)},Zc=Rt(Wc);function Cn(t,e){return t instanceof Date||(t=new Date(t)),Zc({dateYear:t.getFullYear(),locale:kt.locale,...e}).format(t)}function qc(t){const e=URL.parse("/compose/",window.location),{width:n,height:r}=window.screen,i=Math.max(0,(n-600)/2),a=Math.max(0,(r-450)/2),s=Math.min(n,600),c=Math.min(r,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(kt._({id:"4S86wI"})),u}const Gc=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);function Yc(){if(Gc){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 Xc=document.documentElement,jn=getComputedStyle(Xc),Qc=8;let Cs=[0,0,0,0];function Ss(){const t=jn.getPropertyValue("--sai-top"),e=jn.getPropertyValue("--sai-right"),n=jn.getPropertyValue("--sai-bottom"),r=jn.getPropertyValue("--sai-left");Cs=[Math.max(0,parseInt(t,10)),Math.max(0,parseInt(e,10)),Math.max(0,parseInt(n,10)),Math.max(0,parseInt(r,10))]}requestAnimationFrame(Ss);function ks(t=[]){return Cs.map((n,r)=>(n||Qc)+(t[r]||0)).join(" ")}CSS.supports("top: env(safe-area-inset-top)")&&window.addEventListener("resize",Ss,{passive:!0});const hi=5e3;function Kn(t){if(t||(t=!0),V.showCompose){V.composerState.minimized?Lt({duration:hi,text:kt._({id:"/4fHR1"})}):Lt({duration:hi,text:kt._({id:"vvl08N"})});return}Yc(),V.showCompose=t}const Oe=document.createElement("div");function Jc(t,e){if(!t)return"";const{preProcess:n}=e||{};return Oe.innerHTML=t.replace(/<\/p>/g,`</p>
|
||
|
||
`).replace(/<\/li>/g,`</li>
|
||
`),Oe.querySelectorAll("br").forEach(r=>{r.replaceWith(`
|
||
`)}),n==null||n(Oe),Oe.querySelectorAll(".invisible").forEach(r=>{r.remove()}),Oe.querySelectorAll(".ellipsis").forEach(r=>{r.append("...")}),Oe.innerText.replace(/[\r\n]{3,}/g,`
|
||
|
||
`).trim()}const gr=Rt(Jc);function xs(t){var s;const{spoilerText:e,content:n,poll:r,mediaAttachments:i}=t;let a="";return e!=null&&e.trim()?a+=e:a+=gr(n),a=a.trim(),(s=r==null?void 0:r.options)!=null&&s.length&&(a+=`
|
||
|
||
📊:
|
||
${r.options.map(c=>`${r.multiple?"▪️":"•"} ${c.title}`).join(`
|
||
`)}`),i!=null&&i.length&&(a+=" "+i.map(c=>({image:"🖼️",gifv:"🎞️",video:"📹",audio:"🎵",unknown:""})[c.type]||"").join("")),a}const Is={x:()=>S(()=>import("./icons/close-line-Bfj902o4.js"),[],import.meta.url),heart:()=>S(()=>import("./icons/heart-line-vi3QqJTo.js"),[],import.meta.url),bookmark:()=>S(()=>import("./icons/bookmark-line-BMGZc_Mc.js"),[],import.meta.url),"check-circle":()=>S(()=>import("./icons/check-circle-line-CSlVj8QA.js"),[],import.meta.url),"x-circle":()=>S(()=>import("./icons/close-circle-line-DlCWcUwK.js"),[],import.meta.url),transfer:()=>S(()=>import("./icons/transfer-4-line-BHXBUumZ.js"),[],import.meta.url),rocket:()=>S(()=>import("./icons/rocket-line-B7gBxy4I.js"),[],import.meta.url),"arrow-left":{module:()=>S(()=>import("./icons/arrow-left-line-BGgZ0udH.js"),[],import.meta.url),rtl:!0},"arrow-right":{module:()=>S(()=>import("./icons/arrow-right-line-zKtS4vm5.js"),[],import.meta.url),rtl:!0},"arrow-up":()=>S(()=>import("./icons/arrow-up-line-Bow_AQZ6.js"),[],import.meta.url),"arrow-down":()=>S(()=>import("./icons/arrow-down-line-RSwsrALM.js"),[],import.meta.url),earth:()=>S(()=>import("./icons/earth-line-DW_CwNjP.js"),[],import.meta.url),lock:()=>S(()=>import("./icons/lock-line-BbTC1fux.js"),[],import.meta.url),unlock:()=>S(()=>import("./icons/unlock-line-CGrzBxul.js"),[],import.meta.url),"eye-close":()=>S(()=>import("./icons/eye-close-line-DQnawnJE.js"),[],import.meta.url),"eye-open":()=>S(()=>import("./icons/eye-2-line-Dvog5oyl.js"),[],import.meta.url),message:()=>S(()=>import("./icons/mail-line-Cadg2cpP.js"),[],import.meta.url),comment:{module:()=>S(()=>import("./icons/chat-3-line-C4e7R0Zy.js"),[],import.meta.url),rtl:!0},comment2:{module:()=>S(()=>import("./icons/comment-2-line-DfD-95ou.js"),[],import.meta.url),rtl:!0},home:()=>S(()=>import("./icons/home-3-line-BLD1YYP8.js"),[],import.meta.url),notification:()=>S(()=>import("./icons/notification-line-Cc2m6sh5.js"),[],import.meta.url),follow:()=>S(()=>import("./icons/user-follow-line-CsL-DB1N.js"),[],import.meta.url),"follow-add":()=>S(()=>import("./icons/user-add-line-DuegJyfy.js"),[],import.meta.url),poll:[()=>S(()=>import("./icons/chart-bar-line-W9BuvVdR.js"),[],import.meta.url),"90deg"],pencil:()=>S(()=>import("./icons/pencil-line-BwUdLENj.js"),[],import.meta.url),quill:()=>S(()=>import("./icons/quill-pen-line-oAx8SSeF.js"),[],import.meta.url),at:()=>S(()=>import("./icons/at-line-C4-OGRKX.js"),[],import.meta.url),attachment:()=>S(()=>import("./icons/attachment-line-C4ysC1zZ.js"),[],import.meta.url),upload:()=>S(()=>import("./icons/upload-3-line-BB2RA_2Z.js"),[],import.meta.url),gear:()=>S(()=>import("./icons/settings-3-line-BGrM7a5R.js"),[],import.meta.url),more:()=>S(()=>import("./icons/more-3-line-WfszpsFu.js"),[],import.meta.url),more2:()=>S(()=>import("./icons/more-1-fill-Cnnj9cLP.js"),[],import.meta.url),external:{module:()=>S(()=>import("./icons/external-link-line-BYXsdcMa.js"),[],import.meta.url),rtl:!0},popout:{module:()=>S(()=>import("./icons/external-link-line-BYXsdcMa.js"),[],import.meta.url),rtl:!0},popin:{module:()=>S(()=>import("./icons/external-link-line-BYXsdcMa.js"),[],import.meta.url),rotate:"180deg",rtl:!0},plus:()=>S(()=>import("./icons/add-circle-line-VUOz5dLS.js"),[],import.meta.url),"chevron-left":{module:()=>S(()=>import("./icons/left-line-8vYaPuok.js"),[],import.meta.url),rtl:!0},"chevron-right":{module:()=>S(()=>import("./icons/right-line-E80CeS1Q.js"),[],import.meta.url),rtl:!0},"chevron-down":()=>S(()=>import("./icons/down-line-PlS1iUy8.js"),[],import.meta.url),reply:{module:()=>S(()=>import("./icons/share-forward-line-DX1QbiUu.js"),[],import.meta.url),rotate:"180deg",flip:"horizontal",rtl:!0},thread:()=>S(()=>import("./icons/route-line-D10jSVCO.js"),[],import.meta.url),group:{module:()=>S(()=>import("./icons/group-line-Cw2Phg9p.js"),[],import.meta.url),rtl:!0},bot:()=>S(()=>import("./icons/android-2-line-C7qVwx2U.js"),[],import.meta.url),menu:()=>S(()=>import("./icons/rows-4-line-DIXu-DVG.js"),[],import.meta.url),list:{module:()=>S(()=>import("./icons/list-check-line-BaMf8v8i.js"),[],import.meta.url),rtl:!0},search:()=>S(()=>import("./icons/search-2-line-CoCbFBVR.js"),[],import.meta.url),hashtag:()=>S(()=>import("./icons/hashtag-line-Cml-0qv2.js"),[],import.meta.url),info:()=>S(()=>import("./icons/information-line-Dn255DD5.js"),[],import.meta.url),shortcut:()=>S(()=>import("./icons/lightning-line-cvW5NR-M.js"),[],import.meta.url),user:()=>S(()=>import("./icons/user-4-line-C89P3h09.js"),[],import.meta.url),following:()=>S(()=>import("./icons/walk-line-BZwRwcxJ.js"),[],import.meta.url),pin:()=>S(()=>import("./icons/pin-line-BqseDe3t.js"),[],import.meta.url),unpin:[()=>S(()=>import("./icons/pin-line-BqseDe3t.js"),[],import.meta.url),"180deg"],bus:()=>S(()=>import("./icons/bus-2-line-CfBaNBAi.js"),[],import.meta.url),link:()=>S(()=>import("./icons/link-2-line-SnIkQ_rZ.js"),[],import.meta.url),history:()=>S(()=>import("./icons/history-line-Bi2So-je.js"),[],import.meta.url),share:()=>S(()=>import("./icons/share-2-line-C2byQ30z.js"),[],import.meta.url),sparkles:()=>S(()=>import("./icons/sparkles-line-DWyRj8uB.js"),[],import.meta.url),sparkles2:()=>S(()=>import("./icons/sparkles-2-line-H731KO3v.js"),[],import.meta.url),exit:{module:()=>S(()=>import("./icons/exit-line-NjC63GxM.js"),[],import.meta.url),rtl:!0},translate:()=>S(()=>import("./icons/translate-line-cdOWN72F.js"),[],import.meta.url),play:()=>S(()=>import("./icons/play-fill-D1o3ePO2.js"),[],import.meta.url),trash:()=>S(()=>import("./icons/delete-2-line-C-lQIJNC.js"),[],import.meta.url),mute:{module:()=>S(()=>import("./icons/volume-mute-line-BluUkhVT.js"),[],import.meta.url),rtl:!0},unmute:{module:()=>S(()=>import("./icons/volume-line-dtC5ZFr8.js"),[],import.meta.url),rtl:!0},block:()=>S(()=>import("./icons/forbid-circle-line-f_JQE7a8.js"),[],import.meta.url),unblock:[()=>S(()=>import("./icons/forbid-circle-line-f_JQE7a8.js"),[],import.meta.url),"180deg"],flag:()=>S(()=>import("./icons/flag-1-line-sWzx_4o4.js"),[],import.meta.url),time:()=>S(()=>import("./icons/time-line-CHAmvUdg.js"),[],import.meta.url),refresh:()=>S(()=>import("./icons/refresh-2-line-B3CD5yz0.js"),[],import.meta.url),emoji2:()=>S(()=>import("./icons/emoji-2-line-DODV8bnC.js"),[],import.meta.url),filter:()=>S(()=>import("./icons/filter-2-line-DLBEPhKS.js"),[],import.meta.url),filters:()=>S(()=>import("./icons/filter-line-CuUlgBZU.js"),[],import.meta.url),chart:()=>S(()=>import("./icons/chart-line-line-noCpZUdN.js"),[],import.meta.url),react:()=>S(()=>import("./icons/react-line-C6TecPWI.js"),[],import.meta.url),layout4:{module:()=>S(()=>import("./icons/layout-4-line-BFFb1cPy.js"),[],import.meta.url),rtl:!0},layout5:()=>S(()=>import("./icons/layout-5-line-tauINoiF.js"),[],import.meta.url),announce:{module:()=>S(()=>import("./icons/announcement-line-BdsFnqjO.js"),[],import.meta.url),rtl:!0},alert:()=>S(()=>import("./icons/alert-line-CcwmWSBO.js"),[],import.meta.url),round:()=>S(()=>import("./icons/round-fill-CaZIeOWe.js"),[],import.meta.url),"arrow-up-circle":()=>S(()=>import("./icons/arrow-up-circle-line-SO68bPTf.js"),[],import.meta.url),"arrow-down-circle":()=>S(()=>import("./icons/arrow-down-circle-line-SfuiravZ.js"),[],import.meta.url),clipboard:{module:()=>S(()=>import("./icons/clipboard-line-CIOFpSsX.js"),[],import.meta.url),rtl:!0},"account-edit":()=>S(()=>import("./icons/user-edit-line-CC6Y-fJT.js"),[],import.meta.url),"account-warning":()=>S(()=>import("./icons/user-warning-line-BLfdr8Bj.js"),[],import.meta.url),keyboard:()=>S(()=>import("./icons/keyboard-line-BRd9ohM1.js"),[],import.meta.url),cloud:()=>S(()=>import("./icons/cloud-line-CCOdtB64.js"),[],import.meta.url),month:{module:()=>S(()=>import("./icons/calendar-month-line-DGpTEHfi.js"),[],import.meta.url),rtl:!0},media:()=>S(()=>import("./icons/photo-album-line-DkklX4P5.js"),[],import.meta.url),speak:()=>S(()=>import("./icons/radar-line-Dch2zZ5p.js"),[],import.meta.url),building:()=>S(()=>import("./icons/building-5-line-jPUf3HeC.js"),[],import.meta.url),history2:{module:()=>S(()=>import("./icons/history-2-line-C2uKqj-3.js"),[],import.meta.url),rtl:!0},document:()=>S(()=>import("./icons/document-line-ewA3UKpU.js"),[],import.meta.url),"arrows-right":{module:()=>S(()=>import("./icons/arrows-right-line-B7gMPCMB.js"),[],import.meta.url),rtl:!0},code:()=>S(()=>import("./icons/code-line-_8nrb8Yp.js"),[],import.meta.url),copy:()=>S(()=>import("./icons/copy-2-line-SBRewLs-.js"),[],import.meta.url),quote:{module:()=>S(()=>import("./icons/quote-left-line-D0CgS7V6.js"),[],import.meta.url),rtl:!0},settings:()=>S(()=>import("./icons/settings-6-line-3dTfr4F6.js"),[],import.meta.url),"heart-break":()=>S(()=>import("./icons/heart-crack-line-BlrTdexG.js"),[],import.meta.url),"user-x":()=>S(()=>import("./icons/user-x-line-Dahn1YZg.js"),[],import.meta.url),minimize:()=>S(()=>import("./icons/arrows-down-line-4JmRUmoO.js"),[],import.meta.url),celebrate:()=>S(()=>import("./icons/celebrate-line-CwClz8eZ.js"),[],import.meta.url),schedule:()=>S(()=>import("./icons/calendar-time-add-line-BwP_cVys.js"),[],import.meta.url),month:()=>S(()=>import("./icons/calendar-month-line-DGpTEHfi.js"),[],import.meta.url),day:()=>S(()=>import("./icons/calendar-day-line-zQlj2fPr.js"),[],import.meta.url),camera:()=>S(()=>import("./icons/camera-line-DK82q_yA.js"),[],import.meta.url)},tl={s:12,m:16,l:20,xl:24,xxl:32},mi={},el=Ma(function({width:t,height:e,body:n,rotate:r,flip:i}){return o("svg",{viewBox:`0 0 ${t} ${e}`,dangerouslySetInnerHTML:{__html:n},style:{transform:`${r?`rotate(${r})`:""} ${i?"scaleX(-1)":""}`}})},{isShallowEqual:!0,maxSize:Object.keys(Is).length,matchesArg:(t,e)=>t.icon===e.icon&&t.body===e.body});function R({icon:t,size:e="m",alt:n,title:r,class:i="",style:a={}}){if(!t)return null;const s=tl[e];let c=Is[t];if(!c)return null;let l,u,f=!1;Array.isArray(c)?[c,l,u]=c:typeof c=="object"&&({rotate:l,flip:u,rtl:f}=c,c=c.module);const[h,m]=H(mi[t]),d=O(t);return tt(()=>{h&&d.current===t||((async()=>{const p=await c();m(p.default),mi[t]=p.default})(),d.current=t)},[t]),o("span",{class:`icon ${i} ${f?"rtl-flip":""}`,title:r||n,style:{width:`${s}px`,height:`${s}px`,...a},"data-icon":t,children:h&&o(el,{icon:t,width:h.width,height:h.height,body:h.body,rotate:l,flip:u})})}const je=_e((t,e)=>{var c;let n;try{n=Pa()}catch{}let r=(location.hash||"").replace(/^#/,"").trim();r===""&&(r="/");const{to:i,...a}=t;if(r&&r!=="/"&&r.includes("?")){const l=URL.parse(r,location.origin);if((c=l==null?void 0:l.searchParams)!=null&&c.size){const u=Array.from(l.searchParams.entries()).map(([f,h])=>`${f}=${encodeURIComponent(h)}`).join("&");r=l.pathname+"?"+u}}const s=r===i||decodeURIComponent(r)===i;return o("a",{ref:e,href:`#${i}`,...a,class:`${t.class||""} ${s?"is-active":""}`,onClick:l=>{var u,f,h;(f=(u=l.currentTarget)==null?void 0:u.parentNode)!=null&&f.closest("a")&&l.stopPropagation(),n&&(V.prevLocation=n),(h=t.onClick)==null||h.call(t,l)}})});function pi(t){const{className:e,disabled:n,...r}=t;return o(Hc,{className:e,disabled:n,children:({ref:i,closeMenu:a})=>o(je,{...r,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 nl=Rt(()=>new Intl.DateTimeFormat().resolvedOptions().locale),vi=Rt((t,e={})=>{const n=t.replace(/-[a-z]+$/i,""),r=wn([n],[nl()],t);try{return new Intl.DateTimeFormat(r,e)}catch{}try{return new Intl.DateTimeFormat(t,e)}catch{}return new Intl.DateTimeFormat(void 0,e)}),rl=Rt(t=>new Intl.RelativeTimeFormat(t||void 0)),Ke=60,We=60*Ke,pn=24*We,ol=t=>{const e=rl(kt.locale),n=(t.getTime()-Date.now())/1e3,r=Math.abs(n);return r<Ke?e.format(Math.floor(n),"second"):r<We?e.format(Math.floor(n/Ke),"minute"):r<pn?e.format(Math.floor(n/We),"hour"):r<30*pn?e.format(Math.floor(n/pn),"day"):e.format(Math.floor(n/pn/30),"month")},il=t=>{const e=(Date.now()-t.getTime())/1e3;return e<Ke?kt._({id:"NnRCUm",values:{0:e<1?1:Math.floor(e)}}):e<We?kt._({id:"ZSWUwq",values:{0:Math.floor(e/Ke)}}):kt._({id:"NSSJsj",values:{0:Math.floor(e/We)}})};function se({datetime:t,format:e}){if(!t)return null;const[n,r]=Ji(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/pn<=1?l=il(i):u.getFullYear()===i.getFullYear()?l=vi(kt.locale,{year:void 0,month:"short",day:"numeric"}).format(i):l=vi(kt.locale,{dateStyle:"short"}).format(i)}return l||(l=ol(i)),[l,i.toISOString(),i.toLocaleString()]},[i,e,n]);return tt(()=>{if(!gi(i))return;let l,u;function f(){u=requestAnimationFrame(()=>{r(),h()})}function h(){const m=(Date.now()-i.getTime())/1e3;m<Ke?l=setTimeout(f,1e4):m<We&&(l=setTimeout(f,6e4))}return h(),()=>{clearTimeout(l),cancelAnimationFrame(u)}},[]),o("time",{datetime:s,title:c,children:a})}function sl(t){const e=O();return o(Vc,{...t,instanceRef:e,itemProps:{onPointerMove:n=>{var r,i;n.pointerType==="touch"&&((i=(r=e.current)==null?void 0:r.openMenu)==null||i.call(r))},onPointerLeave:n=>{var r,i;n.pointerType==="touch"&&((i=(r=e.current)==null?void 0:r.openMenu)==null||i.call(r))},...t.itemProps}})}function al(t,e=[]){!t||typeof t!="function"||tt(()=>{const n=new CloseWatcher;return n.addEventListener("close",t),()=>{n.destroy()}},e)}const cl=window.CloseWatcher?al:()=>{},ll=document.getElementById("modal-container");function _i(){return getComputedStyle(document.documentElement).getPropertyValue("--backdrop-theme-color")}function io({children:t,onClose:e,onClick:n,class:r,minimized:i}){if(!t)return null;const a=O();tt(()=>{let h=setTimeout(()=>{var d;const m=(d=a.current)==null?void 0:d.querySelector('[tabindex="-1"]');m&&m.focus()},100);return()=>clearTimeout(h)},[]);const s=window.CloseWatcher,c=Be("esc",()=>{setTimeout(()=>{e==null||e()},0)},{enabled:!s&&!!e,keydown:!1,keyup:!0},[e]);cl(e,[e]),tt(()=>{const h=document.querySelectorAll(".deck-container");if(i){const m=h[h.length-1];m&&m.tabIndex===-1&&m.focus()}else t?h.forEach(m=>{m.setAttribute("inert","")}):h.forEach(m=>{m.removeAttribute("inert")});return()=>{h.forEach(m=>{m.removeAttribute("inert")})}},[t,i]);const l=O(),u=O();Ie(()=>{if(t&&!i)if(Qr.local.get("theme")){const m=_i();l.current=document.querySelector('meta[name="theme-color"][data-theme-setting="manual"]'),l.current&&(u.current=l.current.content,l.current.content=m)}else{const m=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",d=_i();l.current=document.querySelector(`meta[name="theme-color"][media*="${m}"]`),l.current&&(u.current=l.current.content,l.current.content=d)}else l.current&&u.current&&(l.current.content=u.current);return()=>{l.current&&u.current&&(l.current.content=u.current)}},[t,i]);const f=o("div",{ref:h=>{var m;a.current=h,c(((m=h==null?void 0:h.querySelector)==null?void 0:m.call(h,'[tabindex="-1"]'))||h)},className:r,onClick:h=>{n==null||n(h),h.target===h.currentTarget&&(e==null||e(h))},tabIndex:i?0:"-1",inert:i,onFocus:h=>{var m,d;try{if(h.target===h.currentTarget){const p=(m=a.current)==null?void 0:m.querySelector('[tabindex="-1"]'),v=!!p&&((d=getComputedStyle(p))==null?void 0:d.pointerEvents)!=="none";p&&v&&p.focus()}}catch{}},children:t});return ir(f,ll)}const yi={s:16,m:20,l:24,xl:32,xxl:50,xxxl:64},ln={},gn=window.OffscreenCanvas?new OffscreenCanvas(1,1):document.createElement("canvas"),nr=gn.getContext("2d",{willReadFrequently:!0});nr.imageSmoothingEnabled=!1;const ul=/missing\.png$/;function dl({url:t,size:e,alt:n="",squircle:r,...i}){e=yi[e]||e||yi.m;const a=O(),s=ul.test(t);return o("span",{ref:a,class:`avatar ${r?"squircle":""} ${ln[t]?"has-alpha":""}`,style:{width:e,height:e},title:n,...i,children:!!t&&o("img",{src:t,width:e,height:e,alt:n,loading:"lazy",decoding:"async",fetchPriority:"low",crossOrigin:ln[t]===void 0&&!s?"anonymous":void 0,onError:c=>{c.target.crossOrigin&&(c.target.crossOrigin=null,c.target.src=t)},onLoad:c=>{a.current&&(a.current.dataset.loaded=!0),ln[t]===void 0&&(s||setTimeout(()=>{try{const{width:l,height:u}=c.target;gn.width!==l&&(gn.width=l),gn.height!==u&&(gn.height=u),nr.drawImage(c.target,0,0);const f=nr.getImageData(0,0,l,u),h=f.data.filter((m,d)=>d%4===3&&m<=128).length/(f.data.length/4)>.1;h&&a.current.classList.add("has-alpha"),ln[t]=h,nr.clearRect(0,0,l,u)}catch{ln[t]=!1}},1))}})})}const ae=Rt(dl);let so=!1;const fl=new MutationObserver(t=>{t.forEach(e=>{if(e.type==="attributes"){const{dir:n}=e.target;n==="rtl"?so=!0:so=!1}})});fl.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});function ao(){return so}function hl(){const[t,e]=H({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 Ds(t){const{containerProps:e,instanceRef:n,align:r}=t,i=hl(),a=n!=null&&n.current?n:O(),s=ao()?r==="end"?"start":r==="start"?"end":r:r;return o(zc,{boundingBoxPadding:ks(),repositionFlag:`${i.width}x${i.height}`,unmountOnClose:!0,...t,align:s,instanceRef:a,containerProps:{onClick:c=>{var l,u,f;c.target===c.currentTarget&&((u=(l=a.current)==null?void 0:l.closeMenu)==null||u.call(l)),(f=e==null?void 0:e.onClick)==null||f.call(e,c)},...e}})}function kr({subMenu:t=!1,confirm:e=!0,confirmLabel:n,menuItemClassName:r,menuFooter:i,menuExtras:a,...s}){const{children:c,onClick:l,...u}=s;return e?o(t?sl:Ds,{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:[o(bt,{className:r,onClick:l,children:n}),a,i]}):t?o(bt,{...s}):l?Oa(c,{onClick:l}):c}function co({staticUrl:t,alt:e,url:n}){return o("picture",{children:[t&&o("source",{srcset:t,media:"(prefers-reduced-motion: reduce)"}),o("img",{src:n,alt:e,class:"shortcode-emoji emoji",width:"16",height:"16",loading:"lazy",decoding:"async",fetchPriority:"low"},e||n)]})}const ml=Rt(t=>new RegExp(`:(${t.join("|")}):`,"g"));function pl({text:t,emojis:e}){if(!t)return"";if(!(e!=null&&e.length)||t.indexOf(":")===-1)return t;const n=ml(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 o(co,{staticUrl:l,alt:i,url:c},i+"-"+a)}return i})}const Ze=Rt(pl),gl=Rt(t=>{const e={sensitivity:"base"};try{return new Intl.Collator(t||void 0,e)}catch{return new Intl.Collator(void 0,e)}}),vl=/([^@]+)(@.+)/i,_l=/(\:(\w|\+|\-)+\:)(?=|[\!\.\?]|$)/g,yl=/\s+/g,bl=/[^a-z0-9@\.]/gi;function El({account:t,instance:e,showAvatar:n,showAcct:r,short:i,external:a,onClick:s}){const{i18n:c}=ne();if(!t)return null;const{acct:l,avatar:u,avatarStatic:f,id:h,url:m,displayName:d,emojis:p,bot:v,username:y}=t,[E,b,w]=l.match(vl)||[,l];e||(e=sr().instance);const k=y.toLowerCase().trim(),g=(d||"").toLowerCase().trim(),A=g.replace(_l,"").replace(yl,""),T=A.replace(bl,""),D=!i&&(k===g||k===A||k===T||gl(c.locale).compare(k,A)===0)||T===l.toLowerCase();return o("a",{class:`name-text ${r?"show-acct":""} ${i?"short":""}`,href:m,target:a?"_blank":null,title:d?`${d} (${w?"":"@"}${l})`:`${w?"":"@"}${l}`,onClick:M=>{if(!a&&!M.shiftKey){if(M.preventDefault(),M.stopPropagation(),s)return s(M);if(M.metaKey||M.ctrlKey||M.shiftKey||M.which===2){const L=`#/${e}/a/${h}`;window.open(L,"_blank");return}V.showAccount={account:t,instance:e}}},children:[n&&o($,{children:[o(ae,{url:f||u,squircle:v})," "]}),d&&!i?o($,{children:[o("b",{dir:"auto",children:o(Ze,{text:d,emojis:p})}),!r&&!D&&o($,{children:[" ",o("i",{class:"bidi-isolate",children:["@",y]})]})]}):i?o("i",{children:y}):o("b",{children:y}),r&&o($,{children:[o("br",{}),o("i",{class:"bidi-isolate",children:[w?"":"@",b,!!w&&o("span",{class:"ib",children:w})]})]})]})}const ve=Rt(El),Wn={"zh-YUE":"YUE",zh_HANT:"zh-Hant"},xr=Rt(t=>new Intl.DisplayNames(t||void 0,{type:"language"}));function wl(t){let e,n;typeof t=="object"&&({code:t,locale:e,fallback:n}=t);try{const r=xr(e||kt.locale).of(t);if(r!==t)return r;if(!n){const i=xr(t).of(t);if(i!==t)return i}return n||""}catch{if(Wn[t])try{const i=xr(Wn[e]||e||kt.locale).of(Wn[t]);return i!==Wn[t]?i:n||""}catch{}return n||""}}const un=Rt(wl),Tl=[{code:"af",name:"Afrikaans"},{code:"sq",name:"Albanian"},{code:"am",name:"Amharic"},{code:"ar",name:"Arabic"},{code:"hy",name:"Armenian"},{code:"as",name:"Assamese"},{code:"ay",name:"Aymara"},{code:"az",name:"Azerbaijani"},{code:"bm",name:"Bambara"},{code:"eu",name:"Basque"},{code:"be",name:"Belarusian"},{code:"bn",name:"Bengali"},{code:"bho",name:"Bhojpuri"},{code:"bs",name:"Bosnian"},{code:"bg",name:"Bulgarian"},{code:"ca",name:"Catalan"},{code:"ceb",name:"Cebuano"},{code:"ny",name:"Chichewa"},{code:"zh",name:"Chinese"},{code:"zh_HANT",name:"Chinese (Traditional)"},{code:"co",name:"Corsican"},{code:"hr",name:"Croatian"},{code:"cs",name:"Czech"},{code:"da",name:"Danish"},{code:"dv",name:"Dhivehi"},{code:"doi",name:"Dogri"},{code:"nl",name:"Dutch"},{code:"en",name:"English"},{code:"eo",name:"Esperanto"},{code:"et",name:"Estonian"},{code:"ee",name:"Ewe"},{code:"tl",name:"Filipino"},{code:"fi",name:"Finnish"},{code:"fr",name:"French"},{code:"fy",name:"Frisian"},{code:"gl",name:"Galician"},{code:"ka",name:"Georgian"},{code:"de",name:"German"},{code:"el",name:"Greek"},{code:"gn",name:"Guarani"},{code:"gu",name:"Gujarati"},{code:"ht",name:"Haitian Creole"},{code:"ha",name:"Hausa"},{code:"haw",name:"Hawaiian"},{code:"iw",name:"Hebrew"},{code:"hi",name:"Hindi"},{code:"hmn",name:"Hmong"},{code:"hu",name:"Hungarian"},{code:"is",name:"Icelandic"},{code:"ig",name:"Igbo"},{code:"ilo",name:"Ilocano"},{code:"id",name:"Indonesian"},{code:"ga",name:"Irish"},{code:"it",name:"Italian"},{code:"ja",name:"Japanese"},{code:"jw",name:"Javanese"},{code:"kn",name:"Kannada"},{code:"kk",name:"Kazakh"},{code:"km",name:"Khmer"},{code:"rw",name:"Kinyarwanda"},{code:"gom",name:"Konkani"},{code:"ko",name:"Korean"},{code:"kri",name:"Krio"},{code:"ku",name:"Kurdish (Kurmanji)"},{code:"ckb",name:"Kurdish (Sorani)"},{code:"ky",name:"Kyrgyz"},{code:"lo",name:"Lao"},{code:"la",name:"Latin"},{code:"lv",name:"Latvian"},{code:"ln",name:"Lingala"},{code:"lt",name:"Lithuanian"},{code:"lg",name:"Luganda"},{code:"lb",name:"Luxembourgish"},{code:"mk",name:"Macedonian"},{code:"mai",name:"Maithili"},{code:"mg",name:"Malagasy"},{code:"ms",name:"Malay"},{code:"ml",name:"Malayalam"},{code:"mt",name:"Maltese"},{code:"mi",name:"Maori"},{code:"mr",name:"Marathi"},{code:"mni-Mtei",name:"Meiteilon (Manipuri)"},{code:"lus",name:"Mizo"},{code:"mn",name:"Mongolian"},{code:"my",name:"Myanmar (Burmese)"},{code:"ne",name:"Nepali"},{code:"no",name:"Norwegian"},{code:"or",name:"Odia (Oriya)"},{code:"om",name:"Oromo"},{code:"ps",name:"Pashto"},{code:"fa",name:"Persian"},{code:"pl",name:"Polish"},{code:"pt",name:"Portuguese"},{code:"pa",name:"Punjabi"},{code:"qu",name:"Quechua"},{code:"ro",name:"Romanian"},{code:"ru",name:"Russian"},{code:"sm",name:"Samoan"},{code:"sa",name:"Sanskrit"},{code:"gd",name:"Scots Gaelic"},{code:"nso",name:"Sepedi"},{code:"sr",name:"Serbian"},{code:"st",name:"Sesotho"},{code:"sn",name:"Shona"},{code:"sd",name:"Sindhi"},{code:"si",name:"Sinhala"},{code:"sk",name:"Slovak"},{code:"sl",name:"Slovenian"},{code:"so",name:"Somali"},{code:"es",name:"Spanish"},{code:"su",name:"Sundanese"},{code:"sw",name:"Swahili"},{code:"sv",name:"Swedish"},{code:"tg",name:"Tajik"},{code:"ta",name:"Tamil"},{code:"tt",name:"Tatar"},{code:"te",name:"Telugu"},{code:"th",name:"Thai"},{code:"ti",name:"Tigrinya"},{code:"ts",name:"Tsonga"},{code:"tr",name:"Turkish"},{code:"tk",name:"Turkmen"},{code:"ak",name:"Twi"},{code:"uk",name:"Ukrainian"},{code:"ur",name:"Urdu"},{code:"ug",name:"Uyghur"},{code:"uz",name:"Uzbek"},{code:"vi",name:"Vietnamese"},{code:"cy",name:"Welsh"},{code:"xh",name:"Xhosa"},{code:"yi",name:"Yiddish"},{code:"yo",name:"Yoruba"},{code:"zu",name:"Zulu"}],Al=Rt(()=>[new Intl.DateTimeFormat().resolvedOptions().locale,...navigator.languages]),Cl=()=>wn(Al(),Tl.map(t=>t.code.replace("_","-")),"en");function Ls(t=!1){if(t){const{contentTranslationTargetLanguage:e}=V.settings;if(e)return e}return Cl()}const bi=["byte","kilobyte","megabyte","gigabyte","terabyte","petabyte"];function jf(t){const e=Math.min(Math.floor(Math.log2(t)/10),bi.length-1),n=t/1024**e;return kt.number(n,{style:"unit",unit:bi[e],unitDisplay:"narrow",maximumFractionDigits:0})}const Sl={"@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"},Ir=/pixelfed/i,re=/^(?!.*pixelfed).*$/i,kl=/pleroma/i,xl=/akkoma/i;const Ei={"@mastodon/lists":re,"@mastodon/filters":re,"@mastodon/mentions":re,"@mastodon/trending-hashtags":re,"@mastodon/trending-links":re,"@mastodon/post-bookmark":re,"@mastodon/post-edit":re,"@mastodon/profile-edit":re,"@mastodon/profile-private-note":re,"@pixelfed/trending":Ir,"@pixelfed/home-include-reblogs":Ir,"@pixelfed/global-feed":Ir,"@pleroma/local-visibility-post":kl,"@akkoma/local-visibility-post":xl},Zn={};function qn(t){var e,n;try{let{version:r,domain:i}=$a(),a=((n=(e=Fa())==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(Ei[t])return Zn[s]=Ei[t].test(r);const c=Sl[t];if(!c)return!1;const u=t.match(/^@([a-z]+)\//)[1]===a.toLowerCase();return Zn[s]=u&&Na(r,c,{includePrerelease:!0,loose:!0})}catch{return!1}}const He=2147483647,Xt=36,Do=1,Sn=26,Il=38,Dl=700,Rs=72,Ms=128,Ps="-",Ll=/^xn--/,Rl=/[^\0-\x7F]/,Ml=/[\x2E\u3002\uFF0E\uFF61]/g,Pl={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Dr=Xt-Do,Qt=Math.floor,Lr=String.fromCharCode;function me(t){throw new RangeError(Pl[t])}function Ol(t,e){const n=[];let r=t.length;for(;r--;)n[r]=e(t[r]);return n}function Os(t,e){const n=t.split("@");let r="";n.length>1&&(r=n[0]+"@",t=n[1]),t=t.replace(Ml,".");const i=t.split("."),a=Ol(i,e).join(".");return r+a}function $s(t){const e=[];let n=0;const r=t.length;for(;n<r;){const i=t.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){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 $l=t=>String.fromCodePoint(...t),Fl=function(t){return t>=48&&t<58?26+(t-48):t>=65&&t<91?t-65:t>=97&&t<123?t-97:Xt},wi=function(t,e){return t+22+75*(t<26)-((e!=0)<<5)},Fs=function(t,e,n){let r=0;for(t=n?Qt(t/Dl):t>>1,t+=Qt(t/e);t>Dr*Sn>>1;r+=Xt)t=Qt(t/Dr);return Qt(r+(Dr+1)*t/(t+Il))},Ns=function(t){const e=[],n=t.length;let r=0,i=Ms,a=Rs,s=t.lastIndexOf(Ps);s<0&&(s=0);for(let c=0;c<s;++c)t.charCodeAt(c)>=128&&me("not-basic"),e.push(t.charCodeAt(c));for(let c=s>0?s+1:0;c<n;){const l=r;for(let f=1,h=Xt;;h+=Xt){c>=n&&me("invalid-input");const m=Fl(t.charCodeAt(c++));m>=Xt&&me("invalid-input"),m>Qt((He-r)/f)&&me("overflow"),r+=m*f;const d=h<=a?Do:h>=a+Sn?Sn:h-a;if(m<d)break;const p=Xt-d;f>Qt(He/p)&&me("overflow"),f*=p}const u=e.length+1;a=Fs(r-l,u,l==0),Qt(r/u)>He-i&&me("overflow"),i+=Qt(r/u),r%=u,e.splice(r++,0,i)}return String.fromCodePoint(...e)},Bs=function(t){const e=[];t=$s(t);const n=t.length;let r=Ms,i=0,a=Rs;for(const l of t)l<128&&e.push(Lr(l));const s=e.length;let c=s;for(s&&e.push(Ps);c<n;){let l=He;for(const f of t)f>=r&&f<l&&(l=f);const u=c+1;l-r>Qt((He-i)/u)&&me("overflow"),i+=(l-r)*u,r=l;for(const f of t)if(f<r&&++i>He&&me("overflow"),f===r){let h=i;for(let m=Xt;;m+=Xt){const d=m<=a?Do:m>=a+Sn?Sn:m-a;if(h<d)break;const p=h-d,v=Xt-d;e.push(Lr(wi(d+p%v,0))),h=Qt(p/v)}e.push(Lr(wi(h,0))),a=Fs(i,u,c===s),i=0,++c}++i,++r}return e.join("")},Nl=function(t){return Os(t,function(e){return Ll.test(e)?Ns(e.slice(4).toLowerCase()):e})},Bl=function(t){return Os(t,function(e){return Rl.test(e)?"xn--"+Bs(e):e})},zs={version:"2.3.1",ucs2:{decode:$s,encode:$l},decode:Ns,encode:Bs,toASCII:Bl,toUnicode:Nl};function lo(t,e=[]){return t?(!e.length||t.indexOf(":")===-1||e.forEach(n=>{const{shortcode:r,staticUrl:i,url:a}=n;t=t.replace(new RegExp(`:${r}:`,"g"),`<picture><source srcset="${i}" media="(prefers-reduced-motion: reduce)"></source><img class="shortcode-emoji emoji" src="${a}" alt=":${r}:" width="16" height="16" loading="lazy" decoding="async" fetchPriority="low" /></picture>`)}),t):""}const $e=document.createElement("div"),zl=["u-url","mention","hashtag"],Vl=/[&<>]/g;function Rr(t){return t.replace(Vl,e=>({"&":"&","<":"<",">":">"})[e])}const Hl=/<a/i,Ul=/^https?:\/\//i,jl=/^@[^@]+(@[^@]+)?$/,Kl=/^#[^#]+$/,Wl=/^```[^]+```$/,Zl=/^```/,ql=/```$/,Gl=/`[^`]+`/,Yl=/(twitter|x)\.com/i,Xl=/@[a-zA-Z0-9_]+@(twitter|x)\.com/,Ql=/(@([a-zA-Z0-9_]+)@(twitter|x)\.com)/g,Jl=/(`[^]+?`)/g;function tu(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 eu(t,e={}){var f,h;const{emojis:n,returnDOM:r,postEnhanceDOM:i=()=>{}}=e;let a=t;const s=tu(a,r),c=Hl.test(a),l=a.includes("```");if(c){const m=s.querySelectorAll('a:not([target="_blank"])');for(const p of m)p.setAttribute("target","_blank");const d=s.querySelectorAll("a[class]");for(const p of d)for(const v of p.classList)zl.includes(v)||p.classList.remove(v)}if(c){const m=s.querySelectorAll("a[href]");for(const d of m)Ul.test(d.textContent.trim())&&(d.classList.add("has-url-text"),iu(d))}if(c){const m=s.querySelectorAll("a[href]"),d=[];for(const p of m){const v=p.innerText.trim(),y=p.querySelector("*");if(jl.test(v)){const[E,b,w]=v.split("@");y||(!d.some(([k])=>k===b)||d.some(([k,g])=>k===b&&g===w)?(p.innerHTML=`@<span>${b}</span>`,d.push([b,w])):p.innerHTML=`@<span>${b}@${w}</span>`),p.classList.add("mention")}Kl.test(v)&&(y||(p.innerHTML=`#<span>${v.slice(1)}</span>`),p.classList.add("mention","hashtag"))}}let u;if(a.includes(":")&&(n!=null&&n.length)){u=Pr(s);for(const m of u){let d=Rr(m.nodeValue);d=lo(d,n),$e.innerHTML=d,m.replaceWith(...$e.childNodes)}}if(l){const m=[...s.querySelectorAll("p")].filter(d=>Wl.test(d.innerText.trim()));for(const d of m){const p=document.createElement("pre");for(const v of d.querySelectorAll("br"))v.replaceWith(`
|
||
`);p.innerHTML=`<code>${d.innerHTML.trim()}</code>`,d.replaceWith(p)}}if(l){const d=[...s.querySelectorAll("p")].filter(p=>Zl.test(p.innerText));for(const p of d){const v=[p];let y=!1,E=p;for(;E.nextElementSibling;){const b=E.nextElementSibling;if(b&&b.tagName==="P")if(ql.test(b.innerText)){v.push(b),y=!0;break}else v.push(b);else break;E=b}if(y){const b=document.createElement("pre");for(const k of v)for(const g of k.querySelectorAll("br"))g.replaceWith(`
|
||
`);const w=v.map(k=>k.innerHTML).join(`
|
||
|
||
`);b.innerHTML=`<code tabindex="0">${w}</code>`,p.replaceWith(b);for(const k of v)k.remove()}}}if(a.includes("`")){u=Pr(s);for(const m of u){let d=Rr(m.nodeValue);Gl.test(d)&&(d=d.replaceAll(Jl,"<code>$1</code>")),$e.innerHTML=d,m.replaceWith(...$e.childNodes)}}if(Yl.test(a)){u=Pr(s,{rejectFilter:["A"]});for(const m of u){let d=Rr(m.nodeValue);Xl.test(d)&&(d=d.replaceAll(Ql,'<a href="https://twitter.com/$2" rel="nofollow noopener" target="_blank">$1</a>')),$e.innerHTML=d,m.replaceWith(...$e.childNodes)}}if(a.includes("#")){let m=null;const d=[...s.querySelectorAll("p")].filter((p,v)=>{let y=0;for(let E=0;E<p.childNodes.length;E++){const b=p.childNodes[E];if(b.nodeType===Node.TEXT_NODE){if(b.textContent.trim()!=="")return!1}else if(b.tagName!=="BR")if(b.tagName==="A"){const w=b.textContent.trim();if(!w||!w.startsWith("#"))return!1;y++}else return!1}if(y>3||y>1&&m&&v===m+1)return m=v,!0});if(d!=null&&d.length)for(const p of d)p.classList.add("hashtag-stuffing"),p.title=p.innerText}if(a.includes("<img")){const m=s.querySelectorAll("img");for(let d=0;d<m.length;d++){const p=m[d],v=p.getAttribute("width")||p.naturalWidth,y=p.getAttribute("height")||p.naturalHeight;v&&y&&p.style.setProperty("--original-aspect-ratio",`${v}/${y}`)}}for(const m of s.childNodes)if(m.nodeType===Node.TEXT_NODE&&((h=(f=m.textContent).trim)!=null&&h.call(f))){const d=document.createElement("span");d.textContent=m.textContent,s.replaceChild(d,m)}return i&&queueMicrotask(()=>i(s)),r?s:s.innerHTML}const Vs=Rt(eu),nu=["STYLE","IMG","VIDEO","AUDIO","AREA","MAP","TRACK","EMBED","IFRAME","OBJECT","PICTURE","PORTAL","SOURCE","SVG","MATH","CANVAS","NOSCRIPT","SCRIPT","INPUT","OPTION","TEXTAREA","SLOT","TEMPLATE"],ru=Object.fromEntries(nu.map(t=>[t,!0])),ou=/^(https?:\/\/(www\.)?|xmpp:)/,Mr=30;function iu(t){var e;if(!(!t||(e=t.querySelector)!=null&&e.call(t,"*")))try{const n=t.innerText.trim(),r=(n.match(ou)||[])[0]||"";if(!r)return;const i=n.slice(r.length,r.length+Mr),a=n.slice(r.length+Mr),s=n.slice(r.length).length>Mr;t.innerHTML=`<span class="invisible">${r}</span><span class=${s?"ellipsis":""}>${i}</span><span class="invisible">${a}</span>`}catch{}}function Pr(t,e={}){var s;const n=[],r=Object.assign({},ru,(s=e.rejectFilter)==null?void 0:s.reduce((c,l)=>(c[l]=!0,c),{})),i=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,{acceptNode(c){return r[c.parentNode.nodeName]?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}},!1);let a;for(;a=i.nextNode();)n.push(a);return n}function su(t){const{mentions:e=[],instance:n,previewMode:r,statusURL:i}=t||{};return a=>{var f,h;let{target:s}=a;if(s=s.closest("a"),!s||a.metaKey||a.ctrlKey||a.shiftKey||a.altKey||a.which===2)return;const c=(f=s.previousSibling)==null?void 0:f.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 m=(s.querySelector("span")||s).innerText.trim(),d=m.replace(/^@/,""),p=s.getAttribute("href"),v=e.find(y=>y.url===p)||e.find(y=>y.acct===d||y.username===d);if(v)a.preventDefault(),a.stopPropagation(),V.showAccount={account:v.acct,instance:n};else if(!/^http/i.test(m)){a.preventDefault(),a.stopPropagation();const y=s.getAttribute("href");V.showAccount={account:y,instance:n}}}else if(!r){const m=c==null?void 0:c.endsWith("#");if(s.classList.contains("hashtag")||m){a.preventDefault(),a.stopPropagation();const d=s.innerText.replace(/^#/,"").trim(),p=n?`#/${n}/t/${d}`:`#/t/${d}`;location.hash=p}else(h=V.unfurledLinks[s.href])!=null&&h.url&&i!==s.href&&(a.preventDefault(),a.stopPropagation(),V.prevLocation={pathname:location.hash.replace(/^#/,"")},location.hash=`#${V.unfurledLinks[s.href].url}`)}}}function Kf(t,e){return()=>kt.number(t,{style:"unit",unit:e,unitDisplay:"long"})}function oe(t){try{return kt.number(t,{notation:"compact",roundingMode:"floor"})}catch{return t}}function Wf({skeleton:t,account:e,avatarSize:n="xl",useAvatarStatic:r=!1,instance:i,external:a,internal:s,onClick:c,showActivity:l=!1,showStats:u=!1,accountInstance:f,hideDisplayName:h=!1,relationship:m={},excludeRelationshipAttrs:d=[]}){const{_:p}=ne();if(t)return o("div",{class:"account-block skeleton",children:[o(ae,{size:n}),o("span",{children:[o("b",{children:"████████"}),o("br",{}),o("span",{class:"account-block-acct",children:"██████"})]})]});if(!e)return null;const{id:v,acct:y,avatar:E,avatarStatic:b,displayName:w,username:k,emojis:g,url:A,statusesCount:T,lastStatusAt:D,bot:M,fields:L,note:C,group:x,followersCount:F,createdAt:W,locked:j}=e;let[et,st,ot]=y.match(/([^@]+)(@.+)/i)||[,y];f&&(ot=`@${f}`);const nt=L==null?void 0:L.find(ht=>!!ht.verifiedAt&&!!ht.value),J={};for(const ht in m)d.includes(ht)||(J[ht]=m[ht]);const vt=J.following||J.followedBy||J.requested;return o("a",{class:"account-block",href:A,target:a?"_blank":null,title:ot?y:`@${y}`,onClick:ht=>{if(!a){if(ht.preventDefault(),c)return c(ht);s?location.hash=`/${i}/a/${v}`:V.showAccount={account:e,instance:i}}},children:[o("div",{class:"avatar-container",children:o(ae,{url:r?b:E||b,size:n,squircle:M})}),o("span",{class:"account-block-content",children:[!h&&o($,{children:w?o("b",{children:o(Ze,{text:w,emojis:g})}):o("b",{children:k})})," ",o("span",{class:"account-block-acct bidi-isolate",children:[ot?"":"@",st,o("wbr",{}),ot,j&&o($,{children:[" ",o(R,{icon:"lock",size:"s",alt:p({id:"G2fuEb"})})]})]}),l&&o("div",{class:"account-block-stats",children:[o(P,{id:"ajzDof",values:{0:oe(T)}}),!!D&&o($,{children:[" ","·"," ",o(P,{id:"f8bJ3C",values:{0:Cn(D,{hideTime:!0})}})]})]}),u&&o("div",{class:"account-block-stats",children:[M&&o($,{children:o("span",{class:"tag collapsed",children:[o(R,{icon:"bot"})," ",o(P,{id:"9Vdq+j"})]})}),!!x&&o($,{children:o("span",{class:"tag collapsed",children:[o(R,{icon:"group"})," ",o(P,{id:"L8fEEm"})]})}),vt&&o("div",{class:"shazam-container-horizontal",children:o("div",{class:"shazam-container-inner",children:J.following&&J.followedBy?o("span",{class:"tag minimal",children:o(P,{id:"7oRLbi"})}):J.requested?o("span",{class:"tag minimal",children:o(P,{id:"Yx0Ud8"})}):J.following?o("span",{class:"tag minimal",children:o(P,{id:"y6sq5j"})}):J.followedBy?o("span",{class:"tag minimal",children:o(P,{id:"p3UO/y"})}):null})},m.id),!!F&&o("span",{class:"ib",children:o(P,{id:"Mn1E9C",values:{followersCount:F}})}),!!nt&&o("span",{class:"verified-field",children:[o(R,{icon:"check-circle",size:"s",alt:p({id:"QDEWii"})})," ",o("span",{dangerouslySetInnerHTML:{__html:Vs(nt.value,{emojis:g})}})]}),!M&&!x&&!vt&&!F&&!nt&&!!W&&o("span",{class:"created-at",children:o(P,{id:"PCcEFZ",values:{0:Cn(W,{hideTime:!0})},components:{0:o("time",{datetime:W})}})})]})]})]})}var Or={},$r,Ti;function au(){if(Ti)return $r;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 $r=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 r=this._timeouts.shift();if(r===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),r=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)},r),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 r=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){r._operationTimeoutCb()},r._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,r=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>=r&&(n=a,r=c)}return n},$r}var Ai;function cu(){return Ai||(Ai=1,function(t){var e=au();t.operation=function(n){var r=t.timeouts(n);return new e(r,{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 r={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var i in n)r[i]=n[i];if(r.minTimeout>r.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var a=[],s=0;s<r.retries;s++)a.push(this.createTimeout(s,r));return n&&n.forever&&!a.length&&a.push(this.createTimeout(s,r)),a.sort(function(c,l){return c-l}),a},t.createTimeout=function(n,r){var i=r.randomize?Math.random()+1:1,a=Math.round(i*Math.max(r.minTimeout,1)*Math.pow(r.factor,n));return a=Math.min(a,r.maxTimeout),a},t.wrap=function(n,r,i){if(r instanceof Array&&(i=r,r=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(f){var h=t.operation(r),m=Array.prototype.slice.call(arguments,1),d=m.pop();m.push(function(p){h.retry(p)||(p&&(arguments[0]=h.mainError()),d.apply(this,arguments))}),h.attempt(function(){f.apply(n,m)})}).bind(n,l),n[c].options=r}}}(Or)),Or}var Fr,Ci;function lu(){return Ci||(Ci=1,Fr=cu()),Fr}var uu=lu();const du=bo(uu),fu=Object.prototype.toString,hu=t=>fu.call(t)==="[object Error]",mu=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 pu(t){return t&&hu(t)&&t.name==="TypeError"&&typeof t.message=="string"?t.message==="Load failed"?t.stack===void 0:mu.has(t.message):!1}class gu 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 Si=(t,e,n)=>{const r=n.retries-(e-1);return t.attemptNumber=e,t.retriesLeft=r,t};async function vu(t,e){return new Promise((n,r)=>{e={...e},e.onFailedAttempt??(e.onFailedAttempt=()=>{}),e.shouldRetry??(e.shouldRetry=()=>!0),e.retries??(e.retries=10);const i=du.operation(e),a=()=>{var c;i.stop(),r((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 gu)throw l.originalError;if(l instanceof TypeError&&!pu(l))throw l;if(Si(l,c,e),await e.shouldRetry(l)||(i.stop(),r(l)),await e.onFailedAttempt(l),!i.retry(l))throw i.mainError()}catch(u){Si(u,c,e),s(),r(u)}}})})}const _u=[{code:"auto",name:"Detect"},{code:"af",name:"Afrikaans"},{code:"sq",name:"Albanian"},{code:"am",name:"Amharic"},{code:"ar",name:"Arabic"},{code:"hy",name:"Armenian"},{code:"as",name:"Assamese"},{code:"ay",name:"Aymara"},{code:"az",name:"Azerbaijani"},{code:"bm",name:"Bambara"},{code:"eu",name:"Basque"},{code:"be",name:"Belarusian"},{code:"bn",name:"Bengali"},{code:"bho",name:"Bhojpuri"},{code:"bs",name:"Bosnian"},{code:"bg",name:"Bulgarian"},{code:"ca",name:"Catalan"},{code:"ceb",name:"Cebuano"},{code:"ny",name:"Chichewa"},{code:"zh",name:"Chinese"},{code:"co",name:"Corsican"},{code:"hr",name:"Croatian"},{code:"cs",name:"Czech"},{code:"da",name:"Danish"},{code:"dv",name:"Dhivehi"},{code:"doi",name:"Dogri"},{code:"nl",name:"Dutch"},{code:"en",name:"English"},{code:"eo",name:"Esperanto"},{code:"et",name:"Estonian"},{code:"ee",name:"Ewe"},{code:"tl",name:"Filipino"},{code:"fi",name:"Finnish"},{code:"fr",name:"French"},{code:"fy",name:"Frisian"},{code:"gl",name:"Galician"},{code:"ka",name:"Georgian"},{code:"de",name:"German"},{code:"el",name:"Greek"},{code:"gn",name:"Guarani"},{code:"gu",name:"Gujarati"},{code:"ht",name:"Haitian Creole"},{code:"ha",name:"Hausa"},{code:"haw",name:"Hawaiian"},{code:"iw",name:"Hebrew"},{code:"hi",name:"Hindi"},{code:"hmn",name:"Hmong"},{code:"hu",name:"Hungarian"},{code:"is",name:"Icelandic"},{code:"ig",name:"Igbo"},{code:"ilo",name:"Ilocano"},{code:"id",name:"Indonesian"},{code:"ga",name:"Irish"},{code:"it",name:"Italian"},{code:"ja",name:"Japanese"},{code:"jw",name:"Javanese"},{code:"kn",name:"Kannada"},{code:"kk",name:"Kazakh"},{code:"km",name:"Khmer"},{code:"rw",name:"Kinyarwanda"},{code:"gom",name:"Konkani"},{code:"ko",name:"Korean"},{code:"kri",name:"Krio"},{code:"ku",name:"Kurdish (Kurmanji)"},{code:"ckb",name:"Kurdish (Sorani)"},{code:"ky",name:"Kyrgyz"},{code:"lo",name:"Lao"},{code:"la",name:"Latin"},{code:"lv",name:"Latvian"},{code:"ln",name:"Lingala"},{code:"lt",name:"Lithuanian"},{code:"lg",name:"Luganda"},{code:"lb",name:"Luxembourgish"},{code:"mk",name:"Macedonian"},{code:"mai",name:"Maithili"},{code:"mg",name:"Malagasy"},{code:"ms",name:"Malay"},{code:"ml",name:"Malayalam"},{code:"mt",name:"Maltese"},{code:"mi",name:"Maori"},{code:"mr",name:"Marathi"},{code:"mni-Mtei",name:"Meiteilon (Manipuri)"},{code:"lus",name:"Mizo"},{code:"mn",name:"Mongolian"},{code:"my",name:"Myanmar (Burmese)"},{code:"ne",name:"Nepali"},{code:"no",name:"Norwegian"},{code:"or",name:"Odia (Oriya)"},{code:"om",name:"Oromo"},{code:"ps",name:"Pashto"},{code:"fa",name:"Persian"},{code:"pl",name:"Polish"},{code:"pt",name:"Portuguese"},{code:"pa",name:"Punjabi"},{code:"qu",name:"Quechua"},{code:"ro",name:"Romanian"},{code:"ru",name:"Russian"},{code:"sm",name:"Samoan"},{code:"sa",name:"Sanskrit"},{code:"gd",name:"Scots Gaelic"},{code:"nso",name:"Sepedi"},{code:"sr",name:"Serbian"},{code:"st",name:"Sesotho"},{code:"sn",name:"Shona"},{code:"sd",name:"Sindhi"},{code:"si",name:"Sinhala"},{code:"sk",name:"Slovak"},{code:"sl",name:"Slovenian"},{code:"so",name:"Somali"},{code:"es",name:"Spanish"},{code:"su",name:"Sundanese"},{code:"sw",name:"Swahili"},{code:"sv",name:"Swedish"},{code:"tg",name:"Tajik"},{code:"ta",name:"Tamil"},{code:"tt",name:"Tatar"},{code:"te",name:"Telugu"},{code:"th",name:"Thai"},{code:"ti",name:"Tigrinya"},{code:"ts",name:"Tsonga"},{code:"tr",name:"Turkish"},{code:"tk",name:"Turkmen"},{code:"ak",name:"Twi"},{code:"uk",name:"Ukrainian"},{code:"ur",name:"Urdu"},{code:"ug",name:"Uyghur"},{code:"uz",name:"Uzbek"},{code:"vi",name:"Vietnamese"},{code:"cy",name:"Welsh"},{code:"xh",name:"Xhosa"},{code:"yi",name:"Yiddish"},{code:"yo",name:"Yoruba"},{code:"zu",name:"Zulu"}],Hs="ai"in self&&"translator"in self.ai;let Ue;Hs&&(async()=>{try{const e=(await self.ai.languageDetector.capabilities()).capabilities;e==="readily"?Ue=await self.ai.languageDetector.create():(Ue=await self.ai.languageDetector.create({monitor(n){n.addEventListener("downloadprogress",r=>{})}}),await Ue.ready)}catch{}})();const yu=async(t,e,n)=>{let r;const i=e;if(e==="auto")try{e=(await Ue.detect(t))[0].detectedLanguage,r=e}catch(a){return{error:a}}console.groupCollapsed("💬 BROWSER TRANSLATE",i,r,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",f=>{})}});const l=await c.translate(t);return console.groupEnd(),{content:l,detectedSourceLanguage:r,provider:"browser"}}catch(a){return console.groupEnd(),{error:a}}};var bu=Object.defineProperty,Eu=(t,e,n)=>e in t?bu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Gn=(t,e,n)=>Eu(t,typeof e!="symbol"?e+"":e,n),uo=new Map,Yn=new WeakMap,ki=0,wu=void 0;function Tu(t){return t?(Yn.has(t)||(ki+=1,Yn.set(t,ki.toString())),Yn.get(t)):"0"}function Au(t){return Object.keys(t).sort().filter(e=>t[e]!==void 0).map(e=>`${e}_${e==="root"?Tu(t.root):t[e]}`).toString()}function Cu(t){const e=Au(t);let n=uo.get(e);if(!n){const r=new Map;let i;const a=new IntersectionObserver(s=>{s.forEach(c=>{var l;const u=c.isIntersecting&&i.some(f=>c.intersectionRatio>=f);t.trackVisibility&&typeof c.isVisible>"u"&&(c.isVisible=u),(l=r.get(c.target))==null||l.forEach(f=>{f(u,c)})})},t);i=a.thresholds||(Array.isArray(t.threshold)?t.threshold:[t.threshold||0]),n={id:e,observer:a,elements:r},uo.set(e,n)}return n}function Us(t,e,n={},r=wu){if(typeof window.IntersectionObserver>"u"&&r!==void 0){const l=t.getBoundingClientRect();return e(r,{isIntersecting:r,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}=Cu(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(),uo.delete(i))}}function Su(t){return typeof t.children!="function"}var Zf=class extends ns{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(),Su(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:r,delay:i,fallbackInView:a}=this.props;this._unobserveCb=Us(this.node,this.handleChange,{threshold:t,root:e,rootMargin:n,trackVisibility:r,delay:i},a)}unobserve(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)}render(){const{children:t}=this.props;if(typeof t=="function"){const{inView:d,entry:p}=this.state;return t({inView:d,entry:p,ref:this.handleNode})}const{as:e,triggerOnce:n,threshold:r,root:i,rootMargin:a,onChange:s,skip:c,trackVisibility:l,delay:u,initialInView:f,fallbackInView:h,...m}=this.props;return Ba(e||"div",{ref:this.handleNode,...m},t)}};function ku({threshold:t,delay:e,trackVisibility:n,rootMargin:r,root:i,triggerOnce:a,skip:s,initialInView:c,fallbackInView:l,onChange:u}={}){var f;const[h,m]=H(null),d=O(u),[p,v]=H({inView:!!c,entry:void 0});d.current=u,tt(()=>{if(s||!h)return;let w;return w=Us(h,(k,g)=>{v({inView:k,entry:g}),d.current&&d.current(k,g),g.isIntersecting&&a&&w&&(w(),w=void 0)},{root:i,rootMargin:r,threshold:t,trackVisibility:n,delay:e},l),()=>{w&&w()}},[Array.isArray(t)?t.toString():t,h,i,r,a,s,n,l,e]);const y=(f=p.entry)==null?void 0:f.target,E=O(void 0);!h&&y&&!a&&!s&&E.current!==y&&(E.current=y,v({inView:!!c,entry:void 0}));const b=[m,p.inView,p.entry];return b.ref=b[0],b.inView=b[1],b.entry=b[2],b}const xi=48,Nr={};function js({id:t,children:e}){const n=O(),r=!!Nr[t],[i,a]=H(!1),[s,c]=H(r||!1),{ref:l}=ku({root:null,rootMargin:`-${xi}px 0px 0px 0px`,trackVisibility:!0,delay:1e3,onChange:u=>{u&&(a(!0),t&&(Nr[t]=!0))},triggerOnce:!0,skip:s||i});return tt(()=>{if(!n.current)return;const u=n.current.getBoundingClientRect();u.bottom>xi&&(u.top<window.innerHeight?a(!0):c(!0),t&&(Nr[t]=!0))},[]),s?e:o("div",{ref:n,class:"shazam-container no-animation",hidden:!i,children:o("div",{ref:l,class:"shazam-container-inner",children:e})})}const xu={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_WEBSITE:"https://phanpy.social",PROD:!0,SSR:!1,VITE_APP_ENV:"production"},{PHANPY_LINGVA_INSTANCES:Ii}=xu,_n=Ii?Ii.split(/\s+/):[],Iu=rs({limit:1,interval:2e3});let Br=0;function Du(t,e,n){return vu(()=>{let i=_n[Br];return fetch(`https://${i}/api/v1/${e}/${n}/${encodeURIComponent(t)}`).then(a=>{if(!a.ok)throw new Error(a.statusText);return a.json()}).then(a=>{var s;return{provider:"lingva",content:a.translation,detectedSourceLanguage:(s=a.info)==null?void 0:s.detectedSource,info:a.info}})},{retries:3,onFailedAttempt:i=>{Br=(Br+1)%_n.length}})}const Ks=1e3*60*60,Ws=hr(Du,{maxAge:Ks}),Lu=hr(Iu(Ws),{maxAge:Ks});function Ru({forceTranslate:t,sourceLanguage:e,onTranslate:n,text:r="",mini:i,autoDetected:a}){const{_:s}=ne(),c=Ls(!0),[l,u]=H("default"),[f,h]=H(null),[m,d]=H(null),[p,v]=H(null),y=O(),E=e?un(e):null,b=un(c),w=O("auto");n||(n=async(...g)=>{if(Hs){const A=await yu(...g);if(A&&!A.error)return A}return i?await Lu(...g):await Ws(...g)});const k=async()=>{var g,A;u("loading");try{const{content:T,detectedSourceLanguage:D,provider:M,error:L,...C}=await n(r,w.current,c);if(T){if(D){const x=un(D);v(x)}if(M==="lingva"){const x=(A=(g=C==null?void 0:C.info)==null?void 0:g.pronunciation)==null?void 0:A.query;x&&h(x)}d(T),u("default"),!i&&T.trim()!==r.trim()&&(y.current.open=!0,y.current.scrollIntoView({behavior:"smooth",block:"nearest"}))}else u("error")}catch{u("error")}};return tt(()=>{t&&k()},[t]),i?m&&m.trim()!==r.trim()&&p!==b?o(js,{children:o("div",{class:"status-translation-block-mini",children:[o(R,{icon:"translate",alt:s({id:"zVJKbG",values:{sourceLangText:E}})}),o("output",{lang:c,dir:"auto",title:f||"",children:m})]})}):null:o("div",{class:"status-translation-block",onClick:g=>{g.preventDefault()},children:o("details",{ref:y,children:[o("summary",{children:o("button",{type:"button",onClick:async g=>{g.preventDefault(),g.stopPropagation(),y.current.open=!y.current.open,l!=="loading"&&(m||k())},children:[o(R,{icon:"translate"})," ",o("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"})})]})}),o("div",{class:"translated-block",children:[o("div",{class:"translation-info insignificant",children:[o("select",{class:"translated-source-select",disabled:l==="loading",onChange:g=>{w.current=g.target.value,k()},children:_u.map(g=>{const A=un({code:g.code,fallback:g.name}),T=un({code:g.code,locale:g.code}),D=A!==T;return o("option",{value:g.code,children:g.code==="auto"?s({id:"Bze3gr",values:{0:p??"…"}}):D?`${T} - ${A}`:T})})})," ",o("span",{children:["→ ",b]}),o(os,{abrupt:!0,hidden:l!=="loading"})]}),l==="error"?o("p",{class:"ui-state",children:o(P,{id:"m5LihO"})}):!!m&&o($,{children:[o("output",{class:"translated-content",lang:c,dir:"auto",children:m}),!!f&&o("output",{class:"translated-pronunciation-content",tabIndex:-1,onClick:g=>{g.target.classList.toggle("expand")},children:f})]})]})]})})}const Mu=_n!=null&&_n.length?Ru:()=>null;function ue(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 r=ue(n);return(i,a)=>r.then(s=>a(s.transaction(e,i).objectStore(e)))}let zr;function De(){return zr||(zr=Zs("keyval-store","keyval")),zr}function Pu(t,e=De()){return e("readonly",n=>ue(n.get(t)))}function Ou(t,e,n=De()){return n("readwrite",r=>(r.put(e,t),ue(r.transaction)))}function $u(t,e=De()){return e("readonly",n=>Promise.all(t.map(r=>ue(n.get(r)))))}function Fu(t,e=De()){return e("readwrite",n=>(n.delete(t),ue(n.transaction)))}function Nu(t,e=De()){return e("readwrite",n=>(t.forEach(r=>n.delete(r)),ue(n.transaction)))}function Bu(t=De()){return t("readwrite",e=>(e.clear(),ue(e.transaction)))}function zu(t,e){return t.openCursor().onsuccess=function(){this.result&&(e(this.result),this.result.continue())},ue(t.transaction)}function Vu(t=De()){return t("readonly",e=>{if(e.getAllKeys)return ue(e.getAllKeys());const n=[];return zu(e,r=>n.push(r.key)).then(()=>n)})}function Di(t,e){const n=Zs(t,e);return{set:(r,i)=>Ou(r,i,n),get:r=>Pu(r,n),getMany:r=>$u(r,n),del:r=>Fu(r,n),delMany:r=>Nu(r,n),clear:()=>Bu(n),keys:()=>Vu(n)}}const qf={drafts:Di("drafts-db","drafts-store"),catchup:Di("catchup-db","catchup-store")};async function Gf(t,e={}){if(!(t!=null&&t.length))return;const{masto:n}=sr(),r=Eo(),i=t.reduce((a,s)=>(!a.includes(s.id)&&!e[s.id]&&s.id!==r&&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 Vt extends HTMLElement{constructor(){super(),this.isIframeLoaded=!1,this.setupDom()}static get observedAttributes(){return["videoid","playlistid","videoplay","videotitle"]}connectedCallback(){this.addEventListener("pointerover",()=>Vt.warmConnections(this),{once:!0}),this.addEventListener("click",()=>this.addIframe())}get videoId(){return encodeURIComponent(this.getAttribute("videoid")||"")}set videoId(e){this.setAttribute("videoid",e)}get playlistId(){return encodeURIComponent(this.getAttribute("playlistid")||"")}set playlistId(e){this.setAttribute("playlistid",e)}get videoTitle(){return this.getAttribute("videotitle")||"Video"}set videoTitle(e){this.setAttribute("videotitle",e)}get videoPlay(){return this.getAttribute("videoplay")||"Play"}set videoPlay(e){this.setAttribute("videoplay",e)}get videoStartAt(){return this.getAttribute("videoStartAt")||"0"}get autoLoad(){return this.hasAttribute("autoload")}get autoPause(){return this.hasAttribute("autopause")}get noCookie(){return this.hasAttribute("nocookie")}get posterQuality(){return this.getAttribute("posterquality")||"hqdefault"}get posterLoading(){return this.getAttribute("posterloading")||"lazy"}get params(){return`start=${this.videoStartAt}&${this.getAttribute("params")}`}set params(e){this.setAttribute("params",e)}set posterQuality(e){this.setAttribute("posterquality",e)}get disableNoscript(){return this.hasAttribute("disablenoscript")}setupDom(){const e=this.attachShadow({mode:"open"});let n="";window.liteYouTubeNonce&&(n=`nonce="${window.liteYouTubeNonce}"`),e.innerHTML=`
|
||
<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,r){n!==r&&(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 r=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${r}.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 r=>{const i=r.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((r,i)=>{r.forEach(a=>{a.isIntersecting&&!this.isIframeLoaded&&(Vt.warmConnections(this),this.addIframe(!0),i.unobserve(this))})},e).observe(this),this.autoPause&&new IntersectionObserver((i,a)=>{i.forEach(s=>{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 r=document.createElement("link");r.rel=e,r.href=n,r.crossOrigin="true",document.head.append(r)}static warmConnections(e){Vt.isPreconnected||window.liteYouTubeIsPreconnected||(Vt.addPrefetch("preconnect","https://i.ytimg.com/"),Vt.addPrefetch("preconnect","https://s.ytimg.com"),e.noCookie?Vt.addPrefetch("preconnect","https://www.youtube-nocookie.com"):(Vt.addPrefetch("preconnect","https://www.youtube.com"),Vt.addPrefetch("preconnect","https://www.google.com"),Vt.addPrefetch("preconnect","https://googleads.g.doubleclick.net"),Vt.addPrefetch("preconnect","https://static.doubleclick.net")),Vt.isPreconnected=!0,window.liteYouTubeIsPreconnected=!0)}}Vt.isPreconnected=!1;customElements.define("lite-youtube",Vt);const qs=new Uint8Array(128);for(let t=0;t<83;t++)qs["0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz#$%*+,-.:;=?@[]^_{|}~".charCodeAt(t)]=t;const rr=(t,e,n)=>{let r=0;for(;e<n;)r*=83,r+=qs[t.charCodeAt(e++)];return r},Gs=Math.pow,kn=Math.PI,Hu=kn*2,Ys=3294.6,Xs=269.025,Uu=t=>t>10.31475?Gs(t/Xs+.052132,2.4):t/Ys,Vr=t=>~~(t>1227e-8?Xs*Gs(t,.416666)-13.025:t*Ys+1),yn=t=>(t<0?-1:1)*t*t,Li=t=>{for(t+=kn/2;t>kn;)t-=Hu;const e=1.27323954*t-.405284735*yn(t);return .225*(yn(e)-e)+e};function Lo(t){const e=rr(t,2,6);return[e>>16,e>>8&255,e&255]}function ju(t,e,n,r){const i=rr(t,0,1),a=i%9+1,s=~~(i/9)+1,c=a*s;let l=0,u=0,f=0,h=0,m=0,d=0,p=0,v=0,y=0,E=0,b=0,w=0;const k=(rr(t,1,2)+1)/13446*(r|1),g=new Float64Array(c*3),A=Lo(t);for(l=0;l<3;l++)g[l]=Uu(A[l]);for(l=1;l<c;l++)w=rr(t,4+l*2,6+l*2),g[l*3]=yn(~~(w/361)-9)*k,g[l*3+1]=yn(~~(w/19)%19-9)*k,g[l*3+2]=yn(w%19-9)*k;const T=new Float64Array(s*n),D=new Float64Array(a*e);for(u=0;u<s;u++)for(h=0;h<n;h++)T[u*n+h]=Li(kn*h*u/n);for(l=0;l<a;l++)for(f=0;f<e;f++)D[l*e+f]=Li(kn*f*l/e);const M=e*4,L=new Uint8ClampedArray(M*n);for(h=0;h<n;h++)for(f=0;f<e;f++){for(m=d=p=0,u=0;u<s;u++)for(y=T[u*n+h],l=0;l<a;l++)v=D[l*e+f]*y,E=(l+u*a)*3,m+=g[E]*v,d+=g[E+1]*v,p+=g[E+2]*v;b=4*f+h*M,L[b]=Vr(m),L[b+1]=Vr(d),L[b+2]=Vr(p),L[b+3]=255}return L}var Hr,Ri;function Ku(){return Ri||(Ri=1,Hr=(e,n={})=>{const r=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 f=[`${r.repeat(a?a*i:0)}${l}`,...c];return l.substring(0,2)==="</"&&(a++,s[a]=l.substring(2,l.length-1)),f},[]).join(`
|
||
`)}),Hr}var Ur,Mi;function Wu(){if(Mi)return Ur;Mi=1;const t=n=>n.trim().replace(/(^(\s|\t)+|(( |\t)+)$)/gm,"");return Ur={mergeAttributesWithElements:n=>{const r=t(n).split(`
|
||
`),i=[];let a="";for(let s=0;s<r.length;s+=1){const c=r[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},Ur}var jr,Pi;function Zu(){if(Pi)return jr;Pi=1;const t=Ku(),{mergeAttributesWithElements:e}=Wu();return jr=(r,i={})=>{const a=e(r);return t(a,i)},jr}var qu=Zu();const Gu=bo(qu);function Yu({poll:t,lang:e,readOnly:n,refresh:r=()=>{},votePoll:i=()=>{}}){const{_:a}=ne(),[s,c]=H("default"),{expired:l,expiresAt:u,id:f,multiple:h,options:m,ownVotes:d,voted:p,votersCount:v,votesCount:y=0,emojis:E}=t,b=!!u&&new Date(u),w=h?v:y;let k=0;w<=1e3?k=0:w<=1e4?k=1:w<=1e5&&(k=2);const[g,A]=H(!1),T=m.every(D=>D.votesCount!==null);return o("div",{lang:e,dir:"auto",class:`poll ${n?"read-only":""} ${s==="loading"?"loading":""}`,children:[g&&T||p||l?o($,{children:[o("div",{class:"poll-options",children:m.map((D,M)=>{const{title:L,votesCount:C}=D,x=w?C/w:0,F=x?x.toLocaleString(kt.locale||void 0,{style:"percent",maximumFractionDigits:k}):"0%",W=C>0&&C===Math.max(...m.map(j=>j.votesCount));return o("div",{class:`poll-option poll-result ${W?"poll-option-leading":""}`,style:{"--percentage":`${x*100}%`},children:[o("div",{class:"poll-option-title",children:[o("span",{children:o(Ze,{text:L,emojis:E})}),p&&d.includes(M)&&o($,{children:[" ",o(R,{icon:"check-circle",alt:a({id:"IeO7us"})})]})]}),o("div",{class:"poll-option-votes",title:kt._({id:"+syLpm",values:{optionVotesCount:C}}),children:F})]},`${M}-${L}-${C}`)})}),!l&&!p&&o("button",{class:"poll-vote-button plain2",disabled:s==="loading",onClick:D=>{D.preventDefault(),A(!1)},children:[o(R,{icon:"arrow-left",size:"s"})," ",o(P,{id:"L96xSt"})]})]}):o("form",{onSubmit:async D=>{D.preventDefault();const M=D.target,L=new FormData(M),C=[];L.forEach((x,F)=>{F==="poll"&&C.push(x)}),C.length&&(c("loading"),await i(C),c("default"))},children:[o("div",{class:"poll-options",children:m.map((D,M)=>{const{title:L}=D;return o("div",{class:"poll-option",children:o("label",{class:"poll-label",children:[o("input",{type:h?"checkbox":"radio",name:"poll",value:M,disabled:s==="loading",readOnly:n}),o("span",{class:"poll-option-title",children:o(Ze,{text:L,emojis:E})})]})})})}),!n&&o("button",{class:"poll-vote-button",type:"submit",disabled:s==="loading",children:o(P,{id:"lQXQKs"})})]}),o("p",{class:"poll-meta",children:[!l&&!n&&o("button",{type:"button",class:"plain small",disabled:s==="loading",onClick:D=>{D.preventDefault(),c("loading"),(async()=>(await r(),c("default")))()},title:a({id:"lCF0wC"}),children:o(R,{icon:"refresh",alt:a({id:"lCF0wC"})})}),!p&&!l&&!n&&T&&o("button",{type:"button",class:"plain small",disabled:s==="loading",onClick:D=>{D.preventDefault(),A(!g)},title:a(g?{id:"L96xSt"}:{id:"zCjei3"}),children:[o(R,{icon:g?"eye-open":"eye-close",alt:a(g?{id:"L96xSt"}:{id:"zCjei3"})})," "]}),!l&&!n&&" ",o(P,{id:"k7v0Rh",values:{0:oe(y),1:oe(y),votesCount:y},components:{0:o("span",{title:y}),1:o("span",{title:y})}}),!!v&&v!==y&&o($,{children:[" ","•"," ",o(P,{id:"jf1i1L",values:{0:oe(v),1:oe(v),votersCount:v},components:{0:o("span",{title:v}),1:o("span",{title:v})}})]})," ","•"," ",l?b?o(P,{id:"5LwCCI",components:{0:o(se,{datetime:b})}}):a({id:"237hSL"}):b?o(P,{id:"ooHDPY",components:{0:o(se,{datetime:b})}}):a({id:"O2tNG0"})]})]})}const Qs=le();function Xu(t,e){if(!(t!=null&&t.length))return!1;const n=t.filter(a=>{const{filter:s}=a,c=s.context.includes(e);return c?s.expiresAt?new Date(s.expiresAt)>new Date:c:!1});if(!n.length)return!1;if(n.some(a=>a.filter.filterAction==="hide"))return{action:"hide"};if(n.some(a=>a.filter.filterAction==="warn")){const a=n.map(s=>s.filter.title);return{action:"warn",titles:a,titlesStr:a.join(" • ")}}return!1}const Ro=Rt(Xu);function Qu(t,e,n){var s;const{filtered:r}=t;if(!(r!=null&&r.length)||n&&((s=t.account)==null?void 0:s.id)===n)return!0;const a=Ro(r,e);return a?a.action!=="hide":!0}function Yf(t,e){if(!(t!=null&&t.length))return[];if(!e)return t;const n=Eo();return t.filter(r=>Qu(r,e,n))}const Kr=document.createElement("div");function Wr(t){return t?(Kr.innerHTML=t,Kr.querySelectorAll(".invisible").forEach(e=>{e.remove()}),Kr.innerText.length):0}const vn="speechSynthesis"in window;function Oi(t,e){if(vn)try{speechSynthesis.speaking&&speechSynthesis.cancel();const n=new SpeechSynthesisUtterance(t);e&&(n.lang=e),speechSynthesis.speak(n)}catch(n){alert(n)}}function Ju(t,e,n){var r=this,i=O(null),a=O(0),s=O(null),c=O([]),l=O(),u=O(),f=O(t),h=O(!0);f.current=t;var m=typeof window<"u",d=!e&&e!==0&&m;if(typeof t!="function")throw new TypeError("Expected a function");e=+e||0;var p=!!(n=n||{}).leading,v=!("trailing"in n)||!!n.trailing,y="maxWait"in n,E="debounceOnServer"in n&&!!n.debounceOnServer,b=y?Math.max(+n.maxWait||0,e):null;tt(function(){return h.current=!0,function(){h.current=!1}},[]);var w=it(function(){var k=function(L){var C=c.current,x=l.current;return c.current=l.current=null,a.current=L,u.current=f.current.apply(x,C)},g=function(L,C){d&&cancelAnimationFrame(s.current),s.current=d?requestAnimationFrame(L):setTimeout(L,C)},A=function(L){if(!h.current)return!1;var C=L-i.current;return!i.current||C>=e||C<0||y&&L-a.current>=b},T=function(L){return s.current=null,v&&c.current?k(L):(c.current=l.current=null,u.current)},D=function L(){var C=Date.now();if(A(C))return T(C);if(h.current){var x=e-(C-i.current),F=y?Math.min(x,b-(C-a.current)):x;g(L,F)}},M=function(){if(m||E){var L=Date.now(),C=A(L);if(c.current=[].slice.call(arguments),l.current=r,i.current=L,C){if(!s.current&&h.current)return a.current=i.current,g(D,e),p?k(i.current):u.current;if(y)return g(D,e),k(i.current)}return s.current||g(D,e),u.current}};return M.cancel=function(){s.current&&(d?cancelAnimationFrame(s.current):clearTimeout(s.current)),a.current=0,c.current=i.current=l.current=s.current=null},M.isPending=function(){return!!s.current},M.flush=function(){return s.current?T(Date.now()):u.current},M},[p,y,e,b,v,d,m,E]);return w}function td(t,e,n){var r=n===void 0?{}:n,i=r.leading,a=r.trailing;return Ju(t,e,{maxWait:e,leading:i===void 0||i,trailing:a===void 0||a})}function ed(t,e){var n=O(null),r=O(null);r.current=e;var i=O(null);tt(function(){a()});var a=At(function(){var s=i.current,c=r.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 tt(function(){return function(){n.current&&n.current.cleanup&&(n.current.cleanup(),n.current=null)}},[]),At(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 nd(t){t===void 0&&(t={});var e=t.onResize,n=O(void 0);n.current=e;var r=t.round||Math.round,i=O(),a=H({width:void 0,height:void 0}),s=a[0],c=a[1],l=O(!1);tt(function(){return l.current=!1,function(){l.current=!0}},[]);var u=O({width:void 0,height:void 0}),f=ed(At(function(h){return(!i.current||i.current.box!==t.box||i.current.round!==r)&&(i.current={box:t.box,round:r,instance:new ResizeObserver(function(m){var d=m[0],p=t.box==="border-box"?"borderBoxSize":t.box==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",v=$i(d,p,"inlineSize"),y=$i(d,p,"blockSize"),E=v?r(v):void 0,b=y?r(y):void 0;if(u.current.width!==E||u.current.height!==b){var w={width:E,height:b};u.current.width=E,u.current.height=b,n.current?n.current(w):l.current||c(w)}})}),i.current.instance.observe(h,{box:t.box}),function(){i.current&&i.current.instance.unobserve(h)}},[t.box,r]),t.ref);return it(function(){return{ref:f,width:s.width,height:s.height}},[f,s.width,s.height])}function or({className:t="truncated"}={}){const e=O(),n=td(({height:r})=>{if(e.current){const{scrollHeight:i}=e.current;let a=i>r;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 nd({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",rd=".".concat(Js,"{overflow:hidden;touch-action:none}.").concat(ta,"{transform-origin: 0 0}"),od=typeof window>"u",id=function(){return!od&&("ontouchstart"in window||navigator.maxTouchPoints>0)};var sd=function(t){var e=t.x,n=t.y,r=t.scale;return"scale3d(".concat(r,",").concat(r,", 1) translate3d(").concat(e,"px, ").concat(n,"px, 0)")};var ad=Math.min,cd=Math.max;function Fi(t){var e=t.containerDimension,n=t.childDimension,r=t.padding,i=t.centerContained,a=n-e;return a+2*r<=0&&i?[a/2,a/2]:[ad(a+r,0)-r,cd(0,a+r)]}var Ni=function(t,e){return e?"".concat(t," ").concat(e):t},Xn=Math.abs,ld=Math.min,ud=Math.sqrt,ea=typeof window>"u",dd=ea?!1:/(Mac)/i.test(navigator.platform),Fe=function(t){return t==="drag"},dn=function(t){return t==="zoom"},fd=function(t){return dd&&t.ctrlKey},fn=function(t){t.stopPropagation(),t.preventDefault()},Bi=function(t,e){var n=t.x-e.x,r=t.y-e.y;return ud(n*n+r*r)},hd=function(t,e){var n=Bi(t[0],t[1]),r=Bi(e[0],e[1]);return r/n},md=function(t,e){return t>e-.01&&t<e+.01},pd=function(t){return-Math.cos(t*Math.PI)/2+.5},gd=function(t){return{x:t.pageX,y:t.pageY}},Qn=function(t){return Array.from(t).map(gd)},zi=function(t,e){return t+e},vd=function(t){return{x:t.map(function(e){var n=e.x;return n}).reduce(zi,0)/t.length,y:t.map(function(e){var n=e.y;return n}).reduce(zi,0)/t.length}},Zr=function(t,e,n){return n<t?t:n>e?e:n},_d=function(t){return!(t.ctrlKey||t.metaKey)},yd=function(t){if(t){var e=t.offsetWidth,n=t.offsetHeight;if(e&&n)return{width:e,height:n};var r=getComputedStyle(t),i=parseFloat(r.width),a=parseFloat(r.height);if(a&&i)return{width:i,height:a}}return{width:0,height:0}},bd=function(t,e){return{x:e.x-t.x,y:e.y-t.y}},Ed=function(t,e){return t.x===e.x&&t.y===e.y},Se=function(){},Jn={x:0,y:0},Vi=function(t){za(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=Mt({},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=Mt({},Jn),n._startOffset=Mt({},Jn),n._startTouches=null,n._updatePlaned=!1,n._wheelTimeOut=null,n._zoomFactor=1,n._initialZoomFactor=1,n._draggingPoint=Mt({},Jn),n._ignoreNextClick=!1,n._containerRef=Va(),n._handleClick=function(r){n._ignoreNextClick&&(n._ignoreNextClick=!1,r.stopPropagation())},n._onResize=function(){var r;!((r=n._containerRef)===null||r===void 0)&&r.current&&(n._updateInitialZoomFactor(),n._setupOffsets(),n._update())},n._handlerOnTouchEnd=n._handlerIfEnable(function(r){n._fingers=r.touches.length,n.props.shouldCancelHandledTouchEndEvents&&(dn(n._interaction)||Fe(n._interaction)&&(n._startOffset.x!==n._offset.x||n._startOffset.y!==n._offset.y))&&fn(r),Fe(n._interaction)&&!n._enoughToDrag()&&n._handleClick(r),n._updateInteraction(r)}),n._handlerOnTouchStart=n._handlerIfEnable(function(r){n._firstMove=!0,n._fingers=r.touches.length,n._detectDoubleTap(r)}),n._handlerOnTouchMove=n._handlerIfEnable(function(r){n._isDoubleTap||(n._collectInertia(r),n._firstMove?(n._updateInteraction(r),n._interaction&&fn(r),n._startOffset=Mt({},n._offset),n._startTouches=Qn(r.touches)):(dn(n._interaction)?n._startTouches&&n._startTouches.length===2&&r.touches.length===2&&n._handleZoom(r,hd(n._startTouches,Qn(r.touches))):Fe(n._interaction)&&n._handleDrag(r),n._interaction&&(fn(r),n._update())),n._firstMove=!1)}),n._handlerWheel=function(r){if(!n.props.shouldInterceptWheel(r)){fn(r);var i=r.pageX,a=r.pageY,s=r.deltaY,c=r.deltaMode,l=1;(fd(r)||c===1)&&(l=15);var u={touches:[{pageX:i,pageY:a}]},f=n._getOffsetByFirstTouch(u),h=s*l;n._stopAnimation(),n._scaleTo(n._zoomFactor-h/n.props.wheelScaleFactor,f),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 r=this._getOffsetByFirstTouch(n);this._enoughToDrag()?this._drag(r,this._lastDragPosition):this._virtualDrag(r,this._lastDragPosition),this._offset=this._sanitizeOffset(this._offset),this._lastDragPosition=r},e.prototype._resetInertia=function(){this._velocity=null,this._prevDragMovePoint=null},e.prototype._realizeInertia=function(){var n=this,r=this.props,i=r.inertiaFriction,a=r.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 f=Mt({},n._offset);if(n._addOffset({x:c,y:l}),n._offset=n._sanitizeOffset(n._offset),Ed(f,n._offset))return n._stopAnimation();n._update({isAnimation:!0})};this._animate(u,{duration:9999})}}},e.prototype._collectInertia=function(n){var r=n.touches;if(this.props.inertia){var i=Qn(r)[0],a=this._prevDragMovePoint;a&&(this._velocity=bd(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,r){var i=vd(this._getOffsetTouches(n)),a=r/this._lastScale;this._lastScale=r,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 r=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){r._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(),r=this._getChildSize(),i=r.width,a=r.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=Mt({},this._initialOffset)},e.prototype._setupOffsets=function(){this.props.setOffsetsOnce&&this._isOffsetsSet||(this._isOffsetsSet=!0,this._computeInitialOffset(),this._resetOffset())},e.prototype._sanitizeOffset=function(n){var r=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:r.width,childDimension:c,padding:this.props.horizontalPadding,centerContained:this.props.centerContained}),f=u[0],h=u[1],m=Fi({containerDimension:r.height,childDimension:l,padding:this.props.verticalPadding,centerContained:this.props.centerContained}),d=m[0],p=m[1];return{x:Zr(f,h,n.x),y:Zr(d,p,n.y)}},e.prototype.alignCenter=function(n){var r=this,i=Mt({duration:250,animated:!0},n),a=i.x,s=i.y,c=i.scale,l=i.animated,u=i.duration,f=a*this._initialZoomFactor,h=s*this._initialZoomFactor,m=this._zoomFactor,d=Mt({},this._offset),p=this._getContainerRect(),v={x:p.width/2,y:p.height/2};if(this._zoomFactor=1,this._offset={x:-(v.x-f),y:-(v.y-h)},this._scaleTo(c,v),this._stopAnimation(),!l)return this._update();var y=this._zoomFactor-m,E={x:this._offset.x-d.x,y:this._offset.y-d.y};this._zoomFactor=m,this._offset=Mt({},d);var b=function(w){var k=d.x+E.x*w,g=d.y+E.y*w;r._zoomFactor=m+y*w,r._offset=r._sanitizeOffset({x:k,y:g}),r._update()};this._animate(b,{callback:function(){return r._sanitize()},duration:u})},e.prototype.scaleTo=function(n){var r=this,i=Mt({duration:250,animated:!0},n),a=i.x,s=i.y,c=i.scale,l=i.animated,u=i.duration,f=this._zoomFactor,h=Mt({},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 m=this._zoomFactor-f,d={x:this._offset.x-h.x,y:this._offset.y-h.y};this._zoomFactor=f,this._offset=Mt({},h);var p=function(v){var y=h.x+d.x*v,E=h.y+d.y*v;r._zoomFactor=f+m*v,r._offset={x:y,y:E},r._update()};this._animate(p,{callback:function(){return r._sanitize()},duration:u})},e.prototype._scaleTo=function(n,r){this._scale(n/this._zoomFactor,r),this._offset=this._sanitizeOffset(this._offset)},e.prototype._scale=function(n,r){n=this._scaleZoomFactor(n),this._addOffset({x:(n-1)*(r.x+this._offset.x),y:(n-1)*(r.y+this._offset.y)}),this.props.onZoomUpdate()},e.prototype._scaleZoomFactor=function(n){var r=this._zoomFactor;return this._zoomFactor*=n,this._zoomFactor=Zr(this.props.minZoom,this.props.maxZoom,this._zoomFactor),this._zoomFactor/r},e.prototype._canDrag=function(){return this.props.draggableUnZoomed||!md(this._zoomFactor,1)},e.prototype._drag=function(n,r){if(r){var i=-(n.y-r.y),a=-(n.x-r.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,r){if(r){var i=-(n.y-r.y),a=-(n.x-r.x);this._draggingPoint={x:a+this._draggingPoint.x,y:i+this._draggingPoint.y}}},e.prototype._addOffset=function(n){var r=this._offset,i=r.x,a=r.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,r=this._sanitizeOffset(n);return r.x!==n.x||r.y!==n.y},e.prototype._sanitizeOffsetAnimation=function(){var n=this,r=this._sanitizeOffset(this._offset),i=Mt({},this._offset),a=function(s){var c=i.x+s*(r.x-i.x),l=i.y+s*(r.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 r=this._zoomFactor,i=1,a=this._getCurrentZoomCenter(),s=function(c){var l=r+c*(i-r);n._scaleTo(l,a)};this._animate(s)}},e.prototype._getInitialZoomFactor=function(){return this._initialZoomFactor},e.prototype._getCurrentZoomCenter=function(){var n=this._offset,r=n.x,i=n.y,a=r-this._initialOffset.x,s=i-this._initialOffset.y;return{x:-1*r-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 r=this.props._document,i=r.documentElement,a=r.body,s=this._getContainerRect(),c=s.top,l=s.left,u=i.scrollTop||a.scrollTop,f=i.scrollLeft||a.scrollLeft,h=c+u,m=l+f;return Qn(n.touches).map(function(d){var p=d.x,v=d.y;return{x:p-m,y:v-h}})},e.prototype._animate=function(n,r){var i=this,a=new Date().getTime(),s=Mt({timeFn:pd,callback:function(){},duration:this.props.animationDuration},r),c=s.timeFn,l=s.callback,u=s.duration,f=function(){if(i._inAnimation){var h=new Date().getTime()-a,m=h/u;h>=u?(n(1),i._stopAnimation(),l(),i._update()):(m=c(m),n(m),i._update({isAnimation:!0}),requestAnimationFrame(f))}};this._inAnimation=!0,requestAnimationFrame(f)},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 yd(n==null?void 0:n.firstElementChild)},e.prototype._updateInitialZoomFactor=function(){var n=this._getContainerRect(),r=this._getChildSize(),i=n.width/r.width,a=n.height/r.height;this._initialZoomFactor=ld(i,a)},e.prototype._bindEvents=function(){var n=this,r=this._containerRef.current;window.ResizeObserver?(this._containerObserver=new ResizeObserver(this._onResize),this._containerObserver.observe(r)):window.addEventListener("resize",this._onResize),this._handlers.forEach(function(i){var a=i[0],s=i[1],c=i[2];(c||r).addEventListener(a,s,!0)}),Array.from(r.querySelectorAll("img")).forEach(function(i){return i.addEventListener("load",n._onResize)})},e.prototype._unSubscribe=function(){var n=this,r=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||r).removeEventListener(a,s,!0)}),Array.from(r.querySelectorAll("img")).forEach(function(i){return i.removeEventListener("load",n._onResize)})},e.prototype._update=function(n){var r=this;if(!this._updatePlaned){var i=function(){var a=r._getInitialZoomFactor()*r._zoomFactor,s=-r._offset.x/a,c=-r._offset.y/a;r.props.onUpdate({scale:a,x:s,y:c})};if(n!=null&&n.isAnimation)return i();this._updatePlaned=!0,requestAnimationFrame(function(){r._updatePlaned=!1,i()})}},e.prototype._handlerIfEnable=function(n){var r=this;return function(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];r.props.enabled&&n.apply(void 0,i)}},e.prototype._setInteraction=function(n,r){var i=this._interaction;i!==n&&(i&&!n&&(dn(i)?this._handleZoomEnd():Fe(i)&&this._handleDragEnd()),dn(n)?this._handleZoomStart():Fe(n)&&this._handleDragStart(r)),this._interaction=n},e.prototype._distanceBetweenNumbers=function(n,r){return n>r?n-r:r-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 r=this._fingers;if(r===2)return this._setInteraction("zoom",n);if(r===1&&this._canDrag())return this._setInteraction("drag",n);this._setInteraction(null,n)},e.prototype._detectDoubleTap=function(n){var r=new Date().getTime();this._fingers>1&&(this._lastTouchStart=0),r-this._lastTouchStart<300?(fn(n),this._handleDoubleTap(n),dn(this._interaction)?this._handleZoomEnd():Fe(this._interaction)&&this._handleDragEnd()):this._isDoubleTap=!1,this._fingers===1&&(this._lastTouchStart=r)},e.prototype.simulate=function(n){var r=this;return function(i){var a=i.pageX,s=i.pageY,c=i.type,l=c==="mouseup",u=c==="mousedown";u&&(i.preventDefault(),r._listenMouseMove=!0),r._listenMouseMove&&(i.touches=l?[]:[{pageX:a,pageY:s}],n(i)),l&&(r._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,r=n.children,i=n.containerProps,a=Ha.only(r),s=i||{};return Un.createElement(Un.Fragment,null,Un.createElement("style",null,rd),Un.createElement("div",Mt({},s,{ref:this._containerRef,className:Ni(Js,s.className)}),ts(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:id,lockDragAxis:!1,maxZoom:5,minZoom:.5,onDoubleTap:Se,onDragEnd:Se,onDragStart:Se,onDragUpdate:Se,onZoomEnd:Se,onZoomStart:Se,onZoomUpdate:Se,setOffsetsOnce:!1,shouldInterceptWheel:_d,shouldCancelHandledTouchEndEvents:!1,tapZoomFactor:1,verticalPadding:0,wheelScaleFactor:1500,zoomOutFactor:1.3,doubleTapZoomOutOnMaxScale:!1,doubleTapToggleZoom:!1,_document:ea?null:window.document},e}(ns);if(0)var Xf,Qf,Jf,th,eh,nh,rh;function qr(t){if(!t)return;let e=Math.floor(t/3600),n=Math.floor(t%3600/60),r=Math.round(t%60);return e===0?`${n}:${r.toString().padStart(2,"0")}`:`${e}:${n.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`}const wd=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Td="ALT",Gr=t=>{const{_:e}=ne(),{alt:n,lang:r,index:i,...a}=t;return!n||!n.trim()?null:o("button",{type:"button",class:"alt-badge clickable",...a,onClick:s=>{s.stopPropagation(),s.preventDefault(),V.showMediaAlt={alt:n,lang:r}},title:e({id:"5gfDMm"}),children:[Td,!!i&&o("sup",{children:i})]})},Ad=140,Cd=280,na=Rt(t=>t!=null&&t.length?t.length>Ad||/[\n\r].*[\n\r]/.test(t.trim()):!1);function Sd({class:t="",media:e,to:n,lang:r,showOriginal:i,autoAnimate:a,showCaption:s,allowLongerCaption:c,altIndex:l,checkAspectRatio:u=!0,onClick:f=()=>{}}){let{blurhash:h,description:m,meta:d,previewRemoteUrl:p,previewUrl:v,remoteUrl:y,url:E,type:b}=e;/no\-preview\./i.test(v)&&(v=null);const{original:w={},small:k,focus:g}=d||{},A=i?w==null?void 0:w.width:(k==null?void 0:k.width)||(w==null?void 0:w.width),T=i?w==null?void 0:w.height:(k==null?void 0:k.height)||(w==null?void 0:w.height),D=i?E:v||E,M=i?y:p||y,L=A&&T,C=L?A>T?"landscape":"portrait":null,x=h?Lo(h):null,F=O();let W;if(g){const X=(g.x+1)/2*100,B=(1-g.y)/2*100;W=`${X.toFixed(0)}% ${B.toFixed(0)}%`}const j=O(),et=At(({x:X,y:B,scale:K})=>{const{current:Y}=j;if(Y){const ut=sd({x:X,y:B,scale:K});K===1?Y.style.removeProperty("transform"):Y.style.setProperty("transform",ut),Y.closest(".media-zoom").style.touchAction=K<=1.01?"pan-x":""}},[]),[st,ot]=H(!1),nt={enabled:st,draggableUnZoomed:!1,inertiaFriction:.9,tapZoomFactor:2,doubleTapToggleZoom:!0,containerProps:{className:"media-zoom",style:{overflow:"visible"}},onUpdate:et},[J,vt]=H(!1),ht=it(()=>n&&!J?X=>o(je,{to:n,...X}):"div",[n,J]),N=M?kd(M):null,at=b==="unknown"&&N&&/\.(mp4|m4r|m4v|mov|webm)$/i.test(N.pathname),dt=b==="unknown"&&N&&/\.(mp3|ogg|wav|m4a|m4p|m4b)$/i.test(N.pathname),xt=b==="image"||b==="unknown"&&v&&!at&&!dt,mt=O(),[zt,It]=H(!1);Ie(()=>{if(!xt||!i||!mt.current)return;const{offsetWidth:X,offsetHeight:B}=mt.current,K=A<X&&T<B;K&&It(K)},[A,T]);const Et=window.innerHeight*(C==="portrait"?.45:.33),Wt=C==="portrait"?0:160,yt={"--average-color":x&&`rgb(${x.join(",")})`},U=A&&T?{"--width":`${A}px`,"--height":`${T}px`,"--aspectWidth":`${A/T*Math.max(Wt,Et)}px`,aspectRatio:`${A} / ${T}`,...yt}:{...yt},Q=na(m);let wt=!!s&&!i&&!!m&&!Q;c&&!wt&&(m==null?void 0:m.length)<=Cd&&(wt=!0);const qt=wt?X=>{const{children:B,...K}=X;return o("figure",{...K,children:[B,o("figcaption",{class:"media-caption",lang:r,dir:"auto",onClick:Y=>{Y.preventDefault(),Y.stopPropagation(),V.showMediaAlt={alt:m,lang:r}},children:m})]})}:$,[be,rt]=H(void 0);if(xt)return nt.containerProps.style.display="inherit",Ie(()=>{wd&&i&&(async()=>{try{await fetch(D,{mode:"no-cors"}),j.current.src=D}catch{}})()},[D]),o(qt,{children:[o(ht,{ref:mt,class:`media media-image ${t}`,onClick:f,"data-orientation":C,"data-has-alt":!wt||void 0,"data-has-natural-aspect-ratio":be||void 0,style:i?{backgroundImage:`url(${v})`,backgroundSize:zt?`${A}px ${T}px`:void 0,...yt}:U,children:i?o(Vi,{...nt,children:o("img",{ref:j,src:D,alt:m,width:A,height:T,"data-orientation":C,loading:"eager",decoding:"sync",onLoad:X=>{X.target.closest(".media-image").style.backgroundImage="",X.target.closest(".media-zoom").style.display="",ot(!0)},onError:X=>{const{src:B}=X.target;B===D&&M&&D!==M&&(X.target.src=M)}})}):o($,{children:[o("img",{src:D,alt:wt?"":m,width:A,height:T,"data-orientation":C,loading:"lazy",style:{objectPosition:W||"center","--anim-duration":`${Math.min(Math.max(Math.max(A,T)/100,5),120)}s`},onLoad:X=>{X.target.dataset.loaded=!0;const B=X.target.closest(".media");if(!L&&B){const{naturalWidth:K,naturalHeight:Y}=X.target;B.dataset.orientation=K>Y?"landscape":"portrait",B.style.setProperty("--width",`${K}px`),B.style.setProperty("--height",`${Y}px`),B.style.aspectRatio=`${K}/${Y}`}if(u&&B){const{clientWidth:K,clientHeight:Y,naturalWidth:ut,naturalHeight:G}=X.target;if(K&&Y&&ut&&G)if(ut<88||G<88)B.dataset.hasSmallDimension=!0;else{const Ee=G*K/ut;Math.abs(Ee-Y)<5&&rt(!0)}}},onError:X=>{const{src:B}=X.target;B===D&&D!==M?X.target.src=M:vt(!0)}}),!wt&&o(Gr,{alt:m,lang:r,index:l})]})}),J&&o("div",{children:o("a",{href:y,class:"button plain6 small",target:"_blank",children:[o(R,{icon:"external"})," ",o("span",{children:o(P,{id:"9npOH9"})})]})})]});if(b==="gifv"||b==="video"||at){const X=w.duration>0,B=w.duration<31,K=b==="gifv"&&B,Y=w.duration<61,ut=qr(w.duration),G=!i&&!a&&K,Ut=!i&&a&&K,Ee=w.duration>5,$t=`
|
||
<video
|
||
src="${E}"
|
||
poster="${v}"
|
||
width="${A}"
|
||
height="${T}"
|
||
data-orientation="${C}"
|
||
preload="auto"
|
||
autoplay
|
||
muted
|
||
playsinline
|
||
${Y?"loop":""}
|
||
ondblclick="this.paused ? this.play() : this.pause()"
|
||
${Ee?"ontimeupdate=\"this.closest('.media-gif') && this.closest('.media-gif').style.setProperty('--progress', `${~~((this.currentTime / this.duration) * 100)}%`)\"":""}
|
||
></video>
|
||
`,Ft=`
|
||
<video
|
||
src="${E}"
|
||
poster="${v}"
|
||
width="${A}"
|
||
height="${T}"
|
||
data-orientation="${C}"
|
||
preload="auto"
|
||
autoplay
|
||
playsinline
|
||
${Y?"loop":""}
|
||
controls
|
||
></video>
|
||
`;return o(qt,{children:o(ht,{class:`media ${t} media-${K?"gif":"video"} ${Ut?"media-contain":""} ${G?"media-hover-animate":""}`,"data-orientation":C,"data-formatted-duration":i?void 0:ut,"data-label":K&&!i&&!Ut?"GIF":void 0,"data-has-alt":!wt||void 0,style:!i&&U,onClick:Dt=>{if(G)try{F.current.pause()}catch{}f(Dt)},onMouseEnter:()=>{if(G)try{F.current.play()}catch{}},onMouseLeave:()=>{if(G)try{F.current.pause()}catch{}},onFocus:()=>{if(G)try{F.current.play()}catch{}},onBlur:()=>{if(G)try{F.current.pause()}catch{}},children:[i||Ut?K&&i?o(Vi,{...nt,enabled:!0,children:o("div",{ref:j,dangerouslySetInnerHTML:{__html:$t}})}):K?o("div",{class:"video-container",dangerouslySetInnerHTML:{__html:$t}}):o("div",{class:"video-container",dangerouslySetInnerHTML:{__html:Ft}}):K?o("video",{ref:F,src:E,poster:v,width:A,height:T,"data-orientation":C,preload:"auto",playsinline:!0,loop:!0,muted:!0,onTimeUpdate:Ee?Dt=>{const{target:gt}=Dt,Tt=gt==null?void 0:gt.closest(".media-gif");if(Tt){const Nt=gt.currentTime/gt.duration*100;Tt.style.setProperty("--progress",`${Nt}%`)}}:void 0}):o($,{children:[v?o("img",{src:v,alt:wt?"":m,width:A,height:T,"data-orientation":C,loading:"lazy",decoding:"async",onLoad:Dt=>{if(!L){const gt=Dt.target.closest(".media");if(gt){const{naturalHeight:Tt,naturalWidth:Nt}=Dt.target;gt.dataset.orientation=Nt>Tt?"landscape":"portrait",gt.style.setProperty("--width",`${Nt}px`),gt.style.setProperty("--height",`${Tt}px`),gt.style.aspectRatio=`${Nt}/${Tt}`}}}}):o("video",{src:E+"#t=0.1",width:A,height:T,"data-orientation":C,preload:"metadata",muted:!0,disablePictureInPicture:!0,onLoadedMetadata:Dt=>{if(!X){const{duration:gt}=Dt.target;if(gt){const Tt=qr(gt),Nt=Dt.target.closest(".media-video");Nt&&(Nt.dataset.formattedDuration=Tt)}}}}),o("div",{class:"media-play",children:o(R,{icon:"play",size:"xl",alt:"▶"})})]}),!i&&!wt&&o(Gr,{alt:m,lang:r,index:l})]})})}else if(b==="audio"||dt){const X=qr(w.duration);return o(qt,{children:o(ht,{class:`media media-audio ${t}`,"data-formatted-duration":i?void 0:X,"data-has-alt":!wt||void 0,onClick:f,style:!i&&U,children:[i?o("audio",{src:y||E,preload:"none",controls:!0,autoPlay:!0}):v?o("img",{src:v,alt:wt?"":m,width:A,height:T,"data-orientation":C,loading:"lazy",onError:B=>{var K,Y;try{(Y=(K=B.target)==null?void 0:K.remove)==null||Y.call(K)}catch{}}}):null,!i&&o($,{children:[o("div",{class:"media-play",children:o(R,{icon:"play",size:"xl",alt:"▶"})}),!wt&&o(Gr,{alt:m,lang:r,index:l})]})]})})}}function kd(t){return URL.parse(t,location.origin)}const fo=Ge(Sd,(t,e)=>{const n=t.media||{},r=e.media||{};return(n==null?void 0:n.id)===(r==null?void 0:r.id)&&n.url===r.url&&t.to===e.to&&t.class===e.class}),xd=280,Id=140,Dd=rs({limit:1,interval:1e3});function Ld(t,e){return e.v1.accounts.$select(t).fetch()}const Rd=hr(Dd(Ld)),xe={public:{id:"7d1a0d"},local:{id:"d5zxa4"},unlisted:{id:"WDcQq9"},private:{id:"o34OrG"},direct:{id:"IV4QaU"}},Md=window.ontouchstart!==void 0&&/iPad|iPhone|iPod/.test(navigator.userAgent),Pd=new Intl.RelativeTimeFormat,Hi=80;function Od(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 Yr(t){const{spoilerText:e,content:n,poll:r}=t;return(e?`${e}
|
||
|
||
`:"")+gr(n)+Od(r)}function ra(t=[],e=document){for(const n of t)try{return e.querySelectorAll(n)}catch{}return[]}function $d(t){return!t||(t=t.trim(),!t)?!1:!!gr(t,{preProcess:n=>{for(const r of ra([".mention, pre, code, a:has(.invisible)",".mention, pre, code"],n))r.remove()}})}function Fd(t,e){if(e!=null&&e.length){const n=new RegExp(`:(${e.map(r=>r.shortcode).join("|")}):`,"g");t=t.replace(n,"")}return gr(t,{preProcess:n=>{for(const r of ra([".mention, .hashtag, pre, code, a:has(.invisible)",".mention, .hashtag, pre, code"],n))r.remove();for(const r of n.querySelectorAll("a")){const i=r.innerText.trim();(i.startsWith("https://")||i.startsWith("http://"))&&r.remove()}}})}const Nd=/^http/i,Ui=({post:t,instance:e,previewMode:n})=>{const{content:r,emojis:i,language:a,mentions:s,url:c}=t,l=O();return Ie(()=>{if(!l.current)return;const u=Vs(r,{emojis:i,returnDOM:!0});for(const f of u.querySelectorAll('a.u-url[target="_blank"]'))Nd.test(f.innerText.trim())||f.removeAttribute("target");l.current.replaceChildren(u.cloneNode(!0))},[r,i==null?void 0:i.length]),o("div",{ref:l,lang:a,dir:"auto",class:"inner-content",onClick:su({mentions:s,instance:e,previewMode:n,statusURL:c})})},Bd={s:"small",m:"medium",l:"large"},zd=hr(async t=>{if(t=t==null?void 0:t.trim(),(t==null?void 0:t.length)>500)return null;if(Ue){const i=await Ue.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 S(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 r=n[0];return r!=null&&r.lang&&(r==null?void 0:r.accuracy)>.5?r.lang:null}),En={id:"8fZueG"},ho={},ji=(t,e=[])=>{if(!t)return!1;const n=Ls(!0),r=t!==n&&!wn([t],[n])&&!e.find(i=>t===i||wn([t],[i]));return r&&(ho[t+e]=!0),r};function qe({statusID:t,status:e,instance:n,size:r="m",contentTextWeight:i,readOnly:a,enableCommentHint:s,withinContext:c,skeleton:l,enableTranslate:u,forceTranslate:f,previewMode:h,onMediaClick:m,quoted:d,onStatusLinkClick:p=()=>{},showFollowedTags:v,allowContextMenu:y,showActionsBar:E,showReplyParent:b,mediaFirst:w}){var Jo,ti,ei,ni;const{_:k,_:g}=ne();if(l)return o("div",{class:`status skeleton ${w?"status-media-first small":""}`,children:[!w&&o(ae,{size:"xxl"}),o("div",{class:"container",children:[o("div",{class:"meta",children:[(r==="s"||w)&&o(ae,{size:"m"})," ███ ████████"]}),o("div",{class:"content-container",children:[w&&o("div",{class:"media-first-container"}),o("div",{class:`content ${w?"media-first-content":""}`,children:o("p",{children:"████ ████████"})})]})]})]});const{masto:A,instance:T,authenticated:D}=sr({instance:n}),{instance:M}=sr(),L=T===M;let C=ie(t||(e==null?void 0:e.id),T);const x=xn(V);if(e||(e=x.statuses[C]||x.statuses[t],C=ie(e==null?void 0:e.id,T)),!e)return null;const{account:{acct:F,avatar:W,avatarStatic:j,id:et,url:st,displayName:ot,username:nt,emojis:J,bot:vt,group:ht}={},id:N,repliesCount:at,reblogged:dt,reblogsCount:xt,favourited:mt,favouritesCount:zt,bookmarked:It,poll:Et,muted:Wt,sensitive:yt,spoilerText:U,visibility:Q,language:wt,editedAt:qt,filtered:be,card:rt,createdAt:X,inReplyToId:B,inReplyToAccountId:K,content:Y,mentions:ut,mediaAttachments:G,reblog:Ut,uri:Ee,url:$t,emojis:Ft,tags:Dt,pinned:gt,_deleted:Tt,_pinned:Nt,emojiReactions:Le}=e,[Qe,Dn]=H(null);tt(()=>{if(!Y||wt||Qe)return;let _;return _=setTimeout(async()=>{let I=await zd(Fd(Y,Ft));Dn(I)},1e3),()=>clearTimeout(_)},[Y,wt]);const pt=wt||Qe,Je=!!(G!=null&&G.length);w&&Je&&(r="s");const de=it(()=>Eo(),[]),Z=it(()=>de&&de===et,[et,de]),Ct=Ot(Qs),St=!Z&&!a&&!h&&Ro(be,Ct);if((St==null?void 0:St.action)==="hide")return null;const Bt=_=>{_.shiftKey};if(r!=="l"&&St)return o(Gd,{status:e,filterInfo:St,instance:T,containerProps:{onMouseEnter:Bt},showFollowedTags:!0,quoted:d});const ft=new Date(X),we=new Date(qt);let fe=ut==null?void 0:ut.find(_=>_.id===K);!fe&&K===N&&(fe={url:st,username:nt,displayName:ot});const[Re,Ln]=H(fe);if(!c&&!Re&&K){const _=V.accounts[K];_?Ln(_):Rd(K,A).then(I=>{Ln(I),V.accounts[I.id]=I}).catch(I=>{})}const tn=K===de||(ut==null?void 0:ut.find(_=>_.id===de)),Gt=it(()=>!!(Qr.account.get("preferences")||{})["reading:expand:spoilers"],[]),Rn=it(()=>{var I;return((I=(Qr.account.get("preferences")||{})["reading:expand:media"])==null?void 0:I.toLowerCase())||"default"},[]),Zt=h||Gt||!!x.spoilers[N],Yt=h||Rn==="show_all"||!!x.spoilersMedia[N];if(Ut)return ht?o("div",{"data-state-post-id":C,class:"status-group",onMouseEnter:Bt,children:[o("div",{class:"status-pre-meta",children:[o(R,{icon:"group",size:"l",alt:g({id:"L8fEEm"})})," ",o(ve,{account:e.account,instance:T,showAvatar:!0})]}),o(qe,{status:t?null:Ut,statusID:t?Ut.id:null,instance:T,size:r,contentTextWeight:i,readOnly:a,mediaFirst:w})]}):o("div",{"data-state-post-id":C,class:"status-reblog",onMouseEnter:Bt,children:[o("div",{class:"status-pre-meta",children:[o(R,{icon:"rocket",size:"l"})," ",o(P,{id:"DlhB4J",components:{0:o(ve,{account:e.account,instance:T,showAvatar:!0}),1:o("span",{})}})]}),o(qe,{status:t?null:Ut,statusID:t?Ut.id:null,instance:T,size:r,contentTextWeight:i,readOnly:a,enableCommentHint:!0,mediaFirst:w})]});const en=At(({children:_})=>o("div",{"data-state-post-id":C,class:"status-followed-tags",onMouseEnter:Bt,children:[o("div",{class:"status-pre-meta",children:[o(R,{icon:"hashtag",size:"l"})," ",x.statusFollowedTags[C].slice(0,3).map(I=>o(je,{to:T?`/${T}/t/${I}`:`/t/${I}`,class:"status-followed-tag-item",children:I},I))]}),_]}),[C,T,x.statusFollowedTags[C]]),nn=v&&((Jo=x.statusFollowedTags[C])!=null&&Jo.length)?en:$,ct=r==="l",[vr,pa]=H(f),{contentTranslation:_r,contentTranslationAutoInline:Po}=x.settings;_r||(u=!1);const Oo=it(()=>{if(!_r||!Po||a||c&&!ct||h||U||yt||Et||rt||G!=null&&G.length)return!1;const _=Wr(Y);return _>0&&_<=Id},[_r,Po,a,c,ct,h,U,yt,Et,rt,G,Y]),[yr,Mn]=H(!1),[ga,br]=H(!1),$o=or(),Fo=or(),va=or(),Me=O(null),Pn=g({id:"7jyUKe"}),No=At(()=>Math.max(Math.round((U.length+Wr(Y))/140)||1,1),[U,Y]),Bo=X&&Cn(ft),zo=qt&&Cn(we);let rn=D&&Q!=="direct"&&Q!=="private";Q==="private"&&Z&&(rn=!0);const On=_=>{var I;if(!L||!D)return alert(Pn);(_!=null&&_.shiftKey||(I=_==null?void 0:_.syntheticEvent)!=null&&I.shiftKey)&&qc({replyToStatus:e})||Kn({replyToStatus:e})},_a=it(()=>G.some(_=>{var I,q;return!((q=(I=_.description)==null?void 0:I.trim)!=null&&q.call(I))}),[G]),Vo=it(()=>Math.floor((new Date-ft)/(1e3*60*60*24*30)),[ft]),Er=async()=>{if(!L||!D)return alert(Pn),!1;try{if(V.statuses[C]={...e,reblogged:!dt,reblogsCount:xt+(dt?-1:1)},dt){const _=await A.v1.statuses.$select(N).unreblog();he(_,T)}else{const _=await A.v1.statuses.$select(N).reblog();he(_,T)}return!0}catch{return V.statuses[C]=e,!1}},Ho=async()=>{if(!L||!D)return alert(Pn),!1;try{if(V.statuses[C]={...e,favourited:!mt,favouritesCount:zt+(mt?-1:1)},mt){const _=await A.v1.statuses.$select(N).unfavourite();he(_,T)}else{const _=await A.v1.statuses.$select(N).favourite();he(_,T)}return!0}catch{return V.statuses[C]=e,!1}},wr=async()=>{try{const _=await Ho();!ct&&_&&Lt(g(mt?{id:"sZvpIt",values:{0:nt||F}}:{id:"QB/n+J",values:{1:nt||F}}))}catch{}},Uo=async()=>{if(qn("@mastodon/post-bookmark")){if(!L||!D)return alert(Pn),!1;try{if(V.statuses[C]={...e,bookmarked:!It},It){const _=await A.v1.statuses.$select(N).unbookmark();he(_,T)}else{const _=await A.v1.statuses.$select(N).bookmark();he(_,T)}return!0}catch{return V.statuses[C]=e,!1}}},jo=async()=>{try{const _=await Uo();!ct&&_&&Lt(g(It?{id:"+Q6x2B",values:{2:nt||F}}:{id:"cQEDZY",values:{3:nt||F}}))}catch{}},on=x.settings.contentTranslationHideLanguages||[],[Te,Ko]=H(()=>ho[pt+on]||ji(pt,on));tt(()=>{if(!pt||Te)return;if(!Te&&ho[pt+on]){Ko(!0);return}let _=setTimeout(()=>{const I=ji(pt,on);I&&Ko(I)},1);return()=>clearTimeout(_)},[pt,Te,on]);const Wo=O(),Zo=O();async function ya(_){var lt,jt,Pe,Tr;_&&(Wo.current=A.v1.statuses.$select(t).rebloggedBy.list({limit:Hi}),Zo.current=A.v1.statuses.$select(t).favouritedBy.list({limit:Hi}));const[{value:I},{value:q}]=await Promise.allSettled([Wo.current.next(),Zo.current.next()]);if((lt=I.value)!=null&<.length||(jt=q.value)!=null&&jt.length){const Ae=[];return(Pe=I.value)!=null&&Pe.length&&Ae.push(...I.value.map(Ce=>(Ce._types=["reblog"],Ce))),(Tr=q.value)!=null&&Tr.length&&Ae.push(...q.value.map(Ce=>(Ce._types=["favourite"],Ce))),{value:Ae,done:I.done&&q.done}}return{value:[],done:!0}}const ba=O(),qo=["public","unlisted"].includes(Q),Ea=["public","unlisted","private"].includes(Q),Go=_a&&!dt?o("div",{class:"footer",children:[o(R,{icon:"alert"}),o(P,{id:"MB+wJL"})]}):Vo>=3&&o("div",{class:"footer",children:[o(R,{icon:"info"}),o("span",{children:o(P,{id:"dBme/4",values:{0:Pd.format(-Vo,"month")},components:{0:o("strong",{})}})})]}),Yo=o($,{children:[!ct&&L&&o($,{children:o("div",{class:"menu-control-group-horizontal status-menu",children:[o(bt,{onClick:On,children:[o(R,{icon:"comment"}),o("span",{children:at>0?oe(at):g({id:"ImOQa9"})})]}),o(kr,{subMenu:!0,confirmLabel:o($,{children:[o(R,{icon:"rocket"}),o("span",{children:g(dt?{id:"QzzGsY"}:{id:"kulphB"})})]}),className:`menu-reblog ${dt?"checked":""}`,menuExtras:o(bt,{onClick:()=>{Kn({draftStatus:{status:`
|
||
${$t}`}})},children:[o(R,{icon:"quote"}),o("span",{children:o(P,{id:"ZhhOwV"})})]}),menuFooter:Go,disabled:!rn,onClick:async()=>{try{const _=await Er();!ct&&_&&Lt(g(dt?{id:"BgT3ls",values:{4:nt||F}}:{id:"iSYdyi",values:{5:nt||F}}))}catch{}},children:[o(R,{icon:"rocket"}),o("span",{children:xt>0?oe(xt):g(dt?{id:"QzzGsY"}:{id:"PiVIlD"})})]}),o(bt,{onClick:wr,className:`menu-favourite ${mt?"checked":""}`,children:[o(R,{icon:"heart"}),o("span",{children:zt>0?oe(zt):g(mt?{id:"OcUmcH"}:{id:"W9FRBT"})})]}),qn("@mastodon/post-bookmark")&&o(bt,{onClick:jo,className:`menu-bookmark ${It?"checked":""}`,children:[o(R,{icon:"bookmark"}),o("span",{children:g(It?{id:"q8EQYI"}:{id:"PZlHt8"})})]})]})}),!ct&&L&&(ct||E)&&o(cn,{}),(ct||E)&&o($,{children:o(bt,{onClick:()=>{V.showGenericAccounts={heading:g({id:"+XOeb+"}),fetchAccounts:ya,instance:T,showReactions:!0,postID:C}},children:[o(R,{icon:"react"}),o("span",{children:o(P,{id:"+XOeb+"})})]})}),!w&&o($,{children:[(u||!pt||Te)&&o(cn,{}),u?o("div",{class:vn?"menu-horizontal":"",children:[o(bt,{disabled:vr,onClick:()=>{pa(!0)},children:[o(R,{icon:"translate"}),o("span",{children:o(P,{id:"pi8x/S"})})]}),vn&&o(bt,{onClick:()=>{const _=Yr(e);_&&Oi(_,pt)},children:[o(R,{icon:"speak"}),o("span",{children:o(P,{id:"yIBLq8"})})]})]}):(!pt||Te)&&o("div",{class:vn?"menu-horizontal":"",children:[o(pi,{to:`${T?`/${T}`:""}/s/${N}?translate=1`,children:[o(R,{icon:"translate"}),o("span",{children:o(P,{id:"pi8x/S"})})]}),vn&&o(bt,{onClick:()=>{const _=Yr(e);_&&Oi(_,pt)},children:[o(R,{icon:"speak"}),o("span",{children:o(P,{id:"yIBLq8"})})]})]})]}),(!ct&&L||u||!pt||Te)&&o(cn,{}),!ct&&o($,{children:o(pi,{to:T?`/${T}/s/${N}`:`/s/${N}`,onClick:_=>{p(_,e)},children:[o(R,{icon:"arrows-right"}),o("small",{children:[o(P,{id:"8MkSAW",values:{0:nt||F},components:{0:o("span",{class:"bidi-isolate"})}}),o("br",{}),o("span",{class:"more-insignificant",children:[k(xe[Q])," • ",Bo]})]})]})}),!!qt&&o($,{children:o(bt,{onClick:()=>{Mn(N)},children:[o(R,{icon:"history"}),o("small",{children:[o(P,{id:"QL+7Jw"}),o("br",{}),o("span",{class:"more-insignificant",children:o(P,{id:"DuJJm9",values:{editedDateText:zo}})})]})]})}),o(bt,{href:$t,target:"_blank",children:[o(R,{icon:"external"}),o("small",{class:"menu-double-lines",style:{maxWidth:"16em"},children:Zd($t)})]}),o("div",{class:"menu-horizontal",children:[o(bt,{onClick:()=>{try{navigator.clipboard.writeText($t),Lt(g({id:"edWbV6"}))}catch{Lt(g({id:"W1ewR0"}))}},children:[o(R,{icon:"link"}),o("span",{children:o(P,{id:"he3ygx"})})]}),qo&&(navigator==null?void 0:navigator.share)&&((ti=navigator==null?void 0:navigator.canShare)==null?void 0:ti.call(navigator,{url:$t}))&&o(bt,{onClick:()=>{try{navigator.share({url:$t})}catch{alert(g({id:"TtG3Uh"}))}},children:[o(R,{icon:"share"}),o("span",{children:o(P,{id:"LFKLqp"})})]})]}),qo&&ct&&o(bt,{onClick:()=>{br(!0)},children:[o(R,{icon:"code"}),o("span",{children:o(P,{id:"jdVwsS"})})]}),(Z||tn)&&o(cn,{}),(Z||tn)&&o(bt,{onClick:async()=>{try{const _=await A.v1.statuses.$select(N)[Wt?"unmute":"mute"]();he(_,T),Lt(g(Wt?{id:"Pm+5jw"}:{id:"ywB7JM"}))}catch{Lt(g(Wt?{id:"c6jxNY"}:{id:"8SN9kN"}))}},children:Wt?o($,{children:[o(R,{icon:"unmute"}),o("span",{children:o(P,{id:"i51zUR"})})]}):o($,{children:[o(R,{icon:"mute"}),o("span",{children:o(P,{id:"OiUYO5"})})]})}),Z&&Ea&&o(bt,{onClick:async()=>{try{const _=await A.v1.statuses.$select(N)[gt?"unpin":"pin"]();he(_,T),Lt(g(gt?{id:"Yx809+"}:{id:"S6P6E+"}))}catch{Lt(g(gt?{id:"A6cs15"}:{id:"vgUfWO"}))}},children:gt?o($,{children:[o(R,{icon:"unpin"}),o("span",{children:o(P,{id:"XQMQZw"})})]}):o($,{children:[o(R,{icon:"pin"}),o("span",{children:o(P,{id:"lfHLsx"})})]})}),Z&&o("div",{class:"menu-horizontal",children:[qn("@mastodon/post-edit")&&o(bt,{onClick:()=>{Kn({editStatus:e})},children:[o(R,{icon:"pencil"}),o("span",{children:o(P,{id:"ePK91l"})})]}),ct&&o(kr,{subMenu:!0,confirmLabel:o($,{children:[o(R,{icon:"trash"}),o("span",{children:o(P,{id:"FbPNuJ"})})]}),itemProps:{className:"danger"},menuItemClassName:"danger",onClick:()=>{(async()=>{try{await A.v1.statuses.$select(N).remove();const _=is(N,T);_._deleted=!0,Lt(g({id:"KiyvHV"}))}catch{Lt(g({id:"Yb6p2q"}))}})()},children:[o(R,{icon:"trash"}),o("span",{children:o(P,{id:"Jb6/SB"})})]})]}),!Z&&ct&&o($,{children:[o(cn,{}),o(bt,{className:"danger",onClick:()=>{V.showReportModal={account:e.account,post:e}},children:[o(R,{icon:"flag"}),o("span",{children:o(P,{id:"7PQAMY"})})]})]})]}),Xo=O(),[$n,sn]=H(!1),[Fn,Nn]=H({}),Bn=y||!ct&&!h&&!Tt&&!d,wa=As(Md&&Bn?_=>{var jt;if(_.pointerType==="mouse")return;const{clientX:I,clientY:q}=((jt=_.touches)==null?void 0:jt[0])||_,lt=_.target.closest("a");lt&&Me.current.contains(lt)&&!lt.getAttribute("href").startsWith("#")||(_.preventDefault(),Nn({anchorPoint:{x:I,y:q},direction:"right"}),sn(!0))}:null,{threshold:600,captureEvent:!0,detect:"touch",cancelOnMovement:2}),zn=!a&&!h&&!d,Ta=Be("r, shift+r",On,{enabled:zn}),Aa=Be("f, l",wr,{enabled:zn}),Ca=Be("d",jo,{enabled:zn}),Sa=Be("shift+b",()=>{(async()=>{try{const _=await Er();!ct&&_&&Lt(g(dt?{id:"G3tPNv",values:{6:nt||F}}:{id:"r8jwY4",values:{7:nt||F}}))}catch{}})()},{enabled:zn&&rn}),ka=Be("x",_=>{const I=document.activeElement.closest(".status-link, .status-focus");if(I){const q=I.querySelector(".spoiler-button:not(.spoiling)");if(q)_.stopPropagation(),q.click();else{const lt=I.querySelector(".spoiler-media-button:not(.spoiling)");lt&&(_.stopPropagation(),lt.click())}}}),Vn=G.slice(0,ct?void 0:4),Hn=G.length>1&&Vn.some(_=>!!_.description&&!na(_.description)),xa=it(()=>{if(!Hn)return null;const _=[];return Vn.forEach((I,q)=>{if(!I.description)return;const lt=_.findIndex(jt=>jt.media.description===I.description);lt===-1?_.push({media:I,indices:[q]}):_[lt].indices.push(q)}),_.map(({media:I,indices:q})=>o("div",{"data-caption-index":q.map(lt=>lt+1).join(" "),onClick:lt=>{lt.preventDefault(),lt.stopPropagation(),V.showMediaAlt={alt:I.description,lang:pt}},title:I.description,children:[o("sup",{children:q.map(lt=>lt+1).join(" ")})," ",I.description]},I.id))},[Hn,Vn,pt]),an=it(()=>{var _;return!!B&&K===((_=e.account)==null?void 0:_.id)||!!x.statusThreadNumber[C]},[B,K,(ei=e.account)==null?void 0:ei.id,x.statusThreadNumber[C]]),Ia=it(()=>s&&!an&&!c&&!B&&Q==="public"&&at>0,[s,an,c,B,at,Q]),Qo=it(()=>{if(rt||Et||yt||U||G!=null&&G.length||an||c||B||at<=0||!/[???︖❓❔⁇⁈⁉¿‽؟]/.test(Y))return!1;const q=Wr(Y);if(q>0&&q<=xd)return!0},[rt,Et,yt,U,G,Ut,an,c,B,at,Y]);return o(nn,{children:[b&&!!(B&&K)&&o(qd,{sKey:C}),o("article",{"data-state-post-id":C,ref:_=>{var q;Me.current=_;const I=((q=_==null?void 0:_.closest)==null?void 0:q.call(_,".timeline-item, .timeline-item-alt, .status-link, .status-focus"))||_;Ta(I),Aa(I),Ca(I),Sa(I),ka(I)},tabindex:"-1",class:`status ${!c&&B&&Re?"status-reply-to":""} visibility-${Q} ${Nt?"status-pinned":""} ${Bd[r]} ${Tt?"status-deleted":""} ${d?"status-card":""} ${$n?"status-menu-open":""} ${w&&Je?"status-media-first":""}`,onMouseEnter:Bt,onContextMenu:_=>{var lt,jt;if(!Bn||_.metaKey)return;const I=_.target.closest("a");if(I&&Me.current.contains(I)&&!I.getAttribute("href").startsWith("#"))return;const q=(lt=window.getSelection)==null?void 0:lt.call(window);if(q.toString().length>0){const{anchorNode:Pe}=q;if((jt=Me.current)!=null&&jt.contains(Pe))return}_.preventDefault(),Nn({anchorPoint:{x:_.clientX,y:_.clientY},direction:"right"}),sn(!0)},...Bn?wa():{},children:[Bn&&o(ms,{ref:Xo,state:$n?"open":void 0,...Fn,onClose:_=>{var I,q,lt;sn(!1),(_==null?void 0:_.reason)==="click"&&((lt=(q=(I=Me.current)==null?void 0:I.closest("[tabindex]"))==null?void 0:q.focus)==null||lt.call(q))},portal:{target:document.body},containerProps:{style:{zIndex:1001},onClick:()=>{var _,I;(I=(_=Xo.current)==null?void 0:_.closeMenu)==null||I.call(_)}},overflow:"auto",boundingBoxPadding:ks(),unmountOnClose:!0,children:Yo}),E&&r!=="l"&&!h&&!a&&!Tt&&!d&&o("div",{class:`status-actions ${$n==="actions-bar"?"open":""}`,ref:ba,children:[o(Ne,{size:"s",title:g({id:"ImOQa9"}),alt:g({id:"ImOQa9"}),class:"reply-button",icon:"comment",iconSize:"m",onClick:On}),o(Ne,{size:"s",checked:mt,title:[g({id:"W9FRBT"}),g({id:"OcUmcH"})],alt:[g({id:"W9FRBT"}),g({id:"8ab1sR"})],class:"favourite-button",icon:"heart",iconSize:"m",count:zt,onClick:wr}),o("button",{type:"button",title:g({id:"2FYpfJ"}),class:"plain more-button",onClick:_=>{_.preventDefault(),_.stopPropagation(),Nn({anchorRef:{current:_.currentTarget},align:"start",direction:"left",gap:0,shift:-8}),sn("actions-bar")},children:o(R,{icon:"more2",size:"m",alt:g({id:"2FYpfJ"})})})]}),r!=="l"&&o("div",{class:"status-badge",children:[dt&&o(R,{class:"reblog",icon:"rocket",size:"s",alt:g({id:"b7T5Zj"})}),mt&&o(R,{class:"favourite",icon:"heart",size:"s",alt:g({id:"8ab1sR"})}),It&&o(R,{class:"bookmark",icon:"bookmark",size:"s",alt:g({id:"1C/9Sa"})}),Nt&&o(R,{class:"pin",icon:"pin",size:"s",alt:g({id:"kNiQp6"})})]}),r!=="s"&&o("a",{href:st,tabindex:"-1",title:`@${F}`,onClick:_=>{_.preventDefault(),_.stopPropagation(),V.showAccount={account:e.account,instance:T}},children:o(ae,{url:j||W,size:"xxl",squircle:vt})}),o("div",{class:"container",children:[!!(e.account||X)&&o("div",{class:"meta",children:[o("span",{class:"meta-name",children:o(ve,{account:e.account,instance:T,showAvatar:r==="s",showAcct:ct})})," ",r!=="l"&&(Tt?o("span",{class:"status-deleted-tag",children:o(P,{id:"vGjmyl"})}):$t&&!h&&!a&&!d?o(je,{to:T?`/${T}/s/${N}`:`/s/${N}`,onClick:_=>{_.metaKey||_.ctrlKey||_.shiftKey||_.altKey||_.which===2||(_.preventDefault(),_.stopPropagation(),p==null||p(_,e),Nn({anchorRef:{current:_.currentTarget},align:"end",direction:"bottom",gap:4}),sn(!0))},class:`time ${$n&&(Fn!=null&&Fn.anchorRef)?"is-open":""}`,children:[Ia&&!Qo?o(R,{icon:"comment2",size:"s",alt:kt._({id:"RXmXDR",values:{repliesCount:at}})}):Q!=="public"&&Q!=="direct"&&o(R,{icon:bn[Q],alt:k(xe[Q]),size:"s"})," ",o(se,{datetime:ft,format:"micro"}),!h&&!a&&o(R,{icon:"more2",class:"more",alt:g({id:"2FYpfJ"})})]}):o("span",{class:"time",children:[Q!=="public"&&Q!=="direct"&&o($,{children:[o(R,{icon:bn[Q],alt:k(xe[Q]),size:"s"})," "]}),o(se,{datetime:ft,format:"micro"})]}))]}),Q==="direct"&&o($,{children:[o("div",{class:"status-direct-badge",children:o(P,{id:"IV4QaU"})})," "]}),!c&&o($,{children:an?o("div",{class:"status-thread-badge",children:[o(R,{icon:"thread",size:"s"}),o(P,{id:"lQ8zCz",values:{0:x.statusThreadNumber[C]?` ${x.statusThreadNumber[C]}/X`:""}})]}):!!B&&!!Re&&(!!U||!ut.find(_=>_.id===K))&&o("div",{class:"status-reply-badge",children:[o(R,{icon:"reply"})," ",o(ve,{account:Re,instance:T,short:!0})]})}),o("div",{class:`content-container ${U||yt?"has-spoiler":""} ${Zt?"show-spoiler":""} ${Yt?"show-media":""}`,"data-content-text-weight":i?No():null,style:(ct||i)&&{"--content-text-weight":No()},children:w&&Je?o($,{children:[(!!U||!!yt)&&!Gt&&o($,{children:[!!U&&o("span",{class:"spoiler-content media-first-spoiler-content",lang:pt,dir:"auto",ref:$o,"data-read-more":k(En),children:[o(Ze,{text:U,emojis:Ft})," "]}),o("button",{class:`light spoiler-button media-first-spoiler-button ${Zt?"spoiling":""}`,type:"button",onClick:_=>{_.preventDefault(),_.stopPropagation(),Zt?(delete V.spoilers[N],Gt||delete V.spoilersMedia[N]):(V.spoilers[N]=!0,Gt||(V.spoilersMedia[N]=!0))},children:[o(R,{icon:Zt?"eye-open":"eye-close"})," ",g(Zt?{id:"6lGV3K"}:{id:"lqBX03"})]})]}),o(Hd,{mediaAttachments:G,language:pt,postID:N,instance:T}),!!Y&&o("div",{class:"media-first-content content",ref:Fo,children:o(Ui,{post:e,instance:T,previewMode:h})})]}):o($,{children:[!!U&&o($,{children:[o("div",{class:"content spoiler-content",lang:pt,dir:"auto",ref:$o,"data-read-more":k(En),children:o("p",{children:o(Ze,{text:U,emojis:Ft})})}),Gt||h?o("div",{class:"spoiler-divider",children:[o(R,{icon:"eye-open"})," ",o(P,{id:"gnKo7f"})]}):o("button",{class:`light spoiler-button ${Zt?"spoiling":""}`,type:"button",onClick:_=>{_.preventDefault(),_.stopPropagation(),Zt?(delete V.spoilers[N],Gt||delete V.spoilersMedia[N]):(V.spoilers[N]=!0,Gt||(V.spoilersMedia[N]=!0))},children:[o(R,{icon:Zt?"eye-open":"eye-close"})," ",g(Zt?{id:"6lGV3K"}:{id:"lqBX03"})]})]}),!!Y&&o("div",{class:"content",ref:Fo,"data-read-more":k(En),inert:U&&!Zt?!0:void 0,children:[o(Ui,{post:e,instance:T,previewMode:h}),o(Yd,{id:N,instance:T,level:d})]}),!!Et&&o(Yu,{lang:pt,poll:Et,readOnly:a||!L||!D,onUpdate:_=>{V.statuses[C].poll=_},refresh:()=>A.v1.polls.$select(Et.id).fetch().then(_=>{V.statuses[C].poll=_}).catch(_=>{}),votePoll:_=>A.v1.polls.$select(Et.id).votes.create({choices:_}).then(I=>{V.statuses[C].poll=I}).catch(I=>{})}),((u||Oo)&&$d(Y)&&Te||vr)&&o(Mu,{forceTranslate:vr||Oo,mini:!ct&&!c,sourceLanguage:pt,autoDetected:Qe,text:Yr(e)}),!h&&yt&&!!G.length&&Rn!=="show_all"&&o("button",{class:`plain spoiler-media-button ${Yt?"spoiling":""}`,type:"button",hidden:!Gt&&!!U,onClick:_=>{_.preventDefault(),_.stopPropagation(),Yt?delete V.spoilersMedia[N]:V.spoilersMedia[N]=!0},children:[o(R,{icon:Yt?"eye-open":"eye-close"})," ",g(Yt?{id:"6lGV3K"}:{id:"9ZCilh"})]}),!!G.length&&(G.length>1&&(ct||c&&r==="m")?o("div",{class:"media-large-container",children:G.map((_,I)=>o("div",{class:"media-container media-eq1",children:o(fo,{media:_,autoAnimate:!0,showCaption:!0,allowLongerCaption:!Y,lang:pt,to:`/${T}/s/${N}?${c?"media":"media-only"}=${I+1}`,onClick:m?q=>m(q,I,_,e):void 0})},_.id))}):o(Vd,{lang:pt,enabled:Hn,captionChildren:xa,children:o("div",{ref:va,class:`media-container media-eq${G.length} ${G.length>2?"media-gt2":""} ${G.length>4?"media-gt4":""}`,children:Vn.map((_,I)=>o(fo,{media:_,autoAnimate:ct,showCaption:G.length===1,allowLongerCaption:!Y&&G.length===1,lang:pt,altIndex:Hn&&!!_.description&&I+1,to:`/${T}/s/${N}?${c?"media":"media-only"}=${I+1}`,onClick:m?q=>{m(q,I,_,e)}:void 0,checkAspectRatio:G.length===1},_.id))})})),!!rt&&/^https/i.test(rt==null?void 0:rt.url)&&!yt&&!U&&!Et&&!G.length&&!x.statusQuotes[C]&&o(jd,{card:rt,selfReferential:(rt==null?void 0:rt.url)===e.url||(rt==null?void 0:rt.url)===e.uri,selfAuthor:(ni=rt==null?void 0:rt.authors)==null?void 0:ni.some(_=>{var I;return((I=_.account)==null?void 0:I.url)===st}),instance:M})]})}),!ct&&Qo&&o("div",{class:"content-comment-hint insignificant",children:[o(R,{icon:"comment2",alt:g({id:"N8UzTV"})})," ",at]}),ct&&o($,{children:[o("div",{class:"extra-meta",children:Tt?o("span",{class:"status-deleted-tag",children:o(P,{id:"vGjmyl"})}):o($,{children:[o("span",{children:k(xe[Q])})," •"," ",o("a",{href:$t,target:"_blank",rel:"noopener",children:[new Date().getTime()-ft.getTime()<864e5&&o($,{children:[o(se,{datetime:ft,format:"micro"})," ","‒"," "]}),!!X&&o("time",{class:"created",datetime:ft.toISOString(),title:ft.toLocaleString(),children:Bo})]}),qt&&o($,{children:[" ","• ",o(R,{icon:"pencil",alt:g({id:"MRZxAn"})})," ",o("time",{tabIndex:"0",class:"edited",datetime:we.toISOString(),onClick:()=>{Mn(N)},children:zo})]})]})}),!!(Le!=null&&Le.length)&&o("div",{class:"emoji-reactions",children:Le.map(_=>{const{name:I,count:q,me:lt,url:jt,staticUrl:Pe}=_;if(jt)return o("span",{class:`emoji-reaction tag ${lt?"":"insignificant"}`,children:[o(co,{alt:I,url:jt,staticUrl:Pe})," ",q]});if(/^:.+?:$/.test(I)){const Ae=Ft.find(Ce=>Ce.shortcode===I.replace(/^:/,"").replace(/:$/,""));if(Ae)return o("span",{class:`emoji-reaction tag ${lt?"":"insignificant"}`,children:[o(co,{alt:I,url:Ae.url,staticUrl:Ae.staticUrl})," ",q]})}return o("span",{class:`emoji-reaction tag ${lt?"":"insignificant"}`,children:[I," ",q]})})}),o("div",{class:`actions ${Tt?"disabled":""}`,children:[o("div",{class:"action has-count",children:o(Ne,{title:g({id:"ImOQa9"}),alt:g({id:"VbyRUy"}),class:"reply-button",icon:"comment",count:at,onClick:On})}),o("div",{class:"action has-count",children:o(kr,{disabled:!rn,onClick:Er,confirmLabel:o($,{children:[o(R,{icon:"rocket"}),o("span",{children:g(dt?{id:"QzzGsY"}:{id:"kulphB"})})]}),menuExtras:o(bt,{onClick:()=>{Kn({draftStatus:{status:`
|
||
${$t}`}})},children:[o(R,{icon:"quote"}),o("span",{children:o(P,{id:"ZhhOwV"})})]}),menuFooter:Go,children:o(Ne,{checked:dt,title:[g({id:"kulphB"}),g({id:"QzzGsY"})],alt:[g({id:"kulphB"}),g({id:"b7T5Zj"})],class:"reblog-button",icon:"rocket",count:xt,disabled:!rn})})}),o("div",{class:"action has-count",children:o(Ne,{checked:mt,title:[g({id:"W9FRBT"}),g({id:"OcUmcH"})],alt:[g({id:"W9FRBT"}),g({id:"8ab1sR"})],class:"favourite-button",icon:"heart",count:zt,onClick:Ho})}),qn("@mastodon/post-bookmark")&&o("div",{class:"action",children:o(Ne,{checked:It,title:[g({id:"PZlHt8"}),g({id:"q8EQYI"})],alt:[g({id:"PZlHt8"}),g({id:"1C/9Sa"})],class:"bookmark-button",icon:"bookmark",onClick:Uo})}),o(Ds,{portal:{target:document.querySelector(".status-deck")||document.body},align:"end",gap:4,overflow:"auto",viewScroll:"close",menuButton:o("div",{class:"action",children:o("button",{type:"button",title:g({id:"2FYpfJ"}),class:"plain more-button",children:o(R,{icon:"more",size:"l",alt:g({id:"2FYpfJ"})})})}),children:[Yo," "]})]})]})]}),!!yr&&o(io,{onClick:_=>{_.target===_.currentTarget&&Mn(!1)},children:o(Kd,{statusID:yr,instance:T,fetchStatusHistory:()=>A.v1.statuses.$select(yr).history.list(),onClose:()=>{var _;Mn(!1),(_=Me.current)==null||_.focus()}})}),!!ga&&o(io,{onClick:_=>{_.target===_.currentTarget&&br(!1)},children:o(Wd,{post:e,instance:T,onClose:()=>{br(!1)}})})]})]})}function Vd(t){const{enabled:e,children:n,lang:r,captionChildren:i}=t;return!e||!i?n:o("figure",{class:"media-figure-multiple",children:[n,o("figcaption",{lang:r,dir:"auto",children:i})]})}function Hd(t){const{mediaAttachments:e,language:n,postID:r,instance:i}=t,a=e.length>1,s=O(),[c,l]=H(0);return tt(()=>{let u=()=>{const{clientWidth:f,scrollLeft:h}=s.current,m=Math.round(Math.abs(h)/f);l(m)};return s.current&&s.current.addEventListener("scroll",u,{passive:!0}),()=>{s.current&&s.current.removeEventListener("scroll",u)}},[]),o($,{children:[o("div",{class:"media-first-container",children:[o("div",{class:"media-first-carousel",ref:s,children:e.map((u,f)=>o("div",{class:"media-first-item",children:o(fo,{media:u,lang:n,to:`/${i}/s/${r}?media=${f+1}`})},u.id))}),a&&o("div",{class:"media-carousel-controls",children:[o("div",{class:"carousel-indexer",children:[c+1,"/",e.length]}),o("label",{class:"media-carousel-button",children:o("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)*(ao()?-1:1),behavior:"smooth"})},children:o(R,{icon:"arrow-left"})})}),o("label",{class:"media-carousel-button",children:o("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)*(ao()?-1:1),behavior:"smooth"})},children:o(R,{icon:"arrow-right"})})})]})]}),a&&o("div",{class:"media-carousel-dots",style:{"--dots-count":e.length},children:e.map((u,f)=>o("span",{class:`carousel-dot ${f===c?"active":""}`},u.id))})]})}function Ki(t){return zs.toUnicode(URL.parse(t).hostname.replace(/^www\./,"").replace(/\/$/,""))}function Wi(t){return["x.com","twitter.com","threads.net","bsky.app"].includes(t)}function Ud({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 r=t[0].account;return o("div",{class:"card-byline",children:[n,o("div",{class:"card-byline-author",children:[o(R,{icon:"link",size:"s"})," ",o("small",{children:o(P,{id:"4LHHK6",components:{0:o(ve,{account:r,showAvatar:!0})}})})]})]})}function jd({card:t,selfReferential:e,selfAuthor:n,instance:r}){var et;const i=xn(V),{blurhash:a,title:s,description:c,html:l,providerName:u,providerUrl:f,authorName:h,authorUrl:m,width:d,height:p,image:v,imageDescription:y,url:E,type:b,embedUrl:w,language:k,publishedAt:g,authors:A}=t,T=s||u||h,M=d/p>=1.2?"large":"",[L,C]=H(null);if(tt(()=>{T&&v&&!e&&Ua(E)&&ja(r,E).then(st=>{if(!st)return;const{id:ot,url:nt}=st;C("#"+nt)})},[T,v,e]),i.unfurledLinks[E])return null;const x=/<iframe/i.test(l),F=At(st=>{x&&(st.preventDefault(),V.showEmbedModal={html:l,url:E||w,width:d,height:p})},[x]),[W,j]=H(null);if(T&&(v||b==="photo"&&a)){const st=Ki(E),ot=v&&a?Lo(a):null;if(!v){const ht=ju(a,44,44),N=window.OffscreenCanvas?new OffscreenCanvas(1,1):document.createElement("canvas");N.width=44,N.height=44;const at=N.getContext("2d");at.imageSmoothingEnabled=!1;const dt=at.createImageData(44,44);dt.data.set(ht),at.putImageData(dt,0,0);try{window.OffscreenCanvas?N.convertToBlob().then(xt=>{j(URL.createObjectURL(xt))}):j(N.toDataURL())}catch{}}const nt=Wi(st);return o(Ud,{hidden:!!n,authors:A,children:o("a",{href:L||E,target:L?null:"_blank",rel:"nofollow noopener",class:`card link ${nt?"card-post":""} ${W?"":M}`,style:{"--average-color":ot&&`rgb(${ot.join(",")})`},onClick:F,children:[o("div",{class:"card-image",children:o("img",{src:v||W,width:d,height:p,loading:"lazy",decoding:"async",fetchPriority:"low",alt:y||"",onError:J=>{try{J.target.style.display="none"}catch{}},style:{"--anim-duration":d&&p&&`${Math.min(Math.max(Math.max(d,p)/100,5),120)}s`}})}),o("div",{class:"meta-container",lang:k,children:[o("p",{class:"meta domain",children:[o("span",{class:"domain",children:st})," ",!!g&&o($,{children:"· "}),!!g&&o($,{children:o(se,{datetime:g,format:"micro"})})]}),o("p",{class:"title",dir:"auto",title:s,children:s}),o("p",{class:"meta",dir:"auto",title:c,children:c||!!g&&o(se,{datetime:g,format:"micro"})})]})]})})}else{if(b==="photo")return o("a",{href:E,target:"_blank",rel:"nofollow noopener",class:"card photo",onClick:F,children:o("img",{src:w,width:d,height:p,alt:s||c,loading:"lazy",style:{height:"auto",aspectRatio:`${d}/${p}`}})});if(b==="video"&&/youtube/i.test(u)){const st=(et=E.match(/watch\?v=([^&]+)/))==null?void 0:et[1];if(st)return o("a",{class:"card video",onClick:F,children:o("lite-youtube",{videoid:st,nocookie:!0,autoPause:!0})})}if(T&&!v){const st=Ki(E),ot=Wi(st);return o("a",{href:L||E,target:L?null:"_blank",rel:"nofollow noopener",class:`card link ${ot?"card-post":""} no-image`,lang:k,dir:"auto",onClick:F,children:o("div",{class:"meta-container",children:[o("p",{class:"meta domain",children:[o("span",{class:"domain",children:[o(R,{icon:"link",size:"s"})," ",o("span",{children:st})]})," ",!!g&&o($,{children:"· "}),!!g&&o($,{children:o(se,{datetime:g,format:"micro"})})]}),o("p",{class:"title",title:s,children:s}),o("p",{class:"meta",title:c||u||h,children:c||u||h})]})})}}}function Kd({statusID:t,instance:e,fetchStatusHistory:n=()=>{},onClose:r}){const{_:i}=ne(),[a,s]=H("default"),[c,l]=H([]);return tt(()=>{s("loading"),(async()=>{try{const u=await n();l(u),s("default")}catch{s("error")}})()},[]),o("div",{id:"edit-history",class:"sheet",children:[!!r&&o("button",{type:"button",class:"sheet-close",onClick:r,children:o(R,{icon:"x",alt:i({id:"yz7wBu"})})}),o("header",{children:[o("h2",{children:o(P,{id:"OKiofn"})}),a==="error"&&o("p",{children:o(P,{id:"EANWES"})}),a==="loading"&&o("p",{children:[o(os,{abrupt:!0})," ",o(P,{id:"Pwqkdw"})]})]}),o("main",{tabIndex:"-1",children:c.length>0&&o("ol",{children:c.map(u=>{const{createdAt:f}=u,h=new Date(f);return o("li",{class:"history-item",children:[o("h3",{children:o("time",{children:Cn(h,{formatOpts:{weekday:"short",second:"numeric"}})})}),o(qe,{status:u,instance:e,size:"s",withinContext:!0,readOnly:!0,previewMode:!0})]},f)})})})]})}function oa(t,e,n=0){var C;const{account:{url:r,displayName:i,acct:a,username:s,emojis:c,bot:l,group:u},id:f,poll:h,spoilerText:m,language:d,editedAt:p,createdAt:v,content:y,mediaAttachments:E,url:b,emojis:w}=t,k=ie(f,e),A=(V.statusQuotes[k]||[]).filter((x,F,W)=>W.findIndex(j=>j.url===x.url)===F),T=A.length&&n<=2?A.map(x=>{const{id:F,instance:W}=x,j=ie(F,W),et=V.statuses[j];if(et)return oa(et,W,++n)}).join(""):"",D=new Date(v),M=lo(y,w)+`
|
||
`+T+`
|
||
`+((C=h==null?void 0:h.options)!=null&&C.length?`
|
||
<p>📊:</p>
|
||
<ul>
|
||
${h.options.map(x=>`
|
||
<li>
|
||
${x.title}
|
||
${x.votesCount>=0?` (${x.votesCount})`:""}
|
||
</li>
|
||
`).join("")}
|
||
</ul>`:"")+(E.length>0?`
|
||
`+E.map(x=>{const{description:F,meta:W,previewRemoteUrl:j,previewUrl:et,remoteUrl:st,url:ot,type:nt}=x,{original:J={},small:vt}=W||{},ht=(vt==null?void 0:vt.width)||(J==null?void 0:J.width),N=(vt==null?void 0:vt.height)||(J==null?void 0:J.height),at=st||ot,dt=j||et,xt=dt||at,mt=at?URL.parse(at):null,zt=nt==="unknown"&&mt&&/\.(mp4|m4r|m4v|mov|webm)$/i.test(mt.pathname),It=nt==="unknown"&&mt&&/\.(mp3|ogg|wav|m4a|m4p|m4b)$/i.test(mt.pathname),Et=nt==="image"||nt==="unknown"&&dt&&!zt&&!It,Wt=nt==="gifv"||nt==="video"||zt,yt=nt==="audio"||It;let U="";return Et?U=`<img src="${xt}" width="${ht}" height="${N}" alt="${F}" loading="lazy" />`:Wt?U=`
|
||
<video src="${at}" width="${ht}" height="${N}" controls preload="auto" poster="${dt}" loading="lazy"></video>
|
||
${F?`<figcaption>${F}</figcaption>`:""}
|
||
`:yt?U=`
|
||
<audio src="${at}" controls preload="auto"></audio>
|
||
${F?`<figcaption>${F}</figcaption>`:""}
|
||
`:U=`
|
||
<a href="${at}">📄 ${F||at}</a>
|
||
`,`<figure>${U}</figure>`}).join(`
|
||
`):""),L=`
|
||
<blockquote lang="${d}" cite="${b}" data-source="fediverse">
|
||
${m?`
|
||
<details>
|
||
<summary>${m}</summary>
|
||
${M}
|
||
</details>
|
||
`:M}
|
||
<footer>
|
||
— ${lo(i,c)} (@${a}) ${v?`<a href="${b}"><time datetime="${D.toISOString()}">${D.toLocaleString()}</time></a>`:""}
|
||
</footer>
|
||
</blockquote>
|
||
`;return Gu(L)}function Wd({post:t,instance:e,onClose:n}){const{_:r}=ne(),{account:{url:i,displayName:a,username:s,emojis:c,bot:l,group:u},id:f,poll:h,spoilerText:m,language:d,editedAt:p,createdAt:v,content:y,mediaAttachments:E,url:b,emojis:w}=t,k=oa(t,e);return o("div",{id:"embed-post",class:"sheet",children:[!!n&&o("button",{type:"button",class:"sheet-close",onClick:n,children:o(R,{icon:"x",alt:r({id:"yz7wBu"})})}),o("header",{children:o("h2",{children:o(P,{id:"jdVwsS"})})}),o("main",{tabIndex:"-1",children:[o("h3",{children:o(P,{id:"GkS6YG"})}),o("textarea",{class:"embed-code",readonly:!0,onClick:g=>{g.target.select()},dir:"auto",children:k}),o("button",{type:"button",onClick:()=>{try{navigator.clipboard.writeText(k),Lt(r({id:"bl7nrg"}))}catch{Lt(r({id:"/KEBaP"}))}},children:[o(R,{icon:"clipboard"})," ",o("span",{children:o(P,{id:"he3ygx"})})]}),!!(E!=null&&E.length)&&o("section",{children:[o("p",{children:o(P,{id:"/2mUza"})}),o("ol",{class:"links-list",children:E.map(g=>o("li",{children:o("a",{href:g.remoteUrl||g.url,target:"_blank",download:!0,children:g.remoteUrl||g.url})},g.id))})]}),!!(c!=null&&c.length)&&o("section",{children:[o("p",{children:o(P,{id:"AeM/di"})}),o("ul",{children:c.map(g=>o("li",{children:[o("picture",{children:[o("source",{srcset:g.staticUrl,media:"(prefers-reduced-motion: reduce)"}),o("img",{class:"shortcode-emoji emoji",src:g.url,alt:`:${g.shortcode}:`,width:"16",height:"16",loading:"lazy",decoding:"async"})]})," ",o("code",{children:[":",g.shortcode,":"]})," (",o("a",{href:g.url,target:"_blank",download:!0,children:"URL"}),")",g.staticUrl?o($,{children:[" ","(",o("a",{href:g.staticUrl,target:"_blank",download:!0,children:o(P,{id:"xiropL"})}),")"]}):null]},g.shortcode))})]}),!!(w!=null&&w.length)&&o("section",{children:[o("p",{children:o(P,{id:"jzjjJh"})}),o("ul",{children:w.map(g=>o("li",{children:[o("picture",{children:[o("source",{srcset:g.staticUrl,media:"(prefers-reduced-motion: reduce)"}),o("img",{class:"shortcode-emoji emoji",src:g.url,alt:`:${g.shortcode}:`,width:"16",height:"16",loading:"lazy",decoding:"async"})]})," ",o("code",{children:[":",g.shortcode,":"]})," (",o("a",{href:g.url,target:"_blank",download:!0,children:"URL"}),")",g.staticUrl?o($,{children:[" ","(",o("a",{href:g.staticUrl,target:"_blank",download:!0,children:o(P,{id:"xiropL"})}),")"]}):null]},g.shortcode))})]}),o("section",{children:o("small",{children:[o("p",{children:o(P,{id:"TnJgwX"})}),o("ul",{children:[o("li",{children:o(P,{id:"0OHPem"})}),o("li",{children:o(P,{id:"AzZ5zv"})}),o("li",{children:o(P,{id:"NU7wa/"})}),o("li",{children:o(P,{id:"R4PmPA"})})]})]})}),o("h3",{children:o(P,{id:"rdUucN"})}),o("output",{class:"embed-preview",dangerouslySetInnerHTML:{__html:k},dir:"auto"}),o("p",{children:o("small",{children:o(P,{id:"j0kZfi"})})})]})]})}const Ne=_e((t,e)=>{let{checked:n,count:r,class:i,title:a,alt:s,size:c,icon:l,iconSize:u="l",onClick:f,...h}=t;typeof a=="string"&&(a=[a,a]),typeof s=="string"&&(s=[s,s]);const[m,d]=H(a[0]||""),[p,v]=H(s[0]||"");return tt(()=>{n?(d(a[1]||""),v(s[1]||"")):(d(a[0]||""),v(s[0]||""))},[n,a,s]),o("button",{ref:e,type:"button",title:m,class:`plain ${c?"small":""} ${i} ${n?"checked":""}`,onClick:y=>{f&&(y.preventDefault(),y.stopPropagation(),f(y))},...h,children:[o(R,{icon:l,size:u,alt:p}),!!r&&o($,{children:[" ",o("small",{title:r,children:oe(r)})]})]})});function Zd(t){if(!t)return;const e=URL.parse(t),{host:n,pathname:r}=e,i=r.replace(/\/$/,""),[a,s,c]=i.match(/\/(@[^\/]+)\/(.*)/)||[];return o($,{children:[zs.toUnicode(n),s?o($,{children:["/",s,o("wbr",{}),o("span",{class:"more-insignificant",children:["/",c]})]}):o("span",{class:"more-insignificant",children:i})]})}function qd({sKey:t}){const n=xn(V).statusReply[t];if(!n)return null;const{id:r,instance:i}=n,a=is(r,i);if(!a)return null;const{sensitive:s,spoilerText:c,account:{avatar:l,avatarStatic:u,bot:f}={},visibility:h,content:m,language:d,filtered:p}=a;if(s||c||!m)return null;const v=ie(r,i),y=xs(a),E=Ot(Qs),b=Ro(p,E);if((b==null?void 0:b.action)==="hide")return null;const w=(b==null?void 0:b.titlesStr)||"";return o("article",{class:`status compact-reply ${h==="direct"?"visibility-direct":""}`,tabindex:"-1","data-state-post-id":v,children:[o(ae,{url:u||l,squircle:f}),o("div",{class:"content-compact",title:y,lang:d,dir:"auto",children:b?o("b",{class:"status-filtered-badge badge-meta",title:w,children:[o("span",{children:o(P,{id:"03Qqf9"})}),o("span",{children:w})]}):o("span",{children:y})})]})}function Gd({status:t,filterInfo:e,instance:n,containerProps:r={},showFollowedTags:i,quoted:a}){var W;const{_:s,_:c}=ne(),l=xn(V),{id:u,account:{avatar:f,avatarStatic:h,bot:m,group:d},createdAt:p,visibility:v,reblog:y}=t,E=!!y,b=(e==null?void 0:e.titlesStr)||"",w=new Date(p),k=xs(t.reblog||t),[g,A]=H(!1),T=As(()=>{A(!0)},{threshold:600,captureEvent:!0,detect:"touch",cancelOnMovement:2}),D=or(),M=ie(t.id,n),L=ie(t.id,n)+" "+(ie(y==null?void 0:y.id,n)||""),C=(y==null?void 0:y.id)||u,x=n?`/${n}/s/${C}`:`/s/${C}`,F=i&&!!((W=l.statusFollowedTags[M])!=null&&W.length);return o("div",{class:a?"":E?d?"status-group":"status-reblog":F?"status-followed-tags":"",...r,onContextMenu:j=>{j.preventDefault(),A(!0)},...T(),children:[o("article",{"data-state-post-id":L,class:`status filtered ${a?"status-card":""}`,tabindex:"-1",children:[o("b",{class:"status-filtered-badge clickable badge-meta",title:b,onClick:j=>{j.preventDefault(),A(!0)},children:[o("span",{children:o(P,{id:"03Qqf9"})}),o("span",{children:b})]})," ",o(ae,{url:h||f,squircle:m}),o("span",{class:"status-filtered-info",children:[o("span",{class:"status-filtered-info-1",children:E?o(P,{id:"zJyf/5",components:{0:o(ve,{account:t.account,instance:n}),1:o(R,{icon:bn[v],alt:s(xe[v]),size:"s"})}}):F?o($,{children:[o(ve,{account:t.account,instance:n})," ",o(R,{icon:bn[v],alt:s(xe[v]),size:"s"})," ",o("span",{children:l.statusFollowedTags[M].slice(0,3).map(j=>o("span",{class:"status-followed-tag-item",children:["#",j]},j))})]}):o($,{children:[o(ve,{account:t.account,instance:n})," ",o(R,{icon:bn[v],alt:s(xe[v]),size:"s"})," ",o(se,{datetime:w,format:"micro"})]})}),o("span",{class:"status-filtered-info-2",children:[E&&o($,{children:[o(ae,{url:y.account.avatarStatic||y.account.avatar,squircle:m})," "]}),k]})]})]}),!!g&&o(io,{onClick:j=>{j.target===j.currentTarget&&A(!1)},children:o("div",{id:"filtered-status-peek",class:"sheet",children:[o("button",{type:"button",class:"sheet-close",onClick:()=>A(!1),children:o(R,{icon:"x",alt:c({id:"yz7wBu"})})}),o("header",{children:[o("b",{class:"status-filtered-badge",children:o(P,{id:"03Qqf9"})})," ",b]}),o("main",{tabIndex:"-1",children:o(je,{ref:D,class:"status-link",to:x,onClick:()=>{A(!1)},"data-read-more":s(En),children:o(qe,{status:t,instance:n,size:"s",readOnly:!0})})})]})})]})}const Yd=Ge(({id:t,instance:e,level:n=0})=>{if(!t||!e)return;const{_:r}=ne(),i=xn(V),a=ie(t,e),s=i.statusQuotes[a],c=s==null?void 0:s.filter((l,u,f)=>f.findIndex(h=>h.url===l.url)===u);if(c!=null&&c.length&&!(n>2))return c.map(l=>o(js,{id:l.instance+l.id,children:o(je,{to:`${l.instance?`/${l.instance}`:""}/s/${l.id}`,class:"status-card-link","data-read-more":r(En),children:o(qe,{statusID:l.id,instance:l.instance,size:"s",quoted:n+1,enableCommentHint:!0})},l.instance+l.id)}))}),oh=Ge(qe,(t,e)=>{const{status:n,...r}=t,{status:i,...a}=e;return(n==null?void 0:n.id)===(i==null?void 0:i.id)&&Ka(r,a)});var Zi=36,ia="";for(;Zi--;)ia+=Zi.toString(36);function ih(t){for(var e="",n=t||11;n--;)e+=ia[Math.random()*36|0];return e}function ce(t){return Array.isArray?Array.isArray(t):ca(t)==="[object Array]"}const Xd=1/0;function Qd(t){if(typeof t=="string")return t;let e=t+"";return e=="0"&&1/t==-Xd?"-0":e}function Jd(t){return t==null?"":Qd(t)}function Jt(t){return typeof t=="string"}function sa(t){return typeof t=="number"}function tf(t){return t===!0||t===!1||ef(t)&&ca(t)=="[object Boolean]"}function aa(t){return typeof t=="object"}function ef(t){return aa(t)&&t!==null}function Kt(t){return t!=null}function Xr(t){return!t.trim().length}function ca(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const nf="Incorrect 'index' type",rf=t=>`Invalid value for key ${t}`,of=t=>`Pattern length exceeds max of ${t}.`,sf=t=>`Missing ${t} property in key`,af=t=>`Property 'weight' in key '${t}' must be a positive integer`,qi=Object.prototype.hasOwnProperty;class cf{constructor(e){this._keys=[],this._keyMap={};let n=0;e.forEach(r=>{let i=la(r);this._keys.push(i),this._keyMap[i.id]=i,n+=i.weight}),this._keys.forEach(r=>{r.weight/=n})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function la(t){let e=null,n=null,r=null,i=1,a=null;if(Jt(t)||ce(t))r=t,e=Gi(t),n=mo(t);else{if(!qi.call(t,"name"))throw new Error(sf("name"));const s=t.name;if(r=s,qi.call(t,"weight")&&(i=t.weight,i<=0))throw new Error(af(s));e=Gi(s),n=mo(s),a=t.getFn}return{path:e,id:n,weight:i,src:r,getFn:a}}function Gi(t){return ce(t)?t:t.split(".")}function mo(t){return ce(t)?t.join("."):t}function lf(t,e){let n=[],r=!1;const i=(a,s,c)=>{if(Kt(a))if(!s[c])n.push(a);else{let l=s[c];const u=a[l];if(!Kt(u))return;if(c===s.length-1&&(Jt(u)||sa(u)||tf(u)))n.push(Jd(u));else if(ce(u)){r=!0;for(let f=0,h=u.length;f<h;f+=1)i(u[f],s,c+1)}else s.length&&i(u,s,c+1)}};return i(t,Jt(e)?e.split("."):e,0),r?n:n[0]}const uf={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},df={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},ff={location:0,threshold:.6,distance:100},hf={useExtendedSearch:!1,getFn:lf,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var z={...df,...uf,...ff,...hf};const mf=/[^ ]+/g;function pf(t=1,e=3){const n=new Map,r=Math.pow(10,e);return{get(i){const a=i.match(mf).length;if(n.has(a))return n.get(a);const s=1/Math.pow(a,.5*t),c=parseFloat(Math.round(s*r)/r);return n.set(a,c),c},clear(){n.clear()}}}class Mo{constructor({getFn:e=z.getFn,fieldNormWeight:n=z.fieldNormWeight}={}){this.norm=pf(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,r)=>{this._keysMap[n.id]=r})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,Jt(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();Jt(e)?this._addString(e,n):this._addObject(e,n)}removeAt(e){this.records.splice(e,1);for(let n=e,r=this.size();n<r;n+=1)this.records[n].i-=1}getValueForItemAtKeyId(e,n){return e[this._keysMap[n]]}size(){return this.records.length}_addString(e,n){if(!Kt(e)||Xr(e))return;let r={v:e,i:n,n:this.norm.get(e)};this.records.push(r)}_addObject(e,n){let r={i:n,$:{}};this.keys.forEach((i,a)=>{let s=i.getFn?i.getFn(e):this.getFn(e,i.path);if(Kt(s)){if(ce(s)){let c=[];const l=[{nestedArrIndex:-1,value:s}];for(;l.length;){const{nestedArrIndex:u,value:f}=l.pop();if(Kt(f))if(Jt(f)&&!Xr(f)){let h={v:f,i:u,n:this.norm.get(f)};c.push(h)}else ce(f)&&f.forEach((h,m)=>{l.push({nestedArrIndex:m,value:h})})}r.$[a]=c}else if(Jt(s)&&!Xr(s)){let c={v:s,n:this.norm.get(s)};r.$[a]=c}}}),this.records.push(r)}toJSON(){return{keys:this.keys,records:this.records}}}function ua(t,e,{getFn:n=z.getFn,fieldNormWeight:r=z.fieldNormWeight}={}){const i=new Mo({getFn:n,fieldNormWeight:r});return i.setKeys(t.map(la)),i.setSources(e),i.create(),i}function gf(t,{getFn:e=z.getFn,fieldNormWeight:n=z.fieldNormWeight}={}){const{keys:r,records:i}=t,a=new Mo({getFn:e,fieldNormWeight:n});return a.setKeys(r),a.setIndexRecords(i),a}function tr(t,{errors:e=0,currentLocation:n=0,expectedLocation:r=0,distance:i=z.distance,ignoreLocation:a=z.ignoreLocation}={}){const s=e/t.length;if(a)return s;const c=Math.abs(r-n);return i?s+c/i:c?1:s}function vf(t=[],e=z.minMatchCharLength){let n=[],r=-1,i=-1,a=0;for(let s=t.length;a<s;a+=1){let c=t[a];c&&r===-1?r=a:!c&&r!==-1&&(i=a-1,i-r+1>=e&&n.push([r,i]),r=-1)}return t[a-1]&&a-r>=e&&n.push([r,a-1]),n}const ke=32;function _f(t,e,n,{location:r=z.location,distance:i=z.distance,threshold:a=z.threshold,findAllMatches:s=z.findAllMatches,minMatchCharLength:c=z.minMatchCharLength,includeMatches:l=z.includeMatches,ignoreLocation:u=z.ignoreLocation}={}){if(e.length>ke)throw new Error(of(ke));const f=e.length,h=t.length,m=Math.max(0,Math.min(r,h));let d=a,p=m;const v=c>1||l,y=v?Array(h):[];let E;for(;(E=t.indexOf(e,p))>-1;){let T=tr(e,{currentLocation:E,expectedLocation:m,distance:i,ignoreLocation:u});if(d=Math.min(T,d),p=E+f,v){let D=0;for(;D<f;)y[E+D]=1,D+=1}}p=-1;let b=[],w=1,k=f+h;const g=1<<f-1;for(let T=0;T<f;T+=1){let D=0,M=k;for(;D<M;)tr(e,{errors:T,currentLocation:m+M,expectedLocation:m,distance:i,ignoreLocation:u})<=d?D=M:k=M,M=Math.floor((k-D)/2+D);k=M;let L=Math.max(1,m-M+1),C=s?h:Math.min(m+M,h)+f,x=Array(C+2);x[C+1]=(1<<T)-1;for(let W=C;W>=L;W-=1){let j=W-1,et=n[t.charAt(j)];if(v&&(y[j]=+!!et),x[W]=(x[W+1]<<1|1)&et,T&&(x[W]|=(b[W+1]|b[W])<<1|1|b[W+1]),x[W]&g&&(w=tr(e,{errors:T,currentLocation:j,expectedLocation:m,distance:i,ignoreLocation:u}),w<=d)){if(d=w,p=j,p<=m)break;L=Math.max(1,2*m-p)}}if(tr(e,{errors:T+1,currentLocation:m,expectedLocation:m,distance:i,ignoreLocation:u})>d)break;b=x}const A={isMatch:p>=0,score:Math.max(.001,w)};if(v){const T=vf(y,c);T.length?l&&(A.indices=T):A.isMatch=!1}return A}function yf(t){let e={};for(let n=0,r=t.length;n<r;n+=1){const i=t.charAt(n);e[i]=(e[i]||0)|1<<r-n-1}return e}const dr=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 da{constructor(e,{location:n=z.location,threshold:r=z.threshold,distance:i=z.distance,includeMatches:a=z.includeMatches,findAllMatches:s=z.findAllMatches,minMatchCharLength:c=z.minMatchCharLength,isCaseSensitive:l=z.isCaseSensitive,ignoreDiacritics:u=z.ignoreDiacritics,ignoreLocation:f=z.ignoreLocation}={}){if(this.options={location:n,threshold:r,distance:i,includeMatches:a,findAllMatches:s,minMatchCharLength:c,isCaseSensitive:l,ignoreDiacritics:u,ignoreLocation:f},e=l?e:e.toLowerCase(),e=u?dr(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const h=(d,p)=>{this.chunks.push({pattern:d,alphabet:yf(d),startIndex:p})},m=this.pattern.length;if(m>ke){let d=0;const p=m%ke,v=m-p;for(;d<v;)h(this.pattern.substr(d,ke),d),d+=ke;if(p){const y=m-ke;h(this.pattern.substr(y),y)}}else h(this.pattern,0)}searchIn(e){const{isCaseSensitive:n,ignoreDiacritics:r,includeMatches:i}=this.options;if(e=n?e:e.toLowerCase(),e=r?dr(e):e,this.pattern===e){let v={isMatch:!0,score:0};return i&&(v.indices=[[0,e.length-1]]),v}const{location:a,distance:s,threshold:c,findAllMatches:l,minMatchCharLength:u,ignoreLocation:f}=this.options;let h=[],m=0,d=!1;this.chunks.forEach(({pattern:v,alphabet:y,startIndex:E})=>{const{isMatch:b,score:w,indices:k}=_f(e,v,y,{location:a+E,distance:s,threshold:c,findAllMatches:l,minMatchCharLength:u,includeMatches:i,ignoreLocation:f});b&&(d=!0),m+=w,b&&k&&(h=[...h,...k])});let p={isMatch:d,score:d?m/this.chunks.length:1};return d&&i&&(p.indices=h),p}}class ye{constructor(e){this.pattern=e}static isMultiMatch(e){return Yi(e,this.multiRegex)}static isSingleMatch(e){return Yi(e,this.singleRegex)}search(){}}function Yi(t,e){const n=t.match(e);return n?n[1]:null}class bf extends ye{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 Ef extends ye{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const r=e.indexOf(this.pattern)===-1;return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}}}class wf extends ye{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 Tf extends ye{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 Af extends ye{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 Cf extends ye{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 ye{constructor(e,{location:n=z.location,threshold:r=z.threshold,distance:i=z.distance,includeMatches:a=z.includeMatches,findAllMatches:s=z.findAllMatches,minMatchCharLength:c=z.minMatchCharLength,isCaseSensitive:l=z.isCaseSensitive,ignoreDiacritics:u=z.ignoreDiacritics,ignoreLocation:f=z.ignoreLocation}={}){super(e),this._bitapSearch=new da(e,{location:n,threshold:r,distance:i,includeMatches:a,findAllMatches:s,minMatchCharLength:c,isCaseSensitive:l,ignoreDiacritics:u,ignoreLocation:f})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class ha extends ye{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let n=0,r;const i=[],a=this.pattern.length;for(;(r=e.indexOf(this.pattern,n))>-1;)n=r+a,i.push([r,n-1]);const s=!!i.length;return{isMatch:s,score:s?0:1,indices:i}}}const po=[bf,ha,wf,Tf,Cf,Af,Ef,fa],Xi=po.length,Sf=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,kf="|";function xf(t,e={}){return t.split(kf).map(n=>{let r=n.trim().split(Sf).filter(a=>a&&!!a.trim()),i=[];for(let a=0,s=r.length;a<s;a+=1){const c=r[a];let l=!1,u=-1;for(;!l&&++u<Xi;){const f=po[u];let h=f.isMultiMatch(c);h&&(i.push(new f(h,e)),l=!0)}if(!l)for(u=-1;++u<Xi;){const f=po[u];let h=f.isSingleMatch(c);if(h){i.push(new f(h,e));break}}}return i})}const If=new Set([fa.type,ha.type]);class Df{constructor(e,{isCaseSensitive:n=z.isCaseSensitive,ignoreDiacritics:r=z.ignoreDiacritics,includeMatches:i=z.includeMatches,minMatchCharLength:a=z.minMatchCharLength,ignoreLocation:s=z.ignoreLocation,findAllMatches:c=z.findAllMatches,location:l=z.location,threshold:u=z.threshold,distance:f=z.distance}={}){this.query=null,this.options={isCaseSensitive:n,ignoreDiacritics:r,includeMatches:i,minMatchCharLength:a,findAllMatches:c,ignoreLocation:s,location:l,threshold:u,distance:f},e=n?e:e.toLowerCase(),e=r?dr(e):e,this.pattern=e,this.query=xf(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:r,isCaseSensitive:i,ignoreDiacritics:a}=this.options;e=i?e:e.toLowerCase(),e=a?dr(e):e;let s=0,c=[],l=0;for(let u=0,f=n.length;u<f;u+=1){const h=n[u];c.length=0,s=0;for(let m=0,d=h.length;m<d;m+=1){const p=h[m],{isMatch:v,indices:y,score:E}=p.search(e);if(v){if(s+=1,l+=E,r){const b=p.constructor.type;If.has(b)?c=[...c,...y]:c.push(y)}}else{l=0,s=0,c.length=0;break}}if(s){let m={isMatch:!0,score:l/s};return r&&(m.indices=c),m}}return{isMatch:!1,score:1}}}const go=[];function Lf(...t){go.push(...t)}function vo(t,e){for(let n=0,r=go.length;n<r;n+=1){let i=go[n];if(i.condition(t,e))return new i(t,e)}return new da(t,e)}const fr={AND:"$and",OR:"$or"},_o={PATH:"$path",PATTERN:"$val"},yo=t=>!!(t[fr.AND]||t[fr.OR]),Rf=t=>!!t[_o.PATH],Mf=t=>!ce(t)&&aa(t)&&!yo(t),Qi=t=>({[fr.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});function ma(t,e,{auto:n=!0}={}){const r=i=>{let a=Object.keys(i);const s=Rf(i);if(!s&&a.length>1&&!yo(i))return r(Qi(i));if(Mf(i)){const l=s?i[_o.PATH]:a[0],u=s?i[_o.PATTERN]:i[l];if(!Jt(u))throw new Error(rf(l));const f={keyId:mo(l),pattern:u};return n&&(f.searcher=vo(u,e)),f}let c={children:[],operator:a[0]};return a.forEach(l=>{const u=i[l];ce(u)&&u.forEach(f=>{c.children.push(r(f))})}),c};return yo(t)||(t=Qi(t)),r(t)}function Pf(t,{ignoreFieldNorm:e=z.ignoreFieldNorm}){t.forEach(n=>{let r=1;n.matches.forEach(({key:i,norm:a,score:s})=>{const c=i?i.weight:null;r*=Math.pow(s===0&&c?Number.EPSILON:s,(c||1)*(e?1:a))}),n.score=r})}function Of(t,e){const n=t.matches;e.matches=[],Kt(n)&&n.forEach(r=>{if(!Kt(r.indices)||!r.indices.length)return;const{indices:i,value:a}=r;let s={indices:i,value:a};r.key&&(s.key=r.key.src),r.idx>-1&&(s.refIndex=r.idx),e.matches.push(s)})}function $f(t,e){e.score=t.score}function Ff(t,e,{includeMatches:n=z.includeMatches,includeScore:r=z.includeScore}={}){const i=[];return n&&i.push(Of),r&&i.push($f),t.map(a=>{const{idx:s}=a,c={item:e[s],refIndex:s};return i.length&&i.forEach(l=>{l(a,c)}),c})}class In{constructor(e,n={},r){this.options={...z,...n},this.options.useExtendedSearch,this._keyStore=new cf(this.options.keys),this.setCollection(e,r)}setCollection(e,n){if(this._docs=e,n&&!(n instanceof Mo))throw new Error(nf);this._myIndex=n||ua(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){Kt(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const n=[];for(let r=0,i=this._docs.length;r<i;r+=1){const a=this._docs[r];e(a,r)&&(this.removeAt(r),r-=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:r,includeScore:i,shouldSort:a,sortFn:s,ignoreFieldNorm:c}=this.options;let l=Jt(e)?Jt(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return Pf(l,{ignoreFieldNorm:c}),a&&l.sort(s),sa(n)&&n>-1&&(l=l.slice(0,n)),Ff(l,this._docs,{includeMatches:r,includeScore:i})}_searchStringList(e){const n=vo(e,this.options),{records:r}=this._myIndex,i=[];return r.forEach(({v:a,i:s,n:c})=>{if(!Kt(a))return;const{isMatch:l,score:u,indices:f}=n.searchIn(a);l&&i.push({item:a,idx:s,matches:[{score:u,value:a,norm:c,indices:f}]})}),i}_searchLogical(e){const n=ma(e,this.options),r=(c,l,u)=>{if(!c.children){const{keyId:h,searcher:m}=c,d=this._findMatches({key:this._keyStore.get(h),value:this._myIndex.getValueForItemAtKeyId(l,h),searcher:m});return d&&d.length?[{idx:u,item:l,matches:d}]:[]}const f=[];for(let h=0,m=c.children.length;h<m;h+=1){const d=c.children[h],p=r(d,l,u);if(p.length)f.push(...p);else if(c.operator===fr.AND)return[]}return f},i=this._myIndex.records,a={},s=[];return i.forEach(({$:c,i:l})=>{if(Kt(c)){let u=r(n,c,l);u.length&&(a[l]||(a[l]={idx:l,item:c,matches:[]},s.push(a[l])),u.forEach(({matches:f})=>{a[l].matches.push(...f)}))}}),s}_searchObjectList(e){const n=vo(e,this.options),{keys:r,records:i}=this._myIndex,a=[];return i.forEach(({$:s,i:c})=>{if(!Kt(s))return;let l=[];r.forEach((u,f)=>{l.push(...this._findMatches({key:u,value:s[f],searcher:n}))}),l.length&&a.push({idx:c,item:s,matches:l})}),a}_findMatches({key:e,value:n,searcher:r}){if(!Kt(n))return[];let i=[];if(ce(n))n.forEach(({v:a,i:s,n:c})=>{if(!Kt(a))return;const{isMatch:l,score:u,indices:f}=r.searchIn(a);l&&i.push({score:u,key:e,value:a,idx:s,norm:c,indices:f})});else{const{v:a,n:s}=n,{isMatch:c,score:l,indices:u}=r.searchIn(a);c&&i.push({score:l,key:e,value:a,norm:s,indices:u})}return i}}In.version="7.1.0";In.createIndex=ua;In.parseIndex=gf;In.config=z;In.parseQuery=ma;Lf(Df);const Nf=6*60*1e3,Bf=90*24*60*60*1e3;function sh({scheduledAt:t,setScheduledAt:e}){if(!t||!(t instanceof Date))return;const[n,r]=H(),[i,a]=H(),s=t.getTimezoneOffset();tt(()=>{function l(){const h=new Date(Date.now()+Nf),m=new Date(h.getTime()-s*6e4).toISOString().slice(0,16);r(m)}l();function u(){const h=new Date(Date.now()+Bf),m=new Date(h.getTime()-s*6e4).toISOString().slice(0,16);a(m)}u();const f=setInterval(()=>{l(),u()},1e3*10);return()=>clearInterval(f)},[]);const c=t?new Date(t.getTime()-t.getTimezoneOffset()*6e4).toISOString().slice(0,16):null;return o("input",{type:"datetime-local",name:"scheduledAt",defaultValue:c,min:n,max:i,required:!0,onChange:l=>{e(new Date(l.target.value))}})}function ah(){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{ih as $,ae as A,qf as B,ms as C,Gf as D,Ze as E,oh as F,Zf as G,vn as H,R as I,As as J,Oi as K,je as L,pi as M,ve as N,ao as O,Lo as P,fo as Q,se as R,sl as S,Mu as T,co as U,Ro as V,or as W,td as X,Qs as Y,Ju as Z,Yf as _,Be as a,Wr as a0,lo as a1,Hf as a2,Hc as a3,Uf as a4,In as a5,ah as a6,sh as a7,vu as a8,uc as a9,Is as aa,cl as ab,nd as ac,Nf as ad,bn as ae,Ue as af,qc as b,Kn as c,ks as d,cn as e,bt as f,xs as g,io as h,Ds as i,kr as j,Ls as k,un as l,qn as m,Cn as n,Yc as o,jf as p,Kf as q,zs as r,Lt as s,Tl as t,Vf as u,Wf as v,Vs as w,su as x,oe as y,gr as z};
|
||
//# sourceMappingURL=ScheduledAtField-Cb8CBR7l.js.map
|