phanpy-cz/assets/useTitle-KMkGka9H.js
2024-07-01 19:34:06 +02:00

39 lines
120 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

const __vite__fileDeps=["./polyfill-force-g2mcly7m.js","./index-dbOm7oTI.js","./compose-2Y_rtJfC.js","./fuse-GSnTzOyH.js","./tinyld-light-PxOyhYWY.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const a of o)if(a.type==="childList")for(const i of a.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&n(i)}).observe(document,{childList:!0,subtree:!0});function r(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerPolicy&&(a.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?a.credentials="include":o.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(o){if(o.ep)return;o.ep=!0;const a=r(o);fetch(o.href,a)}})();"AbortSignal"in window&&(AbortSignal.timeout=AbortSignal.timeout||(e=>{const t=new AbortController;return setTimeout(()=>t.abort(),e),t.signal}));"URL"in window&&typeof URL.parse!="function"&&(URL.parse=function(e,t){if(!e)return null;try{return t?new URL(e,t):new URL(e)}catch{return null}});var ut,k,Fn,_a,De,Hr,qn,Yt,pr,Gt,Jt,zn,ot={},Hn=[],wa=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Lt=Array.isArray;function me(e,t){for(var r in t)e[r]=t[r];return e}function Wn(e){var t=e.parentNode;t&&t.removeChild(e)}function H(e,t,r){var n,o,a,i={};for(a in t)a=="key"?n=t[a]:a=="ref"?o=t[a]:i[a]=t[a];if(arguments.length>2&&(i.children=arguments.length>3?ut.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)i[a]===void 0&&(i[a]=e.defaultProps[a]);return tt(e,i,n,o,null)}function tt(e,t,r,n,o){var a={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o??++Fn,__i:-1,__u:0};return o==null&&k.vnode!=null&&k.vnode(a),a}function Kn(){return{current:null}}function ce(e){return e.children}function ue(e,t){this.props=e,this.context=t}function Ne(e,t){if(t==null)return e.__?Ne(e.__,e.__i+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?Ne(e):null}function Vn(e){var t,r;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null){e.__e=e.__c.base=r.__e;break}return Vn(e)}}function Zt(e){(!e.__d&&(e.__d=!0)&&De.push(e)&&!_t.__r++||Hr!==k.debounceRendering)&&((Hr=k.debounceRendering)||qn)(_t)}function _t(){var e,t,r,n,o,a,i,s;for(De.sort(Yt);e=De.shift();)e.__d&&(t=De.length,n=void 0,a=(o=(r=e).__v).__e,i=[],s=[],r.__P&&((n=me({},o)).__v=o.__v+1,k.vnode&&k.vnode(n),mr(r.__P,n,o,r.__n,r.__P.namespaceURI,32&o.__u?[a]:null,i,a??Ne(o),!!(32&o.__u),s),n.__v=o.__v,n.__.__k[n.__i]=n,Gn(i,n,s),n.__e!=a&&Vn(n)),De.length>t&&De.sort(Yt));_t.__r=0}function Bn(e,t,r,n,o,a,i,s,l,c,d){var u,f,h,m,y,w=n&&n.__k||Hn,g=t.length;for(r.__d=l,ba(r,t,w),l=r.__d,u=0;u<g;u++)(h=r.__k[u])!=null&&typeof h!="boolean"&&typeof h!="function"&&(f=h.__i===-1?ot:w[h.__i]||ot,h.__i=u,mr(e,h,f,o,a,i,s,l,c,d),m=h.__e,h.ref&&f.ref!=h.ref&&(f.ref&&vr(f.ref,null,h),d.push(h.ref,h.__c||m,h)),y==null&&m!=null&&(y=m),65536&h.__u||f.__k===h.__k?(l&&!l.isConnected&&(l=Ne(f)),l=Yn(h,l,e)):typeof h.type=="function"&&h.__d!==void 0?l=h.__d:m&&(l=m.nextSibling),h.__d=void 0,h.__u&=-196609);r.__d=l,r.__e=y}function ba(e,t,r){var n,o,a,i,s,l=t.length,c=r.length,d=c,u=0;for(e.__k=[],n=0;n<l;n++)i=n+u,(o=e.__k[n]=(o=t[n])==null||typeof o=="boolean"||typeof o=="function"?null:typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?tt(null,o,null,null,null):Lt(o)?tt(ce,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?tt(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)!=null?(o.__=e,o.__b=e.__b+1,s=Ea(o,r,i,d),o.__i=s,a=null,s!==-1&&(d--,(a=r[s])&&(a.__u|=131072)),a==null||a.__v===null?(s==-1&&u--,typeof o.type!="function"&&(o.__u|=65536)):s!==i&&(s===i+1?u++:s>i?d>l-i?u+=s-i:u--:s<i?s==i-1&&(u=s-i):u=0,s!==n+u&&(o.__u|=65536))):(a=r[i])&&a.key==null&&a.__e&&!(131072&a.__u)&&(a.__e==e.__d&&(e.__d=Ne(a)),Qt(a,a,!1),r[i]=null,d--);if(d)for(n=0;n<c;n++)(a=r[n])!=null&&!(131072&a.__u)&&(a.__e==e.__d&&(e.__d=Ne(a)),Qt(a,a))}function Yn(e,t,r){var n,o;if(typeof e.type=="function"){for(n=e.__k,o=0;n&&o<n.length;o++)n[o]&&(n[o].__=e,t=Yn(n[o],t,r));return t}e.__e!=t&&(r.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType===8);return t}function ve(e,t){return t=t||[],e==null||typeof e=="boolean"||(Lt(e)?e.some(function(r){ve(r,t)}):t.push(e)),t}function Ea(e,t,r,n){var o=e.key,a=e.type,i=r-1,s=r+1,l=t[r];if(l===null||l&&o==l.key&&a===l.type&&!(131072&l.__u))return r;if(n>(l!=null&&!(131072&l.__u)?1:0))for(;i>=0||s<t.length;){if(i>=0){if((l=t[i])&&!(131072&l.__u)&&o==l.key&&a===l.type)return i;i--}if(s<t.length){if((l=t[s])&&!(131072&l.__u)&&o==l.key&&a===l.type)return s;s++}}return-1}function Wr(e,t,r){t[0]==="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||wa.test(t)?r:r+"px"}function ht(e,t,r,n,o){var a;e:if(t==="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||Wr(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||Wr(e.style,t,r[t])}else if(t[0]==="o"&&t[1]==="n")a=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e||t==="onFocusOut"||t==="onFocusIn"?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=r,r?n?r.u=n.u:(r.u=pr,e.addEventListener(t,a?Jt:Gt,a)):e.removeEventListener(t,a?Jt:Gt,a);else{if(o=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t in e)try{e[t]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,r))}}function Kr(e){return function(t){if(this.l){var r=this.l[t.type+e];if(t.t==null)t.t=pr++;else if(t.t<r.u)return;return r(k.event?k.event(t):t)}}}function mr(e,t,r,n,o,a,i,s,l,c){var d,u,f,h,m,y,w,g,R,O,K,B,oe,X,ee,x=t.type;if(t.constructor!==void 0)return null;128&r.__u&&(l=!!(32&r.__u),a=[s=t.__e=r.__e]),(d=k.__b)&&d(t);e:if(typeof x=="function")try{if(g=t.props,R=(d=x.contextType)&&n[d.__c],O=d?R?R.props.value:d.__:n,r.__c?w=(u=t.__c=r.__c).__=u.__E:("prototype"in x&&x.prototype.render?t.__c=u=new x(g,O):(t.__c=u=new ue(g,O),u.constructor=x,u.render=Ca),R&&R.sub(u),u.props=g,u.state||(u.state={}),u.context=O,u.__n=n,f=u.__d=!0,u.__h=[],u._sb=[]),u.__s==null&&(u.__s=u.state),x.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=me({},u.__s)),me(u.__s,x.getDerivedStateFromProps(g,u.__s))),h=u.props,m=u.state,u.__v=t,f)x.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(x.getDerivedStateFromProps==null&&g!==h&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(g,O),!u.__e&&(u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(g,u.__s,O)===!1||t.__v===r.__v)){for(t.__v!==r.__v&&(u.props=g,u.state=u.__s,u.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach(function(M){M&&(M.__=t)}),K=0;K<u._sb.length;K++)u.__h.push(u._sb[K]);u._sb=[],u.__h.length&&i.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(g,u.__s,O),u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(h,m,y)})}if(u.context=O,u.props=g,u.__P=e,u.__e=!1,B=k.__r,oe=0,"prototype"in x&&x.prototype.render){for(u.state=u.__s,u.__d=!1,B&&B(t),d=u.render(u.props,u.state,u.context),X=0;X<u._sb.length;X++)u.__h.push(u._sb[X]);u._sb=[]}else do u.__d=!1,B&&B(t),d=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++oe<25);u.state=u.__s,u.getChildContext!=null&&(n=me(me({},n),u.getChildContext())),f||u.getSnapshotBeforeUpdate==null||(y=u.getSnapshotBeforeUpdate(h,m)),Bn(e,Lt(ee=d!=null&&d.type===ce&&d.key==null?d.props.children:d)?ee:[ee],t,r,n,o,a,i,s,l,c),u.base=t.__e,t.__u&=-161,u.__h.length&&i.push(u),w&&(u.__E=u.__=null)}catch(M){t.__v=null,l||a!=null?(t.__e=s,t.__u|=l?160:32,a[a.indexOf(s)]=null):(t.__e=r.__e,t.__k=r.__k),k.__e(M,t,r)}else a==null&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=Sa(r.__e,t,r,n,o,a,i,l,c);(d=k.diffed)&&d(t)}function Gn(e,t,r){t.__d=void 0;for(var n=0;n<r.length;n++)vr(r[n],r[++n],r[++n]);k.__c&&k.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(a){a.call(o)})}catch(a){k.__e(a,o.__v)}})}function Sa(e,t,r,n,o,a,i,s,l){var c,d,u,f,h,m,y,w=r.props,g=t.props,R=t.type;if(R==="svg"?o="http://www.w3.org/2000/svg":R==="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),a!=null){for(c=0;c<a.length;c++)if((h=a[c])&&"setAttribute"in h==!!R&&(R?h.localName===R:h.nodeType===3)){e=h,a[c]=null;break}}if(e==null){if(R===null)return document.createTextNode(g);e=document.createElementNS(o,R,g.is&&g),a=null,s=!1}if(R===null)w===g||s&&e.data===g||(e.data=g);else{if(a=a&&ut.call(e.childNodes),w=r.props||ot,!s&&a!=null)for(w={},c=0;c<e.attributes.length;c++)w[(h=e.attributes[c]).name]=h.value;for(c in w)if(h=w[c],c!="children"){if(c=="dangerouslySetInnerHTML")u=h;else if(c!=="key"&&!(c in g)){if(c=="value"&&"defaultValue"in g||c=="checked"&&"defaultChecked"in g)continue;ht(e,c,null,h,o)}}for(c in g)h=g[c],c=="children"?f=h:c=="dangerouslySetInnerHTML"?d=h:c=="value"?m=h:c=="checked"?y=h:c==="key"||s&&typeof h!="function"||w[c]===h||ht(e,c,h,w[c],o);if(d)s||u&&(d.__html===u.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(u&&(e.innerHTML=""),Bn(e,Lt(f)?f:[f],t,r,n,R==="foreignObject"?"http://www.w3.org/1999/xhtml":o,a,i,a?a[0]:r.__k&&Ne(r,0),s,l),a!=null)for(c=a.length;c--;)a[c]!=null&&Wn(a[c]);s||(c="value",m!==void 0&&(m!==e[c]||R==="progress"&&!m||R==="option"&&m!==w[c])&&ht(e,c,m,w[c],o),c="checked",y!==void 0&&y!==e[c]&&ht(e,c,y,w[c],o))}return e}function vr(e,t,r){try{typeof e=="function"?e(t):e.current=t}catch(n){k.__e(n,r)}}function Qt(e,t,r){var n,o;if(k.unmount&&k.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||vr(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(a){k.__e(a,t)}n.base=n.__P=null}if(n=e.__k)for(o=0;o<n.length;o++)n[o]&&Qt(n[o],t,r||typeof e.type!="function");r||e.__e==null||Wn(e.__e),e.__c=e.__=e.__e=e.__d=void 0}function Ca(e,t,r){return this.constructor(e,r)}function at(e,t,r){var n,o,a,i;k.__&&k.__(e,t),o=(n=typeof r=="function")?null:r&&r.__k||t.__k,a=[],i=[],mr(t,e=(!n&&r||t).__k=H(ce,null,[e]),o||ot,ot,t.namespaceURI,!n&&r?[r]:o?null:t.firstChild?ut.call(t.childNodes):null,a,!n&&r?r:o?o.__e:t.firstChild,n,i),Gn(a,e,i)}function Jn(e,t){at(e,t,Jn)}function Pa(e,t,r){var n,o,a,i,s=me({},e.props);for(a in e.type&&e.type.defaultProps&&(i=e.type.defaultProps),t)a=="key"?n=t[a]:a=="ref"?o=t[a]:s[a]=t[a]===void 0&&i!==void 0?i[a]:t[a];return arguments.length>2&&(s.children=arguments.length>3?ut.call(arguments,2):r),tt(e.type,s,n||e.key,o||e.ref,null)}function Pe(e,t){var r={__c:t="__cC"+zn++,__:e,Consumer:function(n,o){return n.children(o)},Provider:function(n){var o,a;return this.getChildContext||(o=[],(a={})[t]=this,this.getChildContext=function(){return a},this.shouldComponentUpdate=function(i){this.props.value!==i.value&&o.some(function(s){s.__e=!0,Zt(s)})},this.sub=function(i){o.push(i);var s=i.componentWillUnmount;i.componentWillUnmount=function(){o.splice(o.indexOf(i),1),s&&s.call(i)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r}ut=Hn.slice,k={__e:function(e,t,r,n){for(var o,a,i;t=t.__;)if((o=t.__c)&&!o.__)try{if((a=o.constructor)&&a.getDerivedStateFromError!=null&&(o.setState(a.getDerivedStateFromError(e)),i=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,n||{}),i=o.__d),i)return o.__E=o}catch(s){e=s}throw e}},Fn=0,_a=function(e){return e!=null&&e.constructor==null},ue.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=me({},this.state),typeof e=="function"&&(e=e(me({},r),this.props)),e&&me(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),Zt(this))},ue.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Zt(this))},ue.prototype.render=ce,De=[],qn=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Yt=function(e,t){return e.__v.__b-t.__v.__b},_t.__r=0,pr=0,Gt=Kr(!1),Jt=Kr(!0),zn=0;var ge,W,Ft,Vr,We=0,Zn=[],vt=[],V=k,Br=V.__b,Yr=V.__r,Gr=V.diffed,Jr=V.__c,Zr=V.unmount,Qr=V.__;function Ie(e,t){V.__h&&V.__h(W,e,We||t),We=0;var r=W.__H||(W.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:vt}),r.__[e]}function $e(e){return We=1,Nt(Qn,e)}function Nt(e,t,r){var n=Ie(ge++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):Qn(void 0,t),function(s){var l=n.__N?n.__N[0]:n.__[0],c=n.t(l,s);l!==c&&(n.__N=[c,n.__[1]],n.__c.setState({}))}],n.__c=W,!W.u)){var o=function(s,l,c){if(!n.__c.__H)return!0;var d=n.__c.__H.__.filter(function(f){return!!f.__c});if(d.every(function(f){return!f.__N}))return!a||a.call(this,s,l,c);var u=!1;return d.forEach(function(f){if(f.__N){var h=f.__[0];f.__=f.__N,f.__N=void 0,h!==f.__[0]&&(u=!0)}}),!(!u&&n.__c.props===s)&&(!a||a.call(this,s,l,c))};W.u=!0;var a=W.shouldComponentUpdate,i=W.componentWillUpdate;W.componentWillUpdate=function(s,l,c){if(this.__e){var d=a;a=void 0,o(s,l,c),a=d}i&&i.call(this,s,l,c)},W.shouldComponentUpdate=o}return n.__N||n.__}function Ae(e,t){var r=Ie(ge++,3);!V.__s&&_r(r.__H,t)&&(r.__=e,r.i=t,W.__H.__h.push(r))}function Re(e,t){var r=Ie(ge++,4);!V.__s&&_r(r.__H,t)&&(r.__=e,r.i=t,W.__h.push(r))}function ye(e){return We=5,_e(function(){return{current:e}},[])}function gr(e,t,r){We=6,Re(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},r==null?r:r.concat(e))}function _e(e,t){var r=Ie(ge++,7);return _r(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function Ve(e,t){return We=8,_e(function(){return e},t)}function re(e){var t=W.context[e.__c],r=Ie(ge++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(W)),t.props.value):e.__}function Mt(e,t){V.useDebugValue&&V.useDebugValue(t?t(e):e)}function Aa(e){var t=Ie(ge++,10),r=$e();return t.__=e,W.componentDidCatch||(W.componentDidCatch=function(n,o){t.__&&t.__(n,o),r[1](n)}),[r[0],function(){r[1](void 0)}]}function yr(){var e=Ie(ge++,11);if(!e.__){for(var t=W.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function Ra(){for(var e;e=Zn.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(gt),e.__H.__h.forEach(Xt),e.__H.__h=[]}catch(t){e.__H.__h=[],V.__e(t,e.__v)}}V.__b=function(e){W=null,Br&&Br(e)},V.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Qr&&Qr(e,t)},V.__r=function(e){Yr&&Yr(e),ge=0;var t=(W=e.__c).__H;t&&(Ft===W?(t.__h=[],W.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=vt,r.__N=r.i=void 0})):(t.__h.forEach(gt),t.__h.forEach(Xt),t.__h=[],ge=0)),Ft=W},V.diffed=function(e){Gr&&Gr(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Zn.push(t)!==1&&Vr===V.requestAnimationFrame||((Vr=V.requestAnimationFrame)||xa)(Ra)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==vt&&(r.__=r.__V),r.i=void 0,r.__V=vt})),Ft=W=null},V.__c=function(e,t){t.some(function(r){try{r.__h.forEach(gt),r.__h=r.__h.filter(function(n){return!n.__||Xt(n)})}catch(n){t.some(function(o){o.__h&&(o.__h=[])}),t=[],V.__e(n,r.__v)}}),Jr&&Jr(e,t)},V.unmount=function(e){Zr&&Zr(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{gt(n)}catch(o){t=o}}),r.__H=void 0,t&&V.__e(t,r.__v))};var Xr=typeof requestAnimationFrame=="function";function xa(e){var t,r=function(){clearTimeout(n),Xr&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);Xr&&(t=requestAnimationFrame(r))}function gt(e){var t=W,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),W=t}function Xt(e){var t=W;e.__c=e.__(),W=t}function _r(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function Qn(e,t){return typeof t=="function"?t(e):t}function Xn(e,t){for(var r in t)e[r]=t[r];return e}function er(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var n in t)if(n!=="__source"&&e[n]!==t[n])return!0;return!1}function wt(e,t){this.props=e,this.context=t}function eo(e,t){function r(o){var a=this.props.ref,i=a==o.ref;return!i&&a&&(a.call?a(null):a.current=null),t?!t(this.props,o)||!i:er(this.props,o)}function n(o){return this.shouldComponentUpdate=r,H(e,o)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(wt.prototype=new ue).isPureReactComponent=!0,wt.prototype.shouldComponentUpdate=function(e,t){return er(this.props,e)||er(this.state,t)};var en=k.__b;k.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),en&&en(e)};var Oa=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function to(e){function t(r){var n=Xn({},r);return delete n.ref,e(n,r.ref||null)}return t.$$typeof=Oa,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var tn=function(e,t){return e==null?null:ve(ve(e).map(t))},wr={map:tn,forEach:tn,count:function(e){return e?ve(e).length:0},only:function(e){var t=ve(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:ve},Da=k.__e;k.__e=function(e,t,r,n){if(e.then){for(var o,a=t;a=a.__;)if((o=a.__c)&&o.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),o.__c(e,t)}Da(e,t,r,n)};var rn=k.unmount;function ro(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(n){typeof n.__c=="function"&&n.__c()}),e.__c.__H=null),(e=Xn({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return ro(n,t,r)})),e}function no(e,t,r){return e&&r&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return no(n,t,r)}),e.__c&&e.__c.__P===t&&(e.__e&&r.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=r)),e}function rt(){this.__u=0,this.t=null,this.__b=null}function oo(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function ao(e){var t,r,n;function o(a){if(t||(t=e()).then(function(i){r=i.default||i},function(i){n=i}),n)throw n;if(!r)throw t;return H(r,a)}return o.displayName="Lazy",o.__f=!0,o}function ze(){this.u=null,this.o=null}k.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),rn&&rn(e)},(rt.prototype=new ue).__c=function(e,t){var r=t.__c,n=this;n.t==null&&(n.t=[]),n.t.push(r);var o=oo(n.__v),a=!1,i=function(){a||(a=!0,r.__R=null,o?o(s):s())};r.__R=i;var s=function(){if(!--n.__u){if(n.state.__a){var l=n.state.__a;n.__v.__k[0]=no(l,l.__c.__P,l.__c.__O)}var c;for(n.setState({__a:n.__b=null});c=n.t.pop();)c.forceUpdate()}};n.__u++||32&t.__u||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(i,i)},rt.prototype.componentWillUnmount=function(){this.t=[]},rt.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=ro(this.__b,r,n.__O=n.__P)}this.__b=null}var o=t.__a&&H(ce,null,e.fallback);return o&&(o.__u&=-33),[H(ce,null,t.__a?null:e.children),o]};var nn=function(e,t,r){if(++r[1]===r[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(r=e.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;e.u=r=r[2]}};function Ta(e){return this.getChildContext=function(){return e.context},e.children}function La(e){var t=this,r=e.i;t.componentWillUnmount=function(){at(null,t.l),t.l=null,t.i=null},t.i&&t.i!==r&&t.componentWillUnmount(),t.l||(t.i=r,t.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(n){this.childNodes.push(n),t.i.appendChild(n)},insertBefore:function(n,o){this.childNodes.push(n),t.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),t.i.removeChild(n)}}),at(H(Ta,{context:t.context},e.__v),t.l)}function io(e,t){var r=H(La,{__v:e,i:t});return r.containerInfo=t,r}(ze.prototype=new ue).__a=function(e){var t=this,r=oo(t.__v),n=t.o.get(e);return n[0]++,function(o){var a=function(){t.props.revealOrder?(n.push(o),nn(t,e,n)):o()};r?r(a):a()}},ze.prototype.render=function(e){this.u=null,this.o=new Map;var t=ve(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var r=t.length;r--;)this.o.set(t[r],this.u=[1,0,this.u]);return e.children},ze.prototype.componentDidUpdate=ze.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,r){nn(e,r,t)})};var so=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Na=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Ma=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,ja=/[A-Z0-9]/g,Ia=typeof document<"u",$a=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function uo(e,t,r){return t.__k==null&&(t.textContent=""),at(e,t),typeof r=="function"&&r(),e?e.__c:null}function lo(e,t,r){return Jn(e,t),typeof r=="function"&&r(),e?e.__c:null}ue.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(ue.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var on=k.event;function ka(){}function Ua(){return this.cancelBubble}function Fa(){return this.defaultPrevented}k.event=function(e){return on&&(e=on(e)),e.persist=ka,e.isPropagationStopped=Ua,e.isDefaultPrevented=Fa,e.nativeEvent=e};var br,qa={enumerable:!1,configurable:!0,get:function(){return this.class}},an=k.vnode;k.vnode=function(e){typeof e.type=="string"&&function(t){var r=t.props,n=t.type,o={};for(var a in r){var i=r[a];if(!(a==="value"&&"defaultValue"in r&&i==null||Ia&&a==="children"&&n==="noscript"||a==="class"||a==="className")){var s=a.toLowerCase();a==="defaultValue"&&"value"in r&&r.value==null?a="value":a==="download"&&i===!0?i="":s==="translate"&&i==="no"?i=!1:s==="ondoubleclick"?a="ondblclick":s!=="onchange"||n!=="input"&&n!=="textarea"||$a(r.type)?s==="onfocus"?a="onfocusin":s==="onblur"?a="onfocusout":Ma.test(a)?a=s:n.indexOf("-")===-1&&Na.test(a)?a=a.replace(ja,"-$&").toLowerCase():i===null&&(i=void 0):s=a="oninput",s==="oninput"&&o[a=s]&&(a="oninputCapture"),o[a]=i}}n=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=ve(r.children).forEach(function(l){l.props.selected=o.value.indexOf(l.props.value)!=-1})),n=="select"&&o.defaultValue!=null&&(o.value=ve(r.children).forEach(function(l){l.props.selected=o.multiple?o.defaultValue.indexOf(l.props.value)!=-1:o.defaultValue==l.props.value})),r.class&&!r.className?(o.class=r.class,Object.defineProperty(o,"className",qa)):(r.className&&!r.class||r.class&&r.className)&&(o.class=o.className=r.className),t.props=o}(e),e.$$typeof=so,an&&an(e)};var sn=k.__r;k.__r=function(e){sn&&sn(e),br=e.__c};var un=k.diffed;k.diffed=function(e){un&&un(e);var t=e.props,r=e.__e;r!=null&&e.type==="textarea"&&"value"in t&&t.value!==r.value&&(r.value=t.value==null?"":t.value),br=null};var co={ReactCurrentDispatcher:{current:{readContext:function(e){return br.__n[e.__c].props.value},useCallback:Ve,useContext:re,useDebugValue:Mt,useDeferredValue:Sr,useEffect:Ae,useId:yr,useImperativeHandle:gr,useInsertionEffect:Pr,useLayoutEffect:Re,useMemo:_e,useReducer:Nt,useRef:ye,useState:$e,useSyncExternalStore:Ar,useTransition:Cr}}},za="17.0.2";function fo(e){return H.bind(null,e)}function Be(e){return!!e&&e.$$typeof===so}function ho(e){return Be(e)&&e.type===ce}function po(e){return!!e&&!!e.displayName&&(typeof e.displayName=="string"||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function mo(e){return Be(e)?Pa.apply(null,arguments):e}function vo(e){return!!e.__k&&(at(null,e),!0)}function go(e){return e&&(e.base||e.nodeType===1&&e)||null}var yo=function(e,t){return e(t)},_o=function(e,t){return e(t)},wo=ce;function Er(e){e()}function Sr(e){return e}function Cr(){return[!1,Er]}var Pr=Re,bo=Be;function Ar(e,t){var r=t(),n=$e({h:{__:r,v:t}}),o=n[0].h,a=n[1];return Re(function(){o.__=r,o.v=t,qt(o)&&a({h:o})},[e,r,t]),Ae(function(){return qt(o)&&a({h:o}),e(function(){qt(o)&&a({h:o})})},[e]),r}function qt(e){var t,r,n=e.v,o=e.__;try{var a=n();return!((t=o)===(r=a)&&(t!==0||1/t==1/r)||t!=t&&r!=r)}catch{return!0}}var Eo={useState:$e,useId:yr,useReducer:Nt,useEffect:Ae,useLayoutEffect:Re,useInsertionEffect:Pr,useTransition:Cr,useDeferredValue:Sr,useSyncExternalStore:Ar,startTransition:Er,useRef:ye,useImperativeHandle:gr,useMemo:_e,useCallback:Ve,useContext:re,useDebugValue:Mt,version:"17.0.2",Children:wr,render:uo,hydrate:lo,unmountComponentAtNode:vo,createPortal:io,createElement:H,createContext:Pe,createFactory:fo,cloneElement:mo,createRef:Kn,Fragment:ce,isValidElement:Be,isElement:bo,isFragment:ho,isMemo:po,findDOMNode:go,Component:ue,PureComponent:wt,memo:eo,forwardRef:to,flushSync:_o,unstable_batchedUpdates:yo,StrictMode:wo,Suspense:rt,SuspenseList:ze,lazy:ao,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:co};const bt=Object.freeze(Object.defineProperty({__proto__:null,Children:wr,Component:ue,Fragment:ce,PureComponent:wt,StrictMode:wo,Suspense:rt,SuspenseList:ze,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:co,cloneElement:mo,createContext:Pe,createElement:H,createFactory:fo,createPortal:io,createRef:Kn,default:Eo,findDOMNode:go,flushSync:_o,forwardRef:to,hydrate:lo,isElement:bo,isFragment:ho,isMemo:po,isValidElement:Be,lazy:ao,memo:eo,render:uo,startTransition:Er,unmountComponentAtNode:vo,unstable_batchedUpdates:yo,useCallback:Ve,useContext:re,useDebugValue:Mt,useDeferredValue:Sr,useEffect:Ae,useErrorBoundary:Aa,useId:yr,useImperativeHandle:gr,useInsertionEffect:Pr,useLayoutEffect:Re,useMemo:_e,useReducer:Nt,useRef:ye,useState:$e,useSyncExternalStore:Ar,useTransition:Cr,version:za},Symbol.toStringTag,{value:"Module"}));/**
* @remix-run/router v1.2.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function Et(){return Et=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Et.apply(this,arguments)}var Ce;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Ce||(Ce={}));const ln="popstate";function Ha(e){e===void 0&&(e={});function t(o,a){let{pathname:i="/",search:s="",hash:l=""}=ke(o.location.hash.substr(1));return tr("",{pathname:i,search:s,hash:l},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(o,a){let i=o.document.querySelector("base"),s="";if(i&&i.getAttribute("href")){let l=o.location.href,c=l.indexOf("#");s=c===-1?l:l.slice(0,c)}return s+"#"+(typeof a=="string"?a:Rr(a))}function n(o,a){Wa(o.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(a)+")")}return Ba(t,r,n,e)}function Q(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Wa(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Ka(){return Math.random().toString(36).substr(2,8)}function cn(e){return{usr:e.state,key:e.key}}function tr(e,t,r,n){return r===void 0&&(r=null),Et({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ke(t):t,{state:r,key:t&&t.key||n||Ka()})}function Rr(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function ke(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function Va(e){let t=typeof window<"u"&&typeof window.location<"u"&&window.location.origin!=="null"?window.location.origin:window.location.href,r=typeof e=="string"?e:Rr(e);return Q(t,"No window.location.(origin|href) available to create URL for href: "+r),new URL(r,t)}function Ba(e,t,r,n){n===void 0&&(n={});let{window:o=document.defaultView,v5Compat:a=!1}=n,i=o.history,s=Ce.Pop,l=null;function c(){s=Ce.Pop,l&&l({action:s,location:f.location})}function d(h,m){s=Ce.Push;let y=tr(f.location,h,m);r&&r(y,h);let w=cn(y),g=f.createHref(y);try{i.pushState(w,"",g)}catch{o.location.assign(g)}a&&l&&l({action:s,location:f.location})}function u(h,m){s=Ce.Replace;let y=tr(f.location,h,m);r&&r(y,h);let w=cn(y),g=f.createHref(y);i.replaceState(w,"",g),a&&l&&l({action:s,location:f.location})}let f={get action(){return s},get location(){return e(o,i)},listen(h){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(ln,c),l=h,()=>{o.removeEventListener(ln,c),l=null}},createHref(h){return t(o,h)},encodeLocation(h){let m=Va(typeof h=="string"?h:Rr(h));return{pathname:m.pathname,search:m.search,hash:m.hash}},push:d,replace:u,go(h){return i.go(h)}};return f}var fn;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(fn||(fn={}));function Ya(e,t,r){r===void 0&&(r="/");let n=typeof t=="string"?ke(t):t,o=Po(n.pathname||"/",r);if(o==null)return null;let a=So(e);Ga(a);let i=null;for(let s=0;i==null&&s<a.length;++s)i=oi(a[s],ii(o));return i}function So(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let o=(a,i,s)=>{let l={relativePath:s===void 0?a.path||"":s,caseSensitive:a.caseSensitive===!0,childrenIndex:i,route:a};l.relativePath.startsWith("/")&&(Q(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let c=Te([n,l.relativePath]),d=r.concat(l);a.children&&a.children.length>0&&(Q(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),So(a.children,t,d,c)),!(a.path==null&&!a.index)&&t.push({path:c,score:ri(c,a.index),routesMeta:d})};return e.forEach((a,i)=>{var s;if(a.path===""||!((s=a.path)!=null&&s.includes("?")))o(a,i);else for(let l of Co(a.path))o(a,i,l)}),t}function Co(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,o=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return o?[a,""]:[a];let i=Co(n.join("/")),s=[];return s.push(...i.map(l=>l===""?a:[a,l].join("/"))),o&&s.push(...i),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function Ga(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:ni(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const Ja=/^:\w+$/,Za=3,Qa=2,Xa=1,ei=10,ti=-2,dn=e=>e==="*";function ri(e,t){let r=e.split("/"),n=r.length;return r.some(dn)&&(n+=ti),t&&(n+=Qa),r.filter(o=>!dn(o)).reduce((o,a)=>o+(Ja.test(a)?Za:a===""?Xa:ei),n)}function ni(e,t){return e.length===t.length&&e.slice(0,-1).every((n,o)=>n===t[o])?e[e.length-1]-t[t.length-1]:0}function oi(e,t){let{routesMeta:r}=e,n={},o="/",a=[];for(let i=0;i<r.length;++i){let s=r[i],l=i===r.length-1,c=o==="/"?t:t.slice(o.length)||"/",d=rr({path:s.relativePath,caseSensitive:s.caseSensitive,end:l},c);if(!d)return null;Object.assign(n,d.params);let u=s.route;a.push({params:n,pathname:Te([o,d.pathname]),pathnameBase:di(Te([o,d.pathnameBase])),route:u}),d.pathnameBase!=="/"&&(o=Te([o,d.pathnameBase]))}return a}function rr(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=ai(e.path,e.caseSensitive,e.end),o=t.match(r);if(!o)return null;let a=o[0],i=a.replace(/(.)\/+$/,"$1"),s=o.slice(1);return{params:n.reduce((c,d,u)=>{if(d==="*"){let f=s[u]||"";i=a.slice(0,a.length-f.length).replace(/(.)\/+$/,"$1")}return c[d]=si(s[u]||"",d),c},{}),pathname:a,pathnameBase:i,pattern:e}}function ai(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),xr(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(i,s)=>(n.push(s),"/([^\\/]+)"));return e.endsWith("*")?(n.push("*"),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),n]}function ii(e){try{return decodeURI(e)}catch(t){return xr(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function si(e,t){try{return decodeURIComponent(e)}catch(r){return xr(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+r+").")),e}}function Po(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function xr(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function ui(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:o=""}=typeof e=="string"?ke(e):e;return{pathname:r?r.startsWith("/")?r:li(r,t):t,search:hi(n),hash:pi(o)}}function li(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?r.length>1&&r.pop():o!=="."&&r.push(o)}),r.length>1?r.join("/"):"/"}function zt(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function ci(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function fi(e,t,r,n){n===void 0&&(n=!1);let o;typeof e=="string"?o=ke(e):(o=Et({},e),Q(!o.pathname||!o.pathname.includes("?"),zt("?","pathname","search",o)),Q(!o.pathname||!o.pathname.includes("#"),zt("#","pathname","hash",o)),Q(!o.search||!o.search.includes("#"),zt("#","search","hash",o)));let a=e===""||o.pathname==="",i=a?"/":o.pathname,s;if(n||i==null)s=r;else{let u=t.length-1;if(i.startsWith("..")){let f=i.split("/");for(;f[0]==="..";)f.shift(),u-=1;o.pathname=f.join("/")}s=u>=0?t[u]:"/"}let l=ui(o,s),c=i&&i!=="/"&&i.endsWith("/"),d=(a||i===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(c||d)&&(l.pathname+="/"),l}const Te=e=>e.join("/").replace(/\/\/+/g,"/"),di=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),hi=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,pi=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class mi{constructor(t,r,n,o){o===void 0&&(o=!1),this.status=t,this.statusText=r||"",this.internal=o,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function vi(e){return e instanceof mi}const Ao=["post","put","patch","delete"],Cl=new Set(Ao),gi=["get",...Ao],Pl=new Set(gi);const Al=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";/**
* React Router v6.6.2
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function nr(){return nr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},nr.apply(this,arguments)}function yi(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const _i=typeof Object.is=="function"?Object.is:yi,{useState:wi,useEffect:bi,useLayoutEffect:Ei,useDebugValue:Si}=bt;function Ci(e,t,r){const n=t(),[{inst:o},a]=wi({inst:{value:n,getSnapshot:t}});return Ei(()=>{o.value=n,o.getSnapshot=t,Ht(o)&&a({inst:o})},[e,n,t]),bi(()=>(Ht(o)&&a({inst:o}),e(()=>{Ht(o)&&a({inst:o})})),[e]),Si(n),n}function Ht(e){const t=e.getSnapshot,r=e.value;try{const n=t();return!_i(r,n)}catch{return!0}}function Pi(e,t,r){return t()}const Ai=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Ri=!Ai,xi=Ri?Pi:Ci,Rl="useSyncExternalStore"in bt?(e=>e.useSyncExternalStore)(bt):xi,Ro=Pe(null),xo=Pe(null);const Or=Pe(null),jt=Pe(null),Ye=Pe({outlet:null,matches:[]}),Oo=Pe(null);function It(){return re(jt)!=null}function Dr(){return It()||Q(!1),re(jt).location}function Oi(){It()||Q(!1);let{basename:e,navigator:t}=re(Or),{matches:r}=re(Ye),{pathname:n}=Dr(),o=JSON.stringify(ci(r).map(s=>s.pathnameBase)),a=ye(!1);return Ae(()=>{a.current=!0}),Ve(function(s,l){if(l===void 0&&(l={}),!a.current)return;if(typeof s=="number"){t.go(s);return}let c=fi(s,JSON.parse(o),n,l.relative==="path");e!=="/"&&(c.pathname=c.pathname==="/"?e:Te([e,c.pathname])),(l.replace?t.replace:t.push)(c,l.state,l)},[e,t,o,n])}function xl(){let{matches:e}=re(Ye),t=e[e.length-1];return t?t.params:{}}function Di(e,t){It()||Q(!1);let{navigator:r}=re(Or),n=re(xo),{matches:o}=re(Ye),a=o[o.length-1],i=a?a.params:{},s=a?a.pathname:"/",l=a?a.pathnameBase:"/",c=a&&a.route,d=Dr(),u;if(t){var f;let g=typeof t=="string"?ke(t):t;l==="/"||(f=g.pathname)!=null&&f.startsWith(l)||Q(!1),u=g}else u=d;let h=u.pathname||"/",m=l==="/"?h:h.slice(l.length)||"/",y=Ya(e,{pathname:m}),w=Mi(y&&y.map(g=>Object.assign({},g,{params:Object.assign({},i,g.params),pathname:Te([l,r.encodeLocation?r.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?l:Te([l,r.encodeLocation?r.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),o,n||void 0);return t&&w?H(jt.Provider,{value:{location:nr({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Ce.Pop}},w):w}function Ti(){let e=ki(),t=vi(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:n},a={padding:"2px 4px",backgroundColor:n};return H(ce,null,H("h2",null,"Unhandled Thrown Error!"),H("h3",{style:{fontStyle:"italic"}},t),r?H("pre",{style:o},r):null,H("p",null,"💿 Hey developer 👋"),H("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",H("code",{style:a},"errorElement")," props on ",H("code",{style:a},"<Route>")))}class Li extends ue{constructor(t){super(t),this.state={location:t.location,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location?{error:t.error,location:t.location}:{error:t.error||r.error,location:r.location}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error?H(Ye.Provider,{value:this.props.routeContext},H(Oo.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Ni(e){let{routeContext:t,match:r,children:n}=e,o=re(Ro);return o&&o.static&&o.staticContext&&r.route.errorElement&&(o.staticContext._deepestRenderedBoundaryId=r.route.id),H(Ye.Provider,{value:t},n)}function Mi(e,t,r){if(t===void 0&&(t=[]),e==null)if(r!=null&&r.errors)e=r.matches;else return null;let n=e,o=r==null?void 0:r.errors;if(o!=null){let a=n.findIndex(i=>i.route.id&&(o==null?void 0:o[i.route.id]));a>=0||Q(!1),n=n.slice(0,Math.min(n.length,a+1))}return n.reduceRight((a,i,s)=>{let l=i.route.id?o==null?void 0:o[i.route.id]:null,c=r?i.route.errorElement||H(Ti,null):null,d=t.concat(n.slice(0,s+1)),u=()=>H(Ni,{match:i,routeContext:{outlet:a,matches:d}},l?c:i.route.element!==void 0?i.route.element:a);return r&&(i.route.errorElement||s===0)?H(Li,{location:r.location,component:c,error:l,children:u(),routeContext:{outlet:null,matches:d}}):u()},null)}var hn;(function(e){e.UseRevalidator="useRevalidator"})(hn||(hn={}));var St;(function(e){e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"})(St||(St={}));function ji(e){let t=re(xo);return t||Q(!1),t}function Ii(e){let t=re(Ye);return t||Q(!1),t}function $i(e){let t=Ii(e),r=t.matches[t.matches.length-1];return r.route.id||Q(!1),r.route.id}function ki(){var e;let t=re(Oo),r=ji(St.UseRouteError),n=$i(St.UseRouteError);return t||((e=r.errors)==null?void 0:e[n])}function Ui(e){Q(!1)}function Fi(e){let{basename:t="/",children:r=null,location:n,navigationType:o=Ce.Pop,navigator:a,static:i=!1}=e;It()&&Q(!1);let s=t.replace(/^\/*/,"/"),l=_e(()=>({basename:s,navigator:a,static:i}),[s,a,i]);typeof n=="string"&&(n=ke(n));let{pathname:c="/",search:d="",hash:u="",state:f=null,key:h="default"}=n,m=_e(()=>{let y=Po(c,s);return y==null?null:{pathname:y,search:d,hash:u,state:f,key:h}},[s,c,d,u,f,h]);return m==null?null:H(Or.Provider,{value:l},H(jt.Provider,{children:r,value:{location:m,navigationType:o}}))}function Ol(e){let{children:t,location:r}=e,n=re(Ro),o=n&&!t?n.router.routes:or(t);return Di(o,r)}var pn;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(pn||(pn={}));const Dl=new Promise(()=>{});function or(e,t){t===void 0&&(t=[]);let r=[];return wr.forEach(e,(n,o)=>{if(!Be(n))return;if(n.type===ce){r.push.apply(r,or(n.props.children,t));return}n.type!==Ui&&Q(!1),!n.props.index||!n.props.children||Q(!1);let a=[...t,o],i={id:n.props.id||a.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,hasErrorBoundary:n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle};n.props.children&&(i.children=or(n.props.children,a)),r.push(i)}),r}/**
* React Router DOM v6.6.2
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function ar(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(o=>[r,o]):[[r,n]])},[]))}function qi(e,t){let r=ar(e);for(let n of t.keys())r.has(n)||t.getAll(n).forEach(o=>{r.append(n,o)});return r}function Tl(e){let{basename:t,children:r,window:n}=e,o=ye();o.current==null&&(o.current=Ha({window:n,v5Compat:!0}));let a=o.current,[i,s]=$e({action:a.action,location:a.location});return Re(()=>a.listen(s),[a]),H(Fi,{basename:t,children:r,location:i.location,navigationType:i.action,navigator:a})}var mn;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(mn||(mn={}));var vn;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(vn||(vn={}));function Ll(e){let t=ye(ar(e)),r=Dr(),n=_e(()=>qi(r.search,t.current),[r.search]),o=Oi(),a=Ve((i,s)=>{const l=ar(typeof i=="function"?i(n):i);o("?"+l,s)},[o,n]);return[n,a]}const zi=Symbol(),Tr=Symbol(),Ze="a",nt="w";let Hi=(e,t)=>new Proxy(e,t);const ir=Object.getPrototypeOf,sr=new WeakMap,Do=e=>e&&(sr.has(e)?sr.get(e):ir(e)===Object.prototype||ir(e)===Array.prototype),Ct=e=>typeof e=="object"&&e!==null,Wi=e=>{if(Array.isArray(e))return Array.from(e);const t=Object.getOwnPropertyDescriptors(e);return Object.values(t).forEach(r=>{r.configurable=!0}),Object.create(ir(e),t)},Lr=e=>e[Tr]||e,To=(e,t,r,n)=>{if(!Do(e))return e;let o=n&&n.get(e);if(!o){const l=Lr(e);o=(c=>Object.values(Object.getOwnPropertyDescriptors(c)).some(d=>!d.configurable&&!d.writable))(l)?[l,Wi(l)]:[l],n==null||n.set(e,o)}const[a,i]=o;let s=r&&r.get(a);return s&&s[1].f===!!i||(s=((l,c)=>{const d={f:c};let u=!1;const f=(m,y)=>{if(!u){let w=d[Ze].get(l);if(w||(w={},d[Ze].set(l,w)),m===nt)w[nt]=!0;else{let g=w[m];g||(g=new Set,w[m]=g),g.add(y)}}},h={get:(m,y)=>y===Tr?l:(f("k",y),To(Reflect.get(m,y),d[Ze],d.c,d.t)),has:(m,y)=>y===zi?(u=!0,d[Ze].delete(l),!0):(f("h",y),Reflect.has(m,y)),getOwnPropertyDescriptor:(m,y)=>(f("o",y),Reflect.getOwnPropertyDescriptor(m,y)),ownKeys:m=>(f(nt),Reflect.ownKeys(m))};return c&&(h.set=h.deleteProperty=()=>!1),[h,d]})(a,!!i),s[1].p=Hi(i||a,s[0]),r&&r.set(a,s)),s[1][Ze]=t,s[1].c=r,s[1].t=n,s[1].p},Lo=(e,t,r,n,o=Object.is)=>{if(o(e,t))return!1;if(!Ct(e)||!Ct(t))return!0;const a=r.get(Lr(e));if(!a)return!0;if(n){const s=n.get(e);if(s&&s.n===t)return s.g;n.set(e,{n:t,g:!1})}let i=null;try{for(const s of a.h||[])if(i=Reflect.has(e,s)!==Reflect.has(t,s),i)return i;if(a[nt]===!0){if(i=((s,l)=>{const c=Reflect.ownKeys(s),d=Reflect.ownKeys(l);return c.length!==d.length||c.some((u,f)=>u!==d[f])})(e,t),i)return i}else for(const s of a.o||[])if(i=!!Reflect.getOwnPropertyDescriptor(e,s)!=!!Reflect.getOwnPropertyDescriptor(t,s),i)return i;for(const s of a.k||[])if(i=Lo(e[s],t[s],r,n,o),i)return i;return i===null&&(i=!0),i}finally{n&&n.set(e,{n:t,g:i})}};const Ki=e=>Do(e)&&e[Tr]||null,gn=(e,t=!0)=>{sr.set(e,t)},Vi=(e,t,r)=>{const n=[],o=new WeakSet,a=(i,s)=>{if(o.has(i))return;Ct(i)&&o.add(i);const l=Ct(i)&&t.get(Lr(i));if(l){var c,d;if((c=l.h)==null||c.forEach(f=>{const h=`:has(${String(f)})`;n.push(s?[...s,h]:[h])}),l[nt]===!0){const f=":ownKeys";n.push(s?[...s,f]:[f])}else{var u;(u=l.o)==null||u.forEach(f=>{const h=`:hasOwn(${String(f)})`;n.push(s?[...s,h]:[h])})}(d=l.k)==null||d.forEach(f=>{r&&!("value"in(Object.getOwnPropertyDescriptor(i,f)||{}))||a(i[f],s?[...s,f]:[f])})}else s&&n.push(s)};return a(e),n};var Pt={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 Wt=e=>typeof e=="object"&&e!==null,Ee=new WeakMap,pt=new WeakSet,Bi=(e=Object.is,t=(c,d)=>new Proxy(c,d),r=c=>Wt(c)&&!pt.has(c)&&(Array.isArray(c)||!(Symbol.iterator in c))&&!(c instanceof WeakMap)&&!(c instanceof WeakSet)&&!(c instanceof Error)&&!(c instanceof Number)&&!(c instanceof Date)&&!(c instanceof String)&&!(c instanceof RegExp)&&!(c instanceof ArrayBuffer),n=c=>{switch(c.status){case"fulfilled":return c.value;case"rejected":throw c.reason;default:throw c}},o=new WeakMap,a=(c,d,u=n)=>{const f=o.get(c);if((f==null?void 0:f[0])===d)return f[1];const h=Array.isArray(c)?[]:Object.create(Object.getPrototypeOf(c));return gn(h,!0),o.set(c,[d,h]),Reflect.ownKeys(c).forEach(m=>{if(Object.getOwnPropertyDescriptor(h,m))return;const y=Reflect.get(c,m),{enumerable:w}=Reflect.getOwnPropertyDescriptor(c,m),g={value:y,enumerable:w,configurable:!0};if(pt.has(y))gn(y,!1);else if(y instanceof Promise)delete g.value,g.get=()=>u(y);else if(Ee.has(y)){const[R,O]=Ee.get(y);g.value=a(R,O(),u)}Object.defineProperty(h,m,g)}),Object.preventExtensions(h)},i=new WeakMap,s=[1,1],l=c=>{if(!Wt(c))throw new Error("object required");const d=i.get(c);if(d)return d;let u=s[0];const f=new Set,h=(x,M=++s[0])=>{u!==M&&(u=M,f.forEach(_=>_(x,M)))};let m=s[1];const y=(x=++s[1])=>(m!==x&&!f.size&&(m=x,g.forEach(([M])=>{const _=M[1](x);_>u&&(u=_)})),u),w=x=>(M,_)=>{const P=[...M];P[1]=[x,...P[1]],h(P,_)},g=new Map,R=(x,M)=>{if((Pt?"production":void 0)!=="production"&&g.has(x))throw new Error("prop listener already exists");if(f.size){const _=M[3](w(x));g.set(x,[M,_])}else g.set(x,[M])},O=x=>{var M;const _=g.get(x);_&&(g.delete(x),(M=_[1])==null||M.call(_))},K=x=>(f.add(x),f.size===1&&g.forEach(([_,P],N)=>{if((Pt?"production":void 0)!=="production"&&P)throw new Error("remove already exists");const T=_[3](w(N));g.set(N,[_,T])}),()=>{f.delete(x),f.size===0&&g.forEach(([_,P],N)=>{P&&(P(),g.set(N,[_]))})}),B=Array.isArray(c)?[]:Object.create(Object.getPrototypeOf(c)),X=t(B,{deleteProperty(x,M){const _=Reflect.get(x,M);O(M);const P=Reflect.deleteProperty(x,M);return P&&h(["delete",[M],_]),P},set(x,M,_,P){const N=Reflect.has(x,M),T=Reflect.get(x,M,P);if(N&&(e(T,_)||i.has(_)&&e(T,i.get(_))))return!0;O(M),Wt(_)&&(_=Ki(_)||_);let D=_;if(_ instanceof Promise)_.then($=>{_.status="fulfilled",_.value=$,h(["resolve",[M],$])}).catch($=>{_.status="rejected",_.reason=$,h(["reject",[M],$])});else{!Ee.has(_)&&r(_)&&(D=l(_));const $=!pt.has(D)&&Ee.get(D);$&&R(M,$)}return Reflect.set(x,M,D,P),h(["set",[M],_,T]),!0}});i.set(c,X);const ee=[B,y,a,K];return Ee.set(X,ee),Reflect.ownKeys(c).forEach(x=>{const M=Object.getOwnPropertyDescriptor(c,x);"value"in M&&(X[x]=c[x],delete M.value,delete M.writable),Object.defineProperty(B,x,M)}),X})=>[l,Ee,pt,e,t,r,n,o,a,i,s],[Yi]=Bi();function Gi(e={}){return Yi(e)}function Nr(e,t,r){const n=Ee.get(e);(Pt?"production":void 0)!=="production"&&!n&&console.warn("Please use proxy object");let o;const a=[],i=n[3];let s=!1;const c=i(d=>{if(a.push(d),r){t(a.splice(0));return}o||(o=Promise.resolve().then(()=>{o=void 0,s&&t(a.splice(0))}))});return s=!0,()=>{s=!1,c()}}function ur(e,t){const r=Ee.get(e);(Pt?"production":void 0)!=="production"&&!r&&console.warn("Please use proxy object");const[n,o,a]=r;return a(n,o(),t)}var Mr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function No(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ji(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),r}var jr={exports:{}},Mo={};const Zi=Ji(bt);/**
* @license React
* use-sync-external-store-shim.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Ke=Zi;function Qi(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Xi=typeof Object.is=="function"?Object.is:Qi,es=Ke.useState,ts=Ke.useEffect,rs=Ke.useLayoutEffect,ns=Ke.useDebugValue;function os(e,t){var r=t(),n=es({inst:{value:r,getSnapshot:t}}),o=n[0].inst,a=n[1];return rs(function(){o.value=r,o.getSnapshot=t,Kt(o)&&a({inst:o})},[e,r,t]),ts(function(){return Kt(o)&&a({inst:o}),e(function(){Kt(o)&&a({inst:o})})},[e]),ns(r),r}function Kt(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Xi(e,r)}catch{return!0}}function as(e,t){return t()}var is=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?as:os,Nl=Mo.useSyncExternalStore=Ke.useSyncExternalStore!==void 0?Ke.useSyncExternalStore:is,Ml=jr.exports;jr.exports=Mo;var ss=jr.exports;const us=No(ss);var ls={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{use:yn}=Eo,{useSyncExternalStore:cs}=us,fs=(e,t)=>{const r=ye();Ae(()=>{r.current=Vi(e,t,!0)}),Mt(r.current)},ds=new WeakMap;function jl(e,t){const r=t==null?void 0:t.sync,n=ye(),o=ye();let a=!0;const i=cs(Ve(c=>{const d=Nr(e,c,r);return c(),d},[e,r]),()=>{const c=ur(e,yn);try{if(!a&&n.current&&o.current&&!Lo(n.current,c,o.current,new WeakMap))return n.current}catch{}return c},()=>ur(e,yn));a=!1;const s=new WeakMap;Ae(()=>{n.current=i,o.current=s}),(ls?"production":void 0)!=="production"&&fs(i,s);const l=_e(()=>new WeakMap,[]);return To(i,s,l,ds)}var hs=0,Il=Array.isArray;function At(e,t,r,n,o,a){t||(t={});var i,s,l=t;if("ref"in l)for(s in l={},t)s=="ref"?i=t[s]:l[s]=t[s];var c={type:e,props:l,key:r,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--hs,__i:-1,__u:0,__source:o,__self:a};if(typeof e=="function"&&(i=e.defaultProps))for(s in i)l[s]===void 0&&(l[s]=i[s]);return k.vnode&&k.vnode(c),c}function ps(e,t){var r=Object.setPrototypeOf;r?r(e,t):e.__proto__=t}function ms(e,t){t===void 0&&(t=e.constructor);var r=Error.captureStackTrace;r&&r(e,t)}var vs=function(){var e=function(r,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(o[i]=a[i])},e(r,n)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ge=function(e){vs(t,e);function t(r,n){var o=this.constructor,a=e.call(this,r,n)||this;return Object.defineProperty(a,"name",{value:o.name,enumerable:!1,configurable:!0}),ps(a,o.prototype),ms(a),a}return t}(Error);var qe=null;typeof WebSocket<"u"?qe=WebSocket:typeof MozWebSocket<"u"?qe=MozWebSocket:typeof global<"u"?qe=global.WebSocket||global.MozWebSocket:typeof window<"u"?qe=window.WebSocket||window.MozWebSocket:typeof self<"u"&&(qe=self.WebSocket||self.MozWebSocket);const Ir=qe;function gs(){let e,t;const r=new Promise((...n)=>[e,t]=n);return Object.freeze({resolve:e,reject:t,promise:r})}function ys(e,t){const r=[],n=[],o=e((...d)=>{const u=n.shift();u?u.resolve({value:d,done:!1}):r.push(d)}),a=t==null?void 0:t.signal;let i=!1,s=null;const l=()=>{s=new Error("Abort Error")},c=()=>{o==null||o(),a==null||a.removeEventListener("abort",l)};return a==null||a.addEventListener("abort",l,{once:!0}),{async next(){const d=r.shift();if(d)return{value:d,done:!1};if(i)return{value:void 0,done:!0};if(s)return Promise.reject(s);const u=gs();return n.push(u),u.promise},async return(){i=!0,c();for(const d of n)d.resolve({value:void 0,done:!0});return{value:void 0,done:!0}},async throw(d){return s=d,c(),{value:void 0,done:!0}},[Symbol.asyncIterator](){return this}}}var lr=function(e,t){return lr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},lr(e,t)};function _s(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");lr(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Me=function(){return Me=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Me.apply(this,arguments)};function ws(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function bs(e,t,r,n){var o=arguments.length,a=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}function Es(e,t){return function(r,n){t(r,n,e)}}function Ss(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function Cs(e,t,r,n){function o(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function s(d){try{c(n.next(d))}catch(u){i(u)}}function l(d){try{c(n.throw(d))}catch(u){i(u)}}function c(d){d.done?a(d.value):o(d.value).then(s,l)}c((n=n.apply(e,t||[])).next())})}function Ps(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,o,a,i;return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(c){return function(d){return l([c,d])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(r=0)),r;)try{if(n=1,o&&(a=c[0]&2?o.return:c[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,c[1])).done)return a;switch(o=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,o=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){r.label=c[1];break}if(c[0]===6&&r.label<a[1]){r.label=a[1],a=c;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(c);break}a[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(d){c=[6,d],o=0}finally{n=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}var $r=Object.create?function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]};function As(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&$r(t,e,r)}function cr(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function jo(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,a=[],i;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(s){i={error:s}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return a}function Rs(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(jo(arguments[t]));return e}function xs(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),o=0,t=0;t<r;t++)for(var a=arguments[t],i=0,s=a.length;i<s;i++,o++)n[o]=a[i];return n}function Os(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}function it(e){return this instanceof it?(this.v=e,this):new it(e)}function Ds(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),o,a=[];return o={},i("next"),i("throw"),i("return"),o[Symbol.asyncIterator]=function(){return this},o;function i(f){n[f]&&(o[f]=function(h){return new Promise(function(m,y){a.push([f,h,m,y])>1||s(f,h)})})}function s(f,h){try{l(n[f](h))}catch(m){u(a[0][3],m)}}function l(f){f.value instanceof it?Promise.resolve(f.value.v).then(c,d):u(a[0][2],f)}function c(f){s("next",f)}function d(f){s("throw",f)}function u(f,h){f(h),a.shift(),a.length&&s(a[0][0],a[0][1])}}function Ts(e){var t,r;return t={},n("next"),n("throw",function(o){throw o}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(o,a){t[o]=e[o]?function(i){return(r=!r)?{value:it(e[o](i)),done:o==="return"}:a?a(i):i}:a}}function Ls(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof cr=="function"?cr(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(a){r[a]=e[a]&&function(i){return new Promise(function(s,l){i=e[a](i),o(s,l,i.done,i.value)})}}function o(a,i,s,l){Promise.resolve(l).then(function(c){a({value:c,done:s})},i)}}function Ns(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var Ms=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function js(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&$r(t,e,r);return Ms(t,e),t}function Is(e){return e&&e.__esModule?e:{default:e}}function $s(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}function ks(e,t,r,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(e,r):o?o.value=r:t.set(e,r),r}function Us(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}const $l=Object.freeze(Object.defineProperty({__proto__:null,get __assign(){return Me},__asyncDelegator:Ts,__asyncGenerator:Ds,__asyncValues:Ls,__await:it,__awaiter:Cs,__classPrivateFieldGet:$s,__classPrivateFieldIn:Us,__classPrivateFieldSet:ks,__createBinding:$r,__decorate:bs,__exportStar:As,__extends:_s,__generator:Ps,__importDefault:Is,__importStar:js,__makeTemplateObject:Ns,__metadata:Ss,__param:Es,__read:jo,__rest:ws,__spread:Rs,__spreadArray:Os,__spreadArrays:xs,__values:cr},Symbol.toStringTag,{value:"Module"}));function Fs(e){return e.toLowerCase()}var qs=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],zs=/[^A-Z0-9]+/gi;function Io(e,t){t===void 0&&(t={});for(var r=t.splitRegexp,n=r===void 0?qs:r,o=t.stripRegexp,a=o===void 0?zs:o,i=t.transform,s=i===void 0?Fs:i,l=t.delimiter,c=l===void 0?" ":l,d=_n(_n(e,n,"$1\0$2"),a,"\0"),u=0,f=d.length;d.charAt(u)==="\0";)u++;for(;d.charAt(f-1)==="\0";)f--;return d.slice(u,f).split("\0").map(s).join(c)}function _n(e,t,r){return t instanceof RegExp?e.replace(t,r):t.reduce(function(n,o){return n.replace(o,r)},e)}function $o(e,t){var r=e.charAt(0),n=e.substr(1).toLowerCase();return t>0&&r>="0"&&r<="9"?"_"+r+n:""+r.toUpperCase()+n}function Hs(e,t){return t===void 0&&(t={}),Io(e,Me({delimiter:"",transform:$o},t))}function Ws(e,t){return t===0?e.toLowerCase():$o(e,t)}function Ks(e,t){return t===void 0&&(t={}),Hs(e,Me({transform:Ws},t))}function Vs(e,t){return t===void 0&&(t={}),Io(e,Me({delimiter:"."},t))}function kr(e,t){return t===void 0&&(t={}),Vs(e,Me({delimiter:"_"},t))}class je extends Ge{}class wn extends Ge{constructor(t,r,n,o){super(t,o),this.contentType=r,this.data=n}}class ko extends Ge{constructor(t,r){super(t.message,r),this.statusCode=t.statusCode,this.message=t.message,this.description=t.description,this.additionalProperties=t.additionalProperties,this.details=t.details}}class Uo extends Ge{}class bn extends Ge{constructor(t,r){super(t,r),this.message=t}}function Fo(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function le(e,t,r,n){function o(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function s(d){try{c(n.next(d))}catch(u){i(u)}}function l(d){try{c(n.throw(d))}catch(u){i(u)}}function c(d){d.done?a(d.value):o(d.value).then(s,l)}c((n=n.apply(e,t||[])).next())})}function En(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function fe(e){return this instanceof fe?(this.v=e,this):new fe(e)}function qo(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),o,a=[];return o={},i("next"),i("throw"),i("return"),o[Symbol.asyncIterator]=function(){return this},o;function i(f){n[f]&&(o[f]=function(h){return new Promise(function(m,y){a.push([f,h,m,y])>1||s(f,h)})})}function s(f,h){try{l(n[f](h))}catch(m){u(a[0][3],m)}}function l(f){f.value instanceof fe?Promise.resolve(f.value.v).then(c,d):u(a[0][2],f)}function c(f){s("next",f)}function d(f){s("throw",f)}function u(f,h){f(h),a.shift(),a.length&&s(a[0][0],a[0][1])}}function zo(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof En=="function"?En(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(a){r[a]=e[a]&&function(i){return new Promise(function(s,l){i=e[a](i),o(s,l,i.done,i.value)})}}function o(a,i,s,l){Promise.resolve(l).then(function(c){a({value:c,done:s})},i)}}const Ho=e=>new Promise(t=>setTimeout(()=>t(),e)),Ur=e=>typeof e=="object"&&e!==null&&e.constructor.name==="Object";function Bs(){}class Ys extends Ge{constructor(t,r){super(`Maximum number of attempts reached: ${t}`,r)}}class Gs{constructor(t={}){this.props=t,this.attempts=0}sleep(){return le(this,void 0,void 0,function*(){if(this.attempts>=this.maxAttempts)throw new Ys(this.attempts);yield Ho(this.timeout),this.attempts++})}clear(){this.attempts=0}get factor(){var t;return(t=this.props.factor)!==null&&t!==void 0?t:1e3}get base(){var t;return(t=this.props.base)!==null&&t!==void 0?t:2}get maxAttempts(){var t;return(t=this.props.maxAttempts)!==null&&t!==void 0?t:Number.POSITIVE_INFINITY}get timeout(){return this.factor*Math.pow(this.base,this.attempts)}}const Js=()=>{let e,t;return{promise:new Promise((n,o)=>{e=n,t=o}),resolve:e,reject:t}},Zs=e=>{const t=new Map;for(const r of e.split(",")){const n=r.match(/<([^>]+)>;\s*rel="([^"]+)"/);n&&t.set(n[2],n[1])}return t};class Rt{constructor(t,r,n,o,a="next"){this.http=t,this.nextPath=r,this.nextParams=n,this.meta=o,this.direction=a}next(){return le(this,void 0,void 0,function*(){if(this.nextPath==null)return{done:!0,value:void 0};const t=yield this.http.request(Object.assign({method:"GET",path:this.nextPath,search:this.nextParams},this.meta)),r=this.getLink(t.headers.get("link"));return this.nextPath=r==null?void 0:r.pathname,this.nextParams=r==null?void 0:r.search.replace(/^\?/,""),{done:!1,value:yield t.data}})}return(t){return le(this,void 0,void 0,function*(){return this.clear(),{done:!0,value:yield t}})}throw(t){return le(this,void 0,void 0,function*(){throw this.clear(),t})}then(t=Promise.resolve.bind(Promise),r=Promise.reject.bind(Promise)){return this.next().then(n=>t(n.value),r)}values(){return this[Symbol.asyncIterator]()}getDirection(){return this.direction}setDirection(t){return new Rt(this.http,this.nextPath,this.nextParams,this.meta,t)}[Symbol.asyncIterator](){return this}getLink(t){if(t==null)return;const r=Zs(t).get(this.direction);if(r!=null)return new URL(r)}clear(){this.nextPath=void 0,this.nextParams=void 0}clone(){return new Rt(this.http,this.nextPath,this.nextParams,this.meta,this.direction)}}class Qs{constructor(t,r){this.http=t,this.hook=r}dispatch(t){this.hook!=null&&(t=this.hook.beforeDispatch(t));let r=this.hook.dispatch(t);if(r!==!1)return r;switch(t.type){case"fetch":{r=this.http.get(t.path,t.data,t.meta);break}case"create":{r=this.http.post(t.path,t.data,t.meta);break}case"update":{r=this.http.put(t.path,t.data,t.meta);break}case"remove":{r=this.http.delete(t.path,t.data,t.meta);break}case"list":{r=new Rt(this.http,t.path,t.data);break}}return r instanceof Promise?r.then(n=>{var o;return(o=this.hook)===null||o===void 0?void 0:o.afterDispatch(t,n)}):this.hook.afterDispatch(t,r)}}function Xs(e){return e.readyState===Ir.OPEN?Promise.resolve():new Promise((t,r)=>{const n=i=>{r(i)},o=()=>{r(new Error("WebSocket closed"))},a=()=>{t()};e.addEventListener("error",n,{once:!0}),e.addEventListener("close",o,{once:!0}),e.addEventListener("open",a,{once:!0})})}function eu(e){return e.readyState===Ir.CLOSED?Promise.resolve():new Promise(t=>{const r=()=>{t()};e.addEventListener("error",r,{once:!0}),e.addEventListener("close",r,{once:!0})})}class tu{constructor(t,r){this.props=t,this.logger=r,this.queue=[],this.closed=!1,this.initialized=!1,this.backoff=new Gs({maxAttempts:this.props.maxAttempts})}canAcquire(){return!this.closed}acquire(){return le(this,void 0,void 0,function*(){if(this.init(),this.ws!=null)return this.ws;const t=Js();return this.queue.push(t),yield t.promise})}close(){var t;this.closed=!0,(t=this.ws)===null||t===void 0||t.close(),this.backoff.clear();for(const{reject:r}of this.queue)r(new bn("WebSocket closed"));this.queue=[]}init(){return le(this,void 0,void 0,function*(){var t,r,n,o,a,i;if(!this.initialized){for(this.initialized=!0;!this.closed;){(t=this.ws)===null||t===void 0||t.close();try{yield this.backoff.sleep()}catch{break}try{(r=this.logger)===null||r===void 0||r.log("info","Connecting to WebSocket...");{const s=(n=this.props.implementation)!==null&&n!==void 0?n:Ir,l=new s(...this.props.constructorParameters);yield Xs(l),this.ws=l}(o=this.logger)===null||o===void 0||o.log("info","Connected to WebSocket");for(const{resolve:s}of this.queue)s(this.ws);this.queue=[],yield eu(this.ws),(a=this.logger)===null||a===void 0||a.log("info","WebSocket closed"),this.backoff.clear()}catch(s){(i=this.logger)===null||i===void 0||i.log("error","WebSocket error:",s)}}for(const{reject:s}of this.queue)s(new bn(`Failed to connect to WebSocket after ${this.props.maxAttempts} attempts`));this.queue=[]}})}}function ru(e){return qo(this,arguments,function*(){var r,n,o,a;const i=f=>le(this,void 0,void 0,function*(){if(l.return==null)throw new je("events.return is undefined");yield l.return(f)}),s=f=>le(this,void 0,void 0,function*(){if(l.return==null)throw new je("events.return is undefined");yield l.return(f)}),l=ys(f=>(e.addEventListener("message",f),e.addEventListener("error",s),e.addEventListener("close",i),()=>{e.removeEventListener("message",f),e.removeEventListener("error",s),e.removeEventListener("close",i)}));try{for(var c=!0,d=zo(l),u;u=yield fe(d.next()),r=u.done,!r;c=!0){a=u.value,c=!1;const[f]=a;yield yield fe(f)}}catch(f){n={error:f}}finally{try{!c&&!r&&(o=d.return)&&(yield fe(o.call(d)))}finally{if(n)throw n.error}}})}class nu{constructor(t,r,n,o,a){this.connector=t,this.serializer=r,this.stream=n,this.logger=o,this.params=a}values(){return qo(this,arguments,function*(){var r,n,o,a,i,s,l;for((i=this.logger)===null||i===void 0||i.log("info","Subscribing to stream",this.stream);this.connector.canAcquire();){this.connection=yield fe(this.connector.acquire());const f=this.serializer.serialize("json",Object.assign({type:"subscribe",stream:this.stream},this.params));(s=this.logger)===null||s===void 0||s.log("debug","↑ WEBSOCKET",f),this.connection.send(f);const h=ru(this.connection);try{for(var c=!0,d=(n=void 0,zo(h)),u;u=yield fe(d.next()),r=u.done,!r;c=!0){a=u.value,c=!1;const m=a,y=yield fe(this.parseMessage(m.data));this.test(y)&&((l=this.logger)===null||l===void 0||l.log("debug","↓ WEBSOCKET",y),yield yield fe(y))}}catch(m){n={error:m}}finally{try{!c&&!r&&(o=d.return)&&(yield fe(o.call(d)))}finally{if(n)throw n.error}}}})}unsubscribe(){if(this.connection==null)return;const t=this.serializer.serialize("json",Object.assign({type:"unsubscribe",stream:this.stream},this.params));this.connection.send(t)}[Symbol.asyncIterator](){return this.values()}[Symbol.dispose](){this.unsubscribe()}test(t){var r;const n=(r=this.params)!==null&&r!==void 0?r:{},o=Object.values(n);return[this.stream,...o].every(i=>t.stream.includes(i))}parseMessage(t){return le(this,void 0,void 0,function*(){const r=this.serializer.deserialize("json",t);if("error"in r)throw new je(r.error);const n=r.event==="delete"||r.payload==null?r.payload:this.serializer.deserialize("json",r.payload);return{stream:r.stream,event:r.event,payload:n}})}}class ou{constructor(t,r,n){this.connector=t,this.serializer=r,this.logger=n}dispatch(t){var r;if(t.type==="close")return this.connector.close(),{};if(t.type==="prepare")return this.connector.acquire();if(t.type!=="subscribe")throw new je(`Unknown action type ${t.type}`);const n=(r=t.data)!==null&&r!==void 0?r:{},o=t.path.replace(/^\//,"").replaceAll("/",":");return new nu(this.connector,this.serializer,o,this.logger,Object.assign({},n))}[Symbol.dispose](){this.connector.close()}}const st=(e,t={})=>{const{context:r=[],applicable:n=!1}=t;let o={};const a={get:iu(e,r)};return n&&(o=Bs,a.apply=su(e,r)),new Proxy(o,a)},au=new Set(["then","catch","finally","inspect","toString","valueOf","toJSON","constructor","prototype","length","name","caller","callee","arguments","bind","apply","call"]),iu=(e,t)=>(r,n)=>{if(!(typeof n=="string"&&au.has(n))){if(n===Symbol.dispose)return e[Symbol.dispose];if(typeof n!="symbol")return n.startsWith("$")?st(e,{context:[...t,n],applicable:!0}):st(e,{context:[...t,kr(n)],applicable:!0})}},su=(e,t)=>(r,n,o)=>{const a=t.pop();if(a==null)throw new Error("No action specified");if(a==="$select")return st(e,{context:[...t,...o],applicable:!0});const i="/"+t.join("/"),[s,l]=o;return e.dispatch({type:a,path:i,data:s,meta:l})};function Wo(e){return["fetch","create","update","remove","list"].includes(e)}function uu(e){if(Wo(e))return e;switch(e){case"lookup":case"verify_credentials":return"fetch";case"update_credentials":return"update";default:return"create"}}function lu(e,t){return e==="create"&&t==="/api/v1/accounts"||e==="update"&&t==="/api/v1/accounts/update_credentials"||e==="create"&&t==="/api/v1/email"||e==="create"&&t==="/api/v1/featured_tag"||e==="create"&&t==="/api/v1/media"||e==="create"&&t==="/api/v2/media"?"multipart-form":"json"}function cu(e,t,r){return le(this,void 0,void 0,function*(){let n;const o=AbortSignal.timeout(t);for(;n==null;){if(o.aborted)throw new Uo(`Media processing timed out of ${t}ms`);try{yield Ho(1e3);const a=yield r.get(`/api/v1/media/${e}`);a.url!=null&&(n=a)}catch(a){if(a instanceof ko&&a.statusCode===404)continue;throw a}}return n})}class fu{constructor(t,r=1e3*60){this.http=t,this.mediaTimeout=r}beforeDispatch(t){const r=uu(t.type),n=Wo(t.type)?t.path:t.path+"/"+kr(t.type),o=lu(r,n),a=Object.assign(Object.assign({},t.meta),{encoding:o});return{type:r,path:n,data:t.data,meta:a}}dispatch(t){return t.type==="update"&&t.path==="/api/v1/accounts/update_credentials"?this.http.patch(t.path,t.data,t.meta):!1}afterDispatch(t,r){var n;if(t.type==="create"&&t.path==="/api/v2/media"){const o=r;return Ur(t.data)&&((n=t.data)===null||n===void 0?void 0:n.skipPolling)===!0?o:cu(o.id,this.mediaTimeout,this.http)}return r}}const du=e=>{const t=new AbortController;for(const r of e)r.addEventListener("abort",()=>t.abort(),{once:!0});return t.signal},hu=([e,...t])=>{const r=new Headers(e);for(const n of t)for(const[o,a]of new Headers(n).entries())r.set(o,a);return r};class pu{constructor(t,r){this.props=t,this.serializer=r}mergeRequestInitWithDefaults(t={}){const r=Object.assign({},this.props.requestInit);{const{headers:n,signal:o}=t,a=Fo(t,["headers","signal"]);Object.assign(r,a),r.headers=this.mergeHeadersWithDefaults(n),r.signal=this.mergeAbortSignalWithDefaults(o)}return r}resolvePath(t,r){const n=new URL(t,this.props.url);return typeof r=="string"?n.search=r:r!=null&&(n.search=this.serializer.serialize("querystring",r)),n}mergeHeadersWithDefaults(t={}){var r,n;const o=hu([(n=(r=this.props.requestInit)===null||r===void 0?void 0:r.headers)!==null&&n!==void 0?n:{},t]),a=new Headers(o);return this.props.accessToken&&a.set("Authorization",`Bearer ${this.props.accessToken}`),new Headers(a)}mergeAbortSignalWithDefaults(t){var r;const n=[];return this.props.timeout!=null&&n.push(AbortSignal.timeout(this.props.timeout)),!((r=this.props.requestInit)===null||r===void 0)&&r.signal&&n.push(this.props.requestInit.signal),t!=null&&n.push(t),n.length===1?n[0]:du(n)}}class mu{constructor(t,r){this.props=t,this.serializer=r}getProtocols(t=[]){return this.props.useInsecureAccessToken||this.props.accessToken==null?[...t]:[this.props.accessToken,...t]}resolvePath(t,r={}){const n=new URL(t,this.props.streamingApiUrl);return this.props.useInsecureAccessToken&&(r.accessToken=this.props.accessToken),n.search=this.serializer.serialize("querystring",r),n}getMaxAttempts(){return this.props.retry===!0||this.props.retry==null?Number.POSITIVE_INFINITY:this.props.retry===!1?1:this.props.retry}}class vu{get(t,r,n={}){return this.request(Object.assign({method:"GET",path:t,search:r},n)).then(o=>o.data)}post(t,r,n={}){return this.request(Object.assign({method:"POST",path:t,body:r},n)).then(o=>o.data)}delete(t,r,n={}){return this.request(Object.assign({method:"DELETE",path:t,body:r},n)).then(o=>o.data)}put(t,r,n={}){return this.request(Object.assign({method:"PUT",path:t,body:r},n)).then(o=>o.data)}patch(t,r,n={}){return this.request(Object.assign({method:"PATCH",path:t,body:r},n)).then(o=>o.data)}}const Sn=e=>{var t;const r=(t=e.get("Content-Type"))===null||t===void 0?void 0:t.replace(/\s*;.*$/,"");if(typeof r=="string")switch(r){case"application/json":return"json";case"multipart/form-data":return"multipart-form";default:return}};class gu extends vu{constructor(t,r,n){super(),this.serializer=t,this.config=r,this.logger=n}request(t){return le(this,void 0,void 0,function*(){var r,n,o,a,i;const s=this.createRequest(t);try{(r=this.logger)===null||r===void 0||r.log("info",`${s.method} ${s.url}`),(n=this.logger)===null||n===void 0||n.log("debug"," body",{encoding:t.encoding,body:t.body});const l=yield fetch(s);if(!l.ok)throw l;const c=yield l.text(),d=Sn(l.headers);if(d==null)throw new je("The server returned data with an unknown encoding.");const u=this.serializer.deserialize(d,c);return(o=this.logger)===null||o===void 0||o.log("info",`${s.method} ${s.url}`),(a=this.logger)===null||a===void 0||a.log("debug"," body",c),{headers:l.headers,data:u}}catch(l){throw(i=this.logger)===null||i===void 0||i.log("debug","HTTP failed",l),yield this.createError(l)}})}createRequest(t){const{method:r,path:n,search:o,encoding:a="json",requestInit:i={}}=t,s=this.config.resolvePath(n,o),l=this.serializer.serialize(a,t.body),c=this.config.mergeRequestInitWithDefaults(i),d=new Request(s,Object.assign({method:r,body:l},c));return typeof l=="string"&&a==="json"&&d.headers.set("Content-Type","application/json"),d}createError(t){return le(this,void 0,void 0,function*(){if(t instanceof Response){const r=Sn(t.headers);if(r==null)throw new je("The server returned data with an unknown encoding. The server may be down.");const n=this.serializer.deserialize(r,yield t.text()),{error:o,errorDescription:a,details:i}=n,s=Fo(n,["error","errorDescription","details"]);return new ko({statusCode:t.status,message:o,description:a,details:i,additionalProperties:s},{cause:t})}return t!=null&&t.name==="TimeoutError"?new Uo("Request timed out",{cause:t}):t})}}class yu{constructor(t){this.level=t}log(t,r,n){if(!this.level.satisfies(t))return;const o=n==null?[r]:[r,n];switch(t){case"debug":{console.debug(...o);return}case"info":{console.info(...o);return}case"warn":{console.warn(...o);return}case"error":{console.error(...o);return}}}}const ae=Object.freeze({DEBUG:1,INFO:2,WARN:4,ERROR:8});class He{constructor(t){this.level=t}satisfies(t){switch(t){case"debug":return!!(this.level&ae.DEBUG);case"info":return!!(this.level&ae.INFO);case"warn":return!!(this.level&ae.WARN);case"error":return!!(this.level&ae.ERROR)}}static from(t){switch(t){case"debug":return new He(ae.DEBUG|ae.INFO|ae.WARN|ae.ERROR);case"info":return new He(ae.INFO|ae.WARN|ae.ERROR);case"warn":return new He(ae.WARN|ae.ERROR);case"error":return new He(ae.ERROR)}}}const Ko=e=>{const t=He.from(e??"warn");return new yu(t)},Vo=e=>{const t=(r,n="")=>Array.isArray(r)?r.flatMap((o,a)=>t(o,n==""?a.toString():e.onArray(n,a))):Ur(r)?Object.entries(r).flatMap(([o,a])=>t(a,n===""?o:e.onObject(n,o))):[[n,r]];return t},_u=e=>{const t=Vo({onArray:(r,n)=>`${r}[${n}]`,onObject:(r,n)=>`${r}[${n}]`});return Object.fromEntries(t(e))},wu=e=>Vo({onArray:r=>`${r}[]`,onObject:(r,n)=>`${r}[${n}]`})(e).filter(([,r])=>r!=null).map(([r,n])=>`${r}=${encodeURIComponent(n)}`).join("&"),fr=(e,t)=>Array.isArray(e)?e.map(r=>fr(r,t)):Ur(e)?Object.fromEntries(Object.entries(e).map(([r,n])=>[t(r),fr(n,t)])):e,Cn=(e,t)=>fr(e,n=>n.includes(":")||n.startsWith("_")?n:t(n));class Bo{serialize(t,r){const n=Cn(r,kr);switch(t){case"json":return JSON.stringify(n);case"multipart-form":{const o=new FormData;for(const[a,i]of Object.entries(_u(n)))o.append(a,i);return o}case"querystring":return wu(n);default:throw new je(`Unknown content type ${t} to serialize.`)}}deserialize(t,r){switch(t){case"json":try{return Cn(JSON.parse(r),Ks)}catch{throw new wn(`Malformed JSON ${r} returned from the server.`,t,r)}default:throw new wn(`Unknown content type ${t} returned from the server.`,t,r)}}}const bu=e=>{const t=new Bo,r=new pu(e,t),n=Ko(e.log),o=new gu(t,r,n),a=new fu(o),i=new Qs(o,a);return st(i,{context:["api"]})};function Eu(e){const t=new Bo,r=new mu(e,t),n=Ko(e.log),o=new tu({constructorParameters:[r.resolvePath("/api/v1/streaming"),r.getProtocols()],implementation:e.implementation,maxAttempts:r.getMaxAttempts()},n),a=new ou(o,t,n);return st(a)}function Yo(e){const t=I.local.getJSON("accounts")||[];return e&&t.find(r=>r.info.id===e)||t[0]}function Su(e){return(I.local.getJSON("accounts")||[]).find(r=>r.accessToken===e)}function Cu(e){return(I.local.getJSON("accounts")||[]).find(r=>r.instanceURL===e)}const Go=window.matchMedia("(display-mode: standalone)");function Pu(){try{const e=I.session.get("currentAccount");if(e)return e}catch{}if(Go.matches)try{const e=I.local.get("currentAccount");if(e)return e}catch{}return null}function Jo(e){try{I.session.set("currentAccount",e)}catch{}if(Go.matches)try{I.local.set("currentAccount",e)}catch{}}function Fr(){window.__IGNORE_GET_ACCOUNT_ERROR__;const e=Pu();return Yo(e)}function Vt(){const e=Fr(),{instanceURL:t,info:{id:r}}=e;return`${r}@${t}`}function Au(e){const t=I.local.getJSON("accounts")||[],r=t.find(n=>n.info.id===e.info.id);r?(r.info=e.info,r.instanceURL=e.instanceURL,r.accessToken=e.accessToken,r.vapidKey=e.vapidKey):t.push(e),I.local.setJSON("accounts",t),Jo(e.info.id)}function kl(e){const t=I.local.getJSON("accounts")||[],r=t.find(n=>n.info.id===e.id);r&&(r.info.displayName!==e.displayName||r.info.avatar!==e.avatar||r.info.avatar_static!==e.avatar_static)&&(r.info={...r.info,...e},I.local.setJSON("accounts",t))}let Bt=null;function Zo(){if(Bt)return Bt;try{const e=Fr(),t=I.local.getJSON("instances"),r=e.instanceURL.toLowerCase();return Bt=t[r]}catch{return{}}}function Ru(e){const{configuration:t,maxMediaAttachments:r,maxTootChars:n,pleroma:o,pollLimits:a}=e,i=(t==null?void 0:t.statuses)||{};r&&(i.maxMediaAttachments??(i.maxMediaAttachments=r)),n&&(i.maxCharacters??(i.maxCharacters=n));const s=(t==null?void 0:t.polls)||{};return a&&(s.maxCharactersPerOption??(s.maxCharactersPerOption=a.maxOptionChars),s.maxExpiration??(s.maxExpiration=a.maxExpiration),s.maxOptions??(s.maxOptions=a.maxOptions),s.minExpiration??(s.minExpiration=a.minExpiration)),{...t,statuses:i,polls:s}}function Ul(){const e=Zo();return Ru(e)}function Fl(){const e=Zo();return/pixelfed/i.test(e==null?void 0:e.version)}const Se={get:e=>{try{return localStorage.getItem(e)}catch{return null}},getJSON:e=>{try{return JSON.parse(Se.get(e))}catch{return null}},set:(e,t)=>{try{return localStorage.setItem(e,t)}catch{return null}},setJSON:(e,t)=>{try{return Se.set(e,JSON.stringify(t))}catch{return null}},del:e=>{try{return localStorage.removeItem(e)}catch{return null}}},dr={get:e=>{try{return sessionStorage.getItem(e)}catch{return null}},getJSON:e=>{try{return JSON.parse(dr.get(e))}catch{return null}},set:(e,t)=>{try{return sessionStorage.setItem(e,t)}catch{return null}},setJSON:(e,t)=>{try{return dr.set(e,JSON.stringify(t))}catch{return null}},del:e=>{try{return sessionStorage.removeItem(e)}catch{return null}}},xu={get:e=>{try{return Se.getJSON(e)[Vt()]}catch{return null}},set:(e,t)=>{try{const r=Se.getJSON(e)||{};return r[Vt()]=t,Se.setJSON(e,r)}catch{return null}},del:e=>{try{const t=Se.getJSON(e)||{};return delete t[Vt()],Se.setJSON(e,t)}catch{return null}}},I={local:Se,session:dr,account:xu},yt="mastodon.social",xt={},ie={};window.__ACCOUNT_APIS__=ie;let J;function be({instance:e,accessToken:t}){/^https?:\/\//.test(e)&&(e=e.replace(/^https?:\/\//,"").replace(/\/+$/,"").toLowerCase());const r=e?`https://${e}`:`https://${yt}`,o={masto:bu({url:r,accessToken:t,timeout:3e4}),instance:e,accessToken:t};return xt[e]=o,ie[e]||(ie[e]={}),t&&(ie[e][t]=o),o}async function ql(e,t){const{masto:r,accessToken:n}=e;let o;try{o=await r.v2.instance.fetch()}catch{}if(!o)try{o=await r.v1.instance.fetch()}catch{}if(!o)return;const{uri:a,urls:{streamingApi:i}={},domain:s,configuration:{urls:{streaming:l}={}}={}}=o,c=I.local.getJSON("instances")||{};if((a||s)&&(c[(s||a).replace(/^https?:\/\//,"").replace(/\/+$/,"").toLowerCase()]=o),t&&(c[t.toLowerCase()]=o),I.local.setJSON("instances",c),"WebSocket"in window&&(i||l)){const u=Eu({streamingApiUrl:l||i,accessToken:n,implementation:WebSocket});e.streaming=u}}async function zl(e,t,r,n){const{masto:o}=e,a=await o.v1.accounts.verifyCredentials();Jo(a.id),Au({info:a,instanceURL:t.toLowerCase(),accessToken:r,vapidKey:n})}async function Hl(e){try{const{masto:t}=e,r=await t.v1.preferences.fetch();I.account.set("preferences",r)}catch{}}function Ot({instance:e,accessToken:t,accountID:r,account:n}={}){var l,c,d,u,f;if(e&&(e=e.toLowerCase().trim()),e&&t){const h=((l=ie[e])==null?void 0:l[t])||be({instance:e,accessToken:t}),{masto:m,streaming:y}=h;return{masto:m,streaming:y,client:h,authenticated:!0,instance:e}}if(t)for(const h in ie)if(ie[h][t]){const m=ie[h][t],{masto:y,streaming:w}=m;return{masto:y,streaming:w,client:m,authenticated:!0,instance:h}}else{const m=Su(t);if(m){const y=m.accessToken,w=m.instanceURL.toLowerCase().trim(),g=be({instance:w,accessToken:y}),{masto:R,streaming:O}=g;return{masto:R,streaming:O,client:g,authenticated:!0,instance:w}}else throw new Error("Access token not found")}if(n||r)if(n=n||Yo(r),n){const h=n.accessToken,m=n.instanceURL.toLowerCase().trim(),y=((c=ie[m])==null?void 0:c[h])||be({instance:m,accessToken:h}),{masto:w,streaming:g}=y;return{masto:w,streaming:g,client:y,authenticated:!0,instance:m}}else throw new Error(`Account ${r} not found`);const o=Fr();if(e){if((J==null?void 0:J.instance)===e)return{masto:J.masto,streaming:J.streaming,client:J,authenticated:!0,instance:e};if((o==null?void 0:o.instanceURL)===e){const{accessToken:R}=o;return J=((d=ie[e])==null?void 0:d[R])||be({instance:e,accessToken:R}),{masto:J.masto,streaming:J.streaming,client:J,authenticated:!0,instance:e}}const h=Cu(e);if(h){const R=h.accessToken,O=((u=ie[e])==null?void 0:u[R])||be({instance:e,accessToken:R}),{masto:K,streaming:B}=O;return{masto:K,streaming:B,client:O,authenticated:!0,instance:e}}const m=xt[e]||be({instance:e}),{masto:y,streaming:w,accessToken:g}=m;return{masto:y,streaming:w,client:m,authenticated:!!g,instance:e}}if(J)return{masto:J.masto,streaming:J.streaming,client:J,authenticated:!0,instance:J.instance};if(o){const{accessToken:h,instanceURL:m}=o;return J=((f=ie[m])==null?void 0:f[h])||be({instance:m,accessToken:h}),{masto:J.masto,streaming:J.streaming,client:J,authenticated:!0,instance:m}}const a=xt[yt]||be({instance:yt}),{masto:i,streaming:s}=a;return{masto:i,streaming:s,client:a,authenticated:!1,instance:yt}}window.__API__={currentAccountApi:J,apis:xt,accountApis:ie};var Ou=Object.getOwnPropertyNames,Du=Object.getOwnPropertySymbols,Tu=Object.prototype.hasOwnProperty;function Pn(e,t){return function(n,o,a){return e(n,o,a)&&t(n,o,a)}}function mt(e){return function(r,n,o){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,o);var a=o.cache,i=a.get(r),s=a.get(n);if(i&&s)return i===n&&s===r;a.set(r,n),a.set(n,r);var l=e(r,n,o);return a.delete(r),a.delete(n),l}}function An(e){return Ou(e).concat(Du(e))}var Qo=Object.hasOwn||function(e,t){return Tu.call(e,t)};function Je(e,t){return e||t?e===t:e===t||e!==e&&t!==t}var Xo="_owner",Rn=Object.getOwnPropertyDescriptor,xn=Object.keys;function Lu(e,t,r){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function Nu(e,t){return Je(e.getTime(),t.getTime())}function On(e,t,r){if(e.size!==t.size)return!1;for(var n={},o=e.entries(),a=0,i,s;(i=o.next())&&!i.done;){for(var l=t.entries(),c=!1,d=0;(s=l.next())&&!s.done;){var u=i.value,f=u[0],h=u[1],m=s.value,y=m[0],w=m[1];!c&&!n[d]&&(c=r.equals(f,y,a,d,e,t,r)&&r.equals(h,w,f,y,e,t,r))&&(n[d]=!0),d++}if(!c)return!1;a++}return!0}function Mu(e,t,r){var n=xn(e),o=n.length;if(xn(t).length!==o)return!1;for(var a;o-- >0;)if(a=n[o],a===Xo&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!Qo(t,a)||!r.equals(e[a],t[a],a,a,e,t,r))return!1;return!0}function Qe(e,t,r){var n=An(e),o=n.length;if(An(t).length!==o)return!1;for(var a,i,s;o-- >0;)if(a=n[o],a===Xo&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!Qo(t,a)||!r.equals(e[a],t[a],a,a,e,t,r)||(i=Rn(e,a),s=Rn(t,a),(i||s)&&(!i||!s||i.configurable!==s.configurable||i.enumerable!==s.enumerable||i.writable!==s.writable)))return!1;return!0}function ju(e,t){return Je(e.valueOf(),t.valueOf())}function Iu(e,t){return e.source===t.source&&e.flags===t.flags}function Dn(e,t,r){if(e.size!==t.size)return!1;for(var n={},o=e.values(),a,i;(a=o.next())&&!a.done;){for(var s=t.values(),l=!1,c=0;(i=s.next())&&!i.done;)!l&&!n[c]&&(l=r.equals(a.value,i.value,a.value,i.value,e,t,r))&&(n[c]=!0),c++;if(!l)return!1}return!0}function $u(e,t){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}var ku="[object Arguments]",Uu="[object Boolean]",Fu="[object Date]",qu="[object Map]",zu="[object Number]",Hu="[object Object]",Wu="[object RegExp]",Ku="[object Set]",Vu="[object String]",Bu=Array.isArray,Tn=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,Ln=Object.assign,Yu=Object.prototype.toString.call.bind(Object.prototype.toString);function Gu(e){var t=e.areArraysEqual,r=e.areDatesEqual,n=e.areMapsEqual,o=e.areObjectsEqual,a=e.arePrimitiveWrappersEqual,i=e.areRegExpsEqual,s=e.areSetsEqual,l=e.areTypedArraysEqual;return function(d,u,f){if(d===u)return!0;if(d==null||u==null||typeof d!="object"||typeof u!="object")return d!==d&&u!==u;var h=d.constructor;if(h!==u.constructor)return!1;if(h===Object)return o(d,u,f);if(Bu(d))return t(d,u,f);if(Tn!=null&&Tn(d))return l(d,u,f);if(h===Date)return r(d,u,f);if(h===RegExp)return i(d,u,f);if(h===Map)return n(d,u,f);if(h===Set)return s(d,u,f);var m=Yu(d);return m===Fu?r(d,u,f):m===Wu?i(d,u,f):m===qu?n(d,u,f):m===Ku?s(d,u,f):m===Hu?typeof d.then!="function"&&typeof u.then!="function"&&o(d,u,f):m===ku?o(d,u,f):m===Uu||m===zu||m===Vu?a(d,u,f):!1}}function Ju(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,o={areArraysEqual:n?Qe:Lu,areDatesEqual:Nu,areMapsEqual:n?Pn(On,Qe):On,areObjectsEqual:n?Qe:Mu,arePrimitiveWrappersEqual:ju,areRegExpsEqual:Iu,areSetsEqual:n?Pn(Dn,Qe):Dn,areTypedArraysEqual:n?Qe:$u};if(r&&(o=Ln({},o,r(o))),t){var a=mt(o.areArraysEqual),i=mt(o.areMapsEqual),s=mt(o.areObjectsEqual),l=mt(o.areSetsEqual);o=Ln({},o,{areArraysEqual:a,areMapsEqual:i,areObjectsEqual:s,areSetsEqual:l})}return o}function Zu(e){return function(t,r,n,o,a,i,s){return e(t,r,s)}}function Qu(e){var t=e.circular,r=e.comparator,n=e.createState,o=e.equals,a=e.strict;if(n)return function(l,c){var d=n(),u=d.cache,f=u===void 0?t?new WeakMap:void 0:u,h=d.meta;return r(l,c,{cache:f,equals:o,meta:h,strict:a})};if(t)return function(l,c){return r(l,c,{cache:new WeakMap,equals:o,meta:void 0,strict:a})};var i={cache:void 0,equals:o,meta:void 0,strict:a};return function(l,c){return r(l,c,i)}}var Xu=xe(),Wl=xe({strict:!0}),Kl=xe({circular:!0}),Vl=xe({circular:!0,strict:!0}),Bl=xe({createInternalComparator:function(){return Je}}),Yl=xe({strict:!0,createInternalComparator:function(){return Je}}),Gl=xe({circular:!0,createInternalComparator:function(){return Je}}),Jl=xe({circular:!0,createInternalComparator:function(){return Je},strict:!0});function xe(e){e===void 0&&(e={});var t=e.circular,r=t===void 0?!1:t,n=e.createInternalComparator,o=e.createState,a=e.strict,i=a===void 0?!1:a,s=Ju(e),l=Gu(s),c=n?n(l):Zu(l);return Qu({circular:r,comparator:l,createState:o,equals:c,strict:i})}function ea(e,t,r,n){let o=e[t];return Nr(e,()=>{const a=e[t];Object.is(o,a)||r(o=a)},n)}const Zl=Symbol();const Ql=Symbol();function el(e){try{const{pathname:t,hash:r}=URL.parse(e);return/^\/.*\/\d+$/i.test(t)||/^\/(@[^/]+|users\/[^/]+)\/(statuses|posts)\/\w+\/?$/i.test(t)||/^\/notes\/[a-z0-9]+$/i.test(t)||/^\/(notice|objects)\/[a-z0-9-]+$/i.test(t)||/^\/@[^/]+\/post\/[a-z0-9]+$/i.test(t)||/#\/[^\/]+\.[^\/]+\/s\/.+/i.test(r)}catch{return!1}}var Dt={exports:{}},Xe={exports:{}},Xl=Xe.exports,Nn;function tl(){return Nn||(Nn=1,function(e,t){(function(r,n){e.exports=n()})(Mr,function(){"use strict";var r={isEqual:!0,isMatchingKey:!0,isPromise:!0,maxSize:!0,onCacheAdd:!0,onCacheChange:!0,onCacheHit:!0,transformKey:!0},n=Array.prototype.slice;function o(u){var f=u.length;return f?f===1?[u[0]]:f===2?[u[0],u[1]]:f===3?[u[0],u[1],u[2]]:n.call(u,0):[]}function a(u){var f={};for(var h in u)r[h]||(f[h]=u[h]);return f}function i(u){return typeof u=="function"&&u.isMemoized}function s(u,f){return u===f||u!==u&&f!==f}function l(u,f){var h={};for(var m in u)h[m]=u[m];for(var m in f)h[m]=f[m];return h}var c=function(){function u(f){this.keys=[],this.values=[],this.options=f;var h=typeof f.isMatchingKey=="function";h?this.getKeyIndex=this._getKeyIndexFromMatchingKey:f.maxSize>1?this.getKeyIndex=this._getKeyIndexForMany:this.getKeyIndex=this._getKeyIndexForSingle,this.canTransformKey=typeof f.transformKey=="function",this.shouldCloneArguments=this.canTransformKey||h,this.shouldUpdateOnAdd=typeof f.onCacheAdd=="function",this.shouldUpdateOnChange=typeof f.onCacheChange=="function",this.shouldUpdateOnHit=typeof f.onCacheHit=="function"}return Object.defineProperty(u.prototype,"size",{get:function(){return this.keys.length},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"snapshot",{get:function(){return{keys:o(this.keys),size:this.size,values:o(this.values)}},enumerable:!1,configurable:!0}),u.prototype._getKeyIndexFromMatchingKey=function(f){var h=this.options,m=h.isMatchingKey,y=h.maxSize,w=this.keys,g=w.length;if(!g)return-1;if(m(w[0],f))return 0;if(y>1){for(var R=1;R<g;R++)if(m(w[R],f))return R}return-1},u.prototype._getKeyIndexForMany=function(f){var h=this.options.isEqual,m=this.keys,y=m.length;if(!y)return-1;if(y===1)return this._getKeyIndexForSingle(f);var w=f.length,g,R;if(w>1){for(var O=0;O<y;O++)if(g=m[O],g.length===w){for(R=0;R<w&&h(g[R],f[R]);R++);if(R===w)return O}}else for(var O=0;O<y;O++)if(g=m[O],g.length===w&&h(g[0],f[0]))return O;return-1},u.prototype._getKeyIndexForSingle=function(f){var h=this.keys;if(!h.length)return-1;var m=h[0],y=m.length;if(f.length!==y)return-1;var w=this.options.isEqual;if(y>1){for(var g=0;g<y;g++)if(!w(m[g],f[g]))return-1;return 0}return w(m[0],f[0])?0:-1},u.prototype.orderByLru=function(f,h,m){for(var y=this.keys,w=this.values,g=y.length,R=m;R--;)y[R+1]=y[R],w[R+1]=w[R];y[0]=f,w[0]=h;var O=this.options.maxSize;g===O&&m===g?(y.pop(),w.pop()):m>=O&&(y.length=w.length=O)},u.prototype.updateAsyncCache=function(f){var h=this,m=this.options,y=m.onCacheChange,w=m.onCacheHit,g=this.keys[0],R=this.values[0];this.values[0]=R.then(function(O){return h.shouldUpdateOnHit&&w(h,h.options,f),h.shouldUpdateOnChange&&y(h,h.options,f),O},function(O){var K=h.getKeyIndex(g);throw K!==-1&&(h.keys.splice(K,1),h.values.splice(K,1)),O})},u}();function d(u,f){if(f===void 0&&(f={}),i(u))return d(u.fn,l(u.options,f));if(typeof u!="function")throw new TypeError("You must pass a function to `memoize`.");var h=f.isEqual,m=h===void 0?s:h,y=f.isMatchingKey,w=f.isPromise,g=w===void 0?!1:w,R=f.maxSize,O=R===void 0?1:R,K=f.onCacheAdd,B=f.onCacheChange,oe=f.onCacheHit,X=f.transformKey,ee=l({isEqual:m,isMatchingKey:y,isPromise:g,maxSize:O,onCacheAdd:K,onCacheChange:B,onCacheHit:oe,transformKey:X},a(f)),x=new c(ee),M=x.keys,_=x.values,P=x.canTransformKey,N=x.shouldCloneArguments,T=x.shouldUpdateOnAdd,D=x.shouldUpdateOnChange,$=x.shouldUpdateOnHit,L=function(){var q=N?o(arguments):arguments;P&&(q=X(q));var Y=M.length?x.getKeyIndex(q):-1;if(Y!==-1)$&&oe(x,ee,L),Y&&(x.orderByLru(M[Y],_[Y],Y),D&&B(x,ee,L));else{var ne=u.apply(this,arguments),se=N?q:o(arguments);x.orderByLru(se,ne,M.length),g&&x.updateAsyncCache(L),T&&K(x,ee,L),D&&B(x,ee,L)}return _[0]};return L.cache=x,L.fn=u,L.isMemoized=!0,L.options=ee,L}return d})}(Xe,Xe.exports)),Xe.exports}var et={exports:{}},ec=et.exports,Mn;function rl(){return Mn||(Mn=1,function(e,t){(function(r,n){n(t)})(Mr,function(r){"use strict";var n=typeof WeakMap=="function",o=Object.keys;function a(_,P){return _===P||_!==_&&P!==P}function i(_){return _.constructor===Object||_.constructor==null}function s(_){return!!_&&typeof _.then=="function"}function l(_){return!!(_&&_.$$typeof)}function c(){var _=[];return{delete:function(P){for(var N=0;N<_.length;++N)if(_[N][0]===P){_.splice(N,1);return}},get:function(P){for(var N=0;N<_.length;++N)if(_[N][0]===P)return _[N][1]},set:function(P,N){for(var T=0;T<_.length;++T)if(_[T][0]===P){_[T][1]=N;return}_.push([P,N])}}}var d=function(_){return _?function(){return new WeakMap}:c}(n);function u(_){return function(N){var T=_||N;return function($,L,q,Y,ne,se,te){te===void 0&&(te=d());var Oe=!!$&&typeof $=="object",lt=!!L&&typeof L=="object";if(Oe!==lt)return!1;if(!Oe&&!lt)return T($,L,te);var ct=te.get($);if(ct&&te.get(L))return ct===L;te.set($,L),te.set(L,$);var $t=T($,L,te);return te.delete($),te.delete(L),$t}}}function f(_,P,N,T){var D=_.length;if(P.length!==D)return!1;for(;D-- >0;)if(!N(_[D],P[D],D,D,_,P,T))return!1;return!0}function h(_,P,N,T){var D=_.size===P.size;if(D&&_.size){var $={},L=0;_.forEach(function(q,Y){if(D){var ne=!1,se=0;P.forEach(function(te,Oe){!ne&&!$[se]&&(ne=N(Y,Oe,L,se,_,P,T)&&N(q,te,Y,Oe,_,P,T),ne&&($[se]=!0)),se++}),L++,D=ne}})}return D}var m="_owner",y=Function.prototype.bind.call(Function.prototype.call,Object.prototype.hasOwnProperty);function w(_,P,N,T){var D=o(_),$=D.length;if(o(P).length!==$)return!1;if($)for(var L=void 0;$-- >0;){if(L=D[$],L===m){var q=l(_),Y=l(P);if((q||Y)&&q!==Y)return!1}if(!y(P,L)||!N(_[L],P[L],L,L,_,P,T))return!1}return!0}var g=function(){return/foo/g.flags==="g"?function(P,N){return P.source===N.source&&P.flags===N.flags}:function(P,N){return P.source===N.source&&P.global===N.global&&P.ignoreCase===N.ignoreCase&&P.multiline===N.multiline&&P.unicode===N.unicode&&P.sticky===N.sticky&&P.lastIndex===N.lastIndex}}();function R(_,P,N,T){var D=_.size===P.size;if(D&&_.size){var $={};_.forEach(function(L,q){if(D){var Y=!1,ne=0;P.forEach(function(se,te){!Y&&!$[ne]&&(Y=N(L,se,q,te,_,P,T),Y&&($[ne]=!0)),ne++}),D=Y}})}return D}var O=typeof Map=="function",K=typeof Set=="function",B=Object.prototype.valueOf;function oe(_){var P=typeof _=="function"?_(N):function(T,D,$,L,q,Y,ne){return N(T,D,ne)};function N(T,D,$){if(T===D)return!0;if(T&&D&&typeof T=="object"&&typeof D=="object"){if(i(T)&&i(D))return w(T,D,P,$);var L=Array.isArray(T),q=Array.isArray(D);return L||q?L===q&&f(T,D,P,$):(L=T instanceof Date,q=D instanceof Date,L||q?L===q&&a(T.getTime(),D.getTime()):(L=T instanceof RegExp,q=D instanceof RegExp,L||q?L===q&&g(T,D):s(T)||s(D)?T===D:O&&(L=T instanceof Map,q=D instanceof Map,L||q)?L===q&&h(T,D,P,$):K&&(L=T instanceof Set,q=D instanceof Set,L||q)?L===q&&R(T,D,P,$):T.valueOf!==B||D.valueOf!==B?a(T.valueOf(),D.valueOf()):w(T,D,P,$)))}return T!==T&&D!==D}return N}var X=oe(),ee=oe(function(){return a}),x=oe(u()),M=oe(u(a));r.circularDeepEqual=x,r.circularShallowEqual=M,r.createCustomEqual=oe,r.deepEqual=X,r.sameValueZeroEqual=a,r.shallowEqual=ee,Object.defineProperty(r,"__esModule",{value:!0})})}(et,et.exports)),et.exports}var tc=Dt.exports;(function(e,t){(function(r,n){e.exports=n(tl(),rl())})(Mr,function(r,n){"use strict";function o(){return o=Object.assign?Object.assign.bind():function(p){for(var v=1;v<arguments.length;v++){var S=arguments[v];for(var b in S)Object.prototype.hasOwnProperty.call(S,b)&&(p[b]=S[b])}return p},o.apply(this,arguments)}function a(p,v){if(p==null)return{};var S={},b=Object.keys(p),C,E;for(E=0;E<b.length;E++)C=b[E],!(v.indexOf(C)>=0)&&(S[C]=p[C]);return S}var i={isDeepEqual:!1,isPromise:!1,isReact:!1,isSerialized:!1,isShallowEqual:!1,matchesArg:void 0,matchesKey:void 0,maxAge:void 0,maxArgs:void 0,maxSize:1,onExpire:void 0,profileName:void 0,serializer:void 0,updateCacheForKey:void 0,transformArgs:void 0,updateExpire:!1};function s(){for(var p=arguments.length,v=new Array(p),S=0;S<p;S++)v[S]=arguments[S];return v.reduce(function(b,C){if(typeof b=="function")return typeof C=="function"?function(){b.apply(this,arguments),C.apply(this,arguments)}:b;if(typeof C=="function")return C})}function l(){for(var p=arguments.length,v=new Array(p),S=0;S<p;S++)v[S]=arguments[S];return v.reduce(function(b,C){if(typeof b=="function")return typeof C=="function"?function(){return b(C.apply(this,arguments))}:b;if(typeof C=="function")return C})}function c(p,v){for(var S=0;S<p.length;S++)if(p[S].key===v)return S;return-1}function d(p,v){var S=typeof v=="function"?v:function(b,C){for(var E=0;E<C.length;E++)if(!p(b[E],C[E]))return!1;return!0};return function(b,C){for(var E=0;E<b.length;E++)if(b[E].length===C.length&&S(b[E],C))return E;return-1}}function u(p,v){return!v||v===i?p:o({},p,v,{onCacheAdd:s(p.onCacheAdd,v.onCacheAdd),onCacheChange:s(p.onCacheChange,v.onCacheChange),onCacheHit:s(p.onCacheHit,v.onCacheHit),transformArgs:l(p.transformArgs,v.transformArgs)})}function f(p){return typeof p=="function"&&p.isMoized}function h(p,v,S){try{var b=S||v||"anonymous";Object.defineProperty(p,"name",{configurable:!0,enumerable:!1,value:"moized("+b+")",writable:!0})}catch{}}function m(p,v,S){var b=c(p,v);b!==-1&&(clearTimeout(p[b].timeoutId),S&&p.splice(b,1))}function y(p,v){var S=setTimeout(p,v);return typeof S.unref=="function"&&S.unref(),S}function w(p,v,S,b){var C=v.maxAge;return function E(A,U,G){var z=A.keys[0];if(c(p,z)===-1){var Z=function(){var he=d(S,b),pe=he(A.keys,z),Ue=A.values[pe];~pe&&(A.keys.splice(pe,1),A.values.splice(pe,1),typeof v.onCacheChange=="function"&&v.onCacheChange(A,U,G)),m(p,z,!0),typeof v.onExpire=="function"&&v.onExpire(z)===!1&&(A.keys.unshift(z),A.values.unshift(Ue),E(A,U,G),typeof v.onCacheChange=="function"&&v.onCacheChange(A,U,G))};p.push({expirationMethod:Z,key:z,timeoutId:y(Z,C)})}}}function g(p,v){return function(b){var C=b.keys[0],E=c(p,C);~E&&(m(p,C,!1),p[E].timeoutId=y(p[E].expirationMethod,v.maxAge))}}function R(p,v,S,b){var C=typeof v.maxAge=="number"&&isFinite(v.maxAge)?w(p,v,S,b):void 0;return{onCacheAdd:C,onCacheHit:C&&v.updateExpire?g(p,v):void 0}}var O={anonymousProfileNameCounter:1,isCollectingStats:!1,profiles:{}},K=!1;function B(p){p?delete O.profiles[p]:O.profiles={}}function oe(p){p===void 0&&(p=!0),O.isCollectingStats=p}function X(p){var v=p.profileName;return function(){v&&!O.profiles[v]&&(O.profiles[v]={calls:0,hits:0}),O.profiles[v].calls++}}function ee(p){return function(){var v=O.profiles,S=p.profileName;v[S]||(v[S]={calls:0,hits:0}),v[S].calls++,v[S].hits++}}function x(p){return p.displayName||p.name||"Anonymous "+O.anonymousProfileNameCounter++}function M(p,v){return p?(v/p*100).toFixed(4)+"%":"0.0000%"}function _(p){!O.isCollectingStats&&!K&&(console.warn('Stats are not currently being collected, please run "collectStats" to enable them.'),K=!0);var v=O.profiles;if(p){if(!v[p])return{calls:0,hits:0,usage:"0.0000%"};var S=v[p];return o({},S,{usage:M(S.calls,S.hits)})}var b=Object.keys(O.profiles).reduce(function(C,E){return C.calls+=v[E].calls,C.hits+=v[E].hits,C},{calls:0,hits:0});return o({},b,{profiles:Object.keys(v).reduce(function(C,E){return C[E]=_(E),C},{}),usage:M(b.calls,b.hits)})}function P(p){return O.isCollectingStats?{onCacheAdd:X(p),onCacheHit:ee(p)}:{}}var N={arguments:!0,callee:!0,caller:!0,constructor:!0,length:!0,name:!0,prototype:!0};function T(p,v,S){S===void 0&&(S=[]),Object.getOwnPropertyNames(p).forEach(function(b){if(!N[b]&&S.indexOf(b)===-1){var C=Object.getOwnPropertyDescriptor(p,b);C.get||C.set?Object.defineProperty(v,b,C):v[b]=p[b]}})}function D(p,v){var S=v.expirations,b=p.options,C=d(b.isEqual,b.isMatchingKey),E=p;E.clear=function(){var A=E._microMemoizeOptions.onCacheChange,U=E.cache;return U.keys.length=0,U.values.length=0,A&&A(U,E.options,E),!0},E.clearStats=function(){B(E.options.profileName)},E.get=function(A){var U=E._microMemoizeOptions.transformKey,G=E.cache,z=U?U(A):A,Z=C(G.keys,z);return Z!==-1?E.apply(this,A):void 0},E.getStats=function(){return _(E.options.profileName)},E.has=function(A){var U=E._microMemoizeOptions.transformKey,G=U?U(A):A;return C(E.cache.keys,G)!==-1},E.keys=function(){return E.cacheSnapshot.keys},E.remove=function(A){var U=E._microMemoizeOptions,G=U.onCacheChange,z=U.transformKey,Z=E.cache,de=C(Z.keys,z?z(A):A);if(de===-1)return!1;var he=Z.keys[de];return Z.keys.splice(de,1),Z.values.splice(de,1),G&&G(Z,E.options,E),m(S,he,!0),!0},E.set=function(A,U){var G=E._microMemoizeOptions,z=E.cache,Z=E.options,de=G.onCacheAdd,he=G.onCacheChange,pe=G.transformKey,Ue=pe?pe(A):A,we=C(z.keys,Ue);if(we===-1){var Fe=Z.maxSize-1;z.size>Fe&&(z.keys.length=Fe,z.values.length=Fe),z.keys.unshift(Ue),z.values.unshift(U),Z.isPromise&&z.updateAsyncCache(E),de&&de(z,Z,E),he&&he(z,Z,E)}else{var ft=z.keys[we];z.values[we]=U,we>0&&z.orderByLru(ft,U,we),Z.isPromise&&z.updateAsyncCache(E),typeof he=="function"&&he(z,Z,E)}},E.values=function(){return E.cacheSnapshot.values}}function $(p,v){var S=v.expirations,b=v.options,C=v.originalFunction,E=p.options;Object.defineProperties(p,{_microMemoizeOptions:{configurable:!0,get:function(){return E}},cacheSnapshot:{configurable:!0,get:function(){var G=p.cache;return{keys:G.keys.slice(0),size:G.size,values:G.values.slice(0)}}},expirations:{configurable:!0,get:function(){return S}},expirationsSnapshot:{configurable:!0,get:function(){return S.slice(0)}},isMoized:{configurable:!0,get:function(){return!0}},options:{configurable:!0,get:function(){return b}},originalFunction:{configurable:!0,get:function(){return C}}});var A=p;T(C,A)}function L(p,v){return D(p,v),$(p,v),p}var q=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function Y(p,v,S){var b=p(o({maxArgs:2,isShallowEqual:!0},S,{isReact:!1}));v.displayName||(v.displayName=v.name||"Component");function C(E,A,U){this.props=E,this.context=A,this.updater=U,this.MoizedComponent=b(v)}return C.prototype.isReactComponent={},C.prototype.render=function(){return{$$typeof:q,type:this.MoizedComponent,props:this.props,ref:null,key:null,_owner:null}},T(v,C,["contextType","contextTypes"]),C.displayName="Moized("+(v.displayName||v.name||"Component")+")",h(C,v.name,S.profileName),C}function ne(p){return function(v){if(p>=v.length)return v;if(p===0)return[];if(p===1)return[v[0]];if(p===2)return[v[0],v[1]];if(p===3)return[v[0],v[1],v[2]];for(var S=[],b=0;b<p;b++)S[b]=v[b];return S}}function se(p,v){for(var S=p.length,b=0;b<S;++b)if(p[b]===v)return b+1;return 0}function te(){var p=[],v=[];return function(b,C){var E=typeof C;if(E==="function"||E==="symbol")return C.toString();if(typeof C=="object"){if(p.length){var A=se(p,this);A===0?p[p.length]=this:(p.splice(A),v.splice(A)),v[v.length]=b;var U=se(p,C);if(U!==0)return"[ref="+(v.slice(0,U).join(".")||".")+"]"}else p[0]=C,v[0]=b;return C}return""+C}}function Oe(p){var v=typeof p;return p&&(v==="object"||v==="function")?JSON.stringify(p,te()):p}function lt(p){for(var v="|",S=0;S<p.length;S++)v+=Oe(p[S])+"|";return[v]}function ct(p){return typeof p.serializer=="function"?p.serializer:lt}function $t(p,v){return p[0]===v[0]}function kt(p){if(typeof p=="function")return function(v,S,b){return p(b.cache,b.options,b)}}function sa(p){return p.matchesArg||p.isDeepEqual&&n.deepEqual||p.isShallowEqual&&n.shallowEqual||n.sameValueZeroEqual}function ua(p){return p.matchesKey||p.isSerialized&&$t||void 0}function la(p){return l(p.isSerialized&&ct(p),typeof p.transformArgs=="function"&&p.transformArgs,typeof p.maxArgs=="number"&&ne(p.maxArgs))}function ca(p){var v=p.options.updateCacheForKey,S=function(){for(var C=arguments.length,E=new Array(C),A=0;A<C;A++)E[A]=arguments[A];if(!v(E))return p.apply(this,E);var U=p.fn.apply(this,E);return p.set(E,U),U};return T(p,S),S}var fa=["matchesArg","isDeepEqual","isPromise","isReact","isSerialized","isShallowEqual","matchesKey","maxAge","maxArgs","maxSize","onCacheAdd","onCacheChange","onCacheHit","onExpire","profileName","serializer","updateCacheForKey","transformArgs","updateExpire"],j=function p(v,S){var b=S||i;if(f(v)){var C=v.originalFunction,E=u(v.options,b);return p(C,E)}if(typeof v=="object")return function(Ut,va){if(typeof Ut=="function"){var ga=u(v,va);return p(Ut,ga)}var ya=u(v,Ut);return p(ya)};if(b.isReact)return Y(p,v,b);var A=o({},i,b,{maxAge:typeof b.maxAge=="number"&&b.maxAge>=0?b.maxAge:i.maxAge,maxArgs:typeof b.maxArgs=="number"&&b.maxArgs>=0?b.maxArgs:i.maxArgs,maxSize:typeof b.maxSize=="number"&&b.maxSize>=0?b.maxSize:i.maxSize,profileName:b.profileName||x(v)}),U=[];A.matchesArg,A.isDeepEqual;var G=A.isPromise;A.isReact,A.isSerialized,A.isShallowEqual,A.matchesKey,A.maxAge,A.maxArgs;var z=A.maxSize,Z=A.onCacheAdd,de=A.onCacheChange,he=A.onCacheHit;A.onExpire,A.profileName,A.serializer;var pe=A.updateCacheForKey;A.transformArgs,A.updateExpire;var Ue=a(A,fa),we=sa(A),Fe=ua(A),ft=R(U,A,we,Fe),zr=P(A),ha=la(A),pa=o({},Ue,{isEqual:we,isMatchingKey:Fe,isPromise:G,maxSize:z,onCacheAdd:kt(s(Z,ft.onCacheAdd,zr.onCacheAdd)),onCacheChange:kt(de),onCacheHit:kt(s(he,ft.onCacheHit,zr.onCacheHit)),transformKey:ha}),ma=r(v,pa),dt=L(ma,{expirations:U,options:A,originalFunction:v});return pe&&(dt=ca(dt)),h(dt,v.name,b.profileName),dt};j.clearStats=B,j.collectStats=oe,j.compose=function(){return l.apply(void 0,arguments)||j},j.deep=j({isDeepEqual:!0}),j.getStats=_,j.infinite=j({maxSize:1/0}),j.isCollectingStats=function(){return O.isCollectingStats},j.isMoized=function(v){return typeof v=="function"&&!!v.isMoized},j.matchesArg=function(p){return j({matchesArg:p})},j.matchesKey=function(p){return j({matchesKey:p})};function da(p,v){if(v===!0)return j({maxAge:p,updateExpire:v});if(typeof v=="object"){var S=v.onExpire,b=v.updateExpire;return j({maxAge:p,onExpire:S,updateExpire:b})}return j(typeof v=="function"?{maxAge:p,onExpire:v,updateExpire:!0}:{maxAge:p})}return j.maxAge=da,j.maxArgs=function(p){return j({maxArgs:p})},j.maxSize=function(p){return j({maxSize:p})},j.profile=function(p){return j({profileName:p})},j.promise=j({isPromise:!0,updateExpire:!0}),j.react=j({isReact:!0}),j.serialize=j({isSerialized:!0}),j.serializeWith=function(p){return j({isSerialized:!0,serializer:p})},j.shallow=j({isShallowEqual:!0}),j.transformArgs=function(p){return j({transformArgs:p})},j.updateCacheForKey=function(p){return j({updateCacheForKey:p})},Object.defineProperty(j,"default",{configurable:!1,enumerable:!1,value:j,writable:!1}),j})})(Dt,Dt.exports);var nl=Dt.exports;const ta=No(nl);window._moize=ta;function ol(e,t={}){return ta(e,{...t,maxSize:50,isDeepEqual:!0})}function al(e,t={}){return ol(e,{isPromise:!0,...t})}function il(e,t){let r=[],n=!1;function o(){if(r.length===0){n=!1;return}r.shift()(),setTimeout(o,t)}return function(...a){const i=()=>e.apply(this,a);r.push(i),n||(n=!0,setTimeout(o,t))}}class sl extends Error{constructor(){super("Throttled function aborted"),this.name="AbortError"}}function ul({limit:e,interval:t,strict:r,onDelay:n}){if(!Number.isFinite(e))throw new TypeError("Expected `limit` to be a finite number");if(!Number.isFinite(t))throw new TypeError("Expected `interval` to be a finite number");const o=new Map;let a=0,i=0;function s(){const u=Date.now();return u-a>t?(i=1,a=u,0):(i<e?i++:(a+=t,i=1),a-u)}const l=[];function c(){const u=Date.now();if(l.length>0&&u-l.at(-1)>t&&(l.length=0),l.length<e)return l.push(u),0;const f=l[0]+t;return l.shift(),l.push(f),Math.max(0,f-u)}const d=r?c:s;return u=>{const f=function(...h){if(!f.isEnabled)return(async()=>u.apply(this,h))();let m;return new Promise((y,w)=>{const g=()=>{y(u.apply(this,h)),o.delete(m)},R=d();R>0?(m=setTimeout(g,R),o.set(m,w),n==null||n()):g()})};return f.abort=()=>{for(const h of o.keys())clearTimeout(h),o.get(h)(new sl);o.clear(),l.splice(0,l.length)},f.isEnabled=!0,Object.defineProperty(f,"queueSize",{get(){return o.size}}),f}}const ll=ul({limit:1,interval:1e3}),jn=[/\/@[^@\/]+@?[^\/]+?\/(\d+)$/i,/\/notice\/(\w+)$/i];function cl(e){var t;for(let r=0;r<jn.length;r++){const n=(t=e.match(jn[r]))==null?void 0:t[1];if(n)return n}return null}const fl=/(twitter|github)\.com/i,In={};function dl(e,t){var m;const r=ur(Tt);if(fl.test(t)||In[t])return;if(new RegExp(e+"/").test((m=r.unfurledLinks[t])==null?void 0:m.url))return Promise.resolve(r.unfurledLinks[t]);let o,a=t;/\/\/elk\.[^\/]+\/[^\/]+\.[^\/]+/i.test(a)&&(a=a.replace(/elk\.[^\/]+\//i,"")),/\/\/trunks\.[^\/]+\/status\/[^\/]+\.[^\/]+/i.test(a)&&(a=a.replace(/trunks\.[^\/]+\/status\//i,"")),/\/#\/[^\/]+\.[^\/]+\/s\/.+/i.test(a)&&(a=`https://${a.split("/#/")[1].replace(/\/s\//i,"/@fakeUsername/")}`);const i=URL.parse(a);if(!i)return;const s=i.hostname,l=i.pathname;let c=cl(l);if(c){const y=c,{masto:w}=Ot({instance:s});o=w.v1.statuses.$select(y).fetch().then(g=>{if(g!=null&&g.id)return{status:g,instance:s};throw new Error("No results")})}const{masto:d}=Ot({instance:e}),u=d.v2.search.fetch({q:a,type:"statuses",resolve:!0,limit:1}).then(y=>{const{statuses:w}=y;if(w.length>0){const g=w.filter(R=>{var O;return!((O=R.content)!=null&&O.toLowerCase().includes(a.toLowerCase()))});if(g.length===1)return{status:g[0],instance:e}}throw new Error("No results")});function f(y){const{status:w,instance:g}=y,{id:R}=w,O=`/${g}/s/${R}`,K={id:R,instance:g,url:O};return Tt.unfurledLinks[t]=K,ra(w,g,{skipThreading:!0}),K}function h(y){In[t]=!0}return o?Promise.race([u,new Promise((w,g)=>setTimeout(g,3e3))]).catch(()=>o.catch(()=>u)).then(f).catch(h):u.then(f).catch(h)}const hl=ll(dl),F=Gi({appVersion:{},prevLocation:null,currentLocation:null,statuses:{},statusThreadNumber:{},home:[],homeNew:[],homeLast:null,homeLastFetchTime:null,notifications:[],notificationsLast:null,notificationsNew:[],notificationsShowNew:!1,notificationsLastFetchTime:null,reloadStatusPage:0,reloadGenericAccounts:{id:null,counter:0},spoilers:{},spoilersMedia:{},scrollPositions:{},unfurledLinks:{},statusQuotes:{},statusFollowedTags:{},statusReply:{},accounts:{},routeNotification:null,composerState:{},showCompose:!1,showSettings:!1,showAccount:!1,showAccounts:!1,showDrafts:!1,showMediaModal:!1,showShortcutsSettings:!1,showKeyboardShortcutsHelp:!1,showGenericAccounts:!1,showMediaAlt:!1,showEmbedModal:!1,showReportModal:!1,shortcuts:[],settings:{autoRefresh:!1,shortcutsViewMode:null,shortcutsColumnsMode:!1,boostsCarousel:!0,contentTranslation:!0,contentTranslationTargetLanguage:null,contentTranslationHideLanguages:[],contentTranslationAutoInline:!1,shortcutSettingsCloudImportExport:!1,mediaAltGenerator:!1,composerGIFPicker:!1,cloakMode:!1}}),Tt=F;function rc(){F.notificationsLast=I.account.get("notificationsLast")||null,F.shortcuts=I.account.get("shortcuts")??[],F.settings.autoRefresh=I.account.get("settings-autoRefresh")??!1,F.settings.shortcutsViewMode=I.account.get("settings-shortcutsViewMode")??null,I.account.get("settings-shortcutsColumnsMode")&&(F.settings.shortcutsColumnsMode=!0),F.settings.boostsCarousel=I.account.get("settings-boostsCarousel")??!0,F.settings.contentTranslation=I.account.get("settings-contentTranslation")??!0,F.settings.contentTranslationTargetLanguage=I.account.get("settings-contentTranslationTargetLanguage")||null,F.settings.contentTranslationHideLanguages=I.account.get("settings-contentTranslationHideLanguages")||[],F.settings.contentTranslationAutoInline=I.account.get("settings-contentTranslationAutoInline")??!1,F.settings.shortcutSettingsCloudImportExport=I.account.get("settings-shortcutSettingsCloudImportExport")??!1,F.settings.mediaAltGenerator=I.account.get("settings-mediaAltGenerator")??!1,F.settings.composerGIFPicker=I.account.get("settings-composerGIFPicker")??!1,F.settings.cloakMode=I.account.get("settings-cloakMode")??!1}ea(F,"notificationsLast",e=>{I.account.set("notificationsLast",F.notificationsLast)});Nr(F,e=>{for(const[t,r,n,o]of e)r.join(".")==="settings.autoRefresh"&&I.account.set("settings-autoRefresh",!!n),r.join(".")==="settings.boostsCarousel"&&I.account.set("settings-boostsCarousel",!!n),r.join(".")==="settings.shortcutsViewMode"&&I.account.set("settings-shortcutsViewMode",n),r.join(".")==="settings.contentTranslation"&&I.account.set("settings-contentTranslation",!!n),r.join(".")==="settings.contentTranslationAutoInline"&&I.account.set("settings-contentTranslationAutoInline",!!n),r.join(".")==="settings.shortcutSettingsCloudImportExport"&&I.account.set("settings-shortcutSettingsCloudImportExport",!!n),r.join(".")==="settings.contentTranslationTargetLanguage"&&I.account.set("settings-contentTranslationTargetLanguage",n),/^settings\.contentTranslationHideLanguages/i.test(r.join("."))&&I.account.set("settings-contentTranslationHideLanguages",F.settings.contentTranslationHideLanguages),r.join(".")==="settings.mediaAltGenerator"&&I.account.set("settings-mediaAltGenerator",!!n),r.join(".")==="settings.composerGIFPicker"&&I.account.set("settings-composerGIFPicker",!!n),(r==null?void 0:r[0])==="shortcuts"&&I.account.set("shortcuts",F.shortcuts),r.join(".")==="settings.cloakMode"&&I.account.set("settings-cloakMode",!!n)});function Le(e,t){if(e)return t?`${t}/${e}`:e}function pl(e,t){if(t){const r=Le(e,t);return F.statuses[r]}return F.statuses[e]}function ra(e,t,r){typeof t=="object"&&(r=t,t=null);const{override:n=!0,skipThreading:o=!1,skipUnfurling:a=!1}=r||{};if(!e)return;const i=pl(e.id,t);!n&&i||Xu(e,i)||(queueMicrotask(()=>{var l,c;const s=Le(e.id,t);if(i!=null&&i._pinned&&(e._pinned=i._pinned),F.statuses[s]=e,(l=e.reblog)!=null&&l.id){const d=Le(e.reblog.id,t);F.statuses[d]=e.reblog}if((c=e.quote)!=null&&c.id){const d=Le(e.quote.id,t);F.statuses[d]=e.quote,F.statusQuotes[s]=[{id:e.quote.id,instance:t}]}}),o||queueMicrotask(()=>{vl(e.reblog||e,t)}),a||queueMicrotask(()=>{gl(e.reblog||e,t)}))}function ml(e,t){const{masto:r,instance:n}=Ot({instance:t});let o=0;async function a(i,s=0){const{inReplyToId:l,inReplyToAccountId:c}=i;if(!l||c!==i.account.id)return[i];if(l&&c!==i.account.id)throw"Not a thread";const d=Le(l,n);let u=F.statuses[d];if(!u){if(o++>3)throw"Too many fetches for thread";await new Promise(f=>setTimeout(f,500*o)),u=await yl(l,r),ra(u,n,{skipThreading:!0})}return[...await a(u,++s),i]}return a(e).then(i=>{i.length>1&&i.forEach((s,l)=>{const c=Le(s.id,n);F.statusThreadNumber[c]=l+1})}).catch(i=>{})}const vl=il(ml,100),$n=document.createElement("div");function gl(e,t){const{instance:r}=Ot(),n=e==null?void 0:e.content;if(/<a/i.test(n)){const a=Le(e==null?void 0:e.id,t);$n.innerHTML=n,[...$n.querySelectorAll("a[href]:not(.u-url):not(.mention):not(.hashtag)")].filter(s=>{const l=s.href;return!(l===e.url||l===e.uri)&&el(l)}).forEach((s,l)=>{hl(r,s.href).then(c=>{c&&a&&(Array.isArray(F.statusQuotes[a])||(F.statusQuotes[a]=[]),F.statusQuotes[a][l]||F.statusQuotes[a].splice(l,0,c))})})}}const yl=al((e,t)=>t.v1.statuses.$select(e).fetch()),_l="modulepreload",wl=function(e,t){return new URL(e,t).href},kn={},na=function(t,r,n){let o=Promise.resolve();if(r&&r.length>0){const a=document.getElementsByTagName("link"),i=document.querySelector("meta[property=csp-nonce]"),s=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));o=Promise.all(r.map(l=>{if(l=wl(l,n),l in kn)return;kn[l]=!0;const c=l.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(!!n)for(let h=a.length-1;h>=0;h--){const m=a[h];if(m.href===l&&(!c||m.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${d}`))return;const f=document.createElement("link");if(f.rel=c?"stylesheet":_l,c||(f.as="script",f.crossOrigin=""),f.href=l,s&&f.setAttribute("nonce",s),document.head.appendChild(f),c)return new Promise((h,m)=>{f.addEventListener("load",h),f.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${l}`)))})}))}return o.then(()=>t()).catch(a=>{const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=a,window.dispatchEvent(i),!i.defaultPrevented)throw a})};function bl({abrupt:e,hidden:t,...r}){return At("span",{...r,class:`loader-container ${e?"abrupt":""} ${t?"hidden":""}`,children:At("span",{class:"loader"})})}var qr={};Object.defineProperty(qr,"__esModule",{value:!0});var oa=qr.shouldPolyfill=void 0;function El(){return!Intl.Segmenter}oa=qr.shouldPolyfill=El;const aa=!oa();function ia(){if(!aa)return na(()=>import("./polyfill-force-g2mcly7m.js").then(e=>e.p),__vite__mapDeps([0,1]),import.meta.url).catch(()=>{})}function hr(){return na(()=>import("./compose-2Y_rtJfC.js"),__vite__mapDeps([2,3,4,1]),import.meta.url)}async function nc(){try{await ia(),hr()}catch{}}function oc(e){const[t,r]=$e(null);return Ae(()=>{(async()=>{try{if(aa){const n=await hr();r(n)}else{await ia();const n=await hr();r(n)}}catch{}})()},[]),t!=null&&t.default?At(t.default,{...e}):At(bl,{})}var Sl={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_CLIENT_NAME:Un}=Sl;function ac(e,t){function r(){const{currentLocation:n}=Tt,o=Array.isArray(t);let a=o?t:[];!o&&/:?\w+\?/.test(t)&&(a.push(t.replace(/(:\w+)\?/g,"$1")),a.push(t.replace(/\/?:\w+\?/g,"")));let i=!1;a.length?i=a.some(s=>rr(s,n)):t&&(i=rr(t,n)),i&&(document.title=e?`${e} / ${Un}`:Un)}Re(()=>{const n=ea(Tt,"currentLocation",r);return r(),n},[e,t])}export{na as $,Re as A,Ll as B,oc as C,to as D,Fl as E,ye as F,xl as G,ac as H,pl as I,ea as J,rr as K,bl as L,vl as M,be as N,Hl as O,re as P,ql as Q,zl as R,rc as S,gr as T,Ol as U,Ui as V,Tl as W,at as X,Pe as Y,Mr as Z,Ae as _,Ot as a,ta as a0,io as a1,yo as a2,_o as a3,mo as a4,ol as a5,Pa as a6,ue as a7,H as a8,ul as a9,_s as aa,Me as ab,Kn as ac,wr as ad,Eo as ae,el as af,hl as ag,Bl as ah,Os as ai,$l as aj,Ji as ak,Ul as al,Xu as am,ra as b,At as c,I as d,Jo as e,Fr as f,Pu as g,Dr as h,al as i,Ve as j,ce as k,kl as l,Vt as m,Zo as n,No as o,$e as p,_e as q,Nr as r,Tt as s,Oi as t,jl as u,nc as v,Le as w,eo as x,Nt as y,Su as z};
//# sourceMappingURL=useTitle-KMkGka9H.js.map