phanpy-cz/assets/fuse-uYeGZ3ik.js
2024-10-08 19:16:36 +02:00

182 lines
190 KiB
JavaScript

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