phanpy-cz/assets/fuse-Iwa_1AAn.js

190 lines
193 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

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

import{ad as lt,Q as ze,c as r,h as Z,t as Me,A as $,_ as Ct,y as ee,ae as ka,E as vr,i as S,af as I,ag as Ia,d as Yo,ah as io,ai as Aa,l as ae,P as Pt,p as Wi,aj as Ca,ak as Ki,O as Zi,f as F,C as Jt,V as Oe,q as Pa,s as B,al as La,j as po,a as so,z as bn,B as Ma,am as Ra,T as O,an as Gi,ao as Oa,ap as qi,r as mo,w as Yi,g as _r,aq as Da,ar as Ne,as as $a,at as Na,au as Un,J as it,u as In,b as ft,W as Xi,av as Fa,aw as za,ax as Va}from"./useTitle-twbEvXzq.js";function Xo(){return Xo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Xo.apply(null,arguments)}var Qi=["shift","alt","meta","mod","ctrl"],Ha={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 pt(e){return(e&&Ha[e]||e||"").trim().toLowerCase().replace(/key|digit|numpad|arrow/,"")}function Ba(e){return Qi.includes(e)}function Io(e,t){return t===void 0&&(t=","),e.split(t)}function Ao(e,t,n){t===void 0&&(t="+");var o=e.toLocaleLowerCase().split(t).map(function(a){return pt(a)}),i={alt:o.includes("alt"),ctrl:o.includes("ctrl")||o.includes("control"),shift:o.includes("shift"),meta:o.includes("meta"),mod:o.includes("mod")},s=o.filter(function(a){return!Qi.includes(a)});return Xo({},i,{keys:s,description:n,hotkey:e})}(function(){typeof document<"u"&&(document.addEventListener("keydown",function(e){e.key!==void 0&&Ji([pt(e.key),pt(e.code)])}),document.addEventListener("keyup",function(e){e.key!==void 0&&es([pt(e.key),pt(e.code)])})),typeof window<"u"&&window.addEventListener("blur",function(){mt.clear()})})();var mt=new Set;function yr(e){return Array.isArray(e)}function Ua(e,t){t===void 0&&(t=",");var n=yr(e)?e:e.split(t);return n.every(function(o){return mt.has(o.trim().toLowerCase())})}function Ji(e){var t=Array.isArray(e)?e:[e];mt.has("meta")&&mt.forEach(function(n){return!Ba(n)&&mt.delete(n.toLowerCase())}),t.forEach(function(n){return mt.add(n.toLowerCase())})}function es(e){var t=Array.isArray(e)?e:[e];e==="meta"?mt.clear():t.forEach(function(n){return mt.delete(n.toLowerCase())})}function ja(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function Wa(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function Ka(e){return ts(e,["input","textarea","select"])}function ts(e,t){t===void 0&&(t=!1);var n=e.target,o=e.composed,i=null;return Za(n)&&o?i=e.composedPath()[0]&&e.composedPath()[0].tagName:i=n&&n.tagName,yr(t)?!!(i&&t&&t.some(function(s){var a;return s.toLowerCase()===((a=i)==null?void 0:a.toLowerCase())})):!!(i&&t&&t)}function Za(e){return!!e.tagName&&!e.tagName.startsWith("-")&&e.tagName.includes("-")}function Ga(e,t){return e.length===0&&t?(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):t?e.some(function(n){return t.includes(n)})||e.includes("*"):!0}var qa=function(t,n,o){o===void 0&&(o=!1);var i=n.alt,s=n.meta,a=n.mod,c=n.shift,l=n.ctrl,d=n.keys,f=t.key,u=t.code,p=t.ctrlKey,h=t.metaKey,m=t.shiftKey,g=t.altKey,_=pt(u),T=f.toLowerCase();if(!(d!=null&&d.includes(_))&&!(d!=null&&d.includes(T))&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(_))return!1;if(!o){if(i===!g&&T!=="alt"||c===!m&&T!=="shift")return!1;if(a){if(!h&&!p)return!1}else if(s===!h&&T!=="meta"&&T!=="os"||l===!p&&T!=="ctrl"&&T!=="control")return!1}return d&&d.length===1&&(d.includes(T)||d.includes(_))?!0:d?Ua(d):!d},Ya=lt(void 0),Xa=function(){return ze(Ya)};function ns(e,t){return e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(e).length===Object.keys(t).length&&Object.keys(e).reduce(function(n,o){return n&&ns(e[o],t[o])},!0):e===t}var Qa=lt({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),Ja=function(){return ze(Qa)};function ec(e){var t=$(void 0);return ns(t.current,e)||(t.current=e),t.current}var ei=function(t){t.stopPropagation(),t.preventDefault(),t.stopImmediatePropagation()},tc=typeof window<"u"?Ct:ee;function Ut(e,t,n,o){var i=Z(null),s=i[0],a=i[1],c=$(!1),l=n instanceof Array?o instanceof Array?void 0:o:n,d=yr(e)?e.join(l==null?void 0:l.splitKey):e,f=n instanceof Array?n:o instanceof Array?o:void 0,u=Me(t,f??[]),p=$(u);f?p.current=u:p.current=t;var h=ec(l),m=Ja(),g=m.enabledScopes,_=Xa();return tc(function(){if(!((h==null?void 0:h.enabled)===!1||!Ga(g,h==null?void 0:h.scopes))){var T=function(b,k){var D;if(k===void 0&&(k=!1),!(Ka(b)&&!ts(b,h==null?void 0:h.enableOnFormTags))){if(s!==null){var L=s.getRootNode();if((L instanceof Document||L instanceof ShadowRoot)&&L.activeElement!==s&&!s.contains(L.activeElement)){ei(b);return}}(D=b.target)!=null&&D.isContentEditable&&!(h!=null&&h.enableOnContentEditable)||Io(d,h==null?void 0:h.splitKey).forEach(function(A){var C,R=Ao(A,h==null?void 0:h.combinationKey);if(qa(b,R,h==null?void 0:h.ignoreModifiers)||(C=R.keys)!=null&&C.includes("*")){if(h!=null&&h.ignoreEventWhen!=null&&h.ignoreEventWhen(b)||k&&c.current)return;if(ja(b,R,h==null?void 0:h.preventDefault),!Wa(b,R,h==null?void 0:h.enabled)){ei(b);return}p.current(b,R),k||(c.current=!0)}})}},y=function(b){b.key!==void 0&&(Ji(pt(b.code)),((h==null?void 0:h.keydown)===void 0&&(h==null?void 0:h.keyup)!==!0||h!=null&&h.keydown)&&T(b))},w=function(b){b.key!==void 0&&(es(pt(b.code)),c.current=!1,h!=null&&h.keyup&&T(b,!0))},E=s||(l==null?void 0:l.document)||document;return E.addEventListener("keyup",w),E.addEventListener("keydown",y),_&&Io(d,h==null?void 0:h.splitKey).forEach(function(x){return _.addHotkey(Ao(x,h==null?void 0:h.combinationKey,h==null?void 0:h.description))}),function(){E.removeEventListener("keyup",w),E.removeEventListener("keydown",y),_&&Io(d,h==null?void 0:h.splitKey).forEach(function(x){return _.removeHotkey(Ao(x,h==null?void 0:h.combinationKey,h==null?void 0:h.description))})}}},[s,d,h,g]),a}var br={exports:{}};/*!
* Toastify js 1.12.0
* https://github.com/apvarun/toastify-js
* @license MIT licensed
*
* Copyright (C) 2018 Varun A P
*/var jf=br.exports;(function(e){(function(t,n){e.exports?e.exports=n():t.Toastify=n()})(ka,function(t){var n=function(a){return new n.lib.init(a)},o="1.12.0";n.defaults={oldestFirst:!0,text:"Toastify is awesome!",node:void 0,duration:3e3,selector:void 0,callback:function(){},destination:void 0,newWindow:!1,close:!1,gravity:"toastify-top",positionLeft:!1,position:"",backgroundColor:"",avatar:"",className:"",stopOnFocus:!0,onClick:function(){},offset:{x:0,y:0},escapeMarkup:!0,ariaLive:"polite",style:{background:""}},n.lib=n.prototype={toastify:o,constructor:n,init:function(a){return a||(a={}),this.options={},this.toastElement=null,this.options.text=a.text||n.defaults.text,this.options.node=a.node||n.defaults.node,this.options.duration=a.duration===0?0:a.duration||n.defaults.duration,this.options.selector=a.selector||n.defaults.selector,this.options.callback=a.callback||n.defaults.callback,this.options.destination=a.destination||n.defaults.destination,this.options.newWindow=a.newWindow||n.defaults.newWindow,this.options.close=a.close||n.defaults.close,this.options.gravity=a.gravity==="bottom"?"toastify-bottom":n.defaults.gravity,this.options.positionLeft=a.positionLeft||n.defaults.positionLeft,this.options.position=a.position||n.defaults.position,this.options.backgroundColor=a.backgroundColor||n.defaults.backgroundColor,this.options.avatar=a.avatar||n.defaults.avatar,this.options.className=a.className||n.defaults.className,this.options.stopOnFocus=a.stopOnFocus===void 0?n.defaults.stopOnFocus:a.stopOnFocus,this.options.onClick=a.onClick||n.defaults.onClick,this.options.offset=a.offset||n.defaults.offset,this.options.escapeMarkup=a.escapeMarkup!==void 0?a.escapeMarkup:n.defaults.escapeMarkup,this.options.ariaLive=a.ariaLive||n.defaults.ariaLive,this.options.style=a.style||n.defaults.style,a.backgroundColor&&(this.options.style.background=a.backgroundColor),this},buildToast:function(){if(!this.options)throw"Toastify is not initialized";var a=document.createElement("div");a.className="toastify on "+this.options.className,this.options.position?a.className+=" toastify-"+this.options.position:this.options.positionLeft===!0?(a.className+=" toastify-left",console.warn("Property `positionLeft` will be depreciated in further versions. Please use `position` instead.")):a.className+=" toastify-right",a.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)a.style[c]=this.options.style[c];if(this.options.ariaLive&&a.setAttribute("aria-live",this.options.ariaLive),this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE)a.appendChild(this.options.node);else if(this.options.escapeMarkup?a.innerText=this.options.text:a.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?a.appendChild(l):a.insertAdjacentElement("afterbegin",l)}if(this.options.close===!0){var d=document.createElement("button");d.type="button",d.setAttribute("aria-label","Close"),d.className="toast-close",d.innerHTML="&#10006;",d.addEventListener("click",(function(_){_.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?a.insertAdjacentElement("afterbegin",d):a.appendChild(d)}if(this.options.stopOnFocus&&this.options.duration>0){var u=this;a.addEventListener("mouseover",function(_){window.clearTimeout(a.timeOutValue)}),a.addEventListener("mouseleave",function(){a.timeOutValue=window.setTimeout(function(){u.removeElement(a)},u.options.duration)})}if(typeof this.options.destination<"u"&&a.addEventListener("click",(function(_){_.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"&&a.addEventListener("click",(function(_){_.stopPropagation(),this.options.onClick()}).bind(this)),typeof this.options.offset=="object"){var p=i("x",this.options),h=i("y",this.options),m=this.options.position=="left"?p:"-"+p,g=this.options.gravity=="toastify-top"?h:"-"+h;a.style.transform="translate("+m+","+g+")"}return a},showToast:function(){this.toastElement=this.buildToast();var a;if(typeof this.options.selector=="string"?a=document.getElementById(this.options.selector):this.options.selector instanceof HTMLElement||typeof ShadowRoot<"u"&&this.options.selector instanceof ShadowRoot?a=this.options.selector:a=document.body,!a)throw"Root element is not defined";var c=n.defaults.oldestFirst?a.firstChild:a.lastChild;return a.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(a){a.className=a.className.replace(" on",""),window.setTimeout((function(){this.options.node&&this.options.node.parentNode&&this.options.node.parentNode.removeChild(this.options.node),a.parentNode&&a.parentNode.removeChild(a),this.options.callback.call(a),n.reposition()}).bind(this),400)}},n.reposition=function(){for(var a={top:15,bottom:15},c={top:15,bottom:15},l={top:15,bottom:15},d=document.getElementsByClassName("toastify"),f,u=0;u<d.length;u++){s(d[u],"toastify-top")===!0?f="toastify-top":f="toastify-bottom";var p=d[u].offsetHeight;f=f.substr(9,f.length-1);var h=15,m=window.innerWidth>0?window.innerWidth:screen.width;m<=360?(d[u].style[f]=l[f]+"px",l[f]+=p+h):s(d[u],"toastify-left")===!0?(d[u].style[f]=a[f]+"px",a[f]+=p+h):(d[u].style[f]=c[f]+"px",c[f]+=p+h)}return this};function i(a,c){return c.offset[a]?isNaN(c.offset[a])?c.offset[a]:c.offset[a]+"px":"0px"}function s(a,c){return!a||typeof c!="string"?!1:!!(a.className&&a.className.trim().split(/\s+/gi).indexOf(c)>-1)}return n.lib.init.prototype=n.lib,n})})(br);var nc=br.exports;const oc=vr(nc);window._showToast=Re;function Re(e){typeof e=="string"&&(e={text:e});const{onClick:t,delay:n,...o}=e,i=oc({className:`${t||e.destination?"shiny-pill":""}`,gravity:"bottom",position:"center",...o,onClick:()=>{t==null||t(i)}});return n?setTimeout(()=>{i.showToast()},n):i.showToast(),i}function Wf(e,t,n,o){const i=$(e);ee(()=>{i.current=e},[e,n]),ee(()=>{!o||t===null||t===!1||i.current()},[o]),ee(()=>{if(t===null||t===!1)return;const a=setInterval(()=>i.current(),t);return()=>clearInterval(a)},[t])}function rc(e){const t=URL.parse("/compose/",window.location),{width:n,height:o}=window.screen,i=Math.max(0,(n-600)/2),s=Math.max(0,(o-450)/2),a=Math.min(n,600),c=Math.min(o,450),l=(e==null?void 0:e.uid)||Math.random(),d=window.open(t,"compose"+l,`width=${a},height=${c},left=${i},top=${s}`);return d?d.__COMPOSE__=e:alert(S._({id:"4S86wI"})),d}const ic=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);function sc(){if(ic){const e=document.createElement("input");e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.opacity="0",document.body.appendChild(e),e.focus(),setTimeout(()=>{document.body.removeChild(e)},500)}}const os={x:()=>I(()=>import("./icons/close-line-YTE7hIJE.js"),[],import.meta.url),heart:()=>I(()=>import("./icons/heart-line-VwvWYh8h.js"),[],import.meta.url),bookmark:()=>I(()=>import("./icons/bookmark-line-D6jQ7QFs.js"),[],import.meta.url),"check-circle":()=>I(()=>import("./icons/check-circle-line-sE41WGxF.js"),[],import.meta.url),"x-circle":()=>I(()=>import("./icons/close-circle-line-qd3g541O.js"),[],import.meta.url),transfer:()=>I(()=>import("./icons/transfer-4-line-Q9QJoxz3.js"),[],import.meta.url),rocket:()=>I(()=>import("./icons/rocket-line-rZbVYYCZ.js"),[],import.meta.url),"arrow-left":{module:()=>I(()=>import("./icons/arrow-left-line-_YC6-XGG.js"),[],import.meta.url),rtl:!0},"arrow-right":{module:()=>I(()=>import("./icons/arrow-right-line-PypiEqpu.js"),[],import.meta.url),rtl:!0},"arrow-up":()=>I(()=>import("./icons/arrow-up-line-fcuKqhVE.js"),[],import.meta.url),"arrow-down":()=>I(()=>import("./icons/arrow-down-line-0TRJUP_K.js"),[],import.meta.url),earth:()=>I(()=>import("./icons/earth-line-t1Um8wpQ.js"),[],import.meta.url),lock:()=>I(()=>import("./icons/lock-line-0jNHqZpm.js"),[],import.meta.url),unlock:()=>I(()=>import("./icons/unlock-line-w3piJMVb.js"),[],import.meta.url),"eye-close":()=>I(()=>import("./icons/eye-close-line-lBiePPv9.js"),[],import.meta.url),"eye-open":()=>I(()=>import("./icons/eye-2-line-vz_Kw-rK.js"),[],import.meta.url),message:()=>I(()=>import("./icons/mail-line-5XLS6FEo.js"),[],import.meta.url),comment:{module:()=>I(()=>import("./icons/chat-3-line-F0xcdpXY.js"),[],import.meta.url),rtl:!0},comment2:{module:()=>I(()=>import("./icons/comment-2-line-xEXuT-Ip.js"),[],import.meta.url),rtl:!0},home:()=>I(()=>import("./icons/home-3-line-qJiZhXUH.js"),[],import.meta.url),notification:()=>I(()=>import("./icons/notification-line-olNPLtgS.js"),[],import.meta.url),follow:()=>I(()=>import("./icons/user-follow-line-k_GCWTtp.js"),[],import.meta.url),"follow-add":()=>I(()=>import("./icons/user-add-line-zzW9OULB.js"),[],import.meta.url),poll:[()=>I(()=>import("./icons/chart-bar-line-5r_DfN2w.js"),[],import.meta.url),"90deg"],pencil:()=>I(()=>import("./icons/pencil-line-bKXqElLR.js"),[],import.meta.url),quill:()=>I(()=>import("./icons/quill-pen-line-h_5-FsGz.js"),[],import.meta.url),at:()=>I(()=>import("./icons/at-line-9vJS_Hnl.js"),[],import.meta.url),attachment:()=>I(()=>import("./icons/attachment-line-C2PUa1Ke.js"),[],import.meta.url),upload:()=>I(()=>import("./icons/upload-3-line-Qsjvubiw.js"),[],import.meta.url),gear:()=>I(()=>import("./icons/settings-3-line-kt4MSpRv.js"),[],import.meta.url),more:()=>I(()=>import("./icons/more-3-line-wUD-Yhmj.js"),[],import.meta.url),more2:()=>I(()=>import("./icons/more-1-fill-je1-slyh.js"),[],import.meta.url),external:{module:()=>I(()=>import("./icons/external-link-line-8nOOkmFu.js"),[],import.meta.url),rtl:!0},popout:{module:()=>I(()=>import("./icons/external-link-line-8nOOkmFu.js"),[],import.meta.url),rtl:!0},popin:{module:()=>I(()=>import("./icons/external-link-line-8nOOkmFu.js"),[],import.meta.url),rotate:"180deg",rtl:!0},plus:()=>I(()=>import("./icons/add-circle-line--O-MfyNy.js"),[],import.meta.url),"chevron-left":{module:()=>I(()=>import("./icons/left-line-Jck0yVmC.js"),[],import.meta.url),rtl:!0},"chevron-right":{module:()=>I(()=>import("./icons/right-line-7VBoqLdz.js"),[],import.meta.url),rtl:!0},"chevron-down":()=>I(()=>import("./icons/down-line-9PeS5YhF.js"),[],import.meta.url),reply:{module:()=>I(()=>import("./icons/share-forward-line-4jL-2Q4u.js"),[],import.meta.url),rotate:"180deg",flip:"horizontal",rtl:!0},thread:()=>I(()=>import("./icons/route-line-2YYy3958.js"),[],import.meta.url),group:{module:()=>I(()=>import("./icons/group-line-JvhJklhQ.js"),[],import.meta.url),rtl:!0},bot:()=>I(()=>import("./icons/android-2-line-uPwvVubH.js"),[],import.meta.url),menu:()=>I(()=>import("./icons/rows-4-line-SxGPYpTa.js"),[],import.meta.url),list:{module:()=>I(()=>import("./icons/list-check-line-qNqx9Mm4.js"),[],import.meta.url),rtl:!0},search:()=>I(()=>import("./icons/search-2-line-G39AynEw.js"),[],import.meta.url),hashtag:()=>I(()=>import("./icons/hashtag-line-SS3QMu1R.js"),[],import.meta.url),info:()=>I(()=>import("./icons/information-line-8SOch6cR.js"),[],import.meta.url),shortcut:()=>I(()=>import("./icons/lightning-line-JMYUlCZM.js"),[],import.meta.url),user:()=>I(()=>import("./icons/user-4-line-zT_bpOrS.js"),[],import.meta.url),following:()=>I(()=>import("./icons/walk-line-CF7a5s4t.js"),[],import.meta.url),pin:()=>I(()=>import("./icons/pin-line-ULyRQyWZ.js"),[],import.meta.url),unpin:[()=>I(()=>import("./icons/pin-line-ULyRQyWZ.js"),[],import.meta.url),"180deg"],bus:()=>I(()=>import("./icons/bus-2-line-XuQdDZ_w.js"),[],import.meta.url),link:()=>I(()=>import("./icons/link-2-line-BUqp1EwN.js"),[],import.meta.url),history:()=>I(()=>import("./icons/history-line-yoG7K8wL.js"),[],import.meta.url),share:()=>I(()=>import("./icons/share-2-line-PYo-zN94.js"),[],import.meta.url),sparkles:()=>I(()=>import("./icons/sparkles-line-wjZWGZ1a.js"),[],import.meta.url),sparkles2:()=>I(()=>import("./icons/sparkles-2-line-g2FqdZ0R.js"),[],import.meta.url),exit:{module:()=>I(()=>import("./icons/exit-line-l-1uUgI7.js"),[],import.meta.url),rtl:!0},translate:()=>I(()=>import("./icons/translate-line-HpDtlqS2.js"),[],import.meta.url),play:()=>I(()=>import("./icons/play-fill-Ey-zv2eL.js"),[],import.meta.url),trash:()=>I(()=>import("./icons/delete-2-line-pjUduCFs.js"),[],import.meta.url),mute:{module:()=>I(()=>import("./icons/volume-mute-line-WthBoXru.js"),[],import.meta.url),rtl:!0},unmute:{module:()=>I(()=>import("./icons/volume-line-PZujbN8h.js"),[],import.meta.url),rtl:!0},block:()=>I(()=>import("./icons/forbid-circle-line-3FxopGoP.js"),[],import.meta.url),unblock:[()=>I(()=>import("./icons/forbid-circle-line-3FxopGoP.js"),[],import.meta.url),"180deg"],flag:()=>I(()=>import("./icons/flag-1-line-xvcg7G7Q.js"),[],import.meta.url),time:()=>I(()=>import("./icons/time-line-ThP0kTRr.js"),[],import.meta.url),refresh:()=>I(()=>import("./icons/refresh-2-line-t42qqclb.js"),[],import.meta.url),emoji2:()=>I(()=>import("./icons/emoji-2-line--uNVc2IC.js"),[],import.meta.url),filter:()=>I(()=>import("./icons/filter-2-line-KyjbFYlO.js"),[],import.meta.url),filters:()=>I(()=>import("./icons/filter-line-1KEfnWDm.js"),[],import.meta.url),chart:()=>I(()=>import("./icons/chart-line-line-pHaLt6yC.js"),[],import.meta.url),react:()=>I(()=>import("./icons/react-line-YfZPqZem.js"),[],import.meta.url),layout4:{module:()=>I(()=>import("./icons/layout-4-line-FOdnyEcZ.js"),[],import.meta.url),rtl:!0},layout5:()=>I(()=>import("./icons/layout-5-line-9Kks7dle.js"),[],import.meta.url),announce:{module:()=>I(()=>import("./icons/announcement-line-MSlAmDH1.js"),[],import.meta.url),rtl:!0},alert:()=>I(()=>import("./icons/alert-line-zyc6hy8V.js"),[],import.meta.url),round:()=>I(()=>import("./icons/round-fill-a0rplSmV.js"),[],import.meta.url),"arrow-up-circle":()=>I(()=>import("./icons/arrow-up-circle-line-e3kZqEZN.js"),[],import.meta.url),"arrow-down-circle":()=>I(()=>import("./icons/arrow-down-circle-line-mpqFtRtO.js"),[],import.meta.url),clipboard:{module:()=>I(()=>import("./icons/clipboard-line-9F_Yeo71.js"),[],import.meta.url),rtl:!0},"account-edit":()=>I(()=>import("./icons/user-edit-line-9VnWCh0X.js"),[],import.meta.url),"account-warning":()=>I(()=>import("./icons/user-warning-line-gL3RGb1N.js"),[],import.meta.url),keyboard:()=>I(()=>import("./icons/keyboard-line-10AZQcVH.js"),[],import.meta.url),cloud:()=>I(()=>import("./icons/cloud-line-abe0HgFS.js"),[],import.meta.url),month:{module:()=>I(()=>import("./icons/calendar-month-line-VoXZVWAe.js"),[],import.meta.url),rtl:!0},media:()=>I(()=>import("./icons/photo-album-line--GdJqjfq.js"),[],import.meta.url),speak:()=>I(()=>import("./icons/radar-line-ndI8IhOG.js"),[],import.meta.url),building:()=>I(()=>import("./icons/building-5-line-ew7lu83B.js"),[],import.meta.url),history2:{module:()=>I(()=>import("./icons/history-2-line-3yIVzoWo.js"),[],import.meta.url),rtl:!0},document:()=>I(()=>import("./icons/document-line--D6ooZg1.js"),[],import.meta.url),"arrows-right":{module:()=>I(()=>import("./icons/arrows-right-line-HF4HILdT.js"),[],import.meta.url),rtl:!0},code:()=>I(()=>import("./icons/code-line-h4RWLaak.js"),[],import.meta.url),copy:()=>I(()=>import("./icons/copy-2-line-mPSDKieb.js"),[],import.meta.url),quote:{module:()=>I(()=>import("./icons/quote-left-line-NQzeELMO.js"),[],import.meta.url),rtl:!0},settings:()=>I(()=>import("./icons/settings-6-line-ZgCBilgF.js"),[],import.meta.url),"heart-break":()=>I(()=>import("./icons/heart-crack-line-P3DoKfTT.js"),[],import.meta.url),"user-x":()=>I(()=>import("./icons/user-x-line-zIdph-gu.js"),[],import.meta.url),minimize:()=>I(()=>import("./icons/arrows-down-line-ovOF9r0o.js"),[],import.meta.url)},ac={s:12,m:16,l:20,xl:24,xxl:32},ti={},cc=Ia(function({width:e,height:t,body:n,rotate:o,flip:i}){return r("svg",{viewBox:`0 0 ${e} ${t}`,dangerouslySetInnerHTML:{__html:n},style:{transform:`${o?`rotate(${o})`:""} ${i?"scaleX(-1)":""}`}})},{isShallowEqual:!0,maxSize:Object.keys(os).length,matchesArg:(e,t)=>e.icon===t.icon&&e.body===t.body});function M({icon:e,size:t="m",alt:n,title:o,class:i="",style:s={}}){if(!e)return null;const a=ac[t];let c=os[e];if(!c)return null;let l,d,f=!1;Array.isArray(c)?[c,l,d]=c:typeof c=="object"&&({rotate:l,flip:d,rtl:f}=c,c=c.module);const[u,p]=Z(ti[e]),h=$(e);return ee(()=>{u&&h.current===e||((async()=>{const m=await c();p(m.default),ti[e]=m.default})(),h.current=e)},[e]),r("span",{class:`icon ${i} ${f?"rtl-flip":""}`,title:o||n,style:{width:`${a}px`,height:`${a}px`,...s},"data-icon":e,children:u&&r(cc,{icon:e,width:u.width,height:u.height,body:u.body,rotate:l,flip:d})})}function lc(e,t=[]){!e||typeof e!="function"||ee(()=>{const n=new CloseWatcher;return n.addEventListener("close",e),()=>{n.destroy()}},t)}const uc=window.CloseWatcher?lc:()=>{},dc=document.getElementById("modal-container");function ni(){return getComputedStyle(document.documentElement).getPropertyValue("--backdrop-theme-color")}function Qo({children:e,onClose:t,onClick:n,class:o,minimized:i}){if(!e)return null;const s=$();ee(()=>{let u=setTimeout(()=>{var h;const p=(h=s.current)==null?void 0:h.querySelector('[tabindex="-1"]');p&&p.focus()},100);return()=>clearTimeout(u)},[]);const a=window.CloseWatcher,c=Ut("esc",()=>{setTimeout(()=>{t==null||t()},0)},{enabled:!a&&!!t,keydown:!1,keyup:!0},[t]);uc(t,[t]),ee(()=>{const u=document.querySelectorAll(".deck-container");if(i){const p=u[u.length-1];p&&p.tabIndex===-1&&p.focus()}else e?u.forEach(p=>{p.setAttribute("inert","")}):u.forEach(p=>{p.removeAttribute("inert")});return()=>{u.forEach(p=>{p.removeAttribute("inert")})}},[e,i]);const l=$(),d=$();Ct(()=>{if(e&&!i)if(Yo.local.get("theme")){const p=ni();l.current=document.querySelector('meta[name="theme-color"][data-theme-setting="manual"]'),l.current&&(d.current=l.current.content,l.current.content=p)}else{const p=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",h=ni();l.current=document.querySelector(`meta[name="theme-color"][media*="${p}"]`),l.current&&(d.current=l.current.content,l.current.content=h)}else l.current&&d.current&&(l.current.content=d.current);return()=>{l.current&&d.current&&(l.current.content=d.current)}},[e,i]);const f=r("div",{ref:u=>{var p;s.current=u,c(((p=u==null?void 0:u.querySelector)==null?void 0:p.call(u,'[tabindex="-1"]'))||u)},className:o,onClick:u=>{n==null||n(u),u.target===u.currentTarget&&(t==null||t(u))},tabIndex:i?0:"-1",inert:i,onFocus:u=>{var p,h;try{if(u.target===u.currentTarget){const m=(p=s.current)==null?void 0:p.querySelector('[tabindex="-1"]'),g=!!m&&((h=getComputedStyle(m))==null?void 0:h.pointerEvents)!=="none";m&&g&&m.focus()}}catch{}},children:e});return io(f,dc)}var Tr={exports:{}},fc="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",hc=fc;var pc=hc;function rs(){}function is(){}is.resetWarningCache=rs;var mc=function(){function e(o,i,s,a,c,l){if(l!==pc){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:is,resetWarningCache:rs};return n.PropTypes=n,n};var Kf=Tr.exports;if(0)var Zf,Gf;else Tr.exports=mc();var j=Tr.exports;const wr=e=>!!e&&e[0]==="o",Jo=Aa||(e=>e());const Tn=(e,t)=>e===!0||!!(e&&e[t]),Ve=(e,t)=>typeof e=="function"?e(t):e,gc="_szhsinMenu",vc=e=>e[gc];const en=(e,t)=>(t&&Object.keys(t).forEach(n=>{const o=e[n],i=t[n];typeof i=="function"&&o?e[n]=(...s)=>{i(...s),o(...s)}:e[n]=i}),e),_c=e=>{if(typeof e!="string")return{top:0,right:0,bottom:0,left:0};const t=e.trim().split(/\s+/,4).map(parseFloat),n=isNaN(t[0])?0:t[0],o=isNaN(t[1])?n:t[1];return{top:n,right:o,bottom:isNaN(t[2])?n:t[2],left:isNaN(t[3])?o:t[3]}},Co=e=>{for(;e;){if(e=e.parentNode,!e||e===document.body||!e.parentNode)return;const{overflow:t,overflowX:n,overflowY:o}=getComputedStyle(e);if(/auto|scroll|overlay|hidden/.test(t+o+n))return e}};function go(e,t){return{"aria-disabled":e||void 0,tabIndex:t?0:-1}}function oi(e,t){for(let n=0;n<e.length;n++)if(e[n]===t)return n;return-1}const yc=e=>({[e?`${e}ClassName`:"className"]:j.oneOfType([j.string,j.func])}),bc={className:j.string,...yc("menu"),arrowProps:j.object,focusProps:j.object,menuStyle:j.object,arrow:j.bool,setDownOverflow:j.bool,gap:j.number,shift:j.number,align:j.oneOf(["start","center","end"]),direction:j.oneOf(["left","right","top","bottom"]),position:j.oneOf(["auto","anchor","initial"]),overflow:j.oneOf(["auto","visible","hidden"])},qf={...bc,containerProps:j.object,initialMounted:j.bool,unmountOnClose:j.bool,transition:j.oneOfType([j.bool,j.exact({open:j.bool,close:j.bool,item:j.bool})]),transitionTimeout:j.number,boundingBoxRef:j.object,boundingBoxPadding:j.string,reposition:j.oneOf(["auto","initial"]),repositionFlag:j.oneOfType([j.string,j.number]),viewScroll:j.oneOf(["auto","close","initial"]),submenuOpenDelay:j.number,submenuCloseDelay:j.number,portal:j.oneOfType([j.bool,j.exact({target:j.object,stablePosition:j.bool})]),theming:j.string,onItemClick:j.func},Yf={instanceRef:j.oneOfType([j.object,j.func]),onMenuChange:j.func},et=({block:e,element:t,modifiers:n,className:o})=>ae(()=>{const i=t?`${e}__${t}`:e;let s=i;n&&Object.keys(n).forEach(c=>{const l=n[c];l&&(s+=` ${i}--${l===!0?c:`${c}-${l}`}`)});let a=typeof o=="function"?o(n):o;return typeof a=="string"&&(a=a.trim(),a&&(s+=` ${a}`)),s},[e,t,n,o]),Tc="szh-menu-container",Je="szh-menu";const wc="arrow",Er="item",Ec="divider",xc="header",Sc="group",kc="submenu";const ss=lt(),xr=lt({}),ao=lt({}),Sr=lt({}),Ic=lt({}),vo=lt({}),Fe=Object.freeze({ENTER:"Enter",ESC:"Escape",SPACE:" ",HOME:"Home",END:"End",LEFT:"ArrowLeft",RIGHT:"ArrowRight",UP:"ArrowUp",DOWN:"ArrowDown"}),we=Object.freeze({RESET:0,SET:1,UNSET:2,INCREASE:3,DECREASE:4,FIRST:5,LAST:6,SET_INDEX:7}),wn=Object.freeze({CLICK:"click",CANCEL:"cancel",BLUR:"blur",SCROLL:"scroll"}),Wt=Object.freeze({FIRST:"first",LAST:"last"}),Ac=Object.freeze({entering:"opening",entered:"open",exiting:"closing",exited:"closed"}),Po="absolute",En="none",kr="menuitem";const Cc=({className:e,containerRef:t,containerProps:n,children:o,isOpen:i,theming:s,transition:a,onClose:c})=>{const l=Tn(a,"item");return r("div",{...en({onKeyDown:({key:u})=>{switch(u){case Fe.ESC:Ve(c,{key:u,reason:wn.CANCEL});break}},onBlur:u=>{i&&!u.currentTarget.contains(u.relatedTarget)&&Ve(c,{reason:wn.BLUR})}},n),className:et({block:Tc,modifiers:ae(()=>({theme:s,itemTransition:l}),[s,l]),className:e}),style:{position:"absolute",...n==null?void 0:n.style},ref:t,children:o})},Pc=()=>{let e,t=0;return{toggle:n=>{n?t++:t--,t=Math.max(t,0)},on:(n,o,i)=>{t?e||(e=setTimeout(()=>{e=0,o()},n)):i==null||i()},off:()=>{e&&(clearTimeout(e),e=0)}}},Lc=(e,t)=>{const[n,o]=Z(),s=$({items:[],hoverIndex:-1,sorted:!1}).current,a=Me((l,d)=>{const{items:f}=s;if(!l)s.items=[];else if(d)f.push(l);else{const u=f.indexOf(l);u>-1&&(f.splice(u,1),l.contains(document.activeElement)&&(t.current.focus(),o()))}s.hoverIndex=-1,s.sorted=!1},[s,t]),c=Me((l,d,f)=>{const{items:u,hoverIndex:p}=s,h=()=>{if(s.sorted)return;const _=e.current.querySelectorAll(".szh-menu__item");u.sort((T,y)=>oi(_,T)-oi(_,y)),s.sorted=!0};let m=-1,g;switch(l){case we.RESET:break;case we.SET:g=d;break;case we.UNSET:g=_=>_===d?void 0:_;break;case we.FIRST:h(),m=0,g=u[m];break;case we.LAST:h(),m=u.length-1,g=u[m];break;case we.SET_INDEX:h(),m=f,g=u[m];break;case we.INCREASE:h(),m=p,m<0&&(m=u.indexOf(d)),m++,m>=u.length&&(m=0),g=u[m];break;case we.DECREASE:h(),m=p,m<0&&(m=u.indexOf(d)),m--,m<0&&(m=u.length-1),g=u[m];break;default:}g||(m=-1),o(g),s.hoverIndex=m},[e,s]);return{hoverItem:n,dispatch:c,updateItems:a}},ri=(e,t)=>Math.round(e)===t?e:t,as=e=>{const t=e.getBoundingClientRect();return t.width=ri(t.width,e.offsetWidth),t.height=ri(t.height,e.offsetHeight),t},Mc=(e,t,n,o)=>{const i=as(t.current),s=e.current.getBoundingClientRect(),a=n===window?{left:0,top:0,right:document.documentElement.clientWidth,bottom:window.innerHeight}:n.getBoundingClientRect(),c=_c(o),l=m=>m+s.left-a.left-c.left,d=m=>m+s.left+i.width-a.right+c.right,f=m=>m+s.top-a.top-c.top,u=m=>m+s.top+i.height-a.bottom+c.bottom;return{menuRect:i,containerRect:s,getLeftOverflow:l,getRightOverflow:d,getTopOverflow:f,getBottomOverflow:u,confineHorizontally:m=>{let g=l(m);if(g<0)m-=g;else{const _=d(m);_>0&&(m-=_,g=l(m),g<0&&(m-=g))}return m},confineVertically:m=>{let g=f(m);if(g<0)m-=g;else{const _=u(m);_>0&&(m-=_,g=f(m),g<0&&(m-=g))}return m}}},Rc=({arrowRef:e,menuY:t,anchorRect:n,containerRect:o,menuRect:i})=>{let s=n.top-o.top-t+n.height/2;const a=e.current.offsetHeight*1.25;return s=Math.max(a,s),s=Math.min(s,i.height-a),s},Oc=({anchorRect:e,containerRect:t,menuRect:n,placeLeftorRightY:o,placeLeftX:i,placeRightX:s,getLeftOverflow:a,getRightOverflow:c,confineHorizontally:l,confineVertically:d,arrowRef:f,arrow:u,direction:p,position:h})=>{let m=p,g=o;h!=="initial"&&(g=d(g),h==="anchor"&&(g=Math.min(g,e.bottom-t.top),g=Math.max(g,e.top-t.top-n.height)));let _,T,y;return m==="left"?(_=i,h!=="initial"&&(T=a(_),T<0&&(y=c(s),(y<=0||-T>y)&&(_=s,m="right")))):(_=s,h!=="initial"&&(y=c(_),y>0&&(T=a(i),(T>=0||-T<y)&&(_=i,m="left")))),h==="auto"&&(_=l(_)),{arrowY:u?Rc({menuY:g,arrowRef:f,anchorRect:e,containerRect:t,menuRect:n}):void 0,x:_,y:g,computedDirection:m}},Dc=({arrowRef:e,menuX:t,anchorRect:n,containerRect:o,menuRect:i})=>{let s=n.left-o.left-t+n.width/2;const a=e.current.offsetWidth*1.25;return s=Math.max(a,s),s=Math.min(s,i.width-a),s},$c=({anchorRect:e,containerRect:t,menuRect:n,placeToporBottomX:o,placeTopY:i,placeBottomY:s,getTopOverflow:a,getBottomOverflow:c,confineHorizontally:l,confineVertically:d,arrowRef:f,arrow:u,direction:p,position:h})=>{let m=p==="top"?"top":"bottom",g=o;h!=="initial"&&(g=l(g),h==="anchor"&&(g=Math.min(g,e.right-t.left),g=Math.max(g,e.left-t.left-n.width)));let _,T,y;return m==="top"?(_=i,h!=="initial"&&(T=a(_),T<0&&(y=c(s),(y<=0||-T>y)&&(_=s,m="bottom")))):(_=s,h!=="initial"&&(y=c(_),y>0&&(T=a(i),(T>=0||-T<y)&&(_=i,m="top")))),h==="auto"&&(_=d(_)),{arrowX:u?Dc({menuX:g,arrowRef:f,anchorRect:e,containerRect:t,menuRect:n}):void 0,x:g,y:_,computedDirection:m}},Nc=({arrow:e,align:t,direction:n,gap:o,shift:i,position:s,anchorRect:a,arrowRef:c,positionHelpers:l})=>{const{menuRect:d,containerRect:f}=l,u=n==="left"||n==="right";let p=u?o:i,h=u?i:o;if(e){const x=c.current;u?p+=x.offsetWidth:h+=x.offsetHeight}const m=a.left-f.left-d.width-p,g=a.right-f.left+p,_=a.top-f.top-d.height-h,T=a.bottom-f.top+h;let y,w;t==="end"?(y=a.right-f.left-d.width,w=a.bottom-f.top-d.height):t==="center"?(y=a.left-f.left-(d.width-a.width)/2,w=a.top-f.top-(d.height-a.height)/2):(y=a.left-f.left,w=a.top-f.top),y+=p,w+=h;const E={...l,anchorRect:a,placeLeftX:m,placeRightX:g,placeLeftorRightY:w,placeTopY:_,placeBottomY:T,placeToporBottomX:y,arrowRef:c,arrow:e,direction:n,position:s};switch(n){case"left":case"right":return Oc(E);case"top":case"bottom":default:return $c(E)}},Kt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?Ct:ee;function ii(e,t){typeof e=="function"?e(t):e.current=t}const tn=(e,t)=>ae(()=>e?t?n=>{ii(e,n),ii(t,n)}:e:t,[e,t]),si=-9999,cs=({ariaLabel:e,menuClassName:t,menuStyle:n,arrow:o,arrowProps:i={},anchorPoint:s,anchorRef:a,containerRef:c,containerProps:l,focusProps:d,externalRef:f,parentScrollingRef:u,align:p="start",direction:h="bottom",position:m="auto",overflow:g="visible",setDownOverflow:_,repositionFlag:T,captureFocus:y=!0,state:w,endTransition:E,isDisabled:x,menuItemFocus:b,gap:k=0,shift:D=0,children:L,onClose:A,...C})=>{const[R,K]=Z({x:si,y:si}),[U,oe]=Z({}),[Q,re]=Z(),[q,ie]=Z(h),[ce]=Z(Pc),[se,H]=Wi(X=>X+1,1),{transition:fe,boundingBoxRef:ne,boundingBoxPadding:Ee,rootMenuRef:ye,rootAnchorRef:xe,scrollNodesRef:De,reposition:Ie,viewScroll:$e,submenuCloseDelay:Ce}=ze(vo),{submenuCtx:he,reposSubmenu:N=T}=ze(ao),ge=$(null),Ge=$(),Mt=$(),V=$(!1),{hoverItem:le,dispatch:z,updateItems:J}=Lc(ge,Ge),Y=wr(w),be=Tn(fe,"open"),te=Tn(fe,"close"),pe=De.current,Rt=X=>{switch(X.key){case Fe.HOME:z(we.FIRST);break;case Fe.END:z(we.LAST);break;case Fe.UP:z(we.DECREASE,le);break;case Fe.DOWN:z(we.INCREASE,le);break;case Fe.SPACE:X.target&&X.target.className.indexOf(Je)!==-1&&X.preventDefault();return;default:return}X.preventDefault(),X.stopPropagation()},Ue=()=>{w==="closing"&&re(),Ve(E)},Ae=X=>{X.stopPropagation(),ce.on(Ce,()=>{z(we.RESET),Ge.current.focus()})},Pe=X=>{X.target===X.currentTarget&&ce.off()},ve=Me(X=>{var _e;const Te=a?(_e=a.current)==null?void 0:_e.getBoundingClientRect():s?{left:s.x,right:s.x,top:s.y,bottom:s.y,width:0,height:0}:null;if(!Te)return;pe.menu||(pe.menu=(ne?ne.current:Co(ye.current))||window);const He=Mc(c,ge,pe.menu,Ee);let{arrowX:Se,arrowY:nt,x:Ln,y:bt,computedDirection:qe}=Nc({arrow:o,align:p,direction:h,gap:k,shift:D,position:m,anchorRect:Te,arrowRef:Mt,positionHelpers:He});const{menuRect:Mn}=He,je=Mn.height;if(!X&&g!=="visible"){const{getTopOverflow:Tt,getBottomOverflow:bo}=He;let wt,de;const Et=bo(bt);if(Et>0)wt=je-Et,de=Et;else{const Dt=Tt(bt);Dt<0&&(wt=je+Dt,de=0-Dt,wt>=0&&(bt-=Dt))}wt>=0&&re({height:wt,overflowAmt:de})}o&&oe({x:Se,y:nt}),K({x:Ln,y:bt}),ie(qe)},[o,p,Ee,h,k,D,m,g,s,a,c,ne,ye,pe]);Kt(()=>{Y&&(ve(),V.current&&H()),V.current=Y},[Y,ve,N]),Kt(()=>{Q&&!_&&(ge.current.scrollTop=0)},[Q,_]),Kt(()=>J,[J]),ee(()=>{let{menu:X}=pe;if(!Y||!X)return;if(X=X.addEventListener?X:window,!pe.anchors){pe.anchors=[];let Se=Co(xe&&xe.current);for(;Se&&Se!==X;)pe.anchors.push(Se),Se=Co(Se)}let _e=$e;if(pe.anchors.length&&_e==="initial"&&(_e="auto"),_e==="initial")return;const Te=()=>{_e==="auto"?Jo(()=>ve(!0)):Ve(A,{reason:wn.SCROLL})},He=pe.anchors.concat($e!=="initial"?X:[]);return He.forEach(Se=>Se.addEventListener("scroll",Te)),()=>He.forEach(Se=>Se.removeEventListener("scroll",Te))},[xe,pe,Y,A,$e,ve]);const Le=!!Q&&Q.overflowAmt>0;ee(()=>{if(Le||!Y||!u)return;const X=()=>Jo(ve),_e=u.current;return _e.addEventListener("scroll",X),()=>_e.removeEventListener("scroll",X)},[Y,Le,u,ve]),ee(()=>{if(!Y||typeof ResizeObserver!="function"||Ie==="initial")return;const X=[],_e=new ResizeObserver(Se=>Se.forEach(({target:nt})=>{X.indexOf(nt)<0?X.push(nt):Ca(()=>{ve(),H()})})),Te={box:"border-box"};_e.observe(ge.current,Te);const He=a==null?void 0:a.current;return He&&_e.observe(He,Te),()=>_e.disconnect()},[Y,Ie,a,ve]),ee(()=>{if(!Y){z(we.RESET),te||re();return}const{position:X,alwaysUpdate:_e}=b||{},Te=()=>{X===Wt.FIRST?z(we.FIRST):X===Wt.LAST?z(we.LAST):X>=-1&&z(we.SET_INDEX,void 0,X)};if(_e)Te();else if(y){const He=setTimeout(()=>{const Se=ge.current;Se&&!Se.contains(document.activeElement)&&(Ge.current.focus(),Te())},be?170:100);return()=>clearTimeout(He)}},[Y,be,te,y,b,z]);const Cn=ae(()=>({isParentOpen:Y,submenuCtx:ce,dispatch:z,updateItems:J}),[Y,ce,z,J]);let dt,_t;Q&&(_?_t=Q.overflowAmt:dt=Q.height);const yo=ae(()=>({reposSubmenu:se,submenuCtx:ce,overflow:g,overflowAmt:_t,parentMenuRef:ge,parentDir:q}),[se,ce,g,_t,q]),me=dt>=0?{maxHeight:dt,overflow:g}:void 0,Ot=ae(()=>({state:w,align:p,dir:q}),[w,p,q]),yt=ae(()=>({dir:q}),[q]),tt=et({block:Je,element:wc,modifiers:yt,className:i.className}),Pn=r("ul",{role:"menu","aria-label":e,...go(x),...en({onPointerEnter:he==null?void 0:he.off,onPointerMove:Ae,onPointerLeave:Pe,onKeyDown:Rt,onAnimationEnd:Ue},C),ref:tn(f,ge),className:et({block:Je,modifiers:Ot,className:t}),style:{...n,...me,margin:0,display:w==="closed"?"none":void 0,position:Po,left:R.x,top:R.y},children:[r("li",{tabIndex:-1,role:En,style:{position:Po,left:0,top:0,display:"block",outline:"none"},ref:Ge,...d}),o&&r("li",{role:En,...i,className:tt,style:{display:"block",position:Po,left:U.x,top:U.y,...i.style},ref:Mt}),r(ao.Provider,{value:yo,children:r(xr.Provider,{value:Cn,children:r(ss.Provider,{value:le,children:Ve(L,Ot)})})})]});return l?r(Cc,{...l,isOpen:Y,children:Pn}):Pn},ls=Pt(function({"aria-label":t,className:n,containerProps:o,initialMounted:i,unmountOnClose:s,transition:a,transitionTimeout:c,boundingBoxRef:l,boundingBoxPadding:d,reposition:f="auto",submenuOpenDelay:u=300,submenuCloseDelay:p=150,viewScroll:h="initial",portal:m,theming:g,onItemClick:_,...T},y){const w=$(null),E=$({}),{anchorRef:x,state:b,onClose:k}=T,D=ae(()=>({initialMounted:i,unmountOnClose:s,transition:a,transitionTimeout:c,boundingBoxRef:l,boundingBoxPadding:d,rootMenuRef:w,rootAnchorRef:x,scrollNodesRef:E,reposition:f,viewScroll:h,submenuOpenDelay:u,submenuCloseDelay:p}),[i,s,a,c,x,l,d,f,h,u,p]),L=ae(()=>({handleClick(C,R){C.stopPropagation||Ve(_,C);let K=C.keepOpen;K===void 0&&(K=R&&C.key===Fe.SPACE),K||Ve(k,{value:C.value,key:C.key,reason:wn.CLICK})},handleClose(C){Ve(k,{key:C,reason:wn.CLICK})}}),[_,k]);if(!b)return null;const A=r(vo.Provider,{value:D,children:r(Sr.Provider,{value:L,children:r(cs,{...T,ariaLabel:t||"Menu",externalRef:y,containerRef:w,containerProps:{className:n,containerRef:w,containerProps:o,theming:g,transition:a,onClose:k}})})});return m===!0&&typeof document<"u"?io(A,document.body):m?m.target?io(A,m.target):m.stablePosition?null:A:A}),er=0,tr=1,co=2,lo=3,uo=4,Fc=5,us=6,zc=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],ds=e=>({_s:e,status:zc[e],isEnter:e<lo,isMounted:e!==us,isResolved:e===co||e>uo}),nr=e=>e?us:Fc,Vc=(e,t)=>{switch(e){case tr:case er:return co;case uo:case lo:return nr(t)}},Hc=e=>typeof e=="object"?[e.enter,e.exit]:[e,e],Bc=(e,t)=>setTimeout(()=>{isNaN(document.body.offsetTop)||e(t+1)},0),ai=(e,t,n,o,i)=>{clearTimeout(o.current);const s=ds(e);t(s),n.current=s,i&&i({current:s})},Uc=({enter:e=!0,exit:t=!0,preEnter:n,preExit:o,timeout:i,initialEntered:s,mountOnEnter:a,unmountOnExit:c,onStateChange:l}={})=>{const[d,f]=Z(()=>ds(s?co:nr(a))),u=$(d),p=$(),[h,m]=Hc(i),g=Me(()=>{const T=Vc(u.current._s,c);T&&ai(T,f,u,p,l)},[l,c]),_=Me(T=>{const y=E=>{switch(ai(E,f,u,p,l),E){case tr:h>=0&&(p.current=setTimeout(g,h));break;case uo:m>=0&&(p.current=setTimeout(g,m));break;case er:case lo:p.current=Bc(y,E);break}},w=u.current.isEnter;typeof T!="boolean"&&(T=!w),T?!w&&y(e?n?er:tr:co):w&&y(t?o?lo:uo:nr(c))},[g,l,e,t,n,o,h,m,c]);return ee(()=>()=>clearTimeout(p.current),[]),[d,_,g]};const jc=({initialOpen:e,initialMounted:t,unmountOnClose:n,transition:o,transitionTimeout:i=500}={})=>{const[{status:s},a,c]=Uc({initialEntered:e,mountOnEnter:!t,unmountOnExit:n,timeout:i,enter:Tn(o,"open"),exit:Tn(o,"close")});return[{state:Ac[s],endTransition:c},a]},fs=e=>{const[t,n]=jc(e),[o,i]=Z(),s=(a,c)=>{i({position:a,alwaysUpdate:c}),n(!0)};return[{menuItemFocus:o,...t},n,s]},Wc=(e,t)=>{const[n]=Z({});return{onMouseDown:()=>{n.v=e&&e!=="closed"},onClick:o=>n.v?n.v=!1:t(!0,o)}},hs=(e,t)=>{const n=$(t);ee(()=>{n.current!==t&&Ve(e,{open:t}),n.current=t},[e,t])},Kc=Pt(function({"aria-label":t,captureFocus:n,initialOpen:o,menuButton:i,instanceRef:s,onMenuChange:a,...c},l){const[d,f,u]=fs(c),{state:p}=d,h=wr(p),m=$(null),g=Wc(p,(x,b)=>u(b.detail?void 0:Wt.FIRST)),_=Me(x=>{f(!1),x.key&&m.current.focus()},[f]),T=x=>{switch(x.key){case Fe.UP:u(Wt.LAST);break;case Fe.DOWN:u(Wt.FIRST);break;default:return}x.preventDefault()},y=Ve(i,{open:h});if(!y||!y.type)throw new Error("Menu requires a menuButton prop.");const w={ref:tn(y.ref,m),...en({onKeyDown:T,...g},y.props)};vc(y.type)==="MenuButton"&&(w.isOpen=h);const E=Ki(y,w);return hs(a,h),Zi(s,()=>({openMenu:u,closeMenu:()=>f(!1)})),r(F,{children:[E,r(ls,{...c,...d,"aria-label":t||(typeof y.props.children=="string"?y.props.children:"Menu"),anchorRef:m,ref:l,onClose:_})]})}),Ir=(e,t)=>{const n=Jt(t),o=Pt((i,s)=>{const a=$(null);return r(n,{...i,itemRef:a,externalRef:s,isHovering:ze(ss)===a.current})});return o.displayName=`WithHovering(${e})`,o},ps=(e,t,n)=>{Kt(()=>{if(e)return;const o=t.current;return n(o,!0),()=>{n(o)}},[e,t,n])},Zc=Ir("SubMenu",function({"aria-label":t,className:n,disabled:o,direction:i,label:s,openTrigger:a,onMenuChange:c,isHovering:l,instanceRef:d,itemRef:f,captureFocus:u,repositionFlag:p,itemProps:h={},...m}){const g=ze(vo),{rootMenuRef:_,submenuOpenDelay:T,submenuCloseDelay:y}=g,{parentMenuRef:w,parentDir:E,overflow:x}=ze(ao),{isParentOpen:b,submenuCtx:k,dispatch:D,updateItems:L}=ze(xr),A=x!=="visible",[C,R,K]=fs(g),{state:U}=C,oe=!!o,Q=wr(U),re=$(null),[q]=Z({v:0}),ie=()=>{k.off(),q.v&&(clearTimeout(q.v),q.v=0)},ce=(...N)=>{ie(),se(),!oe&&K(...N)},se=()=>!l&&!oe&&D(we.SET,f.current),H=N=>{se(),a||(q.v=setTimeout(()=>Jo(ce),Math.max(N,0)))},fe=N=>{oe||(N.stopPropagation(),!(q.v||Q)&&k.on(y,()=>H(T-y),()=>H(T)))},ne=()=>{ie(),Q||D(we.UNSET,f.current)},Ee=N=>{if(l)switch(N.key){case Fe.ENTER:N.preventDefault();case Fe.SPACE:case Fe.RIGHT:a!=="none"&&ce(Wt.FIRST)}},ye=N=>{let ge=!1;switch(N.key){case Fe.LEFT:Q&&(f.current.focus(),R(!1),ge=!0);break;case Fe.RIGHT:Q||(ge=!0);break}ge&&(N.preventDefault(),N.stopPropagation())};ps(oe,f,L),hs(c,Q),ee(()=>k.toggle(Q),[k,Q]),ee(()=>()=>clearTimeout(q.v),[q]),ee(()=>{l&&b?f.current.focus():R(!1)},[l,b,R,f]),Zi(d,()=>({openMenu:(...N)=>{b&&ce(...N)},closeMenu:()=>{Q&&(f.current.focus(),R(!1))}}));const xe=ae(()=>({open:Q,hover:l,disabled:oe,submenu:!0}),[Q,l,oe]),{ref:De,className:Ie,...$e}=h,Ce=en({onPointerEnter:k.off,onPointerMove:fe,onPointerLeave:ne,onKeyDown:Ee,onClick:()=>a!=="none"&&ce()},$e),he=()=>{const N=r(cs,{...m,...C,ariaLabel:t||(typeof s=="string"?s:"Submenu"),anchorRef:f,containerRef:A?_:re,direction:i||(E==="right"||E==="left"?E:"right"),parentScrollingRef:A&&w,isDisabled:oe}),ge=_.current;return A&&ge?io(N,ge):N};return r("li",{className:et({block:Je,element:kc,className:n}),style:{position:"relative"},role:En,ref:re,onKeyDown:ye,children:[r("div",{role:kr,"aria-haspopup":!0,"aria-expanded":Q,...go(oe,l),...Ce,ref:tn(De,f),className:et({block:Je,element:Er,modifiers:xe,className:Ie}),children:ae(()=>Ve(s,xe),[s,xe])}),U&&he()]})}),ms=(e,t,n,o)=>{const{submenuCloseDelay:i}=ze(vo),{isParentOpen:s,submenuCtx:a,dispatch:c,updateItems:l}=ze(xr),d=()=>{!n&&!o&&c(we.SET,e.current)},f=()=>{!o&&c(we.UNSET,e.current)},u=m=>{n&&!m.currentTarget.contains(m.relatedTarget)&&f()},p=m=>{o||(m.stopPropagation(),a.on(i,d,d))},h=(m,g)=>{a.off(),!g&&f()};return ps(o,e,l),ee(()=>{n&&s&&t.current&&t.current.focus()},[t,n,s]),{setHover:d,onBlur:u,onPointerMove:p,onPointerLeave:h}},ke=Ir("MenuItem",function({className:t,value:n,href:o,type:i,checked:s,disabled:a,children:c,onClick:l,isHovering:d,itemRef:f,externalRef:u,...p}){const h=!!a,{setHover:m,...g}=ms(f,f,d,h),_=ze(Sr),T=ze(Ic),y=i==="radio",w=i==="checkbox",E=!!o&&!h&&!y&&!w,x=y?T.value===n:w?!!s:!1,b=C=>{if(h){C.stopPropagation(),C.preventDefault();return}const R={value:n,syntheticEvent:C};C.key!==void 0&&(R.key=C.key),w&&(R.checked=!x),y&&(R.name=T.name),Ve(l,R),y&&Ve(T.onRadioChange,R),_.handleClick(R,w||y)},k=C=>{if(d)switch(C.key){case Fe.ENTER:C.preventDefault();case Fe.SPACE:E?f.current.click():b(C)}},D=ae(()=>({type:i,disabled:h,hover:d,checked:x,anchor:E}),[i,h,d,x,E]),L=en({...g,onPointerDown:m,onKeyDown:k,onClick:b},p),A={role:y?"menuitemradio":w?"menuitemcheckbox":kr,"aria-checked":y||w?x:void 0,...go(h,d),...L,ref:tn(u,f),className:et({block:Je,element:Er,modifiers:D,className:t}),children:ae(()=>Ve(c,D),[c,D])};return E?r("li",{role:En,children:r("a",{href:o,...A})}):r("li",{...A})}),Gc=Ir("FocusableItem",function({className:t,disabled:n,children:o,isHovering:i,itemRef:s,externalRef:a,...c}){const l=!!n,d=$(null),{setHover:f,onPointerLeave:u,...p}=ms(s,d,i,l),{handleClose:h}=ze(Sr),m=ae(()=>({disabled:l,hover:i,focusable:!0}),[l,i]),g=ae(()=>Ve(o,{...m,ref:d,closeMenu:h}),[o,m,h]),_=en({...p,onPointerLeave:T=>u(T,!0),onFocus:f},c);return r("li",{role:kr,...go(l),..._,ref:tn(a,s),className:et({block:Je,element:Er,modifiers:m,className:t}),children:g})}),an=Jt(Pt(function({className:t,...n},o){return r("li",{role:"separator",...n,ref:o,className:et({block:Je,element:Ec,className:t})})})),Xf=Jt(Pt(function({className:t,...n},o){return r("li",{role:En,...n,ref:o,className:et({block:Je,element:xc,className:t})})})),Qf=Pt(function({className:t,style:n,takeOverflow:o,...i},s){const a=$(null),[c,l]=Z(),{overflow:d,overflowAmt:f}=ze(ao);return Kt(()=>{let u;o&&f>=0&&(u=as(a.current).height-f,u<0&&(u=0)),l(u>=0?{maxHeight:u,overflow:d}:void 0)},[o,d,f]),Kt(()=>{c&&(a.current.scrollTop=0)},[c]),r("div",{...i,ref:tn(s,a),className:et({block:Je,element:Sc,className:t}),style:{...n,...c}})});const ci={s:16,m:20,l:24,xl:32,xxl:50,xxxl:64},cn={},fn=window.OffscreenCanvas?new OffscreenCanvas(1,1):document.createElement("canvas"),to=fn.getContext("2d",{willReadFrequently:!0});to.imageSmoothingEnabled=!1;const qc=/missing\.png$/;function Yc({url:e,size:t,alt:n="",squircle:o,...i}){t=ci[t]||t||ci.m;const s=$(),a=qc.test(e);return r("span",{ref:s,class:`avatar ${o?"squircle":""} ${cn[e]?"has-alpha":""}`,style:{width:t,height:t},title:n,...i,children:!!e&&r("img",{src:e,width:t,height:t,alt:n,loading:"lazy",decoding:"async",fetchPriority:"low",crossOrigin:cn[e]===void 0&&!a?"anonymous":void 0,onError:c=>{c.target.crossOrigin&&(c.target.crossOrigin=null,c.target.src=e)},onLoad:c=>{s.current&&(s.current.dataset.loaded=!0),cn[e]===void 0&&(a||setTimeout(()=>{try{const{width:l,height:d}=c.target;fn.width!==l&&(fn.width=l),fn.height!==d&&(fn.height=d),to.drawImage(c.target,0,0);const f=to.getImageData(0,0,l,d),u=f.data.filter((p,h)=>h%4===3&&p<=128).length/(f.data.length/4)>.1;u&&s.current.classList.add("has-alpha"),cn[e]=u,to.clearRect(0,0,l,d)}catch{cn[e]=!1}},1))}})})}const st=Oe(Yc),Gt=Pt((e,t)=>{var c;let n;try{n=Pa()}catch{}let o=(location.hash||"").replace(/^#/,"").trim();o===""&&(o="/");const{to:i,...s}=e;if(o&&o!=="/"&&o.includes("?")){const l=URL.parse(o,location.origin);if((c=l==null?void 0:l.searchParams)!=null&&c.size){const d=Array.from(l.searchParams.entries()).map(([f,u])=>`${f}=${encodeURIComponent(u)}`).join("&");o=l.pathname+"?"+d}}const a=o===i||decodeURIComponent(o)===i;return r("a",{ref:t,href:`#${i}`,...s,class:`${e.class||""} ${a?"is-active":""}`,onClick:l=>{var d,f,u;(f=(d=l.currentTarget)==null?void 0:d.parentNode)!=null&&f.closest("a")&&l.stopPropagation(),n&&(B.prevLocation=n),(u=e.onClick)==null||u.call(e,l)}})});let or=!1;const Xc=new MutationObserver(e=>{e.forEach(t=>{if(t.type==="attributes"){const{dir:n}=t.target;n==="rtl"?or=!0:or=!1}})});Xc.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});function rr(){return or}const Qc=document.documentElement,jn=getComputedStyle(Qc),Jc=8;let gs=[0,0,0,0];function vs(){const e=jn.getPropertyValue("--sai-top"),t=jn.getPropertyValue("--sai-right"),n=jn.getPropertyValue("--sai-bottom"),o=jn.getPropertyValue("--sai-left");gs=[Math.max(0,parseInt(e,10)),Math.max(0,parseInt(t,10)),Math.max(0,parseInt(n,10)),Math.max(0,parseInt(o,10))]}requestAnimationFrame(vs);function _s(e=[]){return gs.map((n,o)=>(n||Jc)+(e[o]||0)).join(" ")}CSS.supports("top: env(safe-area-inset-top)")&&window.addEventListener("resize",vs,{passive:!0});function el(){const[e,t]=Z({width:null,height:null});return Ct(()=>{const n=()=>{t({width:window.innerWidth,height:window.innerHeight})};return n(),window.addEventListener("resize",n,{passive:!0}),()=>{window.removeEventListener("resize",n)}},[]),e}function ys(e){const{containerProps:t,instanceRef:n,align:o}=e,i=el(),s=n!=null&&n.current?n:$(),a=rr()?o==="end"?"start":o==="start"?"end":o:o;return r(Kc,{boundingBoxPadding:_s(),repositionFlag:`${i.width}x${i.height}`,unmountOnClose:!0,...e,align:a,instanceRef:s,containerProps:{onClick:c=>{var l,d,f;c.target===c.currentTarget&&((d=(l=s.current)==null?void 0:l.closeMenu)==null||d.call(l)),(f=t==null?void 0:t.onClick)==null||f.call(t,c)},...t}})}function tl(e){const t=$();return r(Zc,{...e,instanceRef:t,itemProps:{onPointerMove:n=>{var o,i;n.pointerType==="touch"&&((i=(o=t.current)==null?void 0:o.openMenu)==null||i.call(o))},onPointerLeave:n=>{var o,i;n.pointerType==="touch"&&((i=(o=t.current)==null?void 0:o.openMenu)==null||i.call(o))},...e.itemProps}})}function Lo({subMenu:e=!1,confirm:t=!0,confirmLabel:n,menuItemClassName:o,menuFooter:i,menuExtras:s,...a}){const{children:c,onClick:l,...d}=a;return t?r(e?tl:ys,{openTrigger:"clickOnly",direction:"bottom",overflow:"auto",gap:-8,shift:8,menuClassName:"menu-emphasized",...d,menuButton:e?void 0:c,label:e?c:void 0,children:[r(ke,{className:o,onClick:l,children:n}),s,i]}):e?r(ke,{...a}):l?La(c,{onClick:l}):c}function li(e){const{className:t,disabled:n,...o}=e;return r(Gc,{className:t,disabled:n,children:({ref:i,closeMenu:s})=>r(Gt,{...o,ref:i,onClick:({detail:a})=>s(a===0?"Enter":void 0)})})}function ir({staticUrl:e,alt:t,url:n}){return r("picture",{children:[e&&r("source",{srcset:e,media:"(prefers-reduced-motion: reduce)"}),r("img",{src:n,alt:t,class:"shortcode-emoji emoji",width:"16",height:"16",loading:"lazy",decoding:"async",fetchPriority:"low"},t||n)]})}const nl=Oe(e=>new RegExp(`:(${e.join("|")}):`,"g"));function ol({text:e,emojis:t}){if(!e)return"";if(!(t!=null&&t.length)||e.indexOf(":")===-1)return e;const n=nl(t.map(i=>i.shortcode));return e.split(n).map((i,s)=>{const a=t.find(c=>c.shortcode===i);if(a){const{url:c,staticUrl:l}=a;return r(ir,{staticUrl:l,alt:i,url:c},i+"-"+s)}return i})}const qt=Oe(ol),rl=Oe(e=>{const t={sensitivity:"base"};try{return new Intl.Collator(e||void 0,t)}catch{return new Intl.Collator(void 0,t)}}),il=/([^@]+)(@.+)/i,sl=/(\:(\w|\+|\-)+\:)(?=|[\!\.\?]|$)/g,al=/\s+/g,cl=/[^a-z0-9@\.]/gi;function ll({account:e,instance:t,showAvatar:n,showAcct:o,short:i,external:s,onClick:a}){const{i18n:c}=po(),{acct:l,avatar:d,avatarStatic:f,id:u,url:p,displayName:h,emojis:m,bot:g,username:_}=e,[T,y,w]=l.match(il)||[,l];t||(t=so().instance);const E=_.toLowerCase().trim(),x=(h||"").toLowerCase().trim(),b=x.replace(sl,"").replace(al,""),k=b.replace(cl,""),D=!i&&(E===x||E===b||E===k||rl(c.locale).compare(E,b)===0)||k===l.toLowerCase();return r("a",{class:`name-text ${o?"show-acct":""} ${i?"short":""}`,href:p,target:s?"_blank":null,title:h?`${h} (${w?"":"@"}${l})`:`${w?"":"@"}${l}`,onClick:L=>{if(!s&&!L.shiftKey){if(L.preventDefault(),L.stopPropagation(),a)return a(L);if(L.metaKey||L.ctrlKey||L.shiftKey||L.which===2){const A=`#/${t}/a/${u}`;window.open(A,"_blank");return}B.showAccount={account:e,instance:t}}},children:[n&&r(F,{children:[r(st,{url:f||d,squircle:g})," "]}),h&&!i?r(F,{children:[r("b",{dir:"auto",children:r(qt,{text:h,emojis:m})}),!o&&!D&&r(F,{children:[" ",r("i",{class:"bidi-isolate",children:["@",_]})]})]}):i?r("i",{children:_}):r("b",{children:_}),o&&r(F,{children:[r("br",{}),r("i",{class:"bidi-isolate",children:[w?"":"@",y,!!w&&r("span",{class:"ib",children:w})]})]})]})}const gt=Oe(ll),Wn={"zh-YUE":"YUE",zh_HANT:"zh-Hant"},Mo=Oe(e=>new Intl.DisplayNames(e||void 0,{type:"language"}));function ul(e){let t,n;typeof e=="object"&&({code:e,locale:t,fallback:n}=e);try{const o=Mo(t||S.locale).of(e);if(o!==e)return o;if(!n){const i=Mo(e).of(e);if(i!==e)return i}return n||""}catch{if(Wn[e])try{const i=Mo(Wn[t]||t||S.locale).of(Wn[e]);return i!==Wn[e]?i:n||""}catch{}return n||""}}const ln=Oe(ul);function ui(e){if(e instanceof Date)return!isNaN(e.getTime());{const t=new Date(e);return!isNaN(t.getTime())}}const dl=Oe(()=>new Intl.DateTimeFormat().resolvedOptions().locale),di=Oe((e,t={})=>{const n=e.replace(/-[a-z]+$/i,""),o=bn([n],[dl()],e);try{return new Intl.DateTimeFormat(o,t)}catch{}try{return new Intl.DateTimeFormat(e,t)}catch{}return new Intl.DateTimeFormat(void 0,t)}),fl=Oe(e=>new Intl.RelativeTimeFormat(e||void 0)),Yt=60,Xt=60*Yt,sr=24*Xt,hl=e=>{const t=fl(S.locale),n=(e.getTime()-Date.now())/1e3,o=Math.abs(n);return o<Yt?t.format(n,"second"):o<Xt?t.format(Math.floor(n/Yt),"minute"):o<sr?t.format(Math.floor(n/Xt),"hour"):t.format(Math.floor(n/sr),"day")},pl=e=>{const t=(Date.now()-e.getTime())/1e3;return t<Yt?S._({values:{0:t<1?1:Math.floor(t)},id:"NnRCUm"}):t<Xt?S._({values:{0:Math.floor(t/Yt)},id:"ZSWUwq"}):S._({values:{0:Math.floor(t/Xt)},id:"NSSJsj"})};function at({datetime:e,format:t}){if(!e)return null;const[n,o]=Wi(l=>l+1,0),i=ae(()=>new Date(e),[e]),[s,a,c]=ae(()=>{if(!ui(i))return[""+e,"",""];let l;if(t==="micro"){const d=new Date;(d.getTime()-i.getTime())/1e3/sr<=1?l=pl(i):d.getFullYear()===i.getFullYear()?l=di(S.locale,{year:void 0,month:"short",day:"numeric"}).format(i):l=di(S.locale,{dateStyle:"short"}).format(i)}return l||(l=hl(i)),[l,i.toISOString(),i.toLocaleString()]},[i,t,n]);return ee(()=>{if(!ui(i))return;let l,d;function f(){d=requestAnimationFrame(()=>{o(),u()})}function u(){const p=(Date.now()-i.getTime())/1e3;p<Yt?l=setTimeout(f,1e4):p<Xt&&(l=setTimeout(f,6e4))}return u(),()=>{clearTimeout(l),cancelAnimationFrame(d)}},[]),r("time",{datetime:a,title:c,children:s})}const ml=[{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"}],gl=Oe(()=>[new Intl.DateTimeFormat().resolvedOptions().locale,...navigator.languages]),vl=()=>bn(gl(),ml.map(e=>e.code.replace("_","-")),"en");function bs(e=!1){if(e){const{contentTranslationTargetLanguage:t}=B.settings;if(t)return t}return vl()}const fi=["byte","kilobyte","megabyte","gigabyte","terabyte","petabyte"];function Jf(e){const t=Math.min(Math.floor(Math.log2(e)/10),fi.length-1),n=e/1024**t;return S.number(n,{style:"unit",unit:fi[t],unitDisplay:"narrow",maximumFractionDigits:0})}const _l=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,fo=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(_l);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},hi=e=>e==="*"||e==="x"||e==="X",pi=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},yl=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],bl=(e,t)=>{if(hi(e)||hi(t))return 0;const[n,o]=yl(pi(e),pi(t));return n>o?1:n<o?-1:0},jt=(e,t)=>{for(let n=0;n<Math.max(e.length,t.length);n++){const o=bl(e[n]||"0",t[n]||"0");if(o!==0)return o}return 0},Tl=(e,t)=>{const n=fo(e),o=fo(t),i=n.pop(),s=o.pop(),a=jt(n,o);return a!==0?a:i&&s?jt(i.split("."),s.split(".")):i||s?i?-1:1:0},wl=(e,t,n)=>{El(n);const o=Tl(e,t);return Ts[n].includes(o)},Ts={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},mi=Object.keys(Ts),El=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(mi.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${mi.join("|")}`)},no=(e,t)=>{if(t=t.replace(/([><=]+)\s+/g,"$1"),t.includes("||"))return t.split("||").some(_=>no(e,_));if(t.includes(" - ")){const[_,T]=t.split(" - ",2);return no(e,`>=${_} <=${T}`)}else if(t.includes(" "))return t.trim().replace(/\s{2,}/g," ").split(" ").every(_=>no(e,_));const n=t.match(/^([<>=~^]+)/),o=n?n[1]:"=";if(o!=="^"&&o!=="~")return wl(e,t,o);const[i,s,a,,c]=fo(e),[l,d,f,,u]=fo(t),p=[i,s,a],h=[l,d??"x",f??"x"];if(u&&(!c||jt(p,h)!==0||jt(c.split("."),u.split("."))===-1))return!1;const m=h.findIndex(_=>_!=="0")+1,g=o==="~"?2:m>1?m:1;return!(jt(p.slice(0,g),h.slice(0,g))!==0||jt(p.slice(g),h.slice(g))===-1)};const xl={"@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"},Ro=/pixelfed/i,ot=/^(?!.*pixelfed).*$/i,Sl=/pleroma/i,kl=/akkoma/i;const gi={"@mastodon/lists":ot,"@mastodon/filters":ot,"@mastodon/mentions":ot,"@mastodon/trending-hashtags":ot,"@mastodon/trending-links":ot,"@mastodon/post-bookmark":ot,"@mastodon/post-edit":ot,"@mastodon/profile-edit":ot,"@mastodon/profile-private-note":ot,"@pixelfed/trending":Ro,"@pixelfed/home-include-reblogs":Ro,"@pixelfed/global-feed":Ro,"@pleroma/local-visibility-post":Sl,"@akkoma/local-visibility-post":kl},Kn={};function Zn(e){var t,n;try{let{version:o,domain:i}=Ma(),s=((n=(t=Ra())==null?void 0:t.software)==null?void 0:n.name)||"mastodon";s==="hometown"&&(s="mastodon");const a=`${i}-${e}`;if(Kn[a])return Kn[a];if(gi[e])return Kn[a]=gi[e].test(o);const c=xl[e];if(!c)return!1;const d=e.match(/^@([a-z]+)\//)[1]===s.toLowerCase();return Kn[a]=d&&no(o,c,{includePrerelease:!0,loose:!0})}catch{return!1}}const Zt=2147483647,Ye=36,Ar=1,xn=26,Il=38,Al=700,ws=72,Es=128,xs="-",Cl=/^xn--/,Pl=/[^\0-\x7F]/,Ll=/[\x2E\u3002\uFF0E\uFF61]/g,Ml={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Oo=Ye-Ar,Xe=Math.floor,Do=String.fromCharCode;function ht(e){throw new RangeError(Ml[e])}function Rl(e,t){const n=[];let o=e.length;for(;o--;)n[o]=t(e[o]);return n}function Ss(e,t){const n=e.split("@");let o="";n.length>1&&(o=n[0]+"@",e=n[1]),e=e.replace(Ll,".");const i=e.split("."),s=Rl(i,t).join(".");return o+s}function ks(e){const t=[];let n=0;const o=e.length;for(;n<o;){const i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<o){const s=e.charCodeAt(n++);(s&64512)==56320?t.push(((i&1023)<<10)+(s&1023)+65536):(t.push(i),n--)}else t.push(i)}return t}const Ol=e=>String.fromCodePoint(...e),Dl=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:Ye},vi=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},Is=function(e,t,n){let o=0;for(e=n?Xe(e/Al):e>>1,e+=Xe(e/t);e>Oo*xn>>1;o+=Ye)e=Xe(e/Oo);return Xe(o+(Oo+1)*e/(e+Il))},As=function(e){const t=[],n=e.length;let o=0,i=Es,s=ws,a=e.lastIndexOf(xs);a<0&&(a=0);for(let c=0;c<a;++c)e.charCodeAt(c)>=128&&ht("not-basic"),t.push(e.charCodeAt(c));for(let c=a>0?a+1:0;c<n;){const l=o;for(let f=1,u=Ye;;u+=Ye){c>=n&&ht("invalid-input");const p=Dl(e.charCodeAt(c++));p>=Ye&&ht("invalid-input"),p>Xe((Zt-o)/f)&&ht("overflow"),o+=p*f;const h=u<=s?Ar:u>=s+xn?xn:u-s;if(p<h)break;const m=Ye-h;f>Xe(Zt/m)&&ht("overflow"),f*=m}const d=t.length+1;s=Is(o-l,d,l==0),Xe(o/d)>Zt-i&&ht("overflow"),i+=Xe(o/d),o%=d,t.splice(o++,0,i)}return String.fromCodePoint(...t)},Cs=function(e){const t=[];e=ks(e);const n=e.length;let o=Es,i=0,s=ws;for(const l of e)l<128&&t.push(Do(l));const a=t.length;let c=a;for(a&&t.push(xs);c<n;){let l=Zt;for(const f of e)f>=o&&f<l&&(l=f);const d=c+1;l-o>Xe((Zt-i)/d)&&ht("overflow"),i+=(l-o)*d,o=l;for(const f of e)if(f<o&&++i>Zt&&ht("overflow"),f===o){let u=i;for(let p=Ye;;p+=Ye){const h=p<=s?Ar:p>=s+xn?xn:p-s;if(u<h)break;const m=u-h,g=Ye-h;t.push(Do(vi(h+m%g,0))),u=Xe(m/g)}t.push(Do(vi(u,0))),s=Is(i,d,c===a),i=0,++c}++i,++o}return t.join("")},$l=function(e){return Ss(e,function(t){return Cl.test(t)?As(t.slice(4).toLowerCase()):t})},Nl=function(e){return Ss(e,function(t){return Pl.test(t)?"xn--"+Cs(t):t})},Ps={version:"2.3.1",ucs2:{decode:ks,encode:Ol},decode:As,encode:Cs,toASCII:Nl,toUnicode:$l};function ar(e,t=[]){return e?(!t.length||e.indexOf(":")===-1||t.forEach(n=>{const{shortcode:o,staticUrl:i,url:s}=n;e=e.replace(new RegExp(`:${o}:`,"g"),`<picture><source srcset="${i}" media="(prefers-reduced-motion: reduce)"></source><img class="shortcode-emoji emoji" src="${s}" alt=":${o}:" width="16" height="16" loading="lazy" decoding="async" fetchPriority="low" /></picture>`)}),e):""}const zt=document.createElement("div"),Fl=["u-url","mention","hashtag"],zl=/[&<>]/g;function $o(e){return e.replace(zl,t=>({"&":"&amp;","<":"&lt;",">":"&gt;"})[t])}const Vl=/<a/i,Hl=/^https?:\/\//i,Bl=/^@[^@]+(@[^@]+)?$/,Ul=/^#[^#]+$/,jl=/^```[^]+```$/,Wl=/^```/,Kl=/```$/,Zl=/`[^`]+`/,Gl=/(twitter|x)\.com/i,ql=/@[a-zA-Z0-9_]+@(twitter|x)\.com/,Yl=/(@([a-zA-Z0-9_]+)@(twitter|x)\.com)/g,Xl=/(`[^]+?`)/g;function Ql(e,t){if(t){const n=document.createElement("template");return n.innerHTML=e,n.content}else{const n=document.createElement("div");return n.innerHTML=e,n}}function Jl(e,t={}){const{emojis:n,returnDOM:o,postEnhanceDOM:i=()=>{}}=t;let s=e;const a=Ql(s,o),c=Vl.test(s),l=s.includes("```");if(c){const f=a.querySelectorAll('a:not([target="_blank"])');for(const p of f)p.setAttribute("target","_blank");const u=a.querySelectorAll("a[class]");for(const p of u)for(const h of p.classList)Fl.includes(h)||p.classList.remove(h)}if(c){const f=a.querySelectorAll("a[href]");for(const u of f)Hl.test(u.textContent.trim())&&(u.classList.add("has-url-text"),ou(u))}if(c){const f=a.querySelectorAll("a[href]"),u=[];for(const p of f){const h=p.innerText.trim(),m=p.querySelector("*");if(Bl.test(h)){const[g,_,T]=h.split("@");m||(!u.some(([y])=>y===_)||u.some(([y,w])=>y===_&&w===T)?(p.innerHTML=`@<span>${_}</span>`,u.push([_,T])):p.innerHTML=`@<span>${_}@${T}</span>`),p.classList.add("mention")}Ul.test(h)&&(m||(p.innerHTML=`#<span>${h.slice(1)}</span>`),p.classList.add("mention","hashtag"))}}let d;if(s.includes(":")&&(n!=null&&n.length)){d=Fo(a);for(const f of d){let u=$o(f.nodeValue);u=ar(u,n),zt.innerHTML=u,f.replaceWith(...zt.childNodes)}}if(l){const f=[...a.querySelectorAll("p")].filter(u=>jl.test(u.innerText.trim()));for(const u of f){const p=document.createElement("pre");for(const h of u.querySelectorAll("br"))h.replaceWith(`
`);p.innerHTML=`<code>${u.innerHTML.trim()}</code>`,u.replaceWith(p)}}if(l){const u=[...a.querySelectorAll("p")].filter(p=>Wl.test(p.innerText));for(const p of u){const h=[p];let m=!1,g=p;for(;g.nextElementSibling;){const _=g.nextElementSibling;if(_&&_.tagName==="P")if(Kl.test(_.innerText)){h.push(_),m=!0;break}else h.push(_);else break;g=_}if(m){const _=document.createElement("pre");for(const y of h)for(const w of y.querySelectorAll("br"))w.replaceWith(`
`);const T=h.map(y=>y.innerHTML).join(`
`);_.innerHTML=`<code tabindex="0">${T}</code>`,p.replaceWith(_);for(const y of h)y.remove()}}}if(s.includes("`")){d=Fo(a);for(const f of d){let u=$o(f.nodeValue);Zl.test(u)&&(u=u.replaceAll(Xl,"<code>$1</code>")),zt.innerHTML=u,f.replaceWith(...zt.childNodes)}}if(Gl.test(s)){d=Fo(a,{rejectFilter:["A"]});for(const f of d){let u=$o(f.nodeValue);ql.test(u)&&(u=u.replaceAll(Yl,'<a href="https://twitter.com/$2" rel="nofollow noopener noreferrer" target="_blank">$1</a>')),zt.innerHTML=u,f.replaceWith(...zt.childNodes)}}if(s.includes("#")){let f=null;const u=[...a.querySelectorAll("p")].filter((p,h)=>{let m=0;for(let g=0;g<p.childNodes.length;g++){const _=p.childNodes[g];if(_.nodeType===Node.TEXT_NODE){if(_.textContent.trim()!=="")return!1}else if(_.tagName!=="BR")if(_.tagName==="A"){const T=_.textContent.trim();if(!T||!T.startsWith("#"))return!1;m++}else return!1}if(m>3||m>1&&f&&h===f+1)return f=h,!0});if(u!=null&&u.length)for(const p of u)p.classList.add("hashtag-stuffing"),p.title=p.innerText}if(s.includes("<img")){const f=a.querySelectorAll("img");for(let u=0;u<f.length;u++){const p=f[u],h=p.getAttribute("width")||p.naturalWidth,m=p.getAttribute("height")||p.naturalHeight;h&&m&&p.style.setProperty("--original-aspect-ratio",`${h}/${m}`)}}for(const f of a.childNodes)if(f.nodeType===Node.TEXT_NODE){const u=document.createElement("span");u.textContent=f.textContent,a.replaceChild(u,f)}return i&&queueMicrotask(()=>i(a)),o?a:a.innerHTML}const Ls=Oe(Jl),eu=["STYLE","IMG","VIDEO","AUDIO","AREA","MAP","TRACK","EMBED","IFRAME","OBJECT","PICTURE","PORTAL","SOURCE","SVG","MATH","CANVAS","NOSCRIPT","SCRIPT","INPUT","OPTION","TEXTAREA","SLOT","TEMPLATE"],tu=Object.fromEntries(eu.map(e=>[e,!0])),nu=/^(https?:\/\/(www\.)?|xmpp:)/,No=30;function ou(e){var t;if(!(!e||(t=e.querySelector)!=null&&t.call(e,"*")))try{const n=e.innerText.trim(),o=(n.match(nu)||[])[0]||"";if(!o)return;const i=n.slice(o.length,o.length+No),s=n.slice(o.length+No),a=n.slice(o.length).length>No;e.innerHTML=`<span class="invisible">${o}</span><span class=${a?"ellipsis":""}>${i}</span><span class="invisible">${s}</span>`}catch{}}function Fo(e,t={}){var a;const n=[],o=Object.assign({},tu,(a=t.rejectFilter)==null?void 0:a.reduce((c,l)=>(c[l]=!0,c),{})),i=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode(c){return o[c.parentNode.nodeName]?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}},!1);let s;for(;s=i.nextNode();)n.push(s);return n}const Vt=document.createElement("div");function ru(e,t){if(!e)return"";const{preProcess:n}=t||{};return Vt.innerHTML=e.replace(/<\/p>/g,`</p>
`).replace(/<\/li>/g,`</li>
`),Vt.querySelectorAll("br").forEach(o=>{o.replaceWith(`
`)}),n==null||n(Vt),Vt.querySelectorAll(".invisible").forEach(o=>{o.remove()}),Vt.querySelectorAll(".ellipsis").forEach(o=>{o.append("...")}),Vt.innerText.replace(/[\r\n]{3,}/g,`
`).trim()}const _o=Oe(ru);function iu(e){const{mentions:t=[],instance:n,previewMode:o,statusURL:i}=e||{};return s=>{var f,u;let{target:a}=s;if(a=a.closest("a"),!a||s.metaKey||s.ctrlKey||s.shiftKey||s.altKey||s.which===2)return;const c=(f=a.previousSibling)==null?void 0:f.textContent,l=c==null?void 0:c.endsWith("@"),d=a.innerText.startsWith("@");if((a.classList.contains("u-url")||a.classList.contains("mention"))&&d||l&&!d){const p=(a.querySelector("span")||a).innerText.trim(),h=p.replace(/^@/,""),m=a.getAttribute("href"),g=t.find(_=>_.url===m)||t.find(_=>_.acct===h||_.username===h);if(g)s.preventDefault(),s.stopPropagation(),B.showAccount={account:g.acct,instance:n};else if(!/^http/i.test(p)){s.preventDefault(),s.stopPropagation();const _=a.getAttribute("href");B.showAccount={account:_,instance:n}}}else if(!o){const p=c==null?void 0:c.endsWith("#");if(a.classList.contains("hashtag")||p){s.preventDefault(),s.stopPropagation();const h=a.innerText.replace(/^#/,"").trim(),m=n?`#/${n}/t/${h}`:`#/t/${h}`;location.hash=m}else(u=B.unfurledLinks[a.href])!=null&&u.url&&i!==a.href&&(s.preventDefault(),s.stopPropagation(),B.prevLocation={pathname:location.hash.replace(/^#/,"")},location.hash=`#${B.unfurledLinks[a.href].url}`)}}}function eh(e,t){return()=>S.number(e,{style:"unit",unit:t,unitDisplay:"long"})}const su=Oe(()=>new Intl.DateTimeFormat().resolvedOptions().locale),au=e=>{const{locale:t,dateYear:n,hideTime:o,formatOpts:i,forceOpts:s}=e||{},a=t.replace(/-[a-z]+$/i,""),c=bn([a],[su],t),l=new Date().getFullYear(),d=s||{year:n===l?void 0:"numeric",month:"short",day:"numeric",hour:o?void 0:"numeric",minute:o?void 0:"numeric",...i};try{return Intl.DateTimeFormat(c,d)}catch{}try{return Intl.DateTimeFormat(t,d)}catch{}return Intl.DateTimeFormat(void 0,d)},cu=Oe(au);function Sn(e,t){return e instanceof Date||(e=new Date(e)),cu({dateYear:e.getFullYear(),locale:S.locale,...t}).format(e)}function rt(e){try{return S.number(e,{notation:"compact",roundingMode:"floor"})}catch{return e}}const _i=5e3;function Gn(e){if(e||(e=!0),B.showCompose){B.composerState.minimized?Re({duration:_i,text:S._({id:"/4fHR1"})}):Re({duration:_i,text:S._({id:"vvl08N"})});return}sc(),B.showCompose=e}function th({skeleton:e,account:t,avatarSize:n="xl",useAvatarStatic:o=!1,instance:i,external:s,internal:a,onClick:c,showActivity:l=!1,showStats:d=!1,accountInstance:f,hideDisplayName:u=!1,relationship:p={},excludeRelationshipAttrs:h=[]}){if(e)return r("div",{class:"account-block skeleton",children:[r(st,{size:n}),r("span",{children:[r("b",{children:"████████"}),r("br",{}),r("span",{class:"account-block-acct",children:"██████"})]})]});if(!t)return null;const{id:m,acct:g,avatar:_,avatarStatic:T,displayName:y,username:w,emojis:E,url:x,statusesCount:b,lastStatusAt:k,bot:D,fields:L,note:A,group:C,followersCount:R,createdAt:K,locked:U}=t;let[oe,Q,re]=g.match(/([^@]+)(@.+)/i)||[,g];f&&(re=`@${f}`);const q=L==null?void 0:L.find(se=>!!se.verifiedAt&&!!se.value),ie={};for(const se in p)h.includes(se)||(ie[se]=p[se]);const ce=ie.following||ie.followedBy||ie.requested;return r("a",{class:"account-block",href:x,target:s?"_blank":null,title:re?g:`@${g}`,onClick:se=>{if(!s){if(se.preventDefault(),c)return c(se);a?location.hash=`/${i}/a/${m}`:B.showAccount={account:t,instance:i}}},children:[r("div",{class:"avatar-container",children:r(st,{url:o?T:_||T,size:n,squircle:D})}),r("span",{class:"account-block-content",children:[!u&&r(F,{children:y?r("b",{children:r(qt,{text:y,emojis:E})}):r("b",{children:w})})," ",r("span",{class:"account-block-acct bidi-isolate",children:[re?"":"@",Q,r("wbr",{}),re,U&&r(F,{children:[" ",r(M,{icon:"lock",size:"s",alt:S._({id:"G2fuEb"})})]})]}),l&&r("div",{class:"account-block-stats",children:[r(O,{id:"ajzDof",values:{0:rt(b)}}),!!k&&r(F,{children:[" ","·"," ",r(O,{id:"f8bJ3C",values:{0:Sn(k,{hideTime:!0})}})]})]}),d&&r("div",{class:"account-block-stats",children:[D&&r(F,{children:r("span",{class:"tag collapsed",children:[r(M,{icon:"bot"})," ",r(O,{id:"9Vdq+j"})]})}),!!C&&r(F,{children:r("span",{class:"tag collapsed",children:[r(M,{icon:"group"})," ",r(O,{id:"L8fEEm"})]})}),ce&&r("div",{class:"shazam-container-horizontal",children:r("div",{class:"shazam-container-inner",children:ie.following&&ie.followedBy?r("span",{class:"tag minimal",children:r(O,{id:"7oRLbi"})}):ie.requested?r("span",{class:"tag minimal",children:r(O,{id:"Yx0Ud8"})}):ie.following?r("span",{class:"tag minimal",children:r(O,{id:"y6sq5j"})}):ie.followedBy?r("span",{class:"tag minimal",children:r(O,{id:"p3UO/y"})}):null})},p.id),!!R&&r("span",{class:"ib",children:r(O,{id:"Mn1E9C",values:{followersCount:R}})}),!!q&&r("span",{class:"verified-field",children:[r(M,{icon:"check-circle",size:"s",alt:S._({id:"QDEWii"})})," ",r("span",{dangerouslySetInnerHTML:{__html:Ls(q.value,{emojis:E})}})]}),!D&&!C&&!ce&&!R&&!q&&!!K&&r("span",{class:"created-at",children:r(O,{id:"PCcEFZ",values:{0:Sn(K,{hideTime:!0})},components:{0:r("time",{datetime:K})}})})]})]})]})}var Ms={};function Ze(e,t){typeof t=="boolean"&&(t={forever:t}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=t||{},this._maxRetryTime=t&&t.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))}var lu=Ze;Ze.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)};Ze.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null};Ze.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var t=new Date().getTime();if(e&&t-this._operationStart>=this._maxRetryTime)return this._errors.push(e),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var n=this._timeouts.shift();if(n===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),n=this._cachedTimeouts.slice(-1);else return!1;var o=this;return this._timer=setTimeout(function(){o._attempts++,o._operationTimeoutCb&&(o._timeout=setTimeout(function(){o._operationTimeoutCb(o._attempts)},o._operationTimeout),o._options.unref&&o._timeout.unref()),o._fn(o._attempts)},n),this._options.unref&&this._timer.unref(),!0};Ze.prototype.attempt=function(e,t){this._fn=e,t&&(t.timeout&&(this._operationTimeout=t.timeout),t.cb&&(this._operationTimeoutCb=t.cb));var n=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){n._operationTimeoutCb()},n._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};Ze.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)};Ze.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)};Ze.prototype.start=Ze.prototype.try;Ze.prototype.errors=function(){return this._errors};Ze.prototype.attempts=function(){return this._attempts};Ze.prototype.mainError=function(){if(this._errors.length===0)return null;for(var e={},t=null,n=0,o=0;o<this._errors.length;o++){var i=this._errors[o],s=i.message,a=(e[s]||0)+1;e[s]=a,a>=n&&(t=i,n=a)}return t};(function(e){var t=lu;e.operation=function(n){var o=e.timeouts(n);return new t(o,{forever:n&&(n.forever||n.retries===1/0),unref:n&&n.unref,maxRetryTime:n&&n.maxRetryTime})},e.timeouts=function(n){if(n instanceof Array)return[].concat(n);var o={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var i in n)o[i]=n[i];if(o.minTimeout>o.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var s=[],a=0;a<o.retries;a++)s.push(this.createTimeout(a,o));return n&&n.forever&&!s.length&&s.push(this.createTimeout(a,o)),s.sort(function(c,l){return c-l}),s},e.createTimeout=function(n,o){var i=o.randomize?Math.random()+1:1,s=Math.round(i*Math.max(o.minTimeout,1)*Math.pow(o.factor,n));return s=Math.min(s,o.maxTimeout),s},e.wrap=function(n,o,i){if(o instanceof Array&&(i=o,o=null),!i){i=[];for(var s in n)typeof n[s]=="function"&&i.push(s)}for(var a=0;a<i.length;a++){var c=i[a],l=n[c];n[c]=(function(f){var u=e.operation(o),p=Array.prototype.slice.call(arguments,1),h=p.pop();p.push(function(m){u.retry(m)||(m&&(arguments[0]=u.mainError()),h.apply(this,arguments))}),u.attempt(function(){f.apply(n,p)})}).bind(n,l),n[c].options=o}}})(Ms);var uu=Ms;const du=vr(uu),fu=Object.prototype.toString,hu=e=>fu.call(e)==="[object Error]",pu=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 mu(e){return e&&hu(e)&&e.name==="TypeError"&&typeof e.message=="string"?e.message==="Load failed"?e.stack===void 0:pu.has(e.message):!1}class gu extends Error{constructor(t){super(),t instanceof Error?(this.originalError=t,{message:t}=t):(this.originalError=new Error(t),this.originalError.stack=this.stack),this.name="AbortError",this.message=t}}const yi=(e,t,n)=>{const o=n.retries-(t-1);return e.attemptNumber=t,e.retriesLeft=o,e};async function vu(e,t){return new Promise((n,o)=>{t={...t},t.onFailedAttempt??(t.onFailedAttempt=()=>{}),t.shouldRetry??(t.shouldRetry=()=>!0),t.retries??(t.retries=10);const i=du.operation(t),s=()=>{var c;i.stop(),o((c=t.signal)==null?void 0:c.reason)};t.signal&&!t.signal.aborted&&t.signal.addEventListener("abort",s,{once:!0});const a=()=>{var c;(c=t.signal)==null||c.removeEventListener("abort",s),i.stop()};i.attempt(async c=>{try{const l=await e(c);a(),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&&!mu(l))throw l;if(yi(l,c,t),await t.shouldRetry(l)||(i.stop(),o(l)),await t.onFailedAttempt(l),!i.retry(l))throw i.mainError()}catch(d){yi(d,c,t),a(),o(d)}}})})}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"}];var yu=Object.defineProperty,bu=(e,t,n)=>t in e?yu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qn=(e,t,n)=>bu(e,typeof t!="symbol"?t+"":t,n),cr=new Map,Yn=new WeakMap,bi=0,Tu=void 0;function wu(e){return e?(Yn.has(e)||(bi+=1,Yn.set(e,bi.toString())),Yn.get(e)):"0"}function Eu(e){return Object.keys(e).sort().filter(t=>e[t]!==void 0).map(t=>`${t}_${t==="root"?wu(e.root):e[t]}`).toString()}function xu(e){const t=Eu(e);let n=cr.get(t);if(!n){const o=new Map;let i;const s=new IntersectionObserver(a=>{a.forEach(c=>{var l;const d=c.isIntersecting&&i.some(f=>c.intersectionRatio>=f);e.trackVisibility&&typeof c.isVisible>"u"&&(c.isVisible=d),(l=o.get(c.target))==null||l.forEach(f=>{f(d,c)})})},e);i=s.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:s,elements:o},cr.set(t,n)}return n}function Rs(e,t,n={},o=Tu){if(typeof window.IntersectionObserver>"u"&&o!==void 0){const l=e.getBoundingClientRect();return t(o,{isIntersecting:o,target:e,intersectionRatio:typeof n.threshold=="number"?n.threshold:0,time:0,boundingClientRect:l,intersectionRect:l,rootBounds:l}),()=>{}}const{id:i,observer:s,elements:a}=xu(n),c=a.get(e)||[];return a.has(e)||a.set(e,c),c.push(t),s.observe(e),function(){c.splice(c.indexOf(t),1),c.length===0&&(a.delete(e),s.unobserve(e)),a.size===0&&(s.disconnect(),cr.delete(i))}}function Su(e){return typeof e.children!="function"}var nh=class extends Gi{constructor(e){super(e),qn(this,"node",null),qn(this,"_unobserveCb",null),qn(this,"handleNode",t=>{this.node&&(this.unobserve(),!t&&!this.props.triggerOnce&&!this.props.skip&&this.setState({inView:!!this.props.initialInView,entry:void 0})),this.node=t||null,this.observeNode()}),qn(this,"handleChange",(t,n)=>{t&&this.props.triggerOnce&&this.unobserve(),Su(this.props)||this.setState({inView:t,entry:n}),this.props.onChange&&this.props.onChange(t,n)}),this.state={inView:!!e.initialInView,entry:void 0}}componentDidMount(){this.unobserve(),this.observeNode()}componentDidUpdate(e){(e.rootMargin!==this.props.rootMargin||e.root!==this.props.root||e.threshold!==this.props.threshold||e.skip!==this.props.skip||e.trackVisibility!==this.props.trackVisibility||e.delay!==this.props.delay)&&(this.unobserve(),this.observeNode())}componentWillUnmount(){this.unobserve()}observeNode(){if(!this.node||this.props.skip)return;const{threshold:e,root:t,rootMargin:n,trackVisibility:o,delay:i,fallbackInView:s}=this.props;this._unobserveCb=Rs(this.node,this.handleChange,{threshold:e,root:t,rootMargin:n,trackVisibility:o,delay:i},s)}unobserve(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)}render(){const{children:e}=this.props;if(typeof e=="function"){const{inView:h,entry:m}=this.state;return e({inView:h,entry:m,ref:this.handleNode})}const{as:t,triggerOnce:n,threshold:o,root:i,rootMargin:s,onChange:a,skip:c,trackVisibility:l,delay:d,initialInView:f,fallbackInView:u,...p}=this.props;return Oa(t||"div",{ref:this.handleNode,...p},e)}};function ku({threshold:e,delay:t,trackVisibility:n,rootMargin:o,root:i,triggerOnce:s,skip:a,initialInView:c,fallbackInView:l,onChange:d}={}){var f;const[u,p]=Z(null),h=$(),[m,g]=Z({inView:!!c,entry:void 0});h.current=d,ee(()=>{if(a||!u)return;let w;return w=Rs(u,(E,x)=>{g({inView:E,entry:x}),h.current&&h.current(E,x),x.isIntersecting&&s&&w&&(w(),w=void 0)},{root:i,rootMargin:o,threshold:e,trackVisibility:n,delay:t},l),()=>{w&&w()}},[Array.isArray(e)?e.toString():e,u,i,o,s,a,n,l,t]);const _=(f=m.entry)==null?void 0:f.target,T=$();!u&&_&&!s&&!a&&T.current!==_&&(T.current=_,g({inView:!!c,entry:void 0}));const y=[p,m.inView,m.entry];return y.ref=y[0],y.inView=y[1],y.entry=y[2],y}const Ti=48,zo={};function Os({id:e,children:t}){const n=$(),o=!!zo[e],[i,s]=Z(!1),[a,c]=Z(o||!1),{ref:l}=ku({root:null,rootMargin:`-${Ti}px 0px 0px 0px`,trackVisibility:!0,delay:1e3,onChange:d=>{d&&(s(!0),e&&(zo[e]=!0))},triggerOnce:!0,skip:a||i});return ee(()=>{if(!n.current)return;const d=n.current.getBoundingClientRect();d.bottom>Ti&&(d.top<window.innerHeight?s(!0):c(!0),e&&(zo[e]=!0))},[]),a?t:r("div",{ref:n,class:"shazam-container no-animation",hidden:!i,children:r("div",{ref:l,class:"shazam-container-inner",children:t})})}const Iu={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:wi}=Iu,gn=wi?wi.split(/\s+/):[],Au=qi({limit:1,interval:2e3});let Vo=0;function Cu(e,t,n){return vu(()=>{let i=gn[Vo];return fetch(`https://${i}/api/v1/${t}/${n}/${encodeURIComponent(e)}`).then(s=>{if(!s.ok)throw new Error(s.statusText);return s.json()}).then(s=>{var a;return{provider:"lingva",content:s.translation,detectedSourceLanguage:(a=s.info)==null?void 0:a.detectedSource,info:s.info}})},{retries:3,onFailedAttempt:i=>{Vo=(Vo+1)%gn.length}})}const Ds=1e3*60*60,$s=mo(Cu,{maxAge:Ds}),Pu=mo(Au($s),{maxAge:Ds});function Lu({forceTranslate:e,sourceLanguage:t,onTranslate:n,text:o="",mini:i,autoDetected:s}){const a=bs(!0),[c,l]=Z("default"),[d,f]=Z(null),[u,p]=Z(null),[h,m]=Z(null),g=$(),_=t?ln(t):null,T=ln(a),y=$("auto");n||(n=i?Pu:$s);const w=async()=>{var E,x;l("loading");try{const{content:b,detectedSourceLanguage:k,provider:D,error:L,...A}=await n(o,y.current,a);if(b){if(k){const C=ln(k);m(C)}if(D==="lingva"){const C=(x=(E=A==null?void 0:A.info)==null?void 0:E.pronunciation)==null?void 0:x.query;C&&f(C)}p(b),l("default"),!i&&b.trim()!==o.trim()&&(g.current.open=!0,g.current.scrollIntoView({behavior:"smooth",block:"nearest"}))}else l("error")}catch{l("error")}};return ee(()=>{e&&w()},[e]),i?u&&u.trim()!==o.trim()&&h!==T?r(Os,{children:r("div",{class:"status-translation-block-mini",children:[r(M,{icon:"translate",alt:S._({id:"zVJKbG",values:{sourceLangText:_}})}),r("output",{lang:a,dir:"auto",title:d||"",children:u})]})}):null:r("div",{class:"status-translation-block",onClick:E=>{E.preventDefault()},children:r("details",{ref:g,children:[r("summary",{children:r("button",{type:"button",onClick:async E=>{E.preventDefault(),E.stopPropagation(),g.current.open=!g.current.open,c!=="loading"&&(u||w())},children:[r(M,{icon:"translate"})," ",r("span",{children:c==="loading"?S._({id:"Zxkt/v"}):t&&_&&!h?s?S._({id:"R20Yf9",values:{sourceLangText:_}}):S._({id:"h8zDAI",values:{sourceLangText:_}}):S._({id:"pi8x/S"})})]})}),r("div",{class:"translated-block",children:[r("div",{class:"translation-info insignificant",children:[r("select",{class:"translated-source-select",disabled:c==="loading",onChange:E=>{y.current=E.target.value,w()},children:_u.map(E=>{const x=ln({code:E.code,fallback:E.name}),b=ln({code:E.code,locale:E.code}),k=x!==b;return r("option",{value:E.code,children:E.code==="auto"?S._({id:"Bze3gr",values:{0:h??"…"}}):k?`${b} - ${x}`:b})})})," ",r("span",{children:["→ ",T]}),r(Yi,{abrupt:!0,hidden:c!=="loading"})]}),c==="error"?r("p",{class:"ui-state",children:r(O,{id:"m5LihO"})}):!!u&&r(F,{children:[r("output",{class:"translated-content",lang:a,dir:"auto",children:u}),!!d&&r("output",{class:"translated-pronunciation-content",tabIndex:-1,onClick:E=>{E.target.classList.toggle("expand")},children:d})]})]})]})})}const Mu=gn!=null&&gn.length?Lu:()=>null;function ut(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function Ns(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const o=ut(n);return(i,s)=>o.then(a=>s(a.transaction(t,i).objectStore(t)))}let Ho;function Lt(){return Ho||(Ho=Ns("keyval-store","keyval")),Ho}function Ru(e,t=Lt()){return t("readonly",n=>ut(n.get(e)))}function Ou(e,t,n=Lt()){return n("readwrite",o=>(o.put(t,e),ut(o.transaction)))}function Du(e,t=Lt()){return t("readonly",n=>Promise.all(e.map(o=>ut(n.get(o)))))}function $u(e,t=Lt()){return t("readwrite",n=>(n.delete(e),ut(n.transaction)))}function Nu(e,t=Lt()){return t("readwrite",n=>(e.forEach(o=>n.delete(o)),ut(n.transaction)))}function Fu(e=Lt()){return e("readwrite",t=>(t.clear(),ut(t.transaction)))}function zu(e,t){return e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},ut(e.transaction)}function Vu(e=Lt()){return e("readonly",t=>{if(t.getAllKeys)return ut(t.getAllKeys());const n=[];return zu(t,o=>n.push(o.key)).then(()=>n)})}function Ei(e,t){const n=Ns(e,t);return{set:(o,i)=>Ou(o,i,n),get:o=>Ru(o,n),getMany:o=>Du(o,n),del:o=>$u(o,n),delMany:o=>Nu(o,n),clear:()=>Fu(n),keys:()=>Vu(n)}}const oh={drafts:Ei("drafts-db","drafts-store"),catchup:Ei("catchup-db","catchup-store")};async function rh(e,t={}){if(!(e!=null&&e.length))return;const{masto:n}=so(),o=_r(),i=e.reduce((s,a)=>(!s.includes(a.id)&&!t[a.id]&&a.id!==o&&s.push(a.id),s),[]);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 Be extends HTMLElement{constructor(){super(),this.isIframeLoaded=!1,this.setupDom()}static get observedAttributes(){return["videoid","playlistid","videoplay","videotitle"]}connectedCallback(){this.addEventListener("pointerover",()=>Be.warmConnections(this),{once:!0}),this.addEventListener("click",()=>this.addIframe())}get videoId(){return encodeURIComponent(this.getAttribute("videoid")||"")}set videoId(t){this.setAttribute("videoid",t)}get playlistId(){return encodeURIComponent(this.getAttribute("playlistid")||"")}set playlistId(t){this.setAttribute("playlistid",t)}get videoTitle(){return this.getAttribute("videotitle")||"Video"}set videoTitle(t){this.setAttribute("videotitle",t)}get videoPlay(){return this.getAttribute("videoplay")||"Play"}set videoPlay(t){this.setAttribute("videoplay",t)}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(t){this.setAttribute("params",t)}setupDom(){const t=this.attachShadow({mode:"open"});let n="";window.liteYouTubeNonce&&(n=`nonce="${window.liteYouTubeNonce}"`),t.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=t.querySelector("#frame"),this.domRefImg={fallback:t.querySelector("#fallbackPlaceholder"),webp:t.querySelector("#webpPlaceholder"),jpeg:t.querySelector("#jpegPlaceholder")},this.domRefPlayButton=t.querySelector("#playButton")}setupComponent(){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()}attributeChangedCallback(t,n,o){n!==o&&(this.setupComponent(),this.domRefFrame.classList.contains("activated")&&(this.domRefFrame.classList.remove("activated"),this.shadowRoot.querySelector("iframe").remove(),this.isIframeLoaded=!1))}addIframe(t=!1){if(!this.isIframeLoaded){let n=t?0:1;const o=this.noCookie?"-nocookie":"";let i;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);const s=`
<iframe credentialless frameborder="0" title="${this.videoTitle}"
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen
src="https://www.youtube${o}.com/embed/${i}autoplay=${n}&${this.params}"
></iframe>`;this.domRefFrame.insertAdjacentHTML("beforeend",s),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 o,i;const t=`https://i.ytimg.com/vi_webp/${this.videoId}/${this.posterQuality}.webp`,n=`https://i.ytimg.com/vi/${this.videoId}/${this.posterQuality}.jpg`;this.domRefImg.fallback.loading=this.posterLoading,this.domRefImg.webp.srcset=t,this.domRefImg.jpeg.srcset=n,this.domRefImg.fallback.src=n,this.domRefImg.fallback.setAttribute("aria-label",`${this.videoPlay}: ${this.videoTitle}`),(i=(o=this.domRefImg)==null?void 0:o.fallback)==null||i.setAttribute("alt",`${this.videoPlay}: ${this.videoTitle}`)}initIntersectionObserver(){const t={root:null,rootMargin:"0px",threshold:0};new IntersectionObserver((o,i)=>{o.forEach(s=>{s.isIntersecting&&!this.isIframeLoaded&&(Be.warmConnections(this),this.addIframe(!0),i.unobserve(this))})},t).observe(this),this.autoPause&&new IntersectionObserver((i,s)=>{i.forEach(a=>{var c,l;a.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 t,n;(n=(t=this.shadowRoot.querySelector("iframe"))==null?void 0:t.contentWindow)==null||n.postMessage('{"event":"command","func":"playVideo","args":""}',"*")},2e3)}isYouTubeShort(){return this.getAttribute("short")===""&&window.matchMedia("(max-width: 40em)").matches}static addPrefetch(t,n){const o=document.createElement("link");o.rel=t,o.href=n,o.crossOrigin="true",document.head.append(o)}static warmConnections(t){Be.isPreconnected||window.liteYouTubeIsPreconnected||(Be.addPrefetch("preconnect","https://i.ytimg.com/"),Be.addPrefetch("preconnect","https://s.ytimg.com"),t.noCookie?Be.addPrefetch("preconnect","https://www.youtube-nocookie.com"):(Be.addPrefetch("preconnect","https://www.youtube.com"),Be.addPrefetch("preconnect","https://www.google.com"),Be.addPrefetch("preconnect","https://googleads.g.doubleclick.net"),Be.addPrefetch("preconnect","https://static.doubleclick.net")),Be.isPreconnected=!0,window.liteYouTubeIsPreconnected=!0)}}Be.isPreconnected=!1;customElements.define("lite-youtube",Be);const Fs=new Uint8Array(128);for(let e=0;e<83;e++)Fs["0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz#$%*+,-.:;=?@[]^_{|}~".charCodeAt(e)]=e;const oo=(e,t,n)=>{let o=0;for(;t<n;)o*=83,o+=Fs[e.charCodeAt(t++)];return o},zs=Math.pow,kn=Math.PI,Hu=kn*2,Vs=3294.6,Hs=269.025,Bu=e=>e>10.31475?zs(e/Hs+.052132,2.4):e/Vs,Bo=e=>~~(e>1227e-8?Hs*zs(e,.416666)-13.025:e*Vs+1),vn=e=>(e<0?-1:1)*e*e,xi=e=>{for(e+=kn/2;e>kn;)e-=Hu;const t=1.27323954*e-.405284735*vn(e);return .225*(vn(t)-t)+t};function Cr(e){const t=oo(e,2,6);return[t>>16,t>>8&255,t&255]}function Uu(e,t,n,o){const i=oo(e,0,1),s=i%9+1,a=~~(i/9)+1,c=s*a;let l=0,d=0,f=0,u=0,p=0,h=0,m=0,g=0,_=0,T=0,y=0,w=0;const E=(oo(e,1,2)+1)/13446*(o|1),x=new Float64Array(c*3),b=Cr(e);for(l=0;l<3;l++)x[l]=Bu(b[l]);for(l=1;l<c;l++)w=oo(e,4+l*2,6+l*2),x[l*3]=vn(~~(w/361)-9)*E,x[l*3+1]=vn(~~(w/19)%19-9)*E,x[l*3+2]=vn(w%19-9)*E;const k=new Float64Array(a*n),D=new Float64Array(s*t);for(d=0;d<a;d++)for(u=0;u<n;u++)k[d*n+u]=xi(kn*u*d/n);for(l=0;l<s;l++)for(f=0;f<t;f++)D[l*t+f]=xi(kn*f*l/t);const L=t*4,A=new Uint8ClampedArray(L*n);for(u=0;u<n;u++)for(f=0;f<t;f++){for(p=h=m=0,d=0;d<a;d++)for(_=k[d*n+u],l=0;l<s;l++)g=D[l*t+f]*_,T=(l+d*s)*3,p+=x[T]*g,h+=x[T+1]*g,m+=x[T+2]*g;y=4*f+u*L,A[y]=Bo(p),A[y+1]=Bo(h),A[y+2]=Bo(m),A[y+3]=255}return A}const ju=(e,t={})=>{const n=t.char||" ",o=t.count||2;let i=0;const s=[];return e.reverse().reduce((a,c)=>{s.length&&i&&s[i]&&s[i]===c.substring(1,s[i].length+1)&&(s.splice(i,1),i--);const d=[`${n.repeat(i?i*o:0)}${c}`,...a];return c.substring(0,2)==="</"&&(i++,s[i]=c.substring(2,c.length-1)),d},[]).join(`
`)};var Wu=ju;const Bs=e=>e.trim().replace(/(^(\s|\t)+|(( |\t)+)$)/gm,""),Ku=e=>{const t=Bs(e).split(`
`),n=[];let o="";for(let i=0;i<t.length;i+=1){const s=t[i];if(s.endsWith("/>")){n.push(`${o}${s.slice(0,-2)} />`),o="";continue}if(s.endsWith(">")){n.push(`${o}${s.startsWith(">")||s.startsWith("<")?"":" "}${s}`),o="";continue}o+=o.length?` ${s}`:s}return n};var Zu={mergeAttributesWithElements:Ku,removeEmptyLines:Bs};const Gu=Wu,{mergeAttributesWithElements:qu}=Zu,Yu=(e,t={})=>{const n=qu(e);return Gu(n,t)};var Xu=Yu;const Qu=vr(Xu);var hn=(e=>(e.Mouse="mouse",e.Touch="touch",e.Pointer="pointer",e))(hn||{}),pn=(e=>(e.CancelledByMovement="cancelled-by-movement",e.CancelledByRelease="cancelled-by-release",e.CancelledOutsideElement="cancelled-outside-element",e))(pn||{});const Us=()=>typeof window=="object"?(window==null?void 0:window.PointerEvent)??null:null,Ju=()=>typeof window=="object"?(window==null?void 0:window.TouchEvent)??null:null;function js(e){const{nativeEvent:t}=e,n=Ju();return n&&t instanceof n||"touches"in e}function Ws(e){const t=Us();return e.nativeEvent instanceof MouseEvent&&!(t&&e.nativeEvent instanceof t)}function Ks(e){const{nativeEvent:t}=e;if(!t)return!1;const n=Us();return n&&t instanceof n||"pointerId"in t}function Si(e){return Ws(e)||js(e)||Ks(e)}function ki(e){return js(e)?{x:e.touches[0].pageX,y:e.touches[0].pageY}:Ws(e)||Ks(e)?{x:e.pageX,y:e.pageY}:null}function ed(e){return{target:e.target,currentTarget:e.currentTarget,nativeEvent:e,persist:()=>{}}}function Zs(e,{threshold:t=400,captureEvent:n=!1,detect:o=hn.Pointer,cancelOnMovement:i=!1,cancelOutsideElement:s=!0,filterEvents:a,onStart:c,onMove:l,onFinish:d,onCancel:f}={}){const u=$(!1),p=$(!1),h=$(),m=$(),g=$(e),_=$(null),T=Me(x=>b=>{p.current||Si(b)&&(a!==void 0&&!a(b)||(n&&b.persist(),c==null||c(b,{context:x}),_.current=ki(b),p.current=!0,h.current=b.currentTarget,m.current=setTimeout(()=>{g.current&&(g.current(b,{context:x}),u.current=!0)},t)))},[n,a,c,t]),y=Me(x=>(b,k)=>{Si(b)&&p.current&&(_.current=null,n&&b.persist(),u.current?d==null||d(b,{context:x}):p.current&&(f==null||f(b,{context:x,reason:k??pn.CancelledByRelease})),u.current=!1,p.current=!1,m.current!==void 0&&clearTimeout(m.current))},[n,d,f]),w=Me(x=>b=>{if(l==null||l(b,{context:x}),i!==!1&&_.current){const k=ki(b);if(k){const D=i===!0?25:i,L={x:Math.abs(k.x-_.current.x),y:Math.abs(k.y-_.current.y)};(L.x>D||L.y>D)&&y(x)(b,pn.CancelledByMovement)}}},[y,i,l]),E=Me(x=>{if(e===null)return{};switch(o){case hn.Mouse:{const b={onMouseDown:T(x),onMouseMove:w(x),onMouseUp:y(x)};return s&&(b.onMouseLeave=k=>{y(x)(k,pn.CancelledOutsideElement)}),b}case hn.Touch:return{onTouchStart:T(x),onTouchMove:w(x),onTouchEnd:y(x)};case hn.Pointer:{const b={onPointerDown:T(x),onPointerMove:w(x),onPointerUp:y(x)};return s&&(b.onPointerLeave=k=>y(x)(k,pn.CancelledOutsideElement)),b}}},[e,y,s,o,w,T]);return ee(()=>{if(!window)return;function x(b){const k=ed(b);y()(k)}return window.addEventListener("mouseup",x),window.addEventListener("touchend",x),window.addEventListener("pointerup",x),()=>{window.removeEventListener("mouseup",x),window.removeEventListener("touchend",x),window.removeEventListener("pointerup",x)}},[y]),ee(()=>()=>{m.current!==void 0&&clearTimeout(m.current)},[]),ee(()=>{g.current=e},[e]),E}function td({poll:e,lang:t,readOnly:n,refresh:o=()=>{},votePoll:i=()=>{}}){const[s,a]=Z("default"),{expired:c,expiresAt:l,id:d,multiple:f,options:u,ownVotes:p,voted:h,votersCount:m,votesCount:g,emojis:_}=e,T=!!l&&new Date(l),y=f?m:g;let w=0;y<=1e3?w=0:y<=1e4?w=1:y<=1e5&&(w=2);const[E,x]=Z(!1),b=u.every(k=>k.votesCount!==null);return r("div",{lang:t,dir:"auto",class:`poll ${n?"read-only":""} ${s==="loading"?"loading":""}`,children:[E&&b||h||c?r(F,{children:[r("div",{class:"poll-options",children:u.map((k,D)=>{const{title:L,votesCount:A}=k,C=y?A/y:0,R=C?C.toLocaleString(S.locale||void 0,{style:"percent",maximumFractionDigits:w}):"0%",K=A>0&&A===Math.max(...u.map(U=>U.votesCount));return r("div",{class:`poll-option poll-result ${K?"poll-option-leading":""}`,style:{"--percentage":`${C*100}%`},children:[r("div",{class:"poll-option-title",children:[r("span",{children:r(qt,{text:L,emojis:_})}),h&&p.includes(D)&&r(F,{children:[" ",r(M,{icon:"check-circle",alt:S._({id:"IeO7us"})})]})]}),r("div",{class:"poll-option-votes",title:S._({id:"+syLpm",values:{optionVotesCount:A}}),children:R})]},`${D}-${L}-${A}`)})}),!c&&!h&&r("button",{class:"poll-vote-button plain2",disabled:s==="loading",onClick:k=>{k.preventDefault(),x(!1)},children:[r(M,{icon:"arrow-left",size:"s"})," ",r(O,{id:"L96xSt"})]})]}):r("form",{onSubmit:async k=>{k.preventDefault();const D=k.target,L=new FormData(D),A=[];L.forEach((C,R)=>{R==="poll"&&A.push(C)}),A.length&&(a("loading"),await i(A),a("default"))},children:[r("div",{class:"poll-options",children:u.map((k,D)=>{const{title:L}=k;return r("div",{class:"poll-option",children:r("label",{class:"poll-label",children:[r("input",{type:f?"checkbox":"radio",name:"poll",value:D,disabled:s==="loading",readOnly:n}),r("span",{class:"poll-option-title",children:r(qt,{text:L,emojis:_})})]})})})}),!n&&r("button",{class:"poll-vote-button",type:"submit",disabled:s==="loading",children:r(O,{id:"lQXQKs"})})]}),r("p",{class:"poll-meta",children:[!c&&!n&&r("button",{type:"button",class:"plain small",disabled:s==="loading",onClick:k=>{k.preventDefault(),a("loading"),(async()=>(await o(),a("default")))()},title:S._({id:"lCF0wC"}),children:r(M,{icon:"refresh",alt:S._({id:"lCF0wC"})})}),!h&&!c&&!n&&b&&r("button",{type:"button",class:"plain small",disabled:s==="loading",onClick:k=>{k.preventDefault(),x(!E)},title:E?S._({id:"L96xSt"}):S._({id:"zCjei3"}),children:[r(M,{icon:E?"eye-open":"eye-close",alt:E?S._({id:"L96xSt"}):S._({id:"zCjei3"})})," "]}),!c&&!n&&" ",r(O,{id:"k7v0Rh",values:{0:rt(g),1:rt(g),votesCount:g},components:{0:r("span",{title:g}),1:r("span",{title:g})}}),!!m&&m!==g&&r(F,{children:[" ","•"," ",r(O,{id:"jf1i1L",values:{0:rt(m),1:rt(m),votersCount:m},components:{0:r("span",{title:m}),1:r("span",{title:m})}})]})," ","•"," ",c?T?r(O,{id:"5LwCCI",components:{0:r(at,{datetime:T})}}):S._({id:"237hSL"}):T?r(O,{id:"ooHDPY",components:{0:r(at,{datetime:T})}}):S._({id:"O2tNG0"})]})]})}const Gs=lt();function nd(e,t){if(!(e!=null&&e.length))return!1;const n=e.filter(s=>{const{filter:a}=s,c=a.context.includes(t);return c?a.expiresAt?new Date(a.expiresAt)>new Date:c:!1});if(!n.length)return!1;if(n.some(s=>s.filter.filterAction==="hide"))return{action:"hide"};if(n.some(s=>s.filter.filterAction==="warn")){const s=n.map(a=>a.filter.title);return{action:"warn",titles:s,titlesStr:s.join(" • ")}}return!1}const Pr=Oe(nd);function od(e,t,n){var a;const{filtered:o}=e;if(!(o!=null&&o.length)||n&&((a=e.account)==null?void 0:a.id)===n)return!0;const s=Pr(o,t);return s?s.action!=="hide":!0}function ih(e,t){if(!(e!=null&&e.length))return[];if(!t)return e;const n=_r();return e.filter(o=>od(o,t,n))}const Uo=document.createElement("div");function jo(e){return e?(Uo.innerHTML=e,Uo.querySelectorAll(".invisible").forEach(t=>{t.remove()}),Uo.innerText.length):0}const mn="speechSynthesis"in window;function Ii(e,t){if(mn)try{speechSynthesis.speaking&&speechSynthesis.cancel();const n=new SpeechSynthesisUtterance(e);t&&(n.lang=t),speechSynthesis.speak(n)}catch(n){alert(n)}}function qs(e){var a;const{spoilerText:t,content:n,poll:o,mediaAttachments:i}=e;let s="";return t!=null&&t.trim()?s+=t:s+=_o(n),s=s.trim(),(a=o==null?void 0:o.options)!=null&&a.length&&(s+=`
📊:
${o.options.map(c=>`${o.multiple?"▪️":"•"} ${c.title}`).join(`
`)}`),i!=null&&i.length&&(s+=" "+i.map(c=>({image:"🖼️",gifv:"🎞️",video:"📹",audio:"🎵",unknown:""})[c.type]||"").join("")),s}function rd(e,t,n){var o=this,i=$(null),s=$(0),a=$(null),c=$([]),l=$(),d=$(),f=$(e),u=$(!0);f.current=e;var p=typeof window<"u",h=!t&&t!==0&&p;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var m=!!(n=n||{}).leading,g=!("trailing"in n)||!!n.trailing,_="maxWait"in n,T="debounceOnServer"in n&&!!n.debounceOnServer,y=_?Math.max(+n.maxWait||0,t):null;ee(function(){return u.current=!0,function(){u.current=!1}},[]);var w=ae(function(){var E=function(A){var C=c.current,R=l.current;return c.current=l.current=null,s.current=A,d.current=f.current.apply(R,C)},x=function(A,C){h&&cancelAnimationFrame(a.current),a.current=h?requestAnimationFrame(A):setTimeout(A,C)},b=function(A){if(!u.current)return!1;var C=A-i.current;return!i.current||C>=t||C<0||_&&A-s.current>=y},k=function(A){return a.current=null,g&&c.current?E(A):(c.current=l.current=null,d.current)},D=function A(){var C=Date.now();if(b(C))return k(C);if(u.current){var R=t-(C-i.current),K=_?Math.min(R,y-(C-s.current)):R;x(A,K)}},L=function(){if(p||T){var A=Date.now(),C=b(A);if(c.current=[].slice.call(arguments),l.current=o,i.current=A,C){if(!a.current&&u.current)return s.current=i.current,x(D,t),m?E(i.current):d.current;if(_)return x(D,t),E(i.current)}return a.current||x(D,t),d.current}};return L.cancel=function(){a.current&&(h?cancelAnimationFrame(a.current):clearTimeout(a.current)),s.current=0,c.current=i.current=l.current=a.current=null},L.isPending=function(){return!!a.current},L.flush=function(){return a.current?k(Date.now()):d.current},L},[m,_,t,y,g,h,p,T]);return w}function id(e,t,n){var o=n===void 0?{}:n,i=o.leading,s=o.trailing;return rd(e,t,{maxWait:t,leading:i===void 0||i,trailing:s===void 0||s})}function sd(e,t){var n=$(null),o=$(null);o.current=t;var i=$(null);ee(function(){s()});var s=Me(function(){var a=i.current,c=o.current,l=a||(c?c instanceof Element?c:c.current:null);n.current&&n.current.element===l&&n.current.subscriber===e||(n.current&&n.current.cleanup&&n.current.cleanup(),n.current={element:l,subscriber:e,cleanup:l?e(l):void 0})},[e]);return ee(function(){return function(){n.current&&n.current.cleanup&&(n.current.cleanup(),n.current=null)}},[]),Me(function(a){i.current=a,s()},[s])}function Ai(e,t,n){return e[t]?e[t][0]?e[t][0][n]:e[t][n]:t==="contentBoxSize"?e.contentRect[n==="inlineSize"?"width":"height"]:void 0}function ad(e){e===void 0&&(e={});var t=e.onResize,n=$(void 0);n.current=t;var o=e.round||Math.round,i=$(),s=Z({width:void 0,height:void 0}),a=s[0],c=s[1],l=$(!1);ee(function(){return l.current=!1,function(){l.current=!0}},[]);var d=$({width:void 0,height:void 0}),f=sd(Me(function(u){return(!i.current||i.current.box!==e.box||i.current.round!==o)&&(i.current={box:e.box,round:o,instance:new ResizeObserver(function(p){var h=p[0],m=e.box==="border-box"?"borderBoxSize":e.box==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",g=Ai(h,m,"inlineSize"),_=Ai(h,m,"blockSize"),T=g?o(g):void 0,y=_?o(_):void 0;if(d.current.width!==T||d.current.height!==y){var w={width:T,height:y};d.current.width=T,d.current.height=y,n.current?n.current(w):l.current||c(w)}})}),i.current.instance.observe(u,{box:e.box}),function(){i.current&&i.current.instance.unobserve(u)}},[e.box,o]),e.ref);return ae(function(){return{ref:f,width:a.width,height:a.height}},[f,a.width,a.height])}function ro({className:e="truncated"}={}){const t=$(),n=id(({height:o})=>{if(t.current){const{scrollHeight:i}=t.current;let s=i>o;if(s){const{height:a,maxHeight:c}=getComputedStyle(t.current),l=parseInt(c||a,10);s=i>l}t.current.classList.toggle(e,s)}},300);return ad({ref:t,box:"border-box",onResize:n}),t}const _n={public:"earth",unlisted:"group",private:"lock",direct:"message",local:"building"};var Ys="kvfysmfp",Xs="ufhsfnkm",cd=".".concat(Ys,"{overflow:hidden;touch-action:none}.").concat(Xs,"{transform-origin: 0 0}"),ld=typeof window>"u",ud=function(){return!ld&&("ontouchstart"in window||navigator.maxTouchPoints>0)};var dd=function(e){var t=e.x,n=e.y,o=e.scale;return"scale3d(".concat(o,",").concat(o,", 1) translate3d(").concat(t,"px, ").concat(n,"px, 0)")};var fd=Math.min,hd=Math.max;function Ci(e){var t=e.containerDimension,n=e.childDimension,o=e.padding,i=e.centerContained,s=n-t;return s+2*o<=0&&i?[s/2,s/2]:[fd(s+o,0)-o,hd(0,s+o)]}var Pi=function(e,t){return t?"".concat(e," ").concat(t):e},Xn=Math.abs,pd=Math.min,md=Math.sqrt,Qs=typeof window>"u",gd=Qs?!1:/(Mac)/i.test(navigator.platform),Ht=function(e){return e==="drag"},un=function(e){return e==="zoom"},vd=function(e){return gd&&e.ctrlKey},dn=function(e){e.stopPropagation(),e.preventDefault()},Li=function(e,t){var n=e.x-t.x,o=e.y-t.y;return md(n*n+o*o)},_d=function(e,t){var n=Li(e[0],e[1]),o=Li(t[0],t[1]);return o/n},yd=function(e,t){return e>t-.01&&e<t+.01},bd=function(e){return-Math.cos(e*Math.PI)/2+.5},Td=function(e){return{x:e.pageX,y:e.pageY}},Qn=function(e){return Array.from(e).map(Td)},Mi=function(e,t){return e+t},wd=function(e){return{x:e.map(function(t){var n=t.x;return n}).reduce(Mi,0)/e.length,y:e.map(function(t){var n=t.y;return n}).reduce(Mi,0)/e.length}},Wo=function(e,t,n){return n<e?e:n>t?t:n},Ed=function(e){return!(e.ctrlKey||e.metaKey)},xd=function(e){if(e){var t=e.offsetWidth,n=e.offsetHeight;if(t&&n)return{width:t,height:n};var o=getComputedStyle(e),i=parseFloat(o.width),s=parseFloat(o.height);if(s&&i)return{width:i,height:s}}return{width:0,height:0}},Sd=function(e,t){return{x:t.x-e.x,y:t.y-e.y}},kd=function(e,t){return e.x===t.x&&e.y===t.y},kt=function(){},Jn={x:0,y:0},Ri=function(e){Da(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n._prevDragMovePoint=null,n._containerObserver=null,n._fingers=0,n._firstMove=!0,n._initialOffset=Ne({},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=Ne({},Jn),n._startOffset=Ne({},Jn),n._startTouches=null,n._updatePlaned=!1,n._wheelTimeOut=null,n._zoomFactor=1,n._initialZoomFactor=1,n._draggingPoint=Ne({},Jn),n._ignoreNextClick=!1,n._containerRef=$a(),n._handleClick=function(o){n._ignoreNextClick&&(n._ignoreNextClick=!1,o.stopPropagation())},n._onResize=function(){var o;!((o=n._containerRef)===null||o===void 0)&&o.current&&(n._updateInitialZoomFactor(),n._setupOffsets(),n._update())},n._handlerOnTouchEnd=n._handlerIfEnable(function(o){n._fingers=o.touches.length,n.props.shouldCancelHandledTouchEndEvents&&(un(n._interaction)||Ht(n._interaction)&&(n._startOffset.x!==n._offset.x||n._startOffset.y!==n._offset.y))&&dn(o),Ht(n._interaction)&&!n._enoughToDrag()&&n._handleClick(o),n._updateInteraction(o)}),n._handlerOnTouchStart=n._handlerIfEnable(function(o){n._firstMove=!0,n._fingers=o.touches.length,n._detectDoubleTap(o)}),n._handlerOnTouchMove=n._handlerIfEnable(function(o){n._isDoubleTap||(n._collectInertia(o),n._firstMove?(n._updateInteraction(o),n._interaction&&dn(o),n._startOffset=Ne({},n._offset),n._startTouches=Qn(o.touches)):(un(n._interaction)?n._startTouches&&n._startTouches.length===2&&o.touches.length===2&&n._handleZoom(o,_d(n._startTouches,Qn(o.touches))):Ht(n._interaction)&&n._handleDrag(o),n._interaction&&(dn(o),n._update())),n._firstMove=!1)}),n._handlerWheel=function(o){if(!n.props.shouldInterceptWheel(o)){dn(o);var i=o.pageX,s=o.pageY,a=o.deltaY,c=o.deltaMode,l=1;(vd(o)||c===1)&&(l=15);var d={touches:[{pageX:i,pageY:s}]},f=n._getOffsetByFirstTouch(d),u=a*l;n._stopAnimation(),n._scaleTo(n._zoomFactor-u/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 t.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)},t.prototype._handleDrag=function(n){var o=this._getOffsetByFirstTouch(n);this._enoughToDrag()?this._drag(o,this._lastDragPosition):this._virtualDrag(o,this._lastDragPosition),this._offset=this._sanitizeOffset(this._offset),this._lastDragPosition=o},t.prototype._resetInertia=function(){this._velocity=null,this._prevDragMovePoint=null},t.prototype._realizeInertia=function(){var n=this,o=this.props,i=o.inertiaFriction,s=o.inertia;if(!(!s||!this._velocity)){var a=this._velocity,c=a.x,l=a.y;if(c||l){this._stopAnimation(),this._resetInertia();var d=function(){if(c*=i,l*=i,!c&&!l)return n._stopAnimation();var f=Ne({},n._offset);if(n._addOffset({x:c,y:l}),n._offset=n._sanitizeOffset(n._offset),kd(f,n._offset))return n._stopAnimation();n._update({isAnimation:!0})};this._animate(d,{duration:9999})}}},t.prototype._collectInertia=function(n){var o=n.touches;if(this.props.inertia){var i=Qn(o)[0],s=this._prevDragMovePoint;s&&(this._velocity=Sd(i,s)),this._prevDragMovePoint=i}},t.prototype._handleDragEnd=function(){this.props.onDragEnd(),this._end(),this._realizeInertia()},t.prototype._handleZoomStart=function(){this.props.onZoomStart(),this._stopAnimation(),this._lastScale=1,this._nthZoom=0,this._lastZoomCenter=null,this._hasInteraction=!0},t.prototype._handleZoom=function(n,o){var i=wd(this._getOffsetTouches(n)),s=o/this._lastScale;this._lastScale=o,this._nthZoom+=1,this._nthZoom>3&&(this._scale(s,i),this._drag(i,this._lastZoomCenter),this.props.enforceBoundsDuringZoom&&(this._offset=this._sanitizeOffset(this._offset))),this._lastZoomCenter=i},t.prototype._handleZoomEnd=function(){this.props.onZoomEnd(),this._end()},t.prototype._handleDoubleTap=function(n){var o=this;if(!(this._hasInteraction||this.props.tapZoomFactor===0)){var i=this.props.doubleTapZoomOutOnMaxScale&&this._zoomFactor===this.props.maxZoom||this.props.doubleTapToggleZoom&&this._zoomFactor>1;this.props.onDoubleTap(),this._ignoreNextClick=!0;var s=this._zoomFactor+this.props.tapZoomFactor,a=this._zoomFactor,c=function(d){o._scaleTo(a+d*(s-a),l)},l=this._getOffsetByFirstTouch(n);this._isDoubleTap=!0,a>s&&(l=this._getCurrentZoomCenter()),i?this._zoomOutAnimation():this._animate(c)}},t.prototype._computeInitialOffset=function(){var n=this._getContainerRect(),o=this._getChildSize(),i=o.width,s=o.height,a=-Xn(i*this._getInitialZoomFactor()-n.width)/2,c=-Xn(s*this._getInitialZoomFactor()-n.height)/2;this._initialOffset={x:a,y:c}},t.prototype._resetOffset=function(){this._offset=Ne({},this._initialOffset)},t.prototype._setupOffsets=function(){this.props.setOffsetsOnce&&this._isOffsetsSet||(this._isOffsetsSet=!0,this._computeInitialOffset(),this._resetOffset())},t.prototype._sanitizeOffset=function(n){var o=this._getContainerRect(),i=this._getChildSize(),s=i.width,a=i.height,c=s*this._getInitialZoomFactor()*this._zoomFactor,l=a*this._getInitialZoomFactor()*this._zoomFactor,d=Ci({containerDimension:o.width,childDimension:c,padding:this.props.horizontalPadding,centerContained:this.props.centerContained}),f=d[0],u=d[1],p=Ci({containerDimension:o.height,childDimension:l,padding:this.props.verticalPadding,centerContained:this.props.centerContained}),h=p[0],m=p[1];return{x:Wo(f,u,n.x),y:Wo(h,m,n.y)}},t.prototype.alignCenter=function(n){var o=this,i=Ne({duration:250,animated:!0},n),s=i.x,a=i.y,c=i.scale,l=i.animated,d=i.duration,f=s*this._initialZoomFactor,u=a*this._initialZoomFactor,p=this._zoomFactor,h=Ne({},this._offset),m=this._getContainerRect(),g={x:m.width/2,y:m.height/2};if(this._zoomFactor=1,this._offset={x:-(g.x-f),y:-(g.y-u)},this._scaleTo(c,g),this._stopAnimation(),!l)return this._update();var _=this._zoomFactor-p,T={x:this._offset.x-h.x,y:this._offset.y-h.y};this._zoomFactor=p,this._offset=Ne({},h);var y=function(w){var E=h.x+T.x*w,x=h.y+T.y*w;o._zoomFactor=p+_*w,o._offset=o._sanitizeOffset({x:E,y:x}),o._update()};this._animate(y,{callback:function(){return o._sanitize()},duration:d})},t.prototype.scaleTo=function(n){var o=this,i=Ne({duration:250,animated:!0},n),s=i.x,a=i.y,c=i.scale,l=i.animated,d=i.duration,f=this._zoomFactor,u=Ne({},this._offset);if(this._zoomFactor=1,this._offset={x:0,y:0},this._scaleTo(c,{x:s,y:a}),this._stopAnimation(),!l)return this._update();var p=this._zoomFactor-f,h={x:this._offset.x-u.x,y:this._offset.y-u.y};this._zoomFactor=f,this._offset=Ne({},u);var m=function(g){var _=u.x+h.x*g,T=u.y+h.y*g;o._zoomFactor=f+p*g,o._offset={x:_,y:T},o._update()};this._animate(m,{callback:function(){return o._sanitize()},duration:d})},t.prototype._scaleTo=function(n,o){this._scale(n/this._zoomFactor,o),this._offset=this._sanitizeOffset(this._offset)},t.prototype._scale=function(n,o){n=this._scaleZoomFactor(n),this._addOffset({x:(n-1)*(o.x+this._offset.x),y:(n-1)*(o.y+this._offset.y)}),this.props.onZoomUpdate()},t.prototype._scaleZoomFactor=function(n){var o=this._zoomFactor;return this._zoomFactor*=n,this._zoomFactor=Wo(this.props.minZoom,this.props.maxZoom,this._zoomFactor),this._zoomFactor/o},t.prototype._canDrag=function(){return this.props.draggableUnZoomed||!yd(this._zoomFactor,1)},t.prototype._drag=function(n,o){if(o){var i=-(n.y-o.y),s=-(n.x-o.x);this.props.lockDragAxis?Xn(s)>Xn(i)?this._addOffset({x:s,y:0}):this._addOffset({y:i,x:0}):this._addOffset({x:s,y:i}),this.props.onDragUpdate()}},t.prototype._virtualDrag=function(n,o){if(o){var i=-(n.y-o.y),s=-(n.x-o.x);this._draggingPoint={x:s+this._draggingPoint.x,y:i+this._draggingPoint.y}}},t.prototype._addOffset=function(n){var o=this._offset,i=o.x,s=o.y;this._offset={x:i+n.x,y:s+n.y}},t.prototype._sanitize=function(){this._zoomFactor<this.props.zoomOutFactor?(this._resetInertia(),this._zoomOutAnimation()):this._isInsaneOffset()&&this._sanitizeOffsetAnimation()},t.prototype._isInsaneOffset=function(){var n=this._offset,o=this._sanitizeOffset(n);return o.x!==n.x||o.y!==n.y},t.prototype._sanitizeOffsetAnimation=function(){var n=this,o=this._sanitizeOffset(this._offset),i=Ne({},this._offset),s=function(a){var c=i.x+a*(o.x-i.x),l=i.y+a*(o.y-i.y);n._offset={x:c,y:l},n._update()};this._animate(s)},t.prototype._zoomOutAnimation=function(){var n=this;if(this._zoomFactor!==1){var o=this._zoomFactor,i=1,s=this._getCurrentZoomCenter(),a=function(c){var l=o+c*(i-o);n._scaleTo(l,s)};this._animate(a)}},t.prototype._getInitialZoomFactor=function(){return this._initialZoomFactor},t.prototype._getCurrentZoomCenter=function(){var n=this._offset,o=n.x,i=n.y,s=o-this._initialOffset.x,a=i-this._initialOffset.y;return{x:-1*o-s/(1/this._zoomFactor-1),y:-1*i-a/(1/this._zoomFactor-1)}},t.prototype._getOffsetByFirstTouch=function(n){return this._getOffsetTouches(n)[0]},t.prototype._getOffsetTouches=function(n){var o=this.props._document,i=o.documentElement,s=o.body,a=this._getContainerRect(),c=a.top,l=a.left,d=i.scrollTop||s.scrollTop,f=i.scrollLeft||s.scrollLeft,u=c+d,p=l+f;return Qn(n.touches).map(function(h){var m=h.x,g=h.y;return{x:m-p,y:g-u}})},t.prototype._animate=function(n,o){var i=this,s=new Date().getTime(),a=Ne({timeFn:bd,callback:function(){},duration:this.props.animationDuration},o),c=a.timeFn,l=a.callback,d=a.duration,f=function(){if(i._inAnimation){var u=new Date().getTime()-s,p=u/d;u>=d?(n(1),i._stopAnimation(),l(),i._update()):(p=c(p),n(p),i._update({isAnimation:!0}),requestAnimationFrame(f))}};this._inAnimation=!0,requestAnimationFrame(f)},t.prototype._stopAnimation=function(){this._inAnimation=!1},t.prototype._end=function(){this._hasInteraction=!1,this._sanitize(),this._update()},t.prototype._getContainerRect=function(){var n=this._containerRef.current;return n.getBoundingClientRect()},t.prototype._getChildSize=function(){var n=this._containerRef.current;return xd(n==null?void 0:n.firstElementChild)},t.prototype._updateInitialZoomFactor=function(){var n=this._getContainerRect(),o=this._getChildSize(),i=n.width/o.width,s=n.height/o.height;this._initialZoomFactor=pd(i,s)},t.prototype._bindEvents=function(){var n=this,o=this._containerRef.current;window.ResizeObserver?(this._containerObserver=new ResizeObserver(this._onResize),this._containerObserver.observe(o)):window.addEventListener("resize",this._onResize),this._handlers.forEach(function(i){var s=i[0],a=i[1],c=i[2];(c||o).addEventListener(s,a,!0)}),Array.from(o.querySelectorAll("img")).forEach(function(i){return i.addEventListener("load",n._onResize)})},t.prototype._unSubscribe=function(){var n=this,o=this._containerRef.current;this._containerObserver&&(this._containerObserver.disconnect(),this._containerObserver=null),window.removeEventListener("resize",this._onResize),this._handlers.forEach(function(i){var s=i[0],a=i[1],c=i[2];(c||o).removeEventListener(s,a,!0)}),Array.from(o.querySelectorAll("img")).forEach(function(i){return i.removeEventListener("load",n._onResize)})},t.prototype._update=function(n){var o=this;if(!this._updatePlaned){var i=function(){var s=o._getInitialZoomFactor()*o._zoomFactor,a=-o._offset.x/s,c=-o._offset.y/s;o.props.onUpdate({scale:s,x:a,y:c})};if(n!=null&&n.isAnimation)return i();this._updatePlaned=!0,requestAnimationFrame(function(){o._updatePlaned=!1,i()})}},t.prototype._handlerIfEnable=function(n){var o=this;return function(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];o.props.enabled&&n.apply(void 0,i)}},t.prototype._setInteraction=function(n,o){var i=this._interaction;i!==n&&(i&&!n&&(un(i)?this._handleZoomEnd():Ht(i)&&this._handleDragEnd()),un(n)?this._handleZoomStart():Ht(n)&&this._handleDragStart(o)),this._interaction=n},t.prototype._distanceBetweenNumbers=function(n,o){return n>o?n-o:o-n},t.prototype._enoughToDrag=function(){return this._distanceBetweenNumbers(this._startOffset.x,this._draggingPoint.x)>5||this._distanceBetweenNumbers(this._startOffset.y,this._draggingPoint.y)>5},t.prototype._updateInteraction=function(n){var o=this._fingers;if(o===2)return this._setInteraction("zoom",n);if(o===1&&this._canDrag())return this._setInteraction("drag",n);this._setInteraction(null,n)},t.prototype._detectDoubleTap=function(n){var o=new Date().getTime();this._fingers>1&&(this._lastTouchStart=0),o-this._lastTouchStart<300?(dn(n),this._handleDoubleTap(n),un(this._interaction)?this._handleZoomEnd():Ht(this._interaction)&&this._handleDragEnd()):this._isDoubleTap=!1,this._fingers===1&&(this._lastTouchStart=o)},t.prototype.simulate=function(n){var o=this;return function(i){var s=i.pageX,a=i.pageY,c=i.type,l=c==="mouseup",d=c==="mousedown";d&&(i.preventDefault(),o._listenMouseMove=!0),o._listenMouseMove&&(i.touches=l?[]:[{pageX:s,pageY:a}],n(i)),l&&(o._listenMouseMove=!1)}},t.prototype.componentDidMount=function(){this._bindEvents(),this._update()},t.prototype.componentWillUnmount=function(){this._stopAnimation(),this._unSubscribe()},t.prototype.render=function(){var n=this.props,o=n.children,i=n.containerProps,s=Na.only(o),a=i||{};return Un.createElement(Un.Fragment,null,Un.createElement("style",null,cd),Un.createElement("div",Ne({},a,{ref:this._containerRef,className:Pi(Ys,a.className)}),Ki(s,{className:Pi(Xs,s.props.className)})))},t.defaultProps={animationDuration:250,draggableUnZoomed:!0,enforceBoundsDuringZoom:!1,centerContained:!1,enabled:!0,inertia:!0,inertiaFriction:.96,horizontalPadding:0,isTouch:ud,lockDragAxis:!1,maxZoom:5,minZoom:.5,onDoubleTap:kt,onDragEnd:kt,onDragStart:kt,onDragUpdate:kt,onZoomEnd:kt,onZoomStart:kt,onZoomUpdate:kt,setOffsetsOnce:!1,shouldInterceptWheel:Ed,shouldCancelHandledTouchEndEvents:!1,tapZoomFactor:1,verticalPadding:0,wheelScaleFactor:1500,zoomOutFactor:1.3,doubleTapZoomOutOnMaxScale:!1,doubleTapToggleZoom:!1,_document:Qs?null:window.document},t}(Gi);if(0)var sh,ah,ch,lh,uh,dh,fh;function Ko(e){if(!e)return;let t=Math.floor(e/3600),n=Math.floor(e%3600/60),o=Math.round(e%60);return t===0?`${n}:${o.toString().padStart(2,"0")}`:`${t}:${n.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}`}const Id=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Ad="ALT",Zo=e=>{const{alt:t,lang:n,index:o,...i}=e;return!t||!t.trim()?null:r("button",{type:"button",class:"alt-badge clickable",...i,onClick:s=>{s.stopPropagation(),s.preventDefault(),B.showMediaAlt={alt:t,lang:n}},title:S._({id:"5gfDMm"}),children:[Ad,!!o&&r("sup",{children:o})]})},Cd=140,Pd=280,Js=Oe(e=>e!=null&&e.length?e.length>Cd||/[\n\r].*[\n\r]/.test(e.trim()):!1);function Ld({class:e="",media:t,to:n,lang:o,showOriginal:i,autoAnimate:s,showCaption:a,allowLongerCaption:c,altIndex:l,checkAspectRatio:d=!0,onClick:f=()=>{}}){let{blurhash:u,description:p,meta:h,previewRemoteUrl:m,previewUrl:g,remoteUrl:_,url:T,type:y}=t;/no\-preview\./i.test(g)&&(g=null);const{original:w={},small:E,focus:x}=h||{},b=i?w==null?void 0:w.width:(E==null?void 0:E.width)||(w==null?void 0:w.width),k=i?w==null?void 0:w.height:(E==null?void 0:E.height)||(w==null?void 0:w.height),D=i?T:g||T,L=i?_:m||_,A=b&&k,C=A?b>k?"landscape":"portrait":null,R=u?Cr(u):null,K=$();let U;if(x){const V=(x.x+1)/2*100,le=(1-x.y)/2*100;U=`${V.toFixed(0)}% ${le.toFixed(0)}%`}const oe=$(),Q=Me(({x:V,y:le,scale:z})=>{const{current:J}=oe;if(J){const Y=dd({x:V,y:le,scale:z});z===1?J.style.removeProperty("transform"):J.style.setProperty("transform",Y),J.closest(".media-zoom").style.touchAction=z<=1.01?"pan-x":""}},[]),[re,q]=Z(!1),ie={enabled:re,draggableUnZoomed:!1,inertiaFriction:.9,tapZoomFactor:2,doubleTapToggleZoom:!0,containerProps:{className:"media-zoom",style:{overflow:"visible"}},onUpdate:Q},ce=ae(()=>n?V=>r(Gt,{to:n,...V}):"div",[n]),se=L?Md(L):null,H=y==="unknown"&&se&&/\.(mp4|m4r|m4v|mov|webm)$/i.test(se.pathname),fe=y==="unknown"&&se&&/\.(mp3|ogg|wav|m4a|m4p|m4b)$/i.test(se.pathname),ne=y==="image"||y==="unknown"&&g&&!H&&!fe,Ee=$(),[ye,xe]=Z(!1);Ct(()=>{if(!ne||!i||!Ee.current)return;const{offsetWidth:V,offsetHeight:le}=Ee.current,z=b<V&&k<le;z&&xe(z)},[b,k]);const De=window.innerHeight*(C==="portrait"?.45:.33),Ie=C==="portrait"?0:160,$e={"--average-color":R&&`rgb(${R.join(",")})`},Ce=b&&k?{"--width":`${b}px`,"--height":`${k}px`,"--aspectWidth":`${b/k*Math.max(Ie,De)}px`,aspectRatio:`${b} / ${k}`,...$e}:{...$e},he=Js(p);let N=!!a&&!i&&!!p&&!he;c&&!N&&(p==null?void 0:p.length)<=Pd&&(N=!0);const ge=N?V=>{const{children:le,...z}=V;return r("figure",{...z,children:[le,r("figcaption",{class:"media-caption",lang:o,dir:"auto",onClick:J=>{J.preventDefault(),J.stopPropagation(),B.showMediaAlt={alt:p,lang:o}},children:p})]})}:F,[Ge,Mt]=Z(void 0);if(ne)return ie.containerProps.style.display="inherit",Ct(()=>{Id&&i&&(async()=>{try{await fetch(D,{mode:"no-cors"}),oe.current.src=D}catch{}})()},[D]),r(ge,{children:r(ce,{ref:Ee,class:`media media-image ${e}`,onClick:f,"data-orientation":C,"data-has-alt":!N||void 0,"data-has-natural-aspect-ratio":Ge||void 0,style:i?{backgroundImage:`url(${g})`,backgroundSize:ye?`${b}px ${k}px`:void 0,...$e}:Ce,children:i?r(Ri,{...ie,children:r("img",{ref:oe,src:D,alt:p,width:b,height:k,"data-orientation":C,loading:"eager",decoding:"sync",onLoad:V=>{V.target.closest(".media-image").style.backgroundImage="",V.target.closest(".media-zoom").style.display="",q(!0)},onError:V=>{const{src:le}=V.target;le===D&&L&&D!==L&&(V.target.src=L)}})}):r(F,{children:[r("img",{src:D,alt:N?"":p,width:b,height:k,"data-orientation":C,loading:"lazy",style:{objectPosition:U||"center","--anim-duration":`${Math.min(Math.max(Math.max(b,k)/100,5),120)}s`},onLoad:V=>{V.target.dataset.loaded=!0;const le=V.target.closest(".media");if(!A&&le){const{naturalWidth:z,naturalHeight:J}=V.target;le.dataset.orientation=z>J?"landscape":"portrait",le.style.setProperty("--width",`${z}px`),le.style.setProperty("--height",`${J}px`),le.style.aspectRatio=`${z}/${J}`}if(d&&le){const{clientWidth:z,clientHeight:J,naturalWidth:Y,naturalHeight:be}=V.target;if(z&&J&&Y&&be)if(Y<88||be<88)le.dataset.hasSmallDimension=!0;else{const pe=be*z/Y;Math.abs(pe-J)<5&&Mt(!0)}}},onError:V=>{const{src:le}=V.target;le===D&&D!==L&&(V.target.src=L)}}),!N&&r(Zo,{alt:p,lang:o,index:l})]})})});if(y==="gifv"||y==="video"||H){const V=w.duration>0,le=w.duration<31,z=y==="gifv"&&le,J=w.duration<61,Y=Ko(w.duration),be=!i&&!s&&z,te=!i&&s&&z,pe=w.duration>5,Rt=`
<video
src="${T}"
poster="${g}"
width="${b}"
height="${k}"
data-orientation="${C}"
preload="auto"
autoplay
muted
playsinline
${J?"loop":""}
ondblclick="this.paused ? this.play() : this.pause()"
${pe?"ontimeupdate=\"this.closest('.media-gif') && this.closest('.media-gif').style.setProperty('--progress', `${~~((this.currentTime / this.duration) * 100)}%`)\"":""}
></video>
`,Ue=`
<video
src="${T}"
poster="${g}"
width="${b}"
height="${k}"
data-orientation="${C}"
preload="auto"
autoplay
playsinline
${J?"loop":""}
controls
></video>
`;return r(ge,{children:r(ce,{class:`media ${e} media-${z?"gif":"video"} ${te?"media-contain":""} ${be?"media-hover-animate":""}`,"data-orientation":C,"data-formatted-duration":i?void 0:Y,"data-label":z&&!i&&!te?"GIF":void 0,"data-has-alt":!N||void 0,style:!i&&Ce,onClick:Ae=>{if(be)try{K.current.pause()}catch{}f(Ae)},onMouseEnter:()=>{if(be)try{K.current.play()}catch{}},onMouseLeave:()=>{if(be)try{K.current.pause()}catch{}},onFocus:()=>{if(be)try{K.current.play()}catch{}},onBlur:()=>{if(be)try{K.current.pause()}catch{}},children:[i||te?z&&i?r(Ri,{...ie,enabled:!0,children:r("div",{ref:oe,dangerouslySetInnerHTML:{__html:Rt}})}):z?r("div",{class:"video-container",dangerouslySetInnerHTML:{__html:Rt}}):r("div",{class:"video-container",dangerouslySetInnerHTML:{__html:Ue}}):z?r("video",{ref:K,src:T,poster:g,width:b,height:k,"data-orientation":C,preload:"auto",playsinline:!0,loop:!0,muted:!0,onTimeUpdate:pe?Ae=>{const{target:Pe}=Ae,ve=Pe==null?void 0:Pe.closest(".media-gif");if(ve){const Le=Pe.currentTime/Pe.duration*100;ve.style.setProperty("--progress",`${Le}%`)}}:void 0}):r(F,{children:[g?r("img",{src:g,alt:N?"":p,width:b,height:k,"data-orientation":C,loading:"lazy",decoding:"async",onLoad:Ae=>{if(!A){const Pe=Ae.target.closest(".media");if(Pe){const{naturalHeight:ve,naturalWidth:Le}=Ae.target;Pe.dataset.orientation=Le>ve?"landscape":"portrait",Pe.style.setProperty("--width",`${Le}px`),Pe.style.setProperty("--height",`${ve}px`),Pe.style.aspectRatio=`${Le}/${ve}`}}}}):r("video",{src:T+"#t=0.1",width:b,height:k,"data-orientation":C,preload:"metadata",muted:!0,disablePictureInPicture:!0,onLoadedMetadata:Ae=>{if(!V){const{duration:Pe}=Ae.target;if(Pe){const ve=Ko(Pe),Le=Ae.target.closest(".media-video");Le&&(Le.dataset.formattedDuration=ve)}}}}),r("div",{class:"media-play",children:r(M,{icon:"play",size:"xl",alt:"▶"})})]}),!i&&!N&&r(Zo,{alt:p,lang:o,index:l})]})})}else if(y==="audio"||fe){const V=Ko(w.duration);return r(ge,{children:r(ce,{class:`media media-audio ${e}`,"data-formatted-duration":i?void 0:V,"data-has-alt":!N||void 0,onClick:f,style:!i&&Ce,children:[i?r("audio",{src:_||T,preload:"none",controls:!0,autoPlay:!0}):g?r("img",{src:g,alt:N?"":p,width:b,height:k,"data-orientation":C,loading:"lazy",onError:le=>{var z,J;try{(J=(z=le.target)==null?void 0:z.remove)==null||J.call(z)}catch{}}}):null,!i&&r(F,{children:[r("div",{class:"media-play",children:r(M,{icon:"play",size:"xl",alt:"▶"})}),!N&&r(Zo,{alt:p,lang:o,index:l})]})]})})}}function Md(e){return URL.parse(e,location.origin)}const lr=Jt(Ld,(e,t)=>{const n=e.media||{},o=t.media||{};return(n==null?void 0:n.id)===(o==null?void 0:o.id)&&n.url===o.url&&e.to===t.to&&e.class===t.class}),Rd=280,Od=140,Dd=qi({limit:1,interval:1e3});function $d(e,t){return t.v1.accounts.$select(e).fetch()}const Nd=mo(Dd($d)),At={public:{id:"7d1a0d"},local:{id:"d5zxa4"},unlisted:{id:"WDcQq9"},private:{id:"o34OrG"},direct:{id:"IV4QaU"}},Fd=window.ontouchstart!==void 0&&/iPad|iPhone|iPod/.test(navigator.userAgent),zd=new Intl.RelativeTimeFormat,Oi=80;function Vd(e){var t;return(t=e==null?void 0:e.options)!=null&&t.length?`📊:
${e.options.map(n=>`- ${n.title}${n.votesCount>=0?` (${n.votesCount})`:""}`).join(`
`)}`:""}function Go(e){const{spoilerText:t,content:n,poll:o}=e;return(t?`${t}
`:"")+_o(n)+Vd(o)}function ea(e=[],t=document){for(const n of e)try{return t.querySelectorAll(n)}catch{}return[]}function Hd(e){return!e||(e=e.trim(),!e)?!1:!!_o(e,{preProcess:n=>{for(const o of ea([".mention, pre, code, a:has(.invisible)",".mention, pre, code"],n))o.remove()}})}function Bd(e){return _o(e,{preProcess:t=>{for(const n of ea([".mention, .hashtag, pre, code, a:has(.invisible)",".mention, .hashtag, pre, code"],t))n.remove();for(const n of t.querySelectorAll("a")){const o=n.innerText.trim();(o.startsWith("https://")||o.startsWith("http://"))&&n.remove()}}})}const Ud=/^http/i,Di=({post:e,instance:t,previewMode:n})=>{const{content:o,emojis:i,language:s,mentions:a,url:c}=e,l=$();return Ct(()=>{if(!l.current)return;const d=Ls(o,{emojis:i,returnDOM:!0});for(const f of d.querySelectorAll('a.u-url[target="_blank"]'))Ud.test(f.innerText.trim())||f.removeAttribute("target");l.current.replaceChildren(d.cloneNode(!0))},[o,i.length]),r("div",{ref:l,lang:s,dir:"auto",class:"inner-content",onClick:iu({mentions:a,instance:t,previewMode:n,statusURL:c})})},jd={s:"small",m:"medium",l:"large"},Wd=mo(async e=>{const{detectAll:t}=await I(async()=>{const{detectAll:i}=await import("./tinyld-light-tbgyvj3S.js");return{detectAll:i}},[],import.meta.url);if(e=e==null?void 0:e.trim(),(e==null?void 0:e.length)>500)return null;const o=t(e)[0];return o!=null&&o.lang&&(o==null?void 0:o.accuracy)>.5?o.lang:null}),yn={id:"8fZueG"},ur={},$i=(e,t=[])=>{if(!e)return!1;const n=bs(!0),o=e!==n&&!bn([e],[n])&&!t.find(i=>e===i||bn([e],[i]));return ur[e+t]=!0,o};function Qt({statusID:e,status:t,instance:n,size:o="m",contentTextWeight:i,readOnly:s,enableCommentHint:a,withinContext:c,skeleton:l,enableTranslate:d,forceTranslate:f,previewMode:u,onMediaClick:p,quoted:h,onStatusLinkClick:m=()=>{},showFollowedTags:g,allowContextMenu:_,showActionsBar:T,showReplyParent:y,mediaFirst:w}){var Yr,Xr,Qr,Jr;const{_:E}=po();if(l)return r("div",{class:`status skeleton ${w?"status-media-first small":""}`,children:[!w&&r(st,{size:"xxl"}),r("div",{class:"container",children:[r("div",{class:"meta",children:[(o==="s"||w)&&r(st,{size:"m"})," ███ ████████"]}),r("div",{class:"content-container",children:[w&&r("div",{class:"media-first-container"}),r("div",{class:`content ${w?"media-first-content":""}`,children:r("p",{children:"████ ████████"})})]})]})]});const{masto:x,instance:b,authenticated:k}=so({instance:n}),{instance:D}=so(),L=b===D;let A=it(e||(t==null?void 0:t.id),b);const C=In(B);if(t||(t=C.statuses[A]||C.statuses[e],A=it(t==null?void 0:t.id,b)),!t)return null;const{account:{acct:R,avatar:K,avatarStatic:U,id:oe,url:Q,displayName:re,username:q,emojis:ie,bot:ce,group:se},id:H,repliesCount:fe,reblogged:ne,reblogsCount:Ee,favourited:ye,favouritesCount:xe,bookmarked:De,poll:Ie,muted:$e,sensitive:Ce,spoilerText:he,visibility:N,language:ge,editedAt:Ge,filtered:Mt,card:V,createdAt:le,inReplyToId:z,inReplyToAccountId:J,content:Y,mentions:be,mediaAttachments:te,reblog:pe,uri:Rt,url:Ue,emojis:Ae,tags:Pe,pinned:ve,_deleted:Le,_pinned:Cn,emojiReactions:dt}=t,[_t,yo]=Z(null);ee(()=>{if(!Y||ge||_t)return;let v;return v=setTimeout(async()=>{let P=await Wd(Bd(Y));yo(P)},1e3),()=>clearTimeout(v)},[Y,ge]);const me=ge||_t,Ot=!!(te!=null&&te.length);w&&Ot&&(o="s");const yt=ae(()=>_r(),[]),tt=ae(()=>yt&&yt===oe,[oe,yt]),Pn=ze(Gs),X=!tt&&!s&&!u&&Pr(Mt,Pn);if((X==null?void 0:X.action)==="hide")return null;const _e=v=>{v.shiftKey};if(o!=="l"&&X)return r(ef,{status:t,filterInfo:X,instance:b,containerProps:{onMouseEnter:_e},showFollowedTags:!0,quoted:h});const Te=new Date(le),He=new Date(Ge);let Se=be==null?void 0:be.find(v=>v.id===J);!Se&&J===H&&(Se={url:Q,username:q,displayName:re});const[nt,Ln]=Z(Se);if(!c&&!nt&&J){const v=B.accounts[J];v?Ln(v):Nd(J,x).then(P=>{Ln(P),B.accounts[P.id]=P}).catch(P=>{})}const bt=J===yt||(be==null?void 0:be.find(v=>v.id===yt)),qe=ae(()=>!!(Yo.account.get("preferences")||{})["reading:expand:spoilers"],[]),Mn=ae(()=>{var P;return((P=(Yo.account.get("preferences")||{})["reading:expand:media"])==null?void 0:P.toLowerCase())||"default"},[]),je=u||qe||!!C.spoilers[H],Tt=u||Mn==="show_all"||!!C.spoilersMedia[H];if(pe)return se?r("div",{"data-state-post-id":A,class:"status-group",onMouseEnter:_e,children:[r("div",{class:"status-pre-meta",children:[r(M,{icon:"group",size:"l",alt:S._({id:"L8fEEm"})})," ",r(gt,{account:t.account,instance:b,showAvatar:!0})]}),r(Qt,{status:e?null:pe,statusID:e?pe.id:null,instance:b,size:o,contentTextWeight:i,readOnly:s,mediaFirst:w})]}):r("div",{"data-state-post-id":A,class:"status-reblog",onMouseEnter:_e,children:[r("div",{class:"status-pre-meta",children:[r(M,{icon:"rocket",size:"l"})," ",r(O,{id:"DlhB4J",components:{0:r(gt,{account:t.account,instance:b,showAvatar:!0}),1:r("span",{})}})]}),r(Qt,{status:e?null:pe,statusID:e?pe.id:null,instance:b,size:o,contentTextWeight:i,readOnly:s,enableCommentHint:!0,mediaFirst:w})]});const bo=Me(({children:v})=>r("div",{"data-state-post-id":A,class:"status-followed-tags",onMouseEnter:_e,children:[r("div",{class:"status-pre-meta",children:[r(M,{icon:"hashtag",size:"l"})," ",C.statusFollowedTags[A].slice(0,3).map(P=>r(Gt,{to:b?`/${b}/t/${P}`:`/t/${P}`,class:"status-followed-tag-item",children:P},P))]}),v]}),[A,b,C.statusFollowedTags[A]]),wt=g&&((Yr=C.statusFollowedTags[A])!=null&&Yr.length)?bo:F,de=o==="l",[Et,Dt]=Z(f),{contentTranslation:To,contentTranslationAutoInline:Mr}=C.settings;To||(d=!1);const Rr=ae(()=>{if(!To||!Mr||s||c&&!de||u||he||Ce||Ie||V||te!=null&&te.length)return!1;const v=jo(Y);return v>0&&v<=Od},[To,Mr,s,c,de,u,he,Ce,Ie,V,te,Y]),[wo,Rn]=Z(!1),[fa,Eo]=Z(!1),Or=ro(),Dr=ro(),ha=ro(),$t=$(null),On=S._({id:"7jyUKe"}),$r=Me(()=>Math.max(Math.round((he.length+jo(Y))/140)||1,1),[he,Y]),Nr=Sn(Te),Fr=Ge&&Sn(He);let nn=k&&N!=="direct"&&N!=="private";N==="private"&&tt&&(nn=!0);const Dn=v=>{var P;if(!L||!k)return alert(On);(v!=null&&v.shiftKey||(P=v==null?void 0:v.syntheticEvent)!=null&&P.shiftKey)&&rc({replyToStatus:t})||Gn({replyToStatus:t})},zr=ae(()=>te.some(v=>{var P,G;return!((G=(P=v.description)==null?void 0:P.trim)!=null&&G.call(P))}),[te]),Vr=ae(()=>Math.floor((new Date-Te)/(1e3*60*60*24*30)),[Te]),xo=async()=>{if(!L||!k)return alert(On),!1;try{if(B.statuses[A]={...t,reblogged:!ne,reblogsCount:Ee+(ne?-1:1)},ne){const v=await x.v1.statuses.$select(H).unreblog();ft(v,b)}else{const v=await x.v1.statuses.$select(H).reblog();ft(v,b)}return!0}catch{return B.statuses[A]=t,!1}},Hr=async()=>{if(!L||!k)return alert(On),!1;try{if(B.statuses[A]={...t,favourited:!ye,favouritesCount:xe+(ye?-1:1)},ye){const v=await x.v1.statuses.$select(H).unfavourite();ft(v,b)}else{const v=await x.v1.statuses.$select(H).favourite();ft(v,b)}return!0}catch{return B.statuses[A]=t,!1}},So=async()=>{try{const v=await Hr();!de&&v&&Re(ye?S._({id:"sZvpIt",values:{0:q||R}}):S._({id:"yUngDO",values:{0:q||R}}))}catch{}},Br=async()=>{if(Zn("@mastodon/post-bookmark")){if(!L||!k)return alert(On),!1;try{if(B.statuses[A]={...t,bookmarked:!De},De){const v=await x.v1.statuses.$select(H).unbookmark();ft(v,b)}else{const v=await x.v1.statuses.$select(H).bookmark();ft(v,b)}return!0}catch{return B.statuses[A]=t,!1}}},Ur=async()=>{try{const v=await Br();!de&&v&&Re(De?S._({id:"lWQguj",values:{0:q||R}}):S._({id:"Fb2K8h",values:{0:q||R}}))}catch{}},on=C.settings.contentTranslationHideLanguages||[],[Nt,pa]=Z(ur[me+on]?$i(me,on):!1);ee(()=>{if(!me||Nt||ur[me+on])return;let v=setTimeout(()=>{const P=$i(me,on);P&&pa(P)},1);return()=>clearTimeout(v)},[me,Nt,on]);const jr=$(),Wr=$();async function ma(v){var ue,We,Ft,ko;v&&(jr.current=x.v1.statuses.$select(e).rebloggedBy.list({limit:Oi}),Wr.current=x.v1.statuses.$select(e).favouritedBy.list({limit:Oi}));const[{value:P},{value:G}]=await Promise.allSettled([jr.current.next(),Wr.current.next()]);if((ue=P.value)!=null&&ue.length||(We=G.value)!=null&&We.length){const xt=[];return(Ft=P.value)!=null&&Ft.length&&xt.push(...P.value.map(St=>(St._types=["reblog"],St))),(ko=G.value)!=null&&ko.length&&xt.push(...G.value.map(St=>(St._types=["favourite"],St))),{value:xt,done:P.done&&G.done}}return{value:[],done:!0}}const ga=$(),Kr=["public","unlisted"].includes(N),va=["public","unlisted","private"].includes(N),Zr=r(F,{children:[!de&&L&&r(F,{children:r("div",{class:"menu-control-group-horizontal status-menu",children:[r(ke,{onClick:Dn,children:[r(M,{icon:"comment"}),r("span",{children:fe>0?rt(fe):S._({id:"ImOQa9"})})]}),r(Lo,{subMenu:!0,confirmLabel:r(F,{children:[r(M,{icon:"rocket"}),r("span",{children:ne?S._({id:"QzzGsY"}):S._({id:"kulphB"})})]}),className:`menu-reblog ${ne?"checked":""}`,menuExtras:r(ke,{onClick:()=>{Gn({draftStatus:{status:`
${Ue}`}})},children:[r(M,{icon:"quote"}),r("span",{children:r(O,{id:"ZhhOwV"})})]}),menuFooter:zr&&!ne?r("div",{class:"footer",children:[r(M,{icon:"alert"}),r(O,{id:"MB+wJL"})]}):Vr>=3&&r("div",{class:"footer",children:[r(M,{icon:"info"}),r("span",{children:r(O,{id:"dBme/4",values:{0:zd.format(-Vr,"month")},components:{0:r("strong",{})}})})]}),disabled:!nn,onClick:async()=>{try{const v=await xo();!de&&v&&Re(ne?S._({id:"bpDheH",values:{0:q||R}}):S._({id:"dbNZdP",values:{0:q||R}}))}catch{}},children:[r(M,{icon:"rocket"}),r("span",{children:Ee>0?rt(Ee):ne?S._({id:"QzzGsY"}):S._({id:"PiVIlD"})})]}),r(ke,{onClick:So,className:`menu-favourite ${ye?"checked":""}`,children:[r(M,{icon:"heart"}),r("span",{children:xe>0?rt(xe):ye?S._({id:"OcUmcH"}):S._({id:"W9FRBT"})})]}),Zn("@mastodon/post-bookmark")&&r(ke,{onClick:Ur,className:`menu-bookmark ${De?"checked":""}`,children:[r(M,{icon:"bookmark"}),r("span",{children:De?S._({id:"q8EQYI"}):S._({id:"PZlHt8"})})]})]})}),!de&&L&&(de||T)&&r(an,{}),(de||T)&&r(F,{children:r(ke,{onClick:()=>{B.showGenericAccounts={heading:S._({id:"+XOeb+"}),fetchAccounts:ma,instance:b,showReactions:!0,postID:A}},children:[r(M,{icon:"react"}),r("span",{children:r(O,{id:"+XOeb+"})})]})}),!w&&r(F,{children:[(d||!me||Nt)&&r(an,{}),d?r("div",{class:mn?"menu-horizontal":"",children:[r(ke,{disabled:Et,onClick:()=>{Dt(!0)},children:[r(M,{icon:"translate"}),r("span",{children:r(O,{id:"pi8x/S"})})]}),mn&&r(ke,{onClick:()=>{const v=Go(t);v&&Ii(v,me)},children:[r(M,{icon:"speak"}),r("span",{children:r(O,{id:"yIBLq8"})})]})]}):(!me||Nt)&&r("div",{class:mn?"menu-horizontal":"",children:[r(li,{to:`${b?`/${b}`:""}/s/${H}?translate=1`,children:[r(M,{icon:"translate"}),r("span",{children:r(O,{id:"pi8x/S"})})]}),mn&&r(ke,{onClick:()=>{const v=Go(t);v&&Ii(v,me)},children:[r(M,{icon:"speak"}),r("span",{children:r(O,{id:"yIBLq8"})})]})]})]}),(!de&&L||d||!me||Nt)&&r(an,{}),!de&&r(F,{children:r(li,{to:b?`/${b}/s/${H}`:`/s/${H}`,onClick:v=>{m(v,t)},children:[r(M,{icon:"arrows-right"}),r("small",{children:[r(O,{id:"8MkSAW",values:{0:q||R},components:{0:r("span",{class:"bidi-isolate"})}}),r("br",{}),r("span",{class:"more-insignificant",children:[E(At[N])," • ",Nr]})]})]})}),!!Ge&&r(F,{children:r(ke,{onClick:()=>{Rn(H)},children:[r(M,{icon:"history"}),r("small",{children:[r(O,{id:"QL+7Jw"}),r("br",{}),r("span",{class:"more-insignificant",children:r(O,{id:"DuJJm9",values:{editedDateText:Fr}})})]})]})}),r(ke,{href:Ue,target:"_blank",children:[r(M,{icon:"external"}),r("small",{class:"menu-double-lines",style:{maxWidth:"16em"},children:Qd(Ue)})]}),r("div",{class:"menu-horizontal",children:[r(ke,{onClick:()=>{try{navigator.clipboard.writeText(Ue),Re(S._({id:"edWbV6"}))}catch{Re(S._({id:"W1ewR0"}))}},children:[r(M,{icon:"link"}),r("span",{children:r(O,{id:"he3ygx"})})]}),Kr&&(navigator==null?void 0:navigator.share)&&((Xr=navigator==null?void 0:navigator.canShare)==null?void 0:Xr.call(navigator,{url:Ue}))&&r(ke,{onClick:()=>{try{navigator.share({url:Ue})}catch{alert(S._({id:"TtG3Uh"}))}},children:[r(M,{icon:"share"}),r("span",{children:r(O,{id:"LFKLqp"})})]})]}),Kr&&de&&r(ke,{onClick:()=>{Eo(!0)},children:[r(M,{icon:"code"}),r("span",{children:r(O,{id:"jdVwsS"})})]}),(tt||bt)&&r(an,{}),(tt||bt)&&r(ke,{onClick:async()=>{try{const v=await x.v1.statuses.$select(H)[$e?"unmute":"mute"]();ft(v,b),Re($e?S._({id:"Pm+5jw"}):S._({id:"ywB7JM"}))}catch{Re($e?S._({id:"c6jxNY"}):S._({id:"8SN9kN"}))}},children:$e?r(F,{children:[r(M,{icon:"unmute"}),r("span",{children:r(O,{id:"i51zUR"})})]}):r(F,{children:[r(M,{icon:"mute"}),r("span",{children:r(O,{id:"OiUYO5"})})]})}),tt&&va&&r(ke,{onClick:async()=>{try{const v=await x.v1.statuses.$select(H)[ve?"unpin":"pin"]();ft(v,b),Re(ve?S._({id:"Yx809+"}):S._({id:"S6P6E+"}))}catch{Re(ve?S._({id:"A6cs15"}):S._({id:"vgUfWO"}))}},children:ve?r(F,{children:[r(M,{icon:"unpin"}),r("span",{children:r(O,{id:"XQMQZw"})})]}):r(F,{children:[r(M,{icon:"pin"}),r("span",{children:r(O,{id:"lfHLsx"})})]})}),tt&&r("div",{class:"menu-horizontal",children:[Zn("@mastodon/post-edit")&&r(ke,{onClick:()=>{Gn({editStatus:t})},children:[r(M,{icon:"pencil"}),r("span",{children:r(O,{id:"ePK91l"})})]}),de&&r(Lo,{subMenu:!0,confirmLabel:r(F,{children:[r(M,{icon:"trash"}),r("span",{children:r(O,{id:"FbPNuJ"})})]}),itemProps:{className:"danger"},menuItemClassName:"danger",onClick:()=>{(async()=>{try{await x.v1.statuses.$select(H).remove();const v=Xi(H,b);v._deleted=!0,Re(S._({id:"KiyvHV"}))}catch{Re(S._({id:"Yb6p2q"}))}})()},children:[r(M,{icon:"trash"}),r("span",{children:r(O,{id:"Jb6/SB"})})]})]}),!tt&&de&&r(F,{children:[r(an,{}),r(ke,{className:"danger",onClick:()=>{B.showReportModal={account:t.account,post:t}},children:[r(M,{icon:"flag"}),r("span",{children:r(O,{id:"7PQAMY"})})]})]})]}),Gr=$(),[$n,rn]=Z(!1),[Nn,Fn]=Z({}),zn=_||!de&&!u&&!Le&&!h,_a=Zs(Fd&&zn?v=>{var We;if(v.pointerType==="mouse")return;const{clientX:P,clientY:G}=((We=v.touches)==null?void 0:We[0])||v,ue=v.target.closest("a");ue&&$t.current.contains(ue)&&!ue.getAttribute("href").startsWith("#")||(v.preventDefault(),Fn({anchorPoint:{x:P,y:G},direction:"right"}),rn(!0))}:null,{threshold:600,captureEvent:!0,detect:"touch",cancelOnMovement:2}),Vn=!s&&!u&&!h,ya=Ut("r, shift+r",Dn,{enabled:Vn}),ba=Ut("f, l",So,{enabled:Vn}),Ta=Ut("d",Ur,{enabled:Vn}),wa=Ut("shift+b",()=>{(async()=>{try{const v=await xo();!de&&v&&Re(ne?S._({id:"bpDheH",values:{0:q||R}}):S._({id:"dbNZdP",values:{0:q||R}}))}catch{}})()},{enabled:Vn&&nn}),Ea=Ut("x",v=>{const P=document.activeElement.closest(".status-link, .status-focus");if(P){const G=P.querySelector(".spoiler-button:not(.spoiling)");if(G)v.stopPropagation(),G.click();else{const ue=P.querySelector(".spoiler-media-button:not(.spoiling)");ue&&(v.stopPropagation(),ue.click())}}}),Hn=te.slice(0,de?void 0:4),Bn=te.length>1&&Hn.some(v=>!!v.description&&!Js(v.description)),xa=ae(()=>{if(!Bn)return null;const v=[];return Hn.forEach((P,G)=>{if(!P.description)return;const ue=v.findIndex(We=>We.media.description===P.description);ue===-1?v.push({media:P,indices:[G]}):v[ue].indices.push(G)}),v.map(({media:P,indices:G})=>r("div",{"data-caption-index":G.map(ue=>ue+1).join(" "),onClick:ue=>{ue.preventDefault(),ue.stopPropagation(),B.showMediaAlt={alt:P.description,lang:me}},title:P.description,children:[r("sup",{children:G.map(ue=>ue+1).join(" ")})," ",P.description]},P.id))},[Bn,Hn,me]),sn=ae(()=>{var v;return!!z&&J===((v=t.account)==null?void 0:v.id)||!!C.statusThreadNumber[A]},[z,J,(Qr=t.account)==null?void 0:Qr.id,C.statusThreadNumber[A]]),Sa=ae(()=>a&&!sn&&!c&&!z&&N==="public"&&fe>0,[a,sn,c,z,fe,N]),qr=ae(()=>{if(V||Ie||Ce||he||te!=null&&te.length||sn||c||z||fe<=0||!/[???︖❓❔⁇⁈⁉¿‽؟]/.test(Y))return!1;const G=jo(Y);if(G>0&&G<=Rd)return!0},[V,Ie,Ce,he,te,pe,sn,c,z,fe,Y]);return r(wt,{children:[y&&!!(z&&J)&&r(Jd,{sKey:A}),r("article",{"data-state-post-id":A,ref:v=>{var G;$t.current=v;const P=((G=v==null?void 0:v.closest)==null?void 0:G.call(v,".timeline-item, .timeline-item-alt, .status-link, .status-focus"))||v;ya(P),ba(P),Ta(P),wa(P),Ea(P)},tabindex:"-1",class:`status ${!c&&z&&nt?"status-reply-to":""} visibility-${N} ${Cn?"status-pinned":""} ${jd[o]} ${Le?"status-deleted":""} ${h?"status-card":""} ${$n?"status-menu-open":""} ${w&&Ot?"status-media-first":""}`,onMouseEnter:_e,onContextMenu:v=>{var ue,We;if(!zn||v.metaKey)return;const P=v.target.closest("a");if(P&&$t.current.contains(P)&&!P.getAttribute("href").startsWith("#"))return;const G=(ue=window.getSelection)==null?void 0:ue.call(window);if(G.toString().length>0){const{anchorNode:Ft}=G;if((We=$t.current)!=null&&We.contains(Ft))return}v.preventDefault(),Fn({anchorPoint:{x:v.clientX,y:v.clientY},direction:"right"}),rn(!0)},...zn?_a():{},children:[zn&&r(ls,{ref:Gr,state:$n?"open":void 0,...Nn,onClose:v=>{var P,G,ue;rn(!1),(v==null?void 0:v.reason)==="click"&&((ue=(G=(P=$t.current)==null?void 0:P.closest("[tabindex]"))==null?void 0:G.focus)==null||ue.call(G))},portal:{target:document.body},containerProps:{style:{zIndex:1001},onClick:()=>{var v,P;(P=(v=Gr.current)==null?void 0:v.closeMenu)==null||P.call(v)}},overflow:"auto",boundingBoxPadding:_s(),unmountOnClose:!0,children:Zr}),T&&o!=="l"&&!u&&!s&&!Le&&!h&&r("div",{class:`status-actions ${$n==="actions-bar"?"open":""}`,ref:ga,children:[r(Bt,{size:"s",title:S._({id:"ImOQa9"}),alt:S._({id:"ImOQa9"}),class:"reply-button",icon:"comment",iconSize:"m",onClick:Dn}),r(Bt,{size:"s",checked:ye,title:[S._({id:"W9FRBT"}),S._({id:"OcUmcH"})],alt:[S._({id:"W9FRBT"}),S._({id:"8ab1sR"})],class:"favourite-button",icon:"heart",iconSize:"m",count:xe,onClick:So}),r("button",{type:"button",title:S._({id:"2FYpfJ"}),class:"plain more-button",onClick:v=>{v.preventDefault(),v.stopPropagation(),Fn({anchorRef:{current:v.currentTarget},align:"start",direction:"left",gap:0,shift:-8}),rn("actions-bar")},children:r(M,{icon:"more2",size:"m",alt:S._({id:"2FYpfJ"})})})]}),o!=="l"&&r("div",{class:"status-badge",children:[ne&&r(M,{class:"reblog",icon:"rocket",size:"s",alt:S._({id:"b7T5Zj"})}),ye&&r(M,{class:"favourite",icon:"heart",size:"s",alt:S._({id:"8ab1sR"})}),De&&r(M,{class:"bookmark",icon:"bookmark",size:"s",alt:S._({id:"1C/9Sa"})}),Cn&&r(M,{class:"pin",icon:"pin",size:"s",alt:S._({id:"kNiQp6"})})]}),o!=="s"&&r("a",{href:Q,tabindex:"-1",title:`@${R}`,onClick:v=>{v.preventDefault(),v.stopPropagation(),B.showAccount={account:t.account,instance:b}},children:r(st,{url:U||K,size:"xxl",squircle:ce})}),r("div",{class:"container",children:[r("div",{class:"meta",children:[r("span",{class:"meta-name",children:r(gt,{account:t.account,instance:b,showAvatar:o==="s",showAcct:de})})," ",o!=="l"&&(Le?r("span",{class:"status-deleted-tag",children:r(O,{id:"vGjmyl"})}):Ue&&!u&&!s&&!h?r(Gt,{to:b?`/${b}/s/${H}`:`/s/${H}`,onClick:v=>{v.metaKey||v.ctrlKey||v.shiftKey||v.altKey||v.which===2||(v.preventDefault(),v.stopPropagation(),m==null||m(v,t),Fn({anchorRef:{current:v.currentTarget},align:"end",direction:"bottom",gap:4}),rn(!0))},class:`time ${$n&&(Nn!=null&&Nn.anchorRef)?"is-open":""}`,children:[Sa&&!qr?r(M,{icon:"comment2",size:"s",alt:S._({id:"RXmXDR",values:{repliesCount:fe}})}):N!=="public"&&N!=="direct"&&r(M,{icon:_n[N],alt:E(At[N]),size:"s"})," ",r(at,{datetime:Te,format:"micro"}),!u&&!s&&r(M,{icon:"more2",class:"more",alt:S._({id:"2FYpfJ"})})]}):r("span",{class:"time",children:[N!=="public"&&N!=="direct"&&r(F,{children:[r(M,{icon:_n[N],alt:E(At[N]),size:"s"})," "]}),r(at,{datetime:Te,format:"micro"})]}))]}),N==="direct"&&r(F,{children:[r("div",{class:"status-direct-badge",children:r(O,{id:"IV4QaU"})})," "]}),!c&&r(F,{children:sn?r("div",{class:"status-thread-badge",children:[r(M,{icon:"thread",size:"s"}),r(O,{id:"lQ8zCz",values:{0:C.statusThreadNumber[A]?` ${C.statusThreadNumber[A]}/X`:""}})]}):!!z&&!!nt&&(!!he||!be.find(v=>v.id===J))&&r("div",{class:"status-reply-badge",children:[r(M,{icon:"reply"})," ",r(gt,{account:nt,instance:b,short:!0})]})}),r("div",{class:`content-container ${he||Ce?"has-spoiler":""} ${je?"show-spoiler":""} ${Tt?"show-media":""}`,"data-content-text-weight":i?$r():null,style:(de||i)&&{"--content-text-weight":$r()},children:w&&Ot?r(F,{children:[(!!he||!!Ce)&&!qe&&r(F,{children:[!!he&&r("span",{class:"spoiler-content media-first-spoiler-content",lang:me,dir:"auto",ref:Or,"data-read-more":E(yn),children:[r(qt,{text:he,emojis:Ae})," "]}),r("button",{class:`light spoiler-button media-first-spoiler-button ${je?"spoiling":""}`,type:"button",onClick:v=>{v.preventDefault(),v.stopPropagation(),je?(delete B.spoilers[H],qe||delete B.spoilersMedia[H]):(B.spoilers[H]=!0,qe||(B.spoilersMedia[H]=!0))},children:[r(M,{icon:je?"eye-open":"eye-close"})," ",je?S._({id:"6lGV3K"}):S._({id:"lqBX03"})]})]}),r(Zd,{mediaAttachments:te,language:me,postID:H,instance:b}),!!Y&&r("div",{class:"media-first-content content",ref:Dr,children:r(Di,{post:t,instance:b,previewMode:u})})]}):r(F,{children:[!!he&&r(F,{children:[r("div",{class:"content spoiler-content",lang:me,dir:"auto",ref:Or,"data-read-more":E(yn),children:r("p",{children:r(qt,{text:he,emojis:Ae})})}),qe||u?r("div",{class:"spoiler-divider",children:[r(M,{icon:"eye-open"})," ",r(O,{id:"gnKo7f"})]}):r("button",{class:`light spoiler-button ${je?"spoiling":""}`,type:"button",onClick:v=>{v.preventDefault(),v.stopPropagation(),je?(delete B.spoilers[H],qe||delete B.spoilersMedia[H]):(B.spoilers[H]=!0,qe||(B.spoilersMedia[H]=!0))},children:[r(M,{icon:je?"eye-open":"eye-close"})," ",je?S._({id:"6lGV3K"}):S._({id:"lqBX03"})]})]}),!!Y&&r("div",{class:"content",ref:Dr,"data-read-more":E(yn),inert:he&&!je?!0:void 0,children:[r(Di,{post:t,instance:b,previewMode:u}),r(tf,{id:H,instance:b,level:h})]}),!!Ie&&r(td,{lang:me,poll:Ie,readOnly:s||!L||!k,onUpdate:v=>{B.statuses[A].poll=v},refresh:()=>x.v1.polls.$select(Ie.id).fetch().then(v=>{B.statuses[A].poll=v}).catch(v=>{}),votePoll:v=>x.v1.polls.$select(Ie.id).votes.create({choices:v}).then(P=>{B.statuses[A].poll=P}).catch(P=>{})}),((d||Rr)&&Hd(Y)&&Nt||Et)&&r(Mu,{forceTranslate:Et||Rr,mini:!de&&!c,sourceLanguage:me,autoDetected:_t,text:Go(t)}),!u&&Ce&&!!te.length&&Mn!=="show_all"&&r("button",{class:`plain spoiler-media-button ${Tt?"spoiling":""}`,type:"button",hidden:!qe&&!!he,onClick:v=>{v.preventDefault(),v.stopPropagation(),Tt?delete B.spoilersMedia[H]:B.spoilersMedia[H]=!0},children:[r(M,{icon:Tt?"eye-open":"eye-close"})," ",Tt?S._({id:"6lGV3K"}):S._({id:"9ZCilh"})]}),!!te.length&&(te.length>1&&(de||c&&o==="m")?r("div",{class:"media-large-container",children:te.map((v,P)=>r("div",{class:"media-container media-eq1",children:r(lr,{media:v,autoAnimate:!0,showCaption:!0,allowLongerCaption:!Y,lang:me,to:`/${b}/s/${H}?${c?"media":"media-only"}=${P+1}`,onClick:p?G=>p(G,P,v,t):void 0})},v.id))}):r(Kd,{lang:me,enabled:Bn,captionChildren:xa,children:r("div",{ref:ha,class:`media-container media-eq${te.length} ${te.length>2?"media-gt2":""} ${te.length>4?"media-gt4":""}`,children:Hn.map((v,P)=>r(lr,{media:v,autoAnimate:de,showCaption:te.length===1,allowLongerCaption:!Y&&te.length===1,lang:me,altIndex:Bn&&!!v.description&&P+1,to:`/${b}/s/${H}?${c?"media":"media-only"}=${P+1}`,onClick:p?G=>{p(G,P,v,t)}:void 0,checkAspectRatio:te.length===1},v.id))})})),!!V&&/^https/i.test(V==null?void 0:V.url)&&!Ce&&!he&&!Ie&&!te.length&&!C.statusQuotes[A]&&r(qd,{card:V,selfReferential:(V==null?void 0:V.url)===t.url||(V==null?void 0:V.url)===t.uri,selfAuthor:(Jr=V==null?void 0:V.authors)==null?void 0:Jr.some(v=>{var P;return((P=v.account)==null?void 0:P.url)===Q}),instance:D})]})}),!de&&qr&&r("div",{class:"content-comment-hint insignificant",children:[r(M,{icon:"comment2",alt:S._({id:"N8UzTV"})})," ",fe]}),de&&r(F,{children:[r("div",{class:"extra-meta",children:Le?r("span",{class:"status-deleted-tag",children:r(O,{id:"vGjmyl"})}):r(F,{children:[r("span",{children:E(At[N])})," •"," ",r("a",{href:Ue,target:"_blank",rel:"noopener noreferrer",children:[new Date().getTime()-Te.getTime()<864e5&&r(F,{children:[r(at,{datetime:Te,format:"micro"})," ",""," "]}),r("time",{class:"created",datetime:Te.toISOString(),title:Te.toLocaleString(),children:Nr})]}),Ge&&r(F,{children:[" ","• ",r(M,{icon:"pencil",alt:S._({id:"MRZxAn"})})," ",r("time",{tabIndex:"0",class:"edited",datetime:He.toISOString(),onClick:()=>{Rn(H)},children:Fr})]})]})}),!!(dt!=null&&dt.length)&&r("div",{class:"emoji-reactions",children:dt.map(v=>{const{name:P,count:G,me:ue,url:We,staticUrl:Ft}=v;if(We)return r("span",{class:`emoji-reaction tag ${ue?"":"insignificant"}`,children:[r(ir,{alt:P,url:We,staticUrl:Ft})," ",G]});if(/^:.+?:$/.test(P)){const xt=Ae.find(St=>St.shortcode===P.replace(/^:/,"").replace(/:$/,""));if(xt)return r("span",{class:`emoji-reaction tag ${ue?"":"insignificant"}`,children:[r(ir,{alt:P,url:xt.url,staticUrl:xt.staticUrl})," ",G]})}return r("span",{class:`emoji-reaction tag ${ue?"":"insignificant"}`,children:[P," ",G]})})}),r("div",{class:`actions ${Le?"disabled":""}`,children:[r("div",{class:"action has-count",children:r(Bt,{title:S._({id:"ImOQa9"}),alt:S._({id:"VbyRUy"}),class:"reply-button",icon:"comment",count:fe,onClick:Dn})}),r(Lo,{disabled:!nn,onClick:xo,confirmLabel:r(F,{children:[r(M,{icon:"rocket"}),r("span",{children:ne?S._({id:"QzzGsY"}):S._({id:"kulphB"})})]}),menuExtras:r(ke,{onClick:()=>{Gn({draftStatus:{status:`
${Ue}`}})},children:[r(M,{icon:"quote"}),r("span",{children:r(O,{id:"ZhhOwV"})})]}),menuFooter:zr&&!ne&&r("div",{class:"footer",children:[r(M,{icon:"alert"}),r(O,{id:"MB+wJL"})]}),children:r("div",{class:"action has-count",children:r(Bt,{checked:ne,title:[S._({id:"kulphB"}),S._({id:"QzzGsY"})],alt:[S._({id:"kulphB"}),S._({id:"b7T5Zj"})],class:"reblog-button",icon:"rocket",count:Ee,disabled:!nn})})}),r("div",{class:"action has-count",children:r(Bt,{checked:ye,title:[S._({id:"W9FRBT"}),S._({id:"OcUmcH"})],alt:[S._({id:"W9FRBT"}),S._({id:"8ab1sR"})],class:"favourite-button",icon:"heart",count:xe,onClick:Hr})}),Zn("@mastodon/post-bookmark")&&r("div",{class:"action",children:r(Bt,{checked:De,title:[S._({id:"PZlHt8"}),S._({id:"q8EQYI"})],alt:[S._({id:"PZlHt8"}),S._({id:"1C/9Sa"})],class:"bookmark-button",icon:"bookmark",onClick:Br})}),r(ys,{portal:{target:document.querySelector(".status-deck")||document.body},align:"end",gap:4,overflow:"auto",viewScroll:"close",menuButton:r("div",{class:"action",children:r("button",{type:"button",title:S._({id:"2FYpfJ"}),class:"plain more-button",children:r(M,{icon:"more",size:"l",alt:S._({id:"2FYpfJ"})})})}),children:Zr})]})]})]}),!!wo&&r(Qo,{onClick:v=>{v.target===v.currentTarget&&Rn(!1)},children:r(Yd,{statusID:wo,instance:b,fetchStatusHistory:()=>x.v1.statuses.$select(wo).history.list(),onClose:()=>{var v;Rn(!1),(v=$t.current)==null||v.focus()}})}),!!fa&&r(Qo,{onClick:v=>{v.target===v.currentTarget&&Eo(!1)},children:r(Xd,{post:t,instance:b,onClose:()=>{Eo(!1)}})})]})]})}function Kd(e){const{enabled:t,children:n,lang:o,captionChildren:i}=e;return!t||!i?n:r("figure",{class:"media-figure-multiple",children:[n,r("figcaption",{lang:o,dir:"auto",children:i})]})}function Zd(e){const{mediaAttachments:t,language:n,postID:o,instance:i}=e,s=t.length>1,a=$(),[c,l]=Z(0);return ee(()=>{let d=()=>{const{clientWidth:f,scrollLeft:u}=a.current,p=Math.round(Math.abs(u)/f);l(p)};return a.current&&a.current.addEventListener("scroll",d,{passive:!0}),()=>{a.current&&a.current.removeEventListener("scroll",d)}},[]),r(F,{children:[r("div",{class:"media-first-container",children:[r("div",{class:"media-first-carousel",ref:a,children:t.map((d,f)=>r("div",{class:"media-first-item",children:r(lr,{media:d,lang:n,to:`/${i}/s/${o}?media=${f+1}`})},d.id))}),s&&r("div",{class:"media-carousel-controls",children:[r("div",{class:"carousel-indexer",children:[c+1,"/",t.length]}),r("label",{class:"media-carousel-button",children:r("button",{type:"button",class:"carousel-button",hidden:c===0,onClick:d=>{d.preventDefault(),d.stopPropagation(),a.current.focus(),a.current.scrollTo({left:a.current.clientWidth*(c-1)*(rr()?-1:1),behavior:"smooth"})},children:r(M,{icon:"arrow-left"})})}),r("label",{class:"media-carousel-button",children:r("button",{type:"button",class:"carousel-button",hidden:c===t.length-1,onClick:d=>{d.preventDefault(),d.stopPropagation(),a.current.focus(),a.current.scrollTo({left:a.current.clientWidth*(c+1)*(rr()?-1:1),behavior:"smooth"})},children:r(M,{icon:"arrow-right"})})})]})]}),s&&r("div",{class:"media-carousel-dots",style:{"--dots-count":t.length},children:t.map((d,f)=>r("span",{class:`carousel-dot ${f===c?"active":""}`},d.id))})]})}function Ni(e){return Ps.toUnicode(URL.parse(e).hostname.replace(/^www\./,"").replace(/\/$/,""))}function Fi(e){return["x.com","twitter.com","threads.net","bsky.app"].includes(e)}function Gd({authors:e,hidden:t,children:n}){var i,s;if(t||!((s=(i=e==null?void 0:e[0])==null?void 0:i.account)!=null&&s.id))return n;const o=e[0].account;return r("div",{class:"card-byline",children:[n,r("div",{class:"card-byline-author",children:[r(M,{icon:"link",size:"s"})," ",r("small",{children:r(O,{id:"4LHHK6",components:{0:r(gt,{account:o,showAvatar:!0})}})})]})]})}function qd({card:e,selfReferential:t,selfAuthor:n,instance:o}){var Q;const i=In(B),{blurhash:s,title:a,description:c,html:l,providerName:d,providerUrl:f,authorName:u,authorUrl:p,width:h,height:m,image:g,imageDescription:_,url:T,type:y,embedUrl:w,language:E,publishedAt:x,authors:b}=e,k=a||d||u,L=h/m>=1.2?"large":"",[A,C]=Z(null);if(ee(()=>{k&&g&&!t&&Fa(T)&&za(o,T).then(re=>{if(!re)return;const{id:q,url:ie}=re;C("#"+ie)})},[k,g,t]),i.unfurledLinks[T])return null;const R=/<iframe/i.test(l),K=Me(re=>{R&&(re.preventDefault(),B.showEmbedModal={html:l,url:T||w,width:h,height:m})},[R]),[U,oe]=Z(null);if(k&&(g||y==="photo"&&s)){const re=Ni(T),q=g&&s?Cr(s):null;if(!g){const H=Uu(s,44,44),fe=window.OffscreenCanvas?new OffscreenCanvas(1,1):document.createElement("canvas");fe.width=44,fe.height=44;const ne=fe.getContext("2d");ne.imageSmoothingEnabled=!1;const Ee=ne.createImageData(44,44);Ee.data.set(H),ne.putImageData(Ee,0,0);try{window.OffscreenCanvas?fe.convertToBlob().then(ye=>{oe(URL.createObjectURL(ye))}):oe(fe.toDataURL())}catch{}}const ie=Fi(re);return r(Gd,{hidden:!!n,authors:b,children:r("a",{href:A||T,target:A?null:"_blank",rel:"nofollow noopener noreferrer",class:`card link ${ie?"card-post":""} ${U?"":L}`,style:{"--average-color":q&&`rgb(${q.join(",")})`},onClick:K,children:[r("div",{class:"card-image",children:r("img",{src:g||U,width:h,height:m,loading:"lazy",decoding:"async",fetchPriority:"low",alt:_||"",onError:ce=>{try{ce.target.style.display="none"}catch{}},style:{"--anim-duration":h&&m&&`${Math.min(Math.max(Math.max(h,m)/100,5),120)}s`}})}),r("div",{class:"meta-container",lang:E,children:[r("p",{class:"meta domain",children:[r("span",{class:"domain",children:re})," ",!!x&&r(F,{children:"· "}),!!x&&r(F,{children:r(at,{datetime:x,format:"micro"})})]}),r("p",{class:"title",dir:"auto",title:a,children:a}),r("p",{class:"meta",dir:"auto",title:c,children:c||!!x&&r(at,{datetime:x,format:"micro"})})]})]})})}else{if(y==="photo")return r("a",{href:T,target:"_blank",rel:"nofollow noopener noreferrer",class:"card photo",onClick:K,children:r("img",{src:w,width:h,height:m,alt:a||c,loading:"lazy",style:{height:"auto",aspectRatio:`${h}/${m}`}})});if(y==="video"&&/youtube/i.test(d)){const re=(Q=T.match(/watch\?v=([^&]+)/))==null?void 0:Q[1];if(re)return r("a",{class:"card video",onClick:K,children:r("lite-youtube",{videoid:re,nocookie:!0,autoPause:!0})})}if(k&&!g){const re=Ni(T),q=Fi(re);return r("a",{href:A||T,target:A?null:"_blank",rel:"nofollow noopener noreferrer",class:`card link ${q?"card-post":""} no-image`,lang:E,dir:"auto",onClick:K,children:r("div",{class:"meta-container",children:[r("p",{class:"meta domain",children:[r("span",{class:"domain",children:[r(M,{icon:"link",size:"s"})," ",r("span",{children:re})]})," ",!!x&&r(F,{children:"· "}),!!x&&r(F,{children:r(at,{datetime:x,format:"micro"})})]}),r("p",{class:"title",title:a,children:a}),r("p",{class:"meta",title:c||d||u,children:c||d||u})]})})}}}function Yd({statusID:e,instance:t,fetchStatusHistory:n=()=>{},onClose:o}){const[i,s]=Z("default"),[a,c]=Z([]);return ee(()=>{s("loading"),(async()=>{try{const l=await n();c(l),s("default")}catch{s("error")}})()},[]),r("div",{id:"edit-history",class:"sheet",children:[!!o&&r("button",{type:"button",class:"sheet-close",onClick:o,children:r(M,{icon:"x",alt:S._({id:"yz7wBu"})})}),r("header",{children:[r("h2",{children:r(O,{id:"OKiofn"})}),i==="error"&&r("p",{children:r(O,{id:"EANWES"})}),i==="loading"&&r("p",{children:[r(Yi,{abrupt:!0})," ",r(O,{id:"Pwqkdw"})]})]}),r("main",{tabIndex:"-1",children:a.length>0&&r("ol",{children:a.map(l=>{const{createdAt:d}=l,f=new Date(d);return r("li",{class:"history-item",children:[r("h3",{children:r("time",{children:Sn(f,{formatOpts:{weekday:"short",second:"numeric"}})})}),r(Qt,{status:l,instance:t,size:"s",withinContext:!0,readOnly:!0,previewMode:!0})]},d)})})})]})}function ta(e,t,n=0){var C;const{account:{url:o,displayName:i,acct:s,username:a,emojis:c,bot:l,group:d},id:f,poll:u,spoilerText:p,language:h,editedAt:m,createdAt:g,content:_,mediaAttachments:T,url:y,emojis:w}=e,E=it(f,t),b=(B.statusQuotes[E]||[]).filter((R,K,U)=>U.findIndex(oe=>oe.url===R.url)===K),k=b.length&&n<=2?b.map(R=>{const{id:K,instance:U}=R,oe=it(K,U),Q=B.statuses[oe];if(Q)return ta(Q,U,++n)}).join(""):"",D=new Date(g),L=ar(_,w)+`
`+k+`
`+((C=u==null?void 0:u.options)!=null&&C.length?`
<p>📊:</p>
<ul>
${u.options.map(R=>`
<li>
${R.title}
${R.votesCount>=0?` (${R.votesCount})`:""}
</li>
`).join("")}
</ul>`:"")+(T.length>0?`
`+T.map(R=>{const{description:K,meta:U,previewRemoteUrl:oe,previewUrl:Q,remoteUrl:re,url:q,type:ie}=R,{original:ce={},small:se}=U||{},H=(se==null?void 0:se.width)||(ce==null?void 0:ce.width),fe=(se==null?void 0:se.height)||(ce==null?void 0:ce.height),ne=re||q,Ee=oe||Q,ye=Ee||ne,xe=ne?URL.parse(ne):null,De=ie==="unknown"&&xe&&/\.(mp4|m4r|m4v|mov|webm)$/i.test(xe.pathname),Ie=ie==="unknown"&&xe&&/\.(mp3|ogg|wav|m4a|m4p|m4b)$/i.test(xe.pathname),$e=ie==="image"||ie==="unknown"&&Ee&&!De&&!Ie,Ce=ie==="gifv"||ie==="video"||De,he=ie==="audio"||Ie;let N="";return $e?N=`<img src="${ye}" width="${H}" height="${fe}" alt="${K}" loading="lazy" />`:Ce?N=`
<video src="${ne}" width="${H}" height="${fe}" controls preload="auto" poster="${Ee}" loading="lazy"></video>
${K?`<figcaption>${K}</figcaption>`:""}
`:he?N=`
<audio src="${ne}" controls preload="auto"></audio>
${K?`<figcaption>${K}</figcaption>`:""}
`:N=`
<a href="${ne}">📄 ${K||ne}</a>
`,`<figure>${N}</figure>`}).join(`
`):""),A=`
<blockquote lang="${h}" cite="${y}" data-source="fediverse">
${p?`
<details>
<summary>${p}</summary>
${L}
</details>
`:L}
<footer>
${ar(i,c)} (@${s}) <a href="${y}"><time datetime="${D.toISOString()}">${D.toLocaleString()}</time></a>
</footer>
</blockquote>
`;return Qu(A)}function Xd({post:e,instance:t,onClose:n}){const{account:{url:o,displayName:i,username:s,emojis:a,bot:c,group:l},id:d,poll:f,spoilerText:u,language:p,editedAt:h,createdAt:m,content:g,mediaAttachments:_,url:T,emojis:y}=e,w=ta(e,t);return r("div",{id:"embed-post",class:"sheet",children:[!!n&&r("button",{type:"button",class:"sheet-close",onClick:n,children:r(M,{icon:"x",alt:S._({id:"yz7wBu"})})}),r("header",{children:r("h2",{children:r(O,{id:"jdVwsS"})})}),r("main",{tabIndex:"-1",children:[r("h3",{children:r(O,{id:"GkS6YG"})}),r("textarea",{class:"embed-code",readonly:!0,onClick:E=>{E.target.select()},dir:"auto",children:w}),r("button",{type:"button",onClick:()=>{try{navigator.clipboard.writeText(w),Re(S._({id:"bl7nrg"}))}catch{Re(S._({id:"/KEBaP"}))}},children:[r(M,{icon:"clipboard"})," ",r("span",{children:r(O,{id:"he3ygx"})})]}),!!(_!=null&&_.length)&&r("section",{children:[r("p",{children:r(O,{id:"/2mUza"})}),r("ol",{class:"links-list",children:_.map(E=>r("li",{children:r("a",{href:E.remoteUrl||E.url,target:"_blank",download:!0,children:E.remoteUrl||E.url})},E.id))})]}),!!(a!=null&&a.length)&&r("section",{children:[r("p",{children:r(O,{id:"AeM/di"})}),r("ul",{children:a.map(E=>r("li",{children:[r("picture",{children:[r("source",{srcset:E.staticUrl,media:"(prefers-reduced-motion: reduce)"}),r("img",{class:"shortcode-emoji emoji",src:E.url,alt:`:${E.shortcode}:`,width:"16",height:"16",loading:"lazy",decoding:"async"})]})," ",r("code",{children:[":",E.shortcode,":"]})," (",r("a",{href:E.url,target:"_blank",download:!0,children:"URL"}),")",E.staticUrl?r(F,{children:[" ","(",r("a",{href:E.staticUrl,target:"_blank",download:!0,children:r(O,{id:"xiropL"})}),")"]}):null]},E.shortcode))})]}),!!(y!=null&&y.length)&&r("section",{children:[r("p",{children:r(O,{id:"jzjjJh"})}),r("ul",{children:y.map(E=>r("li",{children:[r("picture",{children:[r("source",{srcset:E.staticUrl,media:"(prefers-reduced-motion: reduce)"}),r("img",{class:"shortcode-emoji emoji",src:E.url,alt:`:${E.shortcode}:`,width:"16",height:"16",loading:"lazy",decoding:"async"})]})," ",r("code",{children:[":",E.shortcode,":"]})," (",r("a",{href:E.url,target:"_blank",download:!0,children:"URL"}),")",E.staticUrl?r(F,{children:[" ","(",r("a",{href:E.staticUrl,target:"_blank",download:!0,children:r(O,{id:"xiropL"})}),")"]}):null]},E.shortcode))})]}),r("section",{children:r("small",{children:[r("p",{children:r(O,{id:"TnJgwX"})}),r("ul",{children:[r("li",{children:r(O,{id:"0OHPem"})}),r("li",{children:r(O,{id:"AzZ5zv"})}),r("li",{children:r(O,{id:"NU7wa/"})}),r("li",{children:r(O,{id:"R4PmPA"})})]})]})}),r("h3",{children:r(O,{id:"rdUucN"})}),r("output",{class:"embed-preview",dangerouslySetInnerHTML:{__html:w},dir:"auto"}),r("p",{children:r("small",{children:r(O,{id:"j0kZfi"})})})]})]})}function Bt({checked:e,count:t,class:n,title:o,alt:i,size:s,icon:a,iconSize:c="l",onClick:l,...d}){typeof o=="string"&&(o=[o,o]),typeof i=="string"&&(i=[i,i]);const[f,u]=Z(o[0]||""),[p,h]=Z(i[0]||"");return ee(()=>{e?(u(o[1]||""),h(i[1]||"")):(u(o[0]||""),h(i[0]||""))},[e,o,i]),r("button",{type:"button",title:f,class:`plain ${s?"small":""} ${n} ${e?"checked":""}`,onClick:m=>{l&&(m.preventDefault(),m.stopPropagation(),l(m))},...d,children:[r(M,{icon:a,size:c,alt:p}),!!t&&r(F,{children:[" ",r("small",{title:t,children:rt(t)})]})]})}function Qd(e){if(!e)return;const t=URL.parse(e),{host:n,pathname:o}=t,i=o.replace(/\/$/,""),[s,a,c]=i.match(/\/(@[^\/]+)\/(.*)/)||[];return r(F,{children:[Ps.toUnicode(n),a?r(F,{children:["/",a,r("wbr",{}),r("span",{class:"more-insignificant",children:["/",c]})]}):r("span",{class:"more-insignificant",children:i})]})}function Jd({sKey:e}){const n=In(B).statusReply[e];if(!n)return null;const{id:o,instance:i}=n,s=Xi(o,i);if(!s)return null;const{sensitive:a,spoilerText:c,account:{avatar:l,avatarStatic:d,bot:f}={},visibility:u,content:p,language:h,filtered:m}=s;if(a||c||!p)return null;const g=it(o,i),_=qs(s),T=ze(Gs),y=Pr(m,T);if((y==null?void 0:y.action)==="hide")return null;const w=(y==null?void 0:y.titlesStr)||"";return r("article",{class:`status compact-reply ${u==="direct"?"visibility-direct":""}`,tabindex:"-1","data-state-post-id":g,children:[r(st,{url:d||l,squircle:f}),r("div",{class:"content-compact",title:_,lang:h,dir:"auto",children:y?r("b",{class:"status-filtered-badge badge-meta",title:w,children:[r("span",{children:r(O,{id:"03Qqf9"})}),r("span",{children:w})]}):r("span",{children:_})})]})}function ef({status:e,filterInfo:t,instance:n,containerProps:o={},showFollowedTags:i,quoted:s}){var K;const{_:a}=po(),c=In(B),{id:l,account:{avatar:d,avatarStatic:f,bot:u,group:p},createdAt:h,visibility:m,reblog:g}=e,_=!!g,T=(t==null?void 0:t.titlesStr)||"",y=new Date(h),w=qs(e.reblog||e),[E,x]=Z(!1),b=Zs(()=>{x(!0)},{threshold:600,captureEvent:!0,detect:"touch",cancelOnMovement:2}),k=ro(),D=it(e.id,n),L=it(e.id,n)+" "+(it(g==null?void 0:g.id,n)||""),A=(g==null?void 0:g.id)||l,C=n?`/${n}/s/${A}`:`/s/${A}`,R=i&&!!((K=c.statusFollowedTags[D])!=null&&K.length);return r("div",{class:s?"":_?p?"status-group":"status-reblog":R?"status-followed-tags":"",...o,onContextMenu:U=>{U.preventDefault(),x(!0)},...b(),children:[r("article",{"data-state-post-id":L,class:`status filtered ${s?"status-card":""}`,tabindex:"-1",children:[r("b",{class:"status-filtered-badge clickable badge-meta",title:T,onClick:U=>{U.preventDefault(),x(!0)},children:[r("span",{children:r(O,{id:"03Qqf9"})}),r("span",{children:T})]})," ",r(st,{url:f||d,squircle:u}),r("span",{class:"status-filtered-info",children:[r("span",{class:"status-filtered-info-1",children:_?r(O,{id:"zJyf/5",components:{0:r(gt,{account:e.account,instance:n}),1:r(M,{icon:_n[m],alt:a(At[m]),size:"s"})}}):R?r(F,{children:[r(gt,{account:e.account,instance:n})," ",r(M,{icon:_n[m],alt:a(At[m]),size:"s"})," ",r("span",{children:c.statusFollowedTags[D].slice(0,3).map(U=>r("span",{class:"status-followed-tag-item",children:["#",U]},U))})]}):r(F,{children:[r(gt,{account:e.account,instance:n})," ",r(M,{icon:_n[m],alt:a(At[m]),size:"s"})," ",r(at,{datetime:y,format:"micro"})]})}),r("span",{class:"status-filtered-info-2",children:[_&&r(F,{children:[r(st,{url:g.account.avatarStatic||g.account.avatar,squircle:u})," "]}),w]})]})]}),!!E&&r(Qo,{onClick:U=>{U.target===U.currentTarget&&x(!1)},children:r("div",{id:"filtered-status-peek",class:"sheet",children:[r("button",{type:"button",class:"sheet-close",onClick:()=>x(!1),children:r(M,{icon:"x",alt:S._({id:"yz7wBu"})})}),r("header",{children:[r("b",{class:"status-filtered-badge",children:r(O,{id:"03Qqf9"})})," ",T]}),r("main",{tabIndex:"-1",children:r(Gt,{ref:k,class:"status-link",to:C,onClick:()=>{x(!1)},"data-read-more":a(yn),children:r(Qt,{status:e,instance:n,size:"s",readOnly:!0})})})]})})]})}const tf=Jt(({id:e,instance:t,level:n=0})=>{if(!e||!t)return;const{_:o}=po(),i=In(B),s=it(e,t),a=i.statusQuotes[s],c=a==null?void 0:a.filter((l,d,f)=>f.findIndex(u=>u.url===l.url)===d);if(c!=null&&c.length&&!(n>2))return c.map(l=>r(Os,{id:l.instance+l.id,children:r(Gt,{to:`${l.instance?`/${l.instance}`:""}/s/${l.id}`,class:"status-card-link","data-read-more":o(yn),children:r(Qt,{statusID:l.id,instance:l.instance,size:"s",quoted:n+1,enableCommentHint:!0})},l.instance+l.id)}))}),hh=Jt(Qt,(e,t)=>{const{status:n,...o}=e,{status:i,...s}=t;return(n==null?void 0:n.id)===(i==null?void 0:i.id)&&Va(o,s)});var zi=36,na="";for(;zi--;)na+=zi.toString(36);function ph(e){for(var t="",n=e||11;n--;)t+=na[Math.random()*36|0];return t}function ct(e){return Array.isArray?Array.isArray(e):ia(e)==="[object Array]"}const nf=1/0;function of(e){if(typeof e=="string")return e;let t=e+"";return t=="0"&&1/e==-nf?"-0":t}function rf(e){return e==null?"":of(e)}function Qe(e){return typeof e=="string"}function oa(e){return typeof e=="number"}function sf(e){return e===!0||e===!1||af(e)&&ia(e)=="[object Boolean]"}function ra(e){return typeof e=="object"}function af(e){return ra(e)&&e!==null}function Ke(e){return e!=null}function qo(e){return!e.trim().length}function ia(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const cf="Incorrect 'index' type",lf=e=>`Invalid value for key ${e}`,uf=e=>`Pattern length exceeds max of ${e}.`,df=e=>`Missing ${e} property in key`,ff=e=>`Property 'weight' in key '${e}' must be a positive integer`,Vi=Object.prototype.hasOwnProperty;class hf{constructor(t){this._keys=[],this._keyMap={};let n=0;t.forEach(o=>{let i=sa(o);this._keys.push(i),this._keyMap[i.id]=i,n+=i.weight}),this._keys.forEach(o=>{o.weight/=n})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function sa(e){let t=null,n=null,o=null,i=1,s=null;if(Qe(e)||ct(e))o=e,t=Hi(e),n=dr(e);else{if(!Vi.call(e,"name"))throw new Error(df("name"));const a=e.name;if(o=a,Vi.call(e,"weight")&&(i=e.weight,i<=0))throw new Error(ff(a));t=Hi(a),n=dr(a),s=e.getFn}return{path:t,id:n,weight:i,src:o,getFn:s}}function Hi(e){return ct(e)?e:e.split(".")}function dr(e){return ct(e)?e.join("."):e}function pf(e,t){let n=[],o=!1;const i=(s,a,c)=>{if(Ke(s))if(!a[c])n.push(s);else{let l=a[c];const d=s[l];if(!Ke(d))return;if(c===a.length-1&&(Qe(d)||oa(d)||sf(d)))n.push(rf(d));else if(ct(d)){o=!0;for(let f=0,u=d.length;f<u;f+=1)i(d[f],a,c+1)}else a.length&&i(d,a,c+1)}};return i(e,Qe(t)?t.split("."):t,0),o?n:n[0]}const mf={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},gf={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},vf={location:0,threshold:.6,distance:100},_f={useExtendedSearch:!1,getFn:pf,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var W={...gf,...mf,...vf,..._f};const yf=/[^ ]+/g;function bf(e=1,t=3){const n=new Map,o=Math.pow(10,t);return{get(i){const s=i.match(yf).length;if(n.has(s))return n.get(s);const a=1/Math.pow(s,.5*e),c=parseFloat(Math.round(a*o)/o);return n.set(s,c),c},clear(){n.clear()}}}class Lr{constructor({getFn:t=W.getFn,fieldNormWeight:n=W.fieldNormWeight}={}){this.norm=bf(n,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((n,o)=>{this._keysMap[n.id]=o})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,Qe(this.docs[0])?this.docs.forEach((t,n)=>{this._addString(t,n)}):this.docs.forEach((t,n)=>{this._addObject(t,n)}),this.norm.clear())}add(t){const n=this.size();Qe(t)?this._addString(t,n):this._addObject(t,n)}removeAt(t){this.records.splice(t,1);for(let n=t,o=this.size();n<o;n+=1)this.records[n].i-=1}getValueForItemAtKeyId(t,n){return t[this._keysMap[n]]}size(){return this.records.length}_addString(t,n){if(!Ke(t)||qo(t))return;let o={v:t,i:n,n:this.norm.get(t)};this.records.push(o)}_addObject(t,n){let o={i:n,$:{}};this.keys.forEach((i,s)=>{let a=i.getFn?i.getFn(t):this.getFn(t,i.path);if(Ke(a)){if(ct(a)){let c=[];const l=[{nestedArrIndex:-1,value:a}];for(;l.length;){const{nestedArrIndex:d,value:f}=l.pop();if(Ke(f))if(Qe(f)&&!qo(f)){let u={v:f,i:d,n:this.norm.get(f)};c.push(u)}else ct(f)&&f.forEach((u,p)=>{l.push({nestedArrIndex:p,value:u})})}o.$[s]=c}else if(Qe(a)&&!qo(a)){let c={v:a,n:this.norm.get(a)};o.$[s]=c}}}),this.records.push(o)}toJSON(){return{keys:this.keys,records:this.records}}}function aa(e,t,{getFn:n=W.getFn,fieldNormWeight:o=W.fieldNormWeight}={}){const i=new Lr({getFn:n,fieldNormWeight:o});return i.setKeys(e.map(sa)),i.setSources(t),i.create(),i}function Tf(e,{getFn:t=W.getFn,fieldNormWeight:n=W.fieldNormWeight}={}){const{keys:o,records:i}=e,s=new Lr({getFn:t,fieldNormWeight:n});return s.setKeys(o),s.setIndexRecords(i),s}function eo(e,{errors:t=0,currentLocation:n=0,expectedLocation:o=0,distance:i=W.distance,ignoreLocation:s=W.ignoreLocation}={}){const a=t/e.length;if(s)return a;const c=Math.abs(o-n);return i?a+c/i:c?1:a}function wf(e=[],t=W.minMatchCharLength){let n=[],o=-1,i=-1,s=0;for(let a=e.length;s<a;s+=1){let c=e[s];c&&o===-1?o=s:!c&&o!==-1&&(i=s-1,i-o+1>=t&&n.push([o,i]),o=-1)}return e[s-1]&&s-o>=t&&n.push([o,s-1]),n}const It=32;function Ef(e,t,n,{location:o=W.location,distance:i=W.distance,threshold:s=W.threshold,findAllMatches:a=W.findAllMatches,minMatchCharLength:c=W.minMatchCharLength,includeMatches:l=W.includeMatches,ignoreLocation:d=W.ignoreLocation}={}){if(t.length>It)throw new Error(uf(It));const f=t.length,u=e.length,p=Math.max(0,Math.min(o,u));let h=s,m=p;const g=c>1||l,_=g?Array(u):[];let T;for(;(T=e.indexOf(t,m))>-1;){let k=eo(t,{currentLocation:T,expectedLocation:p,distance:i,ignoreLocation:d});if(h=Math.min(k,h),m=T+f,g){let D=0;for(;D<f;)_[T+D]=1,D+=1}}m=-1;let y=[],w=1,E=f+u;const x=1<<f-1;for(let k=0;k<f;k+=1){let D=0,L=E;for(;D<L;)eo(t,{errors:k,currentLocation:p+L,expectedLocation:p,distance:i,ignoreLocation:d})<=h?D=L:E=L,L=Math.floor((E-D)/2+D);E=L;let A=Math.max(1,p-L+1),C=a?u:Math.min(p+L,u)+f,R=Array(C+2);R[C+1]=(1<<k)-1;for(let U=C;U>=A;U-=1){let oe=U-1,Q=n[e.charAt(oe)];if(g&&(_[oe]=+!!Q),R[U]=(R[U+1]<<1|1)&Q,k&&(R[U]|=(y[U+1]|y[U])<<1|1|y[U+1]),R[U]&x&&(w=eo(t,{errors:k,currentLocation:oe,expectedLocation:p,distance:i,ignoreLocation:d}),w<=h)){if(h=w,m=oe,m<=p)break;A=Math.max(1,2*p-m)}}if(eo(t,{errors:k+1,currentLocation:p,expectedLocation:p,distance:i,ignoreLocation:d})>h)break;y=R}const b={isMatch:m>=0,score:Math.max(.001,w)};if(g){const k=wf(_,c);k.length?l&&(b.indices=k):b.isMatch=!1}return b}function xf(e){let t={};for(let n=0,o=e.length;n<o;n+=1){const i=e.charAt(n);t[i]=(t[i]||0)|1<<o-n-1}return t}class ca{constructor(t,{location:n=W.location,threshold:o=W.threshold,distance:i=W.distance,includeMatches:s=W.includeMatches,findAllMatches:a=W.findAllMatches,minMatchCharLength:c=W.minMatchCharLength,isCaseSensitive:l=W.isCaseSensitive,ignoreLocation:d=W.ignoreLocation}={}){if(this.options={location:n,threshold:o,distance:i,includeMatches:s,findAllMatches:a,minMatchCharLength:c,isCaseSensitive:l,ignoreLocation:d},this.pattern=l?t:t.toLowerCase(),this.chunks=[],!this.pattern.length)return;const f=(p,h)=>{this.chunks.push({pattern:p,alphabet:xf(p),startIndex:h})},u=this.pattern.length;if(u>It){let p=0;const h=u%It,m=u-h;for(;p<m;)f(this.pattern.substr(p,It),p),p+=It;if(h){const g=u-It;f(this.pattern.substr(g),g)}}else f(this.pattern,0)}searchIn(t){const{isCaseSensitive:n,includeMatches:o}=this.options;if(n||(t=t.toLowerCase()),this.pattern===t){let m={isMatch:!0,score:0};return o&&(m.indices=[[0,t.length-1]]),m}const{location:i,distance:s,threshold:a,findAllMatches:c,minMatchCharLength:l,ignoreLocation:d}=this.options;let f=[],u=0,p=!1;this.chunks.forEach(({pattern:m,alphabet:g,startIndex:_})=>{const{isMatch:T,score:y,indices:w}=Ef(t,m,g,{location:i+_,distance:s,threshold:a,findAllMatches:c,minMatchCharLength:l,includeMatches:o,ignoreLocation:d});T&&(p=!0),u+=y,T&&w&&(f=[...f,...w])});let h={isMatch:p,score:p?u/this.chunks.length:1};return p&&o&&(h.indices=f),h}}class vt{constructor(t){this.pattern=t}static isMultiMatch(t){return Bi(t,this.multiRegex)}static isSingleMatch(t){return Bi(t,this.singleRegex)}search(){}}function Bi(e,t){const n=e.match(t);return n?n[1]:null}class Sf extends vt{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const n=t===this.pattern;return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class kf extends vt{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const o=t.indexOf(this.pattern)===-1;return{isMatch:o,score:o?0:1,indices:[0,t.length-1]}}}class If extends vt{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const n=t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class Af extends vt{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const n=!t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class Cf extends vt{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const n=t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[t.length-this.pattern.length,t.length-1]}}}class Pf extends vt{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const n=!t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class la extends vt{constructor(t,{location:n=W.location,threshold:o=W.threshold,distance:i=W.distance,includeMatches:s=W.includeMatches,findAllMatches:a=W.findAllMatches,minMatchCharLength:c=W.minMatchCharLength,isCaseSensitive:l=W.isCaseSensitive,ignoreLocation:d=W.ignoreLocation}={}){super(t),this._bitapSearch=new ca(t,{location:n,threshold:o,distance:i,includeMatches:s,findAllMatches:a,minMatchCharLength:c,isCaseSensitive:l,ignoreLocation:d})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class ua extends vt{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let n=0,o;const i=[],s=this.pattern.length;for(;(o=t.indexOf(this.pattern,n))>-1;)n=o+s,i.push([o,n-1]);const a=!!i.length;return{isMatch:a,score:a?0:1,indices:i}}}const fr=[Sf,ua,If,Af,Pf,Cf,kf,la],Ui=fr.length,Lf=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Mf="|";function Rf(e,t={}){return e.split(Mf).map(n=>{let o=n.trim().split(Lf).filter(s=>s&&!!s.trim()),i=[];for(let s=0,a=o.length;s<a;s+=1){const c=o[s];let l=!1,d=-1;for(;!l&&++d<Ui;){const f=fr[d];let u=f.isMultiMatch(c);u&&(i.push(new f(u,t)),l=!0)}if(!l)for(d=-1;++d<Ui;){const f=fr[d];let u=f.isSingleMatch(c);if(u){i.push(new f(u,t));break}}}return i})}const Of=new Set([la.type,ua.type]);class Df{constructor(t,{isCaseSensitive:n=W.isCaseSensitive,includeMatches:o=W.includeMatches,minMatchCharLength:i=W.minMatchCharLength,ignoreLocation:s=W.ignoreLocation,findAllMatches:a=W.findAllMatches,location:c=W.location,threshold:l=W.threshold,distance:d=W.distance}={}){this.query=null,this.options={isCaseSensitive:n,includeMatches:o,minMatchCharLength:i,findAllMatches:a,ignoreLocation:s,location:c,threshold:l,distance:d},this.pattern=n?t:t.toLowerCase(),this.query=Rf(this.pattern,this.options)}static condition(t,n){return n.useExtendedSearch}searchIn(t){const n=this.query;if(!n)return{isMatch:!1,score:1};const{includeMatches:o,isCaseSensitive:i}=this.options;t=i?t:t.toLowerCase();let s=0,a=[],c=0;for(let l=0,d=n.length;l<d;l+=1){const f=n[l];a.length=0,s=0;for(let u=0,p=f.length;u<p;u+=1){const h=f[u],{isMatch:m,indices:g,score:_}=h.search(t);if(m){if(s+=1,c+=_,o){const T=h.constructor.type;Of.has(T)?a=[...a,...g]:a.push(g)}}else{c=0,s=0,a.length=0;break}}if(s){let u={isMatch:!0,score:c/s};return o&&(u.indices=a),u}}return{isMatch:!1,score:1}}}const hr=[];function $f(...e){hr.push(...e)}function pr(e,t){for(let n=0,o=hr.length;n<o;n+=1){let i=hr[n];if(i.condition(e,t))return new i(e,t)}return new ca(e,t)}const ho={AND:"$and",OR:"$or"},mr={PATH:"$path",PATTERN:"$val"},gr=e=>!!(e[ho.AND]||e[ho.OR]),Nf=e=>!!e[mr.PATH],Ff=e=>!ct(e)&&ra(e)&&!gr(e),ji=e=>({[ho.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function da(e,t,{auto:n=!0}={}){const o=i=>{let s=Object.keys(i);const a=Nf(i);if(!a&&s.length>1&&!gr(i))return o(ji(i));if(Ff(i)){const l=a?i[mr.PATH]:s[0],d=a?i[mr.PATTERN]:i[l];if(!Qe(d))throw new Error(lf(l));const f={keyId:dr(l),pattern:d};return n&&(f.searcher=pr(d,t)),f}let c={children:[],operator:s[0]};return s.forEach(l=>{const d=i[l];ct(d)&&d.forEach(f=>{c.children.push(o(f))})}),c};return gr(e)||(e=ji(e)),o(e)}function zf(e,{ignoreFieldNorm:t=W.ignoreFieldNorm}){e.forEach(n=>{let o=1;n.matches.forEach(({key:i,norm:s,score:a})=>{const c=i?i.weight:null;o*=Math.pow(a===0&&c?Number.EPSILON:a,(c||1)*(t?1:s))}),n.score=o})}function Vf(e,t){const n=e.matches;t.matches=[],Ke(n)&&n.forEach(o=>{if(!Ke(o.indices)||!o.indices.length)return;const{indices:i,value:s}=o;let a={indices:i,value:s};o.key&&(a.key=o.key.src),o.idx>-1&&(a.refIndex=o.idx),t.matches.push(a)})}function Hf(e,t){t.score=e.score}function Bf(e,t,{includeMatches:n=W.includeMatches,includeScore:o=W.includeScore}={}){const i=[];return n&&i.push(Vf),o&&i.push(Hf),e.map(s=>{const{idx:a}=s,c={item:t[a],refIndex:a};return i.length&&i.forEach(l=>{l(s,c)}),c})}class An{constructor(t,n={},o){this.options={...W,...n},this.options.useExtendedSearch,this._keyStore=new hf(this.options.keys),this.setCollection(t,o)}setCollection(t,n){if(this._docs=t,n&&!(n instanceof Lr))throw new Error(cf);this._myIndex=n||aa(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){Ke(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const n=[];for(let o=0,i=this._docs.length;o<i;o+=1){const s=this._docs[o];t(s,o)&&(this.removeAt(o),o-=1,i-=1,n.push(s))}return n}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:n=-1}={}){const{includeMatches:o,includeScore:i,shouldSort:s,sortFn:a,ignoreFieldNorm:c}=this.options;let l=Qe(t)?Qe(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return zf(l,{ignoreFieldNorm:c}),s&&l.sort(a),oa(n)&&n>-1&&(l=l.slice(0,n)),Bf(l,this._docs,{includeMatches:o,includeScore:i})}_searchStringList(t){const n=pr(t,this.options),{records:o}=this._myIndex,i=[];return o.forEach(({v:s,i:a,n:c})=>{if(!Ke(s))return;const{isMatch:l,score:d,indices:f}=n.searchIn(s);l&&i.push({item:s,idx:a,matches:[{score:d,value:s,norm:c,indices:f}]})}),i}_searchLogical(t){const n=da(t,this.options),o=(c,l,d)=>{if(!c.children){const{keyId:u,searcher:p}=c,h=this._findMatches({key:this._keyStore.get(u),value:this._myIndex.getValueForItemAtKeyId(l,u),searcher:p});return h&&h.length?[{idx:d,item:l,matches:h}]:[]}const f=[];for(let u=0,p=c.children.length;u<p;u+=1){const h=c.children[u],m=o(h,l,d);if(m.length)f.push(...m);else if(c.operator===ho.AND)return[]}return f},i=this._myIndex.records,s={},a=[];return i.forEach(({$:c,i:l})=>{if(Ke(c)){let d=o(n,c,l);d.length&&(s[l]||(s[l]={idx:l,item:c,matches:[]},a.push(s[l])),d.forEach(({matches:f})=>{s[l].matches.push(...f)}))}}),a}_searchObjectList(t){const n=pr(t,this.options),{keys:o,records:i}=this._myIndex,s=[];return i.forEach(({$:a,i:c})=>{if(!Ke(a))return;let l=[];o.forEach((d,f)=>{l.push(...this._findMatches({key:d,value:a[f],searcher:n}))}),l.length&&s.push({idx:c,item:a,matches:l})}),s}_findMatches({key:t,value:n,searcher:o}){if(!Ke(n))return[];let i=[];if(ct(n))n.forEach(({v:s,i:a,n:c})=>{if(!Ke(s))return;const{isMatch:l,score:d,indices:f}=o.searchIn(s);l&&i.push({score:d,key:t,value:s,idx:a,norm:c,indices:f})});else{const{v:s,n:a}=n,{isMatch:c,score:l,indices:d}=o.searchIn(s);c&&i.push({score:l,key:t,value:s,norm:a,indices:d})}return i}}An.version="7.0.0";An.createIndex=aa;An.parseIndex=Tf;An.config=W;An.parseQuery=da;$f(Df);export{ph as $,st as A,hh as B,nh as C,mn as D,qt as E,Ii as F,rr as G,Cr as H,M as I,lr as J,ir as K,Gt as L,Qo as M,gt as N,Pr as O,ro as P,id as Q,at as R,tl as S,Mu as T,Gs as U,Zs as V,_s as W,ls as X,rd as Y,ih as Z,qs as _,Ut as a,jo as a0,ar as a1,Xf as a2,Gc as a3,Qf as a4,An as a5,vu as a6,oc as a7,os as a8,uc as a9,_n as aa,rc as b,ys as c,ke as d,li as e,an as f,Lo as g,bs as h,Zn as i,eh as j,Ps as k,ln as l,th as m,iu as n,sc as o,Jf as p,Ls as q,rt as r,Re as s,ml as t,Wf as u,Sn as v,Gn as w,_o as x,oh as y,rh as z};
//# sourceMappingURL=fuse-Iwa_1AAn.js.map