184 lines
199 KiB
JavaScript
184 lines
199 KiB
JavaScript
import{Y as ct,P as Ne,c as s,p as ee,j as Ae,F as B,A as _n,_ as se,Z as xn,o as It,$ as A,a0 as ca,a1 as tr,a2 as la,q as he,D as Ct,y as Pi,a3 as ua,a4 as $i,T as Oi,k as U,x as yt,a5 as lt,h as da,s as W,a6 as of,a7 as fa,a as nr,n as ha,a8 as Ri,a9 as pa,aa as Di,i as po,L as Ni,g as mo,ab as ma,ac as Re,ad as ga,ae as va,af as Hn,w as it,u as Mn,d as Ko,b as rt,I as Fi,ag as ya,ah as _a,ai as ba}from"./useTitle-TOnOofzE.js";import{e as wa}from"./tinyld-light-PxOyhYWY.js";import{m as Ea}from"./index-gNUvm9kb.js";function qr(){return qr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qr.apply(this,arguments)}var zi=["shift","alt","meta","mod","ctrl"],Ta={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 mt(e){return(Ta[e]||e).trim().toLowerCase().replace(/key|digit|numpad|arrow/,"")}function Sa(e){return zi.includes(e)}function kr(e,t){return t===void 0&&(t=","),e.split(t)}function Lr(e,t,n){t===void 0&&(t="+");var r=e.toLocaleLowerCase().split(t).map(function(a){return mt(a)}),o={alt:r.includes("alt"),ctrl:r.includes("ctrl")||r.includes("control"),shift:r.includes("shift"),meta:r.includes("meta"),mod:r.includes("mod")},i=r.filter(function(a){return!zi.includes(a)});return qr({},o,{keys:i,description:n})}(function(){typeof document<"u"&&(document.addEventListener("keydown",function(e){e.key!==void 0&&Hi([mt(e.key),mt(e.code)])}),document.addEventListener("keyup",function(e){e.key!==void 0&&Vi([mt(e.key),mt(e.code)])})),typeof window<"u"&&window.addEventListener("blur",function(){gt.clear()})})();var gt=new Set;function go(e){return Array.isArray(e)}function xa(e,t){t===void 0&&(t=",");var n=go(e)?e:e.split(t);return n.every(function(r){return gt.has(r.trim().toLowerCase())})}function Hi(e){var t=Array.isArray(e)?e:[e];gt.has("meta")&>.forEach(function(n){return!Sa(n)&>.delete(n.toLowerCase())}),t.forEach(function(n){return gt.add(n.toLowerCase())})}function Vi(e){var t=Array.isArray(e)?e:[e];e==="meta"?gt.clear():t.forEach(function(n){return gt.delete(n.toLowerCase())})}function Ma(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function ka(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function La(e){return Bi(e,["input","textarea","select"])}function Bi(e,t){var n=e.target;t===void 0&&(t=!1);var r=n&&n.tagName;return go(t)?!!(r&&t&&t.some(function(o){return o.toLowerCase()===r.toLowerCase()})):!!(r&&t&&t===!0)}function Aa(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 Ia=function(t,n,r){r===void 0&&(r=!1);var o=n.alt,i=n.meta,a=n.mod,l=n.shift,c=n.ctrl,u=n.keys,f=t.key,d=t.code,p=t.ctrlKey,m=t.metaKey,h=t.shiftKey,g=t.altKey,v=mt(d),E=f.toLowerCase();if(!(u!=null&&u.includes(v))&&!(u!=null&&u.includes(E))&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(v))return!1;if(!r){if(o===!g&&E!=="alt"||l===!h&&E!=="shift")return!1;if(a){if(!m&&!p)return!1}else if(i===!m&&E!=="meta"&&E!=="os"||c===!p&&E!=="ctrl"&&E!=="control")return!1}return u&&u.length===1&&(u.includes(E)||u.includes(v))?!0:u?xa(u):!u},Ca=ct(void 0),Pa=function(){return Ne(Ca)};function ji(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,r){return n&&ji(e[r],t[r])},!0):e===t}var $a=ct({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),Oa=function(){return Ne($a)};function Ra(e){var t=B(void 0);return ji(t.current,e)||(t.current=e),t.current}var Zo=function(t){t.stopPropagation(),t.preventDefault(),t.stopImmediatePropagation()},Da=typeof window<"u"?_n:se;function Bt(e,t,n,r){var o=B(null),i=B(!1),a=n instanceof Array?r instanceof Array?void 0:r:n,l=go(e)?e.join(a==null?void 0:a.splitKey):e,c=n instanceof Array?n:r instanceof Array?r:void 0,u=Ae(t,c??[]),f=B(u);c?f.current=u:f.current=t;var d=Ra(a),p=Oa(),m=p.enabledScopes,h=Pa();return Da(function(){if(!((d==null?void 0:d.enabled)===!1||!Aa(m,d==null?void 0:d.scopes))){var g=function(w,b){var x;if(b===void 0&&(b=!1),!(La(w)&&!Bi(w,d==null?void 0:d.enableOnFormTags))){if(o.current!==null){var L=o.current.getRootNode();if((L instanceof Document||L instanceof ShadowRoot)&&L.activeElement!==o.current&&!o.current.contains(L.activeElement)){Zo(w);return}}(x=w.target)!=null&&x.isContentEditable&&!(d!=null&&d.enableOnContentEditable)||kr(l,d==null?void 0:d.splitKey).forEach(function(O){var $,S=Lr(O,d==null?void 0:d.combinationKey);if(Ia(w,S,d==null?void 0:d.ignoreModifiers)||($=S.keys)!=null&&$.includes("*")){if(d!=null&&d.ignoreEventWhen!=null&&d.ignoreEventWhen(w)||b&&i.current)return;if(Ma(w,S,d==null?void 0:d.preventDefault),!ka(w,S,d==null?void 0:d.enabled)){Zo(w);return}f.current(w,S),b||(i.current=!0)}})}},v=function(w){w.key!==void 0&&(Hi(mt(w.code)),((d==null?void 0:d.keydown)===void 0&&(d==null?void 0:d.keyup)!==!0||d!=null&&d.keydown)&&g(w))},E=function(w){w.key!==void 0&&(Vi(mt(w.code)),i.current=!1,d!=null&&d.keyup&&g(w,!0))},_=o.current||(a==null?void 0:a.document)||document;return _.addEventListener("keyup",E),_.addEventListener("keydown",v),h&&kr(l,d==null?void 0:d.splitKey).forEach(function(T){return h.addHotkey(Lr(T,d==null?void 0:d.combinationKey,d==null?void 0:d.description))}),function(){_.removeEventListener("keyup",E),_.removeEventListener("keydown",v),h&&kr(l,d==null?void 0:d.splitKey).forEach(function(T){return h.removeHotkey(Lr(T,d==null?void 0:d.combinationKey,d==null?void 0:d.description))})}}},[l,d,m]),o}var vo={exports:{}};/*!
|
||
* Toastify js 1.12.0
|
||
* https://github.com/apvarun/toastify-js
|
||
* @license MIT licensed
|
||
*
|
||
* Copyright (C) 2018 Varun A P
|
||
*/var cf=vo.exports;(function(e){(function(t,n){e.exports?e.exports=n():t.Toastify=n()})(xn,function(t){var n=function(a){return new n.lib.init(a)},r="1.12.0";n.defaults={oldestFirst:!0,text:"Toastify is awesome!",node:void 0,duration:3e3,selector:void 0,callback:function(){},destination:void 0,newWindow:!1,close:!1,gravity:"toastify-top",positionLeft:!1,position:"",backgroundColor:"",avatar:"",className:"",stopOnFocus:!0,onClick:function(){},offset:{x:0,y:0},escapeMarkup:!0,ariaLive:"polite",style:{background:""}},n.lib=n.prototype={toastify:r,constructor:n,init:function(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 l in this.options.style)a.style[l]=this.options.style[l];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 c=document.createElement("img");c.src=this.options.avatar,c.className="toastify-avatar",this.options.position=="left"||this.options.positionLeft===!0?a.appendChild(c):a.insertAdjacentElement("afterbegin",c)}if(this.options.close===!0){var u=document.createElement("button");u.type="button",u.setAttribute("aria-label","Close"),u.className="toast-close",u.innerHTML="✖",u.addEventListener("click",(function(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 p=o("x",this.options),m=o("y",this.options),h=this.options.position=="left"?p:"-"+p,g=this.options.gravity=="toastify-top"?m:"-"+m;a.style.transform="translate("+h+","+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 l=n.defaults.oldestFirst?a.firstChild:a.lastChild;return a.insertBefore(this.toastElement,l),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},l={top:15,bottom:15},c={top:15,bottom:15},u=document.getElementsByClassName("toastify"),f,d=0;d<u.length;d++){i(u[d],"toastify-top")===!0?f="toastify-top":f="toastify-bottom";var p=u[d].offsetHeight;f=f.substr(9,f.length-1);var m=15,h=window.innerWidth>0?window.innerWidth:screen.width;h<=360?(u[d].style[f]=c[f]+"px",c[f]+=p+m):i(u[d],"toastify-left")===!0?(u[d].style[f]=a[f]+"px",a[f]+=p+m):(u[d].style[f]=l[f]+"px",l[f]+=p+m)}return this};function o(a,l){return l.offset[a]?isNaN(l.offset[a])?l.offset[a]:l.offset[a]+"px":"0px"}function i(a,l){return!a||typeof l!="string"?!1:!!(a.className&&a.className.trim().split(/\s+/gi).indexOf(l)>-1)}return n.lib.init.prototype=n.lib,n})})(vo);var Na=vo.exports;const Fa=It(Na);window._showToast=Pe;function Pe(e){typeof e=="string"&&(e={text:e});const{onClick:t,delay:n,...r}=e,o=Fa({className:`${t||e.destination?"shiny-pill":""}`,gravity:"bottom",position:"center",...r,onClick:()=>{t==null||t(o)}});return n?setTimeout(()=>{o.showToast()},n):o.showToast(),o}function lf(e,t,n,r){const o=B(e);se(()=>{o.current=e},[e,n]),se(()=>{!r||t===null||t===!1||o.current()},[r]),se(()=>{if(t===null||t===!1)return;const a=setInterval(()=>o.current(),t);return()=>clearInterval(a)},[t])}function za(e){const t=URL.parse("/compose/",window.location),{width:n,height:r}=window.screen,o=Math.max(0,(n-600)/2),i=Math.max(0,(r-450)/2),a=Math.min(n,600),l=Math.min(r,450),c=(e==null?void 0:e.uid)||Math.random(),u=window.open(t,"compose"+c,`width=${a},height=${l},left=${o},top=${i}`);return u?u.__COMPOSE__=e:alert("Looks like your browser is blocking popups."),u}const Ha=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);function Va(){if(Ha){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 Ui={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":()=>A(()=>import("./icons/arrow-left-line-_YC6-XGG.js"),[],import.meta.url),"arrow-right":()=>A(()=>import("./icons/arrow-right-line-PypiEqpu.js"),[],import.meta.url),"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:()=>A(()=>import("./icons/chat-3-line-F0xcdpXY.js"),[],import.meta.url),comment2:()=>A(()=>import("./icons/comment-2-line-xEXuT-Ip.js"),[],import.meta.url),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:()=>A(()=>import("./icons/external-link-line-8nOOkmFu.js"),[],import.meta.url),popout:()=>A(()=>import("./icons/external-link-line-8nOOkmFu.js"),[],import.meta.url),popin:[()=>A(()=>import("./icons/external-link-line-8nOOkmFu.js"),[],import.meta.url),"180deg"],plus:()=>A(()=>import("./icons/add-circle-line--O-MfyNy.js"),[],import.meta.url),"chevron-left":()=>A(()=>import("./icons/left-line-Jck0yVmC.js"),[],import.meta.url),"chevron-right":()=>A(()=>import("./icons/right-line-7VBoqLdz.js"),[],import.meta.url),"chevron-down":()=>A(()=>import("./icons/down-line-9PeS5YhF.js"),[],import.meta.url),reply:[()=>A(()=>import("./icons/share-forward-line-4jL-2Q4u.js"),[],import.meta.url),"180deg","horizontal"],thread:()=>A(()=>import("./icons/route-line-2YYy3958.js"),[],import.meta.url),group:()=>A(()=>import("./icons/group-line-JvhJklhQ.js"),[],import.meta.url),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:()=>A(()=>import("./icons/list-check-line-qNqx9Mm4.js"),[],import.meta.url),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:()=>A(()=>import("./icons/exit-line-l-1uUgI7.js"),[],import.meta.url),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:()=>A(()=>import("./icons/volume-mute-line-WthBoXru.js"),[],import.meta.url),unmute:()=>A(()=>import("./icons/volume-line-PZujbN8h.js"),[],import.meta.url),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:()=>A(()=>import("./icons/layout-4-line-FOdnyEcZ.js"),[],import.meta.url),layout5:()=>A(()=>import("./icons/layout-5-line-9Kks7dle.js"),[],import.meta.url),announce:()=>A(()=>import("./icons/announcement-line-MSlAmDH1.js"),[],import.meta.url),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:()=>A(()=>import("./icons/clipboard-line-9F_Yeo71.js"),[],import.meta.url),"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:()=>A(()=>import("./icons/calendar-month-line-VoXZVWAe.js"),[],import.meta.url),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:()=>A(()=>import("./icons/history-2-line-3yIVzoWo.js"),[],import.meta.url),document:()=>A(()=>import("./icons/document-line--D6ooZg1.js"),[],import.meta.url),"arrows-right":()=>A(()=>import("./icons/arrows-right-line-HF4HILdT.js"),[],import.meta.url),code:()=>A(()=>import("./icons/code-line-h4RWLaak.js"),[],import.meta.url),copy:()=>A(()=>import("./icons/copy-2-line-mPSDKieb.js"),[],import.meta.url),quote:()=>A(()=>import("./icons/quote-left-line-NQzeELMO.js"),[],import.meta.url),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)},Ba={s:12,m:16,l:20,xl:24,xxl:32},qo={},ja=ca(function({width:e,height:t,body:n,rotate:r,flip:o}){return s("svg",{viewBox:`0 0 ${e} ${t}`,dangerouslySetInnerHTML:{__html:n},style:{transform:`${r?`rotate(${r})`:""} ${o?"scaleX(-1)":""}`}})},{isShallowEqual:!0,maxSize:Object.keys(Ui).length,matchesArg:(e,t)=>e.icon===t.icon&&e.body===t.body});function H({icon:e,size:t="m",alt:n,title:r,class:o="",style:i={}}){if(!e)return null;const a=Ba[t];let l=Ui[e];if(!l)return null;let c,u;Array.isArray(l)&&([l,c,u]=l);const[f,d]=ee(qo[e]),p=B(e);return se(()=>{f&&p.current===e||((async()=>{const m=await l();d(m.default),qo[e]=m.default})(),p.current=e)},[e]),s("span",{class:`icon ${o}`,title:r||n,style:{width:`${a}px`,height:`${a}px`,...i},children:f&&s(ja,{icon:e,width:f.width,height:f.height,body:f.body,rotate:c,flip:u})})}function Ua(e,t=[]){!e||typeof e!="function"||se(()=>{const n=new CloseWatcher;return n.addEventListener("close",e),()=>{n.destroy()}},t)}const Wa=window.CloseWatcher?Ua:()=>{},Ya=document.getElementById("modal-container");function Gr({children:e,onClose:t,onClick:n,class:r,minimized:o}){if(!e)return null;const i=B();se(()=>{let u=setTimeout(()=>{var d;const f=(d=i.current)==null?void 0:d.querySelector('[tabindex="-1"]');f&&f.focus()},100);return()=>clearTimeout(u)},[]);const a=window.CloseWatcher,l=Bt("esc",()=>{setTimeout(()=>{t==null||t()},0)},{enabled:!a&&!!t,keydown:!1,keyup:!0},[t]);Wa(t,[t]),se(()=>{const u=document.querySelectorAll(".deck-container");if(o){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,o]);const c=s("div",{ref:u=>{var f;i.current=u,l.current=((f=u==null?void 0:u.querySelector)==null?void 0:f.call(u,'[tabindex="-1"]'))||u},className:r,onClick:u=>{n==null||n(u),u.target===u.currentTarget&&(t==null||t(u))},tabIndex:o?0:"-1",inert:o,onFocus:u=>{var f,d;try{if(u.target===u.currentTarget){const p=(f=i.current)==null?void 0:f.querySelector('[tabindex="-1"]'),m=!!p&&((d=getComputedStyle(p))==null?void 0:d.pointerEvents)!=="none";p&&m&&p.focus()}}catch{}},children:e});return tr(c,Ya)}var yo={exports:{}},Ka="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Za=Ka;var qa=Za;function Wi(){}function Yi(){}Yi.resetWarningCache=Wi;var Ga=function(){function e(r,o,i,a,l,c){if(c!==qa){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:Yi,resetWarningCache:Wi};return n.PropTypes=n,n};var uf=yo.exports;if(0)var df,ff;else yo.exports=Ga();var G=yo.exports;const _o=e=>!!e&&e[0]==="o",Xr=la||(e=>e());const Nt=(e,t,n=1e-4)=>Math.abs(e-t)<n,bn=(e,t)=>e===!0||!!(e&&e[t]),He=(e,t)=>typeof e=="function"?e(t):e,Xa="_szhsinMenu",Ja=e=>e[Xa];const Gt=(e,t)=>(t&&Object.keys(t).forEach(n=>{const r=e[n],o=t[n];typeof o=="function"&&r?e[n]=(...i)=>{o(...i),r(...i)}:e[n]=o}),e),Qa=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],r=isNaN(t[1])?n:t[1];return{top:n,right:r,bottom:isNaN(t[2])?n:t[2],left:isNaN(t[3])?r:t[3]}},Ar=e=>{for(;e;){if(e=e.parentNode,!e||e===document.body||!e.parentNode)return;const{overflow:t,overflowX:n,overflowY:r}=getComputedStyle(e);if(/auto|scroll|overlay|hidden/.test(t+r+n))return e}};function mr(e,t){return{"aria-disabled":e||void 0,tabIndex:t?0:-1}}function Go(e,t){for(let n=0;n<e.length;n++)if(e[n]===t)return n;return-1}const ec=e=>({[e?`${e}ClassName`:"className"]:G.oneOfType([G.string,G.func])}),tc={className:G.string,...ec("menu"),arrowProps:G.object,focusProps:G.object,menuStyle:G.object,arrow:G.bool,setDownOverflow:G.bool,gap:G.number,shift:G.number,align:G.oneOf(["start","center","end"]),direction:G.oneOf(["left","right","top","bottom"]),position:G.oneOf(["auto","anchor","initial"]),overflow:G.oneOf(["auto","visible","hidden"])},hf={...tc,containerProps:G.object,initialMounted:G.bool,unmountOnClose:G.bool,transition:G.oneOfType([G.bool,G.exact({open:G.bool,close:G.bool,item:G.bool})]),transitionTimeout:G.number,boundingBoxRef:G.object,boundingBoxPadding:G.string,reposition:G.oneOf(["auto","initial"]),repositionFlag:G.oneOfType([G.string,G.number]),viewScroll:G.oneOf(["auto","close","initial"]),submenuOpenDelay:G.number,submenuCloseDelay:G.number,portal:G.oneOfType([G.bool,G.exact({target:G.object,stablePosition:G.bool})]),theming:G.string,onItemClick:G.func},pf={instanceRef:G.oneOfType([G.object,G.func]),onMenuChange:G.func},Xe=({block:e,element:t,modifiers:n,className:r})=>he(()=>{const o=t?`${e}__${t}`:e;let i=o;n&&Object.keys(n).forEach(l=>{const c=n[l];c&&(i+=` ${o}--${c===!0?l:`${l}-${c}`}`)});let a=typeof r=="function"?r(n):r;return typeof a=="string"&&(a=a.trim(),a&&(i+=` ${a}`)),i},[e,t,n,r]),nc="szh-menu-container",Ge="szh-menu";const rc="arrow",bo="item",oc="divider",ic="header",sc="group",ac="submenu";const Ki=ct(),wo=ct({}),rr=ct({}),Eo=ct({}),cc=ct({}),gr=ct({}),De=Object.freeze({ENTER:"Enter",ESC:"Escape",SPACE:" ",HOME:"Home",END:"End",LEFT:"ArrowLeft",RIGHT:"ArrowRight",UP:"ArrowUp",DOWN:"ArrowDown"}),xe=Object.freeze({RESET:0,SET:1,UNSET:2,INCREASE:3,DECREASE:4,FIRST:5,LAST:6,SET_INDEX:7}),wn=Object.freeze({CLICK:"click",CANCEL:"cancel",BLUR:"blur",SCROLL:"scroll"}),Ut=Object.freeze({FIRST:"first",LAST:"last"}),lc=Object.freeze({entering:"opening",entered:"open",exiting:"closing",exited:"closed"}),Ir="absolute",To="presentation",vr="menuitem",Xo={"aria-hidden":!0,role:vr};const uc=({className:e,containerRef:t,containerProps:n,children:r,isOpen:o,theming:i,transition:a,onClose:l})=>{const c=bn(a,"item");return s("div",{...Gt({onKeyDown:({key:d})=>{switch(d){case De.ESC:He(l,{key:d,reason:wn.CANCEL});break}},onBlur:d=>{o&&!d.currentTarget.contains(d.relatedTarget)&&He(l,{reason:wn.BLUR})}},n),className:Xe({block:nc,modifiers:he(()=>({theme:i,itemTransition:c}),[i,c]),className:e}),style:{position:"absolute",...n==null?void 0:n.style},ref:t,children:r})},dc=()=>{let e,t=0;return{toggle:n=>{n?t++:t--,t=Math.max(t,0)},on:(n,r,o)=>{t?e||(e=setTimeout(()=>{e=0,r()},n)):o==null||o()},off:()=>{e&&(clearTimeout(e),e=0)}}},fc=(e,t)=>{const[n,r]=ee(),i=B({items:[],hoverIndex:-1,sorted:!1}).current,a=Ae((c,u)=>{const{items:f}=i;if(!c)i.items=[];else if(u)f.push(c);else{const d=f.indexOf(c);d>-1&&(f.splice(d,1),c.contains(document.activeElement)&&(t.current.focus(),r()))}i.hoverIndex=-1,i.sorted=!1},[i,t]),l=Ae((c,u,f)=>{const{items:d,hoverIndex:p}=i,m=()=>{if(i.sorted)return;const v=e.current.querySelectorAll(".szh-menu__item");d.sort((E,_)=>Go(v,E)-Go(v,_)),i.sorted=!0};let h=-1,g;switch(c){case xe.RESET:break;case xe.SET:g=u;break;case xe.UNSET:g=v=>v===u?void 0:v;break;case xe.FIRST:m(),h=0,g=d[h];break;case xe.LAST:m(),h=d.length-1,g=d[h];break;case xe.SET_INDEX:m(),h=f,g=d[h];break;case xe.INCREASE:m(),h=p,h<0&&(h=d.indexOf(u)),h++,h>=d.length&&(h=0),g=d[h];break;case xe.DECREASE:m(),h=p,h<0&&(h=d.indexOf(u)),h--,h<0&&(h=d.length-1),g=d[h];break;default:}g||(h=-1),r(g),i.hoverIndex=h},[e,i]);return{hoverItem:n,dispatch:l,updateItems:a}},hc=(e,t,n,r)=>{const o=t.current.getBoundingClientRect(),i=e.current.getBoundingClientRect(),a=n===window?{left:0,top:0,right:document.documentElement.clientWidth,bottom:window.innerHeight}:n.getBoundingClientRect(),l=Qa(r),c=h=>h+i.left-a.left-l.left,u=h=>h+i.left+o.width-a.right+l.right,f=h=>h+i.top-a.top-l.top,d=h=>h+i.top+o.height-a.bottom+l.bottom;return{menuRect:o,containerRect:i,getLeftOverflow:c,getRightOverflow:u,getTopOverflow:f,getBottomOverflow:d,confineHorizontally:h=>{let g=c(h);if(g<0)h-=g;else{const v=u(h);v>0&&(h-=v,g=c(h),g<0&&(h-=g))}return h},confineVertically:h=>{let g=f(h);if(g<0)h-=g;else{const v=d(h);v>0&&(h-=v,g=f(h),g<0&&(h-=g))}return h}}},pc=({arrowRef:e,menuY:t,anchorRect:n,containerRect:r,menuRect:o})=>{let i=n.top-r.top-t+n.height/2;const a=e.current.offsetHeight*1.25;return i=Math.max(a,i),i=Math.min(i,o.height-a),i},mc=({anchorRect:e,containerRect:t,menuRect:n,placeLeftorRightY:r,placeLeftX:o,placeRightX:i,getLeftOverflow:a,getRightOverflow:l,confineHorizontally:c,confineVertically:u,arrowRef:f,arrow:d,direction:p,position:m})=>{let h=p,g=r;m!=="initial"&&(g=u(g),m==="anchor"&&(g=Math.min(g,e.bottom-t.top),g=Math.max(g,e.top-t.top-n.height)));let v,E,_;return h==="left"?(v=o,m!=="initial"&&(E=a(v),E<0&&(_=l(i),(_<=0||-E>_)&&(v=i,h="right")))):(v=i,m!=="initial"&&(_=l(v),_>0&&(E=a(o),(E>=0||-E<_)&&(v=o,h="left")))),m==="auto"&&(v=c(v)),{arrowY:d?pc({menuY:g,arrowRef:f,anchorRect:e,containerRect:t,menuRect:n}):void 0,x:v,y:g,computedDirection:h}},gc=({arrowRef:e,menuX:t,anchorRect:n,containerRect:r,menuRect:o})=>{let i=n.left-r.left-t+n.width/2;const a=e.current.offsetWidth*1.25;return i=Math.max(a,i),i=Math.min(i,o.width-a),i},vc=({anchorRect:e,containerRect:t,menuRect:n,placeToporBottomX:r,placeTopY:o,placeBottomY:i,getTopOverflow:a,getBottomOverflow:l,confineHorizontally:c,confineVertically:u,arrowRef:f,arrow:d,direction:p,position:m})=>{let h=p==="top"?"top":"bottom",g=r;m!=="initial"&&(g=c(g),m==="anchor"&&(g=Math.min(g,e.right-t.left),g=Math.max(g,e.left-t.left-n.width)));let v,E,_;return h==="top"?(v=o,m!=="initial"&&(E=a(v),E<0&&(_=l(i),(_<=0||-E>_)&&(v=i,h="bottom")))):(v=i,m!=="initial"&&(_=l(v),_>0&&(E=a(o),(E>=0||-E<_)&&(v=o,h="top")))),m==="auto"&&(v=u(v)),{arrowX:d?gc({menuX:g,arrowRef:f,anchorRect:e,containerRect:t,menuRect:n}):void 0,x:g,y:v,computedDirection:h}},yc=({arrow:e,align:t,direction:n,gap:r,shift:o,position:i,anchorRect:a,arrowRef:l,positionHelpers:c})=>{const{menuRect:u,containerRect:f}=c,d=n==="left"||n==="right";let p=d?r:o,m=d?o:r;if(e){const b=l.current;d?p+=b.offsetWidth:m+=b.offsetHeight}const h=a.left-f.left-u.width-p,g=a.right-f.left+p,v=a.top-f.top-u.height-m,E=a.bottom-f.top+m;let _,T;t==="end"?(_=a.right-f.left-u.width,T=a.bottom-f.top-u.height):t==="center"?(_=a.left-f.left-(u.width-a.width)/2,T=a.top-f.top-(u.height-a.height)/2):(_=a.left-f.left,T=a.top-f.top),_+=p,T+=m;const w={...c,anchorRect:a,placeLeftX:h,placeRightX:g,placeLeftorRightY:T,placeTopY:v,placeBottomY:E,placeToporBottomX:_,arrowRef:l,arrow:e,direction:n,position:i};switch(n){case"left":case"right":return mc(w);case"top":case"bottom":default:return vc(w)}},Wt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?_n:se;function Jo(e,t){typeof e=="function"?e(t):e.current=t}const Xt=(e,t)=>he(()=>e?t?n=>{Jo(e,n),Jo(t,n)}:e:t,[e,t]),Qo=-9999,Zi=({ariaLabel:e,menuClassName:t,menuStyle:n,arrow:r,arrowProps:o={},anchorPoint:i,anchorRef:a,containerRef:l,containerProps:c,focusProps:u,externalRef:f,parentScrollingRef:d,align:p="start",direction:m="bottom",position:h="auto",overflow:g="visible",setDownOverflow:v,repositionFlag:E,captureFocus:_=!0,state:T,endTransition:w,isDisabled:b,menuItemFocus:x,gap:L=0,shift:O=0,children:$,onClose:S,...M})=>{const[V,j]=ee({x:Qo,y:Qo}),[R,I]=ee({}),[k,D]=ee(),[C,z]=ee(m),[N]=ee(dc),[P,Y]=Pi(re=>re+1,1),{transition:K,boundingBoxRef:te,boundingBoxPadding:le,rootMenuRef:Te,rootAnchorRef:pe,scrollNodesRef:_e,reposition:be,viewScroll:ie,submenuCloseDelay:ue}=Ne(gr),{submenuCtx:q,reposSubmenu:ne=E}=Ne(rr),Se=B(null),dt=B(),Z=B(),ve=B(!1),Q=B({width:0,height:0}),ae=B(()=>{}),{hoverItem:ge,dispatch:de,updateItems:oe}=fc(Se,dt),we=_o(T),bt=bn(K,"open"),Ve=bn(K,"close"),me=_e.current,Le=re=>{switch(re.key){case De.HOME:de(xe.FIRST);break;case De.END:de(xe.LAST);break;case De.UP:de(xe.DECREASE,ge);break;case De.DOWN:de(xe.INCREASE,ge);break;case De.SPACE:re.target&&re.target.className.indexOf(Ge)!==-1&&re.preventDefault();return;default:return}re.preventDefault(),re.stopPropagation()},Ie=()=>{T==="closing"&&D(),He(w)},Ce=re=>{re.stopPropagation(),N.on(ue,()=>{de(xe.RESET),dt.current.focus()})},$t=re=>{re.target===re.currentTarget&&N.off()},Ye=Ae(re=>{var Me;const Be=a?(Me=a.current)==null?void 0:Me.getBoundingClientRect():i?{left:i.x,right:i.x,top:i.y,bottom:i.y,width:0,height:0}:null;if(!Be)return;me.menu||(me.menu=(te?te.current:Ar(Te.current))||window);const Fe=hc(l,Se,me.menu,le);let{arrowX:ye,arrowY:tt,x:$e,y:ze,computedDirection:Qt}=yc({arrow:r,align:p,direction:m,gap:L,shift:O,position:h,anchorRect:Be,arrowRef:Z,positionHelpers:Fe});const{menuRect:An}=Fe;let fe=An.height;if(!re&&g!=="visible"){const{getTopOverflow:en,getBottomOverflow:_r}=Fe;let nt,tn;const Ot=Q.current.height,Tt=_r(ze);if(Tt>0||Nt(Tt,0)&&Nt(fe,Ot))nt=fe-Tt,tn=Tt;else{const ht=en(ze);(ht<0||Nt(ht,0)&&Nt(fe,Ot))&&(nt=fe+ht,tn=0-ht,nt>=0&&(ze-=ht))}nt>=0?(fe=nt,D({height:nt,overflowAmt:tn})):D()}r&&I({x:ye,y:tt}),j({x:$e,y:ze}),z(Qt),Q.current={width:An.width,height:fe}},[r,p,le,m,L,O,h,g,i,a,l,te,Te,me]);Wt(()=>{we&&(Ye(),ve.current&&Y()),ve.current=we,ae.current=Ye},[we,Ye,ne]),Wt(()=>{k&&!v&&(Se.current.scrollTop=0)},[k,v]),Wt(()=>oe,[oe]),se(()=>{let{menu:re}=me;if(!we||!re)return;if(re=re.addEventListener?re:window,!me.anchors){me.anchors=[];let ye=Ar(pe&&pe.current);for(;ye&&ye!==re;)me.anchors.push(ye),ye=Ar(ye)}let Me=ie;if(me.anchors.length&&Me==="initial"&&(Me="auto"),Me==="initial")return;const Be=()=>{Me==="auto"?Xr(()=>Ye(!0)):He(S,{reason:wn.SCROLL})},Fe=me.anchors.concat(ie!=="initial"?re:[]);return Fe.forEach(ye=>ye.addEventListener("scroll",Be)),()=>Fe.forEach(ye=>ye.removeEventListener("scroll",Be))},[pe,me,we,S,ie,Ye]);const Ln=!!k&&k.overflowAmt>0;se(()=>{if(Ln||!we||!d)return;const re=()=>Xr(Ye),Me=d.current;return Me.addEventListener("scroll",re),()=>Me.removeEventListener("scroll",re)},[we,Ln,d,Ye]),se(()=>{if(typeof ResizeObserver!="function"||be==="initial")return;const re=new ResizeObserver(([Be])=>{const{borderBoxSize:Fe,target:ye}=Be;let tt,$e;if(Fe){const{inlineSize:ze,blockSize:Qt}=Fe[0]||Fe;tt=ze,$e=Qt}else{const ze=ye.getBoundingClientRect();tt=ze.width,$e=ze.height}tt===0||$e===0||Nt(tt,Q.current.width,1)&&Nt($e,Q.current.height,1)||ua(()=>{ae.current(),Y()})}),Me=Se.current;return re.observe(Me,{box:"border-box"}),()=>re.unobserve(Me)},[be]),se(()=>{if(!we){de(xe.RESET),Ve||D();return}const{position:re,alwaysUpdate:Me}=x||{},Be=()=>{re===Ut.FIRST?de(xe.FIRST):re===Ut.LAST?de(xe.LAST):re>=-1&&de(xe.SET_INDEX,void 0,re)};if(Me)Be();else if(_){const Fe=setTimeout(()=>{const ye=Se.current;ye&&!ye.contains(document.activeElement)&&(dt.current.focus(),Be())},bt?170:100);return()=>clearTimeout(Fe)}},[we,bt,Ve,_,x,de]);const Ee=he(()=>({isParentOpen:we,submenuCtx:N,dispatch:de,updateItems:oe}),[we,N,de,oe]);let wt,Je;k&&(v?Je=k.overflowAmt:wt=k.height);const Qe=he(()=>({reposSubmenu:P,submenuCtx:N,overflow:g,overflowAmt:Je,parentMenuRef:Se,parentDir:C}),[P,N,g,Je,C]),yr=wt>=0?{maxHeight:wt,overflow:g}:void 0,ft=he(()=>({state:T,dir:C}),[T,C]),Et=he(()=>({dir:C}),[C]),et=Xe({block:Ge,element:rc,modifiers:Et,className:o.className}),Jt=s("ul",{role:"menu","aria-label":e,...mr(b),...Gt({onPointerEnter:q==null?void 0:q.off,onPointerMove:Ce,onPointerLeave:$t,onKeyDown:Le,onAnimationEnd:Ie},M),ref:Xt(f,Se),className:Xe({block:Ge,modifiers:ft,className:t}),style:{...n,...yr,margin:0,display:T==="closed"?"none":void 0,position:Ir,left:V.x,top:V.y},children:[s("li",{tabIndex:-1,style:{position:Ir,left:0,top:0,display:"block",outline:"none"},ref:dt,...Xo,...u}),r&&s("li",{...Xo,...o,className:et,style:{display:"block",position:Ir,left:R.x,top:R.y,...o.style},ref:Z}),s(rr.Provider,{value:Qe,children:s(wo.Provider,{value:Ee,children:s(Ki.Provider,{value:ge,children:He($,ft)})})})]});return c?s(uc,{...c,isOpen:we,children:Jt}):Jt},qi=Ct(function({"aria-label":t,className:n,containerProps:r,initialMounted:o,unmountOnClose:i,transition:a,transitionTimeout:l,boundingBoxRef:c,boundingBoxPadding:u,reposition:f="auto",submenuOpenDelay:d=300,submenuCloseDelay:p=150,viewScroll:m="initial",portal:h,theming:g,onItemClick:v,...E},_){const T=B(null),w=B({}),{anchorRef:b,state:x,onClose:L}=E,O=he(()=>({initialMounted:o,unmountOnClose:i,transition:a,transitionTimeout:l,boundingBoxRef:c,boundingBoxPadding:u,rootMenuRef:T,rootAnchorRef:b,scrollNodesRef:w,reposition:f,viewScroll:m,submenuOpenDelay:d,submenuCloseDelay:p}),[o,i,a,l,b,c,u,f,m,d,p]),$=he(()=>({handleClick(M,V){M.stopPropagation||He(v,M);let j=M.keepOpen;j===void 0&&(j=V&&M.key===De.SPACE),j||He(L,{value:M.value,key:M.key,reason:wn.CLICK})},handleClose(M){He(L,{key:M,reason:wn.CLICK})}}),[v,L]);if(!x)return null;const S=s(gr.Provider,{value:O,children:s(Eo.Provider,{value:$,children:s(Zi,{...E,ariaLabel:t||"Menu",externalRef:_,containerRef:T,containerProps:{className:n,containerRef:T,containerProps:r,theming:g,transition:a,onClose:L}})})});return h===!0&&typeof document<"u"?tr(S,document.body):h?h.target?tr(S,h.target):h.stablePosition?null:S:S}),Jr=0,Qr=1,or=2,ir=3,sr=4,_c=5,Gi=6,bc=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],Xi=e=>({_s:e,status:bc[e],isEnter:e<ir,isMounted:e!==Gi,isResolved:e===or||e>sr}),eo=e=>e?Gi:_c,wc=(e,t)=>{switch(e){case Qr:case Jr:return or;case sr:case ir:return eo(t)}},Ec=e=>typeof e=="object"?[e.enter,e.exit]:[e,e],ei=(e,t,n,r,o)=>{clearTimeout(r.current);const i=Xi(e);t(i),n.current=i,o&&o({current:i})},Tc=({enter:e=!0,exit:t=!0,preEnter:n,preExit:r,timeout:o,initialEntered:i,mountOnEnter:a,unmountOnExit:l,onStateChange:c}={})=>{const[u,f]=ee(()=>Xi(i?or:eo(a))),d=B(u),p=B(),[m,h]=Ec(o),g=Ae(()=>{const E=wc(d.current._s,l);E&&ei(E,f,d,p,c)},[c,l]),v=Ae(E=>{const _=w=>{switch(ei(w,f,d,p,c),w){case Qr:m>=0&&(p.current=setTimeout(g,m));break;case sr:h>=0&&(p.current=setTimeout(g,h));break;case Jr:case ir:p.current=setTimeout(()=>_(w+1),0);break}},T=d.current.isEnter;typeof E!="boolean"&&(E=!T),E?!T&&_(e?n?Jr:Qr:or):T&&_(t?r?ir:sr:eo(l))},[g,c,e,t,n,r,m,h,l]);return se(()=>()=>clearTimeout(p.current),[]),[u,v,g]};const Sc=({initialOpen:e,initialMounted:t,unmountOnClose:n,transition:r,transitionTimeout:o=500}={})=>{const[{status:i},a,l]=Tc({initialEntered:e,mountOnEnter:!t,unmountOnExit:n,timeout:o,enter:bn(r,"open"),exit:bn(r,"close")});return[{state:lc[i],endTransition:l},a]},Ji=e=>{const[t,n]=Sc(e),[r,o]=ee(),i=(a,l)=>{o({position:a,alwaysUpdate:l}),n(!0)};return[{menuItemFocus:r,...t},n,i]},xc=(e,t)=>{const[n]=ee({});return{onMouseDown:()=>{n.v=e&&e!=="closed"},onClick:r=>n.v?n.v=!1:t(!0,r)}},Qi=(e,t)=>{const n=B(t);se(()=>{n.current!==t&&He(e,{open:t}),n.current=t},[e,t])},Mc=Ct(function({"aria-label":t,captureFocus:n,initialOpen:r,menuButton:o,instanceRef:i,onMenuChange:a,...l},c){const[u,f,d]=Ji(l),{state:p}=u,m=_o(p),h=B(null),g=xc(p,(b,x)=>d(x.detail?void 0:Ut.FIRST)),v=Ae(b=>{f(!1),b.key&&h.current.focus()},[f]),E=b=>{switch(b.key){case De.UP:d(Ut.LAST);break;case De.DOWN:d(Ut.FIRST);break;default:return}b.preventDefault()},_=He(o,{open:m});if(!_||!_.type)throw new Error("Menu requires a menuButton prop.");const T={ref:Xt(_.ref,h),...Gt({onKeyDown:E,...g},_.props)};Ja(_.type)==="MenuButton"&&(T.isOpen=m);const w=$i(_,T);return Qi(a,m),Oi(i,()=>({openMenu:d,closeMenu:()=>f(!1)})),s(U,{children:[w,s(qi,{...l,...u,"aria-label":t||(typeof _.props.children=="string"?_.props.children:"Menu"),anchorRef:h,ref:c,onClose:v})]})}),So=(e,t)=>{const n=yt(t),r=Ct((o,i)=>{const a=B(null);return s(n,{...o,itemRef:a,externalRef:i,isHovering:Ne(Ki)===a.current})});return r.displayName=`WithHovering(${e})`,r},es=(e,t,n)=>{Wt(()=>{if(e)return;const r=t.current;return n(r,!0),()=>{n(r)}},[e,t,n])},kc=So("SubMenu",function({"aria-label":t,className:n,disabled:r,direction:o,label:i,openTrigger:a,onMenuChange:l,isHovering:c,instanceRef:u,itemRef:f,captureFocus:d,repositionFlag:p,itemProps:m={},...h}){const g=Ne(gr),{rootMenuRef:v,submenuOpenDelay:E,submenuCloseDelay:_}=g,{parentMenuRef:T,parentDir:w,overflow:b}=Ne(rr),{isParentOpen:x,submenuCtx:L,dispatch:O,updateItems:$}=Ne(wo),S=b!=="visible",[M,V,j]=Ji(g),{state:R}=M,I=!!r,k=_o(R),D=B(null),[C]=ee({v:0}),z=()=>{L.off(),C.v&&(clearTimeout(C.v),C.v=0)},N=(...ne)=>{z(),P(),!I&&j(...ne)},P=()=>!c&&!I&&O(xe.SET,f.current),Y=ne=>{P(),a||(C.v=setTimeout(()=>Xr(N),Math.max(ne,0)))},K=ne=>{I||(ne.stopPropagation(),!(C.v||k)&&L.on(_,()=>Y(E-_),()=>Y(E)))},te=()=>{z(),k||O(xe.UNSET,f.current)},le=ne=>{if(c)switch(ne.key){case De.ENTER:ne.preventDefault();case De.SPACE:case De.RIGHT:a!=="none"&&N(Ut.FIRST)}},Te=ne=>{let Se=!1;switch(ne.key){case De.LEFT:k&&(f.current.focus(),V(!1),Se=!0);break;case De.RIGHT:k||(Se=!0);break}Se&&(ne.preventDefault(),ne.stopPropagation())};es(I,f,$),Qi(l,k),se(()=>L.toggle(k),[L,k]),se(()=>()=>clearTimeout(C.v),[C]),se(()=>{c&&x?f.current.focus():V(!1)},[c,x,V,f]),Oi(u,()=>({openMenu:(...ne)=>{x&&N(...ne)},closeMenu:()=>{k&&(f.current.focus(),V(!1))}}));const pe=he(()=>({open:k,hover:c,disabled:I,submenu:!0}),[k,c,I]),{ref:_e,className:be,...ie}=m,ue=Gt({onPointerEnter:L.off,onPointerMove:K,onPointerLeave:te,onKeyDown:le,onClick:()=>a!=="none"&&N()},ie),q=()=>{const ne=s(Zi,{...h,...M,ariaLabel:t||(typeof i=="string"?i:"Submenu"),anchorRef:f,containerRef:S?v:D,direction:o||(w==="right"||w==="left"?w:"right"),parentScrollingRef:S&&T,isDisabled:I}),Se=v.current;return S&&Se?tr(ne,Se):ne};return s("li",{className:Xe({block:Ge,element:ac,className:n}),style:{position:"relative"},role:To,ref:D,onKeyDown:Te,children:[s("div",{role:vr,"aria-haspopup":!0,"aria-expanded":k,...mr(I,c),...ue,ref:Xt(_e,f),className:Xe({block:Ge,element:bo,modifiers:pe,className:be}),children:he(()=>He(i,pe),[i,pe])}),R&&q()]})}),ts=(e,t,n,r)=>{const{submenuCloseDelay:o}=Ne(gr),{isParentOpen:i,submenuCtx:a,dispatch:l,updateItems:c}=Ne(wo),u=()=>{!n&&!r&&l(xe.SET,e.current)},f=()=>{!r&&l(xe.UNSET,e.current)},d=h=>{n&&!h.currentTarget.contains(h.relatedTarget)&&f()},p=h=>{r||(h.stopPropagation(),a.on(o,u,u))},m=(h,g)=>{a.off(),!g&&f()};return es(r,e,c),se(()=>{n&&i&&t.current&&t.current.focus()},[t,n,i]),{setHover:u,onBlur:d,onPointerMove:p,onPointerLeave:m}},ke=So("MenuItem",function({className:t,value:n,href:r,type:o,checked:i,disabled:a,children:l,onClick:c,isHovering:u,itemRef:f,externalRef:d,...p}){const m=!!a,{setHover:h,...g}=ts(f,f,u,m),v=Ne(Eo),E=Ne(cc),_=o==="radio",T=o==="checkbox",w=!!r&&!m&&!_&&!T,b=_?E.value===n:T?!!i:!1,x=M=>{if(m){M.stopPropagation(),M.preventDefault();return}const V={value:n,syntheticEvent:M};M.key!==void 0&&(V.key=M.key),T&&(V.checked=!b),_&&(V.name=E.name),He(c,V),_&&He(E.onRadioChange,V),v.handleClick(V,T||_)},L=M=>{if(u)switch(M.key){case De.ENTER:M.preventDefault();case De.SPACE:w?f.current.click():x(M)}},O=he(()=>({type:o,disabled:m,hover:u,checked:b,anchor:w}),[o,m,u,b,w]),$=Gt({...g,onPointerDown:h,onKeyDown:L,onClick:x},p),S={role:_?"menuitemradio":T?"menuitemcheckbox":vr,"aria-checked":_||T?b:void 0,...mr(m,u),...$,ref:Xt(d,f),className:Xe({block:Ge,element:bo,modifiers:O,className:t}),children:he(()=>He(l,O),[l,O])};return w?s("li",{role:To,children:s("a",{href:r,...S})}):s("li",{...S})}),Lc=So("FocusableItem",function({className:t,disabled:n,children:r,isHovering:o,itemRef:i,externalRef:a,...l}){const c=!!n,u=B(null),{setHover:f,onPointerLeave:d,...p}=ts(i,u,o,c),{handleClose:m}=Ne(Eo),h=he(()=>({disabled:c,hover:o,focusable:!0}),[c,o]),g=he(()=>He(r,{...h,ref:u,closeMenu:m}),[r,h,m]),v=Gt({...p,onPointerLeave:E=>d(E,!0),onFocus:f},l);return s("li",{role:vr,...mr(c),...v,ref:Xt(a,i),className:Xe({block:Ge,element:bo,modifiers:h,className:t}),children:g})}),an=yt(Ct(function({className:t,...n},r){return s("li",{role:"separator",...n,ref:r,className:Xe({block:Ge,element:oc,className:t})})})),mf=yt(Ct(function({className:t,...n},r){return s("li",{role:To,...n,ref:r,className:Xe({block:Ge,element:ic,className:t})})})),gf=Ct(function({className:t,style:n,takeOverflow:r,...o},i){const a=B(null),[l,c]=ee(),{overflow:u,overflowAmt:f}=Ne(rr);return Wt(()=>{let d;r&&f>=0&&(d=a.current.getBoundingClientRect().height-f,d<0&&(d=0)),c(d>=0?{maxHeight:d,overflow:u}:void 0)},[r,u,f]),Wt(()=>{l&&(a.current.scrollTop=0)},[l]),s("div",{...o,ref:Xt(i,a),className:Xe({block:Ge,element:sc,className:t}),style:{...n,...l}})});const ti={s:16,m:20,l:24,xl:32,xxl:50,xxxl:64},cn={},dn=window.OffscreenCanvas?new OffscreenCanvas(1,1):document.createElement("canvas"),Xn=dn.getContext("2d",{willReadFrequently:!0});Xn.imageSmoothingEnabled=!1;function Ac({url:e,size:t,alt:n="",squircle:r,...o}){t=ti[t]||t||ti.m;const i=B(),a=/missing\.png$/.test(e);return s("span",{ref:i,class:`avatar ${r?"squircle":""} ${cn[e]?"has-alpha":""}`,style:{width:t,height:t},title:n,...o,children:!!e&&s("img",{src:e,width:t,height:t,alt:n,loading:"lazy",decoding:"async",crossOrigin:cn[e]===void 0&&!a?"anonymous":void 0,onError:l=>{l.target.crossOrigin&&(l.target.crossOrigin=null,l.target.src=e)},onLoad:l=>{i.current&&(i.current.dataset.loaded=!0),cn[e]===void 0&&(a||setTimeout(()=>{try{const{width:c,height:u}=l.target;dn.width!==c&&(dn.width=c),dn.height!==u&&(dn.height=u),Xn.drawImage(l.target,0,0);const f=Xn.getImageData(0,0,c,u),d=f.data.filter((p,m)=>m%4===3&&p<=128).length/(f.data.length/4)>.1;d&&i.current.classList.add("has-alpha"),cn[e]=d,Xn.clearRect(0,0,c,u)}catch{cn[e]=!1}},1))}})})}const st=lt(Ac),Kt=Ct((e,t)=>{var l;let n;try{n=da()}catch{}let r=(location.hash||"").replace(/^#/,"").trim();r===""&&(r="/");const{to:o,...i}=e;if(r&&r!=="/"&&r.includes("?")){const c=URL.parse(r,location.origin);if((l=c==null?void 0:c.searchParams)!=null&&l.size){const u=Array.from(c.searchParams.entries()).map(([f,d])=>`${f}=${encodeURIComponent(d)}`).join("&");r=c.pathname+"?"+u}}const a=r===o||decodeURIComponent(r)===o;return s("a",{ref:t,href:`#${o}`,...i,class:`${e.class||""} ${a?"is-active":""}`,onClick:c=>{var u,f,d;(f=(u=c.currentTarget)==null?void 0:u.parentNode)!=null&&f.closest("a")&&c.stopPropagation(),n&&(W.prevLocation=n),(d=e.onClick)==null||d.call(e,c)}})});function Ic(){const[e,t]=ee({width:null,height:null});return _n(()=>{const n=()=>{t({width:window.innerWidth,height:window.innerHeight})};return n(),window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)}},[]),e}const Cc=document.documentElement,Vn=getComputedStyle(Cc),Pc=8;let ns=[0,0,0,0];function rs(){const e=Vn.getPropertyValue("--sai-top"),t=Vn.getPropertyValue("--sai-right"),n=Vn.getPropertyValue("--sai-bottom"),r=Vn.getPropertyValue("--sai-left");ns=[Math.max(0,parseInt(e,10)),Math.max(0,parseInt(t,10)),Math.max(0,parseInt(n,10)),Math.max(0,parseInt(r,10))]}requestAnimationFrame(rs);function os(e=[]){return ns.map((n,r)=>(n||Pc)+(e[r]||0)).join(" ")}CSS.supports("top: env(safe-area-inset-top)")&&window.addEventListener("resize",rs,{passive:!0});function is(e){const{containerProps:t,instanceRef:n}=e,r=Ic(),o=n!=null&&n.current?n:B();return s(Mc,{boundingBoxPadding:os(),repositionFlag:`${r.width}x${r.height}`,unmountOnClose:!0,...e,instanceRef:o,containerProps:{onClick:i=>{var a,l,c;i.target===i.currentTarget&&((l=(a=o.current)==null?void 0:a.closeMenu)==null||l.call(a)),(c=t==null?void 0:t.onClick)==null||c.call(t,i)},...t}})}function $c(e){const t=B();return s(kc,{...e,instanceRef:t,itemProps:{onPointerMove:n=>{var r,o;n.pointerType==="touch"&&((o=(r=t.current)==null?void 0:r.openMenu)==null||o.call(r))},onPointerLeave:n=>{var r,o;n.pointerType==="touch"&&((o=(r=t.current)==null?void 0:r.openMenu)==null||o.call(r))}}})}function Cr({subMenu:e=!1,confirm:t=!0,confirmLabel:n,menuItemClassName:r,menuFooter:o,menuExtras:i,...a}){const{children:l,onClick:c,...u}=a;return t?s(e?$c:is,{openTrigger:"clickOnly",direction:"bottom",overflow:"auto",gap:-8,shift:8,menuClassName:"menu-emphasized",...u,menuButton:e?void 0:l,label:e?l:void 0,children:[s(ke,{className:r,onClick:c,children:n}),i,o]}):e?s(ke,{...a}):c?fa(l,{onClick:c}):l}function to({staticUrl:e,alt:t,url:n}){return s("picture",{children:[e&&s("source",{srcset:e,media:"(prefers-reduced-motion: reduce)"}),s("img",{src:n,alt:t,class:"shortcode-emoji emoji",width:"16",height:"16",loading:"lazy",decoding:"async"},t||n)]})}function Oc({text:e,emojis:t}){if(!e)return"";if(!(t!=null&&t.length)||e.indexOf(":")===-1)return e;const n=new RegExp(`:(${t.map(o=>o.shortcode).join("|")}):`,"g");return e.split(n).map(o=>{const i=t.find(a=>a.shortcode===o);if(i){const{url:a,staticUrl:l}=i;return s(to,{staticUrl:l,alt:o,url:a})}return o})}const Zt=yt(Oc,(e,t)=>{var n,r;return e.text===t.text&&((n=e.emojis)==null?void 0:n.length)===((r=t.emojis)==null?void 0:r.length)}),Rc=new Intl.Collator("en",{sensitivity:"base"});function Dc({account:e,instance:t,showAvatar:n,showAcct:r,short:o,external:i,onClick:a}){const{acct:l,avatar:c,avatarStatic:u,id:f,url:d,displayName:p,emojis:m,bot:h,username:g}=e,[v,E,_]=l.match(/([^@]+)(@.+)/i)||[,l];t||(t=nr().instance);const T=g.toLowerCase().trim(),w=(p||"").toLowerCase().trim(),b=w.replace(/(\:(\w|\+|\-)+\:)(?=|[\!\.\?]|$)/g,"").replace(/\s+/g,""),x=b.replace(/[^a-z0-9@\.]/gi,""),L=!o&&(T===w||T===b||T===x||Rc.compare(T,b)===0)||x===l.toLowerCase();return s("a",{class:`name-text ${r?"show-acct":""} ${o?"short":""}`,href:d,target:i?"_blank":null,title:p?`${p} (${_?"":"@"}${l})`:`${_?"":"@"}${l}`,onClick:O=>{if(!i&&!O.shiftKey){if(O.preventDefault(),O.stopPropagation(),a)return a(O);if(O.metaKey||O.ctrlKey||O.shiftKey||O.which===2){const $=`#/${t}/a/${f}`;window.open($,"_blank");return}W.showAccount={account:e,instance:t}}},children:[n&&s(U,{children:[s(st,{url:u||c,squircle:h})," "]}),p&&!o?s(U,{children:[s("b",{children:s(Zt,{text:p,emojis:m})}),!r&&!L&&s(U,{children:[" ",s("i",{children:["@",g]})]})]}):o?s("i",{children:g}):s("b",{children:g}),r&&s(U,{children:[s("br",{}),s("i",{children:[_?"":"@",E,!!_&&s("span",{class:"ib",children:_})]})]})]})}const fn=yt(Dc,(e,t)=>{const{account:n}=e,{account:r}=t;return(n==null?void 0:n.acct)===(r==null?void 0:r.acct)});var ar={exports:{}},vf=ar.exports;(function(e,t){(function(n,r){e.exports=r()})(xn,function(){"use strict";var n=1e3,r=6e4,o=36e5,i="millisecond",a="second",l="minute",c="hour",u="day",f="week",d="month",p="quarter",m="year",h="date",g="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,E=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,_={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(R){var I=["th","st","nd","rd"],k=R%100;return"["+R+(I[(k-20)%10]||I[k]||I[0])+"]"}},T=function(R,I,k){var D=String(R);return!D||D.length>=I?R:""+Array(I+1-D.length).join(k)+R},w={s:T,z:function(R){var I=-R.utcOffset(),k=Math.abs(I),D=Math.floor(k/60),C=k%60;return(I<=0?"+":"-")+T(D,2,"0")+":"+T(C,2,"0")},m:function R(I,k){if(I.date()<k.date())return-R(k,I);var D=12*(k.year()-I.year())+(k.month()-I.month()),C=I.clone().add(D,d),z=k-C<0,N=I.clone().add(D+(z?-1:1),d);return+(-(D+(k-C)/(z?C-N:N-C))||0)},a:function(R){return R<0?Math.ceil(R)||0:Math.floor(R)},p:function(R){return{M:d,y:m,w:f,d:u,D:h,h:c,m:l,s:a,ms:i,Q:p}[R]||String(R||"").toLowerCase().replace(/s$/,"")},u:function(R){return R===void 0}},b="en",x={};x[b]=_;var L="$isDayjsObject",O=function(R){return R instanceof V||!(!R||!R[L])},$=function R(I,k,D){var C;if(!I)return b;if(typeof I=="string"){var z=I.toLowerCase();x[z]&&(C=z),k&&(x[z]=k,C=z);var N=I.split("-");if(!C&&N.length>1)return R(N[0])}else{var P=I.name;x[P]=I,C=P}return!D&&C&&(b=C),C||!D&&b},S=function(R,I){if(O(R))return R.clone();var k=typeof I=="object"?I:{};return k.date=R,k.args=arguments,new V(k)},M=w;M.l=$,M.i=O,M.w=function(R,I){return S(R,{locale:I.$L,utc:I.$u,x:I.$x,$offset:I.$offset})};var V=function(){function R(k){this.$L=$(k.locale,null,!0),this.parse(k),this.$x=this.$x||k.x||{},this[L]=!0}var I=R.prototype;return I.parse=function(k){this.$d=function(D){var C=D.date,z=D.utc;if(C===null)return new Date(NaN);if(M.u(C))return new Date;if(C instanceof Date)return new Date(C);if(typeof C=="string"&&!/Z$/i.test(C)){var N=C.match(v);if(N){var P=N[2]-1||0,Y=(N[7]||"0").substring(0,3);return z?new Date(Date.UTC(N[1],P,N[3]||1,N[4]||0,N[5]||0,N[6]||0,Y)):new Date(N[1],P,N[3]||1,N[4]||0,N[5]||0,N[6]||0,Y)}}return new Date(C)}(k),this.init()},I.init=function(){var k=this.$d;this.$y=k.getFullYear(),this.$M=k.getMonth(),this.$D=k.getDate(),this.$W=k.getDay(),this.$H=k.getHours(),this.$m=k.getMinutes(),this.$s=k.getSeconds(),this.$ms=k.getMilliseconds()},I.$utils=function(){return M},I.isValid=function(){return this.$d.toString()!==g},I.isSame=function(k,D){var C=S(k);return this.startOf(D)<=C&&C<=this.endOf(D)},I.isAfter=function(k,D){return S(k)<this.startOf(D)},I.isBefore=function(k,D){return this.endOf(D)<S(k)},I.$g=function(k,D,C){return M.u(k)?this[D]:this.set(C,k)},I.unix=function(){return Math.floor(this.valueOf()/1e3)},I.valueOf=function(){return this.$d.getTime()},I.startOf=function(k,D){var C=this,z=!!M.u(D)||D,N=M.p(k),P=function(be,ie){var ue=M.w(C.$u?Date.UTC(C.$y,ie,be):new Date(C.$y,ie,be),C);return z?ue:ue.endOf(u)},Y=function(be,ie){return M.w(C.toDate()[be].apply(C.toDate("s"),(z?[0,0,0,0]:[23,59,59,999]).slice(ie)),C)},K=this.$W,te=this.$M,le=this.$D,Te="set"+(this.$u?"UTC":"");switch(N){case m:return z?P(1,0):P(31,11);case d:return z?P(1,te):P(0,te+1);case f:var pe=this.$locale().weekStart||0,_e=(K<pe?K+7:K)-pe;return P(z?le-_e:le+(6-_e),te);case u:case h:return Y(Te+"Hours",0);case c:return Y(Te+"Minutes",1);case l:return Y(Te+"Seconds",2);case a:return Y(Te+"Milliseconds",3);default:return this.clone()}},I.endOf=function(k){return this.startOf(k,!1)},I.$set=function(k,D){var C,z=M.p(k),N="set"+(this.$u?"UTC":""),P=(C={},C[u]=N+"Date",C[h]=N+"Date",C[d]=N+"Month",C[m]=N+"FullYear",C[c]=N+"Hours",C[l]=N+"Minutes",C[a]=N+"Seconds",C[i]=N+"Milliseconds",C)[z],Y=z===u?this.$D+(D-this.$W):D;if(z===d||z===m){var K=this.clone().set(h,1);K.$d[P](Y),K.init(),this.$d=K.set(h,Math.min(this.$D,K.daysInMonth())).$d}else P&&this.$d[P](Y);return this.init(),this},I.set=function(k,D){return this.clone().$set(k,D)},I.get=function(k){return this[M.p(k)]()},I.add=function(k,D){var C,z=this;k=Number(k);var N=M.p(D),P=function(te){var le=S(z);return M.w(le.date(le.date()+Math.round(te*k)),z)};if(N===d)return this.set(d,this.$M+k);if(N===m)return this.set(m,this.$y+k);if(N===u)return P(1);if(N===f)return P(7);var Y=(C={},C[l]=r,C[c]=o,C[a]=n,C)[N]||1,K=this.$d.getTime()+k*Y;return M.w(K,this)},I.subtract=function(k,D){return this.add(-1*k,D)},I.format=function(k){var D=this,C=this.$locale();if(!this.isValid())return C.invalidDate||g;var z=k||"YYYY-MM-DDTHH:mm:ssZ",N=M.z(this),P=this.$H,Y=this.$m,K=this.$M,te=C.weekdays,le=C.months,Te=C.meridiem,pe=function(ie,ue,q,ne){return ie&&(ie[ue]||ie(D,z))||q[ue].slice(0,ne)},_e=function(ie){return M.s(P%12||12,ie,"0")},be=Te||function(ie,ue,q){var ne=ie<12?"AM":"PM";return q?ne.toLowerCase():ne};return z.replace(E,function(ie,ue){return ue||function(q){switch(q){case"YY":return String(D.$y).slice(-2);case"YYYY":return M.s(D.$y,4,"0");case"M":return K+1;case"MM":return M.s(K+1,2,"0");case"MMM":return pe(C.monthsShort,K,le,3);case"MMMM":return pe(le,K);case"D":return D.$D;case"DD":return M.s(D.$D,2,"0");case"d":return String(D.$W);case"dd":return pe(C.weekdaysMin,D.$W,te,2);case"ddd":return pe(C.weekdaysShort,D.$W,te,3);case"dddd":return te[D.$W];case"H":return String(P);case"HH":return M.s(P,2,"0");case"h":return _e(1);case"hh":return _e(2);case"a":return be(P,Y,!0);case"A":return be(P,Y,!1);case"m":return String(Y);case"mm":return M.s(Y,2,"0");case"s":return String(D.$s);case"ss":return M.s(D.$s,2,"0");case"SSS":return M.s(D.$ms,3,"0");case"Z":return N}return null}(ie)||N.replace(":","")})},I.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},I.diff=function(k,D,C){var z,N=this,P=M.p(D),Y=S(k),K=(Y.utcOffset()-this.utcOffset())*r,te=this-Y,le=function(){return M.m(N,Y)};switch(P){case m:z=le()/12;break;case d:z=le();break;case p:z=le()/3;break;case f:z=(te-K)/6048e5;break;case u:z=(te-K)/864e5;break;case c:z=te/o;break;case l:z=te/r;break;case a:z=te/n;break;default:z=te}return C?z:M.a(z)},I.daysInMonth=function(){return this.endOf(d).$D},I.$locale=function(){return x[this.$L]},I.locale=function(k,D){if(!k)return this.$L;var C=this.clone(),z=$(k,D,!0);return z&&(C.$L=z),C},I.clone=function(){return M.w(this.$d,this)},I.toDate=function(){return new Date(this.valueOf())},I.toJSON=function(){return this.isValid()?this.toISOString():null},I.toISOString=function(){return this.$d.toISOString()},I.toString=function(){return this.$d.toUTCString()},R}(),j=V.prototype;return S.prototype=j,[["$ms",i],["$s",a],["$m",l],["$H",c],["$W",u],["$M",d],["$y",m],["$D",h]].forEach(function(R){j[R[1]]=function(I){return this.$g(I,R[0],R[1])}}),S.extend=function(R,I){return R.$i||(R(I,V,S),R.$i=!0),S},S.locale=$,S.isDayjs=O,S.unix=function(R){return S(1e3*R)},S.en=x[b],S.Ls=x,S.p={},S})})(ar,ar.exports);var Nc=ar.exports;const Lt=It(Nc);var cr={exports:{}},yf=cr.exports;(function(e,t){(function(n,r){e.exports=r()})(xn,function(){return function(n){var r={};function o(i){if(r[i])return r[i].exports;var a=r[i]={i,l:!1,exports:{}};return n[i].call(a.exports,a,a.exports,o),a.l=!0,a.exports}return o.m=n,o.c=r,o.d=function(i,a,l){o.o(i,a)||Object.defineProperty(i,a,{enumerable:!0,get:l})},o.r=function(i){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},o.t=function(i,a){if(1&a&&(i=o(i)),8&a||4&a&&typeof i=="object"&&i&&i.__esModule)return i;var l=Object.create(null);if(o.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:i}),2&a&&typeof i!="string")for(var c in i)o.d(l,c,(function(u){return i[u]}).bind(null,c));return l},o.n=function(i){var a=i&&i.__esModule?function(){return i.default}:function(){return i};return o.d(a,"a",a),a},o.o=function(i,a){return Object.prototype.hasOwnProperty.call(i,a)},o.p="",o(o.s=1)}([function(n,r,o){var i,a=(function(){var l={ns:1e-6,us:.001,µs:.001,μs:.001,ms:1,s:1e3,m:6e4,h:36e5,d:864e5,w:6048e5},c=function(u){if(u instanceof c)return u;switch(typeof u){case"number":if(!isFinite(u))throw new Error("invalid duration: "+u);this._milliseconds=u;break;case"string":this._milliseconds=c.parse(u).valueOf();break;case"undefined":this._milliseconds=0;break;default:throw new Error("invalid duration: "+u)}};return c.millisecond=new c(1),c.second=new c(1e3),c.minute=new c(6e4),c.hour=new c(36e5),c.day=new c(864e5),c.week=new c(6048e5),c.prototype.nanoseconds=function(){return Math.floor(this._milliseconds/1e-6)},c.prototype.microseconds=function(){return Math.floor(this._milliseconds/.001)},c.prototype.milliseconds=function(){return this._milliseconds},c.prototype.seconds=function(){return Math.floor(this._milliseconds/1e3)},c.prototype.minutes=function(){return Math.floor(this._milliseconds/6e4)},c.prototype.hours=function(){return Math.floor(this._milliseconds/36e5)},c.prototype.days=function(){return Math.floor(this._milliseconds/864e5)},c.prototype.weeks=function(){return Math.floor(this._milliseconds/6048e5)},c.prototype.toString=function(){var u="",f=Math.abs(this._milliseconds),d=this._milliseconds<0?"-":"";if(f===0)return"0";var p=Math.floor(f/36e5);p!==0&&(f-=36e5*p,u+=p.toString()+"h");var m=Math.floor(f/6e4);m!==0&&(f-=6e4*m,u+=m.toString()+"m");var h=Math.floor(f/1e3);return h!==0&&(f-=1e3*h,u+=h.toString()+"s"),f!==0&&(u+=f.toString()+"ms"),d+u},c.prototype.valueOf=function(){return this._milliseconds},c.parse=function(u){if(u==="0"||u==="+0"||u==="-0")return new c(0);for(var f,d,p,m=/([\-\+\d\.]+)([a-zµμ]+)/g,h=0,g=0,v=u[0]==="-"?-1:1;p=m.exec(u);){if(f=p[2],d=Math.abs(parseFloat(p[1])),g++,isNaN(d))throw new Error("invalid duration");if(l[f]===void 0)throw new Error("invalid unit: "+f);h+=d*l[f]}if(g===0)throw new Error("invalid duration");return new c(Math.floor(h)*v)},c.prototype.roundTo=function(u){var f=new c(u).valueOf();this._milliseconds=f*Math.round(this._milliseconds/f)},c.prototype.isGreaterThan=function(u){return this.valueOf()>new c(u).valueOf()},c.prototype.isLessThan=function(u){return this.valueOf()<new c(u).valueOf()},c.prototype.isEqualTo=function(u){return this.valueOf()===new c(u).valueOf()},c.prototype.after=function(u){return new Date(u.valueOf()+this._milliseconds)},c.since=function(u){return new c(new Date().valueOf()-u.valueOf())},c.until=function(u){return new c(u.valueOf()-new Date().valueOf())},c.fromMicroseconds=function(u){var f=Math.floor(u/1e3);return new c(f)},c.fromNanoseconds=function(u){var f=Math.floor(u/1e6);return new c(f)},c.between=function(u,f){return new c(f.valueOf()-u.valueOf())},c.add=function(u,f){return new c(u+f)},c.subtract=function(u,f){return new c(u-f)},c.multiply=function(u,f){return new c(u*f)},c.divide=function(u,f){return u/f},c}).call(this);(i=(function(){return a}).apply(r,[]))===void 0||(n.exports=i)},function(n,r,o){"use strict";o.r(r);var i=o(0),a=o.n(i),l={en:{now:"Now",seconds:"%ds",minutes:"%dm",hours:"%dh",days:"MMM D",years:"MMM D, YYYY"},es:{now:"Ahora",seconds:"%ds",minutes:"%dmin",hours:"%dh",days:"D MMM.",years:"D MMM. YYYY"},ru:{now:"1 с",seconds:"%d с",minutes:"%d мин",hours:"%d ч",days:"D MMM.",years:"D MMM. YYYY"},fr:{now:"Μaintenant",seconds:"%ds",minutes:"%dm",hours:"%dh",days:"MMM D",years:"MMM D, YYYY"},el:{now:"Τώρα",seconds:"%dδ",minutes:"%dλ",hours:"%dω",days:"MMM D",years:"MMM D, YYYY"}};r.default=function(c,u,f){u.prototype.twitter=function(){return function(d){var p=d.$locale(),m=p?p.name:"en",h=Math.abs(d.diff(new Date)),g=null,v=null;if(g=h<=1e3?"now":h<6e4?"seconds":h<36e5?"minutes":h<864e5?"hours":h<31536e6?"days":"years",v&&g||!(["seconds","minutes","hours"].indexOf(g)>-1)||(v=new a.a(h)[g]()),g==="days"||g==="years"){var E=l[m][g];return d.format(E)}return l[m][g].replace("%d",v)}(this)}}}])})})(cr,cr.exports);var Fc=cr.exports;const zc=It(Fc);var lr={exports:{}},_f=lr.exports;(function(e,t){(function(n,r){e.exports=r()})(xn,function(){"use strict";var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(r,o,i){var a=o.prototype,l=a.format;i.en.formats=n,a.format=function(c){c===void 0&&(c="YYYY-MM-DDTHH:mm:ssZ");var u=this.$locale().formats,f=function(d,p){return d.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(m,h,g){var v=g&&g.toUpperCase();return h||p[g]||n[g]||p[v].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(E,_,T){return _||T.slice(1)})})}(c,u===void 0?{}:u);return l.call(this,f)}}})})(lr,lr.exports);var Hc=lr.exports;const Vc=It(Hc);var ur={exports:{}},bf=ur.exports;(function(e,t){(function(n,r){e.exports=r()})(xn,function(){"use strict";return function(n,r,o){n=n||{};var i=r.prototype,a={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function l(u,f,d,p){return i.fromToBase(u,f,d,p)}o.en.relativeTime=a,i.fromToBase=function(u,f,d,p,m){for(var h,g,v,E=d.$locale().relativeTime||a,_=n.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],T=_.length,w=0;w<T;w+=1){var b=_[w];b.d&&(h=p?o(u).diff(d,b.d,!0):d.diff(u,b.d,!0));var x=(n.rounding||Math.round)(Math.abs(h));if(v=h>0,x<=b.r||!b.r){x<=1&&w>0&&(b=_[w-1]);var L=E[b.l];m&&(x=m(""+x)),g=typeof L=="string"?L.replace("%d",x):L(x,f,b.l,v);break}}if(f)return g;var O=v?E.future:E.past;return typeof O=="function"?O(g):O.replace("%s",g)},i.to=function(u,f){return l(u,f,this,!0)},i.from=function(u,f){return l(u,f,this)};var c=function(u){return u.$u?o.utc():o()};i.toNow=function(u){return this.to(c(this),u)},i.fromNow=function(u){return this.from(c(this),u)}}})})(ur,ur.exports);var Bc=ur.exports;const jc=It(Bc);Lt.extend(zc);Lt.extend(Vc);Lt.extend(jc);const Uc=new Intl.DateTimeFormat;function At({datetime:e,format:t}){if(!e)return null;const[n,r]=Pi(c=>c+1,0),o=he(()=>Lt(e),[e]),[i,a,l]=he(()=>{if(!o.isValid())return[""+e,"",""];let c;if(t==="micro"){const u=Lt();u.diff(o,"day")<=1||u.year()===o.year()?c=o.twitter():c=Uc.format(o.toDate())}return c||(c=o.fromNow()),[c,o.toISOString(),o.format("LLLL")]},[o,t,n]);return se(()=>{if(!o.isValid())return;let c,u;function f(){u=requestAnimationFrame(()=>{r(),d()})}function d(){o.diff(Lt(),"minute",!0)<1?c=setTimeout(f,1e4):o.diff(Lt(),"hour",!0)<1&&(c=setTimeout(f,6e4))}return d(),()=>{clearTimeout(c),cancelAnimationFrame(u)}},[]),s("time",{datetime:a,title:l,children:i})}const Wc=[{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"}];function Yc(...e){try{return Ea(...e)}catch{return e[2]||!1}}const no=lt(Yc),Kc=[new Intl.DateTimeFormat().resolvedOptions().locale,...navigator.languages],Zc=no(Kc,Wc.map(e=>e.code.replace("_","-")),"en");function ss(e=!1){if(e){const{contentTranslationTargetLanguage:t}=W.settings;if(t)return t}return Zc}const qc=new Intl.DisplayNames(navigator.languages,{type:"language"});function Gc(e){try{return qc.of(e)}catch{return null}}const Pr=lt(Gc),Yt=2147483647,Ke=36,xo=1,En=26,Xc=38,Jc=700,as=72,cs=128,ls="-",Qc=/^xn--/,el=/[^\0-\x7F]/,tl=/[\x2E\u3002\uFF0E\uFF61]/g,nl={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},$r=Ke-xo,Ze=Math.floor,Or=String.fromCharCode;function pt(e){throw new RangeError(nl[e])}function rl(e,t){const n=[];let r=e.length;for(;r--;)n[r]=t(e[r]);return n}function us(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(tl,".");const o=e.split("."),i=rl(o,t).join(".");return r+i}function ds(e){const t=[];let n=0;const r=e.length;for(;n<r;){const o=e.charCodeAt(n++);if(o>=55296&&o<=56319&&n<r){const i=e.charCodeAt(n++);(i&64512)==56320?t.push(((o&1023)<<10)+(i&1023)+65536):(t.push(o),n--)}else t.push(o)}return t}const ol=e=>String.fromCodePoint(...e),il=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:Ke},ni=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},fs=function(e,t,n){let r=0;for(e=n?Ze(e/Jc):e>>1,e+=Ze(e/t);e>$r*En>>1;r+=Ke)e=Ze(e/$r);return Ze(r+($r+1)*e/(e+Xc))},hs=function(e){const t=[],n=e.length;let r=0,o=cs,i=as,a=e.lastIndexOf(ls);a<0&&(a=0);for(let l=0;l<a;++l)e.charCodeAt(l)>=128&&pt("not-basic"),t.push(e.charCodeAt(l));for(let l=a>0?a+1:0;l<n;){const c=r;for(let f=1,d=Ke;;d+=Ke){l>=n&&pt("invalid-input");const p=il(e.charCodeAt(l++));p>=Ke&&pt("invalid-input"),p>Ze((Yt-r)/f)&&pt("overflow"),r+=p*f;const m=d<=i?xo:d>=i+En?En:d-i;if(p<m)break;const h=Ke-m;f>Ze(Yt/h)&&pt("overflow"),f*=h}const u=t.length+1;i=fs(r-c,u,c==0),Ze(r/u)>Yt-o&&pt("overflow"),o+=Ze(r/u),r%=u,t.splice(r++,0,o)}return String.fromCodePoint(...t)},ps=function(e){const t=[];e=ds(e);const n=e.length;let r=cs,o=0,i=as;for(const c of e)c<128&&t.push(Or(c));const a=t.length;let l=a;for(a&&t.push(ls);l<n;){let c=Yt;for(const f of e)f>=r&&f<c&&(c=f);const u=l+1;c-r>Ze((Yt-o)/u)&&pt("overflow"),o+=(c-r)*u,r=c;for(const f of e)if(f<r&&++o>Yt&&pt("overflow"),f===r){let d=o;for(let p=Ke;;p+=Ke){const m=p<=i?xo:p>=i+En?En:p-i;if(d<m)break;const h=d-m,g=Ke-m;t.push(Or(ni(m+h%g,0))),d=Ze(h/g)}t.push(Or(ni(d,0))),i=fs(o,u,l===a),o=0,++l}++o,++r}return t.join("")},sl=function(e){return us(e,function(t){return Qc.test(t)?hs(t.slice(4).toLowerCase()):t})},al=function(e){return us(e,function(t){return el.test(t)?"xn--"+ps(t):t})},ro={version:"2.3.1",ucs2:{decode:ds,encode:ol},decode:hs,encode:ps,toASCII:al,toUnicode:sl};function dr(e,t=[]){return e?(!t.length||e.indexOf(":")===-1||t.forEach(n=>{const{shortcode:r,staticUrl:o,url:i}=n;e=e.replace(new RegExp(`:${r}:`,"g"),`<picture><source srcset="${o}" media="(prefers-reduced-motion: reduce)"></source><img class="shortcode-emoji emoji" src="${i}" alt=":${r}:" width="16" height="16" loading="lazy" decoding="async" /></picture>`)}),e):""}const Ft=document.createElement("div"),cl=["u-url","mention","hashtag"];function ll(e,t={}){const{emojis:n,postEnhanceDOM:r=()=>{}}=t;let o=e;const i=document.createElement("div");i.innerHTML=o;const a=/<a/i.test(o),l=o.includes("```");if(a&&(i.querySelectorAll('a:not([target="_blank"])').forEach(d=>{d.setAttribute("target","_blank")}),i.querySelectorAll("a[class]").forEach(d=>{d.classList.forEach(p=>{cl.includes(p)||d.classList.remove(p)})})),a&&i.querySelectorAll("a[href]").forEach(f=>{/^https?:\/\//i.test(f.textContent.trim())&&(f.classList.add("has-url-text"),hl(f))}),a){const u=i.querySelectorAll("a[href]"),f=[];u.forEach(d=>{const p=d.innerText.trim(),m=d.querySelector("*");if(/^@[^@]+(@[^@]+)?$/g.test(p)){const[h,g,v]=p.split("@");m||(!f.some(([E])=>E===g)||f.some(([E,_])=>E===g&&_===v)?(d.innerHTML=`@<span>${g}</span>`,f.push([g,v])):d.innerHTML=`@<span>${g}@${v}</span>`),d.classList.add("mention")}/^#[^#]+$/g.test(p)&&(m||(d.innerHTML=`#<span>${p.slice(1)}</span>`),d.classList.add("mention","hashtag"))})}let c;if(o.includes(":")&&(c=Dr(i),c.forEach(u=>{let f=u.nodeValue.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");n&&(f=dr(f,n)),Ft.innerHTML=f,u.replaceWith(...Ft.childNodes)})),l&&[...i.querySelectorAll("p")].filter(f=>/^```[^]+```$/g.test(f.innerText.trim())).forEach(f=>{const d=document.createElement("pre");f.querySelectorAll("br").forEach(p=>p.replaceWith(`
|
||
`)),d.innerHTML=`<code>${f.innerHTML.trim()}</code>`,f.replaceWith(d)}),l&&[...i.querySelectorAll("p")].filter(d=>/^```/g.test(d.innerText)).forEach(d=>{const p=[d];let m=!1,h=d;for(;h.nextElementSibling;){const g=h.nextElementSibling;if(g&&g.tagName==="P")if(/```$/g.test(g.innerText)){p.push(g),m=!0;break}else p.push(g);else break;h=g}if(m){const g=document.createElement("pre");p.forEach(E=>{E.querySelectorAll("br").forEach(_=>_.replaceWith(`
|
||
`))});const v=p.map(E=>E.innerHTML).join(`
|
||
|
||
`);g.innerHTML=`<code tabindex="0">${v}</code>`,d.replaceWith(g),p.forEach(E=>E.remove())}}),o.includes("`")&&(c=Dr(i),c.forEach(u=>{let f=u.nodeValue.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");/`[^`]+`/g.test(f)&&(f=f.replaceAll(/(`[^]+?`)/g,"<code>$1</code>")),Ft.innerHTML=f,u.replaceWith(...Ft.childNodes)})),/twitter\.com/i.test(o)&&(c=Dr(i,{rejectFilter:["A"]}),c.forEach(u=>{let f=u.nodeValue.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");/@[a-zA-Z0-9_]+@twitter\.com/g.test(f)&&(f=f.replaceAll(/(@([a-zA-Z0-9_]+)@twitter\.com)/g,'<a href="https://twitter.com/$2" rel="nofollow noopener noreferrer" target="_blank">$1</a>')),Ft.innerHTML=f,u.replaceWith(...Ft.childNodes)})),o.includes("#")){let u=null;const f=[...i.querySelectorAll("p")].filter((d,p)=>{let m=0;for(let h=0;h<d.childNodes.length;h++){const g=d.childNodes[h];if(g.nodeType===Node.TEXT_NODE){if(g.textContent.trim()!=="")return!1}else if(g.tagName!=="BR")if(g.tagName==="A"){const v=g.textContent.trim();if(!v||!v.startsWith("#"))return!1;m++}else return!1}if(m>3||m>1&&u&&p===u+1)return u=p,!0});f!=null&&f.length&&f.forEach(d=>{d.classList.add("hashtag-stuffing"),d.title=d.innerText})}return o.includes("<img")&&i.querySelectorAll("img").forEach(u=>{const f=u.getAttribute("width")||u.naturalWidth,d=u.getAttribute("height")||u.naturalHeight;f&&d&&u.style.setProperty("--original-aspect-ratio",`${f}/${d}`)}),r&&queueMicrotask(()=>r(i)),o=i.innerHTML,o}const ms=lt(ll),ul=["STYLE","IMG","VIDEO","AUDIO","AREA","MAP","TRACK","EMBED","IFRAME","OBJECT","PICTURE","PORTAL","SOURCE","SVG","MATH","CANVAS","NOSCRIPT","SCRIPT","INPUT","OPTION","TEXTAREA","SLOT","TEMPLATE"],dl=Object.fromEntries(ul.map(e=>[e,!0])),fl=/^(https?:\/\/(www\.)?|xmpp:)/,Rr=30;function hl(e){var t;if(!(!e||(t=e.querySelector)!=null&&t.call(e,"*")))try{const n=e.innerText.trim(),r=(n.match(fl)||[])[0]||"";if(!r)return;const o=n.slice(r.length,r.length+Rr),i=n.slice(r.length+Rr),a=n.slice(r.length).length>Rr;e.innerHTML=`<span class="invisible">${r}</span><span class=${a?"ellipsis":""}>${o}</span><span class="invisible">${i}</span>`}catch{}}function Dr(e,t={}){var a;const n=[],r=Object.assign({},dl,(a=t.rejectFilter)==null?void 0:a.reduce((l,c)=>(l[c]=!0,l),{})),o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode(l){return r[l.parentNode.nodeName]?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}},!1);let i;for(;i=o.nextNode();)n.push(i);return n}const zt=document.createElement("div");function pl(e,t){if(!e)return"";const{preProcess:n}=t||{};return zt.innerHTML=e.replace(/<\/p>/g,`</p>
|
||
|
||
`).replace(/<\/li>/g,`</li>
|
||
`),zt.querySelectorAll("br").forEach(r=>{r.replaceWith(`
|
||
`)}),n==null||n(zt),zt.querySelectorAll(".invisible").forEach(r=>{r.remove()}),zt.querySelectorAll(".ellipsis").forEach(r=>{r.append("...")}),zt.innerText.replace(/[\r\n]{3,}/g,`
|
||
|
||
`).trim()}const fr=lt(pl);function ml(e){const{mentions:t=[],instance:n,previewMode:r,statusURL:o}=e||{};return i=>{var f,d;let{target:a}=i;if(a=a.closest("a"),!a||i.metaKey||i.ctrlKey||i.shiftKey||i.altKey||i.which===2)return;const l=(f=a.previousSibling)==null?void 0:f.textContent,c=l==null?void 0:l.endsWith("@"),u=a.innerText.startsWith("@");if((a.classList.contains("u-url")||a.classList.contains("mention"))&&u||c&&!u){const p=(a.querySelector("span")||a).innerText.trim(),m=p.replace(/^@/,""),h=a.getAttribute("href"),g=t.find(v=>v.url===h)||t.find(v=>v.acct===m||v.username===m);if(g)i.preventDefault(),i.stopPropagation(),W.showAccount={account:g.acct,instance:n};else if(!/^http/i.test(p)){i.preventDefault(),i.stopPropagation();const v=a.getAttribute("href");W.showAccount={account:v,instance:n}}}else if(!r){const p=l==null?void 0:l.endsWith("#");if(a.classList.contains("hashtag")||p){i.preventDefault(),i.stopPropagation();const m=a.innerText.replace(/^#/,"").trim(),h=n?`#/${n}/t/${m}`:`#/t/${m}`;location.hash=h}else(d=W.unfurledLinks[a.href])!=null&&d.url&&o!==a.href&&(i.preventDefault(),i.stopPropagation(),W.prevLocation={pathname:location.hash.replace(/^#/,"")},location.hash=`#${W.unfurledLinks[a.href].url}`)}}}const{locale:gl}=new Intl.DateTimeFormat().resolvedOptions(),vl=e=>{const{dateYear:t,hideTime:n,formatOpts:r}=e||{},o=new Date().getFullYear();return Intl.DateTimeFormat(gl,{year:t===o?void 0:"numeric",month:"short",day:"numeric",hour:n?void 0:"numeric",minute:n?void 0:"numeric",...r})},yl=lt(vl);function Tn(e,t){return e instanceof Date||(e=new Date(e)),yl({dateYear:e.getFullYear(),...t}).format(e)}const{locale:_l}=Intl.NumberFormat().resolvedOptions(),vt=Intl.NumberFormat(_l,{notation:"compact",roundingMode:"floor"}).format,ri=5e3;function Bn(e){if(e||(e=!0),W.showCompose){W.composerState.minimized?Pe({duration:ri,text:"A draft post is currently minimized. Post or discard it before creating a new one."}):Pe({duration:ri,text:"A post is currently open. Post or discard it before creating a new one."});return}Va(),W.showCompose=e}const bl=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,hr=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(bl);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},oi=e=>e==="*"||e==="x"||e==="X",ii=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},wl=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],El=(e,t)=>{if(oi(e)||oi(t))return 0;const[n,r]=wl(ii(e),ii(t));return n>r?1:n<r?-1:0},jt=(e,t)=>{for(let n=0;n<Math.max(e.length,t.length);n++){const r=El(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0},Tl=(e,t)=>{const n=hr(e),r=hr(t),o=n.pop(),i=r.pop(),a=jt(n,r);return a!==0?a:o&&i?jt(o.split("."),i.split(".")):o||i?o?-1:1:0},Sl=(e,t,n)=>{xl(n);const r=Tl(e,t);return gs[n].includes(r)},gs={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},si=Object.keys(gs),xl=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(si.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${si.join("|")}`)},Jn=(e,t)=>{if(t=t.replace(/([><=]+)\s+/g,"$1"),t.includes("||"))return t.split("||").some(v=>Jn(e,v));if(t.includes(" - ")){const[v,E]=t.split(" - ",2);return Jn(e,`>=${v} <=${E}`)}else if(t.includes(" "))return t.trim().replace(/\s{2,}/g," ").split(" ").every(v=>Jn(e,v));const n=t.match(/^([<>=~^]+)/),r=n?n[1]:"=";if(r!=="^"&&r!=="~")return Sl(e,t,r);const[o,i,a,,l]=hr(e),[c,u,f,,d]=hr(t),p=[o,i,a],m=[c,u??"x",f??"x"];if(d&&(!l||jt(p,m)!==0||jt(l.split("."),d.split("."))===-1))return!1;const h=m.findIndex(v=>v!=="0")+1,g=r==="~"?2:h>1?h:1;return!(jt(p.slice(0,g),m.slice(0,g))!==0||jt(p.slice(g),m.slice(g))===-1)};const Ml={"@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"},Nr=/pixelfed/i,ot=/^(?!.*pixelfed).*$/i,ai={"@mastodon/lists":ot,"@mastodon/filters":ot,"@mastodon/mentions":ot,"@mastodon/trending-hashtags":ot,"@mastodon/trending-links":ot,"@mastodon/post-bookmark":ot,"@mastodon/post-edit":ot,"@mastodon/profile-edit":ot,"@mastodon/profile-private-note":ot,"@pixelfed/trending":Nr,"@pixelfed/home-include-reblogs":Nr,"@pixelfed/global-feed":Nr},jn={};function Un(e){try{const{version:t,domain:n}=ha(),r=`${n}-${e}`;if(jn[r])return jn[r];if(ai[e])return jn[r]=ai[e].test(t);const o=Ml[e];return o?jn[r]=Jn(t,o,{includePrerelease:!0,loose:!0}):!1}catch{return!1}}function wf({skeleton:e,account:t,avatarSize:n="xl",useAvatarStatic:r=!1,instance:o,external:i,internal:a,onClick:l,showActivity:c=!1,showStats:u=!1,accountInstance:f,hideDisplayName:d=!1,relationship:p={},excludeRelationshipAttrs:m=[]}){if(e)return s("div",{class:"account-block skeleton",children:[s(st,{size:n}),s("span",{children:[s("b",{children:"████████"}),s("br",{}),s("span",{class:"account-block-acct",children:"██████"})]})]});if(!t)return null;const{id:h,acct:g,avatar:v,avatarStatic:E,displayName:_,username:T,emojis:w,url:b,statusesCount:x,lastStatusAt:L,bot:O,fields:$,note:S,group:M,followersCount:V,createdAt:j,locked:R}=t;let[I,k,D]=g.match(/([^@]+)(@.+)/i)||[,g];f&&(D=`@${f}`);const C=$==null?void 0:$.find(P=>!!P.verifiedAt&&!!P.value),z={};for(const P in p)m.includes(P)||(z[P]=p[P]);const N=z.following||z.followedBy||z.requested;return s("a",{class:"account-block",href:b,target:i?"_blank":null,title:D?g:`@${g}`,onClick:P=>{if(!i){if(P.preventDefault(),l)return l(P);a?location.hash=`/${o}/a/${h}`:W.showAccount={account:t,instance:o}}},children:[s(st,{url:r?E:v||E,size:n,squircle:O}),s("span",{class:"account-block-content",children:[!d&&s(U,{children:_?s("b",{children:s(Zt,{text:_,emojis:w})}):s("b",{children:T})})," ",s("span",{class:"account-block-acct",children:[D?"":"@",k,s("wbr",{}),D,R&&s(U,{children:[" ",s(H,{icon:"lock",size:"s",alt:"Locked"})]})]}),c&&s("div",{class:"account-block-stats",children:["Posts: ",vt(x),!!L&&s(U,{children:[" ","· Last posted:"," ",Tn(L,{hideTime:!0})]})]}),u&&s("div",{class:"account-block-stats",children:[O&&s(U,{children:s("span",{class:"tag collapsed",children:[s(H,{icon:"bot"})," Automated"]})}),!!M&&s(U,{children:s("span",{class:"tag collapsed",children:[s(H,{icon:"group"})," Group"]})}),N&&s("div",{class:"shazam-container-horizontal",children:s("div",{class:"shazam-container-inner",children:z.following&&z.followedBy?s("span",{class:"tag minimal",children:"Mutual"}):z.requested?s("span",{class:"tag minimal",children:"Requested"}):z.following?s("span",{class:"tag minimal",children:"Following"}):z.followedBy?s("span",{class:"tag minimal",children:"Follows you"}):null})},p.id),!!V&&s("span",{class:"ib",children:[vt(V)," ",V===1?"follower":"followers"]}),!!C&&s("span",{class:"verified-field",children:[s(H,{icon:"check-circle",size:"s"})," ",s("span",{dangerouslySetInnerHTML:{__html:ms(C.value,{emojis:w})}})]}),!O&&!M&&!N&&!V&&!C&&!!j&&s("span",{class:"created-at",children:["Joined"," ",s("time",{datetime:j,children:Tn(j,{hideTime:!0})})]})]})]})]})}function ci(e){const{className:t,disabled:n,...r}=e;return s(Lc,{className:t,disabled:n,children:({ref:o,closeMenu:i})=>s(Kt,{...r,ref:o,onClick:({detail:a})=>i(a===0?"Enter":void 0)})})}var vs={};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 kl=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 r=this;return this._timer=setTimeout(function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout(function(){r._operationTimeoutCb(r._attempts)},r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._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,r=0;r<this._errors.length;r++){var o=this._errors[r],i=o.message,a=(e[i]||0)+1;e[i]=a,a>=n&&(t=o,n=a)}return t};(function(e){var t=kl;e.operation=function(n){var r=e.timeouts(n);return new t(r,{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 r={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var o in n)r[o]=n[o];if(r.minTimeout>r.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var i=[],a=0;a<r.retries;a++)i.push(this.createTimeout(a,r));return n&&n.forever&&!i.length&&i.push(this.createTimeout(a,r)),i.sort(function(l,c){return l-c}),i},e.createTimeout=function(n,r){var o=r.randomize?Math.random()+1:1,i=Math.round(o*Math.max(r.minTimeout,1)*Math.pow(r.factor,n));return i=Math.min(i,r.maxTimeout),i},e.wrap=function(n,r,o){if(r instanceof Array&&(o=r,r=null),!o){o=[];for(var i in n)typeof n[i]=="function"&&o.push(i)}for(var a=0;a<o.length;a++){var l=o[a],c=n[l];n[l]=(function(f){var d=e.operation(r),p=Array.prototype.slice.call(arguments,1),m=p.pop();p.push(function(h){d.retry(h)||(h&&(arguments[0]=d.mainError()),m.apply(this,arguments))}),d.attempt(function(){f.apply(n,p)})}).bind(n,c),n[l].options=r}}})(vs);var Ll=vs;const Al=It(Ll),Il=Object.prototype.toString,Cl=e=>Il.call(e)==="[object Error]",Pl=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 $l(e){return e&&Cl(e)&&e.name==="TypeError"&&typeof e.message=="string"?e.message==="Load failed"?e.stack===void 0:Pl.has(e.message):!1}class Ol 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 li=(e,t,n)=>{const r=n.retries-(t-1);return e.attemptNumber=t,e.retriesLeft=r,e};async function Rl(e,t){return new Promise((n,r)=>{t={onFailedAttempt(){},retries:10,shouldRetry:()=>!0,...t};const o=Al.operation(t),i=()=>{var l;o.stop(),r((l=t.signal)==null?void 0:l.reason)};t.signal&&!t.signal.aborted&&t.signal.addEventListener("abort",i,{once:!0});const a=()=>{var l;(l=t.signal)==null||l.removeEventListener("abort",i),o.stop()};o.attempt(async l=>{try{const c=await e(l);a(),n(c)}catch(c){try{if(!(c instanceof Error))throw new TypeError(`Non-error was thrown: "${c}". You should only throw errors.`);if(c instanceof Ol)throw c.originalError;if(c instanceof TypeError&&!$l(c))throw c;if(li(c,l,t),await t.shouldRetry(c)||(o.stop(),r(c)),await t.onFailedAttempt(c),!o.retry(c))throw o.mainError()}catch(u){li(u,l,t),a(),r(u)}}})})}const Dl=[{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 Nl=Object.defineProperty,Fl=(e,t,n)=>t in e?Nl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Wn=(e,t,n)=>(Fl(e,typeof t!="symbol"?t+"":t,n),n),oo=new Map,Yn=new WeakMap,ui=0,zl=void 0;function Hl(e){return e?(Yn.has(e)||(ui+=1,Yn.set(e,ui.toString())),Yn.get(e)):"0"}function Vl(e){return Object.keys(e).sort().filter(t=>e[t]!==void 0).map(t=>`${t}_${t==="root"?Hl(e.root):e[t]}`).toString()}function Bl(e){const t=Vl(e);let n=oo.get(t);if(!n){const r=new Map;let o;const i=new IntersectionObserver(a=>{a.forEach(l=>{var c;const u=l.isIntersecting&&o.some(f=>l.intersectionRatio>=f);e.trackVisibility&&typeof l.isVisible>"u"&&(l.isVisible=u),(c=r.get(l.target))==null||c.forEach(f=>{f(u,l)})})},e);o=i.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:i,elements:r},oo.set(t,n)}return n}function ys(e,t,n={},r=zl){if(typeof window.IntersectionObserver>"u"&&r!==void 0){const c=e.getBoundingClientRect();return t(r,{isIntersecting:r,target:e,intersectionRatio:typeof n.threshold=="number"?n.threshold:0,time:0,boundingClientRect:c,intersectionRect:c,rootBounds:c}),()=>{}}const{id:o,observer:i,elements:a}=Bl(n),l=a.get(e)||[];return a.has(e)||a.set(e,l),l.push(t),i.observe(e),function(){l.splice(l.indexOf(t),1),l.length===0&&(a.delete(e),i.unobserve(e)),a.size===0&&(i.disconnect(),oo.delete(o))}}function jl(e){return typeof e.children!="function"}var Ef=class extends Ri{constructor(e){super(e),Wn(this,"node",null),Wn(this,"_unobserveCb",null),Wn(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()}),Wn(this,"handleChange",(t,n)=>{t&&this.props.triggerOnce&&this.unobserve(),jl(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:r,delay:o,fallbackInView:i}=this.props;this._unobserveCb=ys(this.node,this.handleChange,{threshold:e,root:t,rootMargin:n,trackVisibility:r,delay:o},i)}unobserve(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)}render(){const{children:e}=this.props;if(typeof e=="function"){const{inView:m,entry:h}=this.state;return e({inView:m,entry:h,ref:this.handleNode})}const{as:t,triggerOnce:n,threshold:r,root:o,rootMargin:i,onChange:a,skip:l,trackVisibility:c,delay:u,initialInView:f,fallbackInView:d,...p}=this.props;return pa(t||"div",{ref:this.handleNode,...p},e)}};function Ul({threshold:e,delay:t,trackVisibility:n,rootMargin:r,root:o,triggerOnce:i,skip:a,initialInView:l,fallbackInView:c,onChange:u}={}){var f;const[d,p]=ee(null),m=B(),[h,g]=ee({inView:!!l,entry:void 0});m.current=u,se(()=>{if(a||!d)return;let T;return T=ys(d,(w,b)=>{g({inView:w,entry:b}),m.current&&m.current(w,b),b.isIntersecting&&i&&T&&(T(),T=void 0)},{root:o,rootMargin:r,threshold:e,trackVisibility:n,delay:t},c),()=>{T&&T()}},[Array.isArray(e)?e.toString():e,d,o,r,i,a,n,c,t]);const v=(f=h.entry)==null?void 0:f.target,E=B();!d&&v&&!i&&!a&&E.current!==v&&(E.current=v,g({inView:!!l,entry:void 0}));const _=[p,h.inView,h.entry];return _.ref=_[0],_.inView=_[1],_.entry=_[2],_}const di=48,Fr={};function _s({id:e,children:t}){const n=B(),r=!!Fr[e],[o,i]=ee(!1),[a,l]=ee(r||!1),{ref:c}=Ul({root:null,rootMargin:`-${di}px 0px 0px 0px`,trackVisibility:!0,delay:1e3,onChange:u=>{u&&(i(!0),e&&(Fr[e]=!0))},triggerOnce:!0,skip:a||o});return se(()=>{if(!n.current)return;const u=n.current.getBoundingClientRect();u.bottom>di&&(u.top<window.innerHeight?i(!0):l(!0),e&&(Fr[e]=!0))},[]),a?t:s("div",{ref:n,class:"shazam-container no-animation",hidden:!o,children:s("div",{ref:c,class:"shazam-container-inner",children:t})})}var Wl={PHANPY_CLIENT_NAME:"Phanpy",PHANPY_WEBSITE:"https://phanpy.social",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",VITE_APP_ENV:"production",BASE_URL:"./",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{PHANPY_LINGVA_INSTANCES:fi}=Wl,vn=fi?fi.split(/\s+/):[],Yl=Di({limit:1,interval:2e3});let zr=0;function Kl(e,t,n){return Rl(()=>{let o=vn[zr];return fetch(`https://${o}/api/v1/${t}/${n}/${encodeURIComponent(e)}`).then(i=>{if(!i.ok)throw new Error(i.statusText);return i.json()}).then(i=>{var a;return{provider:"lingva",content:i.translation,detectedSourceLanguage:(a=i.info)==null?void 0:a.detectedSource,info:i.info}})},{retries:3,onFailedAttempt:o=>{zr=(zr+1)%vn.length}})}const bs=1e3*60*60,ws=po(Kl,{maxAge:bs}),Zl=po(Yl(ws),{maxAge:bs});function ql({forceTranslate:e,sourceLanguage:t,onTranslate:n,text:r="",mini:o,autoDetected:i}){const a=ss(!0),[l,c]=ee("default"),[u,f]=ee(null),[d,p]=ee(null),[m,h]=ee(null),g=B(),v=t?Pr(t):null,E=Pr(a),_=B("auto");n||(n=o?Zl:ws);const T=async()=>{var w,b;c("loading");try{const{content:x,detectedSourceLanguage:L,provider:O,error:$,...S}=await n(r,_.current,a);if(x){if(L){const M=Pr(L);h(M)}if(O==="lingva"){const M=(b=(w=S==null?void 0:S.info)==null?void 0:w.pronunciation)==null?void 0:b.query;M&&f(M)}p(x),c("default"),!o&&x.trim()!==r.trim()&&(g.current.open=!0,g.current.scrollIntoView({behavior:"smooth",block:"nearest"}))}else c("error")}catch{c("error")}};return se(()=>{e&&T()},[e]),o?d&&d.trim()!==r.trim()&&m!==E?s(_s,{children:s("div",{class:"status-translation-block-mini",children:[s(H,{icon:"translate",alt:`Auto-translated from ${v}`}),s("output",{lang:a,dir:"auto",title:u||"",children:d})]})}):null:s("div",{class:"status-translation-block",onClick:w=>{w.preventDefault()},children:s("details",{ref:g,children:[s("summary",{children:s("button",{type:"button",onClick:async w=>{w.preventDefault(),w.stopPropagation(),g.current.open=!g.current.open,l!=="loading"&&(d||T())},children:[s(H,{icon:"translate"})," ",s("span",{children:l==="loading"?"Translating…":t&&v&&!m?i?`Translate from ${v} (auto-detected)`:`Translate from ${v}`:"Translate"})]})}),s("div",{class:"translated-block",children:[s("div",{class:"translation-info insignificant",children:[s("select",{class:"translated-source-select",disabled:l==="loading",onChange:w=>{_.current=w.target.value,T()},children:Dl.map(w=>s("option",{value:w.code,children:w.code==="auto"?`Auto (${m??"…"})`:w.name}))})," ",s("span",{children:["→ ",E]}),s(Ni,{abrupt:!0,hidden:l!=="loading"})]}),l==="error"?s("p",{class:"ui-state",children:"Failed to translate"}):!!d&&s(U,{children:[s("output",{class:"translated-content",lang:a,dir:"auto",children:d}),!!u&&s("output",{class:"translated-pronunciation-content",tabIndex:-1,onClick:w=>{w.target.classList.toggle("expand")},children:u})]})]})]})})}const Gl=vn!=null&&vn.length?ql:()=>null;function ut(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function Es(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=ut(n);return(o,i)=>r.then(a=>i(a.transaction(t,o).objectStore(t)))}let Hr;function Pt(){return Hr||(Hr=Es("keyval-store","keyval")),Hr}function Xl(e,t=Pt()){return t("readonly",n=>ut(n.get(e)))}function Jl(e,t,n=Pt()){return n("readwrite",r=>(r.put(t,e),ut(r.transaction)))}function Ql(e,t=Pt()){return t("readonly",n=>Promise.all(e.map(r=>ut(n.get(r)))))}function eu(e,t=Pt()){return t("readwrite",n=>(n.delete(e),ut(n.transaction)))}function tu(e,t=Pt()){return t("readwrite",n=>(e.forEach(r=>n.delete(r)),ut(n.transaction)))}function nu(e=Pt()){return e("readwrite",t=>(t.clear(),ut(t.transaction)))}function ru(e,t){return e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},ut(e.transaction)}function ou(e=Pt()){return e("readonly",t=>{if(t.getAllKeys)return ut(t.getAllKeys());const n=[];return ru(t,r=>n.push(r.key)).then(()=>n)})}function hi(e,t){const n=Es(e,t);return{set:(r,o)=>Jl(r,o,n),get:r=>Xl(r,n),getMany:r=>Ql(r,n),del:r=>eu(r,n),delMany:r=>tu(r,n),clear:()=>nu(n),keys:()=>ou(n)}}const Tf={drafts:hi("drafts-db","drafts-store"),catchup:hi("catchup-db","catchup-store")};async function Sf(e,t={}){if(!(e!=null&&e.length))return;const{masto:n}=nr(),r=mo(),o=e.reduce((i,a)=>(!i.includes(a.id)&&!t[a.id]&&a.id!==r&&i.push(a.id),i),[]);if(!o.length)return null;try{return(await n.v1.accounts.relationships.fetch({id:o})).reduce((l,c)=>(l[c.id]=c,l),{})}catch{return null}}class je extends HTMLElement{constructor(){super(),this.isIframeLoaded=!1,this.setupDom()}static get observedAttributes(){return["videoid","playlistid"]}connectedCallback(){this.addEventListener("pointerover",je.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,r){switch(t){case"videoid":case"playlistid":case"videoTitle":case"videoPlay":{n!==r&&(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 r=this.noCookie?"-nocookie":"";let o;this.playlistId?o=`?listType=playlist&list=${this.playlistId}&`:o=`${this.videoId}?`,this.isYouTubeShort()&&(this.params=`loop=1&mute=1&modestbranding=1&playsinline=1&rel=0&enablejsapi=1&playlist=${this.videoId}`,n=1);const i=`
|
||
<iframe frameborder="0" title="${this.videoTitle}"
|
||
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen
|
||
src="https://www.youtube${r}.com/embed/${o}autoplay=${n}&${this.params}"
|
||
></iframe>`;this.domRefFrame.insertAdjacentHTML("beforeend",i),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 r,o;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}`),(o=(r=this.domRefImg)==null?void 0:r.fallback)==null||o.setAttribute("alt",`${this.videoPlay}: ${this.videoTitle}`)}initIntersectionObserver(){const t={root:null,rootMargin:"0px",threshold:0};new IntersectionObserver((r,o)=>{r.forEach(i=>{i.isIntersecting&&!this.isIframeLoaded&&(je.warmConnections(),this.addIframe(!0),o.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 r=document.createElement("link");r.rel=t,r.href=n,r.crossOrigin="true",document.head.append(r)}static warmConnections(){je.isPreconnected||window.liteYouTubeIsPreconnected||(je.addPrefetch("preconnect","https://i.ytimg.com/"),je.addPrefetch("preconnect","https://s.ytimg.com"),je.addPrefetch("preconnect","https://www.youtube.com"),je.addPrefetch("preconnect","https://www.google.com"),je.addPrefetch("preconnect","https://googleads.g.doubleclick.net"),je.addPrefetch("preconnect","https://static.doubleclick.net"),je.isPreconnected=!0,window.liteYouTubeIsPreconnected=!0)}}je.isPreconnected=!1;customElements.define("lite-youtube",je);const iu="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz#$%*+,-.:;=?@[]^_{|}~",Qn=(e,t,n)=>{let r=0;for(;t<n;)r*=83,r+=iu.indexOf(e[t++]);return r},Ts=Math.pow,Sn=Math.PI,su=Sn*2,Ss=3294.6,xs=269.025,au=e=>e>10.31475?Ts(e/xs+.052132,2.4):e/Ss,Vr=e=>~~(e>1227e-8?xs*Ts(e,.416666)-13.025:e*Ss+1),yn=e=>(e<0?-1:1)*e*e,pi=e=>{for(e+=Sn/2;e>Sn;)e-=su;const t=1.27323954*e-.405284735*yn(e);return .225*(yn(t)-t)+t};function Mo(e){const t=Qn(e,2,6);return[t>>16,t>>8&255,t&255]}function cu(e,t,n,r){const o=Qn(e,0,1),i=o%9+1,a=~~(o/9)+1,l=i*a;let c=0,u=0,f=0,d=0,p=0,m=0,h=0,g=0,v=0,E=0,_=0,T=0,w=0,b=0;const x=(Qn(e,1,2)+1)/13446*(r|1),L=new Float64Array(l*3),O=Mo(e);for(c=0;c<3;c++)L[c]=au(O[c]);for(c=1;c<l;c++)b=Qn(e,4+c*2,6+c*2),L[c*3]=yn(~~(b/(19*19))-9)*x,L[c*3+1]=yn(~~(b/19)%19-9)*x,L[c*3+2]=yn(b%19-9)*x;const $=t*4,S=new Uint8ClampedArray($*n);for(d=0;d<n;d++)for(T=Sn*d/n,f=0;f<t;f++){for(p=0,m=0,h=0,w=Sn*f/t,u=0;u<a;u++)for(v=pi(T*u),c=0;c<i;c++)g=pi(w*c)*v,E=(c+u*i)*3,p+=L[E]*g,m+=L[E+1]*g,h+=L[E+2]*g;_=4*f+d*$,S[_]=Vr(p),S[_+1]=Vr(m),S[_+2]=Vr(h),S[_+3]=255}return S}const lu=(e,t={})=>{const n=t.char||" ",r=t.count||2;let o=0;const i=[];return e.reverse().reduce((a,l)=>{i.length&&o&&i[o]&&i[o]===l.substring(1,i[o].length+1)&&(i.splice(o,1),o--);const u=[`${n.repeat(o?o*r:0)}${l}`,...a];return l.substring(0,2)==="</"&&(o++,i[o]=l.substring(2,l.length-1)),u},[]).join(`
|
||
`)};var uu=lu;const Ms=e=>e.trim().replace(/(^(\s|\t)+|(( |\t)+)$)/gm,""),du=e=>{const t=Ms(e).split(`
|
||
`),n=[];let r="";for(let o=0;o<t.length;o+=1){const i=t[o];if(i.endsWith("/>")){n.push(`${r}${i.slice(0,-2)} />`),r="";continue}if(i.endsWith(">")){n.push(`${r}${i.startsWith(">")||i.startsWith("<")?"":" "}${i}`),r="";continue}r+=r.length?` ${i}`:i}return n};var fu={mergeAttributesWithElements:du,removeEmptyLines:Ms};const hu=uu,{mergeAttributesWithElements:pu}=fu,mu=(e,t={})=>{const n=pu(e);return hu(n,t)};var gu=mu;const vu=It(gu);var hn=(e=>(e.Mouse="mouse",e.Touch="touch",e.Pointer="pointer",e))(hn||{}),pn=(e=>(e.CancelledByMovement="cancelled-by-movement",e.CancelledByRelease="cancelled-by-release",e.CancelledOutsideElement="cancelled-outside-element",e))(pn||{});const ks=()=>typeof window=="object"?(window==null?void 0:window.PointerEvent)??null:null,yu=()=>typeof window=="object"?(window==null?void 0:window.TouchEvent)??null:null;function Ls(e){const{nativeEvent:t}=e,n=yu();return n&&t instanceof n||"touches"in e}function As(e){const t=ks();return e.nativeEvent instanceof MouseEvent&&!(t&&e.nativeEvent instanceof t)}function Is(e){const{nativeEvent:t}=e;if(!t)return!1;const n=ks();return n&&t instanceof n||"pointerId"in t}function mi(e){return As(e)||Ls(e)||Is(e)}function gi(e){return Ls(e)?{x:e.touches[0].pageX,y:e.touches[0].pageY}:As(e)||Is(e)?{x:e.pageX,y:e.pageY}:null}function _u(e){return{target:e.target,currentTarget:e.currentTarget,nativeEvent:e,persist:()=>{}}}function Cs(e,{threshold:t=400,captureEvent:n=!1,detect:r=hn.Pointer,cancelOnMovement:o=!1,cancelOutsideElement:i=!0,filterEvents:a,onStart:l,onMove:c,onFinish:u,onCancel:f}={}){const d=B(!1),p=B(!1),m=B(),h=B(),g=B(e),v=B(null),E=Ae(b=>x=>{p.current||mi(x)&&(a!==void 0&&!a(x)||(n&&x.persist(),l==null||l(x,{context:b}),v.current=gi(x),p.current=!0,m.current=x.currentTarget,h.current=setTimeout(()=>{g.current&&(g.current(x,{context:b}),d.current=!0)},t)))},[n,a,l,t]),_=Ae(b=>(x,L)=>{mi(x)&&p.current&&(v.current=null,n&&x.persist(),d.current?u==null||u(x,{context:b}):p.current&&(f==null||f(x,{context:b,reason:L??pn.CancelledByRelease})),d.current=!1,p.current=!1,h.current!==void 0&&clearTimeout(h.current))},[n,u,f]),T=Ae(b=>x=>{if(c==null||c(x,{context:b}),o!==!1&&v.current){const L=gi(x);if(L){const O=o===!0?25:o,$={x:Math.abs(L.x-v.current.x),y:Math.abs(L.y-v.current.y)};($.x>O||$.y>O)&&_(b)(x,pn.CancelledByMovement)}}},[_,o,c]),w=Ae(b=>{if(e===null)return{};switch(r){case hn.Mouse:{const x={onMouseDown:E(b),onMouseMove:T(b),onMouseUp:_(b)};return i&&(x.onMouseLeave=L=>{_(b)(L,pn.CancelledOutsideElement)}),x}case hn.Touch:return{onTouchStart:E(b),onTouchMove:T(b),onTouchEnd:_(b)};case hn.Pointer:{const x={onPointerDown:E(b),onPointerMove:T(b),onPointerUp:_(b)};return i&&(x.onPointerLeave=L=>_(b)(L,pn.CancelledOutsideElement)),x}}},[e,_,i,r,T,E]);return se(()=>{if(!window)return;function b(x){const L=_u(x);_()(L)}return window.addEventListener("mouseup",b),window.addEventListener("touchend",b),window.addEventListener("pointerup",b),()=>{window.removeEventListener("mouseup",b),window.removeEventListener("touchend",b),window.removeEventListener("pointerup",b)}},[_]),se(()=>()=>{h.current!==void 0&&clearTimeout(h.current)},[]),se(()=>{g.current=e},[e]),w}function bu({poll:e,lang:t,readOnly:n,refresh:r=()=>{},votePoll:o=()=>{}}){const[i,a]=ee("default"),{expired:l,expiresAt:c,id:u,multiple:f,options:d,ownVotes:p,voted:m,votersCount:h,votesCount:g,emojis:v}=e,E=!!c&&new Date(c),_=h||g;let T=0;_<=1e3?T=0:_<=1e4?T=1:_<=1e5&&(T=2);const[w,b]=ee(!1),x=d.every(L=>L.votesCount!==null);return s("div",{lang:t,dir:"auto",class:`poll ${n?"read-only":""} ${i==="loading"?"loading":""}`,children:[w&&x||m||l?s(U,{children:[s("div",{class:"poll-options",children:d.map((L,O)=>{const{title:$,votesCount:S}=L,M=_?(S/_*100).toFixed(T):0,V=S>0&&S===Math.max(...d.map(j=>j.votesCount));return s("div",{class:`poll-option poll-result ${V?"poll-option-leading":""}`,style:{"--percentage":`${M}%`},children:[s("div",{class:"poll-option-title",children:[s("span",{children:s(Zt,{text:$,emojis:v})}),m&&p.includes(O)&&s(U,{children:[" ",s(H,{icon:"check-circle"})]})]}),s("div",{class:"poll-option-votes",title:`${S} vote${S===1?"":"s"}`,children:[M,"%"]})]},`${O}-${$}-${S}`)})}),!l&&!m&&s("button",{class:"poll-vote-button plain2",disabled:i==="loading",onClick:L=>{L.preventDefault(),b(!1)},children:[s(H,{icon:"arrow-left",size:"s"})," Hide results"]})]}):s("form",{onSubmit:async L=>{L.preventDefault();const O=L.target,$=new FormData(O),S=[];$.forEach((M,V)=>{V==="poll"&&S.push(M)}),S.length&&(a("loading"),await o(S),a("default"))},children:[s("div",{class:"poll-options",children:d.map((L,O)=>{const{title:$}=L;return s("div",{class:"poll-option",children:s("label",{class:"poll-label",children:[s("input",{type:f?"checkbox":"radio",name:"poll",value:O,disabled:i==="loading",readOnly:n}),s("span",{class:"poll-option-title",children:s(Zt,{text:$,emojis:v})})]})})})}),!n&&s("button",{class:"poll-vote-button",type:"submit",disabled:i==="loading",children:"Vote"})]}),s("p",{class:"poll-meta",children:[!l&&!n&&s("button",{type:"button",class:"plain small",disabled:i==="loading",style:{marginLeft:-8},onClick:L=>{L.preventDefault(),a("loading"),(async()=>(await r(),a("default")))()},title:"Refresh",children:s(H,{icon:"refresh",alt:"Refresh"})}),!m&&!l&&!n&&x&&s("button",{type:"button",class:"plain small",disabled:i==="loading",onClick:L=>{L.preventDefault(),b(!w)},title:w?"Hide results":"Show results",children:[s(H,{icon:w?"eye-open":"eye-close",alt:w?"Hide results":"Show results"})," "]}),!l&&!n&&" ",s("span",{title:g,children:vt(g)})," vote",g===1?"":"s",!!h&&h!==g&&s(U,{children:[" ","• ",s("span",{title:h,children:vt(h)})," ","voter",h===1?"":"s"]})," ","• ",l?"Ended":"Ending"," ",!!E&&s(At,{datetime:E})]})," "]})}const Ps=ct();function wu(e,t){if(!(e!=null&&e.length))return!1;const n=e.filter(i=>{const{filter:a}=i,l=a.context.includes(t);return l?a.expiresAt?new Date(a.expiresAt)>new Date:l:!1});if(!n.length)return!1;if(n.some(i=>i.filter.filterAction==="hide"))return{action:"hide"};if(n.some(i=>i.filter.filterAction==="warn")){const i=n.map(a=>a.filter.title);return{action:"warn",titles:i,titlesStr:i.join(" • ")}}return!1}const ko=lt(wu);function Eu(e,t,n){var a;const{filtered:r}=e;if(!(r!=null&&r.length)||n&&((a=e.account)==null?void 0:a.id)===n)return!0;const i=ko(r,t);return i?i.action!=="hide":!0}function xf(e,t){if(!(e!=null&&e.length))return[];if(!t)return e;const n=mo();return e.filter(r=>Eu(r,t,n))}const Br=document.createElement("div");function jr(e){return e?(Br.innerHTML=e,Br.querySelectorAll(".invisible").forEach(t=>{t.remove()}),Br.innerText.length):0}const mn="speechSynthesis"in window;function vi(e,t){if(mn)try{speechSynthesis.speaking&&speechSynthesis.cancel();const n=new SpeechSynthesisUtterance(e);t&&(n.lang=t),speechSynthesis.speak(n)}catch(n){alert(n)}}function $s(e){var a;const{spoilerText:t,content:n,poll:r,mediaAttachments:o}=e;let i="";return t!=null&&t.trim()?i+=t:i+=fr(n),i=i.trim(),(a=r==null?void 0:r.options)!=null&&a.length&&(i+=`
|
||
|
||
📊:
|
||
${r.options.map(l=>`${r.multiple?"▪️":"•"} ${l.title}`).join(`
|
||
`)}`),o!=null&&o.length&&(i+=" "+o.map(l=>({image:"🖼️",gifv:"🎞️",video:"📹",audio:"🎵",unknown:""})[l.type]||"").join("")),i}function Tu(e,t,n){var r=this,o=B(null),i=B(0),a=B(null),l=B([]),c=B(),u=B(),f=B(e),d=B(!0);f.current=e;var p=typeof window<"u",m=!t&&t!==0&&p;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var h=!!(n=n||{}).leading,g=!("trailing"in n)||!!n.trailing,v="maxWait"in n,E="debounceOnServer"in n&&!!n.debounceOnServer,_=v?Math.max(+n.maxWait||0,t):null;se(function(){return d.current=!0,function(){d.current=!1}},[]);var T=he(function(){var w=function(S){var M=l.current,V=c.current;return l.current=c.current=null,i.current=S,u.current=f.current.apply(V,M)},b=function(S,M){m&&cancelAnimationFrame(a.current),a.current=m?requestAnimationFrame(S):setTimeout(S,M)},x=function(S){if(!d.current)return!1;var M=S-o.current;return!o.current||M>=t||M<0||v&&S-i.current>=_},L=function(S){return a.current=null,g&&l.current?w(S):(l.current=c.current=null,u.current)},O=function S(){var M=Date.now();if(x(M))return L(M);if(d.current){var V=t-(M-o.current),j=v?Math.min(V,_-(M-i.current)):V;b(S,j)}},$=function(){if(p||E){var S=Date.now(),M=x(S);if(l.current=[].slice.call(arguments),c.current=r,o.current=S,M){if(!a.current&&d.current)return i.current=o.current,b(O,t),h?w(o.current):u.current;if(v)return b(O,t),w(o.current)}return a.current||b(O,t),u.current}};return $.cancel=function(){a.current&&(m?cancelAnimationFrame(a.current):clearTimeout(a.current)),i.current=0,l.current=o.current=c.current=a.current=null},$.isPending=function(){return!!a.current},$.flush=function(){return a.current?L(Date.now()):u.current},$},[h,v,t,_,g,m,p,E]);return T}function Su(e,t,n){var r=n===void 0?{}:n,o=r.leading,i=r.trailing;return Tu(e,t,{maxWait:t,leading:o===void 0||o,trailing:i===void 0||i})}function xu(e,t){var n=B(null),r=B(null);r.current=t;var o=B(null);se(function(){i()});var i=Ae(function(){var a=o.current,l=r.current,c=a||(l?l instanceof Element?l:l.current:null);n.current&&n.current.element===c&&n.current.subscriber===e||(n.current&&n.current.cleanup&&n.current.cleanup(),n.current={element:c,subscriber:e,cleanup:c?e(c):void 0})},[e]);return se(function(){return function(){n.current&&n.current.cleanup&&(n.current.cleanup(),n.current=null)}},[]),Ae(function(a){o.current=a,i()},[i])}function yi(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 Mu(e){e===void 0&&(e={});var t=e.onResize,n=B(void 0);n.current=t;var r=e.round||Math.round,o=B(),i=ee({width:void 0,height:void 0}),a=i[0],l=i[1],c=B(!1);se(function(){return c.current=!1,function(){c.current=!0}},[]);var u=B({width:void 0,height:void 0}),f=xu(Ae(function(d){return(!o.current||o.current.box!==e.box||o.current.round!==r)&&(o.current={box:e.box,round:r,instance:new ResizeObserver(function(p){var m=p[0],h=e.box==="border-box"?"borderBoxSize":e.box==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",g=yi(m,h,"inlineSize"),v=yi(m,h,"blockSize"),E=g?r(g):void 0,_=v?r(v):void 0;if(u.current.width!==E||u.current.height!==_){var T={width:E,height:_};u.current.width=E,u.current.height=_,n.current?n.current(T):c.current||l(T)}})}),o.current.instance.observe(d,{box:e.box}),function(){o.current&&o.current.instance.unobserve(d)}},[e.box,r]),e.ref);return he(function(){return{ref:f,width:a.width,height:a.height}},[f,a.width,a.height])}function er({className:e="truncated"}={}){const t=B(),n=Su(({height:r})=>{if(t.current){const{scrollHeight:o}=t.current;let i=o>r;if(i){const{height:a,maxHeight:l}=getComputedStyle(t.current),c=parseInt(l||a,10);i=o>c}t.current.classList.toggle(e,i)}},300);return Mu({ref:t,box:"border-box",onResize:n}),t}const io={public:"earth",unlisted:"group",private:"lock",direct:"message"};var Os="kvfysmfp",Rs="ufhsfnkm",ku=".".concat(Os,"{overflow:hidden;touch-action:none}.").concat(Rs,"{transform-origin: 0 0}"),Lu=typeof window>"u",Au=function(){return!Lu&&("ontouchstart"in window||navigator.maxTouchPoints>0)};var Iu=function(e){var t=e.x,n=e.y,r=e.scale;return"scale3d(".concat(r,",").concat(r,", 1) translate3d(").concat(t,"px, ").concat(n,"px, 0)")};var Cu=Math.min,Pu=Math.max;function _i(e){var t=e.containerDimension,n=e.childDimension,r=e.padding,o=e.centerContained,i=n-t;return i+2*r<=0&&o?[i/2,i/2]:[Cu(i+r,0)-r,Pu(0,i+r)]}var bi=function(e,t){return t?"".concat(e," ").concat(t):e},Kn=Math.abs,$u=Math.min,Ou=Math.sqrt,Ds=typeof window>"u",Ru=Ds?!1:/(Mac)/i.test(navigator.platform),Ht=function(e){return e==="drag"},ln=function(e){return e==="zoom"},Du=function(e){return Ru&&e.ctrlKey},un=function(e){e.stopPropagation(),e.preventDefault()},wi=function(e,t){var n=e.x-t.x,r=e.y-t.y;return Ou(n*n+r*r)},Nu=function(e,t){var n=wi(e[0],e[1]),r=wi(t[0],t[1]);return r/n},Fu=function(e,t){return e>t-.01&&e<t+.01},zu=function(e){return-Math.cos(e*Math.PI)/2+.5},Hu=function(e){return{x:e.pageX,y:e.pageY}},Zn=function(e){return Array.from(e).map(Hu)},Ei=function(e,t){return e+t},Vu=function(e){return{x:e.map(function(t){var n=t.x;return n}).reduce(Ei,0)/e.length,y:e.map(function(t){var n=t.y;return n}).reduce(Ei,0)/e.length}},Ur=function(e,t,n){return n<e?e:n>t?t:n},Bu=function(e){return!(e.ctrlKey||e.metaKey)},ju=function(e){if(e){var t=e.offsetWidth,n=e.offsetHeight;if(t&&n)return{width:t,height:n};var r=getComputedStyle(e),o=parseFloat(r.width),i=parseFloat(r.height);if(i&&o)return{width:o,height:i}}return{width:0,height:0}},Uu=function(e,t){return{x:t.x-e.x,y:t.y-e.y}},Wu=function(e,t){return e.x===t.x&&e.y===t.y},Mt=function(){},qn={x:0,y:0},Ti=function(e){ma(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=Re({},qn),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=Re({},qn),n._startOffset=Re({},qn),n._startTouches=null,n._updatePlaned=!1,n._wheelTimeOut=null,n._zoomFactor=1,n._initialZoomFactor=1,n._draggingPoint=Re({},qn),n._ignoreNextClick=!1,n._containerRef=ga(),n._handleClick=function(r){n._ignoreNextClick&&(n._ignoreNextClick=!1,r.stopPropagation())},n._onResize=function(){var r;!((r=n._containerRef)===null||r===void 0)&&r.current&&(n._updateInitialZoomFactor(),n._setupOffsets(),n._update())},n._handlerOnTouchEnd=n._handlerIfEnable(function(r){n._fingers=r.touches.length,n.props.shouldCancelHandledTouchEndEvents&&(ln(n._interaction)||Ht(n._interaction)&&(n._startOffset.x!==n._offset.x||n._startOffset.y!==n._offset.y))&&un(r),Ht(n._interaction)&&!n._enoughToDrag()&&n._handleClick(r),n._updateInteraction(r)}),n._handlerOnTouchStart=n._handlerIfEnable(function(r){n._firstMove=!0,n._fingers=r.touches.length,n._detectDoubleTap(r)}),n._handlerOnTouchMove=n._handlerIfEnable(function(r){n._isDoubleTap||(n._collectInertia(r),n._firstMove?(n._updateInteraction(r),n._interaction&&un(r),n._startOffset=Re({},n._offset),n._startTouches=Zn(r.touches)):(ln(n._interaction)?n._startTouches&&n._startTouches.length===2&&r.touches.length===2&&n._handleZoom(r,Nu(n._startTouches,Zn(r.touches))):Ht(n._interaction)&&n._handleDrag(r),n._interaction&&(un(r),n._update())),n._firstMove=!1)}),n._handlerWheel=function(r){if(!n.props.shouldInterceptWheel(r)){un(r);var o=r.pageX,i=r.pageY,a=r.deltaY,l=r.deltaMode,c=1;(Du(r)||l===1)&&(c=15);var u={touches:[{pageX:o,pageY:i}]},f=n._getOffsetByFirstTouch(u),d=a*c;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 r=this._getOffsetByFirstTouch(n);this._enoughToDrag()?this._drag(r,this._lastDragPosition):this._virtualDrag(r,this._lastDragPosition),this._offset=this._sanitizeOffset(this._offset),this._lastDragPosition=r},t.prototype._resetInertia=function(){this._velocity=null,this._prevDragMovePoint=null},t.prototype._realizeInertia=function(){var n=this,r=this.props,o=r.inertiaFriction,i=r.inertia;if(!(!i||!this._velocity)){var a=this._velocity,l=a.x,c=a.y;if(l||c){this._stopAnimation(),this._resetInertia();var u=function(){if(l*=o,c*=o,!l&&!c)return n._stopAnimation();var f=Re({},n._offset);if(n._addOffset({x:l,y:c}),n._offset=n._sanitizeOffset(n._offset),Wu(f,n._offset))return n._stopAnimation();n._update({isAnimation:!0})};this._animate(u,{duration:9999})}}},t.prototype._collectInertia=function(n){var r=n.touches;if(this.props.inertia){var o=Zn(r)[0],i=this._prevDragMovePoint;i&&(this._velocity=Uu(o,i)),this._prevDragMovePoint=o}},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,r){var o=Vu(this._getOffsetTouches(n)),i=r/this._lastScale;this._lastScale=r,this._nthZoom+=1,this._nthZoom>3&&(this._scale(i,o),this._drag(o,this._lastZoomCenter),this.props.enforceBoundsDuringZoom&&(this._offset=this._sanitizeOffset(this._offset))),this._lastZoomCenter=o},t.prototype._handleZoomEnd=function(){this.props.onZoomEnd(),this._end()},t.prototype._handleDoubleTap=function(n){var r=this;if(!(this._hasInteraction||this.props.tapZoomFactor===0)){var o=this.props.doubleTapZoomOutOnMaxScale&&this._zoomFactor===this.props.maxZoom||this.props.doubleTapToggleZoom&&this._zoomFactor>1;this.props.onDoubleTap(),this._ignoreNextClick=!0;var i=this._zoomFactor+this.props.tapZoomFactor,a=this._zoomFactor,l=function(u){r._scaleTo(a+u*(i-a),c)},c=this._getOffsetByFirstTouch(n);this._isDoubleTap=!0,a>i&&(c=this._getCurrentZoomCenter()),o?this._zoomOutAnimation():this._animate(l)}},t.prototype._computeInitialOffset=function(){var n=this._getContainerRect(),r=this._getChildSize(),o=r.width,i=r.height,a=-Kn(o*this._getInitialZoomFactor()-n.width)/2,l=-Kn(i*this._getInitialZoomFactor()-n.height)/2;this._initialOffset={x:a,y:l}},t.prototype._resetOffset=function(){this._offset=Re({},this._initialOffset)},t.prototype._setupOffsets=function(){this.props.setOffsetsOnce&&this._isOffsetsSet||(this._isOffsetsSet=!0,this._computeInitialOffset(),this._resetOffset())},t.prototype._sanitizeOffset=function(n){var r=this._getContainerRect(),o=this._getChildSize(),i=o.width,a=o.height,l=i*this._getInitialZoomFactor()*this._zoomFactor,c=a*this._getInitialZoomFactor()*this._zoomFactor,u=_i({containerDimension:r.width,childDimension:l,padding:this.props.horizontalPadding,centerContained:this.props.centerContained}),f=u[0],d=u[1],p=_i({containerDimension:r.height,childDimension:c,padding:this.props.verticalPadding,centerContained:this.props.centerContained}),m=p[0],h=p[1];return{x:Ur(f,d,n.x),y:Ur(m,h,n.y)}},t.prototype.alignCenter=function(n){var r=this,o=Re({duration:250,animated:!0},n),i=o.x,a=o.y,l=o.scale,c=o.animated,u=o.duration,f=i*this._initialZoomFactor,d=a*this._initialZoomFactor,p=this._zoomFactor,m=Re({},this._offset),h=this._getContainerRect(),g={x:h.width/2,y:h.height/2};if(this._zoomFactor=1,this._offset={x:-(g.x-f),y:-(g.y-d)},this._scaleTo(l,g),this._stopAnimation(),!c)return this._update();var v=this._zoomFactor-p,E={x:this._offset.x-m.x,y:this._offset.y-m.y};this._zoomFactor=p,this._offset=Re({},m);var _=function(T){var w=m.x+E.x*T,b=m.y+E.y*T;r._zoomFactor=p+v*T,r._offset=r._sanitizeOffset({x:w,y:b}),r._update()};this._animate(_,{callback:function(){return r._sanitize()},duration:u})},t.prototype.scaleTo=function(n){var r=this,o=Re({duration:250,animated:!0},n),i=o.x,a=o.y,l=o.scale,c=o.animated,u=o.duration,f=this._zoomFactor,d=Re({},this._offset);if(this._zoomFactor=1,this._offset={x:0,y:0},this._scaleTo(l,{x:i,y:a}),this._stopAnimation(),!c)return this._update();var p=this._zoomFactor-f,m={x:this._offset.x-d.x,y:this._offset.y-d.y};this._zoomFactor=f,this._offset=Re({},d);var h=function(g){var v=d.x+m.x*g,E=d.y+m.y*g;r._zoomFactor=f+p*g,r._offset={x:v,y:E},r._update()};this._animate(h,{callback:function(){return r._sanitize()},duration:u})},t.prototype._scaleTo=function(n,r){this._scale(n/this._zoomFactor,r),this._offset=this._sanitizeOffset(this._offset)},t.prototype._scale=function(n,r){n=this._scaleZoomFactor(n),this._addOffset({x:(n-1)*(r.x+this._offset.x),y:(n-1)*(r.y+this._offset.y)}),this.props.onZoomUpdate()},t.prototype._scaleZoomFactor=function(n){var r=this._zoomFactor;return this._zoomFactor*=n,this._zoomFactor=Ur(this.props.minZoom,this.props.maxZoom,this._zoomFactor),this._zoomFactor/r},t.prototype._canDrag=function(){return this.props.draggableUnZoomed||!Fu(this._zoomFactor,1)},t.prototype._drag=function(n,r){if(r){var o=-(n.y-r.y),i=-(n.x-r.x);this.props.lockDragAxis?Kn(i)>Kn(o)?this._addOffset({x:i,y:0}):this._addOffset({y:o,x:0}):this._addOffset({x:i,y:o}),this.props.onDragUpdate()}},t.prototype._virtualDrag=function(n,r){if(r){var o=-(n.y-r.y),i=-(n.x-r.x);this._draggingPoint={x:i+this._draggingPoint.x,y:o+this._draggingPoint.y}}},t.prototype._addOffset=function(n){var r=this._offset,o=r.x,i=r.y;this._offset={x:o+n.x,y:i+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,r=this._sanitizeOffset(n);return r.x!==n.x||r.y!==n.y},t.prototype._sanitizeOffsetAnimation=function(){var n=this,r=this._sanitizeOffset(this._offset),o=Re({},this._offset),i=function(a){var l=o.x+a*(r.x-o.x),c=o.y+a*(r.y-o.y);n._offset={x:l,y:c},n._update()};this._animate(i)},t.prototype._zoomOutAnimation=function(){var n=this;if(this._zoomFactor!==1){var r=this._zoomFactor,o=1,i=this._getCurrentZoomCenter(),a=function(l){var c=r+l*(o-r);n._scaleTo(c,i)};this._animate(a)}},t.prototype._getInitialZoomFactor=function(){return this._initialZoomFactor},t.prototype._getCurrentZoomCenter=function(){var n=this._offset,r=n.x,o=n.y,i=r-this._initialOffset.x,a=o-this._initialOffset.y;return{x:-1*r-i/(1/this._zoomFactor-1),y:-1*o-a/(1/this._zoomFactor-1)}},t.prototype._getOffsetByFirstTouch=function(n){return this._getOffsetTouches(n)[0]},t.prototype._getOffsetTouches=function(n){var r=this.props._document,o=r.documentElement,i=r.body,a=this._getContainerRect(),l=a.top,c=a.left,u=o.scrollTop||i.scrollTop,f=o.scrollLeft||i.scrollLeft,d=l+u,p=c+f;return Zn(n.touches).map(function(m){var h=m.x,g=m.y;return{x:h-p,y:g-d}})},t.prototype._animate=function(n,r){var o=this,i=new Date().getTime(),a=Re({timeFn:zu,callback:function(){},duration:this.props.animationDuration},r),l=a.timeFn,c=a.callback,u=a.duration,f=function(){if(o._inAnimation){var d=new Date().getTime()-i,p=d/u;d>=u?(n(1),o._stopAnimation(),c(),o._update()):(p=l(p),n(p),o._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 ju(n==null?void 0:n.firstElementChild)},t.prototype._updateInitialZoomFactor=function(){var n=this._getContainerRect(),r=this._getChildSize(),o=n.width/r.width,i=n.height/r.height;this._initialZoomFactor=$u(o,i)},t.prototype._bindEvents=function(){var n=this,r=this._containerRef.current;window.ResizeObserver?(this._containerObserver=new ResizeObserver(this._onResize),this._containerObserver.observe(r)):window.addEventListener("resize",this._onResize),this._handlers.forEach(function(o){var i=o[0],a=o[1],l=o[2];(l||r).addEventListener(i,a,!0)}),Array.from(r.querySelectorAll("img")).forEach(function(o){return o.addEventListener("load",n._onResize)})},t.prototype._unSubscribe=function(){var n=this,r=this._containerRef.current;this._containerObserver&&(this._containerObserver.disconnect(),this._containerObserver=null),window.removeEventListener("resize",this._onResize),this._handlers.forEach(function(o){var i=o[0],a=o[1],l=o[2];(l||r).removeEventListener(i,a,!0)}),Array.from(r.querySelectorAll("img")).forEach(function(o){return o.removeEventListener("load",n._onResize)})},t.prototype._update=function(n){var r=this;if(!this._updatePlaned){var o=function(){var i=r._getInitialZoomFactor()*r._zoomFactor,a=-r._offset.x/i,l=-r._offset.y/i;r.props.onUpdate({scale:i,x:a,y:l})};if(n!=null&&n.isAnimation)return o();this._updatePlaned=!0,requestAnimationFrame(function(){r._updatePlaned=!1,o()})}},t.prototype._handlerIfEnable=function(n){var r=this;return function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];r.props.enabled&&n.apply(void 0,o)}},t.prototype._setInteraction=function(n,r){var o=this._interaction;o!==n&&(o&&!n&&(ln(o)?this._handleZoomEnd():Ht(o)&&this._handleDragEnd()),ln(n)?this._handleZoomStart():Ht(n)&&this._handleDragStart(r)),this._interaction=n},t.prototype._distanceBetweenNumbers=function(n,r){return n>r?n-r:r-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 r=this._fingers;if(r===2)return this._setInteraction("zoom",n);if(r===1&&this._canDrag())return this._setInteraction("drag",n);this._setInteraction(null,n)},t.prototype._detectDoubleTap=function(n){var r=new Date().getTime();this._fingers>1&&(this._lastTouchStart=0),r-this._lastTouchStart<300?(un(n),this._handleDoubleTap(n),ln(this._interaction)?this._handleZoomEnd():Ht(this._interaction)&&this._handleDragEnd()):this._isDoubleTap=!1,this._fingers===1&&(this._lastTouchStart=r)},t.prototype.simulate=function(n){var r=this;return function(o){var i=o.pageX,a=o.pageY,l=o.type,c=l==="mouseup",u=l==="mousedown";u&&(o.preventDefault(),r._listenMouseMove=!0),r._listenMouseMove&&(o.touches=c?[]:[{pageX:i,pageY:a}],n(o)),c&&(r._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,r=n.children,o=n.containerProps,i=va.only(r),a=o||{};return Hn.createElement(Hn.Fragment,null,Hn.createElement("style",null,ku),Hn.createElement("div",Re({},a,{ref:this._containerRef,className:bi(Os,a.className)}),$i(i,{className:bi(Rs,i.props.className)})))},t.defaultProps={animationDuration:250,draggableUnZoomed:!0,enforceBoundsDuringZoom:!1,centerContained:!1,enabled:!0,inertia:!0,inertiaFriction:.96,horizontalPadding:0,isTouch:Au,lockDragAxis:!1,maxZoom:5,minZoom:.5,onDoubleTap:Mt,onDragEnd:Mt,onDragStart:Mt,onDragUpdate:Mt,onZoomEnd:Mt,onZoomStart:Mt,onZoomUpdate:Mt,setOffsetsOnce:!1,shouldInterceptWheel:Bu,shouldCancelHandledTouchEndEvents:!1,tapZoomFactor:1,verticalPadding:0,wheelScaleFactor:1500,zoomOutFactor:1.3,doubleTapZoomOutOnMaxScale:!1,doubleTapToggleZoom:!1,_document:Ds?null:window.document},t}(Ri);if(0)var Mf,kf,Lf,Af,If,Cf,Pf;function Wr(e){if(!e)return;let t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=Math.round(e%60);return t===0?`${n}:${r.toString().padStart(2,"0")}`:`${t}:${n.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`}const Yu=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Ku="ALT",Yr=e=>{const{alt:t,lang:n,index:r,...o}=e;return!t||!t.trim()?null:s("button",{type:"button",class:"alt-badge clickable",...o,onClick:i=>{i.stopPropagation(),i.preventDefault(),W.showMediaAlt={alt:t,lang:n}},title:"Media description",children:[Ku,!!r&&s("sup",{children:r})]})},Zu=140,qu=280,Ns=lt(e=>e!=null&&e.length?e.length>Zu||/[\n\r].*[\n\r]/.test(e.trim()):!1);function so({class:e="",media:t,to:n,lang:r,showOriginal:o,autoAnimate:i,showCaption:a,allowLongerCaption:l,altIndex:c,onClick:u=()=>{}}){let{blurhash:f,description:d,meta:p,previewRemoteUrl:m,previewUrl:h,remoteUrl:g,url:v,type:E}=t;/no\-preview\./i.test(h)&&(h=null);const{original:_={},small:T,focus:w}=p||{},b=o?_==null?void 0:_.width:(T==null?void 0:T.width)||(_==null?void 0:_.width),x=o?_==null?void 0:_.height:(T==null?void 0:T.height)||(_==null?void 0:_.height),L=o?v:h||v,O=o?g:m||g,$=b&&x,S=$?b>x?"landscape":"portrait":null,M=f?Mo(f):null,V=B();let j;if(w){const Z=(w.x+1)/2*100,ve=(1-w.y)/2*100;j=`${Z.toFixed(0)}% ${ve.toFixed(0)}%`}const R=B(),I=Ae(({x:Z,y:ve,scale:Q})=>{const{current:ae}=R;if(ae){const ge=Iu({x:Z,y:ve,scale:Q});Q===1?ae.style.removeProperty("transform"):ae.style.setProperty("transform",ge),ae.closest(".media-zoom").style.touchAction=Q<=1.01?"pan-x":""}},[]),[k,D]=ee(!1),C={enabled:k,draggableUnZoomed:!1,inertiaFriction:.9,tapZoomFactor:2,doubleTapToggleZoom:!0,containerProps:{className:"media-zoom",style:{overflow:"visible"}},onUpdate:I},z=he(()=>n?Z=>s(Kt,{to:n,...Z}):"div",[n]),N=O?Gu(O):null,P=E==="unknown"&&N&&/\.(mp4|m4r|m4v|mov|webm)$/i.test(N.pathname),Y=E==="unknown"&&N&&/\.(mp3|ogg|wav|m4a|m4p|m4b)$/i.test(N.pathname),K=E==="image"||E==="unknown"&&h&&!P&&!Y,te=B(),[le,Te]=ee(!1);_n(()=>{if(!K||!o||!te.current)return;const{offsetWidth:Z,offsetHeight:ve}=te.current,Q=b<Z&&x<ve;Q&&Te(Q)},[b,x]);const pe=window.innerHeight*(S==="portrait"?.45:.33),_e=S==="portrait"?0:160,be={"--average-color":M&&`rgb(${M.join(",")})`},ie=b&&x?{"--width":`${b}px`,"--height":`${x}px`,"--aspectWidth":`${b/x*Math.max(_e,pe)}px`,aspectRatio:`${b} / ${x}`,...be}:{...be},ue=Ns(d);let q=!!a&&!o&&!!d&&!ue;l&&!q&&(d==null?void 0:d.length)<=qu&&(q=!0);const ne=q?Z=>{const{children:ve,...Q}=Z;return s("figure",{...Q,children:[ve,s("figcaption",{class:"media-caption",lang:r,dir:"auto",onClick:ae=>{ae.preventDefault(),ae.stopPropagation(),W.showMediaAlt={alt:d,lang:r}},children:d})]})}:U,[Se,dt]=ee(void 0);if(K)return C.containerProps.style.display="inherit",_n(()=>{Yu&&o&&(async()=>{try{await fetch(L,{mode:"no-cors"}),R.current.src=L}catch{}})()},[L]),s(ne,{children:s(z,{ref:te,class:`media media-image ${e}`,onClick:u,"data-orientation":S,"data-has-alt":!q||void 0,"data-has-natural-aspect-ratio":Se||void 0,style:o?{backgroundImage:`url(${h})`,backgroundSize:le?`${b}px ${x}px`:void 0,...be}:ie,children:o?s(Ti,{...C,children:s("img",{ref:R,src:L,alt:d,width:b,height:x,"data-orientation":S,loading:"eager",decoding:"sync",onLoad:Z=>{Z.target.closest(".media-image").style.backgroundImage="",Z.target.closest(".media-zoom").style.display="",D(!0)},onError:Z=>{const{src:ve}=Z.target;ve===L&&O&&L!==O&&(Z.target.src=O)}})}):s(U,{children:[s("img",{src:L,alt:q?"":d,width:b,height:x,"data-orientation":S,loading:"lazy",style:{objectPosition:j||"center","--anim-duration":`${Math.min(Math.max(Math.max(b,x)/100,5),120)}s`},onLoad:Z=>{Z.target.dataset.loaded=!0;const ve=Z.target.closest(".media");if(!$&&ve){const{naturalWidth:Q,naturalHeight:ae}=Z.target;ve.dataset.orientation=Q>ae?"landscape":"portrait",ve.style.setProperty("--width",`${Q}px`),ve.style.setProperty("--height",`${ae}px`),ve.style.aspectRatio=`${Q}/${ae}`}if(ve){const{clientWidth:Q,clientHeight:ae,naturalWidth:ge,naturalHeight:de}=Z.target;if(Q&&ae&&ge&&de)if(ge<88||de<88)ve.dataset.hasSmallDimension=!0;else{const we=de*Q/ge;Math.abs(we-ae)<5&&dt(!0)}}},onError:Z=>{const{src:ve}=Z.target;ve===L&&L!==O&&(Z.target.src=O)}}),!q&&s(Yr,{alt:d,lang:r,index:c})]})})});if(E==="gifv"||E==="video"||P){const Z=_.duration>0,ve=_.duration<31,Q=E==="gifv"&&ve,ae=_.duration<61,ge=Wr(_.duration),de=!o&&!i&&Q,oe=!o&&i&&Q,we=_.duration>5,bt=`
|
||
<video
|
||
src="${v}"
|
||
poster="${h}"
|
||
width="${b}"
|
||
height="${x}"
|
||
data-orientation="${S}"
|
||
preload="auto"
|
||
autoplay
|
||
muted
|
||
playsinline
|
||
${ae?"loop":""}
|
||
ondblclick="this.paused ? this.play() : this.pause()"
|
||
${we?"ontimeupdate=\"this.closest('.media-gif') && this.closest('.media-gif').style.setProperty('--progress', `${~~((this.currentTime / this.duration) * 100)}%`)\"":""}
|
||
></video>
|
||
`,Ve=`
|
||
<video
|
||
src="${v}"
|
||
poster="${h}"
|
||
width="${b}"
|
||
height="${x}"
|
||
data-orientation="${S}"
|
||
preload="auto"
|
||
autoplay
|
||
playsinline
|
||
${ae?"loop":""}
|
||
controls
|
||
></video>
|
||
`;return s(ne,{children:s(z,{class:`media ${e} media-${Q?"gif":"video"} ${oe?"media-contain":""} ${de?"media-hover-animate":""}`,"data-orientation":S,"data-formatted-duration":o?void 0:ge,"data-label":Q&&!o&&!oe?"GIF":void 0,"data-has-alt":!q||void 0,style:!o&&ie,onClick:me=>{if(de)try{V.current.pause()}catch{}u(me)},onMouseEnter:()=>{if(de)try{V.current.play()}catch{}},onMouseLeave:()=>{if(de)try{V.current.pause()}catch{}},onFocus:()=>{if(de)try{V.current.play()}catch{}},onBlur:()=>{if(de)try{V.current.pause()}catch{}},children:[o||oe?Q&&o?s(Ti,{...C,enabled:!0,children:s("div",{ref:R,dangerouslySetInnerHTML:{__html:bt}})}):Q?s("div",{class:"video-container",dangerouslySetInnerHTML:{__html:bt}}):s("div",{class:"video-container",dangerouslySetInnerHTML:{__html:Ve}}):Q?s("video",{ref:V,src:v,poster:h,width:b,height:x,"data-orientation":S,preload:"auto",playsinline:!0,loop:!0,muted:!0,onTimeUpdate:we?me=>{const{target:Le}=me,Ie=Le==null?void 0:Le.closest(".media-gif");if(Ie){const Ce=Le.currentTime/Le.duration*100;Ie.style.setProperty("--progress",`${Ce}%`)}}:void 0}):s(U,{children:[h?s("img",{src:h,alt:q?"":d,width:b,height:x,"data-orientation":S,loading:"lazy",decoding:"async",onLoad:me=>{if(!$){const Le=me.target.closest(".media");if(Le){const{naturalHeight:Ie,naturalWidth:Ce}=me.target;Le.dataset.orientation=Ce>Ie?"landscape":"portrait",Le.style.setProperty("--width",`${Ce}px`),Le.style.setProperty("--height",`${Ie}px`),Le.style.aspectRatio=`${Ce}/${Ie}`}}}}):s("video",{src:v+"#t=0.1",width:b,height:x,"data-orientation":S,preload:"metadata",muted:!0,disablePictureInPicture:!0,onLoadedMetadata:me=>{if(!Z){const{duration:Le}=me.target;if(Le){const Ie=Wr(Le),Ce=me.target.closest(".media-video");Ce&&(Ce.dataset.formattedDuration=Ie)}}}}),s("div",{class:"media-play",children:s(H,{icon:"play",size:"xl"})})]}),!o&&!q&&s(Yr,{alt:d,lang:r,index:c})]})})}else if(E==="audio"||Y){const Z=Wr(_.duration);return s(ne,{children:s(z,{class:`media media-audio ${e}`,"data-formatted-duration":o?void 0:Z,"data-has-alt":!q||void 0,onClick:u,style:!o&&ie,children:[o?s("audio",{src:g||v,preload:"none",controls:!0,autoPlay:!0}):h?s("img",{src:h,alt:q?"":d,width:b,height:x,"data-orientation":S,loading:"lazy",onError:ve=>{var Q,ae;try{(ae=(Q=ve.target)==null?void 0:Q.remove)==null||ae.call(Q)}catch{}}}):null,!o&&s(U,{children:[s("div",{class:"media-play",children:s(H,{icon:"play",size:"xl"})}),!q&&s(Yr,{alt:d,lang:r,index:c})]})]})})}}function Gu(e){return URL.parse(e,location.origin)}const Xu=280,Ju=140,Qu=Di({limit:1,interval:1e3});function ed(e,t){return t.v1.accounts.$select(e).fetch()}const td=po(Qu(ed)),gn={public:"Public",unlisted:"Unlisted",private:"Followers only",direct:"Private mention"},nd=window.ontouchstart!==void 0&&/iPad|iPhone|iPod/.test(navigator.userAgent),rd=new Intl.RelativeTimeFormat,Si=80;function od(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 Kr(e){const{spoilerText:t,content:n,poll:r}=e;return(t?`${t}
|
||
|
||
`:"")+fr(n)+od(r)}const xi=yt(({post:e,instance:t,previewMode:n})=>{const{content:r,emojis:o,language:i,mentions:a,url:l}=e;return s("div",{lang:i,dir:"auto",class:"inner-content",onClick:ml({mentions:a,instance:t,previewMode:n,statusURL:l}),dangerouslySetInnerHTML:{__html:ms(r,{emojis:o,postEnhanceDOM:c=>{c.querySelectorAll('a.u-url[target="_blank"]').forEach(u=>{/http/i.test(u.innerText.trim())||u.removeAttribute("target")})}})}})},(e,t)=>{const{post:n}=e,{post:r}=t;return n.content===r.content}),id={s:"small",m:"medium",l:"large"},sd=lt(e=>{if(e=e==null?void 0:e.trim(),(e==null?void 0:e.length)>500)return null;const n=wa(e)[0];return n!=null&&n.lang&&(n==null?void 0:n.accuracy)>.5?n.lang:null});function qt({statusID:e,status:t,instance:n,size:r="m",contentTextWeight:o,readOnly:i,enableCommentHint:a,withinContext:l,skeleton:c,enableTranslate:u,forceTranslate:f,previewMode:d,onMediaClick:p,quoted:m,onStatusLinkClick:h=()=>{},showFollowedTags:g,allowContextMenu:v,showActionsBar:E,showReplyParent:_,mediaFirst:T}){var Uo,Wo,Yo;if(c)return s("div",{class:`status skeleton ${T?"status-media-first small":""}`,children:[!T&&s(st,{size:"xxl"}),s("div",{class:"container",children:[s("div",{class:"meta",children:[(r==="s"||T)&&s(st,{size:"m"})," ███ ████████"]}),s("div",{class:"content-container",children:[T&&s("div",{class:"media-first-container"}),s("div",{class:`content ${T?"media-first-content":""}`,children:s("p",{children:"████ ████████"})})]})]})]});const{masto:w,instance:b,authenticated:x}=nr({instance:n}),{instance:L}=nr(),O=b===L;let $=it(e||(t==null?void 0:t.id),b);const S=Mn(W);if(t||(t=S.statuses[$]||S.statuses[e],$=it(t==null?void 0:t.id,b)),!t)return null;const{account:{acct:M,avatar:V,avatarStatic:j,id:R,url:I,displayName:k,username:D,emojis:C,bot:z,group:N},id:P,repliesCount:Y,reblogged:K,reblogsCount:te,favourited:le,favouritesCount:Te,bookmarked:pe,poll:_e,muted:be,sensitive:ie,spoilerText:ue,visibility:q,language:ne,editedAt:Se,filtered:dt,card:Z,createdAt:ve,inReplyToId:Q,inReplyToAccountId:ae,content:ge,mentions:de,mediaAttachments:oe,reblog:we,uri:bt,url:Ve,emojis:me,tags:Le,_deleted:Ie,_pinned:Ce,emojiReactions:$t}=t,[Ye,Ln]=ee(null);se(()=>{if(!ge||ne)return;let y;return y=setTimeout(()=>{let F=sd(fr(ge,{preProcess:J=>{J.querySelectorAll(".mention, .hashtag, pre, code, a:has(.invisible)").forEach(ce=>{ce.remove()}),J.querySelectorAll("a").forEach(ce=>{const Oe=ce.innerText.trim();(Oe.startsWith("https://")||Oe.startsWith("http://"))&&ce.remove()})}}));Ln(F)},1e3),()=>clearTimeout(y)},[ge,ne]);const Ee=ne||Ye,wt=!!(oe!=null&&oe.length);T&&wt&&(r="s");const Je=he(()=>mo(),[]),Qe=he(()=>Je&&Je===R,[R,Je]),yr=Ne(Ps),ft=!Qe&&!i&&!d&&ko(dt,yr);if((ft==null?void 0:ft.action)==="hide")return null;const Et=y=>{y.shiftKey};if(r!=="l"&&ft)return s(pd,{status:t,filterInfo:ft,instance:b,containerProps:{onMouseEnter:Et},showFollowedTags:!0,quoted:m});const et=new Date(ve),Jt=new Date(Se);let re=de==null?void 0:de.find(y=>y.id===ae);!re&&ae===P&&(re={url:I,username:D,displayName:k});const[Me,Be]=ee(re);if(!l&&!Me&&ae){const y=W.accounts[ae];y?Be(y):td(ae,w).then(F=>{Be(F),W.accounts[F.id]=F}).catch(F=>{})}const Fe=ae===Je||(de==null?void 0:de.find(y=>y.id===Je)),ye=he(()=>!!(Ko.account.get("preferences")||{})["reading:expand:spoilers"],[]),tt=he(()=>(Ko.account.get("preferences")||{})["reading:expand:media"]||"default",[]),$e=d||ye||!!S.spoilers[P],ze=d||tt==="show_all"||!!S.spoilersMedia[P];if(we)return N?s("div",{"data-state-post-id":$,class:"status-group",onMouseEnter:Et,children:[s("div",{class:"status-pre-meta",children:[s(H,{icon:"group",size:"l",alt:"Group"})," ",s(fn,{account:t.account,instance:b,showAvatar:!0})]}),s(qt,{status:e?null:we,statusID:e?we.id:null,instance:b,size:r,contentTextWeight:o,readOnly:i,mediaFirst:T})]}):s("div",{"data-state-post-id":$,class:"status-reblog",onMouseEnter:Et,children:[s("div",{class:"status-pre-meta",children:[s(H,{icon:"rocket",size:"l"})," ",s(fn,{account:t.account,instance:b,showAvatar:!0})," ",s("span",{children:"boosted"})]}),s(qt,{status:e?null:we,statusID:e?we.id:null,instance:b,size:r,contentTextWeight:o,readOnly:i,enableCommentHint:!0,mediaFirst:T})]});const Qt=Ae(({children:y})=>s("div",{"data-state-post-id":$,class:"status-followed-tags",onMouseEnter:Et,children:[s("div",{class:"status-pre-meta",children:[s(H,{icon:"hashtag",size:"l"})," ",S.statusFollowedTags[$].slice(0,3).map(F=>s(Kt,{to:b?`/${b}/t/${F}`:`/t/${F}`,class:"status-followed-tag-item",children:F},F))]}),y]}),[$,b,S.statusFollowedTags[$]]),An=g&&((Uo=S.statusFollowedTags[$])!=null&&Uo.length)?Qt:U,fe=r==="l",[en,_r]=ee(f),nt=ss(!0),tn=S.settings.contentTranslationHideLanguages||[],{contentTranslation:Ot,contentTranslationAutoInline:Tt}=S.settings;Ot||(u=!1);const ht=he(()=>{if(!Ot||!Tt||i||l&&!fe||d||ue||ie||_e||Z||oe!=null&&oe.length)return!1;const y=jr(ge);return y>0&&y<=Ju},[Ot,Tt,i,l,fe,d,ue,ie,_e,Z,oe,ge]),[br,In]=ee(!1),[qs,wr]=ee(!1),Ao=er(),Io=er(),Gs=er(),Er="Read more →",Rt=B(null),nn="Sorry, your current logged-in instance can't interact with this post from another instance.",Co=Ae(()=>Math.max(Math.round((ue.length+jr(ge))/140)||1,1),[ue,ge]),Po=Tn(et),$o=Se&&Tn(Jt);let rn=x&&q!=="direct"&&q!=="private";q==="private"&&Qe&&(rn=!0);const Cn=y=>{var F;if(!O||!x)return alert(nn);(y!=null&&y.shiftKey||(F=y==null?void 0:y.syntheticEvent)!=null&&F.shiftKey)&&za({replyToStatus:t})||Bn({replyToStatus:t})},Tr=he(()=>oe.some(y=>{var F,J;return!((J=(F=y.description)==null?void 0:F.trim)!=null&&J.call(F))}),[oe]),Oo=he(()=>Math.floor((new Date-et)/(1e3*60*60*24*30)),[et]),nf=async()=>{if(!O||!x)return alert(nn),!1;try{if(!K){let y="Boost this post?";if(Tr&&(y+=`
|
||
|
||
⚠️ Some media have no descriptions.`),!confirm(y))return!1}if(W.statuses[$]={...t,reblogged:!K,reblogsCount:te+(K?-1:1)},K){const y=await w.v1.statuses.$select(P).unreblog();return rt(y,b),!0}else{const y=await w.v1.statuses.$select(P).reblog();return rt(y,b),!0}}catch{return W.statuses[$]=t,!1}},Sr=async()=>{if(!O||!x)return alert(nn),!1;try{if(W.statuses[$]={...t,reblogged:!K,reblogsCount:te+(K?-1:1)},K){const y=await w.v1.statuses.$select(P).unreblog();rt(y,b)}else{const y=await w.v1.statuses.$select(P).reblog();rt(y,b)}return!0}catch{return W.statuses[$]=t,!1}},Ro=async()=>{if(!O||!x)return alert(nn),!1;try{if(W.statuses[$]={...t,favourited:!le,favouritesCount:Te+(le?-1:1)},le){const y=await w.v1.statuses.$select(P).unfavourite();rt(y,b)}else{const y=await w.v1.statuses.$select(P).favourite();rt(y,b)}return!0}catch{return W.statuses[$]=t,!1}},xr=async()=>{try{const y=await Ro();!fe&&y&&Pe(le?`Unliked @${D||M}'s post`:`Liked @${D||M}'s post`)}catch{}},Do=async()=>{if(Un("@mastodon/post-bookmark")){if(!O||!x)return alert(nn),!1;try{if(W.statuses[$]={...t,bookmarked:!pe},pe){const y=await w.v1.statuses.$select(P).unbookmark();rt(y,b)}else{const y=await w.v1.statuses.$select(P).bookmark();rt(y,b)}return!0}catch{return W.statuses[$]=t,!1}}},No=async()=>{try{const y=await Do();!fe&&y&&Pe(pe?`Unbookmarked @${D||M}'s post`:`Bookmarked @${D||M}'s post`)}catch{}},Pn=!!Ee&&Ee!==nt&&!no([Ee],[nt])&&!tn.find(y=>Ee===y||no([Ee],[y])),Fo=B(),zo=B();async function Xs(y){var ce,Oe,Dt,Mr;y&&(Fo.current=w.v1.statuses.$select(e).rebloggedBy.list({limit:Si}),zo.current=w.v1.statuses.$select(e).favouritedBy.list({limit:Si}));const[{value:F},{value:J}]=await Promise.allSettled([Fo.current.next(),zo.current.next()]);if((ce=F.value)!=null&&ce.length||(Oe=J.value)!=null&&Oe.length){const St=[];return(Dt=F.value)!=null&&Dt.length&&St.push(...F.value.map(xt=>(xt._types=["reblog"],xt))),(Mr=J.value)!=null&&Mr.length&&St.push(...J.value.map(xt=>(xt._types=["favourite"],xt))),{value:St,done:F.done&&J.done}}return{value:[],done:!0}}const Js=B(),Ho=["public","unlisted"].includes(q),Qs=["public","unlisted","private"].includes(q),Vo=s(U,{children:[!fe&&O&&s(U,{children:s("div",{class:"menu-control-group-horizontal status-menu",children:[s(ke,{onClick:Cn,children:[s(H,{icon:"comment"}),s("span",{children:Y>0?vt(Y):"Reply"})]}),s(Cr,{subMenu:!0,confirmLabel:s(U,{children:[s(H,{icon:"rocket"}),s("span",{children:K?"Unboost":"Boost"})]}),className:`menu-reblog ${K?"checked":""}`,menuExtras:s(ke,{onClick:()=>{Bn({draftStatus:{status:`
|
||
${Ve}`}})},children:[s(H,{icon:"quote"}),s("span",{children:"Quote"})]}),menuFooter:Tr&&!K?s("div",{class:"footer",children:[s(H,{icon:"alert"}),"Some media have no descriptions."]}):Oo>=3&&s("div",{class:"footer",children:[s(H,{icon:"info"}),s("span",{children:["Old post (",s("strong",{children:rd.format(-Oo,"month")}),")"]})]}),disabled:!rn,onClick:async()=>{try{const y=await Sr();!fe&&y&&Pe(K?`Unboosted @${D||M}'s post`:`Boosted @${D||M}'s post`)}catch{}},children:[s(H,{icon:"rocket"}),s("span",{children:te>0?vt(te):K?"Unboost":"Boost…"})]}),s(ke,{onClick:xr,className:`menu-favourite ${le?"checked":""}`,children:[s(H,{icon:"heart"}),s("span",{children:Te>0?vt(Te):le?"Unlike":"Like"})]}),Un("@mastodon/post-bookmark")&&s(ke,{onClick:No,className:`menu-bookmark ${pe?"checked":""}`,children:[s(H,{icon:"bookmark"}),s("span",{children:pe?"Unbookmark":"Bookmark"})]})]})}),!fe&&O&&(fe||E)&&s(an,{}),(fe||E)&&s(U,{children:s(ke,{onClick:()=>{W.showGenericAccounts={heading:"Boosted/Liked by…",fetchAccounts:Xs,instance:b,showReactions:!0,postID:$}},children:[s(H,{icon:"react"}),s("span",{children:["Boosted/Liked by",s("span",{class:"more-insignificant",children:"…"})]})]})}),!T&&s(U,{children:[(u||!Ee||Pn)&&s(an,{}),u?s("div",{class:mn?"menu-horizontal":"",children:[s(ke,{disabled:en,onClick:()=>{_r(!0)},children:[s(H,{icon:"translate"}),s("span",{children:"Translate"})]}),mn&&s(ke,{onClick:()=>{const y=Kr(t);y&&vi(y,Ee)},children:[s(H,{icon:"speak"}),s("span",{children:"Speak"})]})]}):(!Ee||Pn)&&s("div",{class:mn?"menu-horizontal":"",children:[s(ci,{to:`${b?`/${b}`:""}/s/${P}?translate=1`,children:[s(H,{icon:"translate"}),s("span",{children:"Translate"})]}),mn&&s(ke,{onClick:()=>{const y=Kr(t);y&&vi(y,Ee)},children:[s(H,{icon:"speak"}),s("span",{children:"Speak"})]})]})]}),(!fe&&O||u||!Ee||Pn)&&s(an,{}),!fe&&s(U,{children:s(ci,{to:b?`/${b}/s/${P}`:`/s/${P}`,onClick:y=>{h(y,t)},children:[s(H,{icon:"arrows-right"}),s("small",{children:["View post by @",D||M,s("br",{}),s("span",{class:"more-insignificant",children:[gn[q]," • ",Po]})]})]})}),!!Se&&s(U,{children:s(ke,{onClick:()=>{In(P)},children:[s(H,{icon:"history"}),s("small",{children:["Show Edit History",s("br",{}),s("span",{class:"more-insignificant",children:["Edited: ",$o]})]})]})}),s(ke,{href:Ve,target:"_blank",children:[s(H,{icon:"external"}),s("small",{class:"menu-double-lines",children:fd(Ve)})]}),s("div",{class:"menu-horizontal",children:[s(ke,{onClick:()=>{try{navigator.clipboard.writeText(Ve),Pe("Link copied")}catch{Pe("Unable to copy link")}},children:[s(H,{icon:"link"}),s("span",{children:"Copy"})]}),Ho&&(navigator==null?void 0:navigator.share)&&((Wo=navigator==null?void 0:navigator.canShare)==null?void 0:Wo.call(navigator,{url:Ve}))&&s(ke,{onClick:()=>{try{navigator.share({url:Ve})}catch{alert("Sharing doesn't seem to work.")}},children:[s(H,{icon:"share"}),s("span",{children:"Share…"})]})]}),Ho&&fe&&s(ke,{onClick:()=>{wr(!0)},children:[s(H,{icon:"code"}),s("span",{children:"Embed post"})]}),(Qe||Fe)&&s(an,{}),(Qe||Fe)&&s(ke,{onClick:async()=>{try{const y=await w.v1.statuses.$select(P)[be?"unmute":"mute"]();rt(y,b),Pe(be?"Conversation unmuted":"Conversation muted")}catch{Pe(be?"Unable to unmute conversation":"Unable to mute conversation")}},children:be?s(U,{children:[s(H,{icon:"unmute"}),s("span",{children:"Unmute conversation"})]}):s(U,{children:[s(H,{icon:"mute"}),s("span",{children:"Mute conversation"})]})}),Qe&&Qs&&s(ke,{onClick:async()=>{try{const y=await w.v1.statuses.$select(P)[Ce?"unpin":"pin"]();Pe(Ce?"Post unpinned from profile":"Post pinned to profile")}catch{Pe(Ce?"Unable to unpin post":"Unable to pin post")}},children:Ce?s(U,{children:[s(H,{icon:"unpin"}),s("span",{children:"Unpin from profile"})]}):s(U,{children:[s(H,{icon:"pin"}),s("span",{children:"Pin to profile"})]})}),Qe&&s("div",{class:"menu-horizontal",children:[Un("@mastodon/post-edit")&&s(ke,{onClick:()=>{Bn({editStatus:t})},children:[s(H,{icon:"pencil"}),s("span",{children:"Edit"})]}),fe&&s(Cr,{subMenu:!0,confirmLabel:s(U,{children:[s(H,{icon:"trash"}),s("span",{children:"Delete this post?"})]}),menuItemClassName:"danger",onClick:()=>{(async()=>{try{await w.v1.statuses.$select(P).remove();const y=Fi(P,b);y._deleted=!0,Pe("Deleted")}catch{Pe("Unable to delete")}})()},children:[s(H,{icon:"trash"}),s("span",{children:"Delete…"})]})]}),!Qe&&fe&&s(U,{children:[s(an,{}),s(ke,{className:"danger",onClick:()=>{W.showReportModal={account:t.account,post:t}},children:[s(H,{icon:"flag"}),s("span",{children:"Report post…"})]})]})]}),Bo=B(),[$n,on]=ee(!1),[On,Rn]=ee({}),Dn=v||!fe&&!d&&!Ie&&!m,ea=Cs(nd&&Dn?y=>{var Oe;if(y.pointerType==="mouse")return;const{clientX:F,clientY:J}=((Oe=y.touches)==null?void 0:Oe[0])||y,ce=y.target.closest("a");ce&&Rt.current.contains(ce)&&!ce.getAttribute("href").startsWith("#")||(y.preventDefault(),Rn({anchorPoint:{x:F,y:J},direction:"right"}),on(!0))}:null,{threshold:600,captureEvent:!0,detect:"touch",cancelOnMovement:2}),Nn=!i&&!d&&!m,ta=Bt("r, shift+r",Cn,{enabled:Nn}),na=Bt("f, l",xr,{enabled:Nn}),ra=Bt("d",No,{enabled:Nn}),oa=Bt("shift+b",()=>{(async()=>{try{const y=await Sr();!fe&&y&&Pe(K?`Unboosted @${D||M}'s post`:`Boosted @${D||M}'s post`)}catch{}})()},{enabled:Nn&&rn}),ia=Bt("x",y=>{const F=document.activeElement.closest(".status-link, .status-focus");if(F){const J=F.querySelector(".spoiler-button:not(.spoiling)");if(J)y.stopPropagation(),J.click();else{const ce=F.querySelector(".spoiler-media-button:not(.spoiling)");ce&&(y.stopPropagation(),ce.click())}}}),Fn=oe.slice(0,fe?void 0:4),zn=oe.length>1&&Fn.some(y=>!!y.description&&!Ns(y.description)),sa=he(()=>{if(!zn)return null;const y=[];return Fn.forEach((F,J)=>{if(!F.description)return;const ce=y.findIndex(Oe=>Oe.media.description===F.description);ce===-1?y.push({media:F,indices:[J]}):y[ce].indices.push(J)}),y.map(({media:F,indices:J})=>s("div",{"data-caption-index":J.map(ce=>ce+1).join(" "),onClick:ce=>{ce.preventDefault(),ce.stopPropagation(),W.showMediaAlt={alt:F.description,lang:Ee}},title:F.description,children:[s("sup",{children:J.map(ce=>ce+1).join(" ")})," ",F.description]},F.id))},[zn,Fn,Ee]),sn=he(()=>{var y;return!!Q&&ae===((y=t.account)==null?void 0:y.id)||!!S.statusThreadNumber[$]},[Q,ae,(Yo=t.account)==null?void 0:Yo.id,S.statusThreadNumber[$]]),aa=he(()=>a&&!sn&&!l&&!Q&&q==="public"&&Y>0,[a,sn,l,Q,Y,q]),jo=he(()=>{if(Z||_e||ie||ue||oe!=null&&oe.length||sn||l||Q||Y<=0||!/[???︖❓❔⁇⁈⁉¿‽؟]/.test(ge))return!1;const J=jr(ge);if(J>0&&J<=Xu)return!0},[Z,_e,ie,ue,oe,we,sn,l,Q,Y,ge]);return s(An,{children:[_&&!!(Q&&ae)&&s(hd,{sKey:$}),s("article",{"data-state-post-id":$,ref:y=>{var J;Rt.current=y;const F=((J=y==null?void 0:y.closest)==null?void 0:J.call(y,".timeline-item, .timeline-item-alt, .status-link, .status-focus"))||y;ta.current=F,na.current=F,ra.current=F,oa.current=F,ia.current=F},tabindex:"-1",class:`status ${!l&&Q&&Me?"status-reply-to":""} visibility-${q} ${Ce?"status-pinned":""} ${id[r]} ${Ie?"status-deleted":""} ${m?"status-card":""} ${$n?"status-menu-open":""} ${T&&wt?"status-media-first":""}`,onMouseEnter:Et,onContextMenu:y=>{var ce,Oe;if(!Dn||y.metaKey)return;const F=y.target.closest("a");if(F&&Rt.current.contains(F)&&!F.getAttribute("href").startsWith("#"))return;const J=(ce=window.getSelection)==null?void 0:ce.call(window);if(J.toString().length>0){const{anchorNode:Dt}=J;if((Oe=Rt.current)!=null&&Oe.contains(Dt))return}y.preventDefault(),Rn({anchorPoint:{x:y.clientX,y:y.clientY},direction:"right"}),on(!0)},...Dn?ea():{},children:[Dn&&s(qi,{ref:Bo,state:$n?"open":void 0,...On,onClose:y=>{var F,J,ce;on(!1),(y==null?void 0:y.reason)==="click"&&((ce=(J=(F=Rt.current)==null?void 0:F.closest("[tabindex]"))==null?void 0:J.focus)==null||ce.call(J))},portal:{target:document.body},containerProps:{style:{zIndex:1001},onClick:()=>{var y,F;(F=(y=Bo.current)==null?void 0:y.closeMenu)==null||F.call(y)}},overflow:"auto",boundingBoxPadding:os(),unmountOnClose:!0,children:Vo}),E&&r!=="l"&&!d&&!i&&!Ie&&!m&&s("div",{class:`status-actions ${$n==="actions-bar"?"open":""}`,ref:Js,children:[s(Vt,{size:"s",title:"Reply",alt:"Reply",class:"reply-button",icon:"comment",iconSize:"m",onClick:Cn}),s(Vt,{size:"s",checked:le,title:["Like","Unlike"],alt:["Like","Liked"],class:"favourite-button",icon:"heart",iconSize:"m",count:Te,onClick:xr}),s("button",{type:"button",title:"More",class:"plain more-button",onClick:y=>{y.preventDefault(),y.stopPropagation(),Rn({anchorRef:{current:y.currentTarget},align:"start",direction:"left",gap:0,shift:-8}),on("actions-bar")},children:s(H,{icon:"more2",size:"m",alt:"More"})})]}),r!=="l"&&s("div",{class:"status-badge",children:[K&&s(H,{class:"reblog",icon:"rocket",size:"s"}),le&&s(H,{class:"favourite",icon:"heart",size:"s"}),pe&&s(H,{class:"bookmark",icon:"bookmark",size:"s"}),Ce&&s(H,{class:"pin",icon:"pin",size:"s"})]}),r!=="s"&&s("a",{href:I,tabindex:"-1",title:`@${M}`,onClick:y=>{y.preventDefault(),y.stopPropagation(),W.showAccount={account:t.account,instance:b}},children:s(st,{url:j||V,size:"xxl",squircle:z})}),s("div",{class:"container",children:[s("div",{class:"meta",children:[s("span",{class:"meta-name",children:s(fn,{account:t.account,instance:b,showAvatar:r==="s",showAcct:fe})})," ",r!=="l"&&(Ie?s("span",{class:"status-deleted-tag",children:"Deleted"}):Ve&&!d&&!i&&!m?s(Kt,{to:b?`/${b}/s/${P}`:`/s/${P}`,onClick:y=>{y.metaKey||y.ctrlKey||y.shiftKey||y.altKey||y.which===2||(y.preventDefault(),y.stopPropagation(),h==null||h(y,t),Rn({anchorRef:{current:y.currentTarget},align:"end",direction:"bottom",gap:4}),on(!0))},class:`time ${$n&&(On!=null&&On.anchorRef)?"is-open":""}`,children:[aa&&!jo?s(H,{icon:"comment2",size:"s",alt:`${Y} ${Y===1?"reply":"replies"}`}):q!=="public"&&q!=="direct"&&s(H,{icon:io[q],alt:gn[q],size:"s"})," ",s(At,{datetime:et,format:"micro"}),!d&&!i&&s(H,{icon:"more2",class:"more"})]}):s("span",{class:"time",children:[q!=="public"&&q!=="direct"&&s(U,{children:[s(H,{icon:io[q],alt:gn[q],size:"s"})," "]}),s(At,{datetime:et,format:"micro"})]}))]}),q==="direct"&&s(U,{children:[s("div",{class:"status-direct-badge",children:"Private mention"})," "]}),!l&&s(U,{children:sn?s("div",{class:"status-thread-badge",children:[s(H,{icon:"thread",size:"s"}),"Thread",S.statusThreadNumber[$]?` ${S.statusThreadNumber[$]}/X`:""]}):!!Q&&!!Me&&(!!ue||!de.find(y=>y.id===ae))&&s("div",{class:"status-reply-badge",children:[s(H,{icon:"reply"})," ",s(fn,{account:Me,instance:b,short:!0})]})}),s("div",{class:`content-container ${ue||ie?"has-spoiler":""} ${$e?"show-spoiler":""} ${ze?"show-media":""}`,"data-content-text-weight":o?Co():null,style:(fe||o)&&{"--content-text-weight":Co()},children:T&&wt?s(U,{children:[(!!ue||!!ie)&&!ye&&s(U,{children:[!!ue&&s("span",{class:"spoiler-content media-first-spoiler-content",lang:Ee,dir:"auto",ref:Ao,"data-read-more":Er,children:[s(Zt,{text:ue,emojis:me})," "]}),s("button",{class:`light spoiler-button media-first-spoiler-button ${$e?"spoiling":""}`,type:"button",onClick:y=>{y.preventDefault(),y.stopPropagation(),$e?(delete W.spoilers[P],ye||delete W.spoilersMedia[P]):(W.spoilers[P]=!0,ye||(W.spoilersMedia[P]=!0))},children:[s(H,{icon:$e?"eye-open":"eye-close"})," ",$e?"Show less":"Show content"]})]}),s(cd,{mediaAttachments:oe,language:Ee,postID:P,instance:b}),!!ge&&s("div",{class:"media-first-content content",ref:Io,children:s(xi,{post:t,instance:b,previewMode:d})})]}):s(U,{children:[!!ue&&s(U,{children:[s("div",{class:"content spoiler-content",lang:Ee,dir:"auto",ref:Ao,"data-read-more":Er,children:s("p",{children:s(Zt,{text:ue,emojis:me})})}),ye||d?s("div",{class:"spoiler-divider",children:[s(H,{icon:"eye-open"})," Content warning"]}):s("button",{class:`light spoiler-button ${$e?"spoiling":""}`,type:"button",onClick:y=>{y.preventDefault(),y.stopPropagation(),$e?(delete W.spoilers[P],ye||delete W.spoilersMedia[P]):(W.spoilers[P]=!0,ye||(W.spoilersMedia[P]=!0))},children:[s(H,{icon:$e?"eye-open":"eye-close"})," ",$e?"Show less":"Show content"]})]}),!!ge&&s("div",{class:"content",ref:Io,"data-read-more":Er,children:[s(xi,{post:t,instance:b,previewMode:d}),s(md,{id:P,instance:b,level:m})]}),!!_e&&s(bu,{lang:Ee,poll:_e,readOnly:i||!O||!x,onUpdate:y=>{W.statuses[$].poll=y},refresh:()=>w.v1.polls.$select(_e.id).fetch().then(y=>{W.statuses[$].poll=y}).catch(y=>{}),votePoll:y=>w.v1.polls.$select(_e.id).votes.create({choices:y}).then(F=>{W.statuses[$].poll=F}).catch(F=>{})}),((u||ht)&&!!ge.trim()&&!!fr(dr(ge,me))&&Pn||en)&&s(Gl,{forceTranslate:en||ht,mini:!fe&&!l,sourceLanguage:Ee,autoDetected:Ye,text:Kr(t)}),!d&&ie&&!!oe.length&&tt!=="show_all"&&s("button",{class:`plain spoiler-media-button ${ze?"spoiling":""}`,type:"button",hidden:!ye&&!!ue,onClick:y=>{y.preventDefault(),y.stopPropagation(),ze?delete W.spoilersMedia[P]:W.spoilersMedia[P]=!0},children:[s(H,{icon:ze?"eye-open":"eye-close"})," ",ze?"Show less":"Show media"]}),!!oe.length&&(oe.length>1&&(fe||l&&r==="m")?s("div",{class:"media-large-container",children:oe.map((y,F)=>s("div",{class:"media-container media-eq1",children:s(so,{media:y,autoAnimate:!0,showCaption:!0,allowLongerCaption:!ge,lang:Ee,to:`/${b}/s/${P}?${l?"media":"media-only"}=${F+1}`,onClick:p?J=>p(J,F,y,t):void 0})},y.id))}):s(ad,{lang:Ee,enabled:zn,captionChildren:sa,children:s("div",{ref:Gs,class:`media-container media-eq${oe.length} ${oe.length>2?"media-gt2":""} ${oe.length>4?"media-gt4":""}`,children:Fn.map((y,F)=>s(so,{media:y,autoAnimate:fe,showCaption:oe.length===1,allowLongerCaption:!ge&&oe.length===1,lang:Ee,altIndex:zn&&!!y.description&&F+1,to:`/${b}/s/${P}?${l?"media":"media-only"}=${F+1}`,onClick:p?J=>{p(J,F,y,t)}:void 0},y.id))})})),!!Z&&/^https/i.test(Z==null?void 0:Z.url)&&!ie&&!ue&&!_e&&!oe.length&&!S.statusQuotes[$]&&s(ld,{card:Z,selfReferential:(Z==null?void 0:Z.url)===t.url||(Z==null?void 0:Z.url)===t.uri,instance:L})]})}),!fe&&jo&&s("div",{class:"content-comment-hint insignificant",children:[s(H,{icon:"comment2",alt:"Replies"})," ",Y]}),fe&&s(U,{children:[s("div",{class:"extra-meta",children:Ie?s("span",{class:"status-deleted-tag",children:"Deleted"}):s(U,{children:[s("span",{children:gn[q]})," •"," ",s("a",{href:Ve,target:"_blank",rel:"noopener noreferrer",children:s("time",{class:"created",datetime:et.toISOString(),title:et.toLocaleString(),children:Po})}),Se&&s(U,{children:[" ","• ",s(H,{icon:"pencil",alt:"Edited"})," ",s("time",{tabIndex:"0",class:"edited",datetime:Jt.toISOString(),onClick:()=>{In(P)},children:$o})]})]})}),!!($t!=null&&$t.length)&&s("div",{class:"emoji-reactions",children:$t.map(y=>{const{name:F,count:J,me:ce,url:Oe,staticUrl:Dt}=y;if(Oe)return s("span",{class:`emoji-reaction tag ${ce?"":"insignificant"}`,children:[s(to,{alt:F,url:Oe,staticUrl:Dt})," ",J]});if(/^:.+?:$/.test(F)){const St=me.find(xt=>xt.shortcode===F.replace(/^:/,"").replace(/:$/,""));if(St)return s("span",{class:`emoji-reaction tag ${ce?"":"insignificant"}`,children:[s(to,{alt:F,url:St.url,staticUrl:St.staticUrl})," ",J]})}return s("span",{class:`emoji-reaction tag ${ce?"":"insignificant"}`,children:[F," ",J]})})}),s("div",{class:`actions ${Ie?"disabled":""}`,children:[s("div",{class:"action has-count",children:s(Vt,{title:"Reply",alt:"Comments",class:"reply-button",icon:"comment",count:Y,onClick:Cn})}),s(Cr,{disabled:!rn,onClick:Sr,confirmLabel:s(U,{children:[s(H,{icon:"rocket"}),s("span",{children:K?"Unboost":"Boost"})]}),menuExtras:s(ke,{onClick:()=>{Bn({draftStatus:{status:`
|
||
${Ve}`}})},children:[s(H,{icon:"quote"}),s("span",{children:"Quote"})]}),menuFooter:Tr&&!K&&s("div",{class:"footer",children:[s(H,{icon:"alert"}),"Some media have no descriptions."]}),children:s("div",{class:"action has-count",children:s(Vt,{checked:K,title:["Boost","Unboost"],alt:["Boost","Boosted"],class:"reblog-button",icon:"rocket",count:te,disabled:!rn})})}),s("div",{class:"action has-count",children:s(Vt,{checked:le,title:["Like","Unlike"],alt:["Like","Liked"],class:"favourite-button",icon:"heart",count:Te,onClick:Ro})}),Un("@mastodon/post-bookmark")&&s("div",{class:"action",children:s(Vt,{checked:pe,title:["Bookmark","Unbookmark"],alt:["Bookmark","Bookmarked"],class:"bookmark-button",icon:"bookmark",onClick:Do})}),s(is,{portal:{target:document.querySelector(".status-deck")||document.body},align:"end",gap:4,overflow:"auto",viewScroll:"close",menuButton:s("div",{class:"action",children:s("button",{type:"button",title:"More",class:"plain more-button",children:s(H,{icon:"more",size:"l",alt:"More"})})}),children:Vo})]})]})]}),!!br&&s(Gr,{onClick:y=>{y.target===y.currentTarget&&In(!1)},children:s(ud,{statusID:br,instance:b,fetchStatusHistory:()=>w.v1.statuses.$select(br).history.list(),onClose:()=>{var y;In(!1),(y=Rt.current)==null||y.focus()}})}),!!qs&&s(Gr,{onClick:y=>{y.target===y.currentTarget&&wr(!1)},children:s(dd,{post:t,instance:b,onClose:()=>{wr(!1)}})})]})]})}function ad(e){const{enabled:t,children:n,lang:r,captionChildren:o}=e;return!t||!o?n:s("figure",{class:"media-figure-multiple",children:[n,s("figcaption",{lang:r,dir:"auto",children:o})]})}function cd(e){const{mediaAttachments:t,language:n,postID:r,instance:o}=e,i=t.length>1,a=B(),[l,c]=ee(0);return se(()=>{let u=()=>{const{clientWidth:f,scrollLeft:d}=a.current,p=Math.round(d/f);c(p)};return a.current&&a.current.addEventListener("scroll",u,{passive:!0}),()=>{a.current&&a.current.removeEventListener("scroll",u)}},[]),s(U,{children:[s("div",{class:"media-first-container",children:[s("div",{class:"media-first-carousel",ref:a,children:t.map((u,f)=>s("div",{class:"media-first-item",children:s(so,{media:u,lang:n,to:`/${o}/s/${r}?media=${f+1}`})},u.id))}),i&&s("div",{class:"media-carousel-controls",children:[s("div",{class:"carousel-indexer",children:[l+1,"/",t.length]}),s("label",{class:"media-carousel-button",children:s("button",{type:"button",class:"carousel-button",hidden:l===0,onClick:u=>{u.preventDefault(),u.stopPropagation(),a.current.focus(),a.current.scrollTo({left:a.current.clientWidth*(l-1),behavior:"smooth"})},children:s(H,{icon:"arrow-left"})})}),s("label",{class:"media-carousel-button",children:s("button",{type:"button",class:"carousel-button",hidden:l===t.length-1,onClick:u=>{u.preventDefault(),u.stopPropagation(),a.current.focus(),a.current.scrollTo({left:a.current.clientWidth*(l+1),behavior:"smooth"})},children:s(H,{icon:"arrow-right"})})})]})]}),i&&s("div",{class:"media-carousel-dots",style:{"--dots-count":t.length},children:t.map((u,f)=>s("span",{class:`carousel-dot ${f===l?"active":""}`},u.id))})]})}function ld({card:e,selfReferential:t,instance:n}){var V;const r=Mn(W),{blurhash:o,title:i,description:a,html:l,providerName:c,providerUrl:u,authorName:f,authorUrl:d,width:p,height:m,image:h,imageDescription:g,url:v,type:E,embedUrl:_,language:T,publishedAt:w}=e,b=i||c||f,L=p/m>=1.2?"large":"",[O,$]=ee(null);if(se(()=>{b&&h&&!t&&ya(v)&&_a(n,v).then(j=>{if(!j)return;const{id:R,url:I}=j;$("#"+I)})},[b,h,t]),r.unfurledLinks[v])return null;const S=/<iframe/i.test(l),M=Ae(j=>{S&&(j.preventDefault(),W.showEmbedModal={html:l,url:v||_,width:p,height:m})},[S]);if(b&&(h||E==="photo"&&o)){const j=ro.toUnicode(URL.parse(v).hostname.replace(/^www\./,"").replace(/\/$/,""));let R;const I=h&&o?Mo(o):null;if(!h){const z=cu(o,44,44),N=window.OffscreenCanvas?new OffscreenCanvas(1,1):document.createElement("canvas");N.width=44,N.height=44;const P=N.getContext("2d");P.imageSmoothingEnabled=!1;const Y=P.createImageData(44,44);Y.data.set(z),P.putImageData(Y,0,0),R=N.toDataURL()}const k=["x.com","twitter.com","threads.net"].includes(j);return s("a",{href:O||v,target:O?null:"_blank",rel:"nofollow noopener noreferrer",class:`card link ${k?"card-post":""} ${R?"":L}`,lang:T,dir:"auto",style:{"--average-color":I&&`rgb(${I.join(",")})`},onClick:M,children:[s("div",{class:"card-image",children:s("img",{src:h||R,width:p,height:m,loading:"lazy",alt:g||"",onError:D=>{try{D.target.style.display="none"}catch{}},style:{"--anim-duration":p&&m&&`${Math.min(Math.max(Math.max(p,m)/100,5),120)}s`}})}),s("div",{class:"meta-container",children:[s("p",{class:"meta domain",children:[s("span",{class:"domain",children:j})," ",!!w&&s(U,{children:"· "}),!!w&&s(U,{children:s(At,{datetime:w,format:"micro"})})]}),s("p",{class:"title",dir:"auto",title:i,children:i}),s("p",{class:"meta",dir:"auto",title:a,children:a||!!w&&s(At,{datetime:w,format:"micro"})})]})]})}else{if(E==="photo")return s("a",{href:v,target:"_blank",rel:"nofollow noopener noreferrer",class:"card photo",onClick:M,children:s("img",{src:_,width:p,height:m,alt:i||a,loading:"lazy",style:{height:"auto",aspectRatio:`${p}/${m}`}})});if(E==="video"&&/youtube/i.test(c)){const j=(V=v.match(/watch\?v=([^&]+)/))==null?void 0:V[1];if(j)return s("a",{class:"card video",onClick:M,children:s("lite-youtube",{videoid:j,nocookie:!0})})}if(b&&!h){const j=ro.toUnicode(URL.parse(v).hostname.replace(/^www\./,""));return s("a",{href:O||v,target:O?null:"_blank",rel:"nofollow noopener noreferrer",class:"card link no-image",lang:T,onClick:M,children:s("div",{class:"meta-container",children:[s("p",{class:"meta domain",children:[s("span",{class:"domain",children:[s(H,{icon:"link",size:"s"})," ",s("span",{children:j})]})," ",!!w&&s(U,{children:"· "}),!!w&&s(U,{children:s(At,{datetime:w,format:"micro"})})]}),s("p",{class:"title",title:i,children:i}),s("p",{class:"meta",title:a||c||f,children:a||c||f})]})})}}}function ud({statusID:e,instance:t,fetchStatusHistory:n=()=>{},onClose:r}){const[o,i]=ee("default"),[a,l]=ee([]);return se(()=>{i("loading"),(async()=>{try{const c=await n();l(c),i("default")}catch{i("error")}})()},[]),s("div",{id:"edit-history",class:"sheet",children:[!!r&&s("button",{type:"button",class:"sheet-close",onClick:r,children:s(H,{icon:"x"})}),s("header",{children:[s("h2",{children:"Edit History"}),o==="error"&&s("p",{children:"Failed to load history"}),o==="loading"&&s("p",{children:[s(Ni,{abrupt:!0})," Loading…"]})]}),s("main",{tabIndex:"-1",children:a.length>0&&s("ol",{children:a.map(c=>{const{createdAt:u}=c,f=new Date(u);return s("li",{class:"history-item",children:[s("h3",{children:s("time",{children:Tn(f,{formatOpts:{weekday:"short",second:"numeric"}})})}),s(qt,{status:c,instance:t,size:"s",withinContext:!0,readOnly:!0,previewMode:!0})]},u)})})})]})}function Fs(e,t,n=0){var M;const{account:{url:r,displayName:o,acct:i,username:a,emojis:l,bot:c,group:u},id:f,poll:d,spoilerText:p,language:m,editedAt:h,createdAt:g,content:v,mediaAttachments:E,url:_,emojis:T}=e,w=it(f,t),x=(W.statusQuotes[w]||[]).filter((V,j,R)=>R.findIndex(I=>I.url===V.url)===j),L=x.length&&n<=2?x.map(V=>{const{id:j,instance:R}=V,I=it(j,R),k=W.statuses[I];if(k)return Fs(k,R,++n)}).join(""):"",O=new Date(g),$=dr(v,T)+`
|
||
`+L+`
|
||
`+((M=d==null?void 0:d.options)!=null&&M.length?`
|
||
<p>📊:</p>
|
||
<ul>
|
||
${d.options.map(V=>`
|
||
<li>
|
||
${V.title}
|
||
${V.votesCount>=0?` (${V.votesCount})`:""}
|
||
</li>
|
||
`).join("")}
|
||
</ul>`:"")+(E.length>0?`
|
||
`+E.map(V=>{const{description:j,meta:R,previewRemoteUrl:I,previewUrl:k,remoteUrl:D,url:C,type:z}=V,{original:N={},small:P}=R||{},Y=(P==null?void 0:P.width)||(N==null?void 0:N.width),K=(P==null?void 0:P.height)||(N==null?void 0:N.height),te=D||C,le=I||k,Te=le||te,pe=te?URL.parse(te):null,_e=z==="unknown"&&pe&&/\.(mp4|m4r|m4v|mov|webm)$/i.test(pe.pathname),be=z==="unknown"&&pe&&/\.(mp3|ogg|wav|m4a|m4p|m4b)$/i.test(pe.pathname),ie=z==="image"||z==="unknown"&&le&&!_e&&!be,ue=z==="gifv"||z==="video"||_e,q=z==="audio"||be;let ne="";return ie?ne=`<img src="${Te}" width="${Y}" height="${K}" alt="${j}" loading="lazy" />`:ue?ne=`
|
||
<video src="${te}" width="${Y}" height="${K}" controls preload="auto" poster="${le}" loading="lazy"></video>
|
||
${j?`<figcaption>${j}</figcaption>`:""}
|
||
`:q?ne=`
|
||
<audio src="${te}" controls preload="auto"></audio>
|
||
${j?`<figcaption>${j}</figcaption>`:""}
|
||
`:ne=`
|
||
<a href="${te}">📄 ${j||te}</a>
|
||
`,`<figure>${ne}</figure>`}).join(`
|
||
`):""),S=`
|
||
<blockquote lang="${m}" cite="${_}">
|
||
${p?`
|
||
<details>
|
||
<summary>${p}</summary>
|
||
${$}
|
||
</details>
|
||
`:$}
|
||
<footer>
|
||
— ${dr(o,l)} (@${i}) <a href="${_}"><time datetime="${O.toISOString()}">${O.toLocaleString()}</time></a>
|
||
</footer>
|
||
</blockquote>
|
||
`;return vu(S)}function dd({post:e,instance:t,onClose:n}){const{account:{url:r,displayName:o,username:i,emojis:a,bot:l,group:c},id:u,poll:f,spoilerText:d,language:p,editedAt:m,createdAt:h,content:g,mediaAttachments:v,url:E,emojis:_}=e,T=Fs(e,t);return s("div",{id:"embed-post",class:"sheet",children:[!!n&&s("button",{type:"button",class:"sheet-close",onClick:n,children:s(H,{icon:"x"})}),s("header",{children:s("h2",{children:"Embed post"})}),s("main",{tabIndex:"-1",children:[s("h3",{children:"HTML Code"}),s("textarea",{class:"embed-code",readonly:!0,onClick:w=>{w.target.select()},children:T}),s("button",{type:"button",onClick:()=>{try{navigator.clipboard.writeText(T),Pe("HTML code copied")}catch{Pe("Unable to copy HTML code")}},children:[s(H,{icon:"clipboard"})," ",s("span",{children:"Copy"})]}),!!(v!=null&&v.length)&&s("section",{children:[s("p",{children:"Media attachments:"}),s("ol",{class:"links-list",children:v.map(w=>s("li",{children:s("a",{href:w.remoteUrl||w.url,target:"_blank",download:!0,children:w.remoteUrl||w.url})},w.id))})]}),!!(a!=null&&a.length)&&s("section",{children:[s("p",{children:"Account Emojis:"}),s("ul",{children:a.map(w=>s("li",{children:[s("picture",{children:[s("source",{srcset:w.staticUrl,media:"(prefers-reduced-motion: reduce)"}),s("img",{class:"shortcode-emoji emoji",src:w.url,alt:`:${w.shortcode}:`,width:"16",height:"16",loading:"lazy",decoding:"async"})]})," ",s("code",{children:[":",w.shortcode,":"]})," (",s("a",{href:w.url,target:"_blank",download:!0,children:"url"}),")",w.staticUrl?s(U,{children:[" ","(",s("a",{href:w.staticUrl,target:"_blank",download:!0,children:"static"}),")"]}):null]},w.shortcode))})]}),!!(_!=null&&_.length)&&s("section",{children:[s("p",{children:"Emojis:"}),s("ul",{children:_.map(w=>s("li",{children:[s("picture",{children:[s("source",{srcset:w.staticUrl,media:"(prefers-reduced-motion: reduce)"}),s("img",{class:"shortcode-emoji emoji",src:w.url,alt:`:${w.shortcode}:`,width:"16",height:"16",loading:"lazy",decoding:"async"})]})," ",s("code",{children:[":",w.shortcode,":"]})," (",s("a",{href:w.url,target:"_blank",download:!0,children:"url"}),")",w.staticUrl?s(U,{children:[" ","(",s("a",{href:w.staticUrl,target:"_blank",download:!0,children:"static"}),")"]}):null]},w.shortcode))})]}),s("section",{children:s("small",{children:[s("p",{children:"Notes:"}),s("ul",{children:[s("li",{children:"This is static, unstyled and scriptless. You may need to apply your own styles and edit as needed."}),s("li",{children:"Polls are not interactive, becomes a list with vote counts."}),s("li",{children:"Media attachments can be images, videos, audios or any file types."}),s("li",{children:"Post could be edited or deleted later."})]})]})}),s("h3",{children:"Preview"}),s("output",{class:"embed-preview",dangerouslySetInnerHTML:{__html:T}}),s("p",{children:s("small",{children:"Note: This preview is lightly styled."})})]})]})}function Vt({checked:e,count:t,class:n,title:r,alt:o,size:i,icon:a,iconSize:l="l",onClick:c,...u}){typeof r=="string"&&(r=[r,r]),typeof o=="string"&&(o=[o,o]);const[f,d]=ee(r[0]||""),[p,m]=ee(o[0]||"");return se(()=>{e?(d(r[1]||""),m(o[1]||"")):(d(r[0]||""),m(o[0]||""))},[e,r,o]),s("button",{type:"button",title:f,class:`plain ${i?"small":""} ${n} ${e?"checked":""}`,onClick:h=>{c&&(h.preventDefault(),h.stopPropagation(),c(h))},...u,children:[s(H,{icon:a,size:l,alt:p}),!!t&&s(U,{children:[" ",s("small",{title:t,children:vt(t)})]})]})}function fd(e){if(!e)return;const t=URL.parse(e),{host:n,pathname:r}=t,o=r.replace(/\/$/,""),[i,a,l]=o.match(/\/(@[^\/]+)\/(.*)/)||[];return s(U,{children:[ro.toUnicode(n),a?s(U,{children:["/",a,s("wbr",{}),s("span",{class:"more-insignificant",children:["/",l]})]}):s("span",{class:"more-insignificant",children:o})]})}function hd({sKey:e}){const n=Mn(W).statusReply[e];if(!n)return null;const{id:r,instance:o}=n,i=Fi(r,o);if(!i)return null;const{sensitive:a,spoilerText:l,account:{avatar:c,avatarStatic:u,bot:f}={},visibility:d,content:p,language:m,filtered:h}=i;if(a||l||!p)return null;const g=it(r,o),v=$s(i),E=Ne(Ps),_=ko(h,E);if((_==null?void 0:_.action)==="hide")return null;const T=(_==null?void 0:_.titlesStr)||"";return s("article",{class:`status compact-reply ${d==="direct"?"visibility-direct":""}`,tabindex:"-1","data-state-post-id":g,children:[s(st,{url:u||c,squircle:f}),s("div",{class:"content-compact",title:v,lang:m,dir:"auto",children:_?s("b",{class:"status-filtered-badge badge-meta",title:T,children:[s("span",{children:"Filtered"}),s("span",{children:T})]}):s("span",{children:v})})]})}function pd({status:e,filterInfo:t,instance:n,containerProps:r={},showFollowedTags:o,quoted:i}){var V;const a=Mn(W),{id:l,account:{avatar:c,avatarStatic:u,bot:f,group:d},createdAt:p,visibility:m,reblog:h}=e,g=!!h,v=(t==null?void 0:t.titlesStr)||"",E=new Date(p),_=$s(e.reblog||e),[T,w]=ee(!1),b=Cs(()=>{w(!0)},{threshold:600,captureEvent:!0,detect:"touch",cancelOnMovement:2}),x=er(),L=it(e.id,n),O=it(e.id,n)+" "+(it(h==null?void 0:h.id,n)||""),$=(h==null?void 0:h.id)||l,S=n?`/${n}/s/${$}`:`/s/${$}`,M=o&&!!((V=a.statusFollowedTags[L])!=null&&V.length);return s("div",{class:i?"":g?d?"status-group":"status-reblog":M?"status-followed-tags":"",...r,onContextMenu:j=>{j.preventDefault(),w(!0)},...b(),children:[s("article",{"data-state-post-id":O,class:`status filtered ${i?"status-card":""}`,tabindex:"-1",children:[s("b",{class:"status-filtered-badge clickable badge-meta",title:v,onClick:j=>{j.preventDefault(),w(!0)},children:[s("span",{children:"Filtered"}),s("span",{children:v})]})," ",s(st,{url:u||c,squircle:f}),s("span",{class:"status-filtered-info",children:[s("span",{class:"status-filtered-info-1",children:[s(fn,{account:e.account,instance:n})," ",s(H,{icon:io[m],alt:gn[m],size:"s"})," ",g?"boosted":M?s("span",{children:a.statusFollowedTags[L].slice(0,3).map(j=>s("span",{class:"status-followed-tag-item",children:["#",j]},j))}):s(At,{datetime:E,format:"micro"})]}),s("span",{class:"status-filtered-info-2",children:[g&&s(U,{children:[s(st,{url:h.account.avatarStatic||h.account.avatar,squircle:f})," "]}),_]})]})]}),!!T&&s(Gr,{onClick:j=>{j.target===j.currentTarget&&w(!1)},children:s("div",{id:"filtered-status-peek",class:"sheet",children:[s("button",{type:"button",class:"sheet-close",onClick:()=>w(!1),children:s(H,{icon:"x"})}),s("header",{children:[s("b",{class:"status-filtered-badge",children:"Filtered"})," ",v]}),s("main",{tabIndex:"-1",children:s(Kt,{ref:x,class:"status-link",to:S,onClick:()=>{w(!1)},"data-read-more":"Read more →",children:s(qt,{status:e,instance:n,size:"s",readOnly:!0})})})]})})]})}const md=yt(({id:e,instance:t,level:n=0})=>{if(!e||!t)return;const r=Mn(W),o=it(e,t),i=r.statusQuotes[o],a=i==null?void 0:i.filter((l,c,u)=>u.findIndex(f=>f.url===l.url)===c);if(a!=null&&a.length&&!(n>2))return a.map(l=>s(_s,{id:l.instance+l.id,children:s(Kt,{to:`${l.instance?`/${l.instance}`:""}/s/${l.id}`,class:"status-card-link","data-read-more":"Read more →",children:s(qt,{statusID:l.id,instance:l.instance,size:"s",quoted:n+1,enableCommentHint:!0})},l.instance+l.id)}))}),$f=yt(qt,(e,t)=>{const{status:n,...r}=e,{status:o,...i}=t;return(n==null?void 0:n.id)===(o==null?void 0:o.id)&&ba(r,i)});var Mi=36,zs="";for(;Mi--;)zs+=Mi.toString(36);function Of(e){for(var t="",n=e||11;n--;)t+=zs[Math.random()*36|0];return t}function at(e){return Array.isArray?Array.isArray(e):Bs(e)==="[object Array]"}const gd=1/0;function vd(e){if(typeof e=="string")return e;let t=e+"";return t=="0"&&1/e==-gd?"-0":t}function yd(e){return e==null?"":vd(e)}function qe(e){return typeof e=="string"}function Hs(e){return typeof e=="number"}function _d(e){return e===!0||e===!1||bd(e)&&Bs(e)=="[object Boolean]"}function Vs(e){return typeof e=="object"}function bd(e){return Vs(e)&&e!==null}function Ue(e){return e!=null}function Zr(e){return!e.trim().length}function Bs(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const wd="Incorrect 'index' type",Ed=e=>`Invalid value for key ${e}`,Td=e=>`Pattern length exceeds max of ${e}.`,Sd=e=>`Missing ${e} property in key`,xd=e=>`Property 'weight' in key '${e}' must be a positive integer`,ki=Object.prototype.hasOwnProperty;class Md{constructor(t){this._keys=[],this._keyMap={};let n=0;t.forEach(r=>{let o=js(r);this._keys.push(o),this._keyMap[o.id]=o,n+=o.weight}),this._keys.forEach(r=>{r.weight/=n})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function js(e){let t=null,n=null,r=null,o=1,i=null;if(qe(e)||at(e))r=e,t=Li(e),n=ao(e);else{if(!ki.call(e,"name"))throw new Error(Sd("name"));const a=e.name;if(r=a,ki.call(e,"weight")&&(o=e.weight,o<=0))throw new Error(xd(a));t=Li(a),n=ao(a),i=e.getFn}return{path:t,id:n,weight:o,src:r,getFn:i}}function Li(e){return at(e)?e:e.split(".")}function ao(e){return at(e)?e.join("."):e}function kd(e,t){let n=[],r=!1;const o=(i,a,l)=>{if(Ue(i))if(!a[l])n.push(i);else{let c=a[l];const u=i[c];if(!Ue(u))return;if(l===a.length-1&&(qe(u)||Hs(u)||_d(u)))n.push(yd(u));else if(at(u)){r=!0;for(let f=0,d=u.length;f<d;f+=1)o(u[f],a,l+1)}else a.length&&o(u,a,l+1)}};return o(e,qe(t)?t.split("."):t,0),r?n:n[0]}const Ld={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},Ad={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},Id={location:0,threshold:.6,distance:100},Cd={useExtendedSearch:!1,getFn:kd,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var X={...Ad,...Ld,...Id,...Cd};const Pd=/[^ ]+/g;function $d(e=1,t=3){const n=new Map,r=Math.pow(10,t);return{get(o){const i=o.match(Pd).length;if(n.has(i))return n.get(i);const a=1/Math.pow(i,.5*e),l=parseFloat(Math.round(a*r)/r);return n.set(i,l),l},clear(){n.clear()}}}class Lo{constructor({getFn:t=X.getFn,fieldNormWeight:n=X.fieldNormWeight}={}){this.norm=$d(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,r)=>{this._keysMap[n.id]=r})}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,r=this.size();n<r;n+=1)this.records[n].i-=1}getValueForItemAtKeyId(t,n){return t[this._keysMap[n]]}size(){return this.records.length}_addString(t,n){if(!Ue(t)||Zr(t))return;let r={v:t,i:n,n:this.norm.get(t)};this.records.push(r)}_addObject(t,n){let r={i:n,$:{}};this.keys.forEach((o,i)=>{let a=o.getFn?o.getFn(t):this.getFn(t,o.path);if(Ue(a)){if(at(a)){let l=[];const c=[{nestedArrIndex:-1,value:a}];for(;c.length;){const{nestedArrIndex:u,value:f}=c.pop();if(Ue(f))if(qe(f)&&!Zr(f)){let d={v:f,i:u,n:this.norm.get(f)};l.push(d)}else at(f)&&f.forEach((d,p)=>{c.push({nestedArrIndex:p,value:d})})}r.$[i]=l}else if(qe(a)&&!Zr(a)){let l={v:a,n:this.norm.get(a)};r.$[i]=l}}}),this.records.push(r)}toJSON(){return{keys:this.keys,records:this.records}}}function Us(e,t,{getFn:n=X.getFn,fieldNormWeight:r=X.fieldNormWeight}={}){const o=new Lo({getFn:n,fieldNormWeight:r});return o.setKeys(e.map(js)),o.setSources(t),o.create(),o}function Od(e,{getFn:t=X.getFn,fieldNormWeight:n=X.fieldNormWeight}={}){const{keys:r,records:o}=e,i=new Lo({getFn:t,fieldNormWeight:n});return i.setKeys(r),i.setIndexRecords(o),i}function Gn(e,{errors:t=0,currentLocation:n=0,expectedLocation:r=0,distance:o=X.distance,ignoreLocation:i=X.ignoreLocation}={}){const a=t/e.length;if(i)return a;const l=Math.abs(r-n);return o?a+l/o:l?1:a}function Rd(e=[],t=X.minMatchCharLength){let n=[],r=-1,o=-1,i=0;for(let a=e.length;i<a;i+=1){let l=e[i];l&&r===-1?r=i:!l&&r!==-1&&(o=i-1,o-r+1>=t&&n.push([r,o]),r=-1)}return e[i-1]&&i-r>=t&&n.push([r,i-1]),n}const kt=32;function Dd(e,t,n,{location:r=X.location,distance:o=X.distance,threshold:i=X.threshold,findAllMatches:a=X.findAllMatches,minMatchCharLength:l=X.minMatchCharLength,includeMatches:c=X.includeMatches,ignoreLocation:u=X.ignoreLocation}={}){if(t.length>kt)throw new Error(Td(kt));const f=t.length,d=e.length,p=Math.max(0,Math.min(r,d));let m=i,h=p;const g=l>1||c,v=g?Array(d):[];let E;for(;(E=e.indexOf(t,h))>-1;){let L=Gn(t,{currentLocation:E,expectedLocation:p,distance:o,ignoreLocation:u});if(m=Math.min(L,m),h=E+f,g){let O=0;for(;O<f;)v[E+O]=1,O+=1}}h=-1;let _=[],T=1,w=f+d;const b=1<<f-1;for(let L=0;L<f;L+=1){let O=0,$=w;for(;O<$;)Gn(t,{errors:L,currentLocation:p+$,expectedLocation:p,distance:o,ignoreLocation:u})<=m?O=$:w=$,$=Math.floor((w-O)/2+O);w=$;let S=Math.max(1,p-$+1),M=a?d:Math.min(p+$,d)+f,V=Array(M+2);V[M+1]=(1<<L)-1;for(let R=M;R>=S;R-=1){let I=R-1,k=n[e.charAt(I)];if(g&&(v[I]=+!!k),V[R]=(V[R+1]<<1|1)&k,L&&(V[R]|=(_[R+1]|_[R])<<1|1|_[R+1]),V[R]&b&&(T=Gn(t,{errors:L,currentLocation:I,expectedLocation:p,distance:o,ignoreLocation:u}),T<=m)){if(m=T,h=I,h<=p)break;S=Math.max(1,2*p-h)}}if(Gn(t,{errors:L+1,currentLocation:p,expectedLocation:p,distance:o,ignoreLocation:u})>m)break;_=V}const x={isMatch:h>=0,score:Math.max(.001,T)};if(g){const L=Rd(v,l);L.length?c&&(x.indices=L):x.isMatch=!1}return x}function Nd(e){let t={};for(let n=0,r=e.length;n<r;n+=1){const o=e.charAt(n);t[o]=(t[o]||0)|1<<r-n-1}return t}class Ws{constructor(t,{location:n=X.location,threshold:r=X.threshold,distance:o=X.distance,includeMatches:i=X.includeMatches,findAllMatches:a=X.findAllMatches,minMatchCharLength:l=X.minMatchCharLength,isCaseSensitive:c=X.isCaseSensitive,ignoreLocation:u=X.ignoreLocation}={}){if(this.options={location:n,threshold:r,distance:o,includeMatches:i,findAllMatches:a,minMatchCharLength:l,isCaseSensitive:c,ignoreLocation:u},this.pattern=c?t:t.toLowerCase(),this.chunks=[],!this.pattern.length)return;const f=(p,m)=>{this.chunks.push({pattern:p,alphabet:Nd(p),startIndex:m})},d=this.pattern.length;if(d>kt){let p=0;const m=d%kt,h=d-m;for(;p<h;)f(this.pattern.substr(p,kt),p),p+=kt;if(m){const g=d-kt;f(this.pattern.substr(g),g)}}else f(this.pattern,0)}searchIn(t){const{isCaseSensitive:n,includeMatches:r}=this.options;if(n||(t=t.toLowerCase()),this.pattern===t){let h={isMatch:!0,score:0};return r&&(h.indices=[[0,t.length-1]]),h}const{location:o,distance:i,threshold:a,findAllMatches:l,minMatchCharLength:c,ignoreLocation:u}=this.options;let f=[],d=0,p=!1;this.chunks.forEach(({pattern:h,alphabet:g,startIndex:v})=>{const{isMatch:E,score:_,indices:T}=Dd(t,h,g,{location:o+v,distance:i,threshold:a,findAllMatches:l,minMatchCharLength:c,includeMatches:r,ignoreLocation:u});E&&(p=!0),d+=_,E&&T&&(f=[...f,...T])});let m={isMatch:p,score:p?d/this.chunks.length:1};return p&&r&&(m.indices=f),m}}class _t{constructor(t){this.pattern=t}static isMultiMatch(t){return Ai(t,this.multiRegex)}static isSingleMatch(t){return Ai(t,this.singleRegex)}search(){}}function Ai(e,t){const n=e.match(t);return n?n[1]:null}class Fd 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 zd extends _t{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const r=t.indexOf(this.pattern)===-1;return{isMatch:r,score:r?0:1,indices:[0,t.length-1]}}}class Hd 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 Vd 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 Bd 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 jd 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 Ys extends _t{constructor(t,{location:n=X.location,threshold:r=X.threshold,distance:o=X.distance,includeMatches:i=X.includeMatches,findAllMatches:a=X.findAllMatches,minMatchCharLength:l=X.minMatchCharLength,isCaseSensitive:c=X.isCaseSensitive,ignoreLocation:u=X.ignoreLocation}={}){super(t),this._bitapSearch=new Ws(t,{location:n,threshold:r,distance:o,includeMatches:i,findAllMatches:a,minMatchCharLength:l,isCaseSensitive:c,ignoreLocation:u})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class Ks extends _t{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let n=0,r;const o=[],i=this.pattern.length;for(;(r=t.indexOf(this.pattern,n))>-1;)n=r+i,o.push([r,n-1]);const a=!!o.length;return{isMatch:a,score:a?0:1,indices:o}}}const co=[Fd,Ks,Hd,Vd,jd,Bd,zd,Ys],Ii=co.length,Ud=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Wd="|";function Yd(e,t={}){return e.split(Wd).map(n=>{let r=n.trim().split(Ud).filter(i=>i&&!!i.trim()),o=[];for(let i=0,a=r.length;i<a;i+=1){const l=r[i];let c=!1,u=-1;for(;!c&&++u<Ii;){const f=co[u];let d=f.isMultiMatch(l);d&&(o.push(new f(d,t)),c=!0)}if(!c)for(u=-1;++u<Ii;){const f=co[u];let d=f.isSingleMatch(l);if(d){o.push(new f(d,t));break}}}return o})}const Kd=new Set([Ys.type,Ks.type]);class Zd{constructor(t,{isCaseSensitive:n=X.isCaseSensitive,includeMatches:r=X.includeMatches,minMatchCharLength:o=X.minMatchCharLength,ignoreLocation:i=X.ignoreLocation,findAllMatches:a=X.findAllMatches,location:l=X.location,threshold:c=X.threshold,distance:u=X.distance}={}){this.query=null,this.options={isCaseSensitive:n,includeMatches:r,minMatchCharLength:o,findAllMatches:a,ignoreLocation:i,location:l,threshold:c,distance:u},this.pattern=n?t:t.toLowerCase(),this.query=Yd(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:r,isCaseSensitive:o}=this.options;t=o?t:t.toLowerCase();let i=0,a=[],l=0;for(let c=0,u=n.length;c<u;c+=1){const f=n[c];a.length=0,i=0;for(let d=0,p=f.length;d<p;d+=1){const m=f[d],{isMatch:h,indices:g,score:v}=m.search(t);if(h){if(i+=1,l+=v,r){const E=m.constructor.type;Kd.has(E)?a=[...a,...g]:a.push(g)}}else{l=0,i=0,a.length=0;break}}if(i){let d={isMatch:!0,score:l/i};return r&&(d.indices=a),d}}return{isMatch:!1,score:1}}}const lo=[];function qd(...e){lo.push(...e)}function uo(e,t){for(let n=0,r=lo.length;n<r;n+=1){let o=lo[n];if(o.condition(e,t))return new o(e,t)}return new Ws(e,t)}const pr={AND:"$and",OR:"$or"},fo={PATH:"$path",PATTERN:"$val"},ho=e=>!!(e[pr.AND]||e[pr.OR]),Gd=e=>!!e[fo.PATH],Xd=e=>!at(e)&&Vs(e)&&!ho(e),Ci=e=>({[pr.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function Zs(e,t,{auto:n=!0}={}){const r=o=>{let i=Object.keys(o);const a=Gd(o);if(!a&&i.length>1&&!ho(o))return r(Ci(o));if(Xd(o)){const c=a?o[fo.PATH]:i[0],u=a?o[fo.PATTERN]:o[c];if(!qe(u))throw new Error(Ed(c));const f={keyId:ao(c),pattern:u};return n&&(f.searcher=uo(u,t)),f}let l={children:[],operator:i[0]};return i.forEach(c=>{const u=o[c];at(u)&&u.forEach(f=>{l.children.push(r(f))})}),l};return ho(e)||(e=Ci(e)),r(e)}function Jd(e,{ignoreFieldNorm:t=X.ignoreFieldNorm}){e.forEach(n=>{let r=1;n.matches.forEach(({key:o,norm:i,score:a})=>{const l=o?o.weight:null;r*=Math.pow(a===0&&l?Number.EPSILON:a,(l||1)*(t?1:i))}),n.score=r})}function Qd(e,t){const n=e.matches;t.matches=[],Ue(n)&&n.forEach(r=>{if(!Ue(r.indices)||!r.indices.length)return;const{indices:o,value:i}=r;let a={indices:o,value:i};r.key&&(a.key=r.key.src),r.idx>-1&&(a.refIndex=r.idx),t.matches.push(a)})}function ef(e,t){t.score=e.score}function tf(e,t,{includeMatches:n=X.includeMatches,includeScore:r=X.includeScore}={}){const o=[];return n&&o.push(Qd),r&&o.push(ef),e.map(i=>{const{idx:a}=i,l={item:t[a],refIndex:a};return o.length&&o.forEach(c=>{c(i,l)}),l})}class kn{constructor(t,n={},r){this.options={...X,...n},this.options.useExtendedSearch,this._keyStore=new Md(this.options.keys),this.setCollection(t,r)}setCollection(t,n){if(this._docs=t,n&&!(n instanceof Lo))throw new Error(wd);this._myIndex=n||Us(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){Ue(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const n=[];for(let r=0,o=this._docs.length;r<o;r+=1){const i=this._docs[r];t(i,r)&&(this.removeAt(r),r-=1,o-=1,n.push(i))}return n}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:n=-1}={}){const{includeMatches:r,includeScore:o,shouldSort:i,sortFn:a,ignoreFieldNorm:l}=this.options;let c=qe(t)?qe(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return Jd(c,{ignoreFieldNorm:l}),i&&c.sort(a),Hs(n)&&n>-1&&(c=c.slice(0,n)),tf(c,this._docs,{includeMatches:r,includeScore:o})}_searchStringList(t){const n=uo(t,this.options),{records:r}=this._myIndex,o=[];return r.forEach(({v:i,i:a,n:l})=>{if(!Ue(i))return;const{isMatch:c,score:u,indices:f}=n.searchIn(i);c&&o.push({item:i,idx:a,matches:[{score:u,value:i,norm:l,indices:f}]})}),o}_searchLogical(t){const n=Zs(t,this.options),r=(l,c,u)=>{if(!l.children){const{keyId:d,searcher:p}=l,m=this._findMatches({key:this._keyStore.get(d),value:this._myIndex.getValueForItemAtKeyId(c,d),searcher:p});return m&&m.length?[{idx:u,item:c,matches:m}]:[]}const f=[];for(let d=0,p=l.children.length;d<p;d+=1){const m=l.children[d],h=r(m,c,u);if(h.length)f.push(...h);else if(l.operator===pr.AND)return[]}return f},o=this._myIndex.records,i={},a=[];return o.forEach(({$:l,i:c})=>{if(Ue(l)){let u=r(n,l,c);u.length&&(i[c]||(i[c]={idx:c,item:l,matches:[]},a.push(i[c])),u.forEach(({matches:f})=>{i[c].matches.push(...f)}))}}),a}_searchObjectList(t){const n=uo(t,this.options),{keys:r,records:o}=this._myIndex,i=[];return o.forEach(({$:a,i:l})=>{if(!Ue(a))return;let c=[];r.forEach((u,f)=>{c.push(...this._findMatches({key:u,value:a[f],searcher:n}))}),c.length&&i.push({idx:l,item:a,matches:c})}),i}_findMatches({key:t,value:n,searcher:r}){if(!Ue(n))return[];let o=[];if(at(n))n.forEach(({v:i,i:a,n:l})=>{if(!Ue(i))return;const{isMatch:c,score:u,indices:f}=r.searchIn(i);c&&o.push({score:u,key:t,value:i,idx:a,norm:l,indices:f})});else{const{v:i,n:a}=n,{isMatch:l,score:c,indices:u}=r.searchIn(i);l&&o.push({score:c,key:t,value:i,norm:a,indices:u})}return o}}kn.version="7.0.0";kn.createIndex=Us;kn.parseIndex=Od;kn.config=X;kn.parseQuery=Zs;qd(Zd);export{dr as $,st as A,no as B,mn as C,vi as D,Zt as E,Mo as F,so as G,to as H,H as I,er as J,Su as K,Kt as L,Gr as M,fn as N,Ps as O,ko as P,Cs as Q,At as R,$c as S,Gl as T,os as U,qi as V,Tu as W,xf as X,$s as Y,Of as Z,jr as _,Bt as a,mf as a0,Lc as a1,gf as a2,kn as a3,Rl as a4,Fa as a5,Ui as a6,Wa as a7,io as a8,za as b,is as c,ke as d,an as e,Cr as f,ss as g,Un as h,wf as i,ci as j,ml as k,Pr as l,ms as m,vt as n,Va as o,ro as p,Tn as q,Bn as r,Pe as s,Wc as t,lf as u,fr as v,Tf as w,Sf as x,$f as y,Ef as z};
|
||
//# sourceMappingURL=fuse-sLNor9NY.js.map
|