deskcord 0.4.3 → 0.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,82 +1,82 @@
1
- (function(){"use strict";var Hn,ft,gc,qe,vc,wc,Xi,bc,Ji,Zi,Qi,_c,Gn={},xc=[],wm=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Br=Array.isArray;function ke(t,e){for(var n in e)t[n]=e[n];return t}function to(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function et(t,e,n){var r,i,o,s={};for(o in e)o=="key"?r=e[o]:o=="ref"?i=e[o]:s[o]=e[o];if(arguments.length>2&&(s.children=arguments.length>3?Hn.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(o in t.defaultProps)s[o]===void 0&&(s[o]=t.defaultProps[o]);return Kn(t,s,r,i,null)}function Kn(t,e,n,r,i){var o={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++gc,__i:-1,__u:0};return i==null&&ft.vnode!=null&&ft.vnode(o),o}function Sc(){return{current:null}}function Pt(t){return t.children}function se(t,e){this.props=t,this.context=e}function dn(t,e){if(e==null)return t.__?dn(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?dn(t):null}function Ec(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return Ec(t)}}function eo(t){(!t.__d&&(t.__d=!0)&&qe.push(t)&&!Lr.__r++||vc!==ft.debounceRendering)&&((vc=ft.debounceRendering)||wc)(Lr)}function Lr(){var t,e,n,r,i,o,s,a;for(qe.sort(Xi);t=qe.shift();)t.__d&&(e=qe.length,r=void 0,o=(i=(n=t).__v).__e,s=[],a=[],n.__P&&((r=ke({},i)).__v=i.__v+1,ft.vnode&&ft.vnode(r),no(n.__P,r,i,n.__n,n.__P.namespaceURI,32&i.__u?[o]:null,s,o??dn(i),!!(32&i.__u),a),r.__v=i.__v,r.__.__k[r.__i]=r,kc(s,r,a),r.__e!=o&&Ec(r)),qe.length>e&&qe.sort(Xi));Lr.__r=0}function Ac(t,e,n,r,i,o,s,a,l,d,c){var h,m,y,w,_,P,x=r&&r.__k||xc,v=e.length;for(l=bm(n,e,x,l,v),h=0;h<v;h++)(y=n.__k[h])!=null&&(m=y.__i===-1?Gn:x[y.__i]||Gn,y.__i=h,P=no(t,y,m,i,o,s,a,l,d,c),w=y.__e,y.ref&&m.ref!=y.ref&&(m.ref&&ro(m.ref,null,y),c.push(y.ref,y.__c||w,y)),_==null&&w!=null&&(_=w),4&y.__u||m.__k===y.__k?l=Cc(y,l,t):typeof y.type=="function"&&P!==void 0?l=P:w&&(l=w.nextSibling),y.__u&=-7);return n.__e=_,l}function bm(t,e,n,r,i){var o,s,a,l,d,c=n.length,h=c,m=0;for(t.__k=new Array(i),o=0;o<i;o++)(s=e[o])!=null&&typeof s!="boolean"&&typeof s!="function"?(l=o+m,(s=t.__k[o]=typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?Kn(null,s,null,null,null):Br(s)?Kn(Pt,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?Kn(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s).__=t,s.__b=t.__b+1,a=null,(d=s.__i=_m(s,n,l,h))!==-1&&(h--,(a=n[d])&&(a.__u|=2)),a==null||a.__v===null?(d==-1&&m--,typeof s.type!="function"&&(s.__u|=4)):d!=l&&(d==l-1?m--:d==l+1?m++:(d>l?m--:m++,s.__u|=4))):t.__k[o]=null;if(h)for(o=0;o<c;o++)(a=n[o])!=null&&!(2&a.__u)&&(a.__e==r&&(r=dn(a)),Oc(a,a));return r}function Cc(t,e,n){var r,i;if(typeof t.type=="function"){for(r=t.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=t,e=Cc(r[i],e,n));return e}t.__e!=e&&(e&&t.type&&!n.contains(e)&&(e=dn(t)),n.insertBefore(t.__e,e||null),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function Oe(t,e){return e=e||[],t==null||typeof t=="boolean"||(Br(t)?t.some(function(n){Oe(n,e)}):e.push(t)),e}function _m(t,e,n,r){var i,o,s=t.key,a=t.type,l=e[n];if(l===null||l&&s==l.key&&a===l.type&&!(2&l.__u))return n;if(r>(l!=null&&!(2&l.__u)?1:0))for(i=n-1,o=n+1;i>=0||o<e.length;){if(i>=0){if((l=e[i])&&!(2&l.__u)&&s==l.key&&a===l.type)return i;i--}if(o<e.length){if((l=e[o])&&!(2&l.__u)&&s==l.key&&a===l.type)return o;o++}}return-1}function Tc(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||wm.test(e)?n:n+"px"}function Fr(t,e,n,r,i){var o;t:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||Tc(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||Tc(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(bc,"$1")),e=e.toLowerCase()in t||e=="onFocusOut"||e=="onFocusIn"?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=n,n?r?n.u=r.u:(n.u=Ji,t.addEventListener(e,o?Qi:Zi,o)):t.removeEventListener(e,o?Qi:Zi,o);else{if(i=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break t}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function Pc(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=Ji++;else if(e.t<n.u)return;return n(ft.event?ft.event(e):e)}}}function no(t,e,n,r,i,o,s,a,l,d){var c,h,m,y,w,_,P,x,v,E,M,O,j,B,L,F,Y,Z=e.type;if(e.constructor!==void 0)return null;128&n.__u&&(l=!!(32&n.__u),o=[a=e.__e=n.__e]),(c=ft.__b)&&c(e);t:if(typeof Z=="function")try{if(x=e.props,v="prototype"in Z&&Z.prototype.render,E=(c=Z.contextType)&&r[c.__c],M=c?E?E.props.value:c.__:r,n.__c?P=(h=e.__c=n.__c).__=h.__E:(v?e.__c=h=new Z(x,M):(e.__c=h=new se(x,M),h.constructor=Z,h.render=Sm),E&&E.sub(h),h.props=x,h.state||(h.state={}),h.context=M,h.__n=r,m=h.__d=!0,h.__h=[],h._sb=[]),v&&h.__s==null&&(h.__s=h.state),v&&Z.getDerivedStateFromProps!=null&&(h.__s==h.state&&(h.__s=ke({},h.__s)),ke(h.__s,Z.getDerivedStateFromProps(x,h.__s))),y=h.props,w=h.state,h.__v=e,m)v&&Z.getDerivedStateFromProps==null&&h.componentWillMount!=null&&h.componentWillMount(),v&&h.componentDidMount!=null&&h.__h.push(h.componentDidMount);else{if(v&&Z.getDerivedStateFromProps==null&&x!==y&&h.componentWillReceiveProps!=null&&h.componentWillReceiveProps(x,M),!h.__e&&(h.shouldComponentUpdate!=null&&h.shouldComponentUpdate(x,h.__s,M)===!1||e.__v==n.__v)){for(e.__v!=n.__v&&(h.props=x,h.state=h.__s,h.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(nt){nt&&(nt.__=e)}),O=0;O<h._sb.length;O++)h.__h.push(h._sb[O]);h._sb=[],h.__h.length&&s.push(h);break t}h.componentWillUpdate!=null&&h.componentWillUpdate(x,h.__s,M),v&&h.componentDidUpdate!=null&&h.__h.push(function(){h.componentDidUpdate(y,w,_)})}if(h.context=M,h.props=x,h.__P=t,h.__e=!1,j=ft.__r,B=0,v){for(h.state=h.__s,h.__d=!1,j&&j(e),c=h.render(h.props,h.state,h.context),L=0;L<h._sb.length;L++)h.__h.push(h._sb[L]);h._sb=[]}else do h.__d=!1,j&&j(e),c=h.render(h.props,h.state,h.context),h.state=h.__s;while(h.__d&&++B<25);h.state=h.__s,h.getChildContext!=null&&(r=ke(ke({},r),h.getChildContext())),v&&!m&&h.getSnapshotBeforeUpdate!=null&&(_=h.getSnapshotBeforeUpdate(y,w)),a=Ac(t,Br(F=c!=null&&c.type===Pt&&c.key==null?c.props.children:c)?F:[F],e,n,r,i,o,s,a,l,d),h.base=e.__e,e.__u&=-161,h.__h.length&&s.push(h),P&&(h.__E=h.__=null)}catch(nt){if(e.__v=null,l||o!=null)if(nt.then){for(e.__u|=l?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;o[o.indexOf(a)]=null,e.__e=a}else for(Y=o.length;Y--;)to(o[Y]);else e.__e=n.__e,e.__k=n.__k;ft.__e(nt,e,n)}else o==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):a=e.__e=xm(n.__e,e,n,r,i,o,s,l,d);return(c=ft.diffed)&&c(e),128&e.__u?void 0:a}function kc(t,e,n){for(var r=0;r<n.length;r++)ro(n[r],n[++r],n[++r]);ft.__c&&ft.__c(e,t),t.some(function(i){try{t=i.__h,i.__h=[],t.some(function(o){o.call(i)})}catch(o){ft.__e(o,i.__v)}})}function xm(t,e,n,r,i,o,s,a,l){var d,c,h,m,y,w,_,P=n.props,x=e.props,v=e.type;if(v=="svg"?i="http://www.w3.org/2000/svg":v=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o!=null){for(d=0;d<o.length;d++)if((y=o[d])&&"setAttribute"in y==!!v&&(v?y.localName==v:y.nodeType==3)){t=y,o[d]=null;break}}if(t==null){if(v==null)return document.createTextNode(x);t=document.createElementNS(i,v,x.is&&x),a&&(ft.__m&&ft.__m(e,o),a=!1),o=null}if(v===null)P===x||a&&t.data===x||(t.data=x);else{if(o=o&&Hn.call(t.childNodes),P=n.props||Gn,!a&&o!=null)for(P={},d=0;d<t.attributes.length;d++)P[(y=t.attributes[d]).name]=y.value;for(d in P)if(y=P[d],d!="children"){if(d=="dangerouslySetInnerHTML")h=y;else if(!(d in x)){if(d=="value"&&"defaultValue"in x||d=="checked"&&"defaultChecked"in x)continue;Fr(t,d,null,y,i)}}for(d in x)y=x[d],d=="children"?m=y:d=="dangerouslySetInnerHTML"?c=y:d=="value"?w=y:d=="checked"?_=y:a&&typeof y!="function"||P[d]===y||Fr(t,d,y,P[d],i);if(c)a||h&&(c.__html===h.__html||c.__html===t.innerHTML)||(t.innerHTML=c.__html),e.__k=[];else if(h&&(t.innerHTML=""),Ac(t,Br(m)?m:[m],e,n,r,v=="foreignObject"?"http://www.w3.org/1999/xhtml":i,o,s,o?o[0]:n.__k&&dn(n,0),a,l),o!=null)for(d=o.length;d--;)to(o[d]);a||(d="value",v=="progress"&&w==null?t.removeAttribute("value"):w!==void 0&&(w!==t[d]||v=="progress"&&!w||v=="option"&&w!==P[d])&&Fr(t,d,w,P[d],i),d="checked",_!==void 0&&_!==t[d]&&Fr(t,d,_,P[d],i))}return t}function ro(t,e,n){try{if(typeof t=="function"){var r=typeof t.__u=="function";r&&t.__u(),r&&e==null||(t.__u=t(e))}else t.current=e}catch(i){ft.__e(i,n)}}function Oc(t,e,n){var r,i;if(ft.unmount&&ft.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||ro(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){ft.__e(o,e)}r.base=r.__P=null}if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&Oc(r[i],e,n||typeof t.type!="function");n||to(t.__e),t.__c=t.__=t.__e=void 0}function Sm(t,e,n){return this.constructor(t,n)}function Yn(t,e,n){var r,i,o,s;e==document&&(e=document.documentElement),ft.__&&ft.__(t,e),i=(r=typeof n=="function")?null:n&&n.__k||e.__k,o=[],s=[],no(e,t=(!r&&n||e).__k=et(Pt,null,[t]),i||Gn,Gn,e.namespaceURI,!r&&n?[n]:i?null:e.firstChild?Hn.call(e.childNodes):null,o,!r&&n?n:i?i.__e:e.firstChild,r,s),kc(o,t,s)}function Ic(t,e){Yn(t,e,Ic)}function Em(t,e,n){var r,i,o,s,a=ke({},t.props);for(o in t.type&&t.type.defaultProps&&(s=t.type.defaultProps),e)o=="key"?r=e[o]:o=="ref"?i=e[o]:a[o]=e[o]===void 0&&s!==void 0?s[o]:e[o];return arguments.length>2&&(a.children=arguments.length>3?Hn.call(arguments,2):n),Kn(t.type,a,r||t.key,i||t.ref,null)}function te(t,e){var n={__c:e="__cC"+_c++,__:t,Consumer:function(r,i){return r.children(i)},Provider:function(r){var i,o;return this.getChildContext||(i=new Set,(o={})[e]=this,this.getChildContext=function(){return o},this.componentWillUnmount=function(){i=null},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&i.forEach(function(a){a.__e=!0,eo(a)})},this.sub=function(s){i.add(s);var a=s.componentWillUnmount;s.componentWillUnmount=function(){i&&i.delete(s),a&&a.call(s)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}Hn=xc.slice,ft={__e:function(t,e,n,r){for(var i,o,s;e=e.__;)if((i=e.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(t)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,r||{}),s=i.__d),s)return i.__E=i}catch(a){t=a}throw t}},gc=0,se.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=ke({},this.state),typeof t=="function"&&(t=t(ke({},n),this.props)),t&&ke(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),eo(this))},se.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),eo(this))},se.prototype.render=Pt,qe=[],wc=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Xi=function(t,e){return t.__v.__b-e.__v.__b},Lr.__r=0,bc=/(PointerCapture)$|Capture$/i,Ji=0,Zi=Pc(!1),Qi=Pc(!0),_c=0;var Am=0;function T(t,e,n,r,i,o){e||(e={});var s,a,l=e;if("ref"in l)for(a in l={},e)a=="ref"?s=e[a]:l[a]=e[a];var d={type:t,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Am,__i:-1,__u:0,__source:i,__self:o};if(typeof t=="function"&&(s=t.defaultProps))for(a in s)l[a]===void 0&&(l[a]=s[a]);return ft.vnode&&ft.vnode(d),d}var Ie,At,io,Rc,hn=0,Mc=[],Rt=ft,Nc=Rt.__b,Dc=Rt.__r,Bc=Rt.diffed,Lc=Rt.__c,Fc=Rt.unmount,jc=Rt.__;function He(t,e){Rt.__h&&Rt.__h(At,t,hn||e),hn=0;var n=At.__H||(At.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function gt(t){return hn=1,Xn(Vc,t)}function Xn(t,e,n){var r=He(Ie++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):Vc(void 0,e),function(a){var l=r.__N?r.__N[0]:r.__[0],d=r.t(l,a);l!==d&&(r.__N=[d,r.__[1]],r.__c.setState({}))}],r.__c=At,!At.u)){var i=function(a,l,d){if(!r.__c.__H)return!0;var c=r.__c.__H.__.filter(function(m){return!!m.__c});if(c.every(function(m){return!m.__N}))return!o||o.call(this,a,l,d);var h=r.__c.props!==a;return c.forEach(function(m){if(m.__N){var y=m.__[0];m.__=m.__N,m.__N=void 0,y!==m.__[0]&&(h=!0)}}),o&&o.call(this,a,l,d)||h};At.u=!0;var o=At.shouldComponentUpdate,s=At.componentWillUpdate;At.componentWillUpdate=function(a,l,d){if(this.__e){var c=o;o=void 0,i(a,l,d),o=c}s&&s.call(this,a,l,d)},At.shouldComponentUpdate=i}return r.__N||r.__}function ut(t,e){var n=He(Ie++,3);!Rt.__s&&ao(n.__H,e)&&(n.__=t,n.i=e,At.__H.__h.push(n))}function Re(t,e){var n=He(Ie++,4);!Rt.__s&&ao(n.__H,e)&&(n.__=t,n.i=e,At.__h.push(n))}function it(t){return hn=5,Ht(function(){return{current:t}},[])}function Jn(t,e,n){hn=6,Re(function(){return typeof t=="function"?(t(e()),function(){return t(null)}):t?(t.current=e(),function(){return t.current=null}):void 0},n==null?n:n.concat(t))}function Ht(t,e){var n=He(Ie++,7);return ao(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function kt(t,e){return hn=8,Ht(function(){return t},e)}function Lt(t){var e=At.context[t.__c],n=He(Ie++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(At)),e.props.value):t.__}function oo(t,e){Rt.useDebugValue&&Rt.useDebugValue(e?e(t):t)}function Cm(t){var e=He(Ie++,10),n=gt();return e.__=t,At.componentDidCatch||(At.componentDidCatch=function(r,i){e.__&&e.__(r,i),n[1](r)}),[n[0],function(){n[1](void 0)}]}function pn(){var t=He(Ie++,11);if(!t.__){for(var e=At.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function Tm(){for(var t;t=Mc.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(jr),t.__H.__h.forEach(so),t.__H.__h=[]}catch(e){t.__H.__h=[],Rt.__e(e,t.__v)}}Rt.__b=function(t){At=null,Nc&&Nc(t)},Rt.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),jc&&jc(t,e)},Rt.__r=function(t){Dc&&Dc(t),Ie=0;var e=(At=t.__c).__H;e&&(io===At?(e.__h=[],At.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(e.__h.forEach(jr),e.__h.forEach(so),e.__h=[],Ie=0)),io=At},Rt.diffed=function(t){Bc&&Bc(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Mc.push(e)!==1&&Rc===Rt.requestAnimationFrame||((Rc=Rt.requestAnimationFrame)||Pm)(Tm)),e.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),io=At=null},Rt.__c=function(t,e){e.some(function(n){try{n.__h.forEach(jr),n.__h=n.__h.filter(function(r){return!r.__||so(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],Rt.__e(r,n.__v)}}),Lc&&Lc(t,e)},Rt.unmount=function(t){Fc&&Fc(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{jr(r)}catch(i){e=i}}),n.__H=void 0,e&&Rt.__e(e,n.__v))};var $c=typeof requestAnimationFrame=="function";function Pm(t){var e,n=function(){clearTimeout(r),$c&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);$c&&(e=requestAnimationFrame(n))}function jr(t){var e=At,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),At=e}function so(t){var e=At;t.__c=t.__(),At=e}function ao(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}function Vc(t,e){return typeof e=="function"?e(t):e}function Uc(t,e){for(var n in e)t[n]=e[n];return t}function co(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return!0;for(var r in e)if(r!=="__source"&&t[r]!==e[r])return!0;return!1}function lo(t,e){var n=e(),r=gt({t:{__:n,u:e}}),i=r[0].t,o=r[1];return Re(function(){i.__=n,i.u=e,uo(i)&&o({t:i})},[t,n,e]),ut(function(){return uo(i)&&o({t:i}),t(function(){uo(i)&&o({t:i})})},[t]),n}function uo(t){var e,n,r=t.u,i=t.__;try{var o=r();return!((e=i)===(n=o)&&(e!==0||1/e==1/n)||e!=e&&n!=n)}catch{return!0}}function fo(t){t()}function ho(t){return t}function po(){return[!1,fo]}var Zn=Re;function $r(t,e){this.props=t,this.context=e}function zc(t,e){function n(i){var o=this.props.ref,s=o==i.ref;return!s&&o&&(o.call?o(null):o.current=null),e?!e(this.props,i)||!s:co(this.props,i)}function r(i){return this.shouldComponentUpdate=n,et(t,i)}return r.displayName="Memo("+(t.displayName||t.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}($r.prototype=new se).isPureReactComponent=!0,$r.prototype.shouldComponentUpdate=function(t,e){return co(this.props,t)||co(this.state,e)};var Wc=ft.__b;ft.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),Wc&&Wc(t)};var km=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function $e(t){function e(n){var r=Uc({},n);return delete r.ref,t(r,n.ref||null)}return e.$$typeof=km,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var qc=function(t,e){return t==null?null:Oe(Oe(t).map(e))},mo={map:qc,forEach:qc,count:function(t){return t?Oe(t).length:0},only:function(t){var e=Oe(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:Oe},Om=ft.__e;ft.__e=function(t,e,n,r){if(t.then){for(var i,o=e;o=o.__;)if((i=o.__c)&&i.__c)return e.__e==null&&(e.__e=n.__e,e.__k=n.__k),i.__c(t,e)}Om(t,e,n,r)};var Hc=ft.unmount;function Gc(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),t.__c.__H=null),(t=Uc({},t)).__c!=null&&(t.__c.__P===n&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map(function(r){return Gc(r,e,n)})),t}function Kc(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(r){return Kc(r,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function Qn(){this.__u=0,this.o=null,this.__b=null}function Yc(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function Xc(t){var e,n,r;function i(o){if(e||(e=t()).then(function(s){n=s.default||s},function(s){r=s}),r)throw r;if(!n)throw e;return et(n,o)}return i.displayName="Lazy",i.__f=!0,i}function mn(){this.i=null,this.l=null}ft.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),Hc&&Hc(t)},(Qn.prototype=new se).__c=function(t,e){var n=e.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var i=Yc(r.__v),o=!1,s=function(){o||(o=!0,n.__R=null,i?i(a):a())};n.__R=s;var a=function(){if(!--r.__u){if(r.state.__a){var l=r.state.__a;r.__v.__k[0]=Kc(l,l.__c.__P,l.__c.__O)}var d;for(r.setState({__a:r.__b=null});d=r.o.pop();)d.forceUpdate()}};r.__u++||32&e.__u||r.setState({__a:r.__b=r.__v.__k[0]}),t.then(s,s)},Qn.prototype.componentWillUnmount=function(){this.o=[]},Qn.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Gc(this.__b,n,r.__O=r.__P)}this.__b=null}var i=e.__a&&et(Pt,null,t.fallback);return i&&(i.__u&=-33),[et(Pt,null,e.__a?null:t.children),i]};var Jc=function(t,e,n){if(++n[1]===n[0]&&t.l.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.l.size))for(n=t.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.i=n=n[2]}};function Im(t){return this.getChildContext=function(){return t.context},t.children}function Rm(t){var e=this,n=t.h;e.componentWillUnmount=function(){Yn(null,e.v),e.v=null,e.h=null},e.h&&e.h!==n&&e.componentWillUnmount(),e.v||(e.h=n,e.v={nodeType:1,parentNode:n,childNodes:[],contains:function(){return!0},appendChild:function(r){this.childNodes.push(r),e.h.appendChild(r)},insertBefore:function(r,i){this.childNodes.push(r),e.h.insertBefore(r,i)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),e.h.removeChild(r)}}),Yn(et(Im,{context:e.context},t.__v),e.v)}function yo(t,e){var n=et(Rm,{__v:t,h:e});return n.containerInfo=e,n}(mn.prototype=new se).__a=function(t){var e=this,n=Yc(e.__v),r=e.l.get(t);return r[0]++,function(i){var o=function(){e.props.revealOrder?(r.push(i),Jc(e,t,r)):i()};n?n(o):o()}},mn.prototype.render=function(t){this.i=null,this.l=new Map;var e=Oe(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var n=e.length;n--;)this.l.set(e[n],this.i=[1,0,this.i]);return t.children},mn.prototype.componentDidUpdate=mn.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,n){Jc(t,n,e)})};var Zc=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Mm=/^(?: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]/,Nm=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Dm=/[A-Z0-9]/g,Bm=typeof document<"u",Lm=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function Qc(t,e,n){return e.__k==null&&(e.textContent=""),Yn(t,e),typeof n=="function"&&n(),t?t.__c:null}function tl(t,e,n){return Ic(t,e),typeof n=="function"&&n(),t?t.__c:null}se.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(se.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var el=ft.event;function Fm(){}function jm(){return this.cancelBubble}function $m(){return this.defaultPrevented}ft.event=function(t){return el&&(t=el(t)),t.persist=Fm,t.isPropagationStopped=jm,t.isDefaultPrevented=$m,t.nativeEvent=t};var go,Vm={enumerable:!1,configurable:!0,get:function(){return this.class}},nl=ft.vnode;ft.vnode=function(t){typeof t.type=="string"&&function(e){var n=e.props,r=e.type,i={},o=r.indexOf("-")===-1;for(var s in n){var a=n[s];if(!(s==="value"&&"defaultValue"in n&&a==null||Bm&&s==="children"&&r==="noscript"||s==="class"||s==="className")){var l=s.toLowerCase();s==="defaultValue"&&"value"in n&&n.value==null?s="value":s==="download"&&a===!0?a="":l==="translate"&&a==="no"?a=!1:l[0]==="o"&&l[1]==="n"?l==="ondoubleclick"?s="ondblclick":l!=="onchange"||r!=="input"&&r!=="textarea"||Lm(n.type)?l==="onfocus"?s="onfocusin":l==="onblur"?s="onfocusout":Nm.test(s)&&(s=l):l=s="oninput":o&&Mm.test(s)?s=s.replace(Dm,"-$&").toLowerCase():a===null&&(a=void 0),l==="oninput"&&i[s=l]&&(s="oninputCapture"),i[s]=a}}r=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=Oe(n.children).forEach(function(d){d.props.selected=i.value.indexOf(d.props.value)!=-1})),r=="select"&&i.defaultValue!=null&&(i.value=Oe(n.children).forEach(function(d){d.props.selected=i.multiple?i.defaultValue.indexOf(d.props.value)!=-1:i.defaultValue==d.props.value})),n.class&&!n.className?(i.class=n.class,Object.defineProperty(i,"className",Vm)):(n.className&&!n.class||n.class&&n.className)&&(i.class=i.className=n.className),e.props=i}(t),t.$$typeof=Zc,nl&&nl(t)};var rl=ft.__r;ft.__r=function(t){rl&&rl(t),go=t.__c};var il=ft.diffed;ft.diffed=function(t){il&&il(t);var e=t.props,n=t.__e;n!=null&&t.type==="textarea"&&"value"in e&&e.value!==n.value&&(n.value=e.value==null?"":e.value),go=null};var ol={ReactCurrentDispatcher:{current:{readContext:function(t){return go.__n[t.__c].props.value},useCallback:kt,useContext:Lt,useDebugValue:oo,useDeferredValue:ho,useEffect:ut,useId:pn,useImperativeHandle:Jn,useInsertionEffect:Zn,useLayoutEffect:Re,useMemo:Ht,useReducer:Xn,useRef:it,useState:gt,useSyncExternalStore:lo,useTransition:po}}},sl="18.3.1";function al(t){return et.bind(null,t)}function yn(t){return!!t&&t.$$typeof===Zc}function cl(t){return yn(t)&&t.type===Pt}function ll(t){return!!t&&!!t.displayName&&(typeof t.displayName=="string"||t.displayName instanceof String)&&t.displayName.startsWith("Memo(")}function vo(t){return yn(t)?Em.apply(null,arguments):t}function ul(t){return!!t.__k&&(Yn(null,t),!0)}function fl(t){return t&&(t.base||t.nodeType===1&&t)||null}var dl=function(t,e){return t(e)},hl=function(t,e){return t(e)},pl=Pt,ml=yn,gn={useState:gt,useId:pn,useReducer:Xn,useEffect:ut,useLayoutEffect:Re,useInsertionEffect:Zn,useTransition:po,useDeferredValue:ho,useSyncExternalStore:lo,startTransition:fo,useRef:it,useImperativeHandle:Jn,useMemo:Ht,useCallback:kt,useContext:Lt,useDebugValue:oo,version:"18.3.1",Children:mo,render:Qc,hydrate:tl,unmountComponentAtNode:ul,createPortal:yo,createElement:et,createContext:te,createFactory:al,cloneElement:vo,createRef:Sc,Fragment:Pt,isValidElement:yn,isElement:ml,isFragment:cl,isMemo:ll,findDOMNode:fl,Component:se,PureComponent:$r,memo:zc,forwardRef:$e,flushSync:hl,unstable_batchedUpdates:dl,StrictMode:pl,Suspense:Qn,SuspenseList:mn,lazy:Xc,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:ol};const Um=Object.freeze(Object.defineProperty({__proto__:null,Children:mo,Component:se,Fragment:Pt,PureComponent:$r,StrictMode:pl,Suspense:Qn,SuspenseList:mn,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:ol,cloneElement:vo,createContext:te,createElement:et,createFactory:al,createPortal:yo,createRef:Sc,default:gn,findDOMNode:fl,flushSync:hl,forwardRef:$e,hydrate:tl,isElement:ml,isFragment:cl,isMemo:ll,isValidElement:yn,lazy:Xc,memo:zc,render:Qc,startTransition:fo,unmountComponentAtNode:ul,unstable_batchedUpdates:dl,useCallback:kt,useContext:Lt,useDebugValue:oo,useDeferredValue:ho,useEffect:ut,useErrorBoundary:Cm,useId:pn,useImperativeHandle:Jn,useInsertionEffect:Zn,useLayoutEffect:Re,useMemo:Ht,useReducer:Xn,useRef:it,useState:gt,useSyncExternalStore:lo,useTransition:po,version:sl},Symbol.toStringTag,{value:"Module"})),zm='*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,*:before,*:after{border-color:hsl(var(--border))}#deskcord-shadow-container{color:hsl(var(--foreground));font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media (min-width: 1400px){.container{max-width:1400px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.bottom-0{bottom:0}.bottom-full{bottom:100%}.end-0{inset-inline-end:0px}.left-0{left:0}.right-0{right:0}.right-1{right:.25rem}.start-0{inset-inline-start:0px}.top-0{top:0}.top-1{top:.25rem}.top-full{top:100%}.z-20{z-index:20}.m-2{margin:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-\\[3px\\]{margin-top:3px;margin-bottom:3px}.\\!me-1{margin-inline-end:.25rem!important}.\\!me-1\\.5{margin-inline-end:.375rem!important}.\\!ms-auto{margin-inline-start:auto!important}.mb-1{margin-bottom:.25rem}.mb-1\\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.me-11{margin-inline-end:2.75rem}.ml-2{margin-left:.5rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.ms-0\\.5{margin-inline-start:.125rem}.ms-2{margin-inline-start:.5rem}.ms-auto{margin-inline-start:auto}.mt-1{margin-top:.25rem}.mt-1\\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.\\!flex{display:flex!important}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-auto{aspect-ratio:auto}.size-3{width:.75rem;height:.75rem}.size-3\\.5{width:.875rem;height:.875rem}.size-4{width:1rem;height:1rem}.size-5{width:1.25rem;height:1.25rem}.size-6{width:1.5rem;height:1.5rem}.size-8{width:2rem;height:2rem}.size-\\[32px\\]{width:32px;height:32px}.\\!h-2\\.5{height:.625rem!important}.h-1{height:.25rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-32{height:8rem}.h-8{height:2rem}.h-\\[10px\\]{height:10px}.h-\\[33px\\]{height:33px}.h-full{height:100%}.max-h-40{max-height:10rem}.max-h-\\[100px\\]{max-height:100px}.max-h-\\[200px\\]{max-height:200px}.min-h-\\[55px\\]{min-height:55px}.\\!w-2\\.5{width:.625rem!important}.w-1{width:.25rem}.w-10{width:2.5rem}.w-14{width:3.5rem}.w-32{width:8rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-\\[33px\\]{width:33px}.w-\\[40px\\]{width:40px}.w-\\[calc\\(100\\%-2rem\\)\\]{width:calc(100% - 2rem)}.w-auto{width:auto}.w-full{width:100%}.min-w-10{min-width:2.5rem}.max-w-\\[100px\\]{max-width:100px}.max-w-\\[200px\\]{max-width:200px}.max-w-\\[300px\\]{max-width:300px}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.flex-1{flex:1 1 0%}.flex-shrink-0,.shrink-0{flex-shrink:0}.grow{flex-grow:1}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes slide-in{0%{transform:translateY(100%);opacity:0}to{transform:translateY(0);opacity:1}}.animate-slide-in{animation:slide-in .2s ease-out}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.resize{resize:both}.grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-nowrap{flex-wrap:nowrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.\\!justify-between{justify-content:space-between!important}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-\\[3px\\]>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(3px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(3px * var(--tw-space-y-reverse))}.space-y-reverse>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 1}.self-center{align-self:center}.overflow-hidden{overflow:hidden}.overflow-scroll{overflow:scroll}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.\\!rounded-sm{border-radius:calc(var(--radius) - 4px)!important}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-xl{border-radius:.75rem}.rounded-t-lg{border-top-left-radius:var(--radius);border-top-right-radius:var(--radius)}.border{border-width:1px}.border-\\[3px\\]{border-width:3px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-solid{border-style:solid}.\\!border-gray-200{--tw-border-opacity: 1 !important;border-color:rgb(229 231 235 / var(--tw-border-opacity))!important}.border-current{border-color:currentColor}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-t-gray-200{--tw-border-opacity: 1;border-top-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-t-transparent{border-top-color:transparent}.\\!bg-white{--tw-bg-opacity: 1 !important;background-color:rgb(255 255 255 / var(--tw-bg-opacity))!important}.bg-\\[\\#7289DA\\]{--tw-bg-opacity: 1;background-color:rgb(114 137 218 / var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-red-400{--tw-bg-opacity: 1;background-color:rgb(248 113 113 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity))}.bg-teal-400{--tw-bg-opacity: 1;background-color:rgb(45 212 191 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-yellow-400{--tw-bg-opacity: 1;background-color:rgb(250 204 21 / var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity: .5}.bg-opacity-80{--tw-bg-opacity: .8}.fill-black{fill:#000}.object-contain{-o-object-fit:contain;object-fit:contain}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.\\!py-0\\.5{padding-top:.125rem!important;padding-bottom:.125rem!important}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.pr-3{padding-right:.75rem}.ps-11{padding-inline-start:2.75rem}.ps-3\\.5{padding-inline-start:.875rem}.text-left{text-align:left}.text-center{text-align:center}.text-end{text-align:end}.align-bottom{vertical-align:bottom}.\\!text-sm{font-size:.875rem!important;line-height:1.25rem!important}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\\[10px\\]{font-size:10px}.text-\\[12px\\]{font-size:12px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg\\/5{font-size:1.125rem;line-height:1.25rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-sm\\/3{font-size:.875rem;line-height:.75rem}.text-xs,.text-xs\\/4{font-size:.75rem;line-height:1rem}.\\!font-medium{font-weight:500!important}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-slate-50{--tw-text-opacity: 1;color:rgb(248 250 252 / var(--tw-text-opacity))}.text-teal-600{--tw-text-opacity: 1;color:rgb(13 148 136 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity))}.no-underline{text-decoration-line:none}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.placeholder-gray-500::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(107 114 128 / var(--tw-placeholder-opacity))}.placeholder-gray-500::placeholder{--tw-placeholder-opacity: 1;color:rgb(107 114 128 / var(--tw-placeholder-opacity))}.opacity-0{opacity:0}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.\\!shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-white{--tw-ring-opacity: 1;--tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-500{transition-duration:.5s}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.duration-150{animation-duration:.15s}.duration-200{animation-duration:.2s}.duration-500{animation-duration:.5s}.running{animation-play-state:running}:host,#deskcord-shadow-container{--background: 0 0% 100%;--foreground: 222.2 84% 4.9%;--card: 0 0% 100%;--card-foreground: 222.2 84% 4.9%;--popover: 0 0% 100%;--popover-foreground: 222.2 84% 4.9%;--primary: 222.2 47.4% 11.2%;--primary-foreground: 210 40% 98%;--secondary: 210 40% 96.1%;--secondary-foreground: 222.2 47.4% 11.2%;--muted: 210 40% 96.1%;--muted-foreground: 215.4 16.3% 46.9%;--accent: 210 40% 96.1%;--accent-foreground: 222.2 47.4% 11.2%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 210 40% 98%;--border: 214.3 31.8% 91.4%;--input: 214.3 31.8% 91.4%;--ring: 222.2 84% 4.9%;--radius: .5rem;--chart-1: 12 76% 61%;--chart-2: 173 58% 39%;--chart-3: 197 37% 24%;--chart-4: 43 74% 66%;--chart-5: 27 87% 67%}.dark,:host(.dark) #deskcord-shadow-container{--background: 222.2 84% 4.9%;--foreground: 210 40% 98%;--card: 222.2 84% 4.9%;--card-foreground: 210 40% 98%;--popover: 222.2 84% 4.9%;--popover-foreground: 210 40% 98%;--primary: 210 40% 98%;--primary-foreground: 222.2 47.4% 11.2%;--secondary: 217.2 32.6% 17.5%;--secondary-foreground: 210 40% 98%;--muted: 217.2 32.6% 17.5%;--muted-foreground: 215 20.2% 65.1%;--accent: 217.2 32.6% 17.5%;--accent-foreground: 210 40% 98%;--destructive: 0 62.8% 30.6%;--destructive-foreground: 210 40% 98%;--border: 217.2 32.6% 17.5%;--input: 217.2 32.6% 17.5%;--ring: 212.7 26.8% 83.9%;--chart-1: 220 70% 50%;--chart-2: 160 60% 45%;--chart-3: 30 80% 55%;--chart-4: 280 65% 60%;--chart-5: 340 75% 55%}.hover\\:scale-105:hover{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\\:scale-110:hover{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\\:bg-\\[\\#5B6EAB\\]:hover{--tw-bg-opacity: 1;background-color:rgb(91 110 171 / var(--tw-bg-opacity))}.hover\\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity))}.hover\\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.hover\\:text-blue-500:hover{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.hover\\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.hover\\:text-gray-800:hover{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.hover\\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.hover\\:shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\\:z-10:focus{z-index:10}.focus\\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.focus\\:border-transparent:focus{border-color:transparent}.focus\\:bg-gray-100:focus{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-\\[\\#7289DA\\]:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(114 137 218 / var(--tw-ring-opacity))}.focus\\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}.focus\\:ring-red-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity))}.focus\\:ring-opacity-50:focus{--tw-ring-opacity: .5}.active\\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:transform-none:disabled{transform:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:bg-gray-100:disabled{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.disabled\\:text-gray-500:disabled{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.disabled\\:opacity-50:disabled{opacity:.5}.selected .hs-combo-box-selected\\:block,.selected.hs-combo-box-selected\\:block{display:block}.complete .hs-file-upload-complete\\:bg-green-600,.complete.hs-file-upload-complete\\:bg-green-600{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity))}.dark\\:\\!border-neutral-700:is(.dark *){--tw-border-opacity: 1 !important;border-color:rgb(64 64 64 / var(--tw-border-opacity))!important}.dark\\:border-neutral-600:is(.dark *){--tw-border-opacity: 1;border-color:rgb(82 82 82 / var(--tw-border-opacity))}.dark\\:border-neutral-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(64 64 64 / var(--tw-border-opacity))}.dark\\:\\!bg-neutral-800:is(.dark *){--tw-bg-opacity: 1 !important;background-color:rgb(38 38 38 / var(--tw-bg-opacity))!important}.dark\\:bg-blue-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.dark\\:bg-neutral-700:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(64 64 64 / var(--tw-bg-opacity))}.dark\\:bg-neutral-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}.dark\\:bg-neutral-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(23 23 23 / var(--tw-bg-opacity))}.dark\\:bg-opacity-80:is(.dark *){--tw-bg-opacity: .8}.dark\\:fill-neutral-200:is(.dark *){fill:#e5e5e5}.dark\\:text-blue-500:is(.dark *){--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.dark\\:text-neutral-200:is(.dark *){--tw-text-opacity: 1;color:rgb(229 229 229 / var(--tw-text-opacity))}.dark\\:text-neutral-400:is(.dark *){--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity))}.dark\\:text-neutral-500:is(.dark *){--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity))}.dark\\:text-neutral-600:is(.dark *){--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity))}.dark\\:text-white:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\\:placeholder-neutral-500:is(.dark *)::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(115 115 115 / var(--tw-placeholder-opacity))}.dark\\:placeholder-neutral-500:is(.dark *)::placeholder{--tw-placeholder-opacity: 1;color:rgb(115 115 115 / var(--tw-placeholder-opacity))}.dark\\:ring-neutral-900:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(23 23 23 / var(--tw-ring-opacity))}.dark\\:hover\\:bg-neutral-800:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}.dark\\:hover\\:text-neutral-200:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(229 229 229 / var(--tw-text-opacity))}.dark\\:hover\\:text-neutral-400:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity))}.dark\\:focus\\:bg-neutral-800:focus:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}@media (min-width: 640px){.sm\\:gap-x-4{-moz-column-gap:1rem;column-gap:1rem}}@media (min-width: 768px){.md\\:text-sm{font-size:.875rem;line-height:1.25rem}}',Wm=".yarl__fullsize{height:100%;width:100%}.yarl__relative{position:relative}.yarl__portal{bottom:0;left:0;opacity:0;overflow:hidden;position:fixed;right:0;top:0;transition:opacity var(--yarl__fade_animation_duration,.25s) var(--yarl__fade_animation_timing_function,ease);z-index:var(--yarl__portal_zindex,9999)}.yarl__portal_open{opacity:1}.yarl__container{background-color:var(--yarl__container_background_color,var(--yarl__color_backdrop,#000));bottom:0;left:0;outline:none;overflow:hidden;overscroll-behavior:var(--yarl__controller_overscroll_behavior,contain);position:absolute;right:0;top:0;touch-action:var(--yarl__controller_touch_action,none);-webkit-user-select:none;-moz-user-select:none;user-select:none}.yarl__carousel{align-content:center;align-items:stretch;display:flex;flex:0 0 auto;height:100%;justify-content:center;opacity:var(--yarl__pull_opacity,1);transform:translate(var(--yarl__swipe_offset,0),var(--yarl__pull_offset,0));width:calc(100% + (var(--yarl__carousel_slides_count) - 1)*(100% + var(--yarl__carousel_spacing_px, 0)*1px + var(--yarl__carousel_spacing_percent, 0)*1%))}.yarl__carousel_with_slides{-moz-column-gap:calc(var(--yarl__carousel_spacing_px, 0)*1px + 100/(var(--yarl__carousel_slides_count)*100 + (var(--yarl__carousel_slides_count) - 1)*var(--yarl__carousel_spacing_percent, 0))*var(--yarl__carousel_spacing_percent, 0)*1%);column-gap:calc(var(--yarl__carousel_spacing_px, 0)*1px + 100/(var(--yarl__carousel_slides_count)*100 + (var(--yarl__carousel_slides_count) - 1)*var(--yarl__carousel_spacing_percent, 0))*var(--yarl__carousel_spacing_percent, 0)*1%)}.yarl__flex_center{align-content:center;align-items:center;display:flex;justify-content:center}.yarl__slide{flex:1;overflow:hidden;padding:calc(var(--yarl__carousel_padding_px, 0)*1px + 100/(var(--yarl__carousel_slides_count)*100 + (var(--yarl__carousel_slides_count) - 1)*var(--yarl__carousel_spacing_percent, 0))*var(--yarl__carousel_padding_percent, 0)*1%);position:relative}[dir=rtl] .yarl__slide{--yarl__direction:-1}.yarl__slide_image{max-height:100%;max-width:100%;-o-object-fit:contain;object-fit:contain;touch-action:var(--yarl__controller_touch_action,none);-moz-user-select:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.yarl__slide_image_cover{height:100%;-o-object-fit:cover;object-fit:cover;width:100%}.yarl__slide_image_loading{opacity:0}@media screen and (min-width:800px){.yarl__slide_wrapper:not(.yarl__slide_wrapper_interactive) .yarl__slide_image{-webkit-backface-visibility:hidden;-webkit-transform:translateZ(0);-webkit-transform-style:preserve-3d}}.yarl__slide_placeholder{left:50%;line-height:0;position:absolute;top:50%;transform:translate(-50%) translateY(-50%)}.yarl__slide_loading{animation:yarl__delayed_fadein 1s linear;color:var(--yarl__slide_icon_loading_color,var(--yarl__color_button,hsla(0,0%,100%,.8)))}.yarl__slide_loading line{animation:yarl__stroke_opacity 1s linear infinite}.yarl__slide_loading line:first-of-type{animation-delay:-1.875s}.yarl__slide_loading line:nth-of-type(2){animation-delay:-1.75s}.yarl__slide_loading line:nth-of-type(3){animation-delay:-1.625s}.yarl__slide_loading line:nth-of-type(4){animation-delay:-1.5s}.yarl__slide_loading line:nth-of-type(5){animation-delay:-1.375s}.yarl__slide_loading line:nth-of-type(6){animation-delay:-1.25s}.yarl__slide_loading line:nth-of-type(7){animation-delay:-1.125s}.yarl__slide_loading line:nth-of-type(8){animation-delay:-1s}.yarl__slide_error{color:var(--yarl__slide_icon_error_color,red);height:var(--yarl__slide_icon_error_size,48px);width:var(--yarl__slide_icon_error_size,48px)}@media (prefers-reduced-motion){.yarl__portal,.yarl__slide{transition:unset}.yarl__slide_loading,.yarl__slide_loading line{animation:unset}}.yarl__toolbar{bottom:auto;display:flex;justify-content:flex-end;left:auto;padding:var(--yarl__toolbar_padding,8px);position:absolute;right:0;top:0}[dir=rtl] .yarl__toolbar{bottom:auto;left:0;right:auto;top:0}.yarl__icon{height:var(--yarl__icon_size,32px);width:var(--yarl__icon_size,32px)}.yarl__button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--yarl__button_background_color,transparent);border:var(--yarl__button_border,0);color:var(--yarl__color_button,hsla(0,0%,100%,.8));cursor:pointer;filter:var(--yarl__button_filter,drop-shadow(2px 2px 2px rgba(0,0,0,.8)));line-height:0;margin:var(--yarl__button_margin,0);outline:none;padding:var(--yarl__button_padding,8px);-webkit-tap-highlight-color:transparent}.yarl__button:focus{color:var(--yarl__color_button_active,#fff)}.yarl__button:focus:not(:focus-visible){color:var(--yarl__color_button,hsla(0,0%,100%,.8))}.yarl__button:focus-visible{color:var(--yarl__color_button_active,#fff)}@media (hover:hover){.yarl__button:focus-visible:hover,.yarl__button:focus:hover,.yarl__button:hover{color:var(--yarl__color_button_active,#fff)}}.yarl__button:disabled{color:var(--yarl__color_button_disabled,hsla(0,0%,100%,.4));cursor:default}.yarl__navigation_next,.yarl__navigation_prev{padding:var(--yarl__navigation_button_padding,24px 16px);position:absolute;top:50%;transform:translateY(-50%)}.yarl__navigation_prev{left:0}[dir=rtl] .yarl__navigation_prev{left:unset;right:0;transform:translateY(-50%) rotate(180deg)}.yarl__navigation_next{right:0}[dir=rtl] .yarl__navigation_next{left:0;right:unset;transform:translateY(-50%) rotate(180deg)}.yarl__no_scroll{height:100%;overflow:hidden;overscroll-behavior:none}@keyframes yarl__delayed_fadein{0%{opacity:0}80%{opacity:0}to{opacity:1}}@keyframes yarl__stroke_opacity{0%{stroke-opacity:1}to{stroke-opacity:.125}}",wo=te({});function bo(t){const e=it(null);return e.current===null&&(e.current=t()),e.current}const _o=typeof window<"u",yl=_o?Re:ut,Vr=te(null);function xo(t,e){t.indexOf(e)===-1&&t.push(e)}function So(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const Me=(t,e,n)=>n>e?e:n<t?t:n;let Ur=()=>{};const Ne={},gl=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function vl(t){return typeof t=="object"&&t!==null}const wl=t=>/^0[^.\s]+$/u.test(t);function Eo(t){let e;return()=>(e===void 0&&(e=t()),e)}const ue=t=>t,qm=(t,e)=>n=>e(t(n)),tr=(...t)=>t.reduce(qm),er=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r};class Ao{constructor(){this.subscriptions=[]}add(e){return xo(this.subscriptions,e),()=>So(this.subscriptions,e)}notify(e,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,r);else for(let o=0;o<i;o++){const s=this.subscriptions[o];s&&s(e,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const be=t=>t*1e3,_e=t=>t/1e3;function bl(t,e){return e?t*(1e3/e):0}const _l=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Hm=1e-7,Gm=12;function Km(t,e,n,r,i){let o,s,a=0;do s=e+(n-e)/2,o=_l(s,r,i)-t,o>0?n=s:e=s;while(Math.abs(o)>Hm&&++a<Gm);return s}function nr(t,e,n,r){if(t===e&&n===r)return ue;const i=o=>Km(o,0,1,t,n);return o=>o===0||o===1?o:_l(i(o),e,r)}const xl=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Sl=t=>e=>1-t(1-e),El=nr(.33,1.53,.69,.99),Co=Sl(El),Al=xl(Co),Cl=t=>(t*=2)<1?.5*Co(t):.5*(2-Math.pow(2,-10*(t-1))),To=t=>1-Math.sin(Math.acos(t)),Tl=Sl(To),Pl=xl(To),Ym=nr(.42,0,1,1),Xm=nr(0,0,.58,1),kl=nr(.42,0,.58,1),Jm=t=>Array.isArray(t)&&typeof t[0]!="number",Ol=t=>Array.isArray(t)&&typeof t[0]=="number",Il={linear:ue,easeIn:Ym,easeInOut:kl,easeOut:Xm,circIn:To,circInOut:Pl,circOut:Tl,backIn:Co,backInOut:Al,backOut:El,anticipate:Cl},Zm=t=>typeof t=="string",Rl=t=>{if(Ol(t)){Ur(t.length===4);const[e,n,r,i]=t;return nr(e,n,r,i)}else if(Zm(t))return Ur(Il[t]!==void 0),Il[t];return t},zr=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],Ml={value:null,addProjectionMetrics:null};function Qm(t,e){let n=new Set,r=new Set,i=!1,o=!1;const s=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function d(h){s.has(h)&&(c.schedule(h),t()),l++,h(a)}const c={schedule:(h,m=!1,y=!1)=>{const _=y&&i?n:r;return m&&s.add(h),_.has(h)||_.add(h),h},cancel:h=>{r.delete(h),s.delete(h)},process:h=>{if(a=h,i){o=!0;return}i=!0,[n,r]=[r,n],n.forEach(d),e&&Ml.value&&Ml.value.frameloop[e].push(l),l=0,n.clear(),i=!1,o&&(o=!1,c.process(h))}};return c}const ty=40;function Nl(t,e){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=zr.reduce((E,M)=>(E[M]=Qm(o,e?M:void 0),E),{}),{setup:a,read:l,resolveKeyframes:d,preUpdate:c,update:h,preRender:m,render:y,postRender:w}=s,_=()=>{const E=Ne.useManualTiming?i.timestamp:performance.now();n=!1,Ne.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(E-i.timestamp,ty),1)),i.timestamp=E,i.isProcessing=!0,a.process(i),l.process(i),d.process(i),c.process(i),h.process(i),m.process(i),y.process(i),w.process(i),i.isProcessing=!1,n&&e&&(r=!1,t(_))},P=()=>{n=!0,r=!0,i.isProcessing||t(_)};return{schedule:zr.reduce((E,M)=>{const O=s[M];return E[M]=(j,B=!1,L=!1)=>(n||P(),O.schedule(j,B,L)),E},{}),cancel:E=>{for(let M=0;M<zr.length;M++)s[zr[M]].cancel(E)},state:i,steps:s}}const{schedule:Ot,cancel:Ve,state:Xt,steps:Po}=Nl(typeof requestAnimationFrame<"u"?requestAnimationFrame:ue,!0);let Wr;function ey(){Wr=void 0}const ie={now:()=>(Wr===void 0&&ie.set(Xt.isProcessing||Ne.useManualTiming?Xt.timestamp:performance.now()),Wr),set:t=>{Wr=t,queueMicrotask(ey)}},Dl=t=>e=>typeof e=="string"&&e.startsWith(t),ko=Dl("--"),ny=Dl("var(--"),Oo=t=>ny(t)?ry.test(t.split("/*")[0].trim()):!1,ry=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,vn={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},rr={...vn,transform:t=>Me(0,1,t)},qr={...vn,default:1},ir=t=>Math.round(t*1e5)/1e5,Io=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function iy(t){return t==null}const oy=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ro=(t,e)=>n=>!!(typeof n=="string"&&oy.test(n)&&n.startsWith(t)||e&&!iy(n)&&Object.prototype.hasOwnProperty.call(n,e)),Bl=(t,e,n)=>r=>{if(typeof r!="string")return r;const[i,o,s,a]=r.match(Io);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},sy=t=>Me(0,255,t),Mo={...vn,transform:t=>Math.round(sy(t))},Ge={test:Ro("rgb","red"),parse:Bl("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+Mo.transform(t)+", "+Mo.transform(e)+", "+Mo.transform(n)+", "+ir(rr.transform(r))+")"};function ay(t){let e="",n="",r="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,r+=r,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const No={test:Ro("#"),parse:ay,transform:Ge.transform},or=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Ue=or("deg"),xe=or("%"),ot=or("px"),cy=or("vh"),ly=or("vw"),Ll={...xe,parse:t=>xe.parse(t)/100,transform:t=>xe.transform(t*100)},wn={test:Ro("hsl","hue"),parse:Bl("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+xe.transform(ir(e))+", "+xe.transform(ir(n))+", "+ir(rr.transform(r))+")"},Vt={test:t=>Ge.test(t)||No.test(t)||wn.test(t),parse:t=>Ge.test(t)?Ge.parse(t):wn.test(t)?wn.parse(t):No.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?Ge.transform(t):wn.transform(t),getAnimatableNone:t=>{const e=Vt.parse(t);return e.alpha=0,Vt.transform(e)}},uy=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function fy(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(Io))==null?void 0:e.length)||0)+(((n=t.match(uy))==null?void 0:n.length)||0)>0}const Fl="number",jl="color",dy="var",hy="var(",$l="${}",py=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function sr(t){const e=t.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(py,l=>(Vt.test(l)?(r.color.push(o),i.push(jl),n.push(Vt.parse(l))):l.startsWith(hy)?(r.var.push(o),i.push(dy),n.push(l)):(r.number.push(o),i.push(Fl),n.push(parseFloat(l))),++o,$l)).split($l);return{values:n,split:a,indexes:r,types:i}}function Vl(t){return sr(t).values}function Ul(t){const{split:e,types:n}=sr(t),r=e.length;return i=>{let o="";for(let s=0;s<r;s++)if(o+=e[s],i[s]!==void 0){const a=n[s];a===Fl?o+=ir(i[s]):a===jl?o+=Vt.transform(i[s]):o+=i[s]}return o}}const my=t=>typeof t=="number"?0:Vt.test(t)?Vt.getAnimatableNone(t):t;function yy(t){const e=Vl(t);return Ul(t)(e.map(my))}const ze={test:fy,parse:Vl,createTransformer:Ul,getAnimatableNone:yy};function Do(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function gy({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,e/=100,n/=100;let i=0,o=0,s=0;if(!e)i=o=s=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=Do(l,a,t+1/3),o=Do(l,a,t),s=Do(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}function Hr(t,e){return n=>n>0?e:t}const Mt=(t,e,n)=>t+(e-t)*n,Bo=(t,e,n)=>{const r=t*t,i=n*(e*e-r)+r;return i<0?0:Math.sqrt(i)},vy=[No,Ge,wn],wy=t=>vy.find(e=>e.test(t));function zl(t){const e=wy(t);if(!e)return!1;let n=e.parse(t);return e===wn&&(n=gy(n)),n}const Wl=(t,e)=>{const n=zl(t),r=zl(e);if(!n||!r)return Hr(t,e);const i={...n};return o=>(i.red=Bo(n.red,r.red,o),i.green=Bo(n.green,r.green,o),i.blue=Bo(n.blue,r.blue,o),i.alpha=Mt(n.alpha,r.alpha,o),Ge.transform(i))},Lo=new Set(["none","hidden"]);function by(t,e){return Lo.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function _y(t,e){return n=>Mt(t,e,n)}function Fo(t){return typeof t=="number"?_y:typeof t=="string"?Oo(t)?Hr:Vt.test(t)?Wl:Ey:Array.isArray(t)?ql:typeof t=="object"?Vt.test(t)?Wl:xy:Hr}function ql(t,e){const n=[...t],r=n.length,i=t.map((o,s)=>Fo(o)(o,e[s]));return o=>{for(let s=0;s<r;s++)n[s]=i[s](o);return n}}function xy(t,e){const n={...t,...e},r={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(r[i]=Fo(t[i])(t[i],e[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}}function Sy(t,e){const n=[],r={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const o=e.types[i],s=t.indexes[o][r[o]],a=t.values[s]??0;n[i]=a,r[o]++}return n}const Ey=(t,e)=>{const n=ze.createTransformer(e),r=sr(t),i=sr(e);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Lo.has(t)&&!i.values.length||Lo.has(e)&&!r.values.length?by(t,e):tr(ql(Sy(r,i),i.values),n):Hr(t,e)};function Hl(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?Mt(t,e,n):Fo(t)(t,e)}const Ay=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>Ot.update(e,n),stop:()=>Ve(e),now:()=>Xt.isProcessing?Xt.timestamp:ie.now()}},Gl=(t,e,n=10)=>{let r="";const i=Math.max(Math.round(e/n),2);for(let o=0;o<i;o++)r+=Math.round(t(o/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Gr=2e4;function jo(t){let e=0;const n=50;let r=t.next(e);for(;!r.done&&e<Gr;)e+=n,r=t.next(e);return e>=Gr?1/0:e}function Cy(t,e=100,n){const r=n({...t,keyframes:[0,e]}),i=Math.min(jo(r),Gr);return{type:"keyframes",ease:o=>r.next(i*o).value/e,duration:_e(i)}}const Ty=5;function Kl(t,e,n){const r=Math.max(e-Ty,0);return bl(n-t(r),e-r)}const Dt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},$o=.001;function Py({duration:t=Dt.duration,bounce:e=Dt.bounce,velocity:n=Dt.velocity,mass:r=Dt.mass}){let i,o,s=1-e;s=Me(Dt.minDamping,Dt.maxDamping,s),t=Me(Dt.minDuration,Dt.maxDuration,_e(t)),s<1?(i=d=>{const c=d*s,h=c*t,m=c-n,y=Vo(d,s),w=Math.exp(-h);return $o-m/y*w},o=d=>{const h=d*s*t,m=h*n+n,y=Math.pow(s,2)*Math.pow(d,2)*t,w=Math.exp(-h),_=Vo(Math.pow(d,2),s);return(-i(d)+$o>0?-1:1)*((m-y)*w)/_}):(i=d=>{const c=Math.exp(-d*t),h=(d-n)*t+1;return-$o+c*h},o=d=>{const c=Math.exp(-d*t),h=(n-d)*(t*t);return c*h});const a=5/t,l=Oy(i,o,a);if(t=be(t),isNaN(l))return{stiffness:Dt.stiffness,damping:Dt.damping,duration:t};{const d=Math.pow(l,2)*r;return{stiffness:d,damping:s*2*Math.sqrt(r*d),duration:t}}}const ky=12;function Oy(t,e,n){let r=n;for(let i=1;i<ky;i++)r=r-t(r)/e(r);return r}function Vo(t,e){return t*Math.sqrt(1-e*e)}const Iy=["duration","bounce"],Ry=["stiffness","damping","mass"];function Yl(t,e){return e.some(n=>t[n]!==void 0)}function My(t){let e={velocity:Dt.velocity,stiffness:Dt.stiffness,damping:Dt.damping,mass:Dt.mass,isResolvedFromDuration:!1,...t};if(!Yl(t,Ry)&&Yl(t,Iy))if(t.visualDuration){const n=t.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,o=2*Me(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:Dt.mass,stiffness:i,damping:o}}else{const n=Py(t);e={...e,...n,mass:Dt.mass},e.isResolvedFromDuration=!0}return e}function Kr(t=Dt.visualDuration,e=Dt.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:r,restDelta:i}=n;const o=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:d,mass:c,duration:h,velocity:m,isResolvedFromDuration:y}=My({...n,velocity:-_e(n.velocity||0)}),w=m||0,_=d/(2*Math.sqrt(l*c)),P=s-o,x=_e(Math.sqrt(l/c)),v=Math.abs(P)<5;r||(r=v?Dt.restSpeed.granular:Dt.restSpeed.default),i||(i=v?Dt.restDelta.granular:Dt.restDelta.default);let E;if(_<1){const O=Vo(x,_);E=j=>{const B=Math.exp(-_*x*j);return s-B*((w+_*x*P)/O*Math.sin(O*j)+P*Math.cos(O*j))}}else if(_===1)E=O=>s-Math.exp(-x*O)*(P+(w+x*P)*O);else{const O=x*Math.sqrt(_*_-1);E=j=>{const B=Math.exp(-_*x*j),L=Math.min(O*j,300);return s-B*((w+_*x*P)*Math.sinh(L)+O*P*Math.cosh(L))/O}}const M={calculatedDuration:y&&h||null,next:O=>{const j=E(O);if(y)a.done=O>=h;else{let B=O===0?w:0;_<1&&(B=O===0?be(w):Kl(E,O,j));const L=Math.abs(B)<=r,F=Math.abs(s-j)<=i;a.done=L&&F}return a.value=a.done?s:j,a},toString:()=>{const O=Math.min(jo(M),Gr),j=Gl(B=>M.next(O*B).value,O,30);return O+"ms "+j},toTransition:()=>{}};return M}Kr.applyToOptions=t=>{const e=Cy(t,100,Kr);return t.ease=e.ease,t.duration=be(e.duration),t.type="keyframes",t};function Uo({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:d=.5,restSpeed:c}){const h=t[0],m={done:!1,value:h},y=L=>a!==void 0&&L<a||l!==void 0&&L>l,w=L=>a===void 0?l:l===void 0||Math.abs(a-L)<Math.abs(l-L)?a:l;let _=n*e;const P=h+_,x=s===void 0?P:s(P);x!==P&&(_=x-h);const v=L=>-_*Math.exp(-L/r),E=L=>x+v(L),M=L=>{const F=v(L),Y=E(L);m.done=Math.abs(F)<=d,m.value=m.done?x:Y};let O,j;const B=L=>{y(m.value)&&(O=L,j=Kr({keyframes:[m.value,w(m.value)],velocity:Kl(E,L,m.value),damping:i,stiffness:o,restDelta:d,restSpeed:c}))};return B(0),{calculatedDuration:null,next:L=>{let F=!1;return!j&&O===void 0&&(F=!0,M(L),B(L)),O!==void 0&&L>=O?j.next(L-O):(!F&&M(L),m)}}}function Ny(t,e,n){const r=[],i=n||Ne.mix||Hl,o=t.length-1;for(let s=0;s<o;s++){let a=i(t[s],t[s+1]);if(e){const l=Array.isArray(e)?e[s]||ue:e;a=tr(l,a)}r.push(a)}return r}function Dy(t,e,{clamp:n=!0,ease:r,mixer:i}={}){const o=t.length;if(Ur(o===e.length),o===1)return()=>e[0];if(o===2&&e[0]===e[1])return()=>e[1];const s=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=Ny(e,r,i),l=a.length,d=c=>{if(s&&c<t[0])return e[0];let h=0;if(l>1)for(;h<t.length-2&&!(c<t[h+1]);h++);const m=er(t[h],t[h+1],c);return a[h](m)};return n?c=>d(Me(t[0],t[o-1],c)):d}function By(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const i=er(0,e,r);t.push(Mt(n,1,i))}}function Ly(t){const e=[0];return By(e,t.length-1),e}function Fy(t,e){return t.map(n=>n*e)}function jy(t,e){return t.map(()=>e||kl).splice(0,t.length-1)}function ar({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const i=Jm(r)?r.map(Rl):Rl(r),o={done:!1,value:e[0]},s=Fy(n&&n.length===e.length?n:Ly(e),t),a=Dy(s,e,{ease:Array.isArray(i)?i:jy(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}const $y=t=>t!==null;function zo(t,{repeat:e,repeatType:n="loop"},r,i=1){const o=t.filter($y),a=i<0||e&&n!=="loop"&&e%2===1?0:o.length-1;return!a||r===void 0?o[a]:r}const Vy={decay:Uo,inertia:Uo,tween:ar,keyframes:ar,spring:Kr};function Xl(t){typeof t.type=="string"&&(t.type=Vy[t.type])}class Wo{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const Uy=t=>t/100;class qo extends Wo{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,i;const{motionValue:n}=this.options;n&&n.updatedAt!==ie.now()&&this.tick(ie.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(r=this.options).onStop)==null||i.call(r))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;Xl(e);const{type:n=ar,repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:s=0}=e;let{keyframes:a}=e;const l=n||ar;l!==ar&&typeof a[0]!="number"&&(this.mixKeyframes=tr(Uy,Hl(a[0],a[1])),a=[0,100]);const d=l({...e,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-s})),d.calculatedDuration===null&&(d.calculatedDuration=jo(d));const{calculatedDuration:c}=d;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=d}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:r,totalDuration:i,mixKeyframes:o,mirroredGenerator:s,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:d=0,keyframes:c,repeat:h,repeatType:m,repeatDelay:y,type:w,onUpdate:_,finalKeyframe:P}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const x=this.currentTime-d*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?x<0:x>i;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let E=this.currentTime,M=r;if(h){const L=Math.min(this.currentTime,i)/a;let F=Math.floor(L),Y=L%1;!Y&&L>=1&&(Y=1),Y===1&&F--,F=Math.min(F,h+1),!!(F%2)&&(m==="reverse"?(Y=1-Y,y&&(Y-=y/a)):m==="mirror"&&(M=s)),E=Me(0,1,Y)*a}const O=v?{done:!1,value:c[0]}:M.next(E);o&&(O.value=o(O.value));let{done:j}=O;!v&&l!==null&&(j=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const B=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&j);return B&&w!==Uo&&(O.value=zo(c,this.options,P,this.speed)),_&&_(O.value),B&&this.finish(),O}then(e,n){return this.finished.then(e,n)}get duration(){return _e(this.calculatedDuration)}get time(){return _e(this.currentTime)}set time(e){var n;e=be(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(ie.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=_e(this.currentTime))}play(){var i,o;if(this.isStopped)return;const{driver:e=Ay,startTime:n}=this.options;this.driver||(this.driver=e(s=>this.tick(s))),(o=(i=this.options).onPlay)==null||o.call(i);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ie.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(e=this.options).onComplete)==null||n.call(e)}cancel(){var e,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(e=this.options).onCancel)==null||n.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),e.observe(this)}}function zy(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Ke=t=>t*180/Math.PI,Ho=t=>{const e=Ke(Math.atan2(t[1],t[0]));return Go(e)},Wy={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Ho,rotateZ:Ho,skewX:t=>Ke(Math.atan(t[1])),skewY:t=>Ke(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Go=t=>(t=t%360,t<0&&(t+=360),t),Jl=Ho,Zl=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Ql=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),qy={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Zl,scaleY:Ql,scale:t=>(Zl(t)+Ql(t))/2,rotateX:t=>Go(Ke(Math.atan2(t[6],t[5]))),rotateY:t=>Go(Ke(Math.atan2(-t[2],t[0]))),rotateZ:Jl,rotate:Jl,skewX:t=>Ke(Math.atan(t[4])),skewY:t=>Ke(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Ko(t){return t.includes("scale")?1:0}function Yo(t,e){if(!t||t==="none")return Ko(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=qy,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Wy,i=a}if(!i)return Ko(e);const o=r[e],s=i[1].split(",").map(Gy);return typeof o=="function"?o(s):s[o]}const Hy=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Yo(n,e)};function Gy(t){return parseFloat(t.trim())}const bn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],_n=new Set(bn),tu=t=>t===vn||t===ot,Ky=new Set(["x","y","z"]),Yy=bn.filter(t=>!Ky.has(t));function Xy(t){const e=[];return Yy.forEach(n=>{const r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e}const Ye={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Yo(e,"x"),y:(t,{transform:e})=>Yo(e,"y")};Ye.translateX=Ye.x,Ye.translateY=Ye.y;const Xe=new Set;let Xo=!1,Jo=!1,Zo=!1;function eu(){if(Jo){const t=Array.from(Xe).filter(r=>r.needsMeasurement),e=new Set(t.map(r=>r.element)),n=new Map;e.forEach(r=>{const i=Xy(r);i.length&&(n.set(r,i),r.render())}),t.forEach(r=>r.measureInitialState()),e.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([o,s])=>{var a;(a=r.getValue(o))==null||a.set(s)})}),t.forEach(r=>r.measureEndState()),t.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Jo=!1,Xo=!1,Xe.forEach(t=>t.complete(Zo)),Xe.clear()}function nu(){Xe.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Jo=!0)})}function Jy(){Zo=!0,nu(),eu(),Zo=!1}class Qo{constructor(e,n,r,i,o,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=r,this.motionValue=i,this.element=o,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(Xe.add(this),Xo||(Xo=!0,Ot.read(nu),Ot.resolveKeyframes(eu))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:r,motionValue:i}=this;if(e[0]===null){const o=i==null?void 0:i.get(),s=e[e.length-1];if(o!==void 0)e[0]=o;else if(r&&n){const a=r.readValue(n,s);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=s),i&&o===void 0&&i.set(e[0])}zy(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Xe.delete(this)}cancel(){this.state==="scheduled"&&(Xe.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Zy=t=>t.startsWith("--");function Qy(t,e,n){Zy(e)?t.style.setProperty(e,n):t.style[e]=n}const tg=Eo(()=>window.ScrollTimeline!==void 0),eg={};function ng(t,e){const n=Eo(t);return()=>eg[e]??n()}const ru=ng(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),cr=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,iu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:cr([0,.65,.55,1]),circOut:cr([.55,0,1,.45]),backIn:cr([.31,.01,.66,-.59]),backOut:cr([.33,1.53,.69,.99])};function ou(t,e){if(t)return typeof t=="function"?ru()?Gl(t,e):"ease-out":Ol(t)?cr(t):Array.isArray(t)?t.map(n=>ou(n,e)||iu.easeOut):iu[t]}function rg(t,e,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:s="loop",ease:a="easeOut",times:l}={},d=void 0){const c={[e]:n};l&&(c.offset=l);const h=ou(a,i);Array.isArray(h)&&(c.easing=h);const m={delay:r,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"};return d&&(m.pseudoElement=d),t.animate(c,m)}function su(t){return typeof t=="function"&&"applyToOptions"in t}function ig({type:t,...e}){return su(t)&&ru()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class og extends Wo{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:n,name:r,keyframes:i,pseudoElement:o,allowFlatten:s=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!o,this.allowFlatten=s,this.options=e,Ur(typeof e.type!="string");const d=ig(e);this.animation=rg(n,r,i,d,o),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const c=zo(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):Qy(n,r,c),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,n;(n=(e=this.animation).finish)==null||n.call(e)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var e,n;this.isPseudoElement||(n=(e=this.animation).commitStyles)==null||n.call(e)}get duration(){var n,r;const e=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return _e(Number(e))}get time(){return _e(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=be(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&tg()?(this.animation.timeline=e,ue):n(this)}}const au={anticipate:Cl,backInOut:Al,circInOut:Pl};function sg(t){return t in au}function ag(t){typeof t.ease=="string"&&sg(t.ease)&&(t.ease=au[t.ease])}const cu=10;class cg extends og{constructor(e){ag(e),Xl(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:r,onComplete:i,element:o,...s}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new qo({...s,autoplay:!1}),l=be(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-cu).value,a.sample(l).value,cu),a.stop()}}const lu=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(ze.test(t)||t==="0")&&!t.startsWith("url("));function lg(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function ug(t,e,n,r){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const o=t[t.length-1],s=lu(i,e),a=lu(o,e);return!s||!a?!1:lg(t)||(n==="spring"||su(n))&&r}function ts(t){t.duration=0,t.type}const fg=new Set(["opacity","clipPath","filter","transform"]),dg=Eo(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function hg(t){var c;const{motionValue:e,name:n,repeatDelay:r,repeatType:i,damping:o,type:s}=t;if(!(((c=e==null?void 0:e.owner)==null?void 0:c.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:d}=e.owner.getProps();return dg()&&n&&fg.has(n)&&(n!=="transform"||!d)&&!l&&!r&&i!=="mirror"&&o!==0&&s!=="inertia"}const pg=40;class mg extends Wo{constructor({autoplay:e=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:s="loop",keyframes:a,name:l,motionValue:d,element:c,...h}){var w;super(),this.stop=()=>{var _,P;this._animation&&(this._animation.stop(),(_=this.stopTimeline)==null||_.call(this)),(P=this.keyframeResolver)==null||P.cancel()},this.createdAt=ie.now();const m={autoplay:e,delay:n,type:r,repeat:i,repeatDelay:o,repeatType:s,name:l,motionValue:d,element:c,...h},y=(c==null?void 0:c.KeyframeResolver)||Qo;this.keyframeResolver=new y(a,(_,P,x)=>this.onKeyframesResolved(_,P,m,!x),l,d,c),(w=this.keyframeResolver)==null||w.scheduleResolve()}onKeyframesResolved(e,n,r,i){this.keyframeResolver=void 0;const{name:o,type:s,velocity:a,delay:l,isHandoff:d,onUpdate:c}=r;this.resolvedAt=ie.now(),ug(e,o,s,a)||((Ne.instantAnimations||!l)&&(c==null||c(zo(e,r,n))),e[0]=e[e.length-1],ts(r),r.repeat=0);const m={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>pg?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:e},y=!d&&hg(m)?new cg({...m,element:m.motionValue.owner.current}):new qo(m);y.finished.then(()=>this.notifyFinished()).catch(ue),this.pendingTimeline&&(this.stopTimeline=y.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=y}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),Jy()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}const yg=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function gg(t){const e=yg.exec(t);if(!e)return[,];const[,n,r,i]=e;return[`--${n??r}`,i]}function uu(t,e,n=1){const[r,i]=gg(t);if(!r)return;const o=window.getComputedStyle(e).getPropertyValue(r);if(o){const s=o.trim();return gl(s)?parseFloat(s):s}return Oo(i)?uu(i,e,n+1):i}function es(t,e){return(t==null?void 0:t[e])??(t==null?void 0:t.default)??t}const fu=new Set(["width","height","top","left","right","bottom",...bn]),vg={test:t=>t==="auto",parse:t=>t},du=t=>e=>e.test(t),hu=[vn,ot,xe,Ue,ly,cy,vg],pu=t=>hu.find(du(t));function wg(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||wl(t):!0}const bg=new Set(["brightness","contrast","saturate","opacity"]);function _g(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(Io)||[];if(!r)return t;const i=n.replace(r,"");let o=bg.has(e)?1:0;return r!==n&&(o*=100),e+"("+o+i+")"}const xg=/\b([a-z-]*)\(.*?\)/gu,ns={...ze,getAnimatableNone:t=>{const e=t.match(xg);return e?e.map(_g).join(" "):t}},mu={...vn,transform:Math.round},rs={borderWidth:ot,borderTopWidth:ot,borderRightWidth:ot,borderBottomWidth:ot,borderLeftWidth:ot,borderRadius:ot,radius:ot,borderTopLeftRadius:ot,borderTopRightRadius:ot,borderBottomRightRadius:ot,borderBottomLeftRadius:ot,width:ot,maxWidth:ot,height:ot,maxHeight:ot,top:ot,right:ot,bottom:ot,left:ot,padding:ot,paddingTop:ot,paddingRight:ot,paddingBottom:ot,paddingLeft:ot,margin:ot,marginTop:ot,marginRight:ot,marginBottom:ot,marginLeft:ot,backgroundPositionX:ot,backgroundPositionY:ot,...{rotate:Ue,rotateX:Ue,rotateY:Ue,rotateZ:Ue,scale:qr,scaleX:qr,scaleY:qr,scaleZ:qr,skew:Ue,skewX:Ue,skewY:Ue,distance:ot,translateX:ot,translateY:ot,translateZ:ot,x:ot,y:ot,z:ot,perspective:ot,transformPerspective:ot,opacity:rr,originX:Ll,originY:Ll,originZ:ot},zIndex:mu,fillOpacity:rr,strokeOpacity:rr,numOctaves:mu},Sg={...rs,color:Vt,backgroundColor:Vt,outlineColor:Vt,fill:Vt,stroke:Vt,borderColor:Vt,borderTopColor:Vt,borderRightColor:Vt,borderBottomColor:Vt,borderLeftColor:Vt,filter:ns,WebkitFilter:ns},yu=t=>Sg[t];function gu(t,e){let n=yu(t);return n!==ns&&(n=ze),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Eg=new Set(["auto","none","0"]);function Ag(t,e,n){let r=0,i;for(;r<t.length&&!i;){const o=t[r];typeof o=="string"&&!Eg.has(o)&&sr(o).values.length&&(i=t[r]),r++}if(i&&n)for(const o of e)t[o]=gu(n,i)}class Cg extends Qo{constructor(e,n,r,i,o){super(e,n,r,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let d=e[l];if(typeof d=="string"&&(d=d.trim(),Oo(d))){const c=uu(d,n.current);c!==void 0&&(e[l]=c),l===e.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!fu.has(r)||e.length!==2)return;const[i,o]=e,s=pu(i),a=pu(o);if(s!==a)if(tu(s)&&tu(a))for(let l=0;l<e.length;l++){const d=e[l];typeof d=="string"&&(e[l]=parseFloat(d))}else Ye[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,r=[];for(let i=0;i<e.length;i++)(e[i]===null||wg(e[i]))&&r.push(i);r.length&&Ag(e,r,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:r}=this;if(!e||!e.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ye[r](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(r,i).jump(i,!1)}measureEndState(){var a;const{element:e,name:n,unresolvedKeyframes:r}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=r.length-1,s=r[o];r[o]=Ye[n](e.measureViewportBox(),window.getComputedStyle(e.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,d])=>{e.getValue(l).set(d)}),this.resolveNoneKeyframes()}}function Tg(t,e,n){if(t instanceof EventTarget)return[t];if(typeof t=="string"){const i=document.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}const vu=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function wu(t){return vl(t)&&"offsetHeight"in t}const bu=30,Pg=t=>!isNaN(parseFloat(t));class kg{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var o;const i=ie.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const s of this.dependents)s.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=ie.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Pg(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Ao);const r=this.events[e].add(n);return e==="change"?()=>{r(),Ot.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=ie.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>bu)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,bu);return bl(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var e,n;(e=this.dependents)==null||e.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function xn(t,e){return new kg(t,e)}const{schedule:is,cancel:w6}=Nl(queueMicrotask,!1),ye={x:!1,y:!1};function _u(){return ye.x||ye.y}function Og(t){return t==="x"||t==="y"?ye[t]?null:(ye[t]=!0,()=>{ye[t]=!1}):ye.x||ye.y?null:(ye.x=ye.y=!0,()=>{ye.x=ye.y=!1})}function xu(t,e){const n=Tg(t),r=new AbortController,i={passive:!0,...e,signal:r.signal};return[n,i,()=>r.abort()]}function Su(t){return!(t.pointerType==="touch"||_u())}function Ig(t,e,n={}){const[r,i,o]=xu(t,n),s=a=>{if(!Su(a))return;const{target:l}=a,d=e(l,a);if(typeof d!="function"||!l)return;const c=h=>{Su(h)&&(d(h),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,i)};return r.forEach(a=>{a.addEventListener("pointerenter",s,i)}),o}const Eu=(t,e)=>e?t===e?!0:Eu(t,e.parentElement):!1,os=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Rg=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Mg(t){return Rg.has(t.tagName)||t.tabIndex!==-1}const Yr=new WeakSet;function Au(t){return e=>{e.key==="Enter"&&t(e)}}function ss(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Ng=(t,e)=>{const n=t.currentTarget;if(!n)return;const r=Au(()=>{if(Yr.has(n))return;ss(n,"down");const i=Au(()=>{ss(n,"up")}),o=()=>ss(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",o,e)});n.addEventListener("keydown",r,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),e)};function Cu(t){return os(t)&&!_u()}function Dg(t,e,n={}){const[r,i,o]=xu(t,n),s=a=>{const l=a.currentTarget;if(!Cu(a))return;Yr.add(l);const d=e(l,a),c=(y,w)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",m),Yr.has(l)&&Yr.delete(l),Cu(y)&&typeof d=="function"&&d(y,{success:w})},h=y=>{c(y,l===window||l===document||n.useGlobalTarget||Eu(l,y.target))},m=y=>{c(y,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",m,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",s,i),wu(a)&&(a.addEventListener("focus",d=>Ng(d,i)),!Mg(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function Tu(t){return vl(t)&&"ownerSVGElement"in t}function Bg(t){return Tu(t)&&t.tagName==="svg"}const Zt=t=>!!(t&&t.getVelocity),Lg=[...hu,Vt,ze],Fg=t=>Lg.find(du(t)),as=te({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});class jg extends se{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const r=n.offsetParent,i=wu(r)&&r.offsetWidth||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=i-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function $g({children:t,isPresent:e,anchorX:n,root:r}){const i=pn(),o=it(null),s=it({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=Lt(as);return Zn(()=>{const{width:l,height:d,top:c,left:h,right:m}=s.current;if(e||!o.current||!l||!d)return;const y=n==="left"?`left: ${h}`:`right: ${m}`;o.current.dataset.motionPopId=i;const w=document.createElement("style");a&&(w.nonce=a);const _=r??document.head;return _.appendChild(w),w.sheet&&w.sheet.insertRule(`
1
+ (function(){"use strict";var wn,$,Ls,_e,Os,Fs,si,Vs,ai,ci,li,Us,vn={},$s=[],Eh=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,or=Array.isArray;function ne(t,e){for(var n in e)t[n]=e[n];return t}function ui(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function L(t,e,n){var r,i,o,s={};for(o in e)o=="key"?r=e[o]:o=="ref"?i=e[o]:s[o]=e[o];if(arguments.length>2&&(s.children=arguments.length>3?wn.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(o in t.defaultProps)s[o]===void 0&&(s[o]=t.defaultProps[o]);return _n(t,s,r,i,null)}function _n(t,e,n,r,i){var o={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++Ls,__i:-1,__u:0};return i==null&&$.vnode!=null&&$.vnode(o),o}function zs(){return{current:null}}function J(t){return t.children}function Rt(t,e){this.props=t,this.context=e}function Ve(t,e){if(e==null)return t.__?Ve(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?Ve(t):null}function js(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return js(t)}}function di(t){(!t.__d&&(t.__d=!0)&&_e.push(t)&&!sr.__r++||Os!==$.debounceRendering)&&((Os=$.debounceRendering)||Fs)(sr)}function sr(){var t,e,n,r,i,o,s,a;for(_e.sort(si);t=_e.shift();)t.__d&&(e=_e.length,r=void 0,o=(i=(n=t).__v).__e,s=[],a=[],n.__P&&((r=ne({},i)).__v=i.__v+1,$.vnode&&$.vnode(r),hi(n.__P,r,i,n.__n,n.__P.namespaceURI,32&i.__u?[o]:null,s,o??Ve(i),!!(32&i.__u),a),r.__v=i.__v,r.__.__k[r.__i]=r,Ys(s,r,a),r.__e!=o&&js(r)),_e.length>e&&_e.sort(si));sr.__r=0}function Ws(t,e,n,r,i,o,s,a,u,h,c){var f,m,g,v,w,E,_=r&&r.__k||$s,C=e.length;for(u=Sh(n,e,_,u,C),f=0;f<C;f++)(g=n.__k[f])!=null&&(m=g.__i===-1?vn:_[g.__i]||vn,g.__i=f,E=hi(t,g,m,i,o,s,a,u,h,c),v=g.__e,g.ref&&m.ref!=g.ref&&(m.ref&&fi(m.ref,null,g),c.push(g.ref,g.__c||v,g)),w==null&&v!=null&&(w=v),4&g.__u||m.__k===g.__k?u=Hs(g,u,t):typeof g.type=="function"&&E!==void 0?u=E:v&&(u=v.nextSibling),g.__u&=-7);return n.__e=w,u}function Sh(t,e,n,r,i){var o,s,a,u,h,c=n.length,f=c,m=0;for(t.__k=new Array(i),o=0;o<i;o++)(s=e[o])!=null&&typeof s!="boolean"&&typeof s!="function"?(u=o+m,(s=t.__k[o]=typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?_n(null,s,null,null,null):or(s)?_n(J,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?_n(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s).__=t,s.__b=t.__b+1,a=null,(h=s.__i=kh(s,n,u,f))!==-1&&(f--,(a=n[h])&&(a.__u|=2)),a==null||a.__v===null?(h==-1&&m--,typeof s.type!="function"&&(s.__u|=4)):h!=u&&(h==u-1?m--:h==u+1?m++:(h>u?m--:m++,s.__u|=4))):t.__k[o]=null;if(f)for(o=0;o<c;o++)(a=n[o])!=null&&!(2&a.__u)&&(a.__e==r&&(r=Ve(a)),Gs(a,a));return r}function Hs(t,e,n){var r,i;if(typeof t.type=="function"){for(r=t.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=t,e=Hs(r[i],e,n));return e}t.__e!=e&&(e&&t.type&&!n.contains(e)&&(e=Ve(t)),n.insertBefore(t.__e,e||null),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function re(t,e){return e=e||[],t==null||typeof t=="boolean"||(or(t)?t.some(function(n){re(n,e)}):e.push(t)),e}function kh(t,e,n,r){var i,o,s=t.key,a=t.type,u=e[n];if(u===null||u&&s==u.key&&a===u.type&&!(2&u.__u))return n;if(r>(u!=null&&!(2&u.__u)?1:0))for(i=n-1,o=n+1;i>=0||o<e.length;){if(i>=0){if((u=e[i])&&!(2&u.__u)&&s==u.key&&a===u.type)return i;i--}if(o<e.length){if((u=e[o])&&!(2&u.__u)&&s==u.key&&a===u.type)return o;o++}}return-1}function Ks(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||Eh.test(e)?n:n+"px"}function ar(t,e,n,r,i){var o;t:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||Ks(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||Ks(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(Vs,"$1")),e=e.toLowerCase()in t||e=="onFocusOut"||e=="onFocusIn"?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=n,n?r?n.u=r.u:(n.u=ai,t.addEventListener(e,o?li:ci,o)):t.removeEventListener(e,o?li:ci,o);else{if(i=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break t}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function qs(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=ai++;else if(e.t<n.u)return;return n($.event?$.event(e):e)}}}function hi(t,e,n,r,i,o,s,a,u,h){var c,f,m,g,v,w,E,_,C,T,I,k,R,N,P,M,B,O=e.type;if(e.constructor!==void 0)return null;128&n.__u&&(u=!!(32&n.__u),o=[a=e.__e=n.__e]),(c=$.__b)&&c(e);t:if(typeof O=="function")try{if(_=e.props,C="prototype"in O&&O.prototype.render,T=(c=O.contextType)&&r[c.__c],I=c?T?T.props.value:c.__:r,n.__c?E=(f=e.__c=n.__c).__=f.__E:(C?e.__c=f=new O(_,I):(e.__c=f=new Rt(_,I),f.constructor=O,f.render=Ah),T&&T.sub(f),f.props=_,f.state||(f.state={}),f.context=I,f.__n=r,m=f.__d=!0,f.__h=[],f._sb=[]),C&&f.__s==null&&(f.__s=f.state),C&&O.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=ne({},f.__s)),ne(f.__s,O.getDerivedStateFromProps(_,f.__s))),g=f.props,v=f.state,f.__v=e,m)C&&O.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),C&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(C&&O.getDerivedStateFromProps==null&&_!==g&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(_,I),!f.__e&&(f.shouldComponentUpdate!=null&&f.shouldComponentUpdate(_,f.__s,I)===!1||e.__v==n.__v)){for(e.__v!=n.__v&&(f.props=_,f.state=f.__s,f.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(et){et&&(et.__=e)}),k=0;k<f._sb.length;k++)f.__h.push(f._sb[k]);f._sb=[],f.__h.length&&s.push(f);break t}f.componentWillUpdate!=null&&f.componentWillUpdate(_,f.__s,I),C&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(g,v,w)})}if(f.context=I,f.props=_,f.__P=t,f.__e=!1,R=$.__r,N=0,C){for(f.state=f.__s,f.__d=!1,R&&R(e),c=f.render(f.props,f.state,f.context),P=0;P<f._sb.length;P++)f.__h.push(f._sb[P]);f._sb=[]}else do f.__d=!1,R&&R(e),c=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++N<25);f.state=f.__s,f.getChildContext!=null&&(r=ne(ne({},r),f.getChildContext())),C&&!m&&f.getSnapshotBeforeUpdate!=null&&(w=f.getSnapshotBeforeUpdate(g,v)),a=Ws(t,or(M=c!=null&&c.type===J&&c.key==null?c.props.children:c)?M:[M],e,n,r,i,o,s,a,u,h),f.base=e.__e,e.__u&=-161,f.__h.length&&s.push(f),E&&(f.__E=f.__=null)}catch(et){if(e.__v=null,u||o!=null)if(et.then){for(e.__u|=u?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;o[o.indexOf(a)]=null,e.__e=a}else for(B=o.length;B--;)ui(o[B]);else e.__e=n.__e,e.__k=n.__k;$.__e(et,e,n)}else o==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):a=e.__e=Th(n.__e,e,n,r,i,o,s,u,h);return(c=$.diffed)&&c(e),128&e.__u?void 0:a}function Ys(t,e,n){for(var r=0;r<n.length;r++)fi(n[r],n[++r],n[++r]);$.__c&&$.__c(e,t),t.some(function(i){try{t=i.__h,i.__h=[],t.some(function(o){o.call(i)})}catch(o){$.__e(o,i.__v)}})}function Th(t,e,n,r,i,o,s,a,u){var h,c,f,m,g,v,w,E=n.props,_=e.props,C=e.type;if(C=="svg"?i="http://www.w3.org/2000/svg":C=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o!=null){for(h=0;h<o.length;h++)if((g=o[h])&&"setAttribute"in g==!!C&&(C?g.localName==C:g.nodeType==3)){t=g,o[h]=null;break}}if(t==null){if(C==null)return document.createTextNode(_);t=document.createElementNS(i,C,_.is&&_),a&&($.__m&&$.__m(e,o),a=!1),o=null}if(C===null)E===_||a&&t.data===_||(t.data=_);else{if(o=o&&wn.call(t.childNodes),E=n.props||vn,!a&&o!=null)for(E={},h=0;h<t.attributes.length;h++)E[(g=t.attributes[h]).name]=g.value;for(h in E)if(g=E[h],h!="children"){if(h=="dangerouslySetInnerHTML")f=g;else if(!(h in _)){if(h=="value"&&"defaultValue"in _||h=="checked"&&"defaultChecked"in _)continue;ar(t,h,null,g,i)}}for(h in _)g=_[h],h=="children"?m=g:h=="dangerouslySetInnerHTML"?c=g:h=="value"?v=g:h=="checked"?w=g:a&&typeof g!="function"||E[h]===g||ar(t,h,g,E[h],i);if(c)a||f&&(c.__html===f.__html||c.__html===t.innerHTML)||(t.innerHTML=c.__html),e.__k=[];else if(f&&(t.innerHTML=""),Ws(t,or(m)?m:[m],e,n,r,C=="foreignObject"?"http://www.w3.org/1999/xhtml":i,o,s,o?o[0]:n.__k&&Ve(n,0),a,u),o!=null)for(h=o.length;h--;)ui(o[h]);a||(h="value",C=="progress"&&v==null?t.removeAttribute("value"):v!==void 0&&(v!==t[h]||C=="progress"&&!v||C=="option"&&v!==E[h])&&ar(t,h,v,E[h],i),h="checked",w!==void 0&&w!==t[h]&&ar(t,h,w,E[h],i))}return t}function fi(t,e,n){try{if(typeof t=="function"){var r=typeof t.__u=="function";r&&t.__u(),r&&e==null||(t.__u=t(e))}else t.current=e}catch(i){$.__e(i,n)}}function Gs(t,e,n){var r,i;if($.unmount&&$.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||fi(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){$.__e(o,e)}r.base=r.__P=null}if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&Gs(r[i],e,n||typeof t.type!="function");n||ui(t.__e),t.__c=t.__=t.__e=void 0}function Ah(t,e,n){return this.constructor(t,n)}function xn(t,e,n){var r,i,o,s;e==document&&(e=document.documentElement),$.__&&$.__(t,e),i=(r=typeof n=="function")?null:n&&n.__k||e.__k,o=[],s=[],hi(e,t=(!r&&n||e).__k=L(J,null,[t]),i||vn,vn,e.namespaceURI,!r&&n?[n]:i?null:e.firstChild?wn.call(e.childNodes):null,o,!r&&n?n:i?i.__e:e.firstChild,r,s),Ys(o,t,s)}function Xs(t,e){xn(t,e,Xs)}function Ph(t,e,n){var r,i,o,s,a=ne({},t.props);for(o in t.type&&t.type.defaultProps&&(s=t.type.defaultProps),e)o=="key"?r=e[o]:o=="ref"?i=e[o]:a[o]=e[o]===void 0&&s!==void 0?s[o]:e[o];return arguments.length>2&&(a.children=arguments.length>3?wn.call(arguments,2):n),_n(t.type,a,r||t.key,i||t.ref,null)}function kt(t,e){var n={__c:e="__cC"+Us++,__:t,Consumer:function(r,i){return r.children(i)},Provider:function(r){var i,o;return this.getChildContext||(i=new Set,(o={})[e]=this,this.getChildContext=function(){return o},this.componentWillUnmount=function(){i=null},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&i.forEach(function(a){a.__e=!0,di(a)})},this.sub=function(s){i.add(s);var a=s.componentWillUnmount;s.componentWillUnmount=function(){i&&i.delete(s),a&&a.call(s)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}wn=$s.slice,$={__e:function(t,e,n,r){for(var i,o,s;e=e.__;)if((i=e.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(t)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,r||{}),s=i.__d),s)return i.__E=i}catch(a){t=a}throw t}},Ls=0,Rt.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=ne({},this.state),typeof t=="function"&&(t=t(ne({},n),this.props)),t&&ne(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),di(this))},Rt.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),di(this))},Rt.prototype.render=J,_e=[],Fs=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,si=function(t,e){return t.__v.__b-e.__v.__b},sr.__r=0,Vs=/(PointerCapture)$|Capture$/i,ai=0,ci=qs(!1),li=qs(!0),Us=0;var Ih=0;function x(t,e,n,r,i,o){e||(e={});var s,a,u=e;if("ref"in u)for(a in u={},e)a=="ref"?s=e[a]:u[a]=e[a];var h={type:t,props:u,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Ih,__i:-1,__u:0,__source:i,__self:o};if(typeof t=="function"&&(s=t.defaultProps))for(a in s)u[a]===void 0&&(u[a]=s[a]);return $.vnode&&$.vnode(h),h}var ie,Y,pi,Zs,Ue=0,Js=[],rt=$,Qs=rt.__b,ta=rt.__r,ea=rt.diffed,na=rt.__c,ra=rt.unmount,ia=rt.__;function xe(t,e){rt.__h&&rt.__h(Y,t,Ue||e),Ue=0;var n=Y.__H||(Y.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function H(t){return Ue=1,bn(sa,t)}function bn(t,e,n){var r=xe(ie++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):sa(void 0,e),function(a){var u=r.__N?r.__N[0]:r.__[0],h=r.t(u,a);u!==h&&(r.__N=[h,r.__[1]],r.__c.setState({}))}],r.__c=Y,!Y.u)){var i=function(a,u,h){if(!r.__c.__H)return!0;var c=r.__c.__H.__.filter(function(m){return!!m.__c});if(c.every(function(m){return!m.__N}))return!o||o.call(this,a,u,h);var f=r.__c.props!==a;return c.forEach(function(m){if(m.__N){var g=m.__[0];m.__=m.__N,m.__N=void 0,g!==m.__[0]&&(f=!0)}}),o&&o.call(this,a,u,h)||f};Y.u=!0;var o=Y.shouldComponentUpdate,s=Y.componentWillUpdate;Y.componentWillUpdate=function(a,u,h){if(this.__e){var c=o;o=void 0,i(a,u,h),o=c}s&&s.call(this,a,u,h)},Y.shouldComponentUpdate=i}return r.__N||r.__}function U(t,e){var n=xe(ie++,3);!rt.__s&&yi(n.__H,e)&&(n.__=t,n.i=e,Y.__H.__h.push(n))}function oe(t,e){var n=xe(ie++,4);!rt.__s&&yi(n.__H,e)&&(n.__=t,n.i=e,Y.__h.push(n))}function F(t){return Ue=5,vt(function(){return{current:t}},[])}function Cn(t,e,n){Ue=6,oe(function(){return typeof t=="function"?(t(e()),function(){return t(null)}):t?(t.current=e(),function(){return t.current=null}):void 0},n==null?n:n.concat(t))}function vt(t,e){var n=xe(ie++,7);return yi(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function Q(t,e){return Ue=8,vt(function(){return t},e)}function ut(t){var e=Y.context[t.__c],n=xe(ie++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(Y)),e.props.value):t.__}function mi(t,e){rt.useDebugValue&&rt.useDebugValue(e?e(t):t)}function Mh(t){var e=xe(ie++,10),n=H();return e.__=t,Y.componentDidCatch||(Y.componentDidCatch=function(r,i){e.__&&e.__(r,i),n[1](r)}),[n[0],function(){n[1](void 0)}]}function $e(){var t=xe(ie++,11);if(!t.__){for(var e=Y.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function Rh(){for(var t;t=Js.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(cr),t.__H.__h.forEach(gi),t.__H.__h=[]}catch(e){t.__H.__h=[],rt.__e(e,t.__v)}}rt.__b=function(t){Y=null,Qs&&Qs(t)},rt.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),ia&&ia(t,e)},rt.__r=function(t){ta&&ta(t),ie=0;var e=(Y=t.__c).__H;e&&(pi===Y?(e.__h=[],Y.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(e.__h.forEach(cr),e.__h.forEach(gi),e.__h=[],ie=0)),pi=Y},rt.diffed=function(t){ea&&ea(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Js.push(e)!==1&&Zs===rt.requestAnimationFrame||((Zs=rt.requestAnimationFrame)||Nh)(Rh)),e.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),pi=Y=null},rt.__c=function(t,e){e.some(function(n){try{n.__h.forEach(cr),n.__h=n.__h.filter(function(r){return!r.__||gi(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],rt.__e(r,n.__v)}}),na&&na(t,e)},rt.unmount=function(t){ra&&ra(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{cr(r)}catch(i){e=i}}),n.__H=void 0,e&&rt.__e(e,n.__v))};var oa=typeof requestAnimationFrame=="function";function Nh(t){var e,n=function(){clearTimeout(r),oa&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);oa&&(e=requestAnimationFrame(n))}function cr(t){var e=Y,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),Y=e}function gi(t){var e=Y;t.__c=t.__(),Y=e}function yi(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}function sa(t,e){return typeof e=="function"?e(t):e}function aa(t,e){for(var n in e)t[n]=e[n];return t}function wi(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return!0;for(var r in e)if(r!=="__source"&&t[r]!==e[r])return!0;return!1}function vi(t,e){var n=e(),r=H({t:{__:n,u:e}}),i=r[0].t,o=r[1];return oe(function(){i.__=n,i.u=e,_i(i)&&o({t:i})},[t,n,e]),U(function(){return _i(i)&&o({t:i}),t(function(){_i(i)&&o({t:i})})},[t]),n}function _i(t){var e,n,r=t.u,i=t.__;try{var o=r();return!((e=i)===(n=o)&&(e!==0||1/e==1/n)||e!=e&&n!=n)}catch{return!0}}function xi(t){t()}function bi(t){return t}function Ci(){return[!1,xi]}var En=oe;function lr(t,e){this.props=t,this.context=e}function ca(t,e){function n(i){var o=this.props.ref,s=o==i.ref;return!s&&o&&(o.call?o(null):o.current=null),e?!e(this.props,i)||!s:wi(this.props,i)}function r(i){return this.shouldComponentUpdate=n,L(t,i)}return r.displayName="Memo("+(t.displayName||t.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(lr.prototype=new Rt).isPureReactComponent=!0,lr.prototype.shouldComponentUpdate=function(t,e){return wi(this.props,t)||wi(this.state,e)};var la=$.__b;$.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),la&&la(t)};var Dh=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function he(t){function e(n){var r=aa({},n);return delete r.ref,t(r,n.ref||null)}return e.$$typeof=Dh,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var ua=function(t,e){return t==null?null:re(re(t).map(e))},Ei={map:ua,forEach:ua,count:function(t){return t?re(t).length:0},only:function(t){var e=re(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:re},Bh=$.__e;$.__e=function(t,e,n,r){if(t.then){for(var i,o=e;o=o.__;)if((i=o.__c)&&i.__c)return e.__e==null&&(e.__e=n.__e,e.__k=n.__k),i.__c(t,e)}Bh(t,e,n,r)};var da=$.unmount;function ha(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),t.__c.__H=null),(t=aa({},t)).__c!=null&&(t.__c.__P===n&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map(function(r){return ha(r,e,n)})),t}function fa(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(r){return fa(r,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function Sn(){this.__u=0,this.o=null,this.__b=null}function pa(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function ma(t){var e,n,r;function i(o){if(e||(e=t()).then(function(s){n=s.default||s},function(s){r=s}),r)throw r;if(!n)throw e;return L(n,o)}return i.displayName="Lazy",i.__f=!0,i}function ze(){this.i=null,this.l=null}$.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),da&&da(t)},(Sn.prototype=new Rt).__c=function(t,e){var n=e.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var i=pa(r.__v),o=!1,s=function(){o||(o=!0,n.__R=null,i?i(a):a())};n.__R=s;var a=function(){if(!--r.__u){if(r.state.__a){var u=r.state.__a;r.__v.__k[0]=fa(u,u.__c.__P,u.__c.__O)}var h;for(r.setState({__a:r.__b=null});h=r.o.pop();)h.forceUpdate()}};r.__u++||32&e.__u||r.setState({__a:r.__b=r.__v.__k[0]}),t.then(s,s)},Sn.prototype.componentWillUnmount=function(){this.o=[]},Sn.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=ha(this.__b,n,r.__O=r.__P)}this.__b=null}var i=e.__a&&L(J,null,t.fallback);return i&&(i.__u&=-33),[L(J,null,e.__a?null:t.children),i]};var ga=function(t,e,n){if(++n[1]===n[0]&&t.l.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.l.size))for(n=t.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.i=n=n[2]}};function Lh(t){return this.getChildContext=function(){return t.context},t.children}function Oh(t){var e=this,n=t.h;e.componentWillUnmount=function(){xn(null,e.v),e.v=null,e.h=null},e.h&&e.h!==n&&e.componentWillUnmount(),e.v||(e.h=n,e.v={nodeType:1,parentNode:n,childNodes:[],contains:function(){return!0},appendChild:function(r){this.childNodes.push(r),e.h.appendChild(r)},insertBefore:function(r,i){this.childNodes.push(r),e.h.insertBefore(r,i)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),e.h.removeChild(r)}}),xn(L(Lh,{context:e.context},t.__v),e.v)}function Si(t,e){var n=L(Oh,{__v:t,h:e});return n.containerInfo=e,n}(ze.prototype=new Rt).__a=function(t){var e=this,n=pa(e.__v),r=e.l.get(t);return r[0]++,function(i){var o=function(){e.props.revealOrder?(r.push(i),ga(e,t,r)):i()};n?n(o):o()}},ze.prototype.render=function(t){this.i=null,this.l=new Map;var e=re(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var n=e.length;n--;)this.l.set(e[n],this.i=[1,0,this.i]);return t.children},ze.prototype.componentDidUpdate=ze.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,n){ga(t,n,e)})};var ya=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Fh=/^(?: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]/,Vh=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Uh=/[A-Z0-9]/g,$h=typeof document<"u",zh=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function wa(t,e,n){return e.__k==null&&(e.textContent=""),xn(t,e),typeof n=="function"&&n(),t?t.__c:null}function va(t,e,n){return Xs(t,e),typeof n=="function"&&n(),t?t.__c:null}Rt.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(Rt.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var _a=$.event;function jh(){}function Wh(){return this.cancelBubble}function Hh(){return this.defaultPrevented}$.event=function(t){return _a&&(t=_a(t)),t.persist=jh,t.isPropagationStopped=Wh,t.isDefaultPrevented=Hh,t.nativeEvent=t};var ki,Kh={enumerable:!1,configurable:!0,get:function(){return this.class}},xa=$.vnode;$.vnode=function(t){typeof t.type=="string"&&function(e){var n=e.props,r=e.type,i={},o=r.indexOf("-")===-1;for(var s in n){var a=n[s];if(!(s==="value"&&"defaultValue"in n&&a==null||$h&&s==="children"&&r==="noscript"||s==="class"||s==="className")){var u=s.toLowerCase();s==="defaultValue"&&"value"in n&&n.value==null?s="value":s==="download"&&a===!0?a="":u==="translate"&&a==="no"?a=!1:u[0]==="o"&&u[1]==="n"?u==="ondoubleclick"?s="ondblclick":u!=="onchange"||r!=="input"&&r!=="textarea"||zh(n.type)?u==="onfocus"?s="onfocusin":u==="onblur"?s="onfocusout":Vh.test(s)&&(s=u):u=s="oninput":o&&Fh.test(s)?s=s.replace(Uh,"-$&").toLowerCase():a===null&&(a=void 0),u==="oninput"&&i[s=u]&&(s="oninputCapture"),i[s]=a}}r=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=re(n.children).forEach(function(h){h.props.selected=i.value.indexOf(h.props.value)!=-1})),r=="select"&&i.defaultValue!=null&&(i.value=re(n.children).forEach(function(h){h.props.selected=i.multiple?i.defaultValue.indexOf(h.props.value)!=-1:i.defaultValue==h.props.value})),n.class&&!n.className?(i.class=n.class,Object.defineProperty(i,"className",Kh)):(n.className&&!n.class||n.class&&n.className)&&(i.class=i.className=n.className),e.props=i}(t),t.$$typeof=ya,xa&&xa(t)};var ba=$.__r;$.__r=function(t){ba&&ba(t),ki=t.__c};var Ca=$.diffed;$.diffed=function(t){Ca&&Ca(t);var e=t.props,n=t.__e;n!=null&&t.type==="textarea"&&"value"in e&&e.value!==n.value&&(n.value=e.value==null?"":e.value),ki=null};var Ea={ReactCurrentDispatcher:{current:{readContext:function(t){return ki.__n[t.__c].props.value},useCallback:Q,useContext:ut,useDebugValue:mi,useDeferredValue:bi,useEffect:U,useId:$e,useImperativeHandle:Cn,useInsertionEffect:En,useLayoutEffect:oe,useMemo:vt,useReducer:bn,useRef:F,useState:H,useSyncExternalStore:vi,useTransition:Ci}}},Sa="18.3.1";function ka(t){return L.bind(null,t)}function je(t){return!!t&&t.$$typeof===ya}function Ta(t){return je(t)&&t.type===J}function Aa(t){return!!t&&!!t.displayName&&(typeof t.displayName=="string"||t.displayName instanceof String)&&t.displayName.startsWith("Memo(")}function Ti(t){return je(t)?Ph.apply(null,arguments):t}function Pa(t){return!!t.__k&&(xn(null,t),!0)}function Ia(t){return t&&(t.base||t.nodeType===1&&t)||null}var Ma=function(t,e){return t(e)},Ra=function(t,e){return t(e)},Na=J,Da=je,We={useState:H,useId:$e,useReducer:bn,useEffect:U,useLayoutEffect:oe,useInsertionEffect:En,useTransition:Ci,useDeferredValue:bi,useSyncExternalStore:vi,startTransition:xi,useRef:F,useImperativeHandle:Cn,useMemo:vt,useCallback:Q,useContext:ut,useDebugValue:mi,version:"18.3.1",Children:Ei,render:wa,hydrate:va,unmountComponentAtNode:Pa,createPortal:Si,createElement:L,createContext:kt,createFactory:ka,cloneElement:Ti,createRef:zs,Fragment:J,isValidElement:je,isElement:Da,isFragment:Ta,isMemo:Aa,findDOMNode:Ia,Component:Rt,PureComponent:lr,memo:ca,forwardRef:he,flushSync:Ra,unstable_batchedUpdates:Ma,StrictMode:Na,Suspense:Sn,SuspenseList:ze,lazy:ma,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Ea};const qh=Object.freeze(Object.defineProperty({__proto__:null,Children:Ei,Component:Rt,Fragment:J,PureComponent:lr,StrictMode:Na,Suspense:Sn,SuspenseList:ze,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Ea,cloneElement:Ti,createContext:kt,createElement:L,createFactory:ka,createPortal:Si,createRef:zs,default:We,findDOMNode:Ia,flushSync:Ra,forwardRef:he,hydrate:va,isElement:Da,isFragment:Ta,isMemo:Aa,isValidElement:je,lazy:ma,memo:ca,render:wa,startTransition:xi,unmountComponentAtNode:Pa,unstable_batchedUpdates:Ma,useCallback:Q,useContext:ut,useDebugValue:mi,useDeferredValue:bi,useEffect:U,useErrorBoundary:Mh,useId:$e,useImperativeHandle:Cn,useInsertionEffect:En,useLayoutEffect:oe,useMemo:vt,useReducer:bn,useRef:F,useState:H,useSyncExternalStore:vi,useTransition:Ci,version:Sa},Symbol.toStringTag,{value:"Module"})),Yh='*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,*:before,*:after{border-color:hsl(var(--border))}#deskcord-shadow-container{color:hsl(var(--foreground));font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media (min-width: 1400px){.container{max-width:1400px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.bottom-0{bottom:0}.bottom-full{bottom:100%}.end-0{inset-inline-end:0px}.left-0{left:0}.right-0{right:0}.right-1{right:.25rem}.start-0{inset-inline-start:0px}.top-0{top:0}.top-1{top:.25rem}.top-full{top:100%}.z-20{z-index:20}.m-2{margin:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-\\[3px\\]{margin-top:3px;margin-bottom:3px}.\\!me-1{margin-inline-end:.25rem!important}.\\!me-1\\.5{margin-inline-end:.375rem!important}.\\!ms-auto{margin-inline-start:auto!important}.mb-1{margin-bottom:.25rem}.mb-1\\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.me-11{margin-inline-end:2.75rem}.ml-2{margin-left:.5rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.ms-0\\.5{margin-inline-start:.125rem}.ms-2{margin-inline-start:.5rem}.ms-auto{margin-inline-start:auto}.mt-1{margin-top:.25rem}.mt-1\\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.\\!flex{display:flex!important}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-auto{aspect-ratio:auto}.size-3{width:.75rem;height:.75rem}.size-3\\.5{width:.875rem;height:.875rem}.size-4{width:1rem;height:1rem}.size-5{width:1.25rem;height:1.25rem}.size-6{width:1.5rem;height:1.5rem}.size-8{width:2rem;height:2rem}.size-\\[32px\\]{width:32px;height:32px}.\\!h-2\\.5{height:.625rem!important}.h-1{height:.25rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-32{height:8rem}.h-8{height:2rem}.h-\\[10px\\]{height:10px}.h-\\[33px\\]{height:33px}.h-full{height:100%}.max-h-40{max-height:10rem}.max-h-\\[100px\\]{max-height:100px}.max-h-\\[200px\\]{max-height:200px}.min-h-\\[55px\\]{min-height:55px}.\\!w-2\\.5{width:.625rem!important}.w-1{width:.25rem}.w-10{width:2.5rem}.w-14{width:3.5rem}.w-32{width:8rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-\\[33px\\]{width:33px}.w-\\[40px\\]{width:40px}.w-\\[calc\\(100\\%-2rem\\)\\]{width:calc(100% - 2rem)}.w-auto{width:auto}.w-full{width:100%}.min-w-10{min-width:2.5rem}.max-w-\\[100px\\]{max-width:100px}.max-w-\\[200px\\]{max-width:200px}.max-w-\\[300px\\]{max-width:300px}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.flex-1{flex:1 1 0%}.flex-shrink-0,.shrink-0{flex-shrink:0}.grow{flex-grow:1}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes slide-in{0%{transform:translateY(100%);opacity:0}to{transform:translateY(0);opacity:1}}.animate-slide-in{animation:slide-in .2s ease-out}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.resize{resize:both}.grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-nowrap{flex-wrap:nowrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.\\!justify-between{justify-content:space-between!important}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-\\[3px\\]>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(3px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(3px * var(--tw-space-y-reverse))}.space-y-reverse>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 1}.self-center{align-self:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.\\!rounded-sm{border-radius:calc(var(--radius) - 4px)!important}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-xl{border-radius:.75rem}.rounded-t-lg{border-top-left-radius:var(--radius);border-top-right-radius:var(--radius)}.border{border-width:1px}.border-\\[3px\\]{border-width:3px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-solid{border-style:solid}.\\!border-gray-200{--tw-border-opacity: 1 !important;border-color:rgb(229 231 235 / var(--tw-border-opacity))!important}.border-current{border-color:currentColor}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-t-gray-200{--tw-border-opacity: 1;border-top-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-t-transparent{border-top-color:transparent}.\\!bg-white{--tw-bg-opacity: 1 !important;background-color:rgb(255 255 255 / var(--tw-bg-opacity))!important}.bg-\\[\\#7289DA\\]{--tw-bg-opacity: 1;background-color:rgb(114 137 218 / var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-red-400{--tw-bg-opacity: 1;background-color:rgb(248 113 113 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity))}.bg-teal-400{--tw-bg-opacity: 1;background-color:rgb(45 212 191 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-yellow-400{--tw-bg-opacity: 1;background-color:rgb(250 204 21 / var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity: .5}.bg-opacity-80{--tw-bg-opacity: .8}.fill-black{fill:#000}.object-contain{-o-object-fit:contain;object-fit:contain}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.\\!py-0\\.5{padding-top:.125rem!important;padding-bottom:.125rem!important}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.pr-3{padding-right:.75rem}.ps-11{padding-inline-start:2.75rem}.ps-3\\.5{padding-inline-start:.875rem}.text-left{text-align:left}.text-center{text-align:center}.text-end{text-align:end}.align-bottom{vertical-align:bottom}.\\!text-sm{font-size:.875rem!important;line-height:1.25rem!important}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\\[10px\\]{font-size:10px}.text-\\[12px\\]{font-size:12px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg\\/5{font-size:1.125rem;line-height:1.25rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-sm\\/3{font-size:.875rem;line-height:.75rem}.text-xs,.text-xs\\/4{font-size:.75rem;line-height:1rem}.\\!font-medium{font-weight:500!important}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-slate-50{--tw-text-opacity: 1;color:rgb(248 250 252 / var(--tw-text-opacity))}.text-teal-600{--tw-text-opacity: 1;color:rgb(13 148 136 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity))}.no-underline{text-decoration-line:none}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.placeholder-gray-500::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(107 114 128 / var(--tw-placeholder-opacity))}.placeholder-gray-500::placeholder{--tw-placeholder-opacity: 1;color:rgb(107 114 128 / var(--tw-placeholder-opacity))}.opacity-0{opacity:0}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.\\!shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-white{--tw-ring-opacity: 1;--tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-500{transition-duration:.5s}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.duration-150{animation-duration:.15s}.duration-200{animation-duration:.2s}.duration-500{animation-duration:.5s}.running{animation-play-state:running}:host,#deskcord-shadow-container{overflow-x:hidden;--background: 0 0% 100%;--foreground: 222.2 84% 4.9%;--card: 0 0% 100%;--card-foreground: 222.2 84% 4.9%;--popover: 0 0% 100%;--popover-foreground: 222.2 84% 4.9%;--primary: 222.2 47.4% 11.2%;--primary-foreground: 210 40% 98%;--secondary: 210 40% 96.1%;--secondary-foreground: 222.2 47.4% 11.2%;--muted: 210 40% 96.1%;--muted-foreground: 215.4 16.3% 46.9%;--accent: 210 40% 96.1%;--accent-foreground: 222.2 47.4% 11.2%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 210 40% 98%;--border: 214.3 31.8% 91.4%;--input: 214.3 31.8% 91.4%;--ring: 222.2 84% 4.9%;--radius: .5rem;--chart-1: 12 76% 61%;--chart-2: 173 58% 39%;--chart-3: 197 37% 24%;--chart-4: 43 74% 66%;--chart-5: 27 87% 67%}.dark,:host(.dark) #deskcord-shadow-container{--background: 222.2 84% 4.9%;--foreground: 210 40% 98%;--card: 222.2 84% 4.9%;--card-foreground: 210 40% 98%;--popover: 222.2 84% 4.9%;--popover-foreground: 210 40% 98%;--primary: 210 40% 98%;--primary-foreground: 222.2 47.4% 11.2%;--secondary: 217.2 32.6% 17.5%;--secondary-foreground: 210 40% 98%;--muted: 217.2 32.6% 17.5%;--muted-foreground: 215 20.2% 65.1%;--accent: 217.2 32.6% 17.5%;--accent-foreground: 210 40% 98%;--destructive: 0 62.8% 30.6%;--destructive-foreground: 210 40% 98%;--border: 217.2 32.6% 17.5%;--input: 217.2 32.6% 17.5%;--ring: 212.7 26.8% 83.9%;--chart-1: 220 70% 50%;--chart-2: 160 60% 45%;--chart-3: 30 80% 55%;--chart-4: 280 65% 60%;--chart-5: 340 75% 55%}.hover\\:scale-105:hover{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\\:scale-110:hover{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\\:bg-\\[\\#5B6EAB\\]:hover{--tw-bg-opacity: 1;background-color:rgb(91 110 171 / var(--tw-bg-opacity))}.hover\\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity))}.hover\\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.hover\\:text-blue-500:hover{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.hover\\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.hover\\:text-gray-800:hover{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.hover\\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.hover\\:shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\\:z-10:focus{z-index:10}.focus\\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.focus\\:border-transparent:focus{border-color:transparent}.focus\\:bg-gray-100:focus{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-\\[\\#7289DA\\]:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(114 137 218 / var(--tw-ring-opacity))}.focus\\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}.focus\\:ring-red-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity))}.focus\\:ring-opacity-50:focus{--tw-ring-opacity: .5}.active\\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:transform-none:disabled{transform:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:bg-gray-100:disabled{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.disabled\\:text-gray-500:disabled{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.disabled\\:opacity-50:disabled{opacity:.5}.selected .hs-combo-box-selected\\:block,.selected.hs-combo-box-selected\\:block{display:block}.complete .hs-file-upload-complete\\:bg-green-600,.complete.hs-file-upload-complete\\:bg-green-600{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity))}.dark\\:\\!border-neutral-700:is(.dark *){--tw-border-opacity: 1 !important;border-color:rgb(64 64 64 / var(--tw-border-opacity))!important}.dark\\:border-neutral-600:is(.dark *){--tw-border-opacity: 1;border-color:rgb(82 82 82 / var(--tw-border-opacity))}.dark\\:border-neutral-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(64 64 64 / var(--tw-border-opacity))}.dark\\:\\!bg-neutral-800:is(.dark *){--tw-bg-opacity: 1 !important;background-color:rgb(38 38 38 / var(--tw-bg-opacity))!important}.dark\\:bg-blue-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.dark\\:bg-neutral-700:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(64 64 64 / var(--tw-bg-opacity))}.dark\\:bg-neutral-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}.dark\\:bg-neutral-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(23 23 23 / var(--tw-bg-opacity))}.dark\\:bg-opacity-80:is(.dark *){--tw-bg-opacity: .8}.dark\\:fill-neutral-200:is(.dark *){fill:#e5e5e5}.dark\\:text-blue-500:is(.dark *){--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.dark\\:text-neutral-200:is(.dark *){--tw-text-opacity: 1;color:rgb(229 229 229 / var(--tw-text-opacity))}.dark\\:text-neutral-400:is(.dark *){--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity))}.dark\\:text-neutral-500:is(.dark *){--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity))}.dark\\:text-neutral-600:is(.dark *){--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity))}.dark\\:text-white:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\\:placeholder-neutral-500:is(.dark *)::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(115 115 115 / var(--tw-placeholder-opacity))}.dark\\:placeholder-neutral-500:is(.dark *)::placeholder{--tw-placeholder-opacity: 1;color:rgb(115 115 115 / var(--tw-placeholder-opacity))}.dark\\:ring-neutral-900:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(23 23 23 / var(--tw-ring-opacity))}.dark\\:hover\\:bg-neutral-800:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}.dark\\:hover\\:text-neutral-200:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(229 229 229 / var(--tw-text-opacity))}.dark\\:hover\\:text-neutral-400:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity))}.dark\\:focus\\:bg-neutral-800:focus:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}@media (min-width: 640px){.sm\\:gap-x-4{-moz-column-gap:1rem;column-gap:1rem}}@media (min-width: 768px){.md\\:text-sm{font-size:.875rem;line-height:1.25rem}}',Gh=".yarl__fullsize{height:100%;width:100%}.yarl__relative{position:relative}.yarl__portal{bottom:0;left:0;opacity:0;overflow:hidden;position:fixed;right:0;top:0;transition:opacity var(--yarl__fade_animation_duration,.25s) var(--yarl__fade_animation_timing_function,ease);z-index:var(--yarl__portal_zindex,9999)}.yarl__portal_open{opacity:1}.yarl__container{background-color:var(--yarl__container_background_color,var(--yarl__color_backdrop,#000));bottom:0;left:0;outline:none;overflow:hidden;overscroll-behavior:var(--yarl__controller_overscroll_behavior,contain);position:absolute;right:0;top:0;touch-action:var(--yarl__controller_touch_action,none);-webkit-user-select:none;-moz-user-select:none;user-select:none}.yarl__carousel{align-content:center;align-items:stretch;display:flex;flex:0 0 auto;height:100%;justify-content:center;opacity:var(--yarl__pull_opacity,1);transform:translate(var(--yarl__swipe_offset,0),var(--yarl__pull_offset,0));width:calc(100% + (var(--yarl__carousel_slides_count) - 1)*(100% + var(--yarl__carousel_spacing_px, 0)*1px + var(--yarl__carousel_spacing_percent, 0)*1%))}.yarl__carousel_with_slides{-moz-column-gap:calc(var(--yarl__carousel_spacing_px, 0)*1px + 100/(var(--yarl__carousel_slides_count)*100 + (var(--yarl__carousel_slides_count) - 1)*var(--yarl__carousel_spacing_percent, 0))*var(--yarl__carousel_spacing_percent, 0)*1%);column-gap:calc(var(--yarl__carousel_spacing_px, 0)*1px + 100/(var(--yarl__carousel_slides_count)*100 + (var(--yarl__carousel_slides_count) - 1)*var(--yarl__carousel_spacing_percent, 0))*var(--yarl__carousel_spacing_percent, 0)*1%)}.yarl__flex_center{align-content:center;align-items:center;display:flex;justify-content:center}.yarl__slide{flex:1;overflow:hidden;padding:calc(var(--yarl__carousel_padding_px, 0)*1px + 100/(var(--yarl__carousel_slides_count)*100 + (var(--yarl__carousel_slides_count) - 1)*var(--yarl__carousel_spacing_percent, 0))*var(--yarl__carousel_padding_percent, 0)*1%);position:relative}[dir=rtl] .yarl__slide{--yarl__direction:-1}.yarl__slide_image{max-height:100%;max-width:100%;-o-object-fit:contain;object-fit:contain;touch-action:var(--yarl__controller_touch_action,none);-moz-user-select:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.yarl__slide_image_cover{height:100%;-o-object-fit:cover;object-fit:cover;width:100%}.yarl__slide_image_loading{opacity:0}@media screen and (min-width:800px){.yarl__slide_wrapper:not(.yarl__slide_wrapper_interactive) .yarl__slide_image{-webkit-backface-visibility:hidden;-webkit-transform:translateZ(0);-webkit-transform-style:preserve-3d}}.yarl__slide_placeholder{left:50%;line-height:0;position:absolute;top:50%;transform:translate(-50%) translateY(-50%)}.yarl__slide_loading{animation:yarl__delayed_fadein 1s linear;color:var(--yarl__slide_icon_loading_color,var(--yarl__color_button,hsla(0,0%,100%,.8)))}.yarl__slide_loading line{animation:yarl__stroke_opacity 1s linear infinite}.yarl__slide_loading line:first-of-type{animation-delay:-1.875s}.yarl__slide_loading line:nth-of-type(2){animation-delay:-1.75s}.yarl__slide_loading line:nth-of-type(3){animation-delay:-1.625s}.yarl__slide_loading line:nth-of-type(4){animation-delay:-1.5s}.yarl__slide_loading line:nth-of-type(5){animation-delay:-1.375s}.yarl__slide_loading line:nth-of-type(6){animation-delay:-1.25s}.yarl__slide_loading line:nth-of-type(7){animation-delay:-1.125s}.yarl__slide_loading line:nth-of-type(8){animation-delay:-1s}.yarl__slide_error{color:var(--yarl__slide_icon_error_color,red);height:var(--yarl__slide_icon_error_size,48px);width:var(--yarl__slide_icon_error_size,48px)}@media (prefers-reduced-motion){.yarl__portal,.yarl__slide{transition:unset}.yarl__slide_loading,.yarl__slide_loading line{animation:unset}}.yarl__toolbar{bottom:auto;display:flex;justify-content:flex-end;left:auto;padding:var(--yarl__toolbar_padding,8px);position:absolute;right:0;top:0}[dir=rtl] .yarl__toolbar{bottom:auto;left:0;right:auto;top:0}.yarl__icon{height:var(--yarl__icon_size,32px);width:var(--yarl__icon_size,32px)}.yarl__button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--yarl__button_background_color,transparent);border:var(--yarl__button_border,0);color:var(--yarl__color_button,hsla(0,0%,100%,.8));cursor:pointer;filter:var(--yarl__button_filter,drop-shadow(2px 2px 2px rgba(0,0,0,.8)));line-height:0;margin:var(--yarl__button_margin,0);outline:none;padding:var(--yarl__button_padding,8px);-webkit-tap-highlight-color:transparent}.yarl__button:focus{color:var(--yarl__color_button_active,#fff)}.yarl__button:focus:not(:focus-visible){color:var(--yarl__color_button,hsla(0,0%,100%,.8))}.yarl__button:focus-visible{color:var(--yarl__color_button_active,#fff)}@media (hover:hover){.yarl__button:focus-visible:hover,.yarl__button:focus:hover,.yarl__button:hover{color:var(--yarl__color_button_active,#fff)}}.yarl__button:disabled{color:var(--yarl__color_button_disabled,hsla(0,0%,100%,.4));cursor:default}.yarl__navigation_next,.yarl__navigation_prev{padding:var(--yarl__navigation_button_padding,24px 16px);position:absolute;top:50%;transform:translateY(-50%)}.yarl__navigation_prev{left:0}[dir=rtl] .yarl__navigation_prev{left:unset;right:0;transform:translateY(-50%) rotate(180deg)}.yarl__navigation_next{right:0}[dir=rtl] .yarl__navigation_next{left:0;right:unset;transform:translateY(-50%) rotate(180deg)}.yarl__no_scroll{height:100%;overflow:hidden;overscroll-behavior:none}@keyframes yarl__delayed_fadein{0%{opacity:0}80%{opacity:0}to{opacity:1}}@keyframes yarl__stroke_opacity{0%{stroke-opacity:1}to{stroke-opacity:.125}}",Ai=kt({});function Pi(t){const e=F(null);return e.current===null&&(e.current=t()),e.current}const Ii=typeof window<"u",Ba=Ii?oe:U,ur=kt(null);function Mi(t,e){t.indexOf(e)===-1&&t.push(e)}function Ri(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const se=(t,e,n)=>n>e?e:n<t?t:n;let dr=()=>{};const ae={},La=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function Oa(t){return typeof t=="object"&&t!==null}const Fa=t=>/^0[^.\s]+$/u.test(t);function Ni(t){let e;return()=>(e===void 0&&(e=t()),e)}const Ft=t=>t,Xh=(t,e)=>n=>e(t(n)),kn=(...t)=>t.reduce(Xh),Tn=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r};class Di{constructor(){this.subscriptions=[]}add(e){return Mi(this.subscriptions,e),()=>Ri(this.subscriptions,e)}notify(e,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,r);else for(let o=0;o<i;o++){const s=this.subscriptions[o];s&&s(e,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Gt=t=>t*1e3,Xt=t=>t/1e3;function Va(t,e){return e?t*(1e3/e):0}const Ua=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Zh=1e-7,Jh=12;function Qh(t,e,n,r,i){let o,s,a=0;do s=e+(n-e)/2,o=Ua(s,r,i)-t,o>0?n=s:e=s;while(Math.abs(o)>Zh&&++a<Jh);return s}function An(t,e,n,r){if(t===e&&n===r)return Ft;const i=o=>Qh(o,0,1,t,n);return o=>o===0||o===1?o:Ua(i(o),e,r)}const $a=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,za=t=>e=>1-t(1-e),ja=An(.33,1.53,.69,.99),Bi=za(ja),Wa=$a(Bi),Ha=t=>(t*=2)<1?.5*Bi(t):.5*(2-Math.pow(2,-10*(t-1))),Li=t=>1-Math.sin(Math.acos(t)),Ka=za(Li),qa=$a(Li),tf=An(.42,0,1,1),ef=An(0,0,.58,1),Ya=An(.42,0,.58,1),nf=t=>Array.isArray(t)&&typeof t[0]!="number",Ga=t=>Array.isArray(t)&&typeof t[0]=="number",Xa={linear:Ft,easeIn:tf,easeInOut:Ya,easeOut:ef,circIn:Li,circInOut:qa,circOut:Ka,backIn:Bi,backInOut:Wa,backOut:ja,anticipate:Ha},rf=t=>typeof t=="string",Za=t=>{if(Ga(t)){dr(t.length===4);const[e,n,r,i]=t;return An(e,n,r,i)}else if(rf(t))return dr(Xa[t]!==void 0),Xa[t];return t},hr=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],Ja={value:null,addProjectionMetrics:null};function of(t,e){let n=new Set,r=new Set,i=!1,o=!1;const s=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},u=0;function h(f){s.has(f)&&(c.schedule(f),t()),u++,f(a)}const c={schedule:(f,m=!1,g=!1)=>{const w=g&&i?n:r;return m&&s.add(f),w.has(f)||w.add(f),f},cancel:f=>{r.delete(f),s.delete(f)},process:f=>{if(a=f,i){o=!0;return}i=!0,[n,r]=[r,n],n.forEach(h),e&&Ja.value&&Ja.value.frameloop[e].push(u),u=0,n.clear(),i=!1,o&&(o=!1,c.process(f))}};return c}const sf=40;function Qa(t,e){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=hr.reduce((T,I)=>(T[I]=of(o,e?I:void 0),T),{}),{setup:a,read:u,resolveKeyframes:h,preUpdate:c,update:f,preRender:m,render:g,postRender:v}=s,w=()=>{const T=ae.useManualTiming?i.timestamp:performance.now();n=!1,ae.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(T-i.timestamp,sf),1)),i.timestamp=T,i.isProcessing=!0,a.process(i),u.process(i),h.process(i),c.process(i),f.process(i),m.process(i),g.process(i),v.process(i),i.isProcessing=!1,n&&e&&(r=!1,t(w))},E=()=>{n=!0,r=!0,i.isProcessing||t(w)};return{schedule:hr.reduce((T,I)=>{const k=s[I];return T[I]=(R,N=!1,P=!1)=>(n||E(),k.schedule(R,N,P)),T},{}),cancel:T=>{for(let I=0;I<hr.length;I++)s[hr[I]].cancel(T)},state:i,steps:s}}const{schedule:tt,cancel:fe,state:Ct,steps:Oi}=Qa(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ft,!0);let fr;function af(){fr=void 0}const Pt={now:()=>(fr===void 0&&Pt.set(Ct.isProcessing||ae.useManualTiming?Ct.timestamp:performance.now()),fr),set:t=>{fr=t,queueMicrotask(af)}},tc=t=>e=>typeof e=="string"&&e.startsWith(t),Fi=tc("--"),cf=tc("var(--"),Vi=t=>cf(t)?lf.test(t.split("/*")[0].trim()):!1,lf=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,He={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Pn={...He,transform:t=>se(0,1,t)},pr={...He,default:1},In=t=>Math.round(t*1e5)/1e5,Ui=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function uf(t){return t==null}const df=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,$i=(t,e)=>n=>!!(typeof n=="string"&&df.test(n)&&n.startsWith(t)||e&&!uf(n)&&Object.prototype.hasOwnProperty.call(n,e)),ec=(t,e,n)=>r=>{if(typeof r!="string")return r;const[i,o,s,a]=r.match(Ui);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},hf=t=>se(0,255,t),zi={...He,transform:t=>Math.round(hf(t))},be={test:$i("rgb","red"),parse:ec("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+zi.transform(t)+", "+zi.transform(e)+", "+zi.transform(n)+", "+In(Pn.transform(r))+")"};function ff(t){let e="",n="",r="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,r+=r,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const ji={test:$i("#"),parse:ff,transform:be.transform},Mn=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),pe=Mn("deg"),Zt=Mn("%"),V=Mn("px"),pf=Mn("vh"),mf=Mn("vw"),nc={...Zt,parse:t=>Zt.parse(t)/100,transform:t=>Zt.transform(t*100)},Ke={test:$i("hsl","hue"),parse:ec("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+Zt.transform(In(e))+", "+Zt.transform(In(n))+", "+In(Pn.transform(r))+")"},pt={test:t=>be.test(t)||ji.test(t)||Ke.test(t),parse:t=>be.test(t)?be.parse(t):Ke.test(t)?Ke.parse(t):ji.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?be.transform(t):Ke.transform(t),getAnimatableNone:t=>{const e=pt.parse(t);return e.alpha=0,pt.transform(e)}},gf=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function yf(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(Ui))==null?void 0:e.length)||0)+(((n=t.match(gf))==null?void 0:n.length)||0)>0}const rc="number",ic="color",wf="var",vf="var(",oc="${}",_f=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Rn(t){const e=t.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(_f,u=>(pt.test(u)?(r.color.push(o),i.push(ic),n.push(pt.parse(u))):u.startsWith(vf)?(r.var.push(o),i.push(wf),n.push(u)):(r.number.push(o),i.push(rc),n.push(parseFloat(u))),++o,oc)).split(oc);return{values:n,split:a,indexes:r,types:i}}function sc(t){return Rn(t).values}function ac(t){const{split:e,types:n}=Rn(t),r=e.length;return i=>{let o="";for(let s=0;s<r;s++)if(o+=e[s],i[s]!==void 0){const a=n[s];a===rc?o+=In(i[s]):a===ic?o+=pt.transform(i[s]):o+=i[s]}return o}}const xf=t=>typeof t=="number"?0:pt.test(t)?pt.getAnimatableNone(t):t;function bf(t){const e=sc(t);return ac(t)(e.map(xf))}const me={test:yf,parse:sc,createTransformer:ac,getAnimatableNone:bf};function Wi(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Cf({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,e/=100,n/=100;let i=0,o=0,s=0;if(!e)i=o=s=n;else{const a=n<.5?n*(1+e):n+e-n*e,u=2*n-a;i=Wi(u,a,t+1/3),o=Wi(u,a,t),s=Wi(u,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}function mr(t,e){return n=>n>0?e:t}const it=(t,e,n)=>t+(e-t)*n,Hi=(t,e,n)=>{const r=t*t,i=n*(e*e-r)+r;return i<0?0:Math.sqrt(i)},Ef=[ji,be,Ke],Sf=t=>Ef.find(e=>e.test(t));function cc(t){const e=Sf(t);if(!e)return!1;let n=e.parse(t);return e===Ke&&(n=Cf(n)),n}const lc=(t,e)=>{const n=cc(t),r=cc(e);if(!n||!r)return mr(t,e);const i={...n};return o=>(i.red=Hi(n.red,r.red,o),i.green=Hi(n.green,r.green,o),i.blue=Hi(n.blue,r.blue,o),i.alpha=it(n.alpha,r.alpha,o),be.transform(i))},Ki=new Set(["none","hidden"]);function kf(t,e){return Ki.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Tf(t,e){return n=>it(t,e,n)}function qi(t){return typeof t=="number"?Tf:typeof t=="string"?Vi(t)?mr:pt.test(t)?lc:If:Array.isArray(t)?uc:typeof t=="object"?pt.test(t)?lc:Af:mr}function uc(t,e){const n=[...t],r=n.length,i=t.map((o,s)=>qi(o)(o,e[s]));return o=>{for(let s=0;s<r;s++)n[s]=i[s](o);return n}}function Af(t,e){const n={...t,...e},r={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(r[i]=qi(t[i])(t[i],e[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}}function Pf(t,e){const n=[],r={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const o=e.types[i],s=t.indexes[o][r[o]],a=t.values[s]??0;n[i]=a,r[o]++}return n}const If=(t,e)=>{const n=me.createTransformer(e),r=Rn(t),i=Rn(e);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Ki.has(t)&&!i.values.length||Ki.has(e)&&!r.values.length?kf(t,e):kn(uc(Pf(r,i),i.values),n):mr(t,e)};function dc(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?it(t,e,n):qi(t)(t,e)}const Mf=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>tt.update(e,n),stop:()=>fe(e),now:()=>Ct.isProcessing?Ct.timestamp:Pt.now()}},hc=(t,e,n=10)=>{let r="";const i=Math.max(Math.round(e/n),2);for(let o=0;o<i;o++)r+=Math.round(t(o/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},gr=2e4;function Yi(t){let e=0;const n=50;let r=t.next(e);for(;!r.done&&e<gr;)e+=n,r=t.next(e);return e>=gr?1/0:e}function Rf(t,e=100,n){const r=n({...t,keyframes:[0,e]}),i=Math.min(Yi(r),gr);return{type:"keyframes",ease:o=>r.next(i*o).value/e,duration:Xt(i)}}const Nf=5;function fc(t,e,n){const r=Math.max(e-Nf,0);return Va(n-t(r),e-r)}const at={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Gi=.001;function Df({duration:t=at.duration,bounce:e=at.bounce,velocity:n=at.velocity,mass:r=at.mass}){let i,o,s=1-e;s=se(at.minDamping,at.maxDamping,s),t=se(at.minDuration,at.maxDuration,Xt(t)),s<1?(i=h=>{const c=h*s,f=c*t,m=c-n,g=Xi(h,s),v=Math.exp(-f);return Gi-m/g*v},o=h=>{const f=h*s*t,m=f*n+n,g=Math.pow(s,2)*Math.pow(h,2)*t,v=Math.exp(-f),w=Xi(Math.pow(h,2),s);return(-i(h)+Gi>0?-1:1)*((m-g)*v)/w}):(i=h=>{const c=Math.exp(-h*t),f=(h-n)*t+1;return-Gi+c*f},o=h=>{const c=Math.exp(-h*t),f=(n-h)*(t*t);return c*f});const a=5/t,u=Lf(i,o,a);if(t=Gt(t),isNaN(u))return{stiffness:at.stiffness,damping:at.damping,duration:t};{const h=Math.pow(u,2)*r;return{stiffness:h,damping:s*2*Math.sqrt(r*h),duration:t}}}const Bf=12;function Lf(t,e,n){let r=n;for(let i=1;i<Bf;i++)r=r-t(r)/e(r);return r}function Xi(t,e){return t*Math.sqrt(1-e*e)}const Of=["duration","bounce"],Ff=["stiffness","damping","mass"];function pc(t,e){return e.some(n=>t[n]!==void 0)}function Vf(t){let e={velocity:at.velocity,stiffness:at.stiffness,damping:at.damping,mass:at.mass,isResolvedFromDuration:!1,...t};if(!pc(t,Ff)&&pc(t,Of))if(t.visualDuration){const n=t.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,o=2*se(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:at.mass,stiffness:i,damping:o}}else{const n=Df(t);e={...e,...n,mass:at.mass},e.isResolvedFromDuration=!0}return e}function yr(t=at.visualDuration,e=at.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:r,restDelta:i}=n;const o=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:u,damping:h,mass:c,duration:f,velocity:m,isResolvedFromDuration:g}=Vf({...n,velocity:-Xt(n.velocity||0)}),v=m||0,w=h/(2*Math.sqrt(u*c)),E=s-o,_=Xt(Math.sqrt(u/c)),C=Math.abs(E)<5;r||(r=C?at.restSpeed.granular:at.restSpeed.default),i||(i=C?at.restDelta.granular:at.restDelta.default);let T;if(w<1){const k=Xi(_,w);T=R=>{const N=Math.exp(-w*_*R);return s-N*((v+w*_*E)/k*Math.sin(k*R)+E*Math.cos(k*R))}}else if(w===1)T=k=>s-Math.exp(-_*k)*(E+(v+_*E)*k);else{const k=_*Math.sqrt(w*w-1);T=R=>{const N=Math.exp(-w*_*R),P=Math.min(k*R,300);return s-N*((v+w*_*E)*Math.sinh(P)+k*E*Math.cosh(P))/k}}const I={calculatedDuration:g&&f||null,next:k=>{const R=T(k);if(g)a.done=k>=f;else{let N=k===0?v:0;w<1&&(N=k===0?Gt(v):fc(T,k,R));const P=Math.abs(N)<=r,M=Math.abs(s-R)<=i;a.done=P&&M}return a.value=a.done?s:R,a},toString:()=>{const k=Math.min(Yi(I),gr),R=hc(N=>I.next(k*N).value,k,30);return k+"ms "+R},toTransition:()=>{}};return I}yr.applyToOptions=t=>{const e=Rf(t,100,yr);return t.ease=e.ease,t.duration=Gt(e.duration),t.type="keyframes",t};function Zi({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:u,restDelta:h=.5,restSpeed:c}){const f=t[0],m={done:!1,value:f},g=P=>a!==void 0&&P<a||u!==void 0&&P>u,v=P=>a===void 0?u:u===void 0||Math.abs(a-P)<Math.abs(u-P)?a:u;let w=n*e;const E=f+w,_=s===void 0?E:s(E);_!==E&&(w=_-f);const C=P=>-w*Math.exp(-P/r),T=P=>_+C(P),I=P=>{const M=C(P),B=T(P);m.done=Math.abs(M)<=h,m.value=m.done?_:B};let k,R;const N=P=>{g(m.value)&&(k=P,R=yr({keyframes:[m.value,v(m.value)],velocity:fc(T,P,m.value),damping:i,stiffness:o,restDelta:h,restSpeed:c}))};return N(0),{calculatedDuration:null,next:P=>{let M=!1;return!R&&k===void 0&&(M=!0,I(P),N(P)),k!==void 0&&P>=k?R.next(P-k):(!M&&I(P),m)}}}function Uf(t,e,n){const r=[],i=n||ae.mix||dc,o=t.length-1;for(let s=0;s<o;s++){let a=i(t[s],t[s+1]);if(e){const u=Array.isArray(e)?e[s]||Ft:e;a=kn(u,a)}r.push(a)}return r}function $f(t,e,{clamp:n=!0,ease:r,mixer:i}={}){const o=t.length;if(dr(o===e.length),o===1)return()=>e[0];if(o===2&&e[0]===e[1])return()=>e[1];const s=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=Uf(e,r,i),u=a.length,h=c=>{if(s&&c<t[0])return e[0];let f=0;if(u>1)for(;f<t.length-2&&!(c<t[f+1]);f++);const m=Tn(t[f],t[f+1],c);return a[f](m)};return n?c=>h(se(t[0],t[o-1],c)):h}function zf(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const i=Tn(0,e,r);t.push(it(n,1,i))}}function jf(t){const e=[0];return zf(e,t.length-1),e}function Wf(t,e){return t.map(n=>n*e)}function Hf(t,e){return t.map(()=>e||Ya).splice(0,t.length-1)}function Nn({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const i=nf(r)?r.map(Za):Za(r),o={done:!1,value:e[0]},s=Wf(n&&n.length===e.length?n:jf(e),t),a=$f(s,e,{ease:Array.isArray(i)?i:Hf(e,i)});return{calculatedDuration:t,next:u=>(o.value=a(u),o.done=u>=t,o)}}const Kf=t=>t!==null;function Ji(t,{repeat:e,repeatType:n="loop"},r,i=1){const o=t.filter(Kf),a=i<0||e&&n!=="loop"&&e%2===1?0:o.length-1;return!a||r===void 0?o[a]:r}const qf={decay:Zi,inertia:Zi,tween:Nn,keyframes:Nn,spring:yr};function mc(t){typeof t.type=="string"&&(t.type=qf[t.type])}class Qi{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const Yf=t=>t/100;class to extends Qi{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,i;const{motionValue:n}=this.options;n&&n.updatedAt!==Pt.now()&&this.tick(Pt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(r=this.options).onStop)==null||i.call(r))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;mc(e);const{type:n=Nn,repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:s=0}=e;let{keyframes:a}=e;const u=n||Nn;u!==Nn&&typeof a[0]!="number"&&(this.mixKeyframes=kn(Yf,dc(a[0],a[1])),a=[0,100]);const h=u({...e,keyframes:a});o==="mirror"&&(this.mirroredGenerator=u({...e,keyframes:[...a].reverse(),velocity:-s})),h.calculatedDuration===null&&(h.calculatedDuration=Yi(h));const{calculatedDuration:c}=h;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=h}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:r,totalDuration:i,mixKeyframes:o,mirroredGenerator:s,resolvedDuration:a,calculatedDuration:u}=this;if(this.startTime===null)return r.next(0);const{delay:h=0,keyframes:c,repeat:f,repeatType:m,repeatDelay:g,type:v,onUpdate:w,finalKeyframe:E}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const _=this.currentTime-h*(this.playbackSpeed>=0?1:-1),C=this.playbackSpeed>=0?_<0:_>i;this.currentTime=Math.max(_,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let T=this.currentTime,I=r;if(f){const P=Math.min(this.currentTime,i)/a;let M=Math.floor(P),B=P%1;!B&&P>=1&&(B=1),B===1&&M--,M=Math.min(M,f+1),!!(M%2)&&(m==="reverse"?(B=1-B,g&&(B-=g/a)):m==="mirror"&&(I=s)),T=se(0,1,B)*a}const k=C?{done:!1,value:c[0]}:I.next(T);o&&(k.value=o(k.value));let{done:R}=k;!C&&u!==null&&(R=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const N=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&R);return N&&v!==Zi&&(k.value=Ji(c,this.options,E,this.speed)),w&&w(k.value),N&&this.finish(),k}then(e,n){return this.finished.then(e,n)}get duration(){return Xt(this.calculatedDuration)}get time(){return Xt(this.currentTime)}set time(e){var n;e=Gt(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(Pt.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=Xt(this.currentTime))}play(){var i,o;if(this.isStopped)return;const{driver:e=Mf,startTime:n}=this.options;this.driver||(this.driver=e(s=>this.tick(s))),(o=(i=this.options).onPlay)==null||o.call(i);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Pt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(e=this.options).onComplete)==null||n.call(e)}cancel(){var e,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(e=this.options).onCancel)==null||n.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),e.observe(this)}}function Gf(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Ce=t=>t*180/Math.PI,eo=t=>{const e=Ce(Math.atan2(t[1],t[0]));return no(e)},Xf={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:eo,rotateZ:eo,skewX:t=>Ce(Math.atan(t[1])),skewY:t=>Ce(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},no=t=>(t=t%360,t<0&&(t+=360),t),gc=eo,yc=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),wc=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Zf={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:yc,scaleY:wc,scale:t=>(yc(t)+wc(t))/2,rotateX:t=>no(Ce(Math.atan2(t[6],t[5]))),rotateY:t=>no(Ce(Math.atan2(-t[2],t[0]))),rotateZ:gc,rotate:gc,skewX:t=>Ce(Math.atan(t[4])),skewY:t=>Ce(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function ro(t){return t.includes("scale")?1:0}function io(t,e){if(!t||t==="none")return ro(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=Zf,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Xf,i=a}if(!i)return ro(e);const o=r[e],s=i[1].split(",").map(Qf);return typeof o=="function"?o(s):s[o]}const Jf=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return io(n,e)};function Qf(t){return parseFloat(t.trim())}const qe=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ye=new Set(qe),vc=t=>t===He||t===V,tp=new Set(["x","y","z"]),ep=qe.filter(t=>!tp.has(t));function np(t){const e=[];return ep.forEach(n=>{const r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e}const Ee={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>io(e,"x"),y:(t,{transform:e})=>io(e,"y")};Ee.translateX=Ee.x,Ee.translateY=Ee.y;const Se=new Set;let oo=!1,so=!1,ao=!1;function _c(){if(so){const t=Array.from(Se).filter(r=>r.needsMeasurement),e=new Set(t.map(r=>r.element)),n=new Map;e.forEach(r=>{const i=np(r);i.length&&(n.set(r,i),r.render())}),t.forEach(r=>r.measureInitialState()),e.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([o,s])=>{var a;(a=r.getValue(o))==null||a.set(s)})}),t.forEach(r=>r.measureEndState()),t.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}so=!1,oo=!1,Se.forEach(t=>t.complete(ao)),Se.clear()}function xc(){Se.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(so=!0)})}function rp(){ao=!0,xc(),_c(),ao=!1}class co{constructor(e,n,r,i,o,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=r,this.motionValue=i,this.element=o,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(Se.add(this),oo||(oo=!0,tt.read(xc),tt.resolveKeyframes(_c))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:r,motionValue:i}=this;if(e[0]===null){const o=i==null?void 0:i.get(),s=e[e.length-1];if(o!==void 0)e[0]=o;else if(r&&n){const a=r.readValue(n,s);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=s),i&&o===void 0&&i.set(e[0])}Gf(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Se.delete(this)}cancel(){this.state==="scheduled"&&(Se.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const ip=t=>t.startsWith("--");function op(t,e,n){ip(e)?t.style.setProperty(e,n):t.style[e]=n}const sp=Ni(()=>window.ScrollTimeline!==void 0),ap={};function cp(t,e){const n=Ni(t);return()=>ap[e]??n()}const bc=cp(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Dn=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,Cc={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Dn([0,.65,.55,1]),circOut:Dn([.55,0,1,.45]),backIn:Dn([.31,.01,.66,-.59]),backOut:Dn([.33,1.53,.69,.99])};function Ec(t,e){if(t)return typeof t=="function"?bc()?hc(t,e):"ease-out":Ga(t)?Dn(t):Array.isArray(t)?t.map(n=>Ec(n,e)||Cc.easeOut):Cc[t]}function lp(t,e,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:s="loop",ease:a="easeOut",times:u}={},h=void 0){const c={[e]:n};u&&(c.offset=u);const f=Ec(a,i);Array.isArray(f)&&(c.easing=f);const m={delay:r,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"};return h&&(m.pseudoElement=h),t.animate(c,m)}function Sc(t){return typeof t=="function"&&"applyToOptions"in t}function up({type:t,...e}){return Sc(t)&&bc()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class dp extends Qi{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:n,name:r,keyframes:i,pseudoElement:o,allowFlatten:s=!1,finalKeyframe:a,onComplete:u}=e;this.isPseudoElement=!!o,this.allowFlatten=s,this.options=e,dr(typeof e.type!="string");const h=up(e);this.animation=lp(n,r,i,h,o),h.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const c=Ji(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):op(n,r,c),this.animation.cancel()}u==null||u(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,n;(n=(e=this.animation).finish)==null||n.call(e)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var e,n;this.isPseudoElement||(n=(e=this.animation).commitStyles)==null||n.call(e)}get duration(){var n,r;const e=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return Xt(Number(e))}get time(){return Xt(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=Gt(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&sp()?(this.animation.timeline=e,Ft):n(this)}}const kc={anticipate:Ha,backInOut:Wa,circInOut:qa};function hp(t){return t in kc}function fp(t){typeof t.ease=="string"&&hp(t.ease)&&(t.ease=kc[t.ease])}const Tc=10;class pp extends dp{constructor(e){fp(e),mc(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:r,onComplete:i,element:o,...s}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new to({...s,autoplay:!1}),u=Gt(this.finishedTime??this.time);n.setWithVelocity(a.sample(u-Tc).value,a.sample(u).value,Tc),a.stop()}}const Ac=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(me.test(t)||t==="0")&&!t.startsWith("url("));function mp(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function gp(t,e,n,r){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const o=t[t.length-1],s=Ac(i,e),a=Ac(o,e);return!s||!a?!1:mp(t)||(n==="spring"||Sc(n))&&r}function lo(t){t.duration=0,t.type}const yp=new Set(["opacity","clipPath","filter","transform"]),wp=Ni(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function vp(t){var c;const{motionValue:e,name:n,repeatDelay:r,repeatType:i,damping:o,type:s}=t;if(!(((c=e==null?void 0:e.owner)==null?void 0:c.current)instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:h}=e.owner.getProps();return wp()&&n&&yp.has(n)&&(n!=="transform"||!h)&&!u&&!r&&i!=="mirror"&&o!==0&&s!=="inertia"}const _p=40;class xp extends Qi{constructor({autoplay:e=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:s="loop",keyframes:a,name:u,motionValue:h,element:c,...f}){var v;super(),this.stop=()=>{var w,E;this._animation&&(this._animation.stop(),(w=this.stopTimeline)==null||w.call(this)),(E=this.keyframeResolver)==null||E.cancel()},this.createdAt=Pt.now();const m={autoplay:e,delay:n,type:r,repeat:i,repeatDelay:o,repeatType:s,name:u,motionValue:h,element:c,...f},g=(c==null?void 0:c.KeyframeResolver)||co;this.keyframeResolver=new g(a,(w,E,_)=>this.onKeyframesResolved(w,E,m,!_),u,h,c),(v=this.keyframeResolver)==null||v.scheduleResolve()}onKeyframesResolved(e,n,r,i){this.keyframeResolver=void 0;const{name:o,type:s,velocity:a,delay:u,isHandoff:h,onUpdate:c}=r;this.resolvedAt=Pt.now(),gp(e,o,s,a)||((ae.instantAnimations||!u)&&(c==null||c(Ji(e,r,n))),e[0]=e[e.length-1],lo(r),r.repeat=0);const m={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>_p?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:e},g=!h&&vp(m)?new pp({...m,element:m.motionValue.owner.current}):new to(m);g.finished.then(()=>this.notifyFinished()).catch(Ft),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),rp()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}const bp=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Cp(t){const e=bp.exec(t);if(!e)return[,];const[,n,r,i]=e;return[`--${n??r}`,i]}function Pc(t,e,n=1){const[r,i]=Cp(t);if(!r)return;const o=window.getComputedStyle(e).getPropertyValue(r);if(o){const s=o.trim();return La(s)?parseFloat(s):s}return Vi(i)?Pc(i,e,n+1):i}function uo(t,e){return(t==null?void 0:t[e])??(t==null?void 0:t.default)??t}const Ic=new Set(["width","height","top","left","right","bottom",...qe]),Ep={test:t=>t==="auto",parse:t=>t},Mc=t=>e=>e.test(t),Rc=[He,V,Zt,pe,mf,pf,Ep],Nc=t=>Rc.find(Mc(t));function Sp(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Fa(t):!0}const kp=new Set(["brightness","contrast","saturate","opacity"]);function Tp(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(Ui)||[];if(!r)return t;const i=n.replace(r,"");let o=kp.has(e)?1:0;return r!==n&&(o*=100),e+"("+o+i+")"}const Ap=/\b([a-z-]*)\(.*?\)/gu,ho={...me,getAnimatableNone:t=>{const e=t.match(Ap);return e?e.map(Tp).join(" "):t}},Dc={...He,transform:Math.round},fo={borderWidth:V,borderTopWidth:V,borderRightWidth:V,borderBottomWidth:V,borderLeftWidth:V,borderRadius:V,radius:V,borderTopLeftRadius:V,borderTopRightRadius:V,borderBottomRightRadius:V,borderBottomLeftRadius:V,width:V,maxWidth:V,height:V,maxHeight:V,top:V,right:V,bottom:V,left:V,padding:V,paddingTop:V,paddingRight:V,paddingBottom:V,paddingLeft:V,margin:V,marginTop:V,marginRight:V,marginBottom:V,marginLeft:V,backgroundPositionX:V,backgroundPositionY:V,...{rotate:pe,rotateX:pe,rotateY:pe,rotateZ:pe,scale:pr,scaleX:pr,scaleY:pr,scaleZ:pr,skew:pe,skewX:pe,skewY:pe,distance:V,translateX:V,translateY:V,translateZ:V,x:V,y:V,z:V,perspective:V,transformPerspective:V,opacity:Pn,originX:nc,originY:nc,originZ:V},zIndex:Dc,fillOpacity:Pn,strokeOpacity:Pn,numOctaves:Dc},Pp={...fo,color:pt,backgroundColor:pt,outlineColor:pt,fill:pt,stroke:pt,borderColor:pt,borderTopColor:pt,borderRightColor:pt,borderBottomColor:pt,borderLeftColor:pt,filter:ho,WebkitFilter:ho},Bc=t=>Pp[t];function Lc(t,e){let n=Bc(t);return n!==ho&&(n=me),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Ip=new Set(["auto","none","0"]);function Mp(t,e,n){let r=0,i;for(;r<t.length&&!i;){const o=t[r];typeof o=="string"&&!Ip.has(o)&&Rn(o).values.length&&(i=t[r]),r++}if(i&&n)for(const o of e)t[o]=Lc(n,i)}class Rp extends co{constructor(e,n,r,i,o){super(e,n,r,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<e.length;u++){let h=e[u];if(typeof h=="string"&&(h=h.trim(),Vi(h))){const c=Pc(h,n.current);c!==void 0&&(e[u]=c),u===e.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!Ic.has(r)||e.length!==2)return;const[i,o]=e,s=Nc(i),a=Nc(o);if(s!==a)if(vc(s)&&vc(a))for(let u=0;u<e.length;u++){const h=e[u];typeof h=="string"&&(e[u]=parseFloat(h))}else Ee[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,r=[];for(let i=0;i<e.length;i++)(e[i]===null||Sp(e[i]))&&r.push(i);r.length&&Mp(e,r,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:r}=this;if(!e||!e.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ee[r](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(r,i).jump(i,!1)}measureEndState(){var a;const{element:e,name:n,unresolvedKeyframes:r}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=r.length-1,s=r[o];r[o]=Ee[n](e.measureViewportBox(),window.getComputedStyle(e.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([u,h])=>{e.getValue(u).set(h)}),this.resolveNoneKeyframes()}}function Np(t,e,n){if(t instanceof EventTarget)return[t];if(typeof t=="string"){const i=document.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}const Oc=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function Fc(t){return Oa(t)&&"offsetHeight"in t}const Vc=30,Dp=t=>!isNaN(parseFloat(t));class Bp{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var o;const i=Pt.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const s of this.dependents)s.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=Pt.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Dp(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Di);const r=this.events[e].add(n);return e==="change"?()=>{r(),tt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=Pt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Vc)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Vc);return Va(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var e,n;(e=this.dependents)==null||e.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ge(t,e){return new Bp(t,e)}const{schedule:po,cancel:Yv}=Qa(queueMicrotask,!1),Wt={x:!1,y:!1};function Uc(){return Wt.x||Wt.y}function Lp(t){return t==="x"||t==="y"?Wt[t]?null:(Wt[t]=!0,()=>{Wt[t]=!1}):Wt.x||Wt.y?null:(Wt.x=Wt.y=!0,()=>{Wt.x=Wt.y=!1})}function $c(t,e){const n=Np(t),r=new AbortController,i={passive:!0,...e,signal:r.signal};return[n,i,()=>r.abort()]}function zc(t){return!(t.pointerType==="touch"||Uc())}function Op(t,e,n={}){const[r,i,o]=$c(t,n),s=a=>{if(!zc(a))return;const{target:u}=a,h=e(u,a);if(typeof h!="function"||!u)return;const c=f=>{zc(f)&&(h(f),u.removeEventListener("pointerleave",c))};u.addEventListener("pointerleave",c,i)};return r.forEach(a=>{a.addEventListener("pointerenter",s,i)}),o}const jc=(t,e)=>e?t===e?!0:jc(t,e.parentElement):!1,mo=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Fp=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Vp(t){return Fp.has(t.tagName)||t.tabIndex!==-1}const wr=new WeakSet;function Wc(t){return e=>{e.key==="Enter"&&t(e)}}function go(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Up=(t,e)=>{const n=t.currentTarget;if(!n)return;const r=Wc(()=>{if(wr.has(n))return;go(n,"down");const i=Wc(()=>{go(n,"up")}),o=()=>go(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",o,e)});n.addEventListener("keydown",r,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),e)};function Hc(t){return mo(t)&&!Uc()}function $p(t,e,n={}){const[r,i,o]=$c(t,n),s=a=>{const u=a.currentTarget;if(!Hc(a))return;wr.add(u);const h=e(u,a),c=(g,v)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",m),wr.has(u)&&wr.delete(u),Hc(g)&&typeof h=="function"&&h(g,{success:v})},f=g=>{c(g,u===window||u===document||n.useGlobalTarget||jc(u,g.target))},m=g=>{c(g,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",m,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",s,i),Fc(a)&&(a.addEventListener("focus",h=>Up(h,i)),!Vp(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function Kc(t){return Oa(t)&&"ownerSVGElement"in t}function zp(t){return Kc(t)&&t.tagName==="svg"}const Et=t=>!!(t&&t.getVelocity),jp=[...Rc,pt,me],Wp=t=>jp.find(Mc(t)),yo=kt({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});class Hp extends Rt{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const r=n.offsetParent,i=Fc(r)&&r.offsetWidth||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=i-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Kp({children:t,isPresent:e,anchorX:n,root:r}){const i=$e(),o=F(null),s=F({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=ut(yo);return En(()=>{const{width:u,height:h,top:c,left:f,right:m}=s.current;if(e||!o.current||!u||!h)return;const g=n==="left"?`left: ${f}`:`right: ${m}`;o.current.dataset.motionPopId=i;const v=document.createElement("style");a&&(v.nonce=a);const w=r??document.head;return w.appendChild(v),v.sheet&&v.sheet.insertRule(`
2
2
  [data-motion-pop-id="${i}"] {
3
3
  position: absolute !important;
4
- width: ${l}px !important;
5
- height: ${d}px !important;
6
- ${y}px !important;
4
+ width: ${u}px !important;
5
+ height: ${h}px !important;
6
+ ${g}px !important;
7
7
  top: ${c}px !important;
8
8
  }
9
- `),()=>{_.contains(w)&&_.removeChild(w)}},[e]),T(jg,{isPresent:e,childRef:o,sizeRef:s,children:vo(t,{ref:o})})}const Vg=({children:t,initial:e,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s,anchorX:a,root:l})=>{const d=bo(Ug),c=pn();let h=!0,m=Ht(()=>(h=!1,{id:c,initial:e,isPresent:n,custom:i,onExitComplete:y=>{d.set(y,!0);for(const w of d.values())if(!w)return;r&&r()},register:y=>(d.set(y,!1),()=>d.delete(y))}),[n,d,r]);return o&&h&&(m={...m}),Ht(()=>{d.forEach((y,w)=>d.set(w,!1))},[n]),ut(()=>{!n&&!d.size&&r&&r()},[n]),s==="popLayout"&&(t=T($g,{isPresent:n,anchorX:a,root:l,children:t})),T(Vr.Provider,{value:m,children:t})};function Ug(){return new Map}function Pu(t=!0){const e=Lt(Vr);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=e,o=pn();ut(()=>{if(t)return i(o)},[t]);const s=kt(()=>t&&r&&r(o),[o,r,t]);return!n&&r?[!1,s]:[!0]}const Xr=t=>t.key||"";function ku(t){const e=[];return mo.forEach(t,n=>{yn(n)&&e.push(n)}),e}const cs=({children:t,custom:e,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:o="sync",propagate:s=!1,anchorX:a="left",root:l})=>{const[d,c]=Pu(s),h=Ht(()=>ku(t),[t]),m=s&&!d?[]:h.map(Xr),y=it(!0),w=it(h),_=bo(()=>new Map),[P,x]=gt(h),[v,E]=gt(h);yl(()=>{y.current=!1,w.current=h;for(let j=0;j<v.length;j++){const B=Xr(v[j]);m.includes(B)?_.delete(B):_.get(B)!==!0&&_.set(B,!1)}},[v,m.length,m.join("-")]);const M=[];if(h!==P){let j=[...h];for(let B=0;B<v.length;B++){const L=v[B],F=Xr(L);m.includes(F)||(j.splice(B,0,L),M.push(L))}return o==="wait"&&M.length&&(j=M),E(ku(j)),x(h),null}const{forceRender:O}=Lt(wo);return T(Pt,{children:v.map(j=>{const B=Xr(j),L=s&&!d?!1:h===v||m.includes(B),F=()=>{if(_.has(B))_.set(B,!0);else return;let Y=!0;_.forEach(Z=>{Z||(Y=!1)}),Y&&(O==null||O(),E(w.current),s&&(c==null||c()),r&&r())};return T(Vg,{isPresent:L,initial:!y.current||n?void 0:!1,custom:e,presenceAffectsLayout:i,mode:o,root:l,onExitComplete:L?void 0:F,anchorX:a,children:j},B)})})},Ou=te({strict:!1}),Iu={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Sn={};for(const t in Iu)Sn[t]={isEnabled:e=>Iu[t].some(n=>!!e[n])};function zg(t){for(const e in t)Sn[e]={...Sn[e],...t[e]}}const Wg=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Jr(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Wg.has(t)}let Ru=t=>!Jr(t);function qg(t){typeof t=="function"&&(Ru=e=>e.startsWith("on")?!Jr(e):t(e))}try{qg(require("@emotion/is-prop-valid").default)}catch{}function Hg(t,e,n){const r={};for(const i in t)i==="values"&&typeof t.values=="object"||(Ru(i)||n===!0&&Jr(i)||!e&&!Jr(i)||t.draggable&&i.startsWith("onDrag"))&&(r[i]=t[i]);return r}const Zr=te({});function Qr(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function lr(t){return typeof t=="string"||Array.isArray(t)}const ls=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],us=["initial",...ls];function ti(t){return Qr(t.animate)||us.some(e=>lr(t[e]))}function Mu(t){return!!(ti(t)||t.variants)}function Gg(t,e){if(ti(t)){const{initial:n,animate:r}=t;return{initial:n===!1||lr(n)?n:void 0,animate:lr(r)?r:void 0}}return t.inherit!==!1?e:{}}function Kg(t){const{initial:e,animate:n}=Gg(t,Lt(Zr));return Ht(()=>({initial:e,animate:n}),[Nu(e),Nu(n)])}function Nu(t){return Array.isArray(t)?t.join(" "):t}const ur={};function Yg(t){for(const e in t)ur[e]=t[e],ko(e)&&(ur[e].isCSSVariable=!0)}function Du(t,{layout:e,layoutId:n}){return _n.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!ur[t]||t==="opacity")}const Xg={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Jg=bn.length;function Zg(t,e,n){let r="",i=!0;for(let o=0;o<Jg;o++){const s=bn[o],a=t[s];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(s.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const d=vu(a,rs[s]);if(!l){i=!1;const c=Xg[s]||s;r+=`${c}(${d}) `}n&&(e[s]=d)}}return r=r.trim(),n?r=n(e,i?"":r):i&&(r="none"),r}function fs(t,e,n){const{style:r,vars:i,transformOrigin:o}=t;let s=!1,a=!1;for(const l in e){const d=e[l];if(_n.has(l)){s=!0;continue}else if(ko(l)){i[l]=d;continue}else{const c=vu(d,rs[l]);l.startsWith("origin")?(a=!0,o[l]=c):r[l]=c}}if(e.transform||(s||n?r.transform=Zg(e,t.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:d="50%",originZ:c=0}=o;r.transformOrigin=`${l} ${d} ${c}`}}const ds=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Bu(t,e,n){for(const r in e)!Zt(e[r])&&!Du(r,n)&&(t[r]=e[r])}function Qg({transformTemplate:t},e){return Ht(()=>{const n=ds();return fs(n,e,t),Object.assign({},n.vars,n.style)},[e])}function t0(t,e){const n=t.style||{},r={};return Bu(r,n,t),Object.assign(r,Qg(t,e)),r}function e0(t,e){const n={},r=t0(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=r,n}const n0={offset:"stroke-dashoffset",array:"stroke-dasharray"},r0={offset:"strokeDashoffset",array:"strokeDasharray"};function i0(t,e,n=1,r=0,i=!0){t.pathLength=1;const o=i?n0:r0;t[o.offset]=ot.transform(-r);const s=ot.transform(e),a=ot.transform(n);t[o.array]=`${s} ${a}`}function Lu(t,{attrX:e,attrY:n,attrScale:r,pathLength:i,pathSpacing:o=1,pathOffset:s=0,...a},l,d,c){if(fs(t,a,d),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:m}=t;h.transform&&(m.transform=h.transform,delete h.transform),(m.transform||h.transformOrigin)&&(m.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),m.transform&&(m.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete h.transformBox),e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),i!==void 0&&i0(h,i,o,s,!1)}const Fu=()=>({...ds(),attrs:{}}),ju=t=>typeof t=="string"&&t.toLowerCase()==="svg";function o0(t,e,n,r){const i=Ht(()=>{const o=Fu();return Lu(o,e,ju(r),t.transformTemplate,t.style),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};Bu(o,t.style,t),i.style={...o,...i.style}}return i}const s0=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function hs(t){return typeof t!="string"||t.includes("-")?!1:!!(s0.indexOf(t)>-1||/[A-Z]/u.test(t))}function a0(t,e,n,{latestValues:r},i,o=!1){const a=(hs(t)?o0:e0)(e,r,i,t),l=Hg(e,typeof t=="string",o),d=t!==Pt?{...l,...a,ref:n}:{},{children:c}=e,h=Ht(()=>Zt(c)?c.get():c,[c]);return et(t,{...d,children:h})}function $u(t){const e=[{},{}];return t==null||t.values.forEach((n,r)=>{e[0][r]=n.get(),e[1][r]=n.getVelocity()}),e}function ps(t,e,n,r){if(typeof e=="function"){const[i,o]=$u(r);e=e(n!==void 0?n:t.custom,i,o)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,o]=$u(r);e=e(n!==void 0?n:t.custom,i,o)}return e}function ei(t){return Zt(t)?t.get():t}function c0({scrapeMotionValuesFromProps:t,createRenderState:e},n,r,i){return{latestValues:l0(n,r,i,t),renderState:e()}}function l0(t,e,n,r){const i={},o=r(t,{});for(const m in o)i[m]=ei(o[m]);let{initial:s,animate:a}=t;const l=ti(t),d=Mu(t);e&&d&&!l&&t.inherit!==!1&&(s===void 0&&(s=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||s===!1;const h=c?a:s;if(h&&typeof h!="boolean"&&!Qr(h)){const m=Array.isArray(h)?h:[h];for(let y=0;y<m.length;y++){const w=ps(t,m[y]);if(w){const{transitionEnd:_,transition:P,...x}=w;for(const v in x){let E=x[v];if(Array.isArray(E)){const M=c?E.length-1:0;E=E[M]}E!==null&&(i[v]=E)}for(const v in _)i[v]=_[v]}}}return i}const Vu=t=>(e,n)=>{const r=Lt(Zr),i=Lt(Vr),o=()=>c0(t,e,r,i);return n?o():bo(o)};function ms(t,e,n){var o;const{style:r}=t,i={};for(const s in r)(Zt(r[s])||e.style&&Zt(e.style[s])||Du(s,t)||((o=n==null?void 0:n.getValue(s))==null?void 0:o.liveStyle)!==void 0)&&(i[s]=r[s]);return i}const u0=Vu({scrapeMotionValuesFromProps:ms,createRenderState:ds});function Uu(t,e,n){const r=ms(t,e,n);for(const i in t)if(Zt(t[i])||Zt(e[i])){const o=bn.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=t[i]}return r}const f0=Vu({scrapeMotionValuesFromProps:Uu,createRenderState:Fu}),d0=Symbol.for("motionComponentSymbol");function En(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function h0(t,e,n){return kt(r=>{r&&t.onMount&&t.onMount(r),e&&(r?e.mount(r):e.unmount()),n&&(typeof n=="function"?n(r):En(n)&&(n.current=r))},[e])}const ys=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),zu="data-"+ys("framerAppearId"),Wu=te({});function p0(t,e,n,r,i){var _,P;const{visualElement:o}=Lt(Zr),s=Lt(Ou),a=Lt(Vr),l=Lt(as).reducedMotion,d=it(null);r=r||s.renderer,!d.current&&r&&(d.current=r(t,{visualState:e,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const c=d.current,h=Lt(Wu);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&m0(d.current,n,i,h);const m=it(!1);Zn(()=>{c&&m.current&&c.update(n,a)});const y=n[zu],w=it(!!y&&!((_=window.MotionHandoffIsComplete)!=null&&_.call(window,y))&&((P=window.MotionHasOptimisedAnimation)==null?void 0:P.call(window,y)));return yl(()=>{c&&(m.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),w.current&&c.animationState&&c.animationState.animateChanges())}),ut(()=>{c&&(!w.current&&c.animationState&&c.animationState.animateChanges(),w.current&&(queueMicrotask(()=>{var x;(x=window.MotionHandoffMarkAsComplete)==null||x.call(window,y)}),w.current=!1),c.enteringChildren=void 0)}),c}function m0(t,e,n,r){const{layoutId:i,layout:o,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:d,layoutCrossfade:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:qu(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!s||a&&En(a),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:c,layoutScroll:l,layoutRoot:d})}function qu(t){if(t)return t.options.allowProjection!==!1?t.projection:qu(t.parent)}function gs(t,{forwardMotionProps:e=!1}={},n,r){n&&zg(n);const i=hs(t)?f0:u0;function o(a,l){let d;const c={...Lt(as),...a,layoutId:y0(a)},{isStatic:h}=c,m=Kg(a),y=i(a,h);if(!h&&_o){g0();const w=v0(c);d=w.MeasureLayout,m.visualElement=p0(t,y,c,r,w.ProjectionNode)}return T(Zr.Provider,{value:m,children:[d&&m.visualElement?T(d,{visualElement:m.visualElement,...c}):null,a0(t,a,h0(y,m.visualElement,l),y,h,e)]})}o.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const s=$e(o);return s[d0]=t,s}function y0({layoutId:t}){const e=Lt(wo).id;return e&&t!==void 0?e+"-"+t:t}function g0(t,e){Lt(Ou).strict}function v0(t){const{drag:e,layout:n}=Sn;if(!e&&!n)return{};const r={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function w0(t,e){if(typeof Proxy>"u")return gs;const n=new Map,r=(o,s)=>gs(o,s,t,e),i=(o,s)=>r(o,s);return new Proxy(i,{get:(o,s)=>s==="create"?r:(n.has(s)||n.set(s,gs(s,void 0,t,e)),n.get(s))})}function Hu({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function b0({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function _0(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function vs(t){return t===void 0||t===1}function ws({scale:t,scaleX:e,scaleY:n}){return!vs(t)||!vs(e)||!vs(n)}function Je(t){return ws(t)||Gu(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Gu(t){return Ku(t.x)||Ku(t.y)}function Ku(t){return t&&t!=="0%"}function ni(t,e,n){const r=t-n,i=e*r;return n+i}function Yu(t,e,n,r,i){return i!==void 0&&(t=ni(t,i,r)),ni(t,n,r)+e}function bs(t,e=0,n=1,r,i){t.min=Yu(t.min,e,n,r,i),t.max=Yu(t.max,e,n,r,i)}function Xu(t,{x:e,y:n}){bs(t.x,e.translate,e.scale,e.originPoint),bs(t.y,n.translate,n.scale,n.originPoint)}const Ju=.999999999999,Zu=1.0000000000001;function x0(t,e,n,r=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,s;for(let a=0;a<i;a++){o=n[a],s=o.projectionDelta;const{visualElement:l}=o.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Cn(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(e.x*=s.x.scale,e.y*=s.y.scale,Xu(t,s)),r&&Je(o.latestValues)&&Cn(t,o.latestValues))}e.x<Zu&&e.x>Ju&&(e.x=1),e.y<Zu&&e.y>Ju&&(e.y=1)}function An(t,e){t.min=t.min+e,t.max=t.max+e}function Qu(t,e,n,r,i=.5){const o=Mt(t.min,t.max,i);bs(t,e,n,o,r)}function Cn(t,e){Qu(t.x,e.x,e.scaleX,e.scale,e.originX),Qu(t.y,e.y,e.scaleY,e.scale,e.originY)}function tf(t,e){return Hu(_0(t.getBoundingClientRect(),e))}function S0(t,e,n){const r=tf(t,n),{scroll:i}=e;return i&&(An(r.x,i.offset.x),An(r.y,i.offset.y)),r}const ef=()=>({translate:0,scale:1,origin:0,originPoint:0}),Tn=()=>({x:ef(),y:ef()}),nf=()=>({min:0,max:0}),Ft=()=>({x:nf(),y:nf()}),_s={current:null},rf={current:!1};function E0(){if(rf.current=!0,!!_o)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>_s.current=t.matches;t.addEventListener("change",e),e()}else _s.current=!1}const A0=new WeakMap;function C0(t,e,n){for(const r in e){const i=e[r],o=n[r];if(Zt(i))t.addValue(r,i);else if(Zt(o))t.addValue(r,xn(i,{owner:t}));else if(o!==i)if(t.hasValue(r)){const s=t.getValue(r);s.liveStyle===!0?s.jump(i):s.hasAnimated||s.set(i)}else{const s=t.getStaticValue(r);t.addValue(r,xn(s!==void 0?s:i,{owner:t}))}}for(const r in n)e[r]===void 0&&t.removeValue(r);return e}const of=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class T0{scrapeMotionValuesFromProps(e,n,r){return{}}constructor({parent:e,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:o,visualState:s},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Qo,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=ie.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,Ot.render(this.render,!1,!0))};const{latestValues:l,renderState:d}=s;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=d,this.parent=e,this.props=n,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=ti(n),this.isVariantNode=Mu(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in h){const y=h[m];l[m]!==void 0&&Zt(y)&&y.set(l[m])}}mount(e){var n;this.current=e,A0.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,i)=>this.bindToMotionValue(i,r)),rf.current||E0(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:_s.current,(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var e;this.projection&&this.projection.unmount(),Ve(this.notifyUpdate),Ve(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const r=_n.has(e);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",s=>{this.latestValues[e]=s,this.props.onUpdate&&Ot.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),o&&o(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Sn){const n=Sn[e];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[e]&&i&&r(this.props)&&(this.features[e]=new i(this)),this.features[e]){const o=this.features[e];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ft()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<of.length;r++){const i=of[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,s=e[o];s&&(this.propEventSubscriptions[i]=this.on(i,s))}this.prevMotionValues=C0(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const r=this.values.get(e);n!==r&&(r&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return r===void 0&&n!==void 0&&(r=xn(n===null?void 0:n,{owner:this}),this.addValue(e,r)),r}readValue(e,n){let r=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return r!=null&&(typeof r=="string"&&(gl(r)||wl(r))?r=parseFloat(r):!Fg(r)&&ze.test(n)&&(r=gu(e,n)),this.setBaseTarget(e,Zt(r)?r.get():r)),Zt(r)?r.get():r}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var o;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const s=ps(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);s&&(r=s[e])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!Zt(i)?i:this.initialValues[e]!==void 0&&r===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Ao),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){is.render(this.render)}}class sf extends T0{constructor(){super(...arguments),this.KeyframeResolver=Cg}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:r}){delete n[e],delete r[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Zt(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function af(t,{style:e,vars:n},r,i){const o=t.style;let s;for(s in e)o[s]=e[s];i==null||i.applyProjectionStyles(o,r);for(s in n)o.setProperty(s,n[s])}function P0(t){return window.getComputedStyle(t)}class k0 extends sf{constructor(){super(...arguments),this.type="html",this.renderInstance=af}readValueFromInstance(e,n){var r;if(_n.has(n))return(r=this.projection)!=null&&r.isProjecting?Ko(n):Hy(e,n);{const i=P0(e),o=(ko(n)?i.getPropertyValue(n):i[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(e,{transformPagePoint:n}){return tf(e,n)}build(e,n,r){fs(e,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,n,r){return ms(e,n,r)}}const cf=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function O0(t,e,n,r){af(t,e,void 0,r);for(const i in e.attrs)t.setAttribute(cf.has(i)?i:ys(i),e.attrs[i])}class I0 extends sf{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ft}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(_n.has(n)){const r=yu(n);return r&&r.default||0}return n=cf.has(n)?n:ys(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,r){return Uu(e,n,r)}build(e,n,r){Lu(e,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(e,n,r,i){O0(e,n,r,i)}mount(e){this.isSVGTag=ju(e.tagName),super.mount(e)}}const R0=(t,e)=>hs(t)?new I0(e):new k0(e,{allowProjection:t!==Pt});function Pn(t,e,n){const r=t.getProps();return ps(r,e,n!==void 0?n:r.custom,t)}const xs=t=>Array.isArray(t);function M0(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,xn(n))}function N0(t){return xs(t)?t[t.length-1]||0:t}function D0(t,e){const n=Pn(t,e);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const s in o){const a=N0(o[s]);M0(t,s,a)}}function B0(t){return!!(Zt(t)&&t.add)}function Ss(t,e){const n=t.getValue("willChange");if(B0(n))return n.add(e);if(!n&&Ne.WillChange){const r=new Ne.WillChange("auto");t.addValue("willChange",r),r.add(e)}}function lf(t){return t.props[zu]}const L0=t=>t!==null;function F0(t,{repeat:e,repeatType:n="loop"},r){const i=t.filter(L0),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return!o||r===void 0?i[o]:r}const j0={type:"spring",stiffness:500,damping:25,restSpeed:10},$0=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),V0={type:"keyframes",duration:.8},U0={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},z0=(t,{keyframes:e})=>e.length>2?V0:_n.has(t)?t.startsWith("scale")?$0(e[1]):j0:U0;function W0({when:t,delay:e,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:a,from:l,elapsed:d,...c}){return!!Object.keys(c).length}const Es=(t,e,n,r={},i,o)=>s=>{const a=es(r,t)||{},l=a.delay||r.delay||0;let{elapsed:d=0}=r;d=d-be(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-d,onUpdate:m=>{e.set(m),a.onUpdate&&a.onUpdate(m)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};W0(a)||Object.assign(c,z0(t,c)),c.duration&&(c.duration=be(c.duration)),c.repeatDelay&&(c.repeatDelay=be(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let h=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(ts(c),c.delay===0&&(h=!0)),(Ne.instantAnimations||Ne.skipAnimations)&&(h=!0,ts(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,h&&!o&&e.get()!==void 0){const m=F0(c.keyframes,a);if(m!==void 0){Ot.update(()=>{c.onUpdate(m),c.onComplete()});return}}return a.isSync?new qo(c):new mg(c)};function q0({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,r}function uf(t,e,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:s,...a}=e;r&&(o=r);const l=[],d=i&&t.animationState&&t.animationState.getState()[i];for(const c in a){const h=t.getValue(c,t.latestValues[c]??null),m=a[c];if(m===void 0||d&&q0(d,c))continue;const y={delay:n,...es(o||{},c)},w=h.get();if(w!==void 0&&!h.isAnimating&&!Array.isArray(m)&&m===w&&!y.velocity)continue;let _=!1;if(window.MotionHandoffAnimation){const x=lf(t);if(x){const v=window.MotionHandoffAnimation(x,c,Ot);v!==null&&(y.startTime=v,_=!0)}}Ss(t,c),h.start(Es(c,h,m,t.shouldReduceMotion&&fu.has(c)?{type:!1}:y,t,_));const P=h.animation;P&&l.push(P)}return s&&Promise.all(l).then(()=>{Ot.update(()=>{s&&D0(t,s)})}),l}function ff(t,e,n,r=0,i=1){const o=Array.from(t).sort((d,c)=>d.sortNodePosition(c)).indexOf(e),s=t.size,a=(s-1)*r;return typeof n=="function"?n(o,s):i===1?o*r:a-o*r}function As(t,e,n={}){var l;const r=Pn(t,e,n.type==="exit"?(l=t.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(uf(t,r,n)):()=>Promise.resolve(),s=t.variantChildren&&t.variantChildren.size?(d=0)=>{const{delayChildren:c=0,staggerChildren:h,staggerDirection:m}=i;return H0(t,e,d,c,h,m,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[d,c]=a==="beforeChildren"?[o,s]:[s,o];return d().then(()=>c())}else return Promise.all([o(),s(n.delay)])}function H0(t,e,n=0,r=0,i=0,o=1,s){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(As(l,e,{...s,delay:n+(typeof r=="function"?0:r)+ff(t.variantChildren,l,r,i,o)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function G0(t,e,n={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){const i=e.map(o=>As(t,o,n));r=Promise.all(i)}else if(typeof e=="string")r=As(t,e,n);else{const i=typeof e=="function"?Pn(t,e,n.custom):e;r=Promise.all(uf(t,i,n))}return r.then(()=>{t.notify("AnimationComplete",e)})}function df(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}const K0=us.length;function hf(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?hf(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<K0;n++){const r=us[n],i=t.props[r];(lr(i)||i===!1)&&(e[r]=i)}return e}const Y0=[...ls].reverse(),X0=ls.length;function J0(t){return e=>Promise.all(e.map(({animation:n,options:r})=>G0(t,n,r)))}function Z0(t){let e=J0(t),n=pf(),r=!0;const i=l=>(d,c)=>{var m;const h=Pn(t,c,l==="exit"?(m=t.presenceContext)==null?void 0:m.custom:void 0);if(h){const{transition:y,transitionEnd:w,..._}=h;d={...d,..._,...w}}return d};function o(l){e=l(t)}function s(l){const{props:d}=t,c=hf(t.parent)||{},h=[],m=new Set;let y={},w=1/0;for(let P=0;P<X0;P++){const x=Y0[P],v=n[x],E=d[x]!==void 0?d[x]:c[x],M=lr(E),O=x===l?v.isActive:null;O===!1&&(w=P);let j=E===c[x]&&E!==d[x]&&M;if(j&&r&&t.manuallyAnimateOnMount&&(j=!1),v.protectedKeys={...y},!v.isActive&&O===null||!E&&!v.prevProp||Qr(E)||typeof E=="boolean")continue;const B=Q0(v.prevProp,E);let L=B||x===l&&v.isActive&&!j&&M||P>w&&M,F=!1;const Y=Array.isArray(E)?E:[E];let Z=Y.reduce(i(x),{});O===!1&&(Z={});const{prevResolvedValues:nt={}}=v,st={...nt,...Z},_t=at=>{L=!0,m.has(at)&&(F=!0,m.delete(at)),v.needsAnimating[at]=!0;const pt=t.getValue(at);pt&&(pt.liveStyle=!1)};for(const at in st){const pt=Z[at],z=nt[at];if(y.hasOwnProperty(at))continue;let H=!1;xs(pt)&&xs(z)?H=!df(pt,z):H=pt!==z,H?pt!=null?_t(at):m.add(at):pt!==void 0&&m.has(at)?_t(at):v.protectedKeys[at]=!0}v.prevProp=E,v.prevResolvedValues=Z,v.isActive&&(y={...y,...Z}),r&&t.blockInitialAnimation&&(L=!1);const dt=j&&B;L&&(!dt||F)&&h.push(...Y.map(at=>{const pt={type:x};if(typeof at=="string"&&r&&!dt&&t.manuallyAnimateOnMount&&t.parent){const{parent:z}=t,H=Pn(z,at);if(z.enteringChildren&&H){const{delayChildren:G}=H.transition||{};pt.delay=ff(z.enteringChildren,t,G)}}return{animation:at,options:pt}}))}if(m.size){const P={};if(typeof d.initial!="boolean"){const x=Pn(t,Array.isArray(d.initial)?d.initial[0]:d.initial);x&&x.transition&&(P.transition=x.transition)}m.forEach(x=>{const v=t.getBaseTarget(x),E=t.getValue(x);E&&(E.liveStyle=!0),P[x]=v??null}),h.push({animation:P})}let _=!!h.length;return r&&(d.initial===!1||d.initial===d.animate)&&!t.manuallyAnimateOnMount&&(_=!1),r=!1,_?e(h):Promise.resolve()}function a(l,d){var h;if(n[l].isActive===d)return Promise.resolve();(h=t.variantChildren)==null||h.forEach(m=>{var y;return(y=m.animationState)==null?void 0:y.setActive(l,d)}),n[l].isActive=d;const c=s(l);for(const m in n)n[m].protectedKeys={};return c}return{animateChanges:s,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=pf(),r=!0}}}function Q0(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!df(e,t):!1}function Ze(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function pf(){return{animate:Ze(!0),whileInView:Ze(),whileHover:Ze(),whileTap:Ze(),whileDrag:Ze(),whileFocus:Ze(),exit:Ze()}}class We{constructor(e){this.isMounted=!1,this.node=e}update(){}}class tv extends We{constructor(e){super(e),e.animationState||(e.animationState=Z0(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Qr(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}}let ev=0;class nv extends We{constructor(){super(...arguments),this.id=ev++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const rv={animation:{Feature:tv},exit:{Feature:nv}};function fr(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}function dr(t){return{point:{x:t.pageX,y:t.pageY}}}const iv=t=>e=>os(e)&&t(e,dr(e));function hr(t,e,n,r){return fr(t,e,iv(n),r)}const mf=1e-4,ov=1-mf,sv=1+mf,yf=.01,av=0-yf,cv=0+yf;function ee(t){return t.max-t.min}function lv(t,e,n){return Math.abs(t-e)<=n}function gf(t,e,n,r=.5){t.origin=r,t.originPoint=Mt(e.min,e.max,t.origin),t.scale=ee(n)/ee(e),t.translate=Mt(n.min,n.max,t.origin)-t.originPoint,(t.scale>=ov&&t.scale<=sv||isNaN(t.scale))&&(t.scale=1),(t.translate>=av&&t.translate<=cv||isNaN(t.translate))&&(t.translate=0)}function pr(t,e,n,r){gf(t.x,e.x,n.x,r?r.originX:void 0),gf(t.y,e.y,n.y,r?r.originY:void 0)}function vf(t,e,n){t.min=n.min+e.min,t.max=t.min+ee(e)}function uv(t,e,n){vf(t.x,e.x,n.x),vf(t.y,e.y,n.y)}function wf(t,e,n){t.min=e.min-n.min,t.max=t.min+ee(e)}function mr(t,e,n){wf(t.x,e.x,n.x),wf(t.y,e.y,n.y)}function fe(t){return[t("x"),t("y")]}const bf=({current:t})=>t?t.ownerDocument.defaultView:null,_f=(t,e)=>Math.abs(t-e);function fv(t,e){const n=_f(t.x,e.x),r=_f(t.y,e.y);return Math.sqrt(n**2+r**2)}class xf{constructor(e,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:s=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=Ts(this.lastMoveEventInfo,this.history),y=this.startEvent!==null,w=fv(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!y&&!w)return;const{point:_}=m,{timestamp:P}=Xt;this.history.push({..._,timestamp:P});const{onStart:x,onMove:v}=this.handlers;y||(x&&x(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,m)},this.handlePointerMove=(m,y)=>{this.lastMoveEvent=m,this.lastMoveEventInfo=Cs(y,this.transformPagePoint),Ot.update(this.updatePoint,!0)},this.handlePointerUp=(m,y)=>{this.end();const{onEnd:w,onSessionEnd:_,resumeAnimation:P}=this.handlers;if(this.dragSnapToOrigin&&P&&P(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=Ts(m.type==="pointercancel"?this.lastMoveEventInfo:Cs(y,this.transformPagePoint),this.history);this.startEvent&&w&&w(m,x),_&&_(m,x)},!os(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=s,this.contextWindow=i||window;const a=dr(e),l=Cs(a,this.transformPagePoint),{point:d}=l,{timestamp:c}=Xt;this.history=[{...d,timestamp:c}];const{onSessionStart:h}=n;h&&h(e,Ts(l,this.history)),this.removeListeners=tr(hr(this.contextWindow,"pointermove",this.handlePointerMove),hr(this.contextWindow,"pointerup",this.handlePointerUp),hr(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Ve(this.updatePoint)}}function Cs(t,e){return e?{point:e(t.point)}:t}function Sf(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Ts({point:t},e){return{point:t,delta:Sf(t,Ef(e)),offset:Sf(t,dv(e)),velocity:hv(e,.1)}}function dv(t){return t[0]}function Ef(t){return t[t.length-1]}function hv(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const i=Ef(t);for(;n>=0&&(r=t[n],!(i.timestamp-r.timestamp>be(e)));)n--;if(!r)return{x:0,y:0};const o=_e(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const s={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function pv(t,{min:e,max:n},r){return e!==void 0&&t<e?t=r?Mt(e,t,r.min):Math.max(t,e):n!==void 0&&t>n&&(t=r?Mt(n,t,r.max):Math.min(t,n)),t}function Af(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function mv(t,{top:e,left:n,bottom:r,right:i}){return{x:Af(t.x,n,i),y:Af(t.y,e,r)}}function Cf(t,e){let n=e.min-t.min,r=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,r]=[r,n]),{min:n,max:r}}function yv(t,e){return{x:Cf(t.x,e.x),y:Cf(t.y,e.y)}}function gv(t,e){let n=.5;const r=ee(t),i=ee(e);return i>r?n=er(e.min,e.max-r,t.min):r>i&&(n=er(t.min,t.max-i,e.min)),Me(0,1,n)}function vv(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Ps=.35;function wv(t=Ps){return t===!1?t=0:t===!0&&(t=Ps),{x:Tf(t,"left","right"),y:Tf(t,"top","bottom")}}function Tf(t,e,n){return{min:Pf(t,e),max:Pf(t,n)}}function Pf(t,e){return typeof t=="number"?t:t[e]||0}const bv=new WeakMap;class _v{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ft(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=h=>{const{dragSnapToOrigin:m}=this.getProps();m?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(dr(h).point)},s=(h,m)=>{const{drag:y,dragPropagation:w,onDragStart:_}=this.getProps();if(y&&!w&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Og(y),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=m,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),fe(x=>{let v=this.getAxisMotionValue(x).get()||0;if(xe.test(v)){const{projection:E}=this.visualElement;if(E&&E.layout){const M=E.layout.layoutBox[x];M&&(v=ee(M)*(parseFloat(v)/100))}}this.originPoint[x]=v}),_&&Ot.postRender(()=>_(h,m)),Ss(this.visualElement,"transform");const{animationState:P}=this.visualElement;P&&P.setActive("whileDrag",!0)},a=(h,m)=>{this.latestPointerEvent=h,this.latestPanInfo=m;const{dragPropagation:y,dragDirectionLock:w,onDirectionLock:_,onDrag:P}=this.getProps();if(!y&&!this.openDragLock)return;const{offset:x}=m;if(w&&this.currentDirection===null){this.currentDirection=xv(x),this.currentDirection!==null&&_&&_(this.currentDirection);return}this.updateAxis("x",m.point,x),this.updateAxis("y",m.point,x),this.visualElement.render(),P&&P(h,m)},l=(h,m)=>{this.latestPointerEvent=h,this.latestPanInfo=m,this.stop(h,m),this.latestPointerEvent=null,this.latestPanInfo=null},d=()=>fe(h=>{var m;return this.getAnimationState(h)==="paused"&&((m=this.getAxisMotionValue(h).animation)==null?void 0:m.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new xf(e,{onSessionStart:o,onStart:s,onMove:a,onSessionEnd:l,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:bf(this.visualElement)})}stop(e,n){const r=e||this.latestPointerEvent,i=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!r)return;const{velocity:s}=i;this.startAnimation(s);const{onDragEnd:a}=this.getProps();a&&Ot.postRender(()=>a(r,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,r){const{drag:i}=this.getProps();if(!r||!ri(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let s=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(s=pv(s,this.constraints[e],this.elastic[e])),o.set(s)}resolveConstraints(){var o;const{dragConstraints:e,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,i=this.constraints;e&&En(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=mv(r.layoutBox,e):this.constraints=!1,this.elastic=wv(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&fe(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=vv(r.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!En(e))return!1;const r=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=S0(r,i.root,this.visualElement.getTransformPagePoint());let s=yv(i.layout.layoutBox,o);if(n){const a=n(b0(s));this.hasMutatedConstraints=!!a,a&&(s=Hu(a))}return s}startAnimation(e){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},d=fe(c=>{if(!ri(c,n,this.currentDirection))return;let h=l&&l[c]||{};s&&(h={min:0,max:0});const m=i?200:1e6,y=i?40:1e7,w={type:"inertia",velocity:r?e[c]:0,bounceStiffness:m,bounceDamping:y,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(c,w)});return Promise.all(d).then(a)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return Ss(this.visualElement,e),r.start(Es(e,r,0,n,this.visualElement,!1))}stopAnimation(){fe(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){fe(e=>{var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){fe(n=>{const{drag:r}=this.getProps();if(!ri(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:s,max:a}=i.layout.layoutBox[n];o.set(e[n]-Mt(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!En(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};fe(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();i[s]=gv({min:l,max:l},this.constraints[s])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),fe(s=>{if(!ri(s,e,null))return;const a=this.getAxisMotionValue(s),{min:l,max:d}=this.constraints[s];a.set(Mt(l,d,i[s]))})}addListeners(){if(!this.visualElement.current)return;bv.set(this.visualElement,this);const e=this.visualElement.current,n=hr(e,"pointerdown",l=>{const{drag:d,dragListener:c=!0}=this.getProps();d&&c&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();En(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Ot.read(r);const s=fr(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:d})=>{this.isDragging&&d&&(fe(c=>{const h=this.getAxisMotionValue(c);h&&(this.originPoint[c]+=l[c].translate,h.set(h.get()+l[c].translate))}),this.visualElement.render())});return()=>{s(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:s=Ps,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:a}}}function ri(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function xv(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Sv extends We{constructor(e){super(e),this.removeGroupControls=ue,this.removeListeners=ue,this.controls=new _v(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ue}unmount(){this.removeGroupControls(),this.removeListeners()}}const kf=t=>(e,n)=>{t&&Ot.postRender(()=>t(e,n))};class Ev extends We{constructor(){super(...arguments),this.removePointerDownListener=ue}onPointerDown(e){this.session=new xf(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:bf(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:kf(e),onStart:kf(n),onMove:r,onEnd:(o,s)=>{delete this.session,i&&Ot.postRender(()=>i(o,s))}}}mount(){this.removePointerDownListener=hr(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const ii={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Of(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const yr={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(ot.test(t))t=parseFloat(t);else return t;const n=Of(t,e.target.x),r=Of(t,e.target.y);return`${n}% ${r}%`}},Av={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,i=ze.parse(t);if(i.length>5)return r;const o=ze.createTransformer(t),s=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+s]/=a,i[1+s]/=l;const d=Mt(a,l,.5);return typeof i[2+s]=="number"&&(i[2+s]/=d),typeof i[3+s]=="number"&&(i[3+s]/=d),o(i)}};let ks=!1;class Cv extends se{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=e;Yg(Tv),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),ks&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),ii.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,{projection:s}=r;return s&&(s.isPresent=o,ks=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==o?s.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?s.promote():s.relegate()||Ot.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),is.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=e;ks=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function If(t){const[e,n]=Pu(),r=Lt(wo);return T(Cv,{...t,layoutGroup:r,switchLayoutGroup:Lt(Wu),isPresent:e,safeToRemove:n})}const Tv={borderRadius:{...yr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:yr,borderTopRightRadius:yr,borderBottomLeftRadius:yr,borderBottomRightRadius:yr,boxShadow:Av};function Pv(t,e,n){const r=Zt(t)?t:xn(t);return r.start(Es("",r,e,n)),r.animation}const kv=(t,e)=>t.depth-e.depth;class Ov{constructor(){this.children=[],this.isDirty=!1}add(e){xo(this.children,e),this.isDirty=!0}remove(e){So(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(kv),this.isDirty=!1,this.children.forEach(e)}}function Iv(t,e){const n=ie.now(),r=({timestamp:i})=>{const o=i-n;o>=e&&(Ve(r),t(o-e))};return Ot.setup(r,!0),()=>Ve(r)}const Rf=["TopLeft","TopRight","BottomLeft","BottomRight"],Rv=Rf.length,Mf=t=>typeof t=="string"?parseFloat(t):t,Nf=t=>typeof t=="number"||ot.test(t);function Mv(t,e,n,r,i,o){i?(t.opacity=Mt(0,n.opacity??1,Nv(r)),t.opacityExit=Mt(e.opacity??1,0,Dv(r))):o&&(t.opacity=Mt(e.opacity??1,n.opacity??1,r));for(let s=0;s<Rv;s++){const a=`border${Rf[s]}Radius`;let l=Df(e,a),d=Df(n,a);if(l===void 0&&d===void 0)continue;l||(l=0),d||(d=0),l===0||d===0||Nf(l)===Nf(d)?(t[a]=Math.max(Mt(Mf(l),Mf(d),r),0),(xe.test(d)||xe.test(l))&&(t[a]+="%")):t[a]=d}(e.rotate||n.rotate)&&(t.rotate=Mt(e.rotate||0,n.rotate||0,r))}function Df(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Nv=Bf(0,.5,Tl),Dv=Bf(.5,.95,ue);function Bf(t,e,n){return r=>r<t?0:r>e?1:n(er(t,e,r))}function Lf(t,e){t.min=e.min,t.max=e.max}function de(t,e){Lf(t.x,e.x),Lf(t.y,e.y)}function Ff(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function jf(t,e,n,r,i){return t-=e,t=ni(t,1/n,r),i!==void 0&&(t=ni(t,1/i,r)),t}function Bv(t,e=0,n=1,r=.5,i,o=t,s=t){if(xe.test(e)&&(e=parseFloat(e),e=Mt(s.min,s.max,e/100)-s.min),typeof e!="number")return;let a=Mt(o.min,o.max,r);t===o&&(a-=e),t.min=jf(t.min,e,n,a,i),t.max=jf(t.max,e,n,a,i)}function $f(t,e,[n,r,i],o,s){Bv(t,e[n],e[r],e[i],e.scale,o,s)}const Lv=["x","scaleX","originX"],Fv=["y","scaleY","originY"];function Vf(t,e,n,r){$f(t.x,e,Lv,n?n.x:void 0,r?r.x:void 0),$f(t.y,e,Fv,n?n.y:void 0,r?r.y:void 0)}function Uf(t){return t.translate===0&&t.scale===1}function zf(t){return Uf(t.x)&&Uf(t.y)}function Wf(t,e){return t.min===e.min&&t.max===e.max}function jv(t,e){return Wf(t.x,e.x)&&Wf(t.y,e.y)}function qf(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Hf(t,e){return qf(t.x,e.x)&&qf(t.y,e.y)}function Gf(t){return ee(t.x)/ee(t.y)}function Kf(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class $v{constructor(){this.members=[]}add(e){xo(this.members,e),e.scheduleRender()}remove(e){if(So(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(e,n){const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,n&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:r}=e;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Vv(t,e,n){let r="";const i=t.x.translate/e.x,o=t.y.translate/e.y,s=(n==null?void 0:n.z)||0;if((i||o||s)&&(r=`translate3d(${i}px, ${o}px, ${s}px) `),(e.x!==1||e.y!==1)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:d,rotate:c,rotateX:h,rotateY:m,skewX:y,skewY:w}=n;d&&(r=`perspective(${d}px) ${r}`),c&&(r+=`rotate(${c}deg) `),h&&(r+=`rotateX(${h}deg) `),m&&(r+=`rotateY(${m}deg) `),y&&(r+=`skewX(${y}deg) `),w&&(r+=`skewY(${w}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const Os=["","X","Y","Z"],Uv=1e3;let zv=0;function Is(t,e,n,r){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),r&&(r[t]=0))}function Yf(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=lf(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",Ot,!(i||o))}const{parent:r}=t;r&&!r.hasCheckedOptimisedAppear&&Yf(r)}function Xf({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},a=e==null?void 0:e()){this.id=zv++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Hv),this.nodes.forEach(Xv),this.nodes.forEach(Jv),this.nodes.forEach(Gv)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Ov)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Ao),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const l=this.eventHandlers.get(s);l&&l.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=Tu(s)&&!Bg(s),this.instance=s;const{layoutId:a,layout:l,visualElement:d}=this.options;if(d&&!d.current&&d.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let c,h=0;const m=()=>this.root.updateBlockedByResize=!1;Ot.read(()=>{h=window.innerWidth}),t(s,()=>{const y=window.innerWidth;y!==h&&(h=y,this.root.updateBlockedByResize=!0,c&&c(),c=Iv(m,250),ii.hasAnimatedSinceResize&&(ii.hasAnimatedSinceResize=!1,this.nodes.forEach(Qf)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&d&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:h,hasRelativeLayoutChanged:m,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const w=this.options.transition||d.getDefaultTransition()||nw,{onLayoutAnimationStart:_,onLayoutAnimationComplete:P}=d.getProps(),x=!this.targetLayout||!Hf(this.targetLayout,y),v=!h&&m;if(this.options.layoutRoot||this.resumeFrom||v||h&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const E={...es(w,"layout"),onPlay:_,onComplete:P};(d.shouldReduceMotion||this.options.layoutRoot)&&(E.delay=0,E.type=!1),this.startAnimation(E),this.setAnimationOrigin(c,v)}else h||Qf(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=y})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ve(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Zv),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Yf(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const h=this.path[c];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Jf);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Zf);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Yv),this.nodes.forEach(Wv),this.nodes.forEach(qv)):this.nodes.forEach(Zf),this.clearAllSnapshots();const a=ie.now();Xt.delta=Me(0,1e3/60,a-Xt.timestamp),Xt.timestamp=a,Xt.isProcessing=!0,Po.update.process(Xt),Po.preRender.process(Xt),Po.render.process(Xt),Xt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,is.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Kv),this.sharedNodes.forEach(Qv)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ot.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ot.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ee(this.snapshot.measuredBox.x)&&!ee(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Ft(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!zf(this.projectionDelta),l=this.getTransformTemplate(),d=l?l(this.latestValues,""):void 0,c=d!==this.prevTransformTemplateValue;s&&this.instance&&(a||Je(this.latestValues)||c)&&(i(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return s&&(l=this.removeTransform(l)),rw(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var d;const{visualElement:s}=this.options;if(!s)return Ft();const a=s.measureViewportBox();if(!(((d=this.scroll)==null?void 0:d.wasRoot)||this.path.some(iw))){const{scroll:c}=this.root;c&&(An(a.x,c.offset.x),An(a.y,c.offset.y))}return a}removeElementScroll(s){var l;const a=Ft();if(de(a,s),(l=this.scroll)!=null&&l.wasRoot)return a;for(let d=0;d<this.path.length;d++){const c=this.path[d],{scroll:h,options:m}=c;c!==this.root&&h&&m.layoutScroll&&(h.wasRoot&&de(a,s),An(a.x,h.offset.x),An(a.y,h.offset.y))}return a}applyTransform(s,a=!1){const l=Ft();de(l,s);for(let d=0;d<this.path.length;d++){const c=this.path[d];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Cn(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Je(c.latestValues)&&Cn(l,c.latestValues)}return Je(this.latestValues)&&Cn(l,this.latestValues),l}removeTransform(s){const a=Ft();de(a,s);for(let l=0;l<this.path.length;l++){const d=this.path[l];if(!d.instance||!Je(d.latestValues))continue;ws(d.latestValues)&&d.updateSnapshot();const c=Ft(),h=d.measurePageBox();de(c,h),Vf(a,d.latestValues,d.snapshot?d.snapshot.layoutBox:void 0,c)}return Je(this.latestValues)&&Vf(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Xt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var m;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(s||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:h}=this.options;if(!(!this.layout||!(c||h))){if(this.resolvedRelativeTargetAt=Xt.timestamp,!this.targetDelta&&!this.relativeTarget){const y=this.getClosestProjectingParent();y&&y.layout&&this.animationProgress!==1?(this.relativeParent=y,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ft(),this.relativeTargetOrigin=Ft(),mr(this.relativeTargetOrigin,this.layout.layoutBox,y.layout.layoutBox),de(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ft(),this.targetWithTransforms=Ft()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),uv(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):de(this.target,this.layout.layoutBox),Xu(this.target,this.targetDelta)):de(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const y=this.getClosestProjectingParent();y&&!!y.resumingFrom==!!this.resumingFrom&&!y.options.layoutScroll&&y.target&&this.animationProgress!==1?(this.relativeParent=y,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ft(),this.relativeTargetOrigin=Ft(),mr(this.relativeTargetOrigin,this.target,y.target),de(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||ws(this.parent.latestValues)||Gu(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var w;const s=this.getLead(),a=!!this.resumingFrom||this!==s;let l=!0;if((this.isProjectionDirty||(w=this.parent)!=null&&w.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Xt.timestamp&&(l=!1),l)return;const{layout:d,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||c))return;de(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,m=this.treeScale.y;x0(this.layoutCorrected,this.treeScale,this.path,a),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=Ft());const{target:y}=s;if(!y){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ff(this.prevProjectionDelta.x,this.projectionDelta.x),Ff(this.prevProjectionDelta.y,this.projectionDelta.y)),pr(this.projectionDelta,this.layoutCorrected,y,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==m||!Kf(this.projectionDelta.x,this.prevProjectionDelta.x)||!Kf(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",y))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),s){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Tn(),this.projectionDelta=Tn(),this.projectionDeltaWithTransform=Tn()}setAnimationOrigin(s,a=!1){const l=this.snapshot,d=l?l.latestValues:{},c={...this.latestValues},h=Tn();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const m=Ft(),y=l?l.source:void 0,w=this.layout?this.layout.source:void 0,_=y!==w,P=this.getStack(),x=!P||P.members.length<=1,v=!!(_&&!x&&this.options.crossfade===!0&&!this.path.some(ew));this.animationProgress=0;let E;this.mixTargetDelta=M=>{const O=M/1e3;td(h.x,s.x,O),td(h.y,s.y,O),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(mr(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox),tw(this.relativeTarget,this.relativeTargetOrigin,m,O),E&&jv(this.relativeTarget,E)&&(this.isProjectionDirty=!1),E||(E=Ft()),de(E,this.relativeTarget)),_&&(this.animationValues=c,Mv(c,d,this.latestValues,O,v,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=O},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){var a,l,d;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(d=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||d.stop(),this.pendingAnimation&&(Ve(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ot.update(()=>{ii.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=xn(0)),this.currentAnimation=Pv(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),s.onUpdate&&s.onUpdate(c)},onStop:()=>{},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Uv),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:d,latestValues:c}=s;if(!(!a||!l||!d)){if(this!==s&&this.layout&&d&&od(this.options.animationType,this.layout.layoutBox,d.layoutBox)){l=this.target||Ft();const h=ee(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+h;const m=ee(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+m}de(a,l),Cn(a,c),pr(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new $v),this.sharedNodes.get(s).add(a);const d=a.options.initialPromotionConfig;a.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const d=this.getStack();d&&d.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const d={};l.z&&Is("z",s,d,this.animationValues);for(let c=0;c<Os.length;c++)Is(`rotate${Os[c]}`,s,d,this.animationValues),Is(`skew${Os[c]}`,s,d,this.animationValues);s.render();for(const c in d)s.setStaticValue(c,d[c]),this.animationValues&&(this.animationValues[c]=d[c]);s.scheduleRender()}applyProjectionStyles(s,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=ei(a==null?void 0:a.pointerEvents)||"",s.transform=l?l(this.latestValues,""):"none";return}const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){this.options.layoutId&&(s.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,s.pointerEvents=ei(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Je(this.latestValues)&&(s.transform=l?l({},""):"none",this.hasProjected=!1);return}s.visibility="";const c=d.animationValues||d.latestValues;this.applyTransformsToTarget();let h=Vv(this.projectionDeltaWithTransform,this.treeScale,c);l&&(h=l(c,h)),s.transform=h;const{x:m,y}=this.projectionDelta;s.transformOrigin=`${m.origin*100}% ${y.origin*100}% 0`,d.animationValues?s.opacity=d===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:s.opacity=d===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const w in ur){if(c[w]===void 0)continue;const{correct:_,applyTo:P,isCSSVariable:x}=ur[w],v=h==="none"?c[w]:_(c[w],d);if(P){const E=P.length;for(let M=0;M<E;M++)s[P[M]]=v}else x?this.options.visualElement.renderState.vars[w]=v:s[w]=v}this.options.layoutId&&(s.pointerEvents=d===this?ei(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var a;return(a=s.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Jf),this.root.sharedNodes.clear()}}}function Wv(t){t.updateLayout()}function qv(t){var n;const e=((n=t.resumeFrom)==null?void 0:n.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=t.layout,{animationType:o}=t.options,s=e.source!==t.layout.source;o==="size"?fe(h=>{const m=s?e.measuredBox[h]:e.layoutBox[h],y=ee(m);m.min=r[h].min,m.max=m.min+y}):od(o,e.layoutBox,r)&&fe(h=>{const m=s?e.measuredBox[h]:e.layoutBox[h],y=ee(r[h]);m.max=m.min+y,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[h].max=t.relativeTarget[h].min+y)});const a=Tn();pr(a,r,e.layoutBox);const l=Tn();s?pr(l,t.applyTransform(i,!0),e.measuredBox):pr(l,r,e.layoutBox);const d=!zf(a);let c=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:m,layout:y}=h;if(m&&y){const w=Ft();mr(w,e.layoutBox,m.layoutBox);const _=Ft();mr(_,r,y.layoutBox),Hf(w,_)||(c=!0),h.options.layoutRoot&&(t.relativeTarget=_,t.relativeTargetOrigin=w,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:r,snapshot:e,delta:l,layoutDelta:a,hasLayoutChanged:d,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:r}=t.options;r&&r()}t.options.transition=void 0}function Hv(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Gv(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Kv(t){t.clearSnapshot()}function Jf(t){t.clearMeasurements()}function Zf(t){t.isLayoutDirty=!1}function Yv(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Qf(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Xv(t){t.resolveTargetDelta()}function Jv(t){t.calcProjection()}function Zv(t){t.resetSkewAndRotation()}function Qv(t){t.removeLeadSnapshot()}function td(t,e,n){t.translate=Mt(e.translate,0,n),t.scale=Mt(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function ed(t,e,n,r){t.min=Mt(e.min,n.min,r),t.max=Mt(e.max,n.max,r)}function tw(t,e,n,r){ed(t.x,e.x,n.x,r),ed(t.y,e.y,n.y,r)}function ew(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const nw={duration:.45,ease:[.4,0,.1,1]},nd=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),rd=nd("applewebkit/")&&!nd("chrome/")?Math.round:ue;function id(t){t.min=rd(t.min),t.max=rd(t.max)}function rw(t){id(t.x),id(t.y)}function od(t,e,n){return t==="position"||t==="preserve-aspect"&&!lv(Gf(e),Gf(n),.2)}function iw(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const ow=Xf({attachResizeListener:(t,e)=>fr(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Rs={current:void 0},sd=Xf({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Rs.current){const t=new ow({});t.mount(window),t.setOptions({layoutScroll:!0}),Rs.current=t}return Rs.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),sw={pan:{Feature:Ev},drag:{Feature:Sv,ProjectionNode:sd,MeasureLayout:If}};function ad(t,e,n){const{props:r}=t;t.animationState&&r.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=r[i];o&&Ot.postRender(()=>o(e,dr(e)))}class aw extends We{mount(){const{current:e}=this.node;e&&(this.unmount=Ig(e,(n,r)=>(ad(this.node,r,"Start"),i=>ad(this.node,i,"End"))))}unmount(){}}class cw extends We{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=tr(fr(this.node.current,"focus",()=>this.onFocus()),fr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function cd(t,e,n){const{props:r}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&r.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=r[i];o&&Ot.postRender(()=>o(e,dr(e)))}class lw extends We{mount(){const{current:e}=this.node;e&&(this.unmount=Dg(e,(n,r)=>(cd(this.node,r,"Start"),(i,{success:o})=>cd(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Ms=new WeakMap,Ns=new WeakMap,uw=t=>{const e=Ms.get(t.target);e&&e(t)},fw=t=>{t.forEach(uw)};function dw({root:t,...e}){const n=t||document;Ns.has(n)||Ns.set(n,{});const r=Ns.get(n),i=JSON.stringify(e);return r[i]||(r[i]=new IntersectionObserver(fw,{root:t,...e})),r[i]}function hw(t,e,n){const r=dw(e);return Ms.set(t,n),r.observe(t),()=>{Ms.delete(t),r.unobserve(t)}}const pw={some:0,all:1};class mw extends We{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=e,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:pw[i]},a=l=>{const{isIntersecting:d}=l;if(this.isInView===d||(this.isInView=d,o&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:c,onViewportLeave:h}=this.node.getProps(),m=d?c:h;m&&m(l)};return hw(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(yw(e,n))&&this.startObserver()}unmount(){}}function yw({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const gw={...rv,...{inView:{Feature:mw},tap:{Feature:lw},focus:{Feature:cw},hover:{Feature:aw}},...sw,...{layout:{ProjectionNode:sd,MeasureLayout:If}}},De=w0(gw,R0);/**
9
+ `),()=>{w.contains(v)&&w.removeChild(v)}},[e]),x(Hp,{isPresent:e,childRef:o,sizeRef:s,children:Ti(t,{ref:o})})}const qp=({children:t,initial:e,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s,anchorX:a,root:u})=>{const h=Pi(Yp),c=$e();let f=!0,m=vt(()=>(f=!1,{id:c,initial:e,isPresent:n,custom:i,onExitComplete:g=>{h.set(g,!0);for(const v of h.values())if(!v)return;r&&r()},register:g=>(h.set(g,!1),()=>h.delete(g))}),[n,h,r]);return o&&f&&(m={...m}),vt(()=>{h.forEach((g,v)=>h.set(v,!1))},[n]),U(()=>{!n&&!h.size&&r&&r()},[n]),s==="popLayout"&&(t=x(Kp,{isPresent:n,anchorX:a,root:u,children:t})),x(ur.Provider,{value:m,children:t})};function Yp(){return new Map}function qc(t=!0){const e=ut(ur);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=e,o=$e();U(()=>{if(t)return i(o)},[t]);const s=Q(()=>t&&r&&r(o),[o,r,t]);return!n&&r?[!1,s]:[!0]}const vr=t=>t.key||"";function Yc(t){const e=[];return Ei.forEach(t,n=>{je(n)&&e.push(n)}),e}const wo=({children:t,custom:e,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:o="sync",propagate:s=!1,anchorX:a="left",root:u})=>{const[h,c]=qc(s),f=vt(()=>Yc(t),[t]),m=s&&!h?[]:f.map(vr),g=F(!0),v=F(f),w=Pi(()=>new Map),[E,_]=H(f),[C,T]=H(f);Ba(()=>{g.current=!1,v.current=f;for(let R=0;R<C.length;R++){const N=vr(C[R]);m.includes(N)?w.delete(N):w.get(N)!==!0&&w.set(N,!1)}},[C,m.length,m.join("-")]);const I=[];if(f!==E){let R=[...f];for(let N=0;N<C.length;N++){const P=C[N],M=vr(P);m.includes(M)||(R.splice(N,0,P),I.push(P))}return o==="wait"&&I.length&&(R=I),T(Yc(R)),_(f),null}const{forceRender:k}=ut(Ai);return x(J,{children:C.map(R=>{const N=vr(R),P=s&&!h?!1:f===C||m.includes(N),M=()=>{if(w.has(N))w.set(N,!0);else return;let B=!0;w.forEach(O=>{O||(B=!1)}),B&&(k==null||k(),T(v.current),s&&(c==null||c()),r&&r())};return x(qp,{isPresent:P,initial:!g.current||n?void 0:!1,custom:e,presenceAffectsLayout:i,mode:o,root:u,onExitComplete:P?void 0:M,anchorX:a,children:R},N)})})},Gc=kt({strict:!1}),Xc={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Xe={};for(const t in Xc)Xe[t]={isEnabled:e=>Xc[t].some(n=>!!e[n])};function Gp(t){for(const e in t)Xe[e]={...Xe[e],...t[e]}}const Xp=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function _r(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Xp.has(t)}let Zc=t=>!_r(t);function Zp(t){typeof t=="function"&&(Zc=e=>e.startsWith("on")?!_r(e):t(e))}try{Zp(require("@emotion/is-prop-valid").default)}catch{}function Jp(t,e,n){const r={};for(const i in t)i==="values"&&typeof t.values=="object"||(Zc(i)||n===!0&&_r(i)||!e&&!_r(i)||t.draggable&&i.startsWith("onDrag"))&&(r[i]=t[i]);return r}const xr=kt({});function br(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Bn(t){return typeof t=="string"||Array.isArray(t)}const vo=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],_o=["initial",...vo];function Cr(t){return br(t.animate)||_o.some(e=>Bn(t[e]))}function Jc(t){return!!(Cr(t)||t.variants)}function Qp(t,e){if(Cr(t)){const{initial:n,animate:r}=t;return{initial:n===!1||Bn(n)?n:void 0,animate:Bn(r)?r:void 0}}return t.inherit!==!1?e:{}}function tm(t){const{initial:e,animate:n}=Qp(t,ut(xr));return vt(()=>({initial:e,animate:n}),[Qc(e),Qc(n)])}function Qc(t){return Array.isArray(t)?t.join(" "):t}const Ln={};function em(t){for(const e in t)Ln[e]=t[e],Fi(e)&&(Ln[e].isCSSVariable=!0)}function tl(t,{layout:e,layoutId:n}){return Ye.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Ln[t]||t==="opacity")}const nm={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},rm=qe.length;function im(t,e,n){let r="",i=!0;for(let o=0;o<rm;o++){const s=qe[o],a=t[s];if(a===void 0)continue;let u=!0;if(typeof a=="number"?u=a===(s.startsWith("scale")?1:0):u=parseFloat(a)===0,!u||n){const h=Oc(a,fo[s]);if(!u){i=!1;const c=nm[s]||s;r+=`${c}(${h}) `}n&&(e[s]=h)}}return r=r.trim(),n?r=n(e,i?"":r):i&&(r="none"),r}function xo(t,e,n){const{style:r,vars:i,transformOrigin:o}=t;let s=!1,a=!1;for(const u in e){const h=e[u];if(Ye.has(u)){s=!0;continue}else if(Fi(u)){i[u]=h;continue}else{const c=Oc(h,fo[u]);u.startsWith("origin")?(a=!0,o[u]=c):r[u]=c}}if(e.transform||(s||n?r.transform=im(e,t.transform,n):r.transform&&(r.transform="none")),a){const{originX:u="50%",originY:h="50%",originZ:c=0}=o;r.transformOrigin=`${u} ${h} ${c}`}}const bo=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function el(t,e,n){for(const r in e)!Et(e[r])&&!tl(r,n)&&(t[r]=e[r])}function om({transformTemplate:t},e){return vt(()=>{const n=bo();return xo(n,e,t),Object.assign({},n.vars,n.style)},[e])}function sm(t,e){const n=t.style||{},r={};return el(r,n,t),Object.assign(r,om(t,e)),r}function am(t,e){const n={},r=sm(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=r,n}const cm={offset:"stroke-dashoffset",array:"stroke-dasharray"},lm={offset:"strokeDashoffset",array:"strokeDasharray"};function um(t,e,n=1,r=0,i=!0){t.pathLength=1;const o=i?cm:lm;t[o.offset]=V.transform(-r);const s=V.transform(e),a=V.transform(n);t[o.array]=`${s} ${a}`}function nl(t,{attrX:e,attrY:n,attrScale:r,pathLength:i,pathSpacing:o=1,pathOffset:s=0,...a},u,h,c){if(xo(t,a,h),u){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:m}=t;f.transform&&(m.transform=f.transform,delete f.transform),(m.transform||f.transformOrigin)&&(m.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),m.transform&&(m.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete f.transformBox),e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),i!==void 0&&um(f,i,o,s,!1)}const rl=()=>({...bo(),attrs:{}}),il=t=>typeof t=="string"&&t.toLowerCase()==="svg";function dm(t,e,n,r){const i=vt(()=>{const o=rl();return nl(o,e,il(r),t.transformTemplate,t.style),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};el(o,t.style,t),i.style={...o,...i.style}}return i}const hm=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Co(t){return typeof t!="string"||t.includes("-")?!1:!!(hm.indexOf(t)>-1||/[A-Z]/u.test(t))}function fm(t,e,n,{latestValues:r},i,o=!1){const a=(Co(t)?dm:am)(e,r,i,t),u=Jp(e,typeof t=="string",o),h=t!==J?{...u,...a,ref:n}:{},{children:c}=e,f=vt(()=>Et(c)?c.get():c,[c]);return L(t,{...h,children:f})}function ol(t){const e=[{},{}];return t==null||t.values.forEach((n,r)=>{e[0][r]=n.get(),e[1][r]=n.getVelocity()}),e}function Eo(t,e,n,r){if(typeof e=="function"){const[i,o]=ol(r);e=e(n!==void 0?n:t.custom,i,o)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,o]=ol(r);e=e(n!==void 0?n:t.custom,i,o)}return e}function Er(t){return Et(t)?t.get():t}function pm({scrapeMotionValuesFromProps:t,createRenderState:e},n,r,i){return{latestValues:mm(n,r,i,t),renderState:e()}}function mm(t,e,n,r){const i={},o=r(t,{});for(const m in o)i[m]=Er(o[m]);let{initial:s,animate:a}=t;const u=Cr(t),h=Jc(t);e&&h&&!u&&t.inherit!==!1&&(s===void 0&&(s=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||s===!1;const f=c?a:s;if(f&&typeof f!="boolean"&&!br(f)){const m=Array.isArray(f)?f:[f];for(let g=0;g<m.length;g++){const v=Eo(t,m[g]);if(v){const{transitionEnd:w,transition:E,..._}=v;for(const C in _){let T=_[C];if(Array.isArray(T)){const I=c?T.length-1:0;T=T[I]}T!==null&&(i[C]=T)}for(const C in w)i[C]=w[C]}}}return i}const sl=t=>(e,n)=>{const r=ut(xr),i=ut(ur),o=()=>pm(t,e,r,i);return n?o():Pi(o)};function So(t,e,n){var o;const{style:r}=t,i={};for(const s in r)(Et(r[s])||e.style&&Et(e.style[s])||tl(s,t)||((o=n==null?void 0:n.getValue(s))==null?void 0:o.liveStyle)!==void 0)&&(i[s]=r[s]);return i}const gm=sl({scrapeMotionValuesFromProps:So,createRenderState:bo});function al(t,e,n){const r=So(t,e,n);for(const i in t)if(Et(t[i])||Et(e[i])){const o=qe.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=t[i]}return r}const ym=sl({scrapeMotionValuesFromProps:al,createRenderState:rl}),wm=Symbol.for("motionComponentSymbol");function Ze(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function vm(t,e,n){return Q(r=>{r&&t.onMount&&t.onMount(r),e&&(r?e.mount(r):e.unmount()),n&&(typeof n=="function"?n(r):Ze(n)&&(n.current=r))},[e])}const ko=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),cl="data-"+ko("framerAppearId"),ll=kt({});function _m(t,e,n,r,i){var w,E;const{visualElement:o}=ut(xr),s=ut(Gc),a=ut(ur),u=ut(yo).reducedMotion,h=F(null);r=r||s.renderer,!h.current&&r&&(h.current=r(t,{visualState:e,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:u}));const c=h.current,f=ut(ll);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&xm(h.current,n,i,f);const m=F(!1);En(()=>{c&&m.current&&c.update(n,a)});const g=n[cl],v=F(!!g&&!((w=window.MotionHandoffIsComplete)!=null&&w.call(window,g))&&((E=window.MotionHasOptimisedAnimation)==null?void 0:E.call(window,g)));return Ba(()=>{c&&(m.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),v.current&&c.animationState&&c.animationState.animateChanges())}),U(()=>{c&&(!v.current&&c.animationState&&c.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var _;(_=window.MotionHandoffMarkAsComplete)==null||_.call(window,g)}),v.current=!1),c.enteringChildren=void 0)}),c}function xm(t,e,n,r){const{layoutId:i,layout:o,drag:s,dragConstraints:a,layoutScroll:u,layoutRoot:h,layoutCrossfade:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:ul(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!s||a&&Ze(a),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:c,layoutScroll:u,layoutRoot:h})}function ul(t){if(t)return t.options.allowProjection!==!1?t.projection:ul(t.parent)}function To(t,{forwardMotionProps:e=!1}={},n,r){n&&Gp(n);const i=Co(t)?ym:gm;function o(a,u){let h;const c={...ut(yo),...a,layoutId:bm(a)},{isStatic:f}=c,m=tm(a),g=i(a,f);if(!f&&Ii){Cm();const v=Em(c);h=v.MeasureLayout,m.visualElement=_m(t,g,c,r,v.ProjectionNode)}return x(xr.Provider,{value:m,children:[h&&m.visualElement?x(h,{visualElement:m.visualElement,...c}):null,fm(t,a,vm(g,m.visualElement,u),g,f,e)]})}o.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const s=he(o);return s[wm]=t,s}function bm({layoutId:t}){const e=ut(Ai).id;return e&&t!==void 0?e+"-"+t:t}function Cm(t,e){ut(Gc).strict}function Em(t){const{drag:e,layout:n}=Xe;if(!e&&!n)return{};const r={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function Sm(t,e){if(typeof Proxy>"u")return To;const n=new Map,r=(o,s)=>To(o,s,t,e),i=(o,s)=>r(o,s);return new Proxy(i,{get:(o,s)=>s==="create"?r:(n.has(s)||n.set(s,To(s,void 0,t,e)),n.get(s))})}function dl({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function km({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Tm(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Ao(t){return t===void 0||t===1}function Po({scale:t,scaleX:e,scaleY:n}){return!Ao(t)||!Ao(e)||!Ao(n)}function ke(t){return Po(t)||hl(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function hl(t){return fl(t.x)||fl(t.y)}function fl(t){return t&&t!=="0%"}function Sr(t,e,n){const r=t-n,i=e*r;return n+i}function pl(t,e,n,r,i){return i!==void 0&&(t=Sr(t,i,r)),Sr(t,n,r)+e}function Io(t,e=0,n=1,r,i){t.min=pl(t.min,e,n,r,i),t.max=pl(t.max,e,n,r,i)}function ml(t,{x:e,y:n}){Io(t.x,e.translate,e.scale,e.originPoint),Io(t.y,n.translate,n.scale,n.originPoint)}const gl=.999999999999,yl=1.0000000000001;function Am(t,e,n,r=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,s;for(let a=0;a<i;a++){o=n[a],s=o.projectionDelta;const{visualElement:u}=o.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Qe(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(e.x*=s.x.scale,e.y*=s.y.scale,ml(t,s)),r&&ke(o.latestValues)&&Qe(t,o.latestValues))}e.x<yl&&e.x>gl&&(e.x=1),e.y<yl&&e.y>gl&&(e.y=1)}function Je(t,e){t.min=t.min+e,t.max=t.max+e}function wl(t,e,n,r,i=.5){const o=it(t.min,t.max,i);Io(t,e,n,o,r)}function Qe(t,e){wl(t.x,e.x,e.scaleX,e.scale,e.originX),wl(t.y,e.y,e.scaleY,e.scale,e.originY)}function vl(t,e){return dl(Tm(t.getBoundingClientRect(),e))}function Pm(t,e,n){const r=vl(t,n),{scroll:i}=e;return i&&(Je(r.x,i.offset.x),Je(r.y,i.offset.y)),r}const _l=()=>({translate:0,scale:1,origin:0,originPoint:0}),tn=()=>({x:_l(),y:_l()}),xl=()=>({min:0,max:0}),dt=()=>({x:xl(),y:xl()}),Mo={current:null},bl={current:!1};function Im(){if(bl.current=!0,!!Ii)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Mo.current=t.matches;t.addEventListener("change",e),e()}else Mo.current=!1}const Mm=new WeakMap;function Rm(t,e,n){for(const r in e){const i=e[r],o=n[r];if(Et(i))t.addValue(r,i);else if(Et(o))t.addValue(r,Ge(i,{owner:t}));else if(o!==i)if(t.hasValue(r)){const s=t.getValue(r);s.liveStyle===!0?s.jump(i):s.hasAnimated||s.set(i)}else{const s=t.getStaticValue(r);t.addValue(r,Ge(s!==void 0?s:i,{owner:t}))}}for(const r in n)e[r]===void 0&&t.removeValue(r);return e}const Cl=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Nm{scrapeMotionValuesFromProps(e,n,r){return{}}constructor({parent:e,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:o,visualState:s},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=co,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=Pt.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,tt.render(this.render,!1,!0))};const{latestValues:u,renderState:h}=s;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=h,this.parent=e,this.props=n,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=Cr(n),this.isVariantNode=Jc(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in f){const g=f[m];u[m]!==void 0&&Et(g)&&g.set(u[m])}}mount(e){var n;this.current=e,Mm.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,i)=>this.bindToMotionValue(i,r)),bl.current||Im(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Mo.current,(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var e;this.projection&&this.projection.unmount(),fe(this.notifyUpdate),fe(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const r=Ye.has(e);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",s=>{this.latestValues[e]=s,this.props.onUpdate&&tt.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),o&&o(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Xe){const n=Xe[e];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[e]&&i&&r(this.props)&&(this.features[e]=new i(this)),this.features[e]){const o=this.features[e];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):dt()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Cl.length;r++){const i=Cl[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,s=e[o];s&&(this.propEventSubscriptions[i]=this.on(i,s))}this.prevMotionValues=Rm(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const r=this.values.get(e);n!==r&&(r&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return r===void 0&&n!==void 0&&(r=Ge(n===null?void 0:n,{owner:this}),this.addValue(e,r)),r}readValue(e,n){let r=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return r!=null&&(typeof r=="string"&&(La(r)||Fa(r))?r=parseFloat(r):!Wp(r)&&me.test(n)&&(r=Lc(e,n)),this.setBaseTarget(e,Et(r)?r.get():r)),Et(r)?r.get():r}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var o;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const s=Eo(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);s&&(r=s[e])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!Et(i)?i:this.initialValues[e]!==void 0&&r===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Di),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){po.render(this.render)}}class El extends Nm{constructor(){super(...arguments),this.KeyframeResolver=Rp}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:r}){delete n[e],delete r[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Et(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Sl(t,{style:e,vars:n},r,i){const o=t.style;let s;for(s in e)o[s]=e[s];i==null||i.applyProjectionStyles(o,r);for(s in n)o.setProperty(s,n[s])}function Dm(t){return window.getComputedStyle(t)}class Bm extends El{constructor(){super(...arguments),this.type="html",this.renderInstance=Sl}readValueFromInstance(e,n){var r;if(Ye.has(n))return(r=this.projection)!=null&&r.isProjecting?ro(n):Jf(e,n);{const i=Dm(e),o=(Fi(n)?i.getPropertyValue(n):i[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(e,{transformPagePoint:n}){return vl(e,n)}build(e,n,r){xo(e,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,n,r){return So(e,n,r)}}const kl=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Lm(t,e,n,r){Sl(t,e,void 0,r);for(const i in e.attrs)t.setAttribute(kl.has(i)?i:ko(i),e.attrs[i])}class Om extends El{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=dt}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Ye.has(n)){const r=Bc(n);return r&&r.default||0}return n=kl.has(n)?n:ko(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,r){return al(e,n,r)}build(e,n,r){nl(e,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(e,n,r,i){Lm(e,n,r,i)}mount(e){this.isSVGTag=il(e.tagName),super.mount(e)}}const Fm=(t,e)=>Co(t)?new Om(e):new Bm(e,{allowProjection:t!==J});function en(t,e,n){const r=t.getProps();return Eo(r,e,n!==void 0?n:r.custom,t)}const Ro=t=>Array.isArray(t);function Vm(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Ge(n))}function Um(t){return Ro(t)?t[t.length-1]||0:t}function $m(t,e){const n=en(t,e);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const s in o){const a=Um(o[s]);Vm(t,s,a)}}function zm(t){return!!(Et(t)&&t.add)}function No(t,e){const n=t.getValue("willChange");if(zm(n))return n.add(e);if(!n&&ae.WillChange){const r=new ae.WillChange("auto");t.addValue("willChange",r),r.add(e)}}function Tl(t){return t.props[cl]}const jm=t=>t!==null;function Wm(t,{repeat:e,repeatType:n="loop"},r){const i=t.filter(jm),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return!o||r===void 0?i[o]:r}const Hm={type:"spring",stiffness:500,damping:25,restSpeed:10},Km=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),qm={type:"keyframes",duration:.8},Ym={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Gm=(t,{keyframes:e})=>e.length>2?qm:Ye.has(t)?t.startsWith("scale")?Km(e[1]):Hm:Ym;function Xm({when:t,delay:e,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:a,from:u,elapsed:h,...c}){return!!Object.keys(c).length}const Do=(t,e,n,r={},i,o)=>s=>{const a=uo(r,t)||{},u=a.delay||r.delay||0;let{elapsed:h=0}=r;h=h-Gt(u);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-h,onUpdate:m=>{e.set(m),a.onUpdate&&a.onUpdate(m)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};Xm(a)||Object.assign(c,Gm(t,c)),c.duration&&(c.duration=Gt(c.duration)),c.repeatDelay&&(c.repeatDelay=Gt(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let f=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(lo(c),c.delay===0&&(f=!0)),(ae.instantAnimations||ae.skipAnimations)&&(f=!0,lo(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,f&&!o&&e.get()!==void 0){const m=Wm(c.keyframes,a);if(m!==void 0){tt.update(()=>{c.onUpdate(m),c.onComplete()});return}}return a.isSync?new to(c):new xp(c)};function Zm({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,r}function Al(t,e,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:s,...a}=e;r&&(o=r);const u=[],h=i&&t.animationState&&t.animationState.getState()[i];for(const c in a){const f=t.getValue(c,t.latestValues[c]??null),m=a[c];if(m===void 0||h&&Zm(h,c))continue;const g={delay:n,...uo(o||{},c)},v=f.get();if(v!==void 0&&!f.isAnimating&&!Array.isArray(m)&&m===v&&!g.velocity)continue;let w=!1;if(window.MotionHandoffAnimation){const _=Tl(t);if(_){const C=window.MotionHandoffAnimation(_,c,tt);C!==null&&(g.startTime=C,w=!0)}}No(t,c),f.start(Do(c,f,m,t.shouldReduceMotion&&Ic.has(c)?{type:!1}:g,t,w));const E=f.animation;E&&u.push(E)}return s&&Promise.all(u).then(()=>{tt.update(()=>{s&&$m(t,s)})}),u}function Pl(t,e,n,r=0,i=1){const o=Array.from(t).sort((h,c)=>h.sortNodePosition(c)).indexOf(e),s=t.size,a=(s-1)*r;return typeof n=="function"?n(o,s):i===1?o*r:a-o*r}function Bo(t,e,n={}){var u;const r=en(t,e,n.type==="exit"?(u=t.presenceContext)==null?void 0:u.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(Al(t,r,n)):()=>Promise.resolve(),s=t.variantChildren&&t.variantChildren.size?(h=0)=>{const{delayChildren:c=0,staggerChildren:f,staggerDirection:m}=i;return Jm(t,e,h,c,f,m,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[h,c]=a==="beforeChildren"?[o,s]:[s,o];return h().then(()=>c())}else return Promise.all([o(),s(n.delay)])}function Jm(t,e,n=0,r=0,i=0,o=1,s){const a=[];for(const u of t.variantChildren)u.notify("AnimationStart",e),a.push(Bo(u,e,{...s,delay:n+(typeof r=="function"?0:r)+Pl(t.variantChildren,u,r,i,o)}).then(()=>u.notify("AnimationComplete",e)));return Promise.all(a)}function Qm(t,e,n={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){const i=e.map(o=>Bo(t,o,n));r=Promise.all(i)}else if(typeof e=="string")r=Bo(t,e,n);else{const i=typeof e=="function"?en(t,e,n.custom):e;r=Promise.all(Al(t,i,n))}return r.then(()=>{t.notify("AnimationComplete",e)})}function Il(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}const t0=_o.length;function Ml(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Ml(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<t0;n++){const r=_o[n],i=t.props[r];(Bn(i)||i===!1)&&(e[r]=i)}return e}const e0=[...vo].reverse(),n0=vo.length;function r0(t){return e=>Promise.all(e.map(({animation:n,options:r})=>Qm(t,n,r)))}function i0(t){let e=r0(t),n=Rl(),r=!0;const i=u=>(h,c)=>{var m;const f=en(t,c,u==="exit"?(m=t.presenceContext)==null?void 0:m.custom:void 0);if(f){const{transition:g,transitionEnd:v,...w}=f;h={...h,...w,...v}}return h};function o(u){e=u(t)}function s(u){const{props:h}=t,c=Ml(t.parent)||{},f=[],m=new Set;let g={},v=1/0;for(let E=0;E<n0;E++){const _=e0[E],C=n[_],T=h[_]!==void 0?h[_]:c[_],I=Bn(T),k=_===u?C.isActive:null;k===!1&&(v=E);let R=T===c[_]&&T!==h[_]&&I;if(R&&r&&t.manuallyAnimateOnMount&&(R=!1),C.protectedKeys={...g},!C.isActive&&k===null||!T&&!C.prevProp||br(T)||typeof T=="boolean")continue;const N=o0(C.prevProp,T);let P=N||_===u&&C.isActive&&!R&&I||E>v&&I,M=!1;const B=Array.isArray(T)?T:[T];let O=B.reduce(i(_),{});k===!1&&(O={});const{prevResolvedValues:et={}}=C,ht={...et,...O},Mt=K=>{P=!0,m.has(K)&&(M=!0,m.delete(K)),C.needsAnimating[K]=!0;const wt=t.getValue(K);wt&&(wt.liveStyle=!1)};for(const K in ht){const wt=O[K],Lt=et[K];if(g.hasOwnProperty(K))continue;let jt=!1;Ro(wt)&&Ro(Lt)?jt=!Il(wt,Lt):jt=wt!==Lt,jt?wt!=null?Mt(K):m.add(K):wt!==void 0&&m.has(K)?Mt(K):C.protectedKeys[K]=!0}C.prevProp=T,C.prevResolvedValues=O,C.isActive&&(g={...g,...O}),r&&t.blockInitialAnimation&&(P=!1);const G=R&&N;P&&(!G||M)&&f.push(...B.map(K=>{const wt={type:_};if(typeof K=="string"&&r&&!G&&t.manuallyAnimateOnMount&&t.parent){const{parent:Lt}=t,jt=en(Lt,K);if(Lt.enteringChildren&&jt){const{delayChildren:W}=jt.transition||{};wt.delay=Pl(Lt.enteringChildren,t,W)}}return{animation:K,options:wt}}))}if(m.size){const E={};if(typeof h.initial!="boolean"){const _=en(t,Array.isArray(h.initial)?h.initial[0]:h.initial);_&&_.transition&&(E.transition=_.transition)}m.forEach(_=>{const C=t.getBaseTarget(_),T=t.getValue(_);T&&(T.liveStyle=!0),E[_]=C??null}),f.push({animation:E})}let w=!!f.length;return r&&(h.initial===!1||h.initial===h.animate)&&!t.manuallyAnimateOnMount&&(w=!1),r=!1,w?e(f):Promise.resolve()}function a(u,h){var f;if(n[u].isActive===h)return Promise.resolve();(f=t.variantChildren)==null||f.forEach(m=>{var g;return(g=m.animationState)==null?void 0:g.setActive(u,h)}),n[u].isActive=h;const c=s(u);for(const m in n)n[m].protectedKeys={};return c}return{animateChanges:s,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Rl(),r=!0}}}function o0(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Il(e,t):!1}function Te(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Rl(){return{animate:Te(!0),whileInView:Te(),whileHover:Te(),whileTap:Te(),whileDrag:Te(),whileFocus:Te(),exit:Te()}}class ge{constructor(e){this.isMounted=!1,this.node=e}update(){}}class s0 extends ge{constructor(e){super(e),e.animationState||(e.animationState=i0(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();br(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}}let a0=0;class c0 extends ge{constructor(){super(...arguments),this.id=a0++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const l0={animation:{Feature:s0},exit:{Feature:c0}};function On(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}function Fn(t){return{point:{x:t.pageX,y:t.pageY}}}const u0=t=>e=>mo(e)&&t(e,Fn(e));function Vn(t,e,n,r){return On(t,e,u0(n),r)}const Nl=1e-4,d0=1-Nl,h0=1+Nl,Dl=.01,f0=0-Dl,p0=0+Dl;function Tt(t){return t.max-t.min}function m0(t,e,n){return Math.abs(t-e)<=n}function Bl(t,e,n,r=.5){t.origin=r,t.originPoint=it(e.min,e.max,t.origin),t.scale=Tt(n)/Tt(e),t.translate=it(n.min,n.max,t.origin)-t.originPoint,(t.scale>=d0&&t.scale<=h0||isNaN(t.scale))&&(t.scale=1),(t.translate>=f0&&t.translate<=p0||isNaN(t.translate))&&(t.translate=0)}function Un(t,e,n,r){Bl(t.x,e.x,n.x,r?r.originX:void 0),Bl(t.y,e.y,n.y,r?r.originY:void 0)}function Ll(t,e,n){t.min=n.min+e.min,t.max=t.min+Tt(e)}function g0(t,e,n){Ll(t.x,e.x,n.x),Ll(t.y,e.y,n.y)}function Ol(t,e,n){t.min=e.min-n.min,t.max=t.min+Tt(e)}function $n(t,e,n){Ol(t.x,e.x,n.x),Ol(t.y,e.y,n.y)}function Vt(t){return[t("x"),t("y")]}const Fl=({current:t})=>t?t.ownerDocument.defaultView:null,Vl=(t,e)=>Math.abs(t-e);function y0(t,e){const n=Vl(t.x,e.x),r=Vl(t.y,e.y);return Math.sqrt(n**2+r**2)}class Ul{constructor(e,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:s=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=Oo(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,v=y0(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!v)return;const{point:w}=m,{timestamp:E}=Ct;this.history.push({...w,timestamp:E});const{onStart:_,onMove:C}=this.handlers;g||(_&&_(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),C&&C(this.lastMoveEvent,m)},this.handlePointerMove=(m,g)=>{this.lastMoveEvent=m,this.lastMoveEventInfo=Lo(g,this.transformPagePoint),tt.update(this.updatePoint,!0)},this.handlePointerUp=(m,g)=>{this.end();const{onEnd:v,onSessionEnd:w,resumeAnimation:E}=this.handlers;if(this.dragSnapToOrigin&&E&&E(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const _=Oo(m.type==="pointercancel"?this.lastMoveEventInfo:Lo(g,this.transformPagePoint),this.history);this.startEvent&&v&&v(m,_),w&&w(m,_)},!mo(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=s,this.contextWindow=i||window;const a=Fn(e),u=Lo(a,this.transformPagePoint),{point:h}=u,{timestamp:c}=Ct;this.history=[{...h,timestamp:c}];const{onSessionStart:f}=n;f&&f(e,Oo(u,this.history)),this.removeListeners=kn(Vn(this.contextWindow,"pointermove",this.handlePointerMove),Vn(this.contextWindow,"pointerup",this.handlePointerUp),Vn(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),fe(this.updatePoint)}}function Lo(t,e){return e?{point:e(t.point)}:t}function $l(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Oo({point:t},e){return{point:t,delta:$l(t,zl(e)),offset:$l(t,w0(e)),velocity:v0(e,.1)}}function w0(t){return t[0]}function zl(t){return t[t.length-1]}function v0(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const i=zl(t);for(;n>=0&&(r=t[n],!(i.timestamp-r.timestamp>Gt(e)));)n--;if(!r)return{x:0,y:0};const o=Xt(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const s={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function _0(t,{min:e,max:n},r){return e!==void 0&&t<e?t=r?it(e,t,r.min):Math.max(t,e):n!==void 0&&t>n&&(t=r?it(n,t,r.max):Math.min(t,n)),t}function jl(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function x0(t,{top:e,left:n,bottom:r,right:i}){return{x:jl(t.x,n,i),y:jl(t.y,e,r)}}function Wl(t,e){let n=e.min-t.min,r=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,r]=[r,n]),{min:n,max:r}}function b0(t,e){return{x:Wl(t.x,e.x),y:Wl(t.y,e.y)}}function C0(t,e){let n=.5;const r=Tt(t),i=Tt(e);return i>r?n=Tn(e.min,e.max-r,t.min):r>i&&(n=Tn(t.min,t.max-i,e.min)),se(0,1,n)}function E0(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Fo=.35;function S0(t=Fo){return t===!1?t=0:t===!0&&(t=Fo),{x:Hl(t,"left","right"),y:Hl(t,"top","bottom")}}function Hl(t,e,n){return{min:Kl(t,e),max:Kl(t,n)}}function Kl(t,e){return typeof t=="number"?t:t[e]||0}const k0=new WeakMap;class T0{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=dt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=f=>{const{dragSnapToOrigin:m}=this.getProps();m?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Fn(f).point)},s=(f,m)=>{const{drag:g,dragPropagation:v,onDragStart:w}=this.getProps();if(g&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Lp(g),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=m,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Vt(_=>{let C=this.getAxisMotionValue(_).get()||0;if(Zt.test(C)){const{projection:T}=this.visualElement;if(T&&T.layout){const I=T.layout.layoutBox[_];I&&(C=Tt(I)*(parseFloat(C)/100))}}this.originPoint[_]=C}),w&&tt.postRender(()=>w(f,m)),No(this.visualElement,"transform");const{animationState:E}=this.visualElement;E&&E.setActive("whileDrag",!0)},a=(f,m)=>{this.latestPointerEvent=f,this.latestPanInfo=m;const{dragPropagation:g,dragDirectionLock:v,onDirectionLock:w,onDrag:E}=this.getProps();if(!g&&!this.openDragLock)return;const{offset:_}=m;if(v&&this.currentDirection===null){this.currentDirection=A0(_),this.currentDirection!==null&&w&&w(this.currentDirection);return}this.updateAxis("x",m.point,_),this.updateAxis("y",m.point,_),this.visualElement.render(),E&&E(f,m)},u=(f,m)=>{this.latestPointerEvent=f,this.latestPanInfo=m,this.stop(f,m),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>Vt(f=>{var m;return this.getAnimationState(f)==="paused"&&((m=this.getAxisMotionValue(f).animation)==null?void 0:m.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Ul(e,{onSessionStart:o,onStart:s,onMove:a,onSessionEnd:u,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:Fl(this.visualElement)})}stop(e,n){const r=e||this.latestPointerEvent,i=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!r)return;const{velocity:s}=i;this.startAnimation(s);const{onDragEnd:a}=this.getProps();a&&tt.postRender(()=>a(r,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,r){const{drag:i}=this.getProps();if(!r||!kr(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let s=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(s=_0(s,this.constraints[e],this.elastic[e])),o.set(s)}resolveConstraints(){var o;const{dragConstraints:e,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,i=this.constraints;e&&Ze(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=x0(r.layoutBox,e):this.constraints=!1,this.elastic=S0(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Vt(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=E0(r.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Ze(e))return!1;const r=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Pm(r,i.root,this.visualElement.getTransformPagePoint());let s=b0(i.layout.layoutBox,o);if(n){const a=n(km(s));this.hasMutatedConstraints=!!a,a&&(s=dl(a))}return s}startAnimation(e){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),u=this.constraints||{},h=Vt(c=>{if(!kr(c,n,this.currentDirection))return;let f=u&&u[c]||{};s&&(f={min:0,max:0});const m=i?200:1e6,g=i?40:1e7,v={type:"inertia",velocity:r?e[c]:0,bounceStiffness:m,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(c,v)});return Promise.all(h).then(a)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return No(this.visualElement,e),r.start(Do(e,r,0,n,this.visualElement,!1))}stopAnimation(){Vt(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){Vt(e=>{var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){Vt(n=>{const{drag:r}=this.getProps();if(!kr(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:s,max:a}=i.layout.layoutBox[n];o.set(e[n]-it(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Ze(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Vt(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const u=a.get();i[s]=C0({min:u,max:u},this.constraints[s])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Vt(s=>{if(!kr(s,e,null))return;const a=this.getAxisMotionValue(s),{min:u,max:h}=this.constraints[s];a.set(it(u,h,i[s]))})}addListeners(){if(!this.visualElement.current)return;k0.set(this.visualElement,this);const e=this.visualElement.current,n=Vn(e,"pointerdown",u=>{const{drag:h,dragListener:c=!0}=this.getProps();h&&c&&this.start(u)}),r=()=>{const{dragConstraints:u}=this.getProps();Ze(u)&&u.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),tt.read(r);const s=On(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h})=>{this.isDragging&&h&&(Vt(c=>{const f=this.getAxisMotionValue(c);f&&(this.originPoint[c]+=u[c].translate,f.set(f.get()+u[c].translate))}),this.visualElement.render())});return()=>{s(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:s=Fo,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:a}}}function kr(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function A0(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class P0 extends ge{constructor(e){super(e),this.removeGroupControls=Ft,this.removeListeners=Ft,this.controls=new T0(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ft}unmount(){this.removeGroupControls(),this.removeListeners()}}const ql=t=>(e,n)=>{t&&tt.postRender(()=>t(e,n))};class I0 extends ge{constructor(){super(...arguments),this.removePointerDownListener=Ft}onPointerDown(e){this.session=new Ul(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Fl(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:ql(e),onStart:ql(n),onMove:r,onEnd:(o,s)=>{delete this.session,i&&tt.postRender(()=>i(o,s))}}}mount(){this.removePointerDownListener=Vn(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Tr={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Yl(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const zn={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(V.test(t))t=parseFloat(t);else return t;const n=Yl(t,e.target.x),r=Yl(t,e.target.y);return`${n}% ${r}%`}},M0={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,i=me.parse(t);if(i.length>5)return r;const o=me.createTransformer(t),s=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,u=n.y.scale*e.y;i[0+s]/=a,i[1+s]/=u;const h=it(a,u,.5);return typeof i[2+s]=="number"&&(i[2+s]/=h),typeof i[3+s]=="number"&&(i[3+s]/=h),o(i)}};let Vo=!1;class R0 extends Rt{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=e;em(N0),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),Vo&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Tr.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,{projection:s}=r;return s&&(s.isPresent=o,Vo=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==o?s.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?s.promote():s.relegate()||tt.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),po.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=e;Vo=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Gl(t){const[e,n]=qc(),r=ut(Ai);return x(R0,{...t,layoutGroup:r,switchLayoutGroup:ut(ll),isPresent:e,safeToRemove:n})}const N0={borderRadius:{...zn,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:zn,borderTopRightRadius:zn,borderBottomLeftRadius:zn,borderBottomRightRadius:zn,boxShadow:M0};function D0(t,e,n){const r=Et(t)?t:Ge(t);return r.start(Do("",r,e,n)),r.animation}const B0=(t,e)=>t.depth-e.depth;class L0{constructor(){this.children=[],this.isDirty=!1}add(e){Mi(this.children,e),this.isDirty=!0}remove(e){Ri(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(B0),this.isDirty=!1,this.children.forEach(e)}}function O0(t,e){const n=Pt.now(),r=({timestamp:i})=>{const o=i-n;o>=e&&(fe(r),t(o-e))};return tt.setup(r,!0),()=>fe(r)}const Xl=["TopLeft","TopRight","BottomLeft","BottomRight"],F0=Xl.length,Zl=t=>typeof t=="string"?parseFloat(t):t,Jl=t=>typeof t=="number"||V.test(t);function V0(t,e,n,r,i,o){i?(t.opacity=it(0,n.opacity??1,U0(r)),t.opacityExit=it(e.opacity??1,0,$0(r))):o&&(t.opacity=it(e.opacity??1,n.opacity??1,r));for(let s=0;s<F0;s++){const a=`border${Xl[s]}Radius`;let u=Ql(e,a),h=Ql(n,a);if(u===void 0&&h===void 0)continue;u||(u=0),h||(h=0),u===0||h===0||Jl(u)===Jl(h)?(t[a]=Math.max(it(Zl(u),Zl(h),r),0),(Zt.test(h)||Zt.test(u))&&(t[a]+="%")):t[a]=h}(e.rotate||n.rotate)&&(t.rotate=it(e.rotate||0,n.rotate||0,r))}function Ql(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const U0=tu(0,.5,Ka),$0=tu(.5,.95,Ft);function tu(t,e,n){return r=>r<t?0:r>e?1:n(Tn(t,e,r))}function eu(t,e){t.min=e.min,t.max=e.max}function Ut(t,e){eu(t.x,e.x),eu(t.y,e.y)}function nu(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function ru(t,e,n,r,i){return t-=e,t=Sr(t,1/n,r),i!==void 0&&(t=Sr(t,1/i,r)),t}function z0(t,e=0,n=1,r=.5,i,o=t,s=t){if(Zt.test(e)&&(e=parseFloat(e),e=it(s.min,s.max,e/100)-s.min),typeof e!="number")return;let a=it(o.min,o.max,r);t===o&&(a-=e),t.min=ru(t.min,e,n,a,i),t.max=ru(t.max,e,n,a,i)}function iu(t,e,[n,r,i],o,s){z0(t,e[n],e[r],e[i],e.scale,o,s)}const j0=["x","scaleX","originX"],W0=["y","scaleY","originY"];function ou(t,e,n,r){iu(t.x,e,j0,n?n.x:void 0,r?r.x:void 0),iu(t.y,e,W0,n?n.y:void 0,r?r.y:void 0)}function su(t){return t.translate===0&&t.scale===1}function au(t){return su(t.x)&&su(t.y)}function cu(t,e){return t.min===e.min&&t.max===e.max}function H0(t,e){return cu(t.x,e.x)&&cu(t.y,e.y)}function lu(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function uu(t,e){return lu(t.x,e.x)&&lu(t.y,e.y)}function du(t){return Tt(t.x)/Tt(t.y)}function hu(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class K0{constructor(){this.members=[]}add(e){Mi(this.members,e),e.scheduleRender()}remove(e){if(Ri(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(e,n){const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,n&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:r}=e;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function q0(t,e,n){let r="";const i=t.x.translate/e.x,o=t.y.translate/e.y,s=(n==null?void 0:n.z)||0;if((i||o||s)&&(r=`translate3d(${i}px, ${o}px, ${s}px) `),(e.x!==1||e.y!==1)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:h,rotate:c,rotateX:f,rotateY:m,skewX:g,skewY:v}=n;h&&(r=`perspective(${h}px) ${r}`),c&&(r+=`rotate(${c}deg) `),f&&(r+=`rotateX(${f}deg) `),m&&(r+=`rotateY(${m}deg) `),g&&(r+=`skewX(${g}deg) `),v&&(r+=`skewY(${v}deg) `)}const a=t.x.scale*e.x,u=t.y.scale*e.y;return(a!==1||u!==1)&&(r+=`scale(${a}, ${u})`),r||"none"}const Uo=["","X","Y","Z"],Y0=1e3;let G0=0;function $o(t,e,n,r){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),r&&(r[t]=0))}function fu(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Tl(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",tt,!(i||o))}const{parent:r}=t;r&&!r.hasCheckedOptimisedAppear&&fu(r)}function pu({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},a=e==null?void 0:e()){this.id=G0++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(J0),this.nodes.forEach(ng),this.nodes.forEach(rg),this.nodes.forEach(Q0)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new L0)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Di),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const u=this.eventHandlers.get(s);u&&u.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=Kc(s)&&!zp(s),this.instance=s;const{layoutId:a,layout:u,visualElement:h}=this.options;if(h&&!h.current&&h.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(u||a)&&(this.isLayoutDirty=!0),t){let c,f=0;const m=()=>this.root.updateBlockedByResize=!1;tt.read(()=>{f=window.innerWidth}),t(s,()=>{const g=window.innerWidth;g!==f&&(f=g,this.root.updateBlockedByResize=!0,c&&c(),c=O0(m,250),Tr.hasAnimatedSinceResize&&(Tr.hasAnimatedSinceResize=!1,this.nodes.forEach(yu)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&h&&(a||u)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:f,hasRelativeLayoutChanged:m,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||h.getDefaultTransition()||cg,{onLayoutAnimationStart:w,onLayoutAnimationComplete:E}=h.getProps(),_=!this.targetLayout||!uu(this.targetLayout,g),C=!f&&m;if(this.options.layoutRoot||this.resumeFrom||C||f&&(_||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const T={...uo(v,"layout"),onPlay:w,onComplete:E};(h.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T),this.setAnimationOrigin(c,C)}else f||yu(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),fe(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(ig),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&fu(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const f=this.path[c];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:u}=this.options;if(a===void 0&&!u)return;const h=this.getTransformTemplate();this.prevTransformTemplateValue=h?h(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(mu);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(gu);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(eg),this.nodes.forEach(X0),this.nodes.forEach(Z0)):this.nodes.forEach(gu),this.clearAllSnapshots();const a=Pt.now();Ct.delta=se(0,1e3/60,a-Ct.timestamp),Ct.timestamp=a,Ct.isProcessing=!0,Oi.update.process(Ct),Oi.preRender.process(Ct),Oi.render.process(Ct),Ct.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,po.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(tg),this.sharedNodes.forEach(og)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,tt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){tt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Tt(this.snapshot.measuredBox.x)&&!Tt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u<this.path.length;u++)this.path[u].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=dt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&this.instance){const u=r(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!i)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!au(this.projectionDelta),u=this.getTransformTemplate(),h=u?u(this.latestValues,""):void 0,c=h!==this.prevTransformTemplateValue;s&&this.instance&&(a||ke(this.latestValues)||c)&&(i(this.instance,h),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let u=this.removeElementScroll(a);return s&&(u=this.removeTransform(u)),lg(u),{animationId:this.root.animationId,measuredBox:a,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){var h;const{visualElement:s}=this.options;if(!s)return dt();const a=s.measureViewportBox();if(!(((h=this.scroll)==null?void 0:h.wasRoot)||this.path.some(ug))){const{scroll:c}=this.root;c&&(Je(a.x,c.offset.x),Je(a.y,c.offset.y))}return a}removeElementScroll(s){var u;const a=dt();if(Ut(a,s),(u=this.scroll)!=null&&u.wasRoot)return a;for(let h=0;h<this.path.length;h++){const c=this.path[h],{scroll:f,options:m}=c;c!==this.root&&f&&m.layoutScroll&&(f.wasRoot&&Ut(a,s),Je(a.x,f.offset.x),Je(a.y,f.offset.y))}return a}applyTransform(s,a=!1){const u=dt();Ut(u,s);for(let h=0;h<this.path.length;h++){const c=this.path[h];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Qe(u,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),ke(c.latestValues)&&Qe(u,c.latestValues)}return ke(this.latestValues)&&Qe(u,this.latestValues),u}removeTransform(s){const a=dt();Ut(a,s);for(let u=0;u<this.path.length;u++){const h=this.path[u];if(!h.instance||!ke(h.latestValues))continue;Po(h.latestValues)&&h.updateSnapshot();const c=dt(),f=h.measurePageBox();Ut(c,f),ou(a,h.latestValues,h.snapshot?h.snapshot.layoutBox:void 0,c)}return ke(this.latestValues)&&ou(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Ct.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var m;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==a;if(!(s||u&&this.isSharedProjectionDirty||this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:f}=this.options;if(!(!this.layout||!(c||f))){if(this.resolvedRelativeTargetAt=Ct.timestamp,!this.targetDelta&&!this.relativeTarget){const g=this.getClosestProjectingParent();g&&g.layout&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=dt(),this.relativeTargetOrigin=dt(),$n(this.relativeTargetOrigin,this.layout.layoutBox,g.layout.layoutBox),Ut(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=dt(),this.targetWithTransforms=dt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),g0(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Ut(this.target,this.layout.layoutBox),ml(this.target,this.targetDelta)):Ut(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const g=this.getClosestProjectingParent();g&&!!g.resumingFrom==!!this.resumingFrom&&!g.options.layoutScroll&&g.target&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=dt(),this.relativeTargetOrigin=dt(),$n(this.relativeTargetOrigin,this.target,g.target),Ut(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Po(this.parent.latestValues)||hl(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var v;const s=this.getLead(),a=!!this.resumingFrom||this!==s;let u=!0;if((this.isProjectionDirty||(v=this.parent)!=null&&v.isProjectionDirty)&&(u=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===Ct.timestamp&&(u=!1),u)return;const{layout:h,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(h||c))return;Ut(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,m=this.treeScale.y;Am(this.layoutCorrected,this.treeScale,this.path,a),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=dt());const{target:g}=s;if(!g){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(nu(this.prevProjectionDelta.x,this.projectionDelta.x),nu(this.prevProjectionDelta.y,this.projectionDelta.y)),Un(this.projectionDelta,this.layoutCorrected,g,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==m||!hu(this.projectionDelta.x,this.prevProjectionDelta.x)||!hu(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",g))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),s){const u=this.getStack();u&&u.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=tn(),this.projectionDelta=tn(),this.projectionDeltaWithTransform=tn()}setAnimationOrigin(s,a=!1){const u=this.snapshot,h=u?u.latestValues:{},c={...this.latestValues},f=tn();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const m=dt(),g=u?u.source:void 0,v=this.layout?this.layout.source:void 0,w=g!==v,E=this.getStack(),_=!E||E.members.length<=1,C=!!(w&&!_&&this.options.crossfade===!0&&!this.path.some(ag));this.animationProgress=0;let T;this.mixTargetDelta=I=>{const k=I/1e3;wu(f.x,s.x,k),wu(f.y,s.y,k),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&($n(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox),sg(this.relativeTarget,this.relativeTargetOrigin,m,k),T&&H0(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=dt()),Ut(T,this.relativeTarget)),w&&(this.animationValues=c,V0(c,h,this.latestValues,k,C,_)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=k},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){var a,u,h;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(h=(u=this.resumingFrom)==null?void 0:u.currentAnimation)==null||h.stop(),this.pendingAnimation&&(fe(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=tt.update(()=>{Tr.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ge(0)),this.currentAnimation=D0(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),s.onUpdate&&s.onUpdate(c)},onStop:()=>{},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Y0),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:u,layout:h,latestValues:c}=s;if(!(!a||!u||!h)){if(this!==s&&this.layout&&h&&Cu(this.options.animationType,this.layout.layoutBox,h.layoutBox)){u=this.target||dt();const f=Tt(this.layout.layoutBox.x);u.x.min=s.target.x.min,u.x.max=u.x.min+f;const m=Tt(this.layout.layoutBox.y);u.y.min=s.target.y.min,u.y.max=u.y.min+m}Ut(a,u),Qe(a,c),Un(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new K0),this.sharedNodes.get(s).add(a);const h=a.options.initialPromotionConfig;a.promote({transition:h?h.transition:void 0,preserveFollowOpacity:h&&h.shouldPreserveFollowOpacity?h.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:u}={}){const h=this.getStack();h&&h.promote(this,u),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:u}=s;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(a=!0),!a)return;const h={};u.z&&$o("z",s,h,this.animationValues);for(let c=0;c<Uo.length;c++)$o(`rotate${Uo[c]}`,s,h,this.animationValues),$o(`skew${Uo[c]}`,s,h,this.animationValues);s.render();for(const c in h)s.setStaticValue(c,h[c]),this.animationValues&&(this.animationValues[c]=h[c]);s.scheduleRender()}applyProjectionStyles(s,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}const u=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=Er(a==null?void 0:a.pointerEvents)||"",s.transform=u?u(this.latestValues,""):"none";return}const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){this.options.layoutId&&(s.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,s.pointerEvents=Er(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!ke(this.latestValues)&&(s.transform=u?u({},""):"none",this.hasProjected=!1);return}s.visibility="";const c=h.animationValues||h.latestValues;this.applyTransformsToTarget();let f=q0(this.projectionDeltaWithTransform,this.treeScale,c);u&&(f=u(c,f)),s.transform=f;const{x:m,y:g}=this.projectionDelta;s.transformOrigin=`${m.origin*100}% ${g.origin*100}% 0`,h.animationValues?s.opacity=h===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:s.opacity=h===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const v in Ln){if(c[v]===void 0)continue;const{correct:w,applyTo:E,isCSSVariable:_}=Ln[v],C=f==="none"?c[v]:w(c[v],h);if(E){const T=E.length;for(let I=0;I<T;I++)s[E[I]]=C}else _?this.options.visualElement.renderState.vars[v]=C:s[v]=C}this.options.layoutId&&(s.pointerEvents=h===this?Er(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var a;return(a=s.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(mu),this.root.sharedNodes.clear()}}}function X0(t){t.updateLayout()}function Z0(t){var n;const e=((n=t.resumeFrom)==null?void 0:n.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=t.layout,{animationType:o}=t.options,s=e.source!==t.layout.source;o==="size"?Vt(f=>{const m=s?e.measuredBox[f]:e.layoutBox[f],g=Tt(m);m.min=r[f].min,m.max=m.min+g}):Cu(o,e.layoutBox,r)&&Vt(f=>{const m=s?e.measuredBox[f]:e.layoutBox[f],g=Tt(r[f]);m.max=m.min+g,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[f].max=t.relativeTarget[f].min+g)});const a=tn();Un(a,r,e.layoutBox);const u=tn();s?Un(u,t.applyTransform(i,!0),e.measuredBox):Un(u,r,e.layoutBox);const h=!au(a);let c=!1;if(!t.resumeFrom){const f=t.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:m,layout:g}=f;if(m&&g){const v=dt();$n(v,e.layoutBox,m.layoutBox);const w=dt();$n(w,r,g.layoutBox),uu(v,w)||(c=!0),f.options.layoutRoot&&(t.relativeTarget=w,t.relativeTargetOrigin=v,t.relativeParent=f)}}}t.notifyListeners("didUpdate",{layout:r,snapshot:e,delta:u,layoutDelta:a,hasLayoutChanged:h,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:r}=t.options;r&&r()}t.options.transition=void 0}function J0(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Q0(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function tg(t){t.clearSnapshot()}function mu(t){t.clearMeasurements()}function gu(t){t.isLayoutDirty=!1}function eg(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function yu(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function ng(t){t.resolveTargetDelta()}function rg(t){t.calcProjection()}function ig(t){t.resetSkewAndRotation()}function og(t){t.removeLeadSnapshot()}function wu(t,e,n){t.translate=it(e.translate,0,n),t.scale=it(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function vu(t,e,n,r){t.min=it(e.min,n.min,r),t.max=it(e.max,n.max,r)}function sg(t,e,n,r){vu(t.x,e.x,n.x,r),vu(t.y,e.y,n.y,r)}function ag(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const cg={duration:.45,ease:[.4,0,.1,1]},_u=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),xu=_u("applewebkit/")&&!_u("chrome/")?Math.round:Ft;function bu(t){t.min=xu(t.min),t.max=xu(t.max)}function lg(t){bu(t.x),bu(t.y)}function Cu(t,e,n){return t==="position"||t==="preserve-aspect"&&!m0(du(e),du(n),.2)}function ug(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const dg=pu({attachResizeListener:(t,e)=>On(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),zo={current:void 0},Eu=pu({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!zo.current){const t=new dg({});t.mount(window),t.setOptions({layoutScroll:!0}),zo.current=t}return zo.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),hg={pan:{Feature:I0},drag:{Feature:P0,ProjectionNode:Eu,MeasureLayout:Gl}};function Su(t,e,n){const{props:r}=t;t.animationState&&r.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=r[i];o&&tt.postRender(()=>o(e,Fn(e)))}class fg extends ge{mount(){const{current:e}=this.node;e&&(this.unmount=Op(e,(n,r)=>(Su(this.node,r,"Start"),i=>Su(this.node,i,"End"))))}unmount(){}}class pg extends ge{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=kn(On(this.node.current,"focus",()=>this.onFocus()),On(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function ku(t,e,n){const{props:r}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&r.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=r[i];o&&tt.postRender(()=>o(e,Fn(e)))}class mg extends ge{mount(){const{current:e}=this.node;e&&(this.unmount=$p(e,(n,r)=>(ku(this.node,r,"Start"),(i,{success:o})=>ku(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const jo=new WeakMap,Wo=new WeakMap,gg=t=>{const e=jo.get(t.target);e&&e(t)},yg=t=>{t.forEach(gg)};function wg({root:t,...e}){const n=t||document;Wo.has(n)||Wo.set(n,{});const r=Wo.get(n),i=JSON.stringify(e);return r[i]||(r[i]=new IntersectionObserver(yg,{root:t,...e})),r[i]}function vg(t,e,n){const r=wg(e);return jo.set(t,n),r.observe(t),()=>{jo.delete(t),r.unobserve(t)}}const _g={some:0,all:1};class xg extends ge{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=e,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:_g[i]},a=u=>{const{isIntersecting:h}=u;if(this.isInView===h||(this.isInView=h,o&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:c,onViewportLeave:f}=this.node.getProps(),m=h?c:f;m&&m(u)};return vg(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(bg(e,n))&&this.startObserver()}unmount(){}}function bg({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Cg={...l0,...{inView:{Feature:xg},tap:{Feature:mg},focus:{Feature:pg},hover:{Feature:fg}},...hg,...{layout:{ProjectionNode:Eu,MeasureLayout:Gl}}},ce=Sm(Cg,Fm);/**
10
10
  * @license lucide-react v0.435.0 - ISC
11
11
  *
12
12
  * This source code is licensed under the ISC license.
13
13
  * See the LICENSE file in the root directory of this source tree.
14
- */const vw=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ld=(...t)=>t.filter((e,n,r)=>!!e&&r.indexOf(e)===n).join(" ");/**
14
+ */const Eg=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Tu=(...t)=>t.filter((e,n,r)=>!!e&&r.indexOf(e)===n).join(" ");/**
15
15
  * @license lucide-react v0.435.0 - ISC
16
16
  *
17
17
  * This source code is licensed under the ISC license.
18
18
  * See the LICENSE file in the root directory of this source tree.
19
- */var ww={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
19
+ */var Sg={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
20
20
  * @license lucide-react v0.435.0 - ISC
21
21
  *
22
22
  * This source code is licensed under the ISC license.
23
23
  * See the LICENSE file in the root directory of this source tree.
24
- */const bw=$e(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:s,...a},l)=>et("svg",{ref:l,...ww,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:ld("lucide",i),...a},[...s.map(([d,c])=>et(d,c)),...Array.isArray(o)?o:[o]]));/**
24
+ */const kg=he(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:s,...a},u)=>L("svg",{ref:u,...Sg,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:Tu("lucide",i),...a},[...s.map(([h,c])=>L(h,c)),...Array.isArray(o)?o:[o]]));/**
25
25
  * @license lucide-react v0.435.0 - ISC
26
26
  *
27
27
  * This source code is licensed under the ISC license.
28
28
  * See the LICENSE file in the root directory of this source tree.
29
- */const Se=(t,e)=>{const n=$e(({className:r,...i},o)=>et(bw,{ref:o,iconNode:e,className:ld(`lucide-${vw(t)}`,r),...i}));return n.displayName=`${t}`,n};/**
29
+ */const Jt=(t,e)=>{const n=he(({className:r,...i},o)=>L(kg,{ref:o,iconNode:e,className:Tu(`lucide-${Eg(t)}`,r),...i}));return n.displayName=`${t}`,n};/**
30
30
  * @license lucide-react v0.435.0 - ISC
31
31
  *
32
32
  * This source code is licensed under the ISC license.
33
33
  * See the LICENSE file in the root directory of this source tree.
34
- */const _w=Se("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
34
+ */const Tg=Jt("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
35
35
  * @license lucide-react v0.435.0 - ISC
36
36
  *
37
37
  * This source code is licensed under the ISC license.
38
38
  * See the LICENSE file in the root directory of this source tree.
39
- */const xw=Se("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
39
+ */const Ag=Jt("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
40
40
  * @license lucide-react v0.435.0 - ISC
41
41
  *
42
42
  * This source code is licensed under the ISC license.
43
43
  * See the LICENSE file in the root directory of this source tree.
44
- */const Sw=Se("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
44
+ */const Pg=Jt("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
45
45
  * @license lucide-react v0.435.0 - ISC
46
46
  *
47
47
  * This source code is licensed under the ISC license.
48
48
  * See the LICENSE file in the root directory of this source tree.
49
- */const Ew=Se("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
49
+ */const Ig=Jt("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
50
50
  * @license lucide-react v0.435.0 - ISC
51
51
  *
52
52
  * This source code is licensed under the ISC license.
53
53
  * See the LICENSE file in the root directory of this source tree.
54
- */const Aw=Se("Paperclip",[["path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48",key:"1u3ebp"}]]);/**
54
+ */const Mg=Jt("Paperclip",[["path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48",key:"1u3ebp"}]]);/**
55
55
  * @license lucide-react v0.435.0 - ISC
56
56
  *
57
57
  * This source code is licensed under the ISC license.
58
58
  * See the LICENSE file in the root directory of this source tree.
59
- */const Cw=Se("SendHorizontal",[["path",{d:"m3 3 3 9-3 9 19-9Z",key:"1aobqy"}],["path",{d:"M6 12h16",key:"s4cdu5"}]]);/**
59
+ */const Rg=Jt("SendHorizontal",[["path",{d:"m3 3 3 9-3 9 19-9Z",key:"1aobqy"}],["path",{d:"M6 12h16",key:"s4cdu5"}]]);/**
60
60
  * @license lucide-react v0.435.0 - ISC
61
61
  *
62
62
  * This source code is licensed under the ISC license.
63
63
  * See the LICENSE file in the root directory of this source tree.
64
- */const Tw=Se("SmilePlus",[["path",{d:"M22 11v1a10 10 0 1 1-9-10",key:"ew0xw9"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}],["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}]]);/**
64
+ */const Ng=Jt("SmilePlus",[["path",{d:"M22 11v1a10 10 0 1 1-9-10",key:"ew0xw9"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}],["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}]]);/**
65
65
  * @license lucide-react v0.435.0 - ISC
66
66
  *
67
67
  * This source code is licensed under the ISC license.
68
68
  * See the LICENSE file in the root directory of this source tree.
69
- */const Pw=Se("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
69
+ */const Dg=Jt("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
70
70
  * @license lucide-react v0.435.0 - ISC
71
71
  *
72
72
  * This source code is licensed under the ISC license.
73
73
  * See the LICENSE file in the root directory of this source tree.
74
- */const kw=Se("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
74
+ */const Bg=Jt("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
75
75
  * @license lucide-react v0.435.0 - ISC
76
76
  *
77
77
  * This source code is licensed under the ISC license.
78
78
  * See the LICENSE file in the root directory of this source tree.
79
- */const Ow=Se("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Iw=({onClick:t,isOpen:e,unreadCount:n=0})=>{const[r,i]=gt(!1);ut(()=>{if(n>0&&!e){i(!0);const s=setTimeout(()=>i(!1),600),a=setInterval(()=>{i(!0),setTimeout(()=>i(!1),600)},1e4);return()=>{clearTimeout(s),clearInterval(a)}}else i(!1)},[n,e]);const o=n>0&&!e;return T("div",{className:"fixed",style:{zIndex:9998,bottom:30,right:30},children:[r&&o&&T(De.div,{className:"absolute inset-0 rounded-full",style:{background:"linear-gradient(135deg, #7289DA 0%, #5B6EAB 80%, #22252A 100%)"},initial:{scale:1,opacity:.6},animate:{scale:1.5,opacity:0},transition:{duration:.6,ease:"easeOut"}}),T(De.button,{onClick:t,className:"relative w-14 h-14 rounded-full shadow-lg flex items-center justify-center outline-none",style:{boxShadow:"0 4px 12px rgba(0, 0, 0, 0.25)",background:"linear-gradient(135deg, #7289DA 0%, #5B6EAB 80%, #22252A 100%)"},"aria-label":e?"Close chat":"Open chat",animate:{scale:[1,.9,1.05,1]},transition:{duration:.25,ease:"easeOut"},children:[T(cs,{mode:"wait",initial:!1,children:T(De.div,{initial:{rotate:-90,opacity:0,scale:.9},animate:{rotate:0,opacity:1,scale:1},exit:{rotate:90,opacity:0,scale:.9},transition:{duration:.18,ease:"easeInOut"},className:"flex items-center justify-center",whileHover:{scale:1.1},whileTap:{scale:.95},children:e?T(Ow,{size:24,color:"#FFFFFF"}):T(Ew,{size:22,fill:"#FFFFFF",color:"#FFFFFF"})},e?"close":"open")}),T(cs,{children:o&&T(De.div,{initial:{scale:0,opacity:0},animate:{scale:1,opacity:1},exit:{scale:0,opacity:0},transition:{duration:.2,ease:"easeOut"},className:"absolute flex items-center justify-center",style:{top:-4,right:-4,minWidth:22,height:22,borderRadius:11,backgroundColor:"#7289DA",border:"2px solid #FFFFFF",padding:"0 6px"},children:T("span",{style:{color:"#FFFFFF",fontSize:12,fontWeight:600,lineHeight:1},children:n>99?"99+":n})})})]})]})};/*! js-cookie v3.0.5 | MIT */function oi(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}var Rw={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Ds(t,e){function n(i,o,s){if(!(typeof document>"u")){s=oi({},e,s),typeof s.expires=="number"&&(s.expires=new Date(Date.now()+s.expires*864e5)),s.expires&&(s.expires=s.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var l in s)s[l]&&(a+="; "+l,s[l]!==!0&&(a+="="+s[l].split(";")[0]));return document.cookie=i+"="+t.write(o,i)+a}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],s={},a=0;a<o.length;a++){var l=o[a].split("="),d=l.slice(1).join("=");try{var c=decodeURIComponent(l[0]);if(s[c]=t.read(d,c),i===c)break}catch{}}return i?s[i]:s}}return Object.create({set:n,get:r,remove:function(i,o){n(i,"",oi({},o,{expires:-1}))},withAttributes:function(i){return Ds(this.converter,oi({},this.attributes,i))},withConverter:function(i){return Ds(oi({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var Qe=Ds(Rw,{path:"/"});const Mw={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},ud=t=>{let e;const n=new Set,r=(c,h)=>{const m=typeof c=="function"?c(e):c;if(!Object.is(m,e)){const y=e;e=h??(typeof m!="object"||m===null)?m:Object.assign({},e,m),n.forEach(w=>w(e,y))}},i=()=>e,l={setState:r,getState:i,getInitialState:()=>d,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{(Mw?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},d=e=t(r,i,l);return l},Nw=t=>t?ud(t):ud;var gr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Dw(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Bw(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}var fd={exports:{}},dd={};const hd=Bw(Um);var pd={exports:{}},md={};/**
79
+ */const Lg=Jt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Og=({onClick:t,isOpen:e,unreadCount:n=0})=>{const[r,i]=H(!1);U(()=>{if(n>0&&!e){i(!0);const s=setTimeout(()=>i(!1),600),a=setInterval(()=>{i(!0),setTimeout(()=>i(!1),600)},1e4);return()=>{clearTimeout(s),clearInterval(a)}}else i(!1)},[n,e]);const o=n>0&&!e;return x("div",{className:"fixed",style:{zIndex:9998,bottom:30,right:30},children:[r&&o&&x(ce.div,{className:"absolute inset-0 rounded-full",style:{background:"linear-gradient(135deg, #7289DA 0%, #5B6EAB 80%, #22252A 100%)"},initial:{scale:1,opacity:.6},animate:{scale:1.5,opacity:0},transition:{duration:.6,ease:"easeOut"}}),x(ce.button,{onClick:t,className:"relative w-14 h-14 rounded-full shadow-lg flex items-center justify-center outline-none",style:{boxShadow:"0 4px 12px rgba(0, 0, 0, 0.25)",background:"linear-gradient(135deg, #7289DA 0%, #5B6EAB 80%, #22252A 100%)"},"aria-label":e?"Close chat":"Open chat",animate:{scale:[1,.9,1.05,1]},transition:{duration:.25,ease:"easeOut"},children:[x(wo,{mode:"wait",initial:!1,children:x(ce.div,{initial:{rotate:-90,opacity:0,scale:.9},animate:{rotate:0,opacity:1,scale:1},exit:{rotate:90,opacity:0,scale:.9},transition:{duration:.18,ease:"easeInOut"},className:"flex items-center justify-center",whileHover:{scale:1.1},whileTap:{scale:.95},children:e?x(Lg,{size:24,color:"#FFFFFF"}):x(Ig,{size:22,fill:"#FFFFFF",color:"#FFFFFF"})},e?"close":"open")}),x(wo,{children:o&&x(ce.div,{initial:{scale:0,opacity:0},animate:{scale:1,opacity:1},exit:{scale:0,opacity:0},transition:{duration:.2,ease:"easeOut"},className:"absolute flex items-center justify-center",style:{top:-4,right:-4,minWidth:22,height:22,borderRadius:11,backgroundColor:"#7289DA",border:"2px solid #FFFFFF",padding:"0 6px"},children:x("span",{style:{color:"#FFFFFF",fontSize:12,fontWeight:600,lineHeight:1},children:n>99?"99+":n})})})]})]})};/*! js-cookie v3.0.5 | MIT */function Ar(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}var Fg={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Ho(t,e){function n(i,o,s){if(!(typeof document>"u")){s=Ar({},e,s),typeof s.expires=="number"&&(s.expires=new Date(Date.now()+s.expires*864e5)),s.expires&&(s.expires=s.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var u in s)s[u]&&(a+="; "+u,s[u]!==!0&&(a+="="+s[u].split(";")[0]));return document.cookie=i+"="+t.write(o,i)+a}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],s={},a=0;a<o.length;a++){var u=o[a].split("="),h=u.slice(1).join("=");try{var c=decodeURIComponent(u[0]);if(s[c]=t.read(h,c),i===c)break}catch{}}return i?s[i]:s}}return Object.create({set:n,get:r,remove:function(i,o){n(i,"",Ar({},o,{expires:-1}))},withAttributes:function(i){return Ho(this.converter,Ar({},this.attributes,i))},withConverter:function(i){return Ho(Ar({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var Ae=Ho(Fg,{path:"/"});const Vg={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Au=t=>{let e;const n=new Set,r=(c,f)=>{const m=typeof c=="function"?c(e):c;if(!Object.is(m,e)){const g=e;e=f??(typeof m!="object"||m===null)?m:Object.assign({},e,m),n.forEach(v=>v(e,g))}},i=()=>e,u={setState:r,getState:i,getInitialState:()=>h,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{(Vg?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},h=e=t(r,i,u);return u},Ug=t=>t?Au(t):Au;function $g(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function zg(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}var Pu={exports:{}},Iu={};const Mu=zg(qh);var Ru={exports:{}},Nu={};/**
80
80
  * @license React
81
81
  * use-sync-external-store-shim.production.min.js
82
82
  *
@@ -84,7 +84,7 @@
84
84
  *
85
85
  * This source code is licensed under the MIT license found in the
86
86
  * LICENSE file in the root directory of this source tree.
87
- */var kn=hd;function Lw(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Fw=typeof Object.is=="function"?Object.is:Lw,jw=kn.useState,$w=kn.useEffect,Vw=kn.useLayoutEffect,Uw=kn.useDebugValue;function zw(t,e){var n=e(),r=jw({inst:{value:n,getSnapshot:e}}),i=r[0].inst,o=r[1];return Vw(function(){i.value=n,i.getSnapshot=e,Bs(i)&&o({inst:i})},[t,n,e]),$w(function(){return Bs(i)&&o({inst:i}),t(function(){Bs(i)&&o({inst:i})})},[t]),Uw(n),n}function Bs(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Fw(t,n)}catch{return!0}}function Ww(t,e){return e()}var qw=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Ww:zw;md.useSyncExternalStore=kn.useSyncExternalStore!==void 0?kn.useSyncExternalStore:qw,pd.exports=md;var Hw=pd.exports;/**
87
+ */var nn=Mu;function jg(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Wg=typeof Object.is=="function"?Object.is:jg,Hg=nn.useState,Kg=nn.useEffect,qg=nn.useLayoutEffect,Yg=nn.useDebugValue;function Gg(t,e){var n=e(),r=Hg({inst:{value:n,getSnapshot:e}}),i=r[0].inst,o=r[1];return qg(function(){i.value=n,i.getSnapshot=e,Ko(i)&&o({inst:i})},[t,n,e]),Kg(function(){return Ko(i)&&o({inst:i}),t(function(){Ko(i)&&o({inst:i})})},[t]),Yg(n),n}function Ko(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Wg(t,n)}catch{return!0}}function Xg(t,e){return e()}var Zg=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Xg:Gg;Nu.useSyncExternalStore=nn.useSyncExternalStore!==void 0?nn.useSyncExternalStore:Zg,Ru.exports=Nu;var Jg=Ru.exports;/**
88
88
  * @license React
89
89
  * use-sync-external-store-shim/with-selector.production.min.js
90
90
  *
@@ -92,98 +92,27 @@
92
92
  *
93
93
  * This source code is licensed under the MIT license found in the
94
94
  * LICENSE file in the root directory of this source tree.
95
- */var si=hd,Gw=Hw;function Kw(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Yw=typeof Object.is=="function"?Object.is:Kw,Xw=Gw.useSyncExternalStore,Jw=si.useRef,Zw=si.useEffect,Qw=si.useMemo,t1=si.useDebugValue;dd.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var o=Jw(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=Qw(function(){function l(y){if(!d){if(d=!0,c=y,y=r(y),i!==void 0&&s.hasValue){var w=s.value;if(i(w,y))return h=w}return h=y}if(w=h,Yw(c,y))return w;var _=r(y);return i!==void 0&&i(w,_)?w:(c=y,h=_)}var d=!1,c,h,m=n===void 0?null:n;return[function(){return l(e())},m===null?void 0:function(){return l(m())}]},[e,n,r,i]);var a=Xw(t,o[0],o[1]);return Zw(function(){s.hasValue=!0,s.value=a},[a]),t1(a),a},fd.exports=dd;var e1=fd.exports;const n1=Dw(e1),yd={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:r1}=gn,{useSyncExternalStoreWithSelector:i1}=n1;let gd=!1;const o1=t=>t;function s1(t,e=o1,n){(yd?"production":void 0)!=="production"&&n&&!gd&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),gd=!0);const r=i1(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,n);return r1(r),r}const vd=t=>{(yd?"production":void 0)!=="production"&&typeof t!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const e=typeof t=="function"?Nw(t):t,n=(r,i)=>s1(e,r,i);return Object.assign(n,e),n},a1=t=>t?vd(t):vd;var wd=Symbol.for("immer-nothing"),bd=Symbol.for("immer-draftable"),ae=Symbol.for("immer-state");function ge(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var On=Object.getPrototypeOf;function In(t){return!!t&&!!t[ae]}function tn(t){var e;return t?_d(t)||Array.isArray(t)||!!t[bd]||!!((e=t.constructor)!=null&&e[bd])||li(t)||ui(t):!1}var c1=Object.prototype.constructor.toString();function _d(t){if(!t||typeof t!="object")return!1;const e=On(t);if(e===null)return!0;const n=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===c1}function ai(t,e){ci(t)===0?Reflect.ownKeys(t).forEach(n=>{e(n,t[n],t)}):t.forEach((n,r)=>e(r,n,t))}function ci(t){const e=t[ae];return e?e.type_:Array.isArray(t)?1:li(t)?2:ui(t)?3:0}function Ls(t,e){return ci(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function xd(t,e,n){const r=ci(t);r===2?t.set(e,n):r===3?t.add(n):t[e]=n}function l1(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}function li(t){return t instanceof Map}function ui(t){return t instanceof Set}function en(t){return t.copy_||t.base_}function Fs(t,e){if(li(t))return new Map(t);if(ui(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);const n=_d(t);if(e===!0||e==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(t);delete r[ae];let i=Reflect.ownKeys(r);for(let o=0;o<i.length;o++){const s=i[o],a=r[s];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(r[s]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[s]})}return Object.create(On(t),r)}else{const r=On(t);if(r!==null&&n)return{...t};const i=Object.create(r);return Object.assign(i,t)}}function js(t,e=!1){return fi(t)||In(t)||!tn(t)||(ci(t)>1&&(t.set=t.add=t.clear=t.delete=u1),Object.freeze(t),e&&Object.entries(t).forEach(([n,r])=>js(r,!0))),t}function u1(){ge(2)}function fi(t){return Object.isFrozen(t)}var f1={};function nn(t){const e=f1[t];return e||ge(0,t),e}var vr;function Sd(){return vr}function d1(t,e){return{drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Ed(t,e){e&&(nn("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function $s(t){Vs(t),t.drafts_.forEach(h1),t.drafts_=null}function Vs(t){t===vr&&(vr=t.parent_)}function Ad(t){return vr=d1(vr,t)}function h1(t){const e=t[ae];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function Cd(t,e){e.unfinalizedDrafts_=e.drafts_.length;const n=e.drafts_[0];return t!==void 0&&t!==n?(n[ae].modified_&&($s(e),ge(4)),tn(t)&&(t=di(e,t),e.parent_||hi(e,t)),e.patches_&&nn("Patches").generateReplacementPatches_(n[ae].base_,t,e.patches_,e.inversePatches_)):t=di(e,n,[]),$s(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==wd?t:void 0}function di(t,e,n){if(fi(e))return e;const r=e[ae];if(!r)return ai(e,(i,o)=>Td(t,r,e,i,o,n)),e;if(r.scope_!==t)return e;if(!r.modified_)return hi(t,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let o=i,s=!1;r.type_===3&&(o=new Set(i),i.clear(),s=!0),ai(o,(a,l)=>Td(t,r,i,a,l,n,s)),hi(t,i,!1),n&&t.patches_&&nn("Patches").generatePatches_(r,n,t.patches_,t.inversePatches_)}return r.copy_}function Td(t,e,n,r,i,o,s){if(In(i)){const a=o&&e&&e.type_!==3&&!Ls(e.assigned_,r)?o.concat(r):void 0,l=di(t,i,a);if(xd(n,r,l),In(l))t.canAutoFreeze_=!1;else return}else s&&n.add(i);if(tn(i)&&!fi(i)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;di(t,i),(!e||!e.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&hi(t,i)}}function hi(t,e,n=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&js(e,n)}function p1(t,e){const n=Array.isArray(t),r={type_:n?1:0,scope_:e?e.scope_:Sd(),modified_:!1,finalized_:!1,assigned_:{},parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=Us;n&&(i=[r],o=wr);const{revoke:s,proxy:a}=Proxy.revocable(i,o);return r.draft_=a,r.revoke_=s,a}var Us={get(t,e){if(e===ae)return t;const n=en(t);if(!Ls(n,e))return m1(t,n,e);const r=n[e];return t.finalized_||!tn(r)?r:r===zs(t.base_,e)?(qs(t),t.copy_[e]=Hs(r,t)):r},has(t,e){return e in en(t)},ownKeys(t){return Reflect.ownKeys(en(t))},set(t,e,n){const r=Pd(en(t),e);if(r!=null&&r.set)return r.set.call(t.draft_,n),!0;if(!t.modified_){const i=zs(en(t),e),o=i==null?void 0:i[ae];if(o&&o.base_===n)return t.copy_[e]=n,t.assigned_[e]=!1,!0;if(l1(n,i)&&(n!==void 0||Ls(t.base_,e)))return!0;qs(t),Ws(t)}return t.copy_[e]===n&&(n!==void 0||e in t.copy_)||Number.isNaN(n)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=n,t.assigned_[e]=!0),!0},deleteProperty(t,e){return zs(t.base_,e)!==void 0||e in t.base_?(t.assigned_[e]=!1,qs(t),Ws(t)):delete t.assigned_[e],t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){const n=en(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r&&{writable:!0,configurable:t.type_!==1||e!=="length",enumerable:r.enumerable,value:n[e]}},defineProperty(){ge(11)},getPrototypeOf(t){return On(t.base_)},setPrototypeOf(){ge(12)}},wr={};ai(Us,(t,e)=>{wr[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),wr.deleteProperty=function(t,e){return wr.set.call(this,t,e,void 0)},wr.set=function(t,e,n){return Us.set.call(this,t[0],e,n,t[0])};function zs(t,e){const n=t[ae];return(n?en(n):t)[e]}function m1(t,e,n){var i;const r=Pd(e,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(t.draft_):void 0}function Pd(t,e){if(!(e in t))return;let n=On(t);for(;n;){const r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=On(n)}}function Ws(t){t.modified_||(t.modified_=!0,t.parent_&&Ws(t.parent_))}function qs(t){t.copy_||(t.copy_=Fs(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var y1=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,n,r)=>{if(typeof e=="function"&&typeof n!="function"){const o=n;n=e;const s=this;return function(l=o,...d){return s.produce(l,c=>n.call(this,c,...d))}}typeof n!="function"&&ge(6),r!==void 0&&typeof r!="function"&&ge(7);let i;if(tn(e)){const o=Ad(this),s=Hs(e,void 0);let a=!0;try{i=n(s),a=!1}finally{a?$s(o):Vs(o)}return Ed(o,r),Cd(i,o)}else if(!e||typeof e!="object"){if(i=n(e),i===void 0&&(i=e),i===wd&&(i=void 0),this.autoFreeze_&&js(i,!0),r){const o=[],s=[];nn("Patches").generateReplacementPatches_(e,i,o,s),r(o,s)}return i}else ge(1,e)},this.produceWithPatches=(e,n)=>{if(typeof e=="function")return(s,...a)=>this.produceWithPatches(s,l=>e(l,...a));let r,i;return[this.produce(e,n,(s,a)=>{r=s,i=a}),r,i]},typeof(t==null?void 0:t.autoFreeze)=="boolean"&&this.setAutoFreeze(t.autoFreeze),typeof(t==null?void 0:t.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(t.useStrictShallowCopy)}createDraft(t){tn(t)||ge(8),In(t)&&(t=g1(t));const e=Ad(this),n=Hs(t,void 0);return n[ae].isManual_=!0,Vs(e),n}finishDraft(t,e){const n=t&&t[ae];(!n||!n.isManual_)&&ge(9);const{scope_:r}=n;return Ed(r,e),Cd(void 0,r)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}applyPatches(t,e){let n;for(n=e.length-1;n>=0;n--){const i=e[n];if(i.path.length===0&&i.op==="replace"){t=i.value;break}}n>-1&&(e=e.slice(n+1));const r=nn("Patches").applyPatches_;return In(t)?r(t,e):this.produce(t,i=>r(i,e))}};function Hs(t,e){const n=li(t)?nn("MapSet").proxyMap_(t,e):ui(t)?nn("MapSet").proxySet_(t,e):p1(t,e);return(e?e.scope_:Sd()).drafts_.push(n),n}function g1(t){return In(t)||ge(10,t),kd(t)}function kd(t){if(!tn(t)||fi(t))return t;const e=t[ae];let n;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,n=Fs(t,e.scope_.immer_.useStrictShallowCopy_)}else n=Fs(t,!0);return ai(n,(r,i)=>{xd(n,r,kd(i))}),e&&(e.finalized_=!1),n}var ce=new y1,Rn=ce.produce;ce.produceWithPatches.bind(ce),ce.setAutoFreeze.bind(ce),ce.setUseStrictShallowCopy.bind(ce),ce.applyPatches.bind(ce),ce.createDraft.bind(ce),ce.finishDraft.bind(ce);const pi={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Gs=new Map,mi=t=>{const e=Gs.get(t);return e?Object.fromEntries(Object.entries(e.stores).map(([n,r])=>[n,r.getState()])):{}},v1=(t,e,n)=>{if(t===void 0)return{type:"untracked",connection:e.connect(n)};const r=Gs.get(n.name);if(r)return{type:"tracked",store:t,...r};const i={connection:e.connect(n),stores:{}};return Gs.set(n.name,i),{type:"tracked",store:t,...i}},w1=(t,e={})=>(n,r,i)=>{const{enabled:o,anonymousActionType:s,store:a,...l}=e;let d;try{d=(o??(pi?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!d)return(pi?"production":void 0)!=="production"&&o&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),t(n,r,i);const{connection:c,...h}=v1(a,d,l);let m=!0;i.setState=(_,P,x)=>{const v=n(_,P);if(!m)return v;const E=x===void 0?{type:s||"anonymous"}:typeof x=="string"?{type:x}:x;return a===void 0?(c==null||c.send(E,r()),v):(c==null||c.send({...E,type:`${a}/${E.type}`},{...mi(l.name),[a]:i.getState()}),v)};const y=(..._)=>{const P=m;m=!1,n(..._),m=P},w=t(i.setState,r,i);if(h.type==="untracked"?c==null||c.init(w):(h.stores[h.store]=i,c==null||c.init(Object.fromEntries(Object.entries(h.stores).map(([_,P])=>[_,_===h.store?w:P.getState()])))),i.dispatchFromDevtools&&typeof i.dispatch=="function"){let _=!1;const P=i.dispatch;i.dispatch=(...x)=>{(pi?"production":void 0)!=="production"&&x[0].type==="__setState"&&!_&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),_=!0),P(...x)}}return c.subscribe(_=>{var P;switch(_.type){case"ACTION":if(typeof _.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return Ks(_.payload,x=>{if(x.type==="__setState"){if(a===void 0){y(x.state);return}Object.keys(x.state).length!==1&&console.error(`
95
+ */var Pr=Mu,Qg=Jg;function ty(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var ey=typeof Object.is=="function"?Object.is:ty,ny=Qg.useSyncExternalStore,ry=Pr.useRef,iy=Pr.useEffect,oy=Pr.useMemo,sy=Pr.useDebugValue;Iu.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var o=ry(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=oy(function(){function u(g){if(!h){if(h=!0,c=g,g=r(g),i!==void 0&&s.hasValue){var v=s.value;if(i(v,g))return f=v}return f=g}if(v=f,ey(c,g))return v;var w=r(g);return i!==void 0&&i(v,w)?v:(c=g,f=w)}var h=!1,c,f,m=n===void 0?null:n;return[function(){return u(e())},m===null?void 0:function(){return u(m())}]},[e,n,r,i]);var a=ny(t,o[0],o[1]);return iy(function(){s.hasValue=!0,s.value=a},[a]),sy(a),a},Pu.exports=Iu;var ay=Pu.exports;const cy=$g(ay),Du={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:ly}=We,{useSyncExternalStoreWithSelector:uy}=cy;let Bu=!1;const dy=t=>t;function hy(t,e=dy,n){(Du?"production":void 0)!=="production"&&n&&!Bu&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),Bu=!0);const r=uy(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,n);return ly(r),r}const Lu=t=>{(Du?"production":void 0)!=="production"&&typeof t!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const e=typeof t=="function"?Ug(t):t,n=(r,i)=>hy(e,r,i);return Object.assign(n,e),n},fy=t=>t?Lu(t):Lu;var Ou=Symbol.for("immer-nothing"),Fu=Symbol.for("immer-draftable"),Nt=Symbol.for("immer-state");function Ht(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var rn=Object.getPrototypeOf;function on(t){return!!t&&!!t[Nt]}function Pe(t){var e;return t?Vu(t)||Array.isArray(t)||!!t[Fu]||!!((e=t.constructor)!=null&&e[Fu])||Rr(t)||Nr(t):!1}var py=Object.prototype.constructor.toString();function Vu(t){if(!t||typeof t!="object")return!1;const e=rn(t);if(e===null)return!0;const n=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===py}function Ir(t,e){Mr(t)===0?Reflect.ownKeys(t).forEach(n=>{e(n,t[n],t)}):t.forEach((n,r)=>e(r,n,t))}function Mr(t){const e=t[Nt];return e?e.type_:Array.isArray(t)?1:Rr(t)?2:Nr(t)?3:0}function qo(t,e){return Mr(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Uu(t,e,n){const r=Mr(t);r===2?t.set(e,n):r===3?t.add(n):t[e]=n}function my(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}function Rr(t){return t instanceof Map}function Nr(t){return t instanceof Set}function Ie(t){return t.copy_||t.base_}function Yo(t,e){if(Rr(t))return new Map(t);if(Nr(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);const n=Vu(t);if(e===!0||e==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(t);delete r[Nt];let i=Reflect.ownKeys(r);for(let o=0;o<i.length;o++){const s=i[o],a=r[s];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(r[s]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[s]})}return Object.create(rn(t),r)}else{const r=rn(t);if(r!==null&&n)return{...t};const i=Object.create(r);return Object.assign(i,t)}}function Go(t,e=!1){return Dr(t)||on(t)||!Pe(t)||(Mr(t)>1&&(t.set=t.add=t.clear=t.delete=gy),Object.freeze(t),e&&Object.entries(t).forEach(([n,r])=>Go(r,!0))),t}function gy(){Ht(2)}function Dr(t){return Object.isFrozen(t)}var yy={};function Me(t){const e=yy[t];return e||Ht(0,t),e}var jn;function $u(){return jn}function wy(t,e){return{drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function zu(t,e){e&&(Me("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function Xo(t){Zo(t),t.drafts_.forEach(vy),t.drafts_=null}function Zo(t){t===jn&&(jn=t.parent_)}function ju(t){return jn=wy(jn,t)}function vy(t){const e=t[Nt];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function Wu(t,e){e.unfinalizedDrafts_=e.drafts_.length;const n=e.drafts_[0];return t!==void 0&&t!==n?(n[Nt].modified_&&(Xo(e),Ht(4)),Pe(t)&&(t=Br(e,t),e.parent_||Lr(e,t)),e.patches_&&Me("Patches").generateReplacementPatches_(n[Nt].base_,t,e.patches_,e.inversePatches_)):t=Br(e,n,[]),Xo(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==Ou?t:void 0}function Br(t,e,n){if(Dr(e))return e;const r=e[Nt];if(!r)return Ir(e,(i,o)=>Hu(t,r,e,i,o,n)),e;if(r.scope_!==t)return e;if(!r.modified_)return Lr(t,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let o=i,s=!1;r.type_===3&&(o=new Set(i),i.clear(),s=!0),Ir(o,(a,u)=>Hu(t,r,i,a,u,n,s)),Lr(t,i,!1),n&&t.patches_&&Me("Patches").generatePatches_(r,n,t.patches_,t.inversePatches_)}return r.copy_}function Hu(t,e,n,r,i,o,s){if(on(i)){const a=o&&e&&e.type_!==3&&!qo(e.assigned_,r)?o.concat(r):void 0,u=Br(t,i,a);if(Uu(n,r,u),on(u))t.canAutoFreeze_=!1;else return}else s&&n.add(i);if(Pe(i)&&!Dr(i)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;Br(t,i),(!e||!e.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Lr(t,i)}}function Lr(t,e,n=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&Go(e,n)}function _y(t,e){const n=Array.isArray(t),r={type_:n?1:0,scope_:e?e.scope_:$u(),modified_:!1,finalized_:!1,assigned_:{},parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=Jo;n&&(i=[r],o=Wn);const{revoke:s,proxy:a}=Proxy.revocable(i,o);return r.draft_=a,r.revoke_=s,a}var Jo={get(t,e){if(e===Nt)return t;const n=Ie(t);if(!qo(n,e))return xy(t,n,e);const r=n[e];return t.finalized_||!Pe(r)?r:r===Qo(t.base_,e)?(es(t),t.copy_[e]=ns(r,t)):r},has(t,e){return e in Ie(t)},ownKeys(t){return Reflect.ownKeys(Ie(t))},set(t,e,n){const r=Ku(Ie(t),e);if(r!=null&&r.set)return r.set.call(t.draft_,n),!0;if(!t.modified_){const i=Qo(Ie(t),e),o=i==null?void 0:i[Nt];if(o&&o.base_===n)return t.copy_[e]=n,t.assigned_[e]=!1,!0;if(my(n,i)&&(n!==void 0||qo(t.base_,e)))return!0;es(t),ts(t)}return t.copy_[e]===n&&(n!==void 0||e in t.copy_)||Number.isNaN(n)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=n,t.assigned_[e]=!0),!0},deleteProperty(t,e){return Qo(t.base_,e)!==void 0||e in t.base_?(t.assigned_[e]=!1,es(t),ts(t)):delete t.assigned_[e],t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){const n=Ie(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r&&{writable:!0,configurable:t.type_!==1||e!=="length",enumerable:r.enumerable,value:n[e]}},defineProperty(){Ht(11)},getPrototypeOf(t){return rn(t.base_)},setPrototypeOf(){Ht(12)}},Wn={};Ir(Jo,(t,e)=>{Wn[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Wn.deleteProperty=function(t,e){return Wn.set.call(this,t,e,void 0)},Wn.set=function(t,e,n){return Jo.set.call(this,t[0],e,n,t[0])};function Qo(t,e){const n=t[Nt];return(n?Ie(n):t)[e]}function xy(t,e,n){var i;const r=Ku(e,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(t.draft_):void 0}function Ku(t,e){if(!(e in t))return;let n=rn(t);for(;n;){const r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=rn(n)}}function ts(t){t.modified_||(t.modified_=!0,t.parent_&&ts(t.parent_))}function es(t){t.copy_||(t.copy_=Yo(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var by=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,n,r)=>{if(typeof e=="function"&&typeof n!="function"){const o=n;n=e;const s=this;return function(u=o,...h){return s.produce(u,c=>n.call(this,c,...h))}}typeof n!="function"&&Ht(6),r!==void 0&&typeof r!="function"&&Ht(7);let i;if(Pe(e)){const o=ju(this),s=ns(e,void 0);let a=!0;try{i=n(s),a=!1}finally{a?Xo(o):Zo(o)}return zu(o,r),Wu(i,o)}else if(!e||typeof e!="object"){if(i=n(e),i===void 0&&(i=e),i===Ou&&(i=void 0),this.autoFreeze_&&Go(i,!0),r){const o=[],s=[];Me("Patches").generateReplacementPatches_(e,i,o,s),r(o,s)}return i}else Ht(1,e)},this.produceWithPatches=(e,n)=>{if(typeof e=="function")return(s,...a)=>this.produceWithPatches(s,u=>e(u,...a));let r,i;return[this.produce(e,n,(s,a)=>{r=s,i=a}),r,i]},typeof(t==null?void 0:t.autoFreeze)=="boolean"&&this.setAutoFreeze(t.autoFreeze),typeof(t==null?void 0:t.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(t.useStrictShallowCopy)}createDraft(t){Pe(t)||Ht(8),on(t)&&(t=Cy(t));const e=ju(this),n=ns(t,void 0);return n[Nt].isManual_=!0,Zo(e),n}finishDraft(t,e){const n=t&&t[Nt];(!n||!n.isManual_)&&Ht(9);const{scope_:r}=n;return zu(r,e),Wu(void 0,r)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}applyPatches(t,e){let n;for(n=e.length-1;n>=0;n--){const i=e[n];if(i.path.length===0&&i.op==="replace"){t=i.value;break}}n>-1&&(e=e.slice(n+1));const r=Me("Patches").applyPatches_;return on(t)?r(t,e):this.produce(t,i=>r(i,e))}};function ns(t,e){const n=Rr(t)?Me("MapSet").proxyMap_(t,e):Nr(t)?Me("MapSet").proxySet_(t,e):_y(t,e);return(e?e.scope_:$u()).drafts_.push(n),n}function Cy(t){return on(t)||Ht(10,t),qu(t)}function qu(t){if(!Pe(t)||Dr(t))return t;const e=t[Nt];let n;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,n=Yo(t,e.scope_.immer_.useStrictShallowCopy_)}else n=Yo(t,!0);return Ir(n,(r,i)=>{Uu(n,r,qu(i))}),e&&(e.finalized_=!1),n}var Dt=new by,sn=Dt.produce;Dt.produceWithPatches.bind(Dt),Dt.setAutoFreeze.bind(Dt),Dt.setUseStrictShallowCopy.bind(Dt),Dt.applyPatches.bind(Dt),Dt.createDraft.bind(Dt),Dt.finishDraft.bind(Dt);const Or={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},rs=new Map,Fr=t=>{const e=rs.get(t);return e?Object.fromEntries(Object.entries(e.stores).map(([n,r])=>[n,r.getState()])):{}},Ey=(t,e,n)=>{if(t===void 0)return{type:"untracked",connection:e.connect(n)};const r=rs.get(n.name);if(r)return{type:"tracked",store:t,...r};const i={connection:e.connect(n),stores:{}};return rs.set(n.name,i),{type:"tracked",store:t,...i}},Sy=(t,e={})=>(n,r,i)=>{const{enabled:o,anonymousActionType:s,store:a,...u}=e;let h;try{h=(o??(Or?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!h)return(Or?"production":void 0)!=="production"&&o&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),t(n,r,i);const{connection:c,...f}=Ey(a,h,u);let m=!0;i.setState=(w,E,_)=>{const C=n(w,E);if(!m)return C;const T=_===void 0?{type:s||"anonymous"}:typeof _=="string"?{type:_}:_;return a===void 0?(c==null||c.send(T,r()),C):(c==null||c.send({...T,type:`${a}/${T.type}`},{...Fr(u.name),[a]:i.getState()}),C)};const g=(...w)=>{const E=m;m=!1,n(...w),m=E},v=t(i.setState,r,i);if(f.type==="untracked"?c==null||c.init(v):(f.stores[f.store]=i,c==null||c.init(Object.fromEntries(Object.entries(f.stores).map(([w,E])=>[w,w===f.store?v:E.getState()])))),i.dispatchFromDevtools&&typeof i.dispatch=="function"){let w=!1;const E=i.dispatch;i.dispatch=(..._)=>{(Or?"production":void 0)!=="production"&&_[0].type==="__setState"&&!w&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),w=!0),E(..._)}}return c.subscribe(w=>{var E;switch(w.type){case"ACTION":if(typeof w.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return is(w.payload,_=>{if(_.type==="__setState"){if(a===void 0){g(_.state);return}Object.keys(_.state).length!==1&&console.error(`
96
96
  [zustand devtools middleware] Unsupported __setState action format.
97
97
  When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
98
98
  and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
99
- `);const v=x.state[a];if(v==null)return;JSON.stringify(i.getState())!==JSON.stringify(v)&&y(v);return}i.dispatchFromDevtools&&typeof i.dispatch=="function"&&i.dispatch(x)});case"DISPATCH":switch(_.payload.type){case"RESET":return y(w),a===void 0?c==null?void 0:c.init(i.getState()):c==null?void 0:c.init(mi(l.name));case"COMMIT":if(a===void 0){c==null||c.init(i.getState());return}return c==null?void 0:c.init(mi(l.name));case"ROLLBACK":return Ks(_.state,x=>{if(a===void 0){y(x),c==null||c.init(i.getState());return}y(x[a]),c==null||c.init(mi(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Ks(_.state,x=>{if(a===void 0){y(x);return}JSON.stringify(i.getState())!==JSON.stringify(x[a])&&y(x[a])});case"IMPORT_STATE":{const{nextLiftedState:x}=_.payload,v=(P=x.computedStates.slice(-1)[0])==null?void 0:P.state;if(!v)return;y(a===void 0?v:v[a]),c==null||c.send(null,x);return}case"PAUSE_RECORDING":return m=!m}return}}),w},Ks=(t,e)=>{let n;try{n=JSON.parse(t)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}n!==void 0&&e(n)};function b1(t,e){let n;try{n=t()}catch{return}return{getItem:i=>{var o;const s=l=>l===null?null:JSON.parse(l,void 0),a=(o=n.getItem(i))!=null?o:null;return a instanceof Promise?a.then(s):s(a)},setItem:(i,o)=>n.setItem(i,JSON.stringify(o,void 0)),removeItem:i=>n.removeItem(i)}}const br=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(r){return br(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return br(r)(n)}}}},_1=(t,e)=>(n,r,i)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:P=>P,version:0,merge:(P,x)=>({...x,...P}),...e},s=!1;const a=new Set,l=new Set;let d;try{d=o.getStorage()}catch{}if(!d)return t((...P)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...P)},r,i);const c=br(o.serialize),h=()=>{const P=o.partialize({...r()});let x;const v=c({state:P,version:o.version}).then(E=>d.setItem(o.name,E)).catch(E=>{x=E});if(x)throw x;return v},m=i.setState;i.setState=(P,x)=>{m(P,x),h()};const y=t((...P)=>{n(...P),h()},r,i);let w;const _=()=>{var P;if(!d)return;s=!1,a.forEach(v=>v(r()));const x=((P=o.onRehydrateStorage)==null?void 0:P.call(o,r()))||void 0;return br(d.getItem.bind(d))(o.name).then(v=>{if(v)return o.deserialize(v)}).then(v=>{if(v)if(typeof v.version=="number"&&v.version!==o.version){if(o.migrate)return o.migrate(v.state,v.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return v.state}).then(v=>{var E;return w=o.merge(v,(E=r())!=null?E:y),n(w,!0),h()}).then(()=>{x==null||x(w,void 0),s=!0,l.forEach(v=>v(w))}).catch(v=>{x==null||x(void 0,v)})};return i.persist={setOptions:P=>{o={...o,...P},P.getStorage&&(d=P.getStorage())},clearStorage:()=>{d==null||d.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>_(),hasHydrated:()=>s,onHydrate:P=>(a.add(P),()=>{a.delete(P)}),onFinishHydration:P=>(l.add(P),()=>{l.delete(P)})},_(),w||y},x1=(t,e)=>(n,r,i)=>{let o={storage:b1(()=>localStorage),partialize:_=>_,version:0,merge:(_,P)=>({...P,..._}),...e},s=!1;const a=new Set,l=new Set;let d=o.storage;if(!d)return t((..._)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(..._)},r,i);const c=()=>{const _=o.partialize({...r()});return d.setItem(o.name,{state:_,version:o.version})},h=i.setState;i.setState=(_,P)=>{h(_,P),c()};const m=t((..._)=>{n(..._),c()},r,i);i.getInitialState=()=>m;let y;const w=()=>{var _,P;if(!d)return;s=!1,a.forEach(v=>{var E;return v((E=r())!=null?E:m)});const x=((P=o.onRehydrateStorage)==null?void 0:P.call(o,(_=r())!=null?_:m))||void 0;return br(d.getItem.bind(d))(o.name).then(v=>{if(v)if(typeof v.version=="number"&&v.version!==o.version){if(o.migrate)return[!0,o.migrate(v.state,v.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,v.state];return[!1,void 0]}).then(v=>{var E;const[M,O]=v;if(y=o.merge(O,(E=r())!=null?E:m),n(y,!0),M)return c()}).then(()=>{x==null||x(y,void 0),y=r(),s=!0,l.forEach(v=>v(y))}).catch(v=>{x==null||x(void 0,v)})};return i.persist={setOptions:_=>{o={...o,..._},_.storage&&(d=_.storage)},clearStorage:()=>{d==null||d.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>w(),hasHydrated:()=>s,onHydrate:_=>(a.add(_),()=>{a.delete(_)}),onFinishHydration:_=>(l.add(_),()=>{l.delete(_)})},o.skipHydration||w(),y||m},S1=(t,e)=>"getStorage"in e||"serialize"in e||"deserialize"in e?((pi?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),_1(t,e)):x1(t,e);function yi(t){const e=t.content.slice(0,50);return t.support?`${t.date}-${t.authorName}-${e}`:`${t.date}-customer-${e}`}function Od(t,e){const n=new Map;return t.forEach(r=>{const i=yi(r);n.set(i,r)}),e.forEach(r=>{const i=yi(r);n.set(i,r)}),Array.from(n.values()).sort((r,i)=>r.date-i.date)}function E1(t,e){const n=yi(e);return t.some(r=>yi(r)===n)}const Id=460,A1=750,C1="https://api.deskcord.chat";function T1(){var n,r,i,o;const t=(r=(n=window.deskcord)==null?void 0:n.settings)==null?void 0:r.app_id,e=((o=(i=window.deskcord)==null?void 0:i.settings)==null?void 0:o.domain)??C1;if(!t)throw new Error("Cannot initialize discord chat. Please check your installation and embed.");return{app_id:t,domain:e}}const le=T1();function ne(...t){}async function P1(t){const e=new Headers;e.append("Content-Type","application/json"),e.append("Authorization",`Bearer ${t}`);try{const n=await fetch(`${le.domain}/conversations/unread-count`,{method:"GET",headers:e});return n.ok?(await n.json()).unreadCount:(ne(`Failed to fetch unread count: ${n.status}`),null)}catch{return null}}async function k1(t,e){const n=new Headers;n.append("Content-Type","application/json"),n.append("Authorization",`Bearer ${t}`);try{const r=await fetch(`${le.domain}/conversations/mark-read`,{method:"POST",headers:n,body:JSON.stringify({timestamp:e})});return r.ok?(await r.json()).success:(ne(`Failed to mark as read: ${r.status}`),!1)}catch{return!1}}const Rd="deskcord_last_read",Md="deskcord_unread_count",O1=()=>{try{const t=localStorage.getItem(Rd);if(!t)return null;const e=parseInt(t,10);return isNaN(e)?null:e}catch{return console.warn("[Deskcord] localStorage unavailable for reading last read timestamp"),null}},Nd=t=>{try{localStorage.setItem(Rd,t.toString())}catch{console.warn("[Deskcord] localStorage unavailable for writing last read timestamp")}},gi=()=>{try{const t=localStorage.getItem(Md);if(!t)return 0;const e=parseInt(t,10);return isNaN(e)?0:e}catch{return console.warn("[Deskcord] localStorage unavailable for reading unread count"),0}},_r=t=>{try{localStorage.setItem(Md,t.toString())}catch{console.warn("[Deskcord] localStorage unavailable for writing unread count")}},Nt=a1(w1(S1((t,e)=>({_REHYDRATED_:!1,token:"",isNetworkInitialized:!1,isChatOpen:!1,isChatVisible:!1,isConversationOpen:!0,conversations:[],email:"",username:"",openConversationId:null,guildSettings:{iconURL:"",header_title:"",header_subtitle:"",lastUpdate:null},fullScreen:!1,isLoading:!1,networkError:null,currentConversationLastFetchedAt:null,pastConversationsLastFetchedAt:null,unreadCount:0,lastReadMessageDate:null,setRehydrated:n=>t(()=>({_REHYDRATED_:n})),setFullScreen:n=>t(()=>({fullScreen:n})),setToken:n=>t(()=>({token:n})),toggleChatOpen:()=>t(n=>({isChatOpen:!n.isChatOpen})),setNetworkInitialized:n=>t(()=>({isNetworkInitialized:n})),setChatVisible:n=>t(()=>({isChatVisible:n})),setChatOpen:n=>t(()=>({isChatOpen:n})),setOpenConversationId:n=>t(()=>({openConversationId:n})),setConversations:n=>t(()=>({conversations:n})),setGuildSettings:n=>t(r=>({guildSettings:{...r.guildSettings,...n}})),setConversationOpen:(n,r)=>t(i=>({conversations:i.conversations.map(o=>o.threadId===n?{...o,status:r?"open":"closed"}:o)})),setConversationCSMember:(n,r)=>t(Rn(i=>{const o=i.conversations.find(s=>s.threadId===n);o&&(o.csMember=r)})),addMessage:(n,r)=>t(Rn(i=>{const o=i.conversations.find(s=>s.threadId===n);o?o.messages.push(r):(i.conversations.push({threadId:n,lastMessageDate:Date.now(),firstMessageDate:Date.now(),status:"open",messages:[r]}),i.openConversationId=n)})),updateMessage:(n,r,i)=>t(Rn(o=>{const s=o.conversations.findIndex(a=>a.threadId===n);if(s!==-1){const a=o.conversations[s].messages.findIndex(l=>l.date===r);o.conversations[s].messages[a]=i}})),removeMessage:(n,r)=>t(Rn(i=>{const o=i.conversations.findIndex(s=>s.threadId===n);o!==-1&&(i.conversations[o].messages=i.conversations[o].messages.filter(s=>s.date!==r))})),tempConversationToThread:n=>t(r=>({...r,openConversationId:n,conversations:r.conversations.map(i=>i.threadId==="TEMP"?{...i,threadId:n}:i)})),setEmail:n=>t(()=>({email:n})),setUsername:n=>t(()=>({username:n})),getConversation:()=>{const{conversations:n,openConversationId:r}=e();return r?n.find(i=>i.threadId===r)??null:null},setLoading:n=>t(()=>({isLoading:n})),setNetworkError:n=>t(()=>({networkError:n})),setCurrentConversationLastFetchedAt:n=>t(()=>({currentConversationLastFetchedAt:n})),setPastConversationsLastFetchedAt:n=>t(()=>({pastConversationsLastFetchedAt:n})),smartMergeCurrentConversation:n=>t(Rn(r=>{const i=r.conversations.findIndex(o=>o.threadId===n.threadId);if(i!==-1){const o=r.conversations[i],s=Od(o.messages,n.messages);r.conversations[i]={...n,messages:s}}else r.conversations.push(n);r.currentConversationLastFetchedAt=Date.now()})),smartMergePastConversations:n=>t(Rn(r=>{n.forEach(i=>{const o=r.conversations.findIndex(s=>s.threadId===i.threadId);if(o!==-1){const s=r.conversations[o],a=Od(s.messages,i.messages);r.conversations[o]={...i,messages:a}}else r.conversations.push(i)}),r.pastConversationsLastFetchedAt=Date.now()})),incrementUnreadCount:()=>t(n=>{const r=n.unreadCount+1;return _r(r),{unreadCount:r}}),markMessagesAsRead:()=>t(()=>{const n=Date.now();return _r(0),Nd(n),{unreadCount:0,lastReadMessageDate:n}}),setUnreadCount:n=>t(()=>(_r(n),{unreadCount:n})),syncUnreadCountFromServer:async()=>{const n=Qe.get("discord-widget");if(!n){const r=gi();t(()=>({unreadCount:r}));return}try{const r=await P1(n);if(r!==null)ne(`Synced unread count from server: ${r}`),_r(r),t(()=>({unreadCount:r}));else{ne("Server unavailable, using cached unread count");const i=gi();t(()=>({unreadCount:i}))}}catch{const i=gi();t(()=>({unreadCount:i}))}},markMessagesAsReadWithSync:async()=>{const n=Date.now();_r(0),Nd(n),t(()=>({unreadCount:0,lastReadMessageDate:n}));const r=Qe.get("discord-widget");if(r)try{const i=await k1(r,n);ne(i?"Successfully synced mark-read with server":"Failed to sync mark-read with server (will retry on next load)")}catch{}},initializeUnreadState:()=>{const n=gi(),r=O1();t(()=>({unreadCount:n,lastReadMessageDate:r}))}}),{name:"discord-widget-storage",partialize:t=>({token:t.token,username:t.username,email:t.email,openConversationId:t.openConversationId,conversations:I1(t.conversations),guildSettings:t.guildSettings}),onRehydrateStorage:t=>()=>t.setRehydrated(!0)}),{enabled:!1}));function I1(t){return t.map(e=>({...e,messages:e.messages.filter(n=>!n.ephemeral&&!n.pending)}))}async function R1({content:t}){const e=Nt.getState().username,n=Qe.get("discord-widget"),r=JSON.stringify({name:e,content:t}),i=new Headers;i.append("Content-Type","application/json"),i.append("Authorization",`Bearer ${n}`);const o={method:"POST",headers:i,body:r};return await(await fetch(`${le.domain}/conversations/sendMessage`,o)).json()}var Mn=(t=>(t[t.IntroduceYourself=0]="IntroduceYourself",t[t.UploadFile=1]="UploadFile",t))(Mn||{});const xr="System",M1={content:"This conversation has been closed by the support.",support:!0,authorName:xr,date:Date.now()},N1={content:"",support:!0,authorName:xr,date:Date.now(),customRenderer:Mn.IntroduceYourself};function D1(t){return{content:`You are now chatting with ${t}.`,support:!0,authorName:xr,date:Date.now(),ephemeral:!0}}function B1(t){return{content:"",support:!0,authorName:xr,date:Date.now(),customRenderer:Mn.UploadFile,customRendererProps:{file:t},ephemeral:!0}}function L1(t){return{content:"",support:!1,authorName:"",date:Date.now(),ephemeral:!0,attachments:t}}const F1=$e(({accept:t,maxSize:e,uploadConfig:n,onFileSelect:r,onUploadComplete:i,onUploadStart:o,onError:s},a)=>{const l=it(null),d=it(null),{addMessage:c,getConversation:h,removeMessage:m,updateMessage:y}=Nt(),w=h();Jn(a,()=>({upload:async()=>{if(d.current)try{const M=new FormData;M.append("file",d.current),o==null||o(d.current),P(d.current);const O=await fetch(n.url,{method:n.method,headers:n.headers,body:M}),j=await O.json();i==null||i(O),x(d.current),_(j)}catch(M){s==null||s(M),v(d.current)}},clear:()=>{d.current=null,l.current&&(l.current.value=""),r==null||r(null)}}));function _(M){w&&c(w.threadId,L1(M.attachments))}function P(M){w&&c(w.threadId,B1({fileName:M.name,status:"uploading",size:M.size}))}function x(M){var j;if(!w)return;const O=(j=h())==null?void 0:j.messages.find(B=>{var L,F;return((F=(L=B.customRendererProps)==null?void 0:L.file)==null?void 0:F.fileName)===M.name});O&&m(w.threadId,O.date)}function v(M){var j,B;if(!w)return;const O=(j=h())==null?void 0:j.messages.find(L=>{var F,Y;return((Y=(F=L.customRendererProps)==null?void 0:F.file)==null?void 0:Y.fileName)===M.name});(B=O==null?void 0:O.customRendererProps)!=null&&B.file&&y(w.threadId,O.date,{...O,customRendererProps:{...O.customRendererProps,file:{...O.customRendererProps.file,status:"error"}}})}return T(Pt,{children:[T("button",{className:"text-gray-500 hover:text-blue-500","aria-label":"Upload file",onClick:()=>{var M;return(M=l.current)==null?void 0:M.click()},children:T(Aw,{size:16})}),T("input",{type:"file",accept:t,ref:l,style:{display:"none"},onChange:M=>{var j;const O=(j=M.target.files)==null?void 0:j[0];O&&O.size<=e?(d.current=O,r==null||r(O)):(d.current=null,r==null||r(null))}})]})}),j1=({size:t})=>T("svg",{className:"shrink-0 size-3.5",xmlns:"http://www.w3.org/2000/svg",width:t||16,height:t||16,fill:"currentColor",viewBox:"0 0 16 16",children:T("path",{d:"M15.964.686a.5.5 0 0 0-.65-.65L.767 5.855H.766l-.452.18a.5.5 0 0 0-.082.887l.41.26.001.002 4.995 3.178 3.178 4.995.002.002.26.41a.5.5 0 0 0 .886-.083l6-15Zm-1.833 1.89L6.637 10.07l-.215-.338a.5.5 0 0 0-.154-.154l-.338-.215 7.494-7.494 1.178-.471-.47 1.178Z"})}),$1=({onPickEmoji:t})=>T("div",{className:"mb-2 p-2 bg-white max-h-40 overflow-y-auto",children:T("div",{className:"grid grid-cols-8 gap-2",children:V1.map((e,n)=>T("button",{className:"text-2xl hover:bg-gray-100 rounded",onClick:()=>t(e),children:e},n))})}),V1=["😀","😃","😄","😁","😆","😅","😂","🤣","😊","😇","🙂","🙃","😉","😌","😍","🥰","😘","😗","😙","😚","😋","😛","😝","😜","🤪","🤨","🧐","🤓","😎","🤩","🥳","😏","😒","😞","😔","😟","😕","🙁","☹️","😣","😖","😫","😩","🥺","😢","😭","😤","😠","😡","🤬","🤯","😳","🥵","🥶","😱","😨","😰","😥","😓","🤗","🤔","🤭","🤫","🤥","😶","😐","😑","😬","🙄","😯","😦","😧","😮","😲","🥱","😴","🤤","😪","😵","🤐","🥴","🤢","🤮","🤧","😷","🤒","🤕"],U1=({imageUrl:t,fileName:e,onDelete:n,width:r,height:i})=>T("div",{className:"relative w-32 h-32 rounded-lg overflow-hidden bg-gray-100 border border-gray-200",children:[T("div",{className:"flex justify-center absolute inset-0",children:T("img",{src:t,alt:"Preview",className:`w-[${r}px] h-[${i}px] max-w-[100px] max-h-[100px] aspect-auto`})}),T("button",{onClick:n,className:"absolute top-1 right-1 bg-gray-600 p-1 rounded-lg text-red-400 hover:text-white transition",children:T(Pw,{size:20})}),T("div",{className:"absolute bottom-0 left-0 right-0 bg-gray-800 bg-opacity-80 text-white text-sm px-2 py-1 truncate",children:e})]}),z1=({className:t})=>T("svg",{className:t,viewBox:"0 0 642 74",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:T("path",{d:"M23.9 73.2C19.4333 73.2 15.3667 72.0667 11.7 69.8C8.1 67.5333 5.23333 64.4333 3.1 60.5C1.03333 56.5 7.45058e-08 51.9667 7.45058e-08 46.9C7.45058e-08 41.7667 1.06667 37.2333 3.2 33.3C5.33333 29.3 8.23333 26.1667 11.9 23.9C15.6333 21.5667 19.7667 20.4 24.3 20.4C27.7667 20.4 30.8 21.0333 33.4 22.3C36 23.5 38.1333 25.2667 39.8 27.6V-2.86102e-06H54.8V72H41.5L39.8 65.5C38.8 66.9 37.5667 68.2 36.1 69.4C34.7 70.5333 33 71.4333 31 72.1C29 72.8333 26.6333 73.2 23.9 73.2ZM27.8 60.1C30.2667 60.1 32.4333 59.5333 34.3 58.4C36.2333 57.2667 37.7 55.7 38.7 53.7C39.7667 51.7 40.3 49.4 40.3 46.8C40.3 44.2 39.7667 41.9 38.7 39.9C37.7 37.9 36.2333 36.3333 34.3 35.2C32.4333 34.0667 30.2667 33.5 27.8 33.5C25.4 33.5 23.2333 34.0667 21.3 35.2C19.4333 36.3333 17.9667 37.9 16.9 39.9C15.8333 41.9 15.3 44.1667 15.3 46.7C15.3 49.3 15.8333 51.6333 16.9 53.7C17.9667 55.7 19.4333 57.2667 21.3 58.4C23.2333 59.5333 25.4 60.1 27.8 60.1ZM86.6086 73.2C81.4086 73.2 76.8419 72.1333 72.9086 70C68.9753 67.8 65.8753 64.7667 63.6086 60.9C61.4086 56.9667 60.3086 52.4667 60.3086 47.4C60.3086 42.2 61.4086 37.5667 63.6086 33.5C65.8086 29.4333 68.8753 26.2333 72.8086 23.9C76.7419 21.5667 81.3086 20.4 86.5086 20.4C91.5753 20.4 96.0086 21.5 99.8086 23.7C103.609 25.9 106.575 28.9 108.709 32.7C110.909 36.4333 112.009 40.7667 112.009 45.7C112.009 46.3667 111.975 47.1333 111.909 48C111.909 48.8 111.842 49.6333 111.709 50.5H71.0086V41.8H96.7086C96.5753 39 95.5419 36.7667 93.6086 35.1C91.7419 33.3667 89.4086 32.5 86.6086 32.5C84.4753 32.5 82.5419 33 80.8086 34C79.0753 35 77.6753 36.5 76.6086 38.5C75.6086 40.5 75.1086 43.0333 75.1086 46.1V49.1C75.1086 51.4333 75.5419 53.5 76.4086 55.3C77.3419 57.1 78.6419 58.5 80.3086 59.5C82.0419 60.5 84.0753 61 86.4086 61C88.6086 61 90.4086 60.5667 91.8086 59.7C93.2753 58.7667 94.4086 57.6 95.2086 56.2H110.509C109.575 59.4 107.975 62.3 105.709 64.9C103.442 67.4333 100.675 69.4667 97.4086 71C94.1419 72.4667 90.5419 73.2 86.6086 73.2ZM138.039 73.2C133.306 73.2 129.206 72.4667 125.739 71C122.339 69.4667 119.639 67.4 117.639 64.8C115.706 62.2 114.606 59.2667 114.339 56H129.239C129.506 57.1333 129.972 58.1667 130.639 59.1C131.372 59.9667 132.339 60.6667 133.539 61.2C134.806 61.6667 136.206 61.9 137.739 61.9C139.406 61.9 140.739 61.7 141.739 61.3C142.806 60.8333 143.606 60.2333 144.139 59.5C144.672 58.7667 144.939 58 144.939 57.2C144.939 55.9333 144.539 54.9667 143.739 54.3C143.006 53.6333 141.906 53.1 140.439 52.7C138.972 52.2333 137.206 51.8 135.139 51.4C132.739 50.8667 130.339 50.2667 127.939 49.6C125.606 48.8667 123.506 47.9667 121.639 46.9C119.839 45.8333 118.372 44.4667 117.239 42.8C116.172 41.0667 115.639 38.9667 115.639 36.5C115.639 33.5 116.472 30.8 118.139 28.4C119.806 25.9333 122.206 24 125.339 22.6C128.472 21.1333 132.272 20.4 136.739 20.4C143.072 20.4 148.039 21.8 151.639 24.6C155.239 27.4 157.372 31.1667 158.039 35.9H144.039C143.639 34.5667 142.806 33.5667 141.539 32.9C140.272 32.1667 138.672 31.8 136.739 31.8C134.539 31.8 132.872 32.1667 131.739 32.9C130.606 33.6333 130.039 34.6 130.039 35.8C130.039 36.6 130.406 37.3333 131.139 38C131.939 38.6 133.072 39.1333 134.539 39.6C136.006 40.0667 137.806 40.5333 139.939 41C144.006 41.8667 147.506 42.8 150.439 43.8C153.439 44.8 155.772 46.2667 157.439 48.2C159.106 50.0667 159.906 52.8 159.839 56.4C159.906 59.6667 159.039 62.5667 157.239 65.1C155.506 67.6333 153.006 69.6333 149.739 71.1C146.472 72.5 142.572 73.2 138.039 73.2ZM198.643 72L177.843 44.4L196.343 21.6H214.043L189.143 50.8V38.8L217.243 72H198.643ZM165.043 72V-2.86102e-06H180.043V72H165.043ZM239.509 73.2C234.309 73.2 229.709 72.0667 225.709 69.8C221.776 67.5333 218.676 64.4333 216.409 60.5C214.209 56.5667 213.109 52.0667 213.109 47C213.109 41.8 214.209 37.2333 216.409 33.3C218.676 29.3 221.776 26.1667 225.709 23.9C229.709 21.5667 234.309 20.4 239.509 20.4C246.109 20.4 251.643 22.1333 256.109 25.6C260.643 29.0667 263.509 33.9 264.709 40.1H248.809C248.209 37.9667 247.076 36.3 245.409 35.1C243.743 33.9 241.743 33.3 239.409 33.3C237.209 33.3 235.276 33.8667 233.609 35C232.009 36.0667 230.743 37.6333 229.809 39.7C228.876 41.7 228.409 44.0667 228.409 46.8C228.409 48.8667 228.676 50.7333 229.209 52.4C229.743 54.0667 230.476 55.5 231.409 56.7C232.409 57.9 233.576 58.8333 234.909 59.5C236.243 60.1 237.743 60.4 239.409 60.4C241.009 60.4 242.409 60.1333 243.609 59.6C244.876 59.0667 245.943 58.3 246.809 57.3C247.743 56.3 248.409 55.0667 248.809 53.6H264.709C263.509 59.6 260.643 64.3667 256.109 67.9C251.576 71.4333 246.043 73.2 239.509 73.2ZM294.528 73.2C289.661 73.2 285.295 72.0667 281.428 69.8C277.561 67.5333 274.495 64.4333 272.228 60.5C269.961 56.5 268.828 51.9667 268.828 46.9C268.828 41.7 269.961 37.1333 272.228 33.2C274.495 29.2 277.561 26.0667 281.428 23.8C285.361 21.5333 289.728 20.4 294.528 20.4C299.461 20.4 303.861 21.5333 307.728 23.8C311.595 26.0667 314.661 29.2 316.928 33.2C319.195 37.1333 320.328 41.6667 320.328 46.8C320.328 51.9333 319.195 56.5 316.928 60.5C314.661 64.4333 311.595 67.5333 307.728 69.8C303.861 72.0667 299.461 73.2 294.528 73.2ZM294.528 60.2C296.528 60.2 298.295 59.7 299.828 58.7C301.428 57.7 302.695 56.2 303.628 54.2C304.561 52.2 305.028 49.7333 305.028 46.8C305.028 43.8667 304.561 41.4 303.628 39.4C302.695 37.4 301.461 35.9 299.928 34.9C298.395 33.9 296.628 33.4 294.628 33.4C292.628 33.4 290.828 33.9 289.228 34.9C287.695 35.9 286.461 37.4 285.528 39.4C284.595 41.4 284.128 43.8667 284.128 46.8C284.128 49.7333 284.595 52.2 285.528 54.2C286.461 56.2 287.695 57.7 289.228 58.7C290.828 59.7 292.595 60.2 294.528 60.2ZM325.852 72V21.6H339.152L340.552 30.8C341.885 28.6667 343.452 26.8333 345.252 25.3C347.052 23.7667 349.118 22.5667 351.452 21.7C353.852 20.8333 356.418 20.4 359.152 20.4V36.3H354.152C352.152 36.3 350.318 36.5333 348.652 37C347.052 37.4 345.652 38.1 344.452 39.1C343.318 40.1 342.418 41.4667 341.752 43.2C341.152 44.8667 340.852 46.9667 340.852 49.5V72H325.852ZM383.853 73.2C379.386 73.2 375.32 72.0667 371.653 69.8C368.053 67.5333 365.186 64.4333 363.053 60.5C360.986 56.5 359.953 51.9667 359.953 46.9C359.953 41.7667 361.02 37.2333 363.153 33.3C365.286 29.3 368.186 26.1667 371.853 23.9C375.586 21.5667 379.72 20.4 384.253 20.4C387.72 20.4 390.753 21.0333 393.353 22.3C395.953 23.5 398.086 25.2667 399.753 27.6V-2.86102e-06H414.753V72H401.453L399.753 65.5C398.753 66.9 397.52 68.2 396.053 69.4C394.653 70.5333 392.953 71.4333 390.953 72.1C388.953 72.8333 386.586 73.2 383.853 73.2ZM387.753 60.1C390.22 60.1 392.386 59.5333 394.253 58.4C396.186 57.2667 397.653 55.7 398.653 53.7C399.72 51.7 400.253 49.4 400.253 46.8C400.253 44.2 399.72 41.9 398.653 39.9C397.653 37.9 396.186 36.3333 394.253 35.2C392.386 34.0667 390.22 33.5 387.753 33.5C385.353 33.5 383.186 34.0667 381.253 35.2C379.386 36.3333 377.92 37.9 376.853 39.9C375.786 41.9 375.253 44.1667 375.253 46.7C375.253 49.3 375.786 51.6333 376.853 53.7C377.92 55.7 379.386 57.2667 381.253 58.4C383.186 59.5333 385.353 60.1 387.753 60.1ZM428.762 72.5C426.028 72.5 423.795 71.7 422.062 70.1C420.395 68.4333 419.562 66.4333 419.562 64.1C419.562 61.7 420.395 59.7 422.062 58.1C423.795 56.4333 426.028 55.6 428.762 55.6C431.428 55.6 433.595 56.4333 435.262 58.1C436.928 59.7 437.762 61.7 437.762 64.1C437.762 66.4333 436.928 68.4333 435.262 70.1C433.595 71.7 431.428 72.5 428.762 72.5ZM467.42 73.2C462.22 73.2 457.62 72.0667 453.62 69.8C449.686 67.5333 446.586 64.4333 444.32 60.5C442.12 56.5667 441.02 52.0667 441.02 47C441.02 41.8 442.12 37.2333 444.32 33.3C446.586 29.3 449.686 26.1667 453.62 23.9C457.62 21.5667 462.22 20.4 467.42 20.4C474.02 20.4 479.553 22.1333 484.02 25.6C488.553 29.0667 491.42 33.9 492.62 40.1H476.72C476.12 37.9667 474.986 36.3 473.32 35.1C471.653 33.9 469.653 33.3 467.32 33.3C465.12 33.3 463.186 33.8667 461.52 35C459.92 36.0667 458.653 37.6333 457.72 39.7C456.786 41.7 456.32 44.0667 456.32 46.8C456.32 48.8667 456.586 50.7333 457.12 52.4C457.653 54.0667 458.386 55.5 459.32 56.7C460.32 57.9 461.486 58.8333 462.82 59.5C464.153 60.1 465.653 60.4 467.32 60.4C468.92 60.4 470.32 60.1333 471.52 59.6C472.786 59.0667 473.853 58.3 474.72 57.3C475.653 56.3 476.32 55.0667 476.72 53.6H492.62C491.42 59.6 488.553 64.3667 484.02 67.9C479.486 71.4333 473.953 73.2 467.42 73.2ZM498.238 72V-2.86102e-06H513.238V28.8C514.838 26.2667 517.005 24.2333 519.738 22.7C522.472 21.1667 525.672 20.4 529.338 20.4C533.605 20.4 537.172 21.3 540.038 23.1C542.905 24.9 545.072 27.5333 546.538 31C548.005 34.4 548.738 38.5333 548.738 43.4V72H533.838V44.8C533.838 41.0667 533.038 38.1667 531.438 36.1C529.905 34.0333 527.438 33 524.038 33C522.038 33 520.205 33.5 518.538 34.5C516.872 35.5 515.572 36.9333 514.638 38.8C513.705 40.6 513.238 42.7667 513.238 45.3V72H498.238ZM572.427 73.2C568.227 73.2 564.727 72.5333 561.927 71.2C559.193 69.8667 557.16 68.0667 555.827 65.8C554.56 63.4667 553.927 60.9 553.927 58.1C553.927 55.1 554.66 52.4667 556.127 50.2C557.66 47.8667 560.027 46.0333 563.227 44.7C566.427 43.3 570.46 42.6 575.327 42.6H587.527C587.527 40.3333 587.227 38.4667 586.627 37C586.093 35.5333 585.193 34.4333 583.927 33.7C582.66 32.9667 580.927 32.6 578.727 32.6C576.393 32.6 574.427 33.0667 572.827 34C571.227 34.9333 570.227 36.4 569.827 38.4H555.427C555.76 34.8 556.927 31.6667 558.927 29C560.993 26.3333 563.727 24.2333 567.127 22.7C570.527 21.1667 574.427 20.4 578.827 20.4C583.627 20.4 587.793 21.2 591.327 22.8C594.86 24.3333 597.593 26.6 599.527 29.6C601.527 32.6 602.527 36.3333 602.527 40.8V72H590.027L588.227 64.7C587.493 65.9667 586.627 67.1333 585.627 68.2C584.627 69.2 583.46 70.1 582.127 70.9C580.793 71.6333 579.327 72.2 577.727 72.6C576.127 73 574.36 73.2 572.427 73.2ZM576.127 61.8C577.727 61.8 579.127 61.5333 580.327 61C581.527 60.4667 582.56 59.7333 583.427 58.8C584.293 57.8667 584.993 56.8 585.527 55.6C586.127 54.3333 586.56 52.9667 586.827 51.5V51.4H577.127C575.46 51.4 574.06 51.6333 572.927 52.1C571.86 52.5 571.06 53.1 570.527 53.9C569.993 54.7 569.727 55.6333 569.727 56.7C569.727 57.8333 569.993 58.8 570.527 59.6C571.127 60.3333 571.893 60.9 572.827 61.3C573.827 61.6333 574.927 61.8 576.127 61.8ZM632.299 72C628.633 72 625.399 71.4333 622.599 70.3C619.799 69.1 617.633 67.1667 616.099 64.5C614.566 61.8333 613.799 58.2 613.799 53.6V34.1H605.199V21.6H613.799L615.399 7.4H628.799V21.6H641.699V34.1H628.799V53.8C628.799 55.8 629.233 57.2333 630.099 58.1C631.033 58.9 632.599 59.3 634.799 59.3H641.699V72H632.299Z",fill:"currentColor"})}),W1=t=>{const{inputMessage:e,setInputMessage:n,sendMessage:r,setFiles:i,files:o,showEmojiPicker:s,addEmoji:a,setShowEmojiPicker:l,attachmentPreviews:d,disabled:c=!1}=t,{getConversation:h}=Nt(),m=h(),y=Qe.get("discord-widget"),w=it(null),P=(m==null?void 0:m.status)==="closed"||c,x=()=>{},v=L=>{i(o.filter(F=>(L==null?void 0:L.name)!==F.name))},E=L=>{L&&i([...o,L])},M=()=>{var L;(L=w.current)==null||L.upload()},O=()=>{o.length&&M(),r()},j=L=>{L.key==="Enter"&&(L.shiftKey?(L.preventDefault(),n(`${e}
100
- `)):(L.preventDefault(),O()))};return T("div",{className:"relative border-t border-t-gray-200",children:[s&&T($1,{onPickEmoji:a}),(()=>{if(!(o!=null&&o.length))return null;const L=o.map((F,Y)=>{if(!d[F.name])return null;const{url:Z,width:nt,height:st}=d[F.name];return T(U1,{onDelete:()=>{var _t;i(o.filter(dt=>dt.name!==F.name)),(_t=w.current)==null||_t.clear()},fileName:F.name,width:nt,height:st,imageUrl:Z},`attachment-preview-${Y}`)});return T("div",{className:"m-2",children:L})})(),T("div",{className:"flex items-start gap-2 p-2 bg-white dark:bg-neutral-900",children:[T("textarea",{id:"hs-textarea-ex-1",disabled:P,value:e,onChange:L=>n(L.target.value),onKeyDown:j,className:"flex-1 p-3 block text-base md:text-sm outline-none disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:text-neutral-400 dark:placeholder-neutral-500 resize-none min-h-[55px] max-h-[200px] overflow-y-auto",placeholder:c?"Please introduce yourself first...":"Ask us anything!","data-hs-textarea-auto-height":""}),T("button",{type:"button",disabled:P,onClick:()=>O(),style:{background:P?"#9CA3AF":"linear-gradient(167deg, #7289DA 0%, #5B6EAB 100%)"},"aria-label":"Send message",className:"inline-flex shrink-0 justify-center items-center w-[33px] h-[33px] rounded-lg text-white transform transition-transform duration-150 hover:scale-105 active:scale-95 disabled:opacity-50 disabled:pointer-events-none disabled:transform-none",children:T(j1,{size:16})})]}),T("div",{className:"flex items-center justify-between px-2 py-1.5 bg-white dark:bg-neutral-900",children:[T("div",{className:"flex items-center gap-1",children:[T("div",{className:"inline-flex shrink-0 justify-center items-center size-8 rounded-lg text-gray-500 hover:bg-gray-100 focus:z-10 focus:outline-none focus:bg-gray-100 dark:text-neutral-500 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800 transition-colors duration-150",children:T(F1,{ref:w,accept:"image/*",maxSize:10*1024*1024,uploadConfig:{url:`${le.domain}/conversations/uploadAttachment`,method:"POST",headers:{Authorization:`Bearer ${y}`}},onUploadComplete:x,onUploadStart:v,onFileSelect:E})}),T("button",{type:"button",disabled:P,onClick:P?void 0:()=>l(!s),"aria-label":"Open emoji picker",className:"inline-flex shrink-0 justify-center items-center size-8 rounded-lg text-gray-500 hover:bg-gray-100 focus:z-10 focus:outline-none focus:bg-gray-100 dark:text-neutral-500 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800 disabled:opacity-50 disabled:pointer-events-none transition-colors duration-150",children:T(Tw,{size:16})})]}),T("a",{href:"https://deskcord.chat",target:"_blank",rel:"noopener noreferrer","aria-label":"Powered by Deskcord",className:"flex items-center gap-1 text-[10px] text-gray-400 hover:text-gray-600 dark:text-neutral-600 dark:hover:text-neutral-400 transition-colors duration-200 no-underline",children:[T("span",{children:"Powered by"}),T(z1,{className:"h-[10px] w-auto"})]})]})]})},Dd=t=>{const e=Date.now(),n=Math.floor((e-t)/1e3);return n<60?"Just now":n<3600?`${Math.floor(n/60)}m ago`:n<86400?`${Math.floor(n/3600)}h ago`:`${Math.floor(n/86400)}d ago`},Bd="carousel",Ld="controller",q1="navigation",H1="no-scroll",Ys="portal",G1="root",Fd="toolbar",Xs="loading",Js="error",Zs="complete",K1="placeholder",Y1=t=>`active-slide-${t}`,jd="flex_center",X1="no_scroll",$d="no_scroll_padding",J1="slide_wrapper",rn="prev",on="next",Vd="swipe",Nn="close",Ud="onPointerDown",zd="onPointerMove",Wd="onPointerUp",qd="onPointerLeave",Hd="onPointerCancel",Gd="onKeyDown",Z1="onKeyUp",Kd="onWheel",Q1="Escape",tb="ArrowLeft",eb="ArrowRight",nb="button",Qs="icon",Yd="contain",Xd="cover",rb="Unknown action type",Jd="yarl__";function Be(...t){return[...t].filter(Boolean).join(" ")}function St(t){return`${Jd}${t}`}function oe(t){return`--${Jd}${t}`}function Sr(t,e){return`${t}${e?`_${e}`:""}`}function ta(t){return e=>Sr(t,e)}function ib(t,e){var n;return(n=t==null?void 0:t[e])!==null&&n!==void 0?n:e}function Zd(...t){return()=>{t.forEach(e=>{e()})}}function sn(t,e,n){return()=>{const r=Lt(n);if(!r)throw new Error(`${t} must be used within a ${e}.Provider`);return r}}function Qd(){return typeof window<"u"}function ob(t,e=0){const n=10**e;return Math.round((t+Number.EPSILON)*n)/n}function th(t){return t.type===void 0||t.type==="image"}function sb(t,e){return t.imageFit===Xd||t.imageFit!==Yd&&e===Xd}function vi(t){return typeof t=="string"?Number.parseInt(t,10):t}function wi(t){if(typeof t=="number")return{pixel:t};if(typeof t=="string"){const e=vi(t);return t.endsWith("%")?{percent:e}:{pixel:e}}return{pixel:0}}function ab(t,e){const n=wi(e),r=n.percent!==void 0?t.width/100*n.percent:n.pixel;return{width:Math.max(t.width-2*r,0),height:Math.max(t.height-2*r,0)}}function eh(t,e){return e>0?(t%e+e)%e:0}function nh(t){return t.length>0}function rh(t,e){return t[eh(e,t.length)]}function ea(t,e){return nh(t)?rh(t,e):void 0}function cb(t){return th(t)?t.src:void 0}function lb(t,e,n=0){return Math.min(t.preload,Math.max(t.finite?e.length-1:Math.floor(e.length/2),n))}const ub=Number(sl.split(".")[0])>=19;function fb(t){return{inert:ub?t:t?"":void 0}}const na={open:!1,close:()=>{},index:0,slides:[],render:{},plugins:[],toolbar:{buttons:[Nn]},labels:{},animation:{fade:250,swipe:500,easing:{fade:"ease",swipe:"ease-out",navigation:"ease-in-out"}},carousel:{finite:!1,preload:2,padding:"16px",spacing:"30%",imageFit:Yd,imageProps:{}},controller:{ref:null,focus:!0,aria:!1,touchAction:"none",closeOnPullUp:!1,closeOnPullDown:!1,closeOnBackdropClick:!1,preventDefaultWheelX:!0,preventDefaultWheelY:!1},portal:{},noScroll:{disabled:!1},on:{},styles:{},className:""};function an(t,e){return{name:t,component:e}}function Gt(t,e){return{module:t,children:e}}function ih(t,e,n){return t.module.name===e?n(t):t.children?[Gt(t.module,t.children.flatMap(r=>{var i;return(i=ih(r,e,n))!==null&&i!==void 0?i:[]}))]:[t]}function Dn(t,e,n){return t.flatMap(r=>{var i;return(i=ih(r,e,n))!==null&&i!==void 0?i:[]})}function db(t,e=[],n=[]){let r=t;const i=y=>{const w=[...r];for(;w.length>0;){const _=w.pop();if((_==null?void 0:_.module.name)===y)return!0;_!=null&&_.children&&w.push(..._.children)}return!1},o=(y,w)=>{if(y===""){r=[Gt(w,r)];return}r=Dn(r,y,_=>[Gt(w,[_])])},s=(y,w)=>{r=Dn(r,y,_=>[Gt(_.module,[Gt(w,_.children)])])},a=(y,w,_)=>{r=Dn(r,y,P=>{var x;return[Gt(P.module,[..._?[Gt(w)]:[],...(x=P.children)!==null&&x!==void 0?x:[],..._?[]:[Gt(w)]])]})},l=(y,w,_)=>{r=Dn(r,y,P=>[..._?[Gt(w)]:[],P,..._?[]:[Gt(w)]])},d=y=>{s(Ld,y)},c=(y,w)=>{r=Dn(r,y,_=>[Gt(w,_.children)])},h=y=>{r=Dn(r,y,w=>w.children)},m=y=>{n.push(y)};return e.forEach(y=>{y({contains:i,addParent:o,append:s,addChild:a,addSibling:l,addModule:d,replace:c,remove:h,augment:m})}),{config:r,augmentation:y=>n.reduce((w,_)=>_(w),y)}}const oh=te(null),ra=sn("useDocument","DocumentContext",oh);function hb({nodeRef:t,children:e}){const n=Ht(()=>{const r=o=>{var s;return((s=o||t.current)===null||s===void 0?void 0:s.ownerDocument)||document};return{getOwnerDocument:r,getOwnerWindow:o=>{var s;return((s=r(o))===null||s===void 0?void 0:s.defaultView)||window}}},[t]);return et(oh.Provider,{value:n},e)}const sh=te(null),bi=sn("useEvents","EventsContext",sh);function pb({children:t}){const[e]=gt({});ut(()=>()=>{Object.keys(e).forEach(r=>delete e[r])},[e]);const n=Ht(()=>{const r=(s,a)=>{var l;(l=e[s])===null||l===void 0||l.splice(0,e[s].length,...e[s].filter(d=>d!==a))};return{publish:(...[s,a])=>{var l;(l=e[s])===null||l===void 0||l.forEach(d=>d(a))},subscribe:(s,a)=>(e[s]||(e[s]=[]),e[s].push(a),()=>r(s,a)),unsubscribe:r}},[e]);return et(sh.Provider,{value:n},t)}const ah=te(null),Er=sn("useLightboxProps","LightboxPropsContext",ah);function mb({children:t,...e}){return et(ah.Provider,{value:e},t)}const ch=te(null),_i=sn("useLightboxState","LightboxStateContext",ch),lh=te(null),yb=sn("useLightboxDispatch","LightboxDispatchContext",lh);function gb(t,e){switch(e.type){case"swipe":{const{slides:n}=t,r=(e==null?void 0:e.increment)||0,i=t.globalIndex+r,o=eh(i,n.length),s=ea(n,o),a=r||e.duration?{increment:r,duration:e.duration,easing:e.easing}:void 0;return{slides:n,currentIndex:o,globalIndex:i,currentSlide:s,animation:a}}case"update":return e.slides!==t.slides||e.index!==t.currentIndex?{slides:e.slides,currentIndex:e.index,globalIndex:e.index,currentSlide:ea(e.slides,e.index)}:t;default:throw new Error(rb)}}function vb({slides:t,index:e,children:n}){const[r,i]=Xn(gb,{slides:t,currentIndex:e,globalIndex:e,currentSlide:ea(t,e)});ut(()=>{i({type:"update",slides:t,index:e})},[t,e]);const o=Ht(()=>({...r,state:r,dispatch:i}),[r,i]);return et(lh.Provider,{value:i},et(ch.Provider,{value:o},n))}const uh=te(null),xi=sn("useTimeouts","TimeoutsContext",uh);function wb({children:t}){const[e]=gt([]);ut(()=>()=>{e.forEach(r=>window.clearTimeout(r)),e.splice(0,e.length)},[e]);const n=Ht(()=>{const r=s=>{e.splice(0,e.length,...e.filter(a=>a!==s))};return{setTimeout:(s,a)=>{const l=window.setTimeout(()=>{r(l),s()},a);return e.push(l),l},clearTimeout:s=>{s!==void 0&&(r(s),window.clearTimeout(s))}}},[e]);return et(uh.Provider,{value:n},t)}const fh=$e(function({label:e,className:n,icon:r,renderIcon:i,onClick:o,style:s,...a},l){const{styles:d,labels:c}=Er(),h=ib(c,e);return et("button",{ref:l,type:"button",title:h,"aria-label":h,className:Be(St(nb),n),onClick:o,style:{...s,...d.button},...a},i?i():et(r,{className:St(Qs),style:d.icon}))});function bb(t,e){const n=r=>et("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false",...r},e);return n.displayName=t,n}function Ar(t,e){return bb(t,et("g",{fill:"currentColor"},et("path",{d:"M0 0h24v24H0z",fill:"none"}),e))}const _b=Ar("Close",et("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),xb=Ar("Previous",et("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})),Sb=Ar("Next",et("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),Eb=Ar("Loading",et(Pt,null,Array.from({length:8}).map((t,e,n)=>et("line",{key:e,x1:"12",y1:"6.5",x2:"12",y2:"1.8",strokeLinecap:"round",strokeWidth:"2.6",stroke:"currentColor",strokeOpacity:1/n.length*(e+1),transform:`rotate(${360/n.length*e}, 12, 12)`})))),Ab=Ar("Error",et("path",{d:"M21.9,21.9l-8.49-8.49l0,0L3.59,3.59l0,0L2.1,2.1L0.69,3.51L3,5.83V19c0,1.1,0.9,2,2,2h13.17l2.31,2.31L21.9,21.9z M5,18 l3.5-4.5l2.5,3.01L12.17,15l3,3H5z M21,18.17L5.83,3H19c1.1,0,2,0.9,2,2V18.17z"})),Cr=Qd()?Re:ut;function dh(){const[t,e]=gt(!1);return ut(()=>{var n,r;const i=(n=window.matchMedia)===null||n===void 0?void 0:n.call(window,"(prefers-reduced-motion: reduce)");e(i==null?void 0:i.matches);const o=s=>e(s.matches);return(r=i==null?void 0:i.addEventListener)===null||r===void 0||r.call(i,"change",o),()=>{var s;return(s=i==null?void 0:i.removeEventListener)===null||s===void 0?void 0:s.call(i,"change",o)}},[]),t}function Cb(t){let e=0,n=0,r=0;const o=window.getComputedStyle(t).transform.match(/matrix.*\((.+)\)/);if(o){const s=o[1].split(",").map(vi);s.length===6?(e=s[4],n=s[5]):s.length===16&&(e=s[12],n=s[13],r=s[14])}return{x:e,y:n,z:r}}function hh(t,e){const n=it(),r=it(),i=dh();return Cr(()=>{var o,s,a;if(t.current&&n.current!==void 0&&!i){const{keyframes:l,duration:d,easing:c,onfinish:h}=e(n.current,t.current.getBoundingClientRect(),Cb(t.current))||{};if(l&&d){(o=r.current)===null||o===void 0||o.cancel(),r.current=void 0;try{r.current=(a=(s=t.current).animate)===null||a===void 0?void 0:a.call(s,l,{duration:d,easing:c})}catch(m){console.error(m)}r.current&&(r.current.onfinish=()=>{r.current=void 0,h==null||h()})}}n.current=void 0}),{prepareAnimation:o=>{n.current=o},isAnimationPlaying:()=>{var o;return((o=r.current)===null||o===void 0?void 0:o.playState)==="running"}}}function ph(){const t=it(null),e=it(),[n,r]=gt();return{setContainerRef:kt(o=>{t.current=o,e.current&&(e.current.disconnect(),e.current=void 0);const s=()=>{if(o){const a=window.getComputedStyle(o),l=d=>parseFloat(d)||0;r({width:Math.round(o.clientWidth-l(a.paddingLeft)-l(a.paddingRight)),height:Math.round(o.clientHeight-l(a.paddingTop)-l(a.paddingBottom))})}else r(void 0)};s(),o&&typeof ResizeObserver<"u"&&(e.current=new ResizeObserver(s),e.current.observe(o))},[]),containerRef:t,containerRect:n}}function Si(){const t=it(),{setTimeout:e,clearTimeout:n}=xi();return kt((r,i)=>{n(t.current),t.current=e(r,i>0?i:0)},[e,n])}function Ut(t){const e=it(t);return Cr(()=>{e.current=t}),kt((...n)=>{var r;return(r=e.current)===null||r===void 0?void 0:r.call(e,...n)},[])}function mh(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function ia(t,e){return Ht(()=>t==null&&e==null?null:n=>{mh(t,n),mh(e,n)},[t,e])}function Tb(t,e=!1){const n=it();Cr(()=>{e&&n.current&&(n.current=!1,t())},[e,t]);const r=kt(()=>{n.current=!0},[]),i=kt(()=>{n.current=!1},[]);return{onFocus:r,onBlur:i}}function oa(){const[t,e]=gt(!1);return Cr(()=>{e(window.getComputedStyle(window.document.documentElement).direction==="rtl")},[]),t}function Pb(){const[t]=gt({}),e=kt((i,o)=>{var s;(s=t[i])===null||s===void 0||s.forEach(a=>{o.isPropagationStopped()||a(o)})},[t]),n=Ht(()=>({onPointerDown:i=>e(Ud,i),onPointerMove:i=>e(zd,i),onPointerUp:i=>e(Wd,i),onPointerLeave:i=>e(qd,i),onPointerCancel:i=>e(Hd,i),onKeyDown:i=>e(Gd,i),onKeyUp:i=>e(Z1,i),onWheel:i=>e(Kd,i)}),[e]),r=kt((i,o)=>(t[i]||(t[i]=[]),t[i].unshift(o),()=>{const s=t[i];s&&s.splice(0,s.length,...s.filter(a=>a!==o))}),[t]);return{registerSensors:n,subscribeSensors:r}}function yh(t,e){const n=it(0),r=Si(),i=Ut((...o)=>{n.current=Date.now(),t(o)});return kt((...o)=>{r(()=>{i(o)},e-(Date.now()-n.current))},[e,i,r])}const sa=ta("slide"),aa=ta("slide_image");function kb({slide:t,offset:e,render:n,rect:r,imageFit:i,imageProps:o,onClick:s,onLoad:a,onError:l,style:d}){var c,h,m,y,w,_,P;const[x,v]=gt(Xs),{publish:E}=bi(),{setTimeout:M}=xi(),O=it(null);ut(()=>{e===0&&E(Y1(x))},[e,x,E]);const j=Ut(G=>{("decode"in G?G.decode():Promise.resolve()).catch(()=>{}).then(()=>{G.parentNode&&(v(Zs),M(()=>{a==null||a(G)},0))})}),B=kt(G=>{O.current=G,G!=null&&G.complete&&j(G)},[j]),L=kt(G=>{j(G.currentTarget)},[j]),F=Ut(()=>{v(Js),l==null||l()}),Y=sb(t,i),Z=(G,S)=>Number.isFinite(G)?G:S,nt=Z(Math.max(...((h=(c=t.srcSet)===null||c===void 0?void 0:c.map(G=>G.width))!==null&&h!==void 0?h:[]).concat(t.width?[t.width]:[]).filter(Boolean)),((m=O.current)===null||m===void 0?void 0:m.naturalWidth)||0),st=Z(Math.max(...((w=(y=t.srcSet)===null||y===void 0?void 0:y.map(G=>G.height))!==null&&w!==void 0?w:[]).concat(t.height?[t.height]:[]).filter(Boolean)),((_=O.current)===null||_===void 0?void 0:_.naturalHeight)||0),_t=nt&&st?{maxWidth:`min(${nt}px, 100%)`,maxHeight:`min(${st}px, 100%)`}:{maxWidth:"100%",maxHeight:"100%"},dt=(P=t.srcSet)===null||P===void 0?void 0:P.sort((G,S)=>G.width-S.width).map(G=>`${G.src} ${G.width}w`).join(", "),It=()=>r&&!Y&&t.width&&t.height?r.height/t.height*t.width:Number.MAX_VALUE,at=dt&&r&&Qd()?`${Math.round(Math.min(It(),r.width))}px`:void 0,{style:pt,className:z,...H}=o||{};return et(Pt,null,et("img",{ref:B,onLoad:L,onError:F,onClick:s,draggable:!1,className:Be(St(aa()),Y&&St(aa("cover")),x!==Zs&&St(aa("loading")),z),style:{..._t,...d,...pt},...H,alt:t.alt,sizes:at,srcSet:dt,src:t.src}),x!==Zs&&et("div",{className:St(sa(K1))},x===Xs&&(n!=null&&n.iconLoading?n.iconLoading():et(Eb,{className:Be(St(Qs),St(sa(Xs)))})),x===Js&&(n!=null&&n.iconError?n.iconError():et(Ab,{className:Be(St(Qs),St(sa(Js)))}))))}const Ob=$e(function({className:e,children:n,...r},i){const o=it(null);return et(hb,{nodeRef:o},et("div",{ref:ia(i,o),className:Be(St("root"),e),...r},n))});var Qt;(function(t){t[t.NONE=0]="NONE",t[t.SWIPE=1]="SWIPE",t[t.PULL=2]="PULL",t[t.ANIMATION=3]="ANIMATION"})(Qt||(Qt={}));function Ib(t,e,n,r,i){ut(()=>Zd(t(Ud,e),t(zd,n),t(Wd,r),t(qd,r),t(Hd,r)),[t,e,n,r,i])}var ve;(function(t){t[t.NONE=0]="NONE",t[t.SWIPE=1]="SWIPE",t[t.PULL=2]="PULL"})(ve||(ve={}));const ca=30;function Rb(t,e,n,r,i,o,s,a,l,d,c,h,m,y){const w=it(0),_=it([]),P=it(),x=it(0),v=it(ve.NONE),E=kt(F=>{P.current===F.pointerId&&(P.current=void 0,v.current=ve.NONE);const Y=_.current;Y.splice(0,Y.length,...Y.filter(Z=>Z.pointerId!==F.pointerId))},[]),M=kt(F=>{E(F),F.persist(),_.current.push(F)},[E]),O=Ut(F=>{M(F)}),j=(F,Y)=>d&&F>Y||l&&F<-Y,B=Ut(F=>{if(_.current.find(Y=>Y.pointerId===F.pointerId)&&P.current===F.pointerId){const Y=Date.now()-x.current,Z=w.current;v.current===ve.SWIPE?Math.abs(Z)>.3*n||Math.abs(Z)>5&&Y<r?s(Z,Y):a(Z):v.current===ve.PULL&&(j(Z,2*ca)?m(Z,Y):y(Z)),w.current=0,v.current=ve.NONE}E(F)}),L=Ut(F=>{const Y=_.current.find(Z=>Z.pointerId===F.pointerId);if(Y){const Z=P.current===F.pointerId;if(F.buttons===0){Z&&w.current!==0?B(F):E(Y);return}const nt=F.clientX-Y.clientX,st=F.clientY-Y.clientY;if(P.current===void 0){const _t=dt=>{M(F),P.current=F.pointerId,x.current=Date.now(),v.current=dt};Math.abs(nt)>Math.abs(st)&&Math.abs(nt)>ca&&e(nt)?(_t(ve.SWIPE),i()):Math.abs(st)>Math.abs(nt)&&j(st,ca)&&(_t(ve.PULL),c())}else Z&&(v.current===ve.SWIPE?(w.current=nt,o(nt)):v.current===ve.PULL&&(w.current=st,h(st)))}});Ib(t,O,L,B)}function Mb({preventDefaultWheelX:t,preventDefaultWheelY:e}){const n=it(null),r=Ut(i=>{const o=Math.abs(i.deltaX)>Math.abs(i.deltaY);(o&&t||!o&&e||i.ctrlKey)&&i.preventDefault()});return kt(i=>{var o;i?i.addEventListener("wheel",r,{passive:!1}):(o=n.current)===null||o===void 0||o.removeEventListener("wheel",r),n.current=i},[r])}function Nb(t,e,n,r,i,o,s,a,l){const d=it(0),c=it(0),h=it(),m=it(),y=it(0),w=it(),_=it(0),{setTimeout:P,clearTimeout:x}=xi(),v=kt(()=>{h.current&&(x(h.current),h.current=void 0)},[x]),E=kt(()=>{m.current&&(x(m.current),m.current=void 0)},[x]),M=Ut(()=>{t!==Qt.SWIPE&&(d.current=0,_.current=0,v(),E())});ut(M,[t,M]);const O=Ut(B=>{m.current=void 0,d.current===B&&l(d.current)}),j=Ut(B=>{if(B.ctrlKey||Math.abs(B.deltaY)>Math.abs(B.deltaX))return;const L=F=>{y.current=F,x(w.current),w.current=F>0?P(()=>{y.current=0,w.current=void 0},300):void 0};if(t===Qt.NONE){if(Math.abs(B.deltaX)<=1.2*Math.abs(y.current)){L(B.deltaX);return}if(!n(-B.deltaX))return;if(c.current+=B.deltaX,v(),Math.abs(c.current)>30)c.current=0,L(0),_.current=Date.now(),o();else{const F=c.current;h.current=P(()=>{h.current=void 0,F===c.current&&(c.current=0)},i)}}else if(t===Qt.SWIPE){let F=d.current-B.deltaX;if(F=Math.min(Math.abs(F),r)*Math.sign(F),d.current=F,s(F),E(),Math.abs(F)>.2*r){L(B.deltaX),a(F,Date.now()-_.current);return}m.current=P(()=>O(F),2*i)}else L(B.deltaX)});ut(()=>e(Kd,j),[e,j])}const gh=ta("container"),vh=te(null),Tr=sn("useController","ControllerContext",vh);function Db({children:t,...e}){var n;const{carousel:r,animation:i,controller:o,on:s,styles:a,render:l}=e,{closeOnPullUp:d,closeOnPullDown:c,preventDefaultWheelX:h,preventDefaultWheelY:m}=o,[y,w]=gt(),_=_i(),P=yb(),[x,v]=gt(Qt.NONE),E=it(0),M=it(0),O=it(1),{registerSensors:j,subscribeSensors:B}=Pb(),{subscribe:L,publish:F}=bi(),Y=Si(),Z=Si(),nt=Si(),{containerRef:st,setContainerRef:_t,containerRect:dt}=ph(),It=ia(Mb({preventDefaultWheelX:h,preventDefaultWheelY:m}),_t),at=it(null),pt=ia(at,void 0),{getOwnerDocument:z}=ra(),H=oa(),G=J=>(H?-1:1)*(typeof J=="number"?J:1),S=Ut(()=>{var J;return(J=st.current)===null||J===void 0?void 0:J.focus()}),N=Ut(()=>e),b=Ut(()=>_),A=kt(J=>F(rn,J),[F]),I=kt(J=>F(on,J),[F]),W=kt(()=>F(Nn),[F]),$=J=>!(r.finite&&(G(J)>0&&_.currentIndex===0||G(J)<0&&_.currentIndex===_.slides.length-1)),q=J=>{var vt;E.current=J,(vt=st.current)===null||vt===void 0||vt.style.setProperty(oe("swipe_offset"),`${Math.round(J)}px`)},K=J=>{var vt,Et;M.current=J,O.current=(()=>{const X=c&&J>0?J:d&&J<0?-J:0;return Math.min(Math.max(ob(1-X/60*(1-.5),2),.5),1)})(),(vt=st.current)===null||vt===void 0||vt.style.setProperty(oe("pull_offset"),`${Math.round(J)}px`),(Et=st.current)===null||Et===void 0||Et.style.setProperty(oe("pull_opacity"),`${O.current}`)},{prepareAnimation:rt}=hh(at,(J,vt,Et)=>{if(at.current&&dt)return{keyframes:[{transform:`translate(0, ${J.rect.y-vt.y+Et.y}px)`,opacity:J.opacity},{transform:"translate(0, 0)",opacity:1}],duration:J.duration,easing:i.easing.fade}}),ht=(J,vt)=>{if(d||c){K(J);let Et=0;at.current&&(Et=i.fade*(vt?2:1),rt({rect:at.current.getBoundingClientRect(),opacity:O.current,duration:Et})),nt(()=>{K(0),v(Qt.NONE)},Et),v(Qt.ANIMATION),vt||W()}},{prepareAnimation:wt,isAnimationPlaying:Tt}=hh(at,(J,vt,Et)=>{var k;if(at.current&&dt&&(!((k=_.animation)===null||k===void 0)&&k.duration)){const R=wi(r.spacing),X=(R.percent?R.percent*dt.width/100:R.pixel)||0;return{keyframes:[{transform:`translate(${G(_.globalIndex-J.index)*(dt.width+X)+J.rect.x-vt.x+Et.x}px, 0)`},{transform:"translate(0, 0)"}],duration:_.animation.duration,easing:_.animation.easing}}}),$t=Ut(J=>{var vt,Et;const k=J.offset||0,R=k?i.swipe:(vt=i.navigation)!==null&&vt!==void 0?vt:i.swipe,X=!k&&!Tt()?i.easing.navigation:i.easing.swipe;let{direction:tt}=J;const Q=(Et=J.count)!==null&&Et!==void 0?Et:1;let ct=Qt.ANIMATION,p=R*Q;if(!tt){const f=dt==null?void 0:dt.width,g=J.duration||0,C=f?R/f*Math.abs(k):R;Q!==0?(g<C?p=p/C*Math.max(g,C/5):f&&(p=R/f*(f-Math.abs(k))),tt=G(k)>0?rn:on):p=R/2}let u=0;tt===rn?$(G(1))?u=-Q:(ct=Qt.NONE,p=R):tt===on&&($(G(-1))?u=Q:(ct=Qt.NONE,p=R)),p=Math.round(p),Z(()=>{q(0),v(Qt.NONE)},p),at.current&&wt({rect:at.current.getBoundingClientRect(),index:_.globalIndex}),v(ct),F(Vd,{type:"swipe",increment:u,duration:p,easing:X})});ut(()=>{var J,vt;!((J=_.animation)===null||J===void 0)&&J.increment&&(!((vt=_.animation)===null||vt===void 0)&&vt.duration)&&Y(()=>P({type:"swipe",increment:0}),_.animation.duration)},[_.animation,P,Y]);const Yt=[B,$,(dt==null?void 0:dt.width)||0,i.swipe,()=>v(Qt.SWIPE),J=>q(J),(J,vt)=>$t({offset:J,duration:vt,count:1}),J=>$t({offset:J,count:0})],Jt=[()=>{c&&v(Qt.PULL)},J=>K(J),J=>ht(J),J=>ht(J,!0)];Rb(...Yt,d,c,...Jt),Nb(x,...Yt);const qt=Ut(()=>{o.focus&&z().querySelector(`.${St(Ys)} .${St(gh())}`)&&S()});ut(qt,[qt]);const U=Ut(()=>{var J;(J=s.view)===null||J===void 0||J.call(s,{index:_.currentIndex})});ut(U,[_.globalIndex,U]),ut(()=>Zd(L(rn,J=>$t({direction:rn,...J})),L(on,J=>$t({direction:on,...J})),L(Vd,J=>P(J))),[L,$t,P]);const me=Ht(()=>({prev:A,next:I,close:W,focus:S,slideRect:dt?ab(dt,r.padding):{width:0,height:0},containerRect:dt||{width:0,height:0},subscribeSensors:B,containerRef:st,setCarouselRef:pt,toolbarWidth:y,setToolbarWidth:w}),[A,I,W,S,B,dt,st,pt,y,w,r.padding]);return Jn(o.ref,()=>({prev:A,next:I,close:W,focus:S,getLightboxProps:N,getLightboxState:b}),[A,I,W,S,N,b]),et("div",{ref:It,className:Be(St(gh()),St(jd)),style:{...x===Qt.SWIPE?{[oe("swipe_offset")]:`${Math.round(E.current)}px`}:null,...x===Qt.PULL?{[oe("pull_offset")]:`${Math.round(M.current)}px`,[oe("pull_opacity")]:`${O.current}`}:null,...o.touchAction!=="none"?{[oe("controller_touch_action")]:o.touchAction}:null,...a.container},...o.aria?{role:"presentation","aria-live":"polite"}:null,tabIndex:-1,...j},dt&&et(vh.Provider,{value:me},t,(n=l.controls)===null||n===void 0?void 0:n.call(l)))}const Bb=an(Ld,Db);function cn(t){return Sr(Bd,t)}function wh(t){return Sr("slide",t)}function Lb({slide:t,offset:e}){const n=it(null),{currentIndex:r}=_i(),{slideRect:i,close:o,focus:s}=Tr(),{render:a,carousel:{imageFit:l,imageProps:d},on:{click:c},controller:{closeOnBackdropClick:h},styles:{slide:m}}=Er(),{getOwnerDocument:y}=ra(),w=e!==0;ut(()=>{var x;w&&(!((x=n.current)===null||x===void 0)&&x.contains(y().activeElement))&&s()},[w,s,y]);const _=()=>{var x,v,E,M;let O=(x=a.slide)===null||x===void 0?void 0:x.call(a,{slide:t,offset:e,rect:i});return!O&&th(t)&&(O=et(kb,{slide:t,offset:e,render:a,rect:i,imageFit:l,imageProps:d,onClick:w?void 0:()=>c==null?void 0:c({index:r})})),O?et(Pt,null,(v=a.slideHeader)===null||v===void 0?void 0:v.call(a,{slide:t}),((E=a.slideContainer)!==null&&E!==void 0?E:({children:j})=>j)({slide:t,children:O}),(M=a.slideFooter)===null||M===void 0?void 0:M.call(a,{slide:t})):null},P=x=>{const v=n.current,E=x.target instanceof HTMLElement?x.target:void 0;h&&E&&v&&(E===v||Array.from(v.children).find(M=>M===E)&&E.classList.contains(St(J1)))&&o()};return et("div",{ref:n,className:Be(St(wh()),!w&&St(wh("current")),St(jd)),...fb(w),onClick:P,style:m},_())}function Fb(){const t=Er().styles.slide;return et("div",{className:St("slide"),style:t})}function jb({carousel:t}){const{slides:e,currentIndex:n,globalIndex:r}=_i(),{setCarouselRef:i}=Tr(),o=wi(t.spacing),s=wi(t.padding),a=lb(t,e,1),l=[];if(nh(e))for(let d=n-a;d<=n+a;d+=1){const c=rh(e,d),h=r-n+d,m=t.finite&&(d<0||d>e.length-1);l.push(m?{key:h}:{key:[`${h}`,cb(c)].filter(Boolean).join("|"),offset:d-n,slide:c})}return et("div",{ref:i,className:Be(St(cn()),l.length>0&&St(cn("with_slides"))),style:{[`${oe(cn("slides_count"))}`]:l.length,[`${oe(cn("spacing_px"))}`]:o.pixel||0,[`${oe(cn("spacing_percent"))}`]:o.percent||0,[`${oe(cn("padding_px"))}`]:s.pixel||0,[`${oe(cn("padding_percent"))}`]:s.percent||0}},l.map(({key:d,slide:c,offset:h})=>c?et(Lb,{key:d,slide:c,offset:h}):et(Fb,{key:d})))}const $b=an(Bd,jb);function bh(){const{carousel:t}=Er(),{slides:e,currentIndex:n}=_i(),r=e.length===0||t.finite&&n===0,i=e.length===0||t.finite&&n===e.length-1;return{prevDisabled:r,nextDisabled:i}}function Vb(t){var e;const n=oa(),{publish:r}=bi(),{animation:i}=Er(),{prevDisabled:o,nextDisabled:s}=bh(),a=((e=i.navigation)!==null&&e!==void 0?e:i.swipe)/2,l=yh(()=>r(rn),a),d=yh(()=>r(on),a),c=Ut(h=>{switch(h.key){case Q1:r(Nn);break;case tb:(n?s:o)||(n?d:l)();break;case eb:(n?o:s)||(n?l:d)();break}});ut(()=>t(Gd,c),[t,c])}function _h({label:t,icon:e,renderIcon:n,action:r,onClick:i,disabled:o,style:s}){return et(fh,{label:t,icon:e,renderIcon:n,className:St(`navigation_${r}`),disabled:o,onClick:i,style:s,...Tb(Tr().focus,o)})}function Ub({render:{buttonPrev:t,buttonNext:e,iconPrev:n,iconNext:r},styles:i}){const{prev:o,next:s,subscribeSensors:a}=Tr(),{prevDisabled:l,nextDisabled:d}=bh();return Vb(a),et(Pt,null,t?t():et(_h,{label:"Previous",action:rn,icon:xb,renderIcon:n,style:i.navigationPrev,disabled:l,onClick:o}),e?e():et(_h,{label:"Next",action:on,icon:Sb,renderIcon:r,style:i.navigationNext,disabled:d,onClick:s}))}const zb=an(q1,Ub),xh=St(X1),Wb=St($d);function qb(t){return"style"in t}function Sh(t,e,n){const r=window.getComputedStyle(t),i=n?"padding-left":"padding-right",o=n?r.paddingLeft:r.paddingRight,s=t.style.getPropertyValue(i);return t.style.setProperty(i,`${(vi(o)||0)+e}px`),()=>{s?t.style.setProperty(i,s):t.style.removeProperty(i)}}function Hb({noScroll:{disabled:t},children:e}){const n=oa(),{getOwnerDocument:r,getOwnerWindow:i}=ra();return ut(()=>{if(t)return()=>{};const o=[],s=i(),{body:a,documentElement:l}=r(),d=Math.round(s.innerWidth-l.clientWidth);if(d>0){o.push(Sh(a,d,n));const c=a.getElementsByTagName("*");for(let h=0;h<c.length;h+=1){const m=c[h];qb(m)&&s.getComputedStyle(m).getPropertyValue("position")==="fixed"&&!m.classList.contains(Wb)&&o.push(Sh(m,d,n))}}return a.classList.add(xh),()=>{a.classList.remove(xh),o.forEach(c=>c())}},[n,t,r,i]),et(Pt,null,e)}const Gb=an(H1,Hb);function Eh(t){return Sr(Ys,t)}function Ah(t,e,n){const r=t.getAttribute(e);return t.setAttribute(e,n),()=>{r?t.setAttribute(e,r):t.removeAttribute(e)}}function Kb({children:t,animation:e,styles:n,className:r,on:i,portal:o,close:s}){const[a,l]=gt(!1),[d,c]=gt(!1),h=it([]),m=it(null),{setTimeout:y}=xi(),{subscribe:w}=bi(),P=dh()?0:e.fade;ut(()=>(l(!0),()=>{l(!1),c(!1)}),[]);const x=Ut(()=>{h.current.forEach(O=>O()),h.current=[]}),v=Ut(()=>{var O;c(!1),x(),(O=i.exiting)===null||O===void 0||O.call(i),y(()=>{var j;(j=i.exited)===null||j===void 0||j.call(i),s()},P)});ut(()=>w(Nn,v),[w,v]);const E=Ut(O=>{var j,B,L;O.scrollTop,c(!0),(j=i.entering)===null||j===void 0||j.call(i);const F=(L=(B=O.parentNode)===null||B===void 0?void 0:B.children)!==null&&L!==void 0?L:[];for(let Y=0;Y<F.length;Y+=1){const Z=F[Y];["TEMPLATE","SCRIPT","STYLE"].indexOf(Z.tagName)===-1&&Z!==O&&(h.current.push(Ah(Z,"inert","")),h.current.push(Ah(Z,"aria-hidden","true")))}h.current.push(()=>{var Y,Z;(Z=(Y=m.current)===null||Y===void 0?void 0:Y.focus)===null||Z===void 0||Z.call(Y)}),y(()=>{var Y;(Y=i.entered)===null||Y===void 0||Y.call(i)},P)}),M=kt(O=>{O?E(O):x()},[E,x]);return a?yo(et(Ob,{ref:M,className:Be(r,St(Eh()),St($d),d&&St(Eh("open"))),role:"presentation","aria-live":"polite",style:{...e.fade!==na.animation.fade?{[oe("fade_animation_duration")]:`${P}ms`}:null,...e.easing.fade!==na.animation.easing.fade?{[oe("fade_animation_timing_function")]:e.easing.fade}:null,...n.root},onFocus:O=>{m.current||(m.current=O.relatedTarget)}},t),o.root||document.body):null}const Yb=an(Ys,Kb);function Xb({children:t}){return et(Pt,null,t)}const Jb=an(G1,Xb);function Zb(t){return Sr(Fd,t)}function Qb({toolbar:{buttons:t},render:{buttonClose:e,iconClose:n},styles:r}){const{close:i,setToolbarWidth:o}=Tr(),{setContainerRef:s,containerRect:a}=ph();Cr(()=>{o(a==null?void 0:a.width)},[o,a==null?void 0:a.width]);const l=()=>e?e():et(fh,{key:Nn,label:"Close",icon:_b,renderIcon:n,onClick:i});return et("div",{ref:s,style:r.toolbar,className:St(Zb())},t==null?void 0:t.map(d=>d===Nn?l():d))}const t_=an(Fd,Qb);function Ch(t,e){var n;return et(t.module.component,{key:t.module.name,...e},(n=t.children)===null||n===void 0?void 0:n.map(r=>Ch(r,e)))}function e_(t,e={}){const{easing:n,...r}=t,{easing:i,...o}=e;return{easing:{...n,...i},...r,...o}}function n_({carousel:t,animation:e,render:n,toolbar:r,controller:i,noScroll:o,on:s,plugins:a,slides:l,index:d,...c}){const{animation:h,carousel:m,render:y,toolbar:w,controller:_,noScroll:P,on:x,slides:v,index:E,plugins:M,...O}=na,{config:j,augmentation:B}=db([Gt(Yb,[Gt(Gb,[Gt(Bb,[Gt($b),Gt(t_),Gt(zb)])])])],a||M),L=B({animation:e_(h,e),carousel:{...m,...t},render:{...y,...n},toolbar:{...w,...r},controller:{..._,...i},noScroll:{...P,...o},on:{...x,...s},...O,...c});return L.open?et(mb,{...L},et(vb,{slides:l||v,index:vi(d||E)},et(wb,null,et(pb,null,Ch(Gt(Jb,j),L))))):null}function Th(t){var e;return t.contentType?t.contentType==="image/gif":((e=t.name)==null?void 0:e.toLowerCase().endsWith(".gif"))??!1}const Ph=({messageIndexKey:t,attachments:e})=>{const{setFullScreen:n}=Nt(),[r,i]=gt(!1),o=Lt(vm);function s(){if(o){const c=o.getElementById("deskcord-lightbox-portal");if(c)return c}const d=document.getElementById("deskcord-lightbox-portal");return d||document.body}const a=(e==null?void 0:e.filter(d=>!Th(d)))??[];function l(){return a.length?T(n_,{open:r,portal:{root:s()},close:()=>{i(!1),n(!1)},slides:a.map(d=>({src:d.proxyURL}))}):null}return e!=null&&e.length?T("div",{children:[e.map((d,c)=>{const{proxyURL:h,width:m,height:y}=d;return Th(d)?T("div",{children:T("img",{src:h,alt:"GIF",className:`rounded-lg w-[${m}px] h-[${y}px] max-w-[200px] max-h-[200px] aspect-auto`})},`conv-cus-attachment-${t}-${c}`):T("div",{onClick:()=>{n(!0),i(!0)},className:"cursor-pointer",children:T("img",{src:h,alt:"Preview",className:`rounded-lg w-[${m}px] h-[${y}px] max-w-[200px] max-h-[200px] aspect-auto`})},`conv-cus-attachment-${t}-${c}`)}),l()]},`conv-cus-attachment-${t}`):null},kh=({imageUrls:t,messageIndexKey:e})=>t.length?T("div",{className:"flex flex-col gap-1 mt-1",children:t.map((n,r)=>T("div",{className:"inline-block",children:T("img",{src:n,alt:"Inline image",className:"rounded-lg max-w-[200px] max-h-[200px] object-contain",loading:"lazy"})},`inline-img-${e}-${r}`))}):null,r_=["tenor.com","giphy.com","imgur.com","gfycat.com","media.discordapp.net","cdn.discordapp.com","i.redd.it","i.imgur.com"],i_=[".gif",".jpg",".jpeg",".png",".webp",".apng"];function o_(t){try{const e=new URL(t),n=e.pathname.toLowerCase(),r=e.hostname.toLowerCase();for(const i of i_)if(n.endsWith(i))return!0;for(const i of r_)if(r===i||r.endsWith(`.${i}`))return!0;return!1}catch{return!1}}const s_=/https?:\/\/[^\s<>]+/gi;function Oh(t){if(!t)return{text:"",imageUrls:[]};const e=[];let n=t;const r=t.match(s_);if(r)for(const i of r)o_(i)&&(e.push(i),n=n.replace(i,""));return n=n.replace(/\s+/g," ").trim(),{text:n,imageUrls:e}}const a_=({renderTimestamp:t,message:e,indexKey:n})=>{function r(s,a){const l=/<\w?:\w+:\d+>/g,d=s.split(l),c=s.match(l)??[],h=[];for(let m=0;m<d.length;m++)if(h.push(d[m]),c[m]){const y=a[c[m]];y&&h.push(T("img",{src:y.imageURL,alt:"",style:{display:"inline-block",width:"20px",height:"20px"}},m))}return h}const{text:i,imageUrls:o}=Oh(e.content??"");return T("li",{className:"flex flex-col items-start max-w-lg gap-x-2 sm:gap-x-4 me-11",children:[i&&T("div",{style:{background:"linear-gradient(167deg, #27292A 0%, #404547 100%)"},className:"text-white text-sm min-w-10 inline-block rounded-lg px-3 py-2 shadow-sm",children:r(i,e.emojis??{})}),T(kh,{imageUrls:o,messageIndexKey:n}),T("div",{className:"flex flex-1",children:T(Ph,{attachments:e.attachments,messageIndexKey:n})}),t&&T("div",{children:T("span",{className:"mt-1.5 flex items-center gap-x-1 text-xs text-gray-500",children:[e.authorName," · ",Dd(e.date)," ",e.edited?"(edited)":""]})})]},`conv-cs-${n}`)},c_=({message:t,indexKey:e})=>{const{text:n,imageUrls:r}=Oh(t.content??"");return T("li",{className:`flex flex-col items-end ms-auto my-[3px] ${t.pending?"opacity-80":""}`,children:[n&&T("div",{className:"grow",children:T("div",{style:{background:"linear-gradient(167deg, #7289DA 0%, #5B6EAB 100%)"},className:"min-w-10 inline-block rounded-lg px-3 py-2 shadow-sm",children:T("p",{className:"text-left text-sm text-white",children:n})})}),T(kh,{imageUrls:r,messageIndexKey:e}),t.attachments&&T("div",{className:"flex flex-1 justify-end",children:T(Ph,{attachments:t.attachments,messageIndexKey:e})},`conv-cus-${e}-attachments`)]},`conv-cus-${e}`)},l_=({message:t,indexKey:e})=>T("li",{className:"max-w-lg flex gap-x-2 sm:gap-x-4 me-11",children:T("div",{className:"bg-white border border-gray-200 rounded-2xl p-4 space-y-3 dark:bg-neutral-900 dark:border-neutral-700",children:T("p",{className:"mb-1.5 text-sm text-gray-800 dark:text-white",children:t.content})})},`conv-system-${e}`),u_=()=>{const{setEmail:t,setUsername:e,username:n,email:r,token:i}=Nt(),[o,s]=gt(r),[a,l]=gt(n),[d,c]=gt(""),[h,m]=gt(!1),y=x=>/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(x),w=!!n&&!!r,_=x=>{if(x.preventDefault(),!!a.trim()){if(!y(o)){c("Please enter a valid email address");return}h||(m(!0),c(""),t(o),e(a))}};function P(){return T("form",{onSubmit:_,className:"w-full space-y-4",children:[T("div",{className:"mb-4",children:[T("h3",{className:"text-base font-semibold text-gray-900 mb-1",children:"Let's get started"}),T("p",{className:"text-sm text-gray-600",children:"Tell us a bit about yourself so we can assist you better."})]}),T("div",{children:[T("label",{htmlFor:"name",className:"block text-sm font-medium text-gray-700 mb-2",children:"Your name"}),T("div",{className:"relative",children:[T("div",{className:"absolute inset-y-0 start-0 flex items-center pointer-events-none z-20 ps-3.5",children:T(kw,{size:18,className:"text-gray-400"})}),T("input",{type:"text",id:"name",value:a,onChange:x=>l(x.target.value),name:"name",className:"py-2.5 px-4 ps-11 block w-full bg-white border border-gray-300 rounded-lg text-base md:text-sm text-gray-900 placeholder-gray-500 transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-[#7289DA] focus:ring-opacity-50 focus:border-transparent disabled:bg-gray-100 disabled:text-gray-500 disabled:cursor-not-allowed",placeholder:"John Smith",disabled:w,required:!0})]})]}),T("div",{children:[T("label",{htmlFor:"email",className:"block text-sm font-medium text-gray-700 mb-2",children:"Email address"}),T("div",{className:"relative",children:[T("div",{className:"absolute inset-y-0 start-0 flex items-center pointer-events-none z-20 ps-3.5",children:T(Sw,{size:18,className:"text-gray-400"})}),T("input",{type:"email",id:"email",value:o,onChange:x=>{s(x.target.value),d&&c("")},name:"email",className:`py-2.5 px-4 ps-11 block w-full bg-white rounded-lg text-base md:text-sm text-gray-900 placeholder-gray-500 transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-opacity-50 focus:border-transparent disabled:bg-gray-100 disabled:text-gray-500 disabled:cursor-not-allowed border ${d?"border-red-500 focus:ring-red-500":"border-gray-300 focus:ring-[#7289DA]"}`,placeholder:"you@example.com",disabled:w,required:!0})]}),d&&T("p",{className:"text-red-600 text-sm mt-2 flex items-center gap-1",children:[T("span",{className:"inline-block w-1 h-1 bg-red-600 rounded-full"}),d]})]}),T("p",{className:"text-xs text-gray-500 text-center",children:"We'll never share your information"}),!n||!r?T("button",{type:"submit",className:"w-full py-2.5 px-4 bg-[#7289DA] hover:bg-[#5B6EAB] text-white font-medium text-sm rounded-lg transition-all duration-200 transform hover:shadow-md active:scale-95 focus:outline-none focus:ring-2 focus:ring-[#7289DA] focus:ring-opacity-50 disabled:opacity-50 disabled:cursor-not-allowed",disabled:h,children:"Start Chatting"}):null]})}return T(Pt,{children:[T("li",{className:`max-w-lg flex gap-x-2 sm:gap-x-4 me-11 ${i?"opacity-75":""}`,children:T("div",{className:"w-full rounded-xl p-5 bg-white shadow-lg border border-gray-100 overflow-hidden",children:P()})}),n&&r&&T("li",{className:"flex ms-auto my-4 animate-slide-in",style:{marginTop:"1rem"},children:T("div",{className:"grow",children:T("div",{style:{background:"linear-gradient(167deg, #7289DA 0%, #5B6EAB 100%)"},className:"min-w-10 inline-block rounded-lg px-4 py-2 shadow-sm flex items-center gap-2",children:[T(_w,{size:16,className:"text-white flex-shrink-0"}),T("p",{className:"text-sm text-white font-medium",children:["Nice to meet you, ",T("span",{className:"font-semibold",children:n}),"! Feel free to ask us anything."]})]})})})]})};function f_(t,e){const n=it();ut(()=>{n.current=t},[t]),ut(()=>{function r(){var i;(i=n==null?void 0:n.current)==null||i.call(n)}if(e!==null){const i=setInterval(r,e);return()=>clearInterval(i)}},[e])}function d_(t,e=!1,n=1){const r=e?1e3:1024;if(Math.abs(t)<r)return t+" B";const i=e?["kB","MB","GB","TB","PB","EB","ZB","YB"]:["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];let o=-1;const s=10**n;do t/=r,++o;while(Math.round(Math.abs(t)*s)/s>=r&&o<i.length-1);return t.toFixed(n)+" "+i[o]}const h_=({indexKey:t,message:e})=>{const n=e.customRendererProps.file,r=n.status==="error",[i,o]=gt(!0),[s,a]=gt(0);return f_(()=>{s<88?a(s+2.5):o(!1)},i&&!r?250:null),T("li",{className:"max-w-lg flex gap-x-2 sm:gap-x-4",style:{marginTop:"20px",marginBottom:"20px"},children:T("div",{className:"w-full bg-white border border-gray-200 rounded-2xl p-4 space-y-4",children:T("div",{children:[T("div",{className:"mb-2 flex justify-between items-center",children:[T("div",{className:"flex items-center gap-x-3",children:[T("span",{className:`size-8 flex ${r?"text-red-500":"text-blue-600"} justify-center items-center border border-gray-200 rounded-lg dark:border-neutral-700 dark:text-neutral-500`,children:T(xw,{})}),T("div",{children:[T("p",{className:`text-sm ${r?"font-semibold text-red-500":"font-medium text-gray-800"}`,children:n.fileName}),T("p",{className:"text-xs text-gray-500 dark:text-neutral-500",children:d_(n.size)})]})]}),r&&T("div",{className:"inline-flex items-center gap-x-2",children:T("span",{className:"relative",children:[T("svg",{className:"shrink-0 size-4 text-red-500",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",children:T("path",{d:"M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"})}),T("span",{className:"sr-only",children:"Danger"})]})})]}),T("div",{className:"flex items-center gap-x-3 whitespace-nowrap",children:[T("div",{className:"flex w-full h-2 bg-gray-200 rounded-full overflow-hidden dark:bg-neutral-700",role:"progressbar",children:T("div",{className:`flex flex-col justify-center rounded-full overflow-hidden ${r?"bg-red-500":"bg-blue-600"} text-xs text-white text-center whitespace-nowrap transition duration-500 dark:bg-blue-500`,style:{width:`${s}%`}})}),T("div",{className:"w-6 text-end",children:T("span",{className:"text-sm text-gray-800 dark:text-white",children:[Math.round(s),"%"]})})]})]})})},`conv-fileupload-${t}`)},p_=({conversation:t,open:e})=>{const n=it(!1),{isChatOpen:r}=Nt();ut(()=>{r?n.current=!0:n.current=!1},[r]);function i(l,d){const c=`${l.date}-${d}`;let h;if(typeof l.customRenderer<"u")switch(l.customRenderer){case Mn.IntroduceYourself:h=T(u_,{});break;case Mn.UploadFile:h=T(h_,{message:l,indexKey:c});break;default:h=a(l,c)}else l.authorName===xr?h=a(l,c):l.support?h=o(l,c):h=s(l,c);return r&&(l.pending??(l.support&&n.current))?T(De.li,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:h},c):T("li",{children:h},c)}function o(l,d){var y;const c=(y=t==null?void 0:t.messages)==null?void 0:y.filter(w=>w.support),h=c==null?void 0:c[c.length-1],m=l.date===(h==null?void 0:h.date);return T(a_,{renderTimestamp:m,message:l,indexKey:d})}function s(l,d){return T(c_,{message:l,indexKey:d})}function a(l,d){return T(l_,{message:l,indexKey:d})}return T("ul",{className:"space-y-[3px]",children:[[...(t==null?void 0:t.messages)??[]].sort((l,d)=>l.date-d.date).map(i),t&&!e&&i(M1,1)]})},m_=()=>{const{getConversation:t,addMessage:e,tempConversationToThread:n,username:r,email:i,updateMessage:o,isChatOpen:s}=Nt(),a=!!(r&&i),l=it(!1);ut(()=>{s&&!l.current&&(l.current=!0),s||(l.current=!1)},[s]);const[d,c]=gt(!1),[h,m]=gt([]),[y,w]=gt({}),_=t(),P=(_==null?void 0:_.status)==="open",[x,v]=gt("");ut(()=>{const j={};h.forEach(B=>{const L=new FileReader;L.addEventListener("load",function(){const F=new Image;F.onload=()=>{j[B.name]={url:L.result,width:F.width,height:F.height,size:B.size},w(j)},F.src=L.result},!1),L.readAsDataURL(B)})},[h]);const E=j=>{v(B=>B+j)},M=async()=>{const j=Date.now(),B={support:!1,content:x,date:j,authorName:r,pending:!0};if(x.trim()!==""){v(""),e(_?_.threadId:"TEMP",B);const L=await R1({content:x});L&&((!_||_.threadId==="TEMP")&&n(L.threadId),o(L.threadId,j,{...B,pending:!1,date:L.date}))}},O=s&&!l.current;return T(Pt,{children:[T("div",{className:"flex-1 overflow-y-auto overflow-x-hidden p-4 flex flex-col-reverse space-y-4 space-y-reverse",children:T(De.div,{initial:O?{opacity:0,x:20}:!1,animate:{opacity:1,x:0},transition:{duration:.3,ease:"easeOut",delay:.1},children:T(p_,{conversation:_,open:P})})}),T(W1,{attachmentPreviews:y,files:h,setFiles:m,inputMessage:x,setInputMessage:v,showEmojiPicker:d,setShowEmojiPicker:c,addEmoji:E,sendMessage:M,disabled:!a})]})};function Ih(t,e){switch(t){case"online":return e==="text"?"text-teal-600":"bg-teal-400";case"idle":return e==="text"?"text-yellow-600":"bg-yellow-400";case"dnd":return e==="text"?"text-red-600":"bg-red-400";case"offline":case"invisible":return e==="text"?"text-black":"bg-gray-400";default:return e==="text"?"text-black":"bg-gray-400"}}function y_(t){switch(t){case"online":return"Online";case"idle":case"offline":case"invisible":return"Away";case"dnd":return"Unavailable";default:return"Away"}}const Ee=Object.create(null);Ee.open="0",Ee.close="1",Ee.ping="2",Ee.pong="3",Ee.message="4",Ee.upgrade="5",Ee.noop="6";const Ei=Object.create(null);Object.keys(Ee).forEach(t=>{Ei[Ee[t]]=t});const la={type:"error",data:"parser error"},Rh=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Mh=typeof ArrayBuffer=="function",Nh=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,ua=({type:t,data:e},n,r)=>Rh&&e instanceof Blob?n?r(e):Dh(e,r):Mh&&(e instanceof ArrayBuffer||Nh(e))?n?r(e):Dh(new Blob([e]),r):r(Ee[t]+(e||"")),Dh=(t,e)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];e("b"+(r||""))},n.readAsDataURL(t)};function Bh(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let fa;function g_(t,e){if(Rh&&t.data instanceof Blob)return t.data.arrayBuffer().then(Bh).then(e);if(Mh&&(t.data instanceof ArrayBuffer||Nh(t.data)))return e(Bh(t.data));ua(t,!1,n=>{fa||(fa=new TextEncoder),e(fa.encode(n))})}const Lh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Pr=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<Lh.length;t++)Pr[Lh.charCodeAt(t)]=t;const v_=t=>{let e=t.length*.75,n=t.length,r,i=0,o,s,a,l;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const d=new ArrayBuffer(e),c=new Uint8Array(d);for(r=0;r<n;r+=4)o=Pr[t.charCodeAt(r)],s=Pr[t.charCodeAt(r+1)],a=Pr[t.charCodeAt(r+2)],l=Pr[t.charCodeAt(r+3)],c[i++]=o<<2|s>>4,c[i++]=(s&15)<<4|a>>2,c[i++]=(a&3)<<6|l&63;return d},w_=typeof ArrayBuffer=="function",da=(t,e)=>{if(typeof t!="string")return{type:"message",data:Fh(t,e)};const n=t.charAt(0);return n==="b"?{type:"message",data:b_(t.substring(1),e)}:Ei[n]?t.length>1?{type:Ei[n],data:t.substring(1)}:{type:Ei[n]}:la},b_=(t,e)=>{if(w_){const n=v_(t);return Fh(n,e)}else return{base64:!0,data:t}},Fh=(t,e)=>{switch(e){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},jh="",__=(t,e)=>{const n=t.length,r=new Array(n);let i=0;t.forEach((o,s)=>{ua(o,!1,a=>{r[s]=a,++i===n&&e(r.join(jh))})})},x_=(t,e)=>{const n=t.split(jh),r=[];for(let i=0;i<n.length;i++){const o=da(n[i],e);if(r.push(o),o.type==="error")break}return r};function S_(){return new TransformStream({transform(t,e){g_(t,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const o=new DataView(i.buffer);o.setUint8(0,126),o.setUint16(1,r)}else{i=new Uint8Array(9);const o=new DataView(i.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(r))}t.data&&typeof t.data!="string"&&(i[0]|=128),e.enqueue(i),e.enqueue(n)})}})}let ha;function Ai(t){return t.reduce((e,n)=>e+n.length,0)}function Ci(t,e){if(t[0].length===e)return t.shift();const n=new Uint8Array(e);let r=0;for(let i=0;i<e;i++)n[i]=t[0][r++],r===t[0].length&&(t.shift(),r=0);return t.length&&r<t[0].length&&(t[0]=t[0].slice(r)),n}function E_(t,e){ha||(ha=new TextDecoder);const n=[];let r=0,i=-1,o=!1;return new TransformStream({transform(s,a){for(n.push(s);;){if(r===0){if(Ai(n)<1)break;const l=Ci(n,1);o=(l[0]&128)===128,i=l[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if(Ai(n)<2)break;const l=Ci(n,2);i=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(Ai(n)<8)break;const l=Ci(n,8),d=new DataView(l.buffer,l.byteOffset,l.length),c=d.getUint32(0);if(c>Math.pow(2,21)-1){a.enqueue(la);break}i=c*Math.pow(2,32)+d.getUint32(4),r=3}else{if(Ai(n)<i)break;const l=Ci(n,i);a.enqueue(da(o?l:ha.decode(l),e)),r=0}if(i===0||i>t){a.enqueue(la);break}}}})}const $h=4;function zt(t){if(t)return A_(t)}function A_(t){for(var e in zt.prototype)t[e]=zt.prototype[e];return t}zt.prototype.on=zt.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},zt.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},zt.prototype.off=zt.prototype.removeListener=zt.prototype.removeAllListeners=zt.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+t];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===e||r.fn===e){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+t],this},zt.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,e)}return this},zt.prototype.emitReserved=zt.prototype.emit,zt.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},zt.prototype.hasListeners=function(t){return!!this.listeners(t).length};const he=typeof self<"u"?self:typeof window<"u"?window:Function("return this")();function Vh(t,...e){return e.reduce((n,r)=>(t.hasOwnProperty(r)&&(n[r]=t[r]),n),{})}const C_=he.setTimeout,T_=he.clearTimeout;function Ti(t,e){e.useNativeTimers?(t.setTimeoutFn=C_.bind(he),t.clearTimeoutFn=T_.bind(he)):(t.setTimeoutFn=he.setTimeout.bind(he),t.clearTimeoutFn=he.clearTimeout.bind(he))}const P_=1.33;function k_(t){return typeof t=="string"?O_(t):Math.ceil((t.byteLength||t.size)*P_)}function O_(t){let e=0,n=0;for(let r=0,i=t.length;r<i;r++)e=t.charCodeAt(r),e<128?n+=1:e<2048?n+=2:e<55296||e>=57344?n+=3:(r++,n+=4);return n}function I_(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}function R_(t){let e={},n=t.split("&");for(let r=0,i=n.length;r<i;r++){let o=n[r].split("=");e[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return e}class M_ extends Error{constructor(e,n,r){super(e),this.description=n,this.context=r,this.type="TransportError"}}class pa extends zt{constructor(e){super(),this.writable=!1,Ti(this,e),this.opts=e,this.query=e.query,this.socket=e.socket}onError(e,n,r){return super.emitReserved("error",new M_(e,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const n=da(e,this.socket.binaryType);this.onPacket(n)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,n={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const n=I_(e);return n.length?"?"+n:""}}const Uh="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),ma=64,N_={};let zh=0,Pi=0,Wh;function qh(t){let e="";do e=Uh[t%ma]+e,t=Math.floor(t/ma);while(t>0);return e}function Hh(){const t=qh(+new Date);return t!==Wh?(zh=0,Wh=t):t+"."+qh(zh++)}for(;Pi<ma;Pi++)N_[Uh[Pi]]=Pi;let Gh=!1;try{Gh=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const D_=Gh;function Kh(t){const e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||D_))return new XMLHttpRequest}catch{}if(!e)try{return new he[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function A6(){}function B_(){}const L_=function(){return new Kh({xdomain:!1}).responseType!=null}();class F_ extends pa{constructor(e){if(super(e),this.polling=!1,typeof location<"u"){const r=location.protocol==="https:";let i=location.port;i||(i=r?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||i!==e.port}const n=e&&e.forceBase64;this.supportsBinary=L_&&!n,this.opts.withCredentials&&(this.cookieJar=void 0)}get name(){return"polling"}doOpen(){this.poll()}pause(e){this.readyState="pausing";const n=()=>{this.readyState="paused",e()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};x_(e,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,__(e,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=Hh()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(e,n)}request(e={}){return Object.assign(e,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new Ae(this.uri(),e)}doWrite(e,n){const r=this.request({method:"POST",data:e});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=e}}class Ae extends zt{constructor(e,n){super(),Ti(this,n),this.opts=n,this.method=n.method||"GET",this.uri=e,this.data=n.data!==void 0?n.data:null,this.create()}create(){var e;const n=Vh(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new Kh(n);try{r.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this.opts.extraHeaders[i])}}catch{}if(this.method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(e=this.opts.cookieJar)===null||e===void 0||e.addCookies(r),"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this.opts.cookieJar)===null||i===void 0||i.parseCookies(r)),r.readyState===4&&(r.status===200||r.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof r.status=="number"?r.status:0)},0))},r.send(this.data)}catch(i){this.setTimeoutFn(()=>{this.onError(i)},0);return}typeof document<"u"&&(this.index=Ae.requestsCount++,Ae.requests[this.index]=this)}onError(e){this.emitReserved("error",e,this.xhr),this.cleanup(!0)}cleanup(e){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=B_,e)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Ae.requests[this.index],this.xhr=null}}onLoad(){const e=this.xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}if(Ae.requestsCount=0,Ae.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Yh);else if(typeof addEventListener=="function"){const t="onpagehide"in he?"pagehide":"unload";addEventListener(t,Yh,!1)}}function Yh(){for(let t in Ae.requests)Ae.requests.hasOwnProperty(t)&&Ae.requests[t].abort()}var j_={},ki={};ki.byteLength=U_,ki.toByteArray=W_,ki.fromByteArray=G_;for(var Ce=[],pe=[],$_=typeof Uint8Array<"u"?Uint8Array:Array,ya="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Bn=0,V_=ya.length;Bn<V_;++Bn)Ce[Bn]=ya[Bn],pe[ya.charCodeAt(Bn)]=Bn;pe[45]=62,pe[95]=63;function Xh(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");n===-1&&(n=e);var r=n===e?0:4-n%4;return[n,r]}function U_(t){var e=Xh(t),n=e[0],r=e[1];return(n+r)*3/4-r}function z_(t,e,n){return(e+n)*3/4-n}function W_(t){var e,n=Xh(t),r=n[0],i=n[1],o=new $_(z_(t,r,i)),s=0,a=i>0?r-4:r,l;for(l=0;l<a;l+=4)e=pe[t.charCodeAt(l)]<<18|pe[t.charCodeAt(l+1)]<<12|pe[t.charCodeAt(l+2)]<<6|pe[t.charCodeAt(l+3)],o[s++]=e>>16&255,o[s++]=e>>8&255,o[s++]=e&255;return i===2&&(e=pe[t.charCodeAt(l)]<<2|pe[t.charCodeAt(l+1)]>>4,o[s++]=e&255),i===1&&(e=pe[t.charCodeAt(l)]<<10|pe[t.charCodeAt(l+1)]<<4|pe[t.charCodeAt(l+2)]>>2,o[s++]=e>>8&255,o[s++]=e&255),o}function q_(t){return Ce[t>>18&63]+Ce[t>>12&63]+Ce[t>>6&63]+Ce[t&63]}function H_(t,e,n){for(var r,i=[],o=e;o<n;o+=3)r=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(t[o+2]&255),i.push(q_(r));return i.join("")}function G_(t){for(var e,n=t.length,r=n%3,i=[],o=16383,s=0,a=n-r;s<a;s+=o)i.push(H_(t,s,s+o>a?a:s+o));return r===1?(e=t[n-1],i.push(Ce[e>>2]+Ce[e<<4&63]+"==")):r===2&&(e=(t[n-2]<<8)+t[n-1],i.push(Ce[e>>10]+Ce[e>>4&63]+Ce[e<<2&63]+"=")),i.join("")}var ga={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ga.read=function(t,e,n,r,i){var o,s,a=i*8-r-1,l=(1<<a)-1,d=l>>1,c=-7,h=n?i-1:0,m=n?-1:1,y=t[e+h];for(h+=m,o=y&(1<<-c)-1,y>>=-c,c+=a;c>0;o=o*256+t[e+h],h+=m,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=r;c>0;s=s*256+t[e+h],h+=m,c-=8);if(o===0)o=1-d;else{if(o===l)return s?NaN:(y?-1:1)*(1/0);s=s+Math.pow(2,r),o=o-d}return(y?-1:1)*s*Math.pow(2,o-r)},ga.write=function(t,e,n,r,i,o){var s,a,l,d=o*8-i-1,c=(1<<d)-1,h=c>>1,m=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=r?0:o-1,w=r?1:-1,_=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-s))<1&&(s--,l*=2),s+h>=1?e+=m/l:e+=m*Math.pow(2,1-h),e*l>=2&&(s++,l/=2),s+h>=c?(a=0,s=c):s+h>=1?(a=(e*l-1)*Math.pow(2,i),s=s+h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[n+y]=a&255,y+=w,a/=256,i-=8);for(s=s<<i|a,d+=i;d>0;t[n+y]=s&255,y+=w,s/=256,d-=8);t[n+y-w]|=_*128};/*!
99
+ `);const C=_.state[a];if(C==null)return;JSON.stringify(i.getState())!==JSON.stringify(C)&&g(C);return}i.dispatchFromDevtools&&typeof i.dispatch=="function"&&i.dispatch(_)});case"DISPATCH":switch(w.payload.type){case"RESET":return g(v),a===void 0?c==null?void 0:c.init(i.getState()):c==null?void 0:c.init(Fr(u.name));case"COMMIT":if(a===void 0){c==null||c.init(i.getState());return}return c==null?void 0:c.init(Fr(u.name));case"ROLLBACK":return is(w.state,_=>{if(a===void 0){g(_),c==null||c.init(i.getState());return}g(_[a]),c==null||c.init(Fr(u.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return is(w.state,_=>{if(a===void 0){g(_);return}JSON.stringify(i.getState())!==JSON.stringify(_[a])&&g(_[a])});case"IMPORT_STATE":{const{nextLiftedState:_}=w.payload,C=(E=_.computedStates.slice(-1)[0])==null?void 0:E.state;if(!C)return;g(a===void 0?C:C[a]),c==null||c.send(null,_);return}case"PAUSE_RECORDING":return m=!m}return}}),v},is=(t,e)=>{let n;try{n=JSON.parse(t)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}n!==void 0&&e(n)};function ky(t,e){let n;try{n=t()}catch{return}return{getItem:i=>{var o;const s=u=>u===null?null:JSON.parse(u,void 0),a=(o=n.getItem(i))!=null?o:null;return a instanceof Promise?a.then(s):s(a)},setItem:(i,o)=>n.setItem(i,JSON.stringify(o,void 0)),removeItem:i=>n.removeItem(i)}}const Hn=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(r){return Hn(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Hn(r)(n)}}}},Ty=(t,e)=>(n,r,i)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:E=>E,version:0,merge:(E,_)=>({..._,...E}),...e},s=!1;const a=new Set,u=new Set;let h;try{h=o.getStorage()}catch{}if(!h)return t((...E)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...E)},r,i);const c=Hn(o.serialize),f=()=>{const E=o.partialize({...r()});let _;const C=c({state:E,version:o.version}).then(T=>h.setItem(o.name,T)).catch(T=>{_=T});if(_)throw _;return C},m=i.setState;i.setState=(E,_)=>{m(E,_),f()};const g=t((...E)=>{n(...E),f()},r,i);let v;const w=()=>{var E;if(!h)return;s=!1,a.forEach(C=>C(r()));const _=((E=o.onRehydrateStorage)==null?void 0:E.call(o,r()))||void 0;return Hn(h.getItem.bind(h))(o.name).then(C=>{if(C)return o.deserialize(C)}).then(C=>{if(C)if(typeof C.version=="number"&&C.version!==o.version){if(o.migrate)return o.migrate(C.state,C.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return C.state}).then(C=>{var T;return v=o.merge(C,(T=r())!=null?T:g),n(v,!0),f()}).then(()=>{_==null||_(v,void 0),s=!0,u.forEach(C=>C(v))}).catch(C=>{_==null||_(void 0,C)})};return i.persist={setOptions:E=>{o={...o,...E},E.getStorage&&(h=E.getStorage())},clearStorage:()=>{h==null||h.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>w(),hasHydrated:()=>s,onHydrate:E=>(a.add(E),()=>{a.delete(E)}),onFinishHydration:E=>(u.add(E),()=>{u.delete(E)})},w(),v||g},Ay=(t,e)=>(n,r,i)=>{let o={storage:ky(()=>localStorage),partialize:w=>w,version:0,merge:(w,E)=>({...E,...w}),...e},s=!1;const a=new Set,u=new Set;let h=o.storage;if(!h)return t((...w)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...w)},r,i);const c=()=>{const w=o.partialize({...r()});return h.setItem(o.name,{state:w,version:o.version})},f=i.setState;i.setState=(w,E)=>{f(w,E),c()};const m=t((...w)=>{n(...w),c()},r,i);i.getInitialState=()=>m;let g;const v=()=>{var w,E;if(!h)return;s=!1,a.forEach(C=>{var T;return C((T=r())!=null?T:m)});const _=((E=o.onRehydrateStorage)==null?void 0:E.call(o,(w=r())!=null?w:m))||void 0;return Hn(h.getItem.bind(h))(o.name).then(C=>{if(C)if(typeof C.version=="number"&&C.version!==o.version){if(o.migrate)return[!0,o.migrate(C.state,C.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,C.state];return[!1,void 0]}).then(C=>{var T;const[I,k]=C;if(g=o.merge(k,(T=r())!=null?T:m),n(g,!0),I)return c()}).then(()=>{_==null||_(g,void 0),g=r(),s=!0,u.forEach(C=>C(g))}).catch(C=>{_==null||_(void 0,C)})};return i.persist={setOptions:w=>{o={...o,...w},w.storage&&(h=w.storage)},clearStorage:()=>{h==null||h.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>v(),hasHydrated:()=>s,onHydrate:w=>(a.add(w),()=>{a.delete(w)}),onFinishHydration:w=>(u.add(w),()=>{u.delete(w)})},o.skipHydration||v(),g||m},Py=(t,e)=>"getStorage"in e||"serialize"in e||"deserialize"in e?((Or?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),Ty(t,e)):Ay(t,e);function Vr(t){const e=t.content.slice(0,50);return t.support?`${t.date}-${t.authorName}-${e}`:`${t.date}-customer-${e}`}function Yu(t,e){const n=new Map;return t.forEach(r=>{const i=Vr(r);n.set(i,r)}),e.forEach(r=>{const i=Vr(r);n.set(i,r)}),Array.from(n.values()).sort((r,i)=>r.date-i.date)}function Iy(t,e){const n=Vr(e);return t.some(r=>Vr(r)===n)}const Gu=460,My=750,Ry="https://api.deskcord.chat";function Ny(){var n,r,i,o;const t=(r=(n=window.deskcord)==null?void 0:n.settings)==null?void 0:r.app_id,e=((o=(i=window.deskcord)==null?void 0:i.settings)==null?void 0:o.domain)??Ry;if(!t)throw new Error("Cannot initialize discord chat. Please check your installation and embed.");return{app_id:t,domain:e}}const Bt=Ny();function mt(...t){}async function Dy(t){const e=new Headers;e.append("Content-Type","application/json"),e.append("Authorization",`Bearer ${t}`);try{const n=await fetch(`${Bt.domain}/conversations/unread-count`,{method:"GET",headers:e});return n.ok?(await n.json()).unreadCount:(mt(`Failed to fetch unread count: ${n.status}`),null)}catch{return null}}async function By(t,e){const n=new Headers;n.append("Content-Type","application/json"),n.append("Authorization",`Bearer ${t}`);try{const r=await fetch(`${Bt.domain}/conversations/mark-read`,{method:"POST",headers:n,body:JSON.stringify({timestamp:e})});return r.ok?(await r.json()).success:(mt(`Failed to mark as read: ${r.status}`),!1)}catch{return!1}}const Xu="deskcord_last_read",Zu="deskcord_unread_count",Ly=()=>{try{const t=localStorage.getItem(Xu);if(!t)return null;const e=parseInt(t,10);return isNaN(e)?null:e}catch{return console.warn("[Deskcord] localStorage unavailable for reading last read timestamp"),null}},Ju=t=>{try{localStorage.setItem(Xu,t.toString())}catch{console.warn("[Deskcord] localStorage unavailable for writing last read timestamp")}},Ur=()=>{try{const t=localStorage.getItem(Zu);if(!t)return 0;const e=parseInt(t,10);return isNaN(e)?0:e}catch{return console.warn("[Deskcord] localStorage unavailable for reading unread count"),0}},Kn=t=>{try{localStorage.setItem(Zu,t.toString())}catch{console.warn("[Deskcord] localStorage unavailable for writing unread count")}},ot=fy(Sy(Py((t,e)=>({_REHYDRATED_:!1,token:"",isNetworkInitialized:!1,isChatOpen:!1,isChatVisible:!1,isConversationOpen:!0,conversations:[],email:"",username:"",openConversationId:null,guildSettings:{iconURL:"",header_title:"",header_subtitle:"",lastUpdate:null},fullScreen:!1,isLoading:!1,networkError:null,currentConversationLastFetchedAt:null,pastConversationsLastFetchedAt:null,unreadCount:0,lastReadMessageDate:null,setRehydrated:n=>t(()=>({_REHYDRATED_:n})),setFullScreen:n=>t(()=>({fullScreen:n})),setToken:n=>t(()=>({token:n})),toggleChatOpen:()=>t(n=>({isChatOpen:!n.isChatOpen})),setNetworkInitialized:n=>t(()=>({isNetworkInitialized:n})),setChatVisible:n=>t(()=>({isChatVisible:n})),setChatOpen:n=>t(()=>({isChatOpen:n})),setOpenConversationId:n=>t(()=>({openConversationId:n})),setConversations:n=>t(()=>({conversations:n})),setGuildSettings:n=>t(r=>({guildSettings:{...r.guildSettings,...n}})),setConversationOpen:(n,r)=>t(i=>({conversations:i.conversations.map(o=>o.threadId===n?{...o,status:r?"open":"closed"}:o)})),setConversationCSMember:(n,r)=>t(sn(i=>{const o=i.conversations.find(s=>s.threadId===n);o&&(o.csMember=r)})),addMessage:(n,r)=>t(sn(i=>{const o=i.conversations.find(s=>s.threadId===n);o?o.messages.push(r):(i.conversations.push({threadId:n,lastMessageDate:Date.now(),firstMessageDate:Date.now(),status:"open",messages:[r]}),i.openConversationId=n)})),updateMessage:(n,r,i)=>t(sn(o=>{const s=o.conversations.findIndex(a=>a.threadId===n);if(s!==-1){const a=o.conversations[s].messages.findIndex(u=>u.date===r);o.conversations[s].messages[a]=i}})),removeMessage:(n,r)=>t(sn(i=>{const o=i.conversations.findIndex(s=>s.threadId===n);o!==-1&&(i.conversations[o].messages=i.conversations[o].messages.filter(s=>s.date!==r))})),tempConversationToThread:n=>t(r=>({...r,openConversationId:n,conversations:r.conversations.map(i=>i.threadId==="TEMP"?{...i,threadId:n}:i)})),setEmail:n=>t(()=>({email:n})),setUsername:n=>t(()=>({username:n})),getConversation:()=>{const{conversations:n,openConversationId:r}=e();return r?n.find(i=>i.threadId===r)??null:null},setLoading:n=>t(()=>({isLoading:n})),setNetworkError:n=>t(()=>({networkError:n})),setCurrentConversationLastFetchedAt:n=>t(()=>({currentConversationLastFetchedAt:n})),setPastConversationsLastFetchedAt:n=>t(()=>({pastConversationsLastFetchedAt:n})),smartMergeCurrentConversation:n=>t(sn(r=>{const i=r.conversations.findIndex(o=>o.threadId===n.threadId);if(i!==-1){const o=r.conversations[i],s=Yu(o.messages,n.messages);r.conversations[i]={...n,messages:s}}else r.conversations.push(n);r.currentConversationLastFetchedAt=Date.now()})),smartMergePastConversations:n=>t(sn(r=>{n.forEach(i=>{const o=r.conversations.findIndex(s=>s.threadId===i.threadId);if(o!==-1){const s=r.conversations[o],a=Yu(s.messages,i.messages);r.conversations[o]={...i,messages:a}}else r.conversations.push(i)}),r.pastConversationsLastFetchedAt=Date.now()})),incrementUnreadCount:()=>t(n=>{const r=n.unreadCount+1;return Kn(r),{unreadCount:r}}),markMessagesAsRead:()=>t(()=>{const n=Date.now();return Kn(0),Ju(n),{unreadCount:0,lastReadMessageDate:n}}),setUnreadCount:n=>t(()=>(Kn(n),{unreadCount:n})),syncUnreadCountFromServer:async()=>{const n=Ae.get("discord-widget");if(!n){const r=Ur();t(()=>({unreadCount:r}));return}try{const r=await Dy(n);if(r!==null)mt(`Synced unread count from server: ${r}`),Kn(r),t(()=>({unreadCount:r}));else{mt("Server unavailable, using cached unread count");const i=Ur();t(()=>({unreadCount:i}))}}catch{const i=Ur();t(()=>({unreadCount:i}))}},markMessagesAsReadWithSync:async()=>{const n=Date.now();Kn(0),Ju(n),t(()=>({unreadCount:0,lastReadMessageDate:n}));const r=Ae.get("discord-widget");if(r)try{const i=await By(r,n);mt(i?"Successfully synced mark-read with server":"Failed to sync mark-read with server (will retry on next load)")}catch{}},initializeUnreadState:()=>{const n=Ur(),r=Ly();t(()=>({unreadCount:n,lastReadMessageDate:r}))}}),{name:"discord-widget-storage",partialize:t=>({token:t.token,username:t.username,email:t.email,openConversationId:t.openConversationId,conversations:Oy(t.conversations),guildSettings:t.guildSettings}),onRehydrateStorage:t=>()=>t.setRehydrated(!0)}),{enabled:!1}));function Oy(t){return t.map(e=>({...e,messages:e.messages.filter(n=>!n.ephemeral&&!n.pending)}))}async function Fy({content:t}){const e=ot.getState().username,n=Ae.get("discord-widget"),r=JSON.stringify({name:e,content:t}),i=new Headers;i.append("Content-Type","application/json"),i.append("Authorization",`Bearer ${n}`);const o={method:"POST",headers:i,body:r};return await(await fetch(`${Bt.domain}/conversations/sendMessage`,o)).json()}var an=(t=>(t[t.IntroduceYourself=0]="IntroduceYourself",t[t.UploadFile=1]="UploadFile",t))(an||{});const qn="System",Vy={content:"This conversation has been closed by the support.",support:!0,authorName:qn,date:Date.now()},Uy={content:"",support:!0,authorName:qn,date:Date.now(),customRenderer:an.IntroduceYourself};function $y(t){return{content:`You are now chatting with ${t}.`,support:!0,authorName:qn,date:Date.now(),ephemeral:!0}}function zy(t){return{content:"",support:!0,authorName:qn,date:Date.now(),customRenderer:an.UploadFile,customRendererProps:{file:t},ephemeral:!0}}function jy(t){return{content:"",support:!1,authorName:"",date:Date.now(),ephemeral:!0,attachments:t}}const Wy=he(({accept:t,maxSize:e,uploadConfig:n,onFileSelect:r,onUploadComplete:i,onUploadStart:o,onError:s},a)=>{const u=F(null),h=F(null),{addMessage:c,getConversation:f,removeMessage:m,updateMessage:g}=ot(),v=f();Cn(a,()=>({upload:async()=>{if(h.current)try{const I=new FormData;I.append("file",h.current),o==null||o(h.current),E(h.current);const k=await fetch(n.url,{method:n.method,headers:n.headers,body:I}),R=await k.json();i==null||i(k),_(h.current),w(R)}catch(I){s==null||s(I),C(h.current)}},clear:()=>{h.current=null,u.current&&(u.current.value=""),r==null||r(null)}}));function w(I){v&&c(v.threadId,jy(I.attachments))}function E(I){v&&c(v.threadId,zy({fileName:I.name,status:"uploading",size:I.size}))}function _(I){var R;if(!v)return;const k=(R=f())==null?void 0:R.messages.find(N=>{var P,M;return((M=(P=N.customRendererProps)==null?void 0:P.file)==null?void 0:M.fileName)===I.name});k&&m(v.threadId,k.date)}function C(I){var R,N;if(!v)return;const k=(R=f())==null?void 0:R.messages.find(P=>{var M,B;return((B=(M=P.customRendererProps)==null?void 0:M.file)==null?void 0:B.fileName)===I.name});(N=k==null?void 0:k.customRendererProps)!=null&&N.file&&g(v.threadId,k.date,{...k,customRendererProps:{...k.customRendererProps,file:{...k.customRendererProps.file,status:"error"}}})}return x(J,{children:[x("button",{className:"text-gray-500 hover:text-blue-500","aria-label":"Upload file",onClick:()=>{var I;return(I=u.current)==null?void 0:I.click()},children:x(Mg,{size:16})}),x("input",{type:"file",accept:t,ref:u,style:{display:"none"},onChange:I=>{var R;const k=(R=I.target.files)==null?void 0:R[0];k&&k.size<=e?(h.current=k,r==null||r(k)):(h.current=null,r==null||r(null))}})]})}),Hy=({size:t})=>x("svg",{className:"shrink-0 size-3.5",xmlns:"http://www.w3.org/2000/svg",width:t||16,height:t||16,fill:"currentColor",viewBox:"0 0 16 16",children:x("path",{d:"M15.964.686a.5.5 0 0 0-.65-.65L.767 5.855H.766l-.452.18a.5.5 0 0 0-.082.887l.41.26.001.002 4.995 3.178 3.178 4.995.002.002.26.41a.5.5 0 0 0 .886-.083l6-15Zm-1.833 1.89L6.637 10.07l-.215-.338a.5.5 0 0 0-.154-.154l-.338-.215 7.494-7.494 1.178-.471-.47 1.178Z"})}),Ky=({onPickEmoji:t})=>x("div",{className:"mb-2 p-2 bg-white max-h-40 overflow-y-auto",children:x("div",{className:"grid grid-cols-8 gap-2",children:qy.map((e,n)=>x("button",{className:"text-2xl hover:bg-gray-100 rounded",onClick:()=>t(e),children:e},n))})}),qy=["😀","😃","😄","😁","😆","😅","😂","🤣","😊","😇","🙂","🙃","😉","😌","😍","🥰","😘","😗","😙","😚","😋","😛","😝","😜","🤪","🤨","🧐","🤓","😎","🤩","🥳","😏","😒","😞","😔","😟","😕","🙁","☹️","😣","😖","😫","😩","🥺","😢","😭","😤","😠","😡","🤬","🤯","😳","🥵","🥶","😱","😨","😰","😥","😓","🤗","🤔","🤭","🤫","🤥","😶","😐","😑","😬","🙄","😯","😦","😧","😮","😲","🥱","😴","🤤","😪","😵","🤐","🥴","🤢","🤮","🤧","😷","🤒","🤕"],Yy=({imageUrl:t,fileName:e,onDelete:n,width:r,height:i})=>x("div",{className:"relative w-32 h-32 rounded-lg overflow-hidden bg-gray-100 border border-gray-200",children:[x("div",{className:"flex justify-center absolute inset-0",children:x("img",{src:t,alt:"Preview",className:`w-[${r}px] h-[${i}px] max-w-[100px] max-h-[100px] aspect-auto`})}),x("button",{onClick:n,className:"absolute top-1 right-1 bg-gray-600 p-1 rounded-lg text-red-400 hover:text-white transition",children:x(Dg,{size:20})}),x("div",{className:"absolute bottom-0 left-0 right-0 bg-gray-800 bg-opacity-80 text-white text-sm px-2 py-1 truncate",children:e})]}),Gy=({className:t})=>x("svg",{className:t,viewBox:"0 0 642 74",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:x("path",{d:"M23.9 73.2C19.4333 73.2 15.3667 72.0667 11.7 69.8C8.1 67.5333 5.23333 64.4333 3.1 60.5C1.03333 56.5 7.45058e-08 51.9667 7.45058e-08 46.9C7.45058e-08 41.7667 1.06667 37.2333 3.2 33.3C5.33333 29.3 8.23333 26.1667 11.9 23.9C15.6333 21.5667 19.7667 20.4 24.3 20.4C27.7667 20.4 30.8 21.0333 33.4 22.3C36 23.5 38.1333 25.2667 39.8 27.6V-2.86102e-06H54.8V72H41.5L39.8 65.5C38.8 66.9 37.5667 68.2 36.1 69.4C34.7 70.5333 33 71.4333 31 72.1C29 72.8333 26.6333 73.2 23.9 73.2ZM27.8 60.1C30.2667 60.1 32.4333 59.5333 34.3 58.4C36.2333 57.2667 37.7 55.7 38.7 53.7C39.7667 51.7 40.3 49.4 40.3 46.8C40.3 44.2 39.7667 41.9 38.7 39.9C37.7 37.9 36.2333 36.3333 34.3 35.2C32.4333 34.0667 30.2667 33.5 27.8 33.5C25.4 33.5 23.2333 34.0667 21.3 35.2C19.4333 36.3333 17.9667 37.9 16.9 39.9C15.8333 41.9 15.3 44.1667 15.3 46.7C15.3 49.3 15.8333 51.6333 16.9 53.7C17.9667 55.7 19.4333 57.2667 21.3 58.4C23.2333 59.5333 25.4 60.1 27.8 60.1ZM86.6086 73.2C81.4086 73.2 76.8419 72.1333 72.9086 70C68.9753 67.8 65.8753 64.7667 63.6086 60.9C61.4086 56.9667 60.3086 52.4667 60.3086 47.4C60.3086 42.2 61.4086 37.5667 63.6086 33.5C65.8086 29.4333 68.8753 26.2333 72.8086 23.9C76.7419 21.5667 81.3086 20.4 86.5086 20.4C91.5753 20.4 96.0086 21.5 99.8086 23.7C103.609 25.9 106.575 28.9 108.709 32.7C110.909 36.4333 112.009 40.7667 112.009 45.7C112.009 46.3667 111.975 47.1333 111.909 48C111.909 48.8 111.842 49.6333 111.709 50.5H71.0086V41.8H96.7086C96.5753 39 95.5419 36.7667 93.6086 35.1C91.7419 33.3667 89.4086 32.5 86.6086 32.5C84.4753 32.5 82.5419 33 80.8086 34C79.0753 35 77.6753 36.5 76.6086 38.5C75.6086 40.5 75.1086 43.0333 75.1086 46.1V49.1C75.1086 51.4333 75.5419 53.5 76.4086 55.3C77.3419 57.1 78.6419 58.5 80.3086 59.5C82.0419 60.5 84.0753 61 86.4086 61C88.6086 61 90.4086 60.5667 91.8086 59.7C93.2753 58.7667 94.4086 57.6 95.2086 56.2H110.509C109.575 59.4 107.975 62.3 105.709 64.9C103.442 67.4333 100.675 69.4667 97.4086 71C94.1419 72.4667 90.5419 73.2 86.6086 73.2ZM138.039 73.2C133.306 73.2 129.206 72.4667 125.739 71C122.339 69.4667 119.639 67.4 117.639 64.8C115.706 62.2 114.606 59.2667 114.339 56H129.239C129.506 57.1333 129.972 58.1667 130.639 59.1C131.372 59.9667 132.339 60.6667 133.539 61.2C134.806 61.6667 136.206 61.9 137.739 61.9C139.406 61.9 140.739 61.7 141.739 61.3C142.806 60.8333 143.606 60.2333 144.139 59.5C144.672 58.7667 144.939 58 144.939 57.2C144.939 55.9333 144.539 54.9667 143.739 54.3C143.006 53.6333 141.906 53.1 140.439 52.7C138.972 52.2333 137.206 51.8 135.139 51.4C132.739 50.8667 130.339 50.2667 127.939 49.6C125.606 48.8667 123.506 47.9667 121.639 46.9C119.839 45.8333 118.372 44.4667 117.239 42.8C116.172 41.0667 115.639 38.9667 115.639 36.5C115.639 33.5 116.472 30.8 118.139 28.4C119.806 25.9333 122.206 24 125.339 22.6C128.472 21.1333 132.272 20.4 136.739 20.4C143.072 20.4 148.039 21.8 151.639 24.6C155.239 27.4 157.372 31.1667 158.039 35.9H144.039C143.639 34.5667 142.806 33.5667 141.539 32.9C140.272 32.1667 138.672 31.8 136.739 31.8C134.539 31.8 132.872 32.1667 131.739 32.9C130.606 33.6333 130.039 34.6 130.039 35.8C130.039 36.6 130.406 37.3333 131.139 38C131.939 38.6 133.072 39.1333 134.539 39.6C136.006 40.0667 137.806 40.5333 139.939 41C144.006 41.8667 147.506 42.8 150.439 43.8C153.439 44.8 155.772 46.2667 157.439 48.2C159.106 50.0667 159.906 52.8 159.839 56.4C159.906 59.6667 159.039 62.5667 157.239 65.1C155.506 67.6333 153.006 69.6333 149.739 71.1C146.472 72.5 142.572 73.2 138.039 73.2ZM198.643 72L177.843 44.4L196.343 21.6H214.043L189.143 50.8V38.8L217.243 72H198.643ZM165.043 72V-2.86102e-06H180.043V72H165.043ZM239.509 73.2C234.309 73.2 229.709 72.0667 225.709 69.8C221.776 67.5333 218.676 64.4333 216.409 60.5C214.209 56.5667 213.109 52.0667 213.109 47C213.109 41.8 214.209 37.2333 216.409 33.3C218.676 29.3 221.776 26.1667 225.709 23.9C229.709 21.5667 234.309 20.4 239.509 20.4C246.109 20.4 251.643 22.1333 256.109 25.6C260.643 29.0667 263.509 33.9 264.709 40.1H248.809C248.209 37.9667 247.076 36.3 245.409 35.1C243.743 33.9 241.743 33.3 239.409 33.3C237.209 33.3 235.276 33.8667 233.609 35C232.009 36.0667 230.743 37.6333 229.809 39.7C228.876 41.7 228.409 44.0667 228.409 46.8C228.409 48.8667 228.676 50.7333 229.209 52.4C229.743 54.0667 230.476 55.5 231.409 56.7C232.409 57.9 233.576 58.8333 234.909 59.5C236.243 60.1 237.743 60.4 239.409 60.4C241.009 60.4 242.409 60.1333 243.609 59.6C244.876 59.0667 245.943 58.3 246.809 57.3C247.743 56.3 248.409 55.0667 248.809 53.6H264.709C263.509 59.6 260.643 64.3667 256.109 67.9C251.576 71.4333 246.043 73.2 239.509 73.2ZM294.528 73.2C289.661 73.2 285.295 72.0667 281.428 69.8C277.561 67.5333 274.495 64.4333 272.228 60.5C269.961 56.5 268.828 51.9667 268.828 46.9C268.828 41.7 269.961 37.1333 272.228 33.2C274.495 29.2 277.561 26.0667 281.428 23.8C285.361 21.5333 289.728 20.4 294.528 20.4C299.461 20.4 303.861 21.5333 307.728 23.8C311.595 26.0667 314.661 29.2 316.928 33.2C319.195 37.1333 320.328 41.6667 320.328 46.8C320.328 51.9333 319.195 56.5 316.928 60.5C314.661 64.4333 311.595 67.5333 307.728 69.8C303.861 72.0667 299.461 73.2 294.528 73.2ZM294.528 60.2C296.528 60.2 298.295 59.7 299.828 58.7C301.428 57.7 302.695 56.2 303.628 54.2C304.561 52.2 305.028 49.7333 305.028 46.8C305.028 43.8667 304.561 41.4 303.628 39.4C302.695 37.4 301.461 35.9 299.928 34.9C298.395 33.9 296.628 33.4 294.628 33.4C292.628 33.4 290.828 33.9 289.228 34.9C287.695 35.9 286.461 37.4 285.528 39.4C284.595 41.4 284.128 43.8667 284.128 46.8C284.128 49.7333 284.595 52.2 285.528 54.2C286.461 56.2 287.695 57.7 289.228 58.7C290.828 59.7 292.595 60.2 294.528 60.2ZM325.852 72V21.6H339.152L340.552 30.8C341.885 28.6667 343.452 26.8333 345.252 25.3C347.052 23.7667 349.118 22.5667 351.452 21.7C353.852 20.8333 356.418 20.4 359.152 20.4V36.3H354.152C352.152 36.3 350.318 36.5333 348.652 37C347.052 37.4 345.652 38.1 344.452 39.1C343.318 40.1 342.418 41.4667 341.752 43.2C341.152 44.8667 340.852 46.9667 340.852 49.5V72H325.852ZM383.853 73.2C379.386 73.2 375.32 72.0667 371.653 69.8C368.053 67.5333 365.186 64.4333 363.053 60.5C360.986 56.5 359.953 51.9667 359.953 46.9C359.953 41.7667 361.02 37.2333 363.153 33.3C365.286 29.3 368.186 26.1667 371.853 23.9C375.586 21.5667 379.72 20.4 384.253 20.4C387.72 20.4 390.753 21.0333 393.353 22.3C395.953 23.5 398.086 25.2667 399.753 27.6V-2.86102e-06H414.753V72H401.453L399.753 65.5C398.753 66.9 397.52 68.2 396.053 69.4C394.653 70.5333 392.953 71.4333 390.953 72.1C388.953 72.8333 386.586 73.2 383.853 73.2ZM387.753 60.1C390.22 60.1 392.386 59.5333 394.253 58.4C396.186 57.2667 397.653 55.7 398.653 53.7C399.72 51.7 400.253 49.4 400.253 46.8C400.253 44.2 399.72 41.9 398.653 39.9C397.653 37.9 396.186 36.3333 394.253 35.2C392.386 34.0667 390.22 33.5 387.753 33.5C385.353 33.5 383.186 34.0667 381.253 35.2C379.386 36.3333 377.92 37.9 376.853 39.9C375.786 41.9 375.253 44.1667 375.253 46.7C375.253 49.3 375.786 51.6333 376.853 53.7C377.92 55.7 379.386 57.2667 381.253 58.4C383.186 59.5333 385.353 60.1 387.753 60.1ZM428.762 72.5C426.028 72.5 423.795 71.7 422.062 70.1C420.395 68.4333 419.562 66.4333 419.562 64.1C419.562 61.7 420.395 59.7 422.062 58.1C423.795 56.4333 426.028 55.6 428.762 55.6C431.428 55.6 433.595 56.4333 435.262 58.1C436.928 59.7 437.762 61.7 437.762 64.1C437.762 66.4333 436.928 68.4333 435.262 70.1C433.595 71.7 431.428 72.5 428.762 72.5ZM467.42 73.2C462.22 73.2 457.62 72.0667 453.62 69.8C449.686 67.5333 446.586 64.4333 444.32 60.5C442.12 56.5667 441.02 52.0667 441.02 47C441.02 41.8 442.12 37.2333 444.32 33.3C446.586 29.3 449.686 26.1667 453.62 23.9C457.62 21.5667 462.22 20.4 467.42 20.4C474.02 20.4 479.553 22.1333 484.02 25.6C488.553 29.0667 491.42 33.9 492.62 40.1H476.72C476.12 37.9667 474.986 36.3 473.32 35.1C471.653 33.9 469.653 33.3 467.32 33.3C465.12 33.3 463.186 33.8667 461.52 35C459.92 36.0667 458.653 37.6333 457.72 39.7C456.786 41.7 456.32 44.0667 456.32 46.8C456.32 48.8667 456.586 50.7333 457.12 52.4C457.653 54.0667 458.386 55.5 459.32 56.7C460.32 57.9 461.486 58.8333 462.82 59.5C464.153 60.1 465.653 60.4 467.32 60.4C468.92 60.4 470.32 60.1333 471.52 59.6C472.786 59.0667 473.853 58.3 474.72 57.3C475.653 56.3 476.32 55.0667 476.72 53.6H492.62C491.42 59.6 488.553 64.3667 484.02 67.9C479.486 71.4333 473.953 73.2 467.42 73.2ZM498.238 72V-2.86102e-06H513.238V28.8C514.838 26.2667 517.005 24.2333 519.738 22.7C522.472 21.1667 525.672 20.4 529.338 20.4C533.605 20.4 537.172 21.3 540.038 23.1C542.905 24.9 545.072 27.5333 546.538 31C548.005 34.4 548.738 38.5333 548.738 43.4V72H533.838V44.8C533.838 41.0667 533.038 38.1667 531.438 36.1C529.905 34.0333 527.438 33 524.038 33C522.038 33 520.205 33.5 518.538 34.5C516.872 35.5 515.572 36.9333 514.638 38.8C513.705 40.6 513.238 42.7667 513.238 45.3V72H498.238ZM572.427 73.2C568.227 73.2 564.727 72.5333 561.927 71.2C559.193 69.8667 557.16 68.0667 555.827 65.8C554.56 63.4667 553.927 60.9 553.927 58.1C553.927 55.1 554.66 52.4667 556.127 50.2C557.66 47.8667 560.027 46.0333 563.227 44.7C566.427 43.3 570.46 42.6 575.327 42.6H587.527C587.527 40.3333 587.227 38.4667 586.627 37C586.093 35.5333 585.193 34.4333 583.927 33.7C582.66 32.9667 580.927 32.6 578.727 32.6C576.393 32.6 574.427 33.0667 572.827 34C571.227 34.9333 570.227 36.4 569.827 38.4H555.427C555.76 34.8 556.927 31.6667 558.927 29C560.993 26.3333 563.727 24.2333 567.127 22.7C570.527 21.1667 574.427 20.4 578.827 20.4C583.627 20.4 587.793 21.2 591.327 22.8C594.86 24.3333 597.593 26.6 599.527 29.6C601.527 32.6 602.527 36.3333 602.527 40.8V72H590.027L588.227 64.7C587.493 65.9667 586.627 67.1333 585.627 68.2C584.627 69.2 583.46 70.1 582.127 70.9C580.793 71.6333 579.327 72.2 577.727 72.6C576.127 73 574.36 73.2 572.427 73.2ZM576.127 61.8C577.727 61.8 579.127 61.5333 580.327 61C581.527 60.4667 582.56 59.7333 583.427 58.8C584.293 57.8667 584.993 56.8 585.527 55.6C586.127 54.3333 586.56 52.9667 586.827 51.5V51.4H577.127C575.46 51.4 574.06 51.6333 572.927 52.1C571.86 52.5 571.06 53.1 570.527 53.9C569.993 54.7 569.727 55.6333 569.727 56.7C569.727 57.8333 569.993 58.8 570.527 59.6C571.127 60.3333 571.893 60.9 572.827 61.3C573.827 61.6333 574.927 61.8 576.127 61.8ZM632.299 72C628.633 72 625.399 71.4333 622.599 70.3C619.799 69.1 617.633 67.1667 616.099 64.5C614.566 61.8333 613.799 58.2 613.799 53.6V34.1H605.199V21.6H613.799L615.399 7.4H628.799V21.6H641.699V34.1H628.799V53.8C628.799 55.8 629.233 57.2333 630.099 58.1C631.033 58.9 632.599 59.3 634.799 59.3H641.699V72H632.299Z",fill:"currentColor"})}),Xy=t=>{const{inputMessage:e,setInputMessage:n,sendMessage:r,setFiles:i,files:o,showEmojiPicker:s,addEmoji:a,setShowEmojiPicker:u,attachmentPreviews:h,disabled:c=!1}=t,{getConversation:f}=ot(),m=f(),g=Ae.get("discord-widget"),v=F(null),E=(m==null?void 0:m.status)==="closed"||c,_=()=>{},C=P=>{i(o.filter(M=>(P==null?void 0:P.name)!==M.name))},T=P=>{P&&i([...o,P])},I=()=>{var P;(P=v.current)==null||P.upload()},k=()=>{o.length&&I(),r()},R=P=>{P.key==="Enter"&&(P.shiftKey?(P.preventDefault(),n(`${e}
100
+ `)):(P.preventDefault(),k()))};return x("div",{className:"relative border-t border-t-gray-200",children:[s&&x(Ky,{onPickEmoji:a}),(()=>{if(!(o!=null&&o.length))return null;const P=o.map((M,B)=>{if(!h[M.name])return null;const{url:O,width:et,height:ht}=h[M.name];return x(Yy,{onDelete:()=>{var Mt;i(o.filter(G=>G.name!==M.name)),(Mt=v.current)==null||Mt.clear()},fileName:M.name,width:et,height:ht,imageUrl:O},`attachment-preview-${B}`)});return x("div",{className:"m-2",children:P})})(),x("div",{className:"flex items-start gap-2 p-2 bg-white dark:bg-neutral-900",children:[x("textarea",{id:"hs-textarea-ex-1",disabled:E,value:e,onChange:P=>n(P.target.value),onKeyDown:R,className:"flex-1 p-3 block text-base md:text-sm outline-none disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:text-neutral-400 dark:placeholder-neutral-500 resize-none min-h-[55px] max-h-[200px] overflow-y-auto",placeholder:c?"Please introduce yourself first...":"Ask us anything!","data-hs-textarea-auto-height":""}),x("button",{type:"button",disabled:E,onClick:()=>k(),style:{background:E?"#9CA3AF":"linear-gradient(167deg, #7289DA 0%, #5B6EAB 100%)"},"aria-label":"Send message",className:"inline-flex shrink-0 justify-center items-center w-[33px] h-[33px] rounded-lg text-white transform transition-transform duration-150 hover:scale-105 active:scale-95 disabled:opacity-50 disabled:pointer-events-none disabled:transform-none",children:x(Hy,{size:16})})]}),x("div",{className:"flex items-center justify-between px-2 py-1.5 bg-white dark:bg-neutral-900",children:[x("div",{className:"flex items-center gap-1",children:[x("div",{className:"inline-flex shrink-0 justify-center items-center size-8 rounded-lg text-gray-500 hover:bg-gray-100 focus:z-10 focus:outline-none focus:bg-gray-100 dark:text-neutral-500 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800 transition-colors duration-150",children:x(Wy,{ref:v,accept:"image/*",maxSize:10*1024*1024,uploadConfig:{url:`${Bt.domain}/conversations/uploadAttachment`,method:"POST",headers:{Authorization:`Bearer ${g}`}},onUploadComplete:_,onUploadStart:C,onFileSelect:T})}),x("button",{type:"button",disabled:E,onClick:E?void 0:()=>u(!s),"aria-label":"Open emoji picker",className:"inline-flex shrink-0 justify-center items-center size-8 rounded-lg text-gray-500 hover:bg-gray-100 focus:z-10 focus:outline-none focus:bg-gray-100 dark:text-neutral-500 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800 disabled:opacity-50 disabled:pointer-events-none transition-colors duration-150",children:x(Ng,{size:16})})]}),x("a",{href:"https://deskcord.chat",target:"_blank",rel:"noopener noreferrer","aria-label":"Powered by Deskcord",className:"flex items-center gap-1 text-[10px] text-gray-400 hover:text-gray-600 dark:text-neutral-600 dark:hover:text-neutral-400 transition-colors duration-200 no-underline",children:[x("span",{children:"Powered by"}),x(Gy,{className:"h-[10px] w-auto"})]})]})]})},Qu=t=>{const e=Date.now(),n=Math.floor((e-t)/1e3);return n<60?"Just now":n<3600?`${Math.floor(n/60)}m ago`:n<86400?`${Math.floor(n/3600)}h ago`:`${Math.floor(n/86400)}d ago`},td="carousel",ed="controller",Zy="navigation",Jy="no-scroll",os="portal",Qy="root",nd="toolbar",ss="loading",as="error",cs="complete",t1="placeholder",e1=t=>`active-slide-${t}`,rd="flex_center",n1="no_scroll",id="no_scroll_padding",r1="slide_wrapper",Re="prev",Ne="next",od="swipe",cn="close",sd="onPointerDown",ad="onPointerMove",cd="onPointerUp",ld="onPointerLeave",ud="onPointerCancel",dd="onKeyDown",i1="onKeyUp",hd="onWheel",o1="Escape",s1="ArrowLeft",a1="ArrowRight",c1="button",ls="icon",fd="contain",pd="cover",l1="Unknown action type",md="yarl__";function le(...t){return[...t].filter(Boolean).join(" ")}function q(t){return`${md}${t}`}function It(t){return`--${md}${t}`}function Yn(t,e){return`${t}${e?`_${e}`:""}`}function us(t){return e=>Yn(t,e)}function u1(t,e){var n;return(n=t==null?void 0:t[e])!==null&&n!==void 0?n:e}function gd(...t){return()=>{t.forEach(e=>{e()})}}function De(t,e,n){return()=>{const r=ut(n);if(!r)throw new Error(`${t} must be used within a ${e}.Provider`);return r}}function yd(){return typeof window<"u"}function d1(t,e=0){const n=10**e;return Math.round((t+Number.EPSILON)*n)/n}function wd(t){return t.type===void 0||t.type==="image"}function h1(t,e){return t.imageFit===pd||t.imageFit!==fd&&e===pd}function $r(t){return typeof t=="string"?Number.parseInt(t,10):t}function zr(t){if(typeof t=="number")return{pixel:t};if(typeof t=="string"){const e=$r(t);return t.endsWith("%")?{percent:e}:{pixel:e}}return{pixel:0}}function f1(t,e){const n=zr(e),r=n.percent!==void 0?t.width/100*n.percent:n.pixel;return{width:Math.max(t.width-2*r,0),height:Math.max(t.height-2*r,0)}}function vd(t,e){return e>0?(t%e+e)%e:0}function _d(t){return t.length>0}function xd(t,e){return t[vd(e,t.length)]}function ds(t,e){return _d(t)?xd(t,e):void 0}function p1(t){return wd(t)?t.src:void 0}function m1(t,e,n=0){return Math.min(t.preload,Math.max(t.finite?e.length-1:Math.floor(e.length/2),n))}const g1=Number(Sa.split(".")[0])>=19;function y1(t){return{inert:g1?t:t?"":void 0}}const hs={open:!1,close:()=>{},index:0,slides:[],render:{},plugins:[],toolbar:{buttons:[cn]},labels:{},animation:{fade:250,swipe:500,easing:{fade:"ease",swipe:"ease-out",navigation:"ease-in-out"}},carousel:{finite:!1,preload:2,padding:"16px",spacing:"30%",imageFit:fd,imageProps:{}},controller:{ref:null,focus:!0,aria:!1,touchAction:"none",closeOnPullUp:!1,closeOnPullDown:!1,closeOnBackdropClick:!1,preventDefaultWheelX:!0,preventDefaultWheelY:!1},portal:{},noScroll:{disabled:!1},on:{},styles:{},className:""};function Be(t,e){return{name:t,component:e}}function xt(t,e){return{module:t,children:e}}function bd(t,e,n){return t.module.name===e?n(t):t.children?[xt(t.module,t.children.flatMap(r=>{var i;return(i=bd(r,e,n))!==null&&i!==void 0?i:[]}))]:[t]}function ln(t,e,n){return t.flatMap(r=>{var i;return(i=bd(r,e,n))!==null&&i!==void 0?i:[]})}function w1(t,e=[],n=[]){let r=t;const i=g=>{const v=[...r];for(;v.length>0;){const w=v.pop();if((w==null?void 0:w.module.name)===g)return!0;w!=null&&w.children&&v.push(...w.children)}return!1},o=(g,v)=>{if(g===""){r=[xt(v,r)];return}r=ln(r,g,w=>[xt(v,[w])])},s=(g,v)=>{r=ln(r,g,w=>[xt(w.module,[xt(v,w.children)])])},a=(g,v,w)=>{r=ln(r,g,E=>{var _;return[xt(E.module,[...w?[xt(v)]:[],...(_=E.children)!==null&&_!==void 0?_:[],...w?[]:[xt(v)]])]})},u=(g,v,w)=>{r=ln(r,g,E=>[...w?[xt(v)]:[],E,...w?[]:[xt(v)]])},h=g=>{s(ed,g)},c=(g,v)=>{r=ln(r,g,w=>[xt(v,w.children)])},f=g=>{r=ln(r,g,v=>v.children)},m=g=>{n.push(g)};return e.forEach(g=>{g({contains:i,addParent:o,append:s,addChild:a,addSibling:u,addModule:h,replace:c,remove:f,augment:m})}),{config:r,augmentation:g=>n.reduce((v,w)=>w(v),g)}}const Cd=kt(null),fs=De("useDocument","DocumentContext",Cd);function v1({nodeRef:t,children:e}){const n=vt(()=>{const r=o=>{var s;return((s=o||t.current)===null||s===void 0?void 0:s.ownerDocument)||document};return{getOwnerDocument:r,getOwnerWindow:o=>{var s;return((s=r(o))===null||s===void 0?void 0:s.defaultView)||window}}},[t]);return L(Cd.Provider,{value:n},e)}const Ed=kt(null),jr=De("useEvents","EventsContext",Ed);function _1({children:t}){const[e]=H({});U(()=>()=>{Object.keys(e).forEach(r=>delete e[r])},[e]);const n=vt(()=>{const r=(s,a)=>{var u;(u=e[s])===null||u===void 0||u.splice(0,e[s].length,...e[s].filter(h=>h!==a))};return{publish:(...[s,a])=>{var u;(u=e[s])===null||u===void 0||u.forEach(h=>h(a))},subscribe:(s,a)=>(e[s]||(e[s]=[]),e[s].push(a),()=>r(s,a)),unsubscribe:r}},[e]);return L(Ed.Provider,{value:n},t)}const Sd=kt(null),Gn=De("useLightboxProps","LightboxPropsContext",Sd);function x1({children:t,...e}){return L(Sd.Provider,{value:e},t)}const kd=kt(null),Wr=De("useLightboxState","LightboxStateContext",kd),Td=kt(null),b1=De("useLightboxDispatch","LightboxDispatchContext",Td);function C1(t,e){switch(e.type){case"swipe":{const{slides:n}=t,r=(e==null?void 0:e.increment)||0,i=t.globalIndex+r,o=vd(i,n.length),s=ds(n,o),a=r||e.duration?{increment:r,duration:e.duration,easing:e.easing}:void 0;return{slides:n,currentIndex:o,globalIndex:i,currentSlide:s,animation:a}}case"update":return e.slides!==t.slides||e.index!==t.currentIndex?{slides:e.slides,currentIndex:e.index,globalIndex:e.index,currentSlide:ds(e.slides,e.index)}:t;default:throw new Error(l1)}}function E1({slides:t,index:e,children:n}){const[r,i]=bn(C1,{slides:t,currentIndex:e,globalIndex:e,currentSlide:ds(t,e)});U(()=>{i({type:"update",slides:t,index:e})},[t,e]);const o=vt(()=>({...r,state:r,dispatch:i}),[r,i]);return L(Td.Provider,{value:i},L(kd.Provider,{value:o},n))}const Ad=kt(null),Hr=De("useTimeouts","TimeoutsContext",Ad);function S1({children:t}){const[e]=H([]);U(()=>()=>{e.forEach(r=>window.clearTimeout(r)),e.splice(0,e.length)},[e]);const n=vt(()=>{const r=s=>{e.splice(0,e.length,...e.filter(a=>a!==s))};return{setTimeout:(s,a)=>{const u=window.setTimeout(()=>{r(u),s()},a);return e.push(u),u},clearTimeout:s=>{s!==void 0&&(r(s),window.clearTimeout(s))}}},[e]);return L(Ad.Provider,{value:n},t)}const Pd=he(function({label:e,className:n,icon:r,renderIcon:i,onClick:o,style:s,...a},u){const{styles:h,labels:c}=Gn(),f=u1(c,e);return L("button",{ref:u,type:"button",title:f,"aria-label":f,className:le(q(c1),n),onClick:o,style:{...s,...h.button},...a},i?i():L(r,{className:q(ls),style:h.icon}))});function k1(t,e){const n=r=>L("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false",...r},e);return n.displayName=t,n}function Xn(t,e){return k1(t,L("g",{fill:"currentColor"},L("path",{d:"M0 0h24v24H0z",fill:"none"}),e))}const T1=Xn("Close",L("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),A1=Xn("Previous",L("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})),P1=Xn("Next",L("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),I1=Xn("Loading",L(J,null,Array.from({length:8}).map((t,e,n)=>L("line",{key:e,x1:"12",y1:"6.5",x2:"12",y2:"1.8",strokeLinecap:"round",strokeWidth:"2.6",stroke:"currentColor",strokeOpacity:1/n.length*(e+1),transform:`rotate(${360/n.length*e}, 12, 12)`})))),M1=Xn("Error",L("path",{d:"M21.9,21.9l-8.49-8.49l0,0L3.59,3.59l0,0L2.1,2.1L0.69,3.51L3,5.83V19c0,1.1,0.9,2,2,2h13.17l2.31,2.31L21.9,21.9z M5,18 l3.5-4.5l2.5,3.01L12.17,15l3,3H5z M21,18.17L5.83,3H19c1.1,0,2,0.9,2,2V18.17z"})),Zn=yd()?oe:U;function Id(){const[t,e]=H(!1);return U(()=>{var n,r;const i=(n=window.matchMedia)===null||n===void 0?void 0:n.call(window,"(prefers-reduced-motion: reduce)");e(i==null?void 0:i.matches);const o=s=>e(s.matches);return(r=i==null?void 0:i.addEventListener)===null||r===void 0||r.call(i,"change",o),()=>{var s;return(s=i==null?void 0:i.removeEventListener)===null||s===void 0?void 0:s.call(i,"change",o)}},[]),t}function R1(t){let e=0,n=0,r=0;const o=window.getComputedStyle(t).transform.match(/matrix.*\((.+)\)/);if(o){const s=o[1].split(",").map($r);s.length===6?(e=s[4],n=s[5]):s.length===16&&(e=s[12],n=s[13],r=s[14])}return{x:e,y:n,z:r}}function Md(t,e){const n=F(),r=F(),i=Id();return Zn(()=>{var o,s,a;if(t.current&&n.current!==void 0&&!i){const{keyframes:u,duration:h,easing:c,onfinish:f}=e(n.current,t.current.getBoundingClientRect(),R1(t.current))||{};if(u&&h){(o=r.current)===null||o===void 0||o.cancel(),r.current=void 0;try{r.current=(a=(s=t.current).animate)===null||a===void 0?void 0:a.call(s,u,{duration:h,easing:c})}catch(m){console.error(m)}r.current&&(r.current.onfinish=()=>{r.current=void 0,f==null||f()})}}n.current=void 0}),{prepareAnimation:o=>{n.current=o},isAnimationPlaying:()=>{var o;return((o=r.current)===null||o===void 0?void 0:o.playState)==="running"}}}function Rd(){const t=F(null),e=F(),[n,r]=H();return{setContainerRef:Q(o=>{t.current=o,e.current&&(e.current.disconnect(),e.current=void 0);const s=()=>{if(o){const a=window.getComputedStyle(o),u=h=>parseFloat(h)||0;r({width:Math.round(o.clientWidth-u(a.paddingLeft)-u(a.paddingRight)),height:Math.round(o.clientHeight-u(a.paddingTop)-u(a.paddingBottom))})}else r(void 0)};s(),o&&typeof ResizeObserver<"u"&&(e.current=new ResizeObserver(s),e.current.observe(o))},[]),containerRef:t,containerRect:n}}function Kr(){const t=F(),{setTimeout:e,clearTimeout:n}=Hr();return Q((r,i)=>{n(t.current),t.current=e(r,i>0?i:0)},[e,n])}function gt(t){const e=F(t);return Zn(()=>{e.current=t}),Q((...n)=>{var r;return(r=e.current)===null||r===void 0?void 0:r.call(e,...n)},[])}function Nd(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function ps(t,e){return vt(()=>t==null&&e==null?null:n=>{Nd(t,n),Nd(e,n)},[t,e])}function N1(t,e=!1){const n=F();Zn(()=>{e&&n.current&&(n.current=!1,t())},[e,t]);const r=Q(()=>{n.current=!0},[]),i=Q(()=>{n.current=!1},[]);return{onFocus:r,onBlur:i}}function ms(){const[t,e]=H(!1);return Zn(()=>{e(window.getComputedStyle(window.document.documentElement).direction==="rtl")},[]),t}function D1(){const[t]=H({}),e=Q((i,o)=>{var s;(s=t[i])===null||s===void 0||s.forEach(a=>{o.isPropagationStopped()||a(o)})},[t]),n=vt(()=>({onPointerDown:i=>e(sd,i),onPointerMove:i=>e(ad,i),onPointerUp:i=>e(cd,i),onPointerLeave:i=>e(ld,i),onPointerCancel:i=>e(ud,i),onKeyDown:i=>e(dd,i),onKeyUp:i=>e(i1,i),onWheel:i=>e(hd,i)}),[e]),r=Q((i,o)=>(t[i]||(t[i]=[]),t[i].unshift(o),()=>{const s=t[i];s&&s.splice(0,s.length,...s.filter(a=>a!==o))}),[t]);return{registerSensors:n,subscribeSensors:r}}function Dd(t,e){const n=F(0),r=Kr(),i=gt((...o)=>{n.current=Date.now(),t(o)});return Q((...o)=>{r(()=>{i(o)},e-(Date.now()-n.current))},[e,i,r])}const gs=us("slide"),ys=us("slide_image");function B1({slide:t,offset:e,render:n,rect:r,imageFit:i,imageProps:o,onClick:s,onLoad:a,onError:u,style:h}){var c,f,m,g,v,w,E;const[_,C]=H(ss),{publish:T}=jr(),{setTimeout:I}=Hr(),k=F(null);U(()=>{e===0&&T(e1(_))},[e,_,T]);const R=gt(W=>{("decode"in W?W.decode():Promise.resolve()).catch(()=>{}).then(()=>{W.parentNode&&(C(cs),I(()=>{a==null||a(W)},0))})}),N=Q(W=>{k.current=W,W!=null&&W.complete&&R(W)},[R]),P=Q(W=>{R(W.currentTarget)},[R]),M=gt(()=>{C(as),u==null||u()}),B=h1(t,i),O=(W,Yt)=>Number.isFinite(W)?W:Yt,et=O(Math.max(...((f=(c=t.srcSet)===null||c===void 0?void 0:c.map(W=>W.width))!==null&&f!==void 0?f:[]).concat(t.width?[t.width]:[]).filter(Boolean)),((m=k.current)===null||m===void 0?void 0:m.naturalWidth)||0),ht=O(Math.max(...((v=(g=t.srcSet)===null||g===void 0?void 0:g.map(W=>W.height))!==null&&v!==void 0?v:[]).concat(t.height?[t.height]:[]).filter(Boolean)),((w=k.current)===null||w===void 0?void 0:w.naturalHeight)||0),Mt=et&&ht?{maxWidth:`min(${et}px, 100%)`,maxHeight:`min(${ht}px, 100%)`}:{maxWidth:"100%",maxHeight:"100%"},G=(E=t.srcSet)===null||E===void 0?void 0:E.sort((W,Yt)=>W.width-Yt.width).map(W=>`${W.src} ${W.width}w`).join(", "),hn=()=>r&&!B&&t.width&&t.height?r.height/t.height*t.width:Number.MAX_VALUE,K=G&&r&&yd()?`${Math.round(Math.min(hn(),r.width))}px`:void 0,{style:wt,className:Lt,...jt}=o||{};return L(J,null,L("img",{ref:N,onLoad:P,onError:M,onClick:s,draggable:!1,className:le(q(ys()),B&&q(ys("cover")),_!==cs&&q(ys("loading")),Lt),style:{...Mt,...h,...wt},...jt,alt:t.alt,sizes:K,srcSet:G,src:t.src}),_!==cs&&L("div",{className:q(gs(t1))},_===ss&&(n!=null&&n.iconLoading?n.iconLoading():L(I1,{className:le(q(ls),q(gs(ss)))})),_===as&&(n!=null&&n.iconError?n.iconError():L(M1,{className:le(q(ls),q(gs(as)))}))))}const L1=he(function({className:e,children:n,...r},i){const o=F(null);return L(v1,{nodeRef:o},L("div",{ref:ps(i,o),className:le(q("root"),e),...r},n))});var St;(function(t){t[t.NONE=0]="NONE",t[t.SWIPE=1]="SWIPE",t[t.PULL=2]="PULL",t[t.ANIMATION=3]="ANIMATION"})(St||(St={}));function O1(t,e,n,r,i){U(()=>gd(t(sd,e),t(ad,n),t(cd,r),t(ld,r),t(ud,r)),[t,e,n,r,i])}var Kt;(function(t){t[t.NONE=0]="NONE",t[t.SWIPE=1]="SWIPE",t[t.PULL=2]="PULL"})(Kt||(Kt={}));const ws=30;function F1(t,e,n,r,i,o,s,a,u,h,c,f,m,g){const v=F(0),w=F([]),E=F(),_=F(0),C=F(Kt.NONE),T=Q(M=>{E.current===M.pointerId&&(E.current=void 0,C.current=Kt.NONE);const B=w.current;B.splice(0,B.length,...B.filter(O=>O.pointerId!==M.pointerId))},[]),I=Q(M=>{T(M),M.persist(),w.current.push(M)},[T]),k=gt(M=>{I(M)}),R=(M,B)=>h&&M>B||u&&M<-B,N=gt(M=>{if(w.current.find(B=>B.pointerId===M.pointerId)&&E.current===M.pointerId){const B=Date.now()-_.current,O=v.current;C.current===Kt.SWIPE?Math.abs(O)>.3*n||Math.abs(O)>5&&B<r?s(O,B):a(O):C.current===Kt.PULL&&(R(O,2*ws)?m(O,B):g(O)),v.current=0,C.current=Kt.NONE}T(M)}),P=gt(M=>{const B=w.current.find(O=>O.pointerId===M.pointerId);if(B){const O=E.current===M.pointerId;if(M.buttons===0){O&&v.current!==0?N(M):T(B);return}const et=M.clientX-B.clientX,ht=M.clientY-B.clientY;if(E.current===void 0){const Mt=G=>{I(M),E.current=M.pointerId,_.current=Date.now(),C.current=G};Math.abs(et)>Math.abs(ht)&&Math.abs(et)>ws&&e(et)?(Mt(Kt.SWIPE),i()):Math.abs(ht)>Math.abs(et)&&R(ht,ws)&&(Mt(Kt.PULL),c())}else O&&(C.current===Kt.SWIPE?(v.current=et,o(et)):C.current===Kt.PULL&&(v.current=ht,f(ht)))}});O1(t,k,P,N)}function V1({preventDefaultWheelX:t,preventDefaultWheelY:e}){const n=F(null),r=gt(i=>{const o=Math.abs(i.deltaX)>Math.abs(i.deltaY);(o&&t||!o&&e||i.ctrlKey)&&i.preventDefault()});return Q(i=>{var o;i?i.addEventListener("wheel",r,{passive:!1}):(o=n.current)===null||o===void 0||o.removeEventListener("wheel",r),n.current=i},[r])}function U1(t,e,n,r,i,o,s,a,u){const h=F(0),c=F(0),f=F(),m=F(),g=F(0),v=F(),w=F(0),{setTimeout:E,clearTimeout:_}=Hr(),C=Q(()=>{f.current&&(_(f.current),f.current=void 0)},[_]),T=Q(()=>{m.current&&(_(m.current),m.current=void 0)},[_]),I=gt(()=>{t!==St.SWIPE&&(h.current=0,w.current=0,C(),T())});U(I,[t,I]);const k=gt(N=>{m.current=void 0,h.current===N&&u(h.current)}),R=gt(N=>{if(N.ctrlKey||Math.abs(N.deltaY)>Math.abs(N.deltaX))return;const P=M=>{g.current=M,_(v.current),v.current=M>0?E(()=>{g.current=0,v.current=void 0},300):void 0};if(t===St.NONE){if(Math.abs(N.deltaX)<=1.2*Math.abs(g.current)){P(N.deltaX);return}if(!n(-N.deltaX))return;if(c.current+=N.deltaX,C(),Math.abs(c.current)>30)c.current=0,P(0),w.current=Date.now(),o();else{const M=c.current;f.current=E(()=>{f.current=void 0,M===c.current&&(c.current=0)},i)}}else if(t===St.SWIPE){let M=h.current-N.deltaX;if(M=Math.min(Math.abs(M),r)*Math.sign(M),h.current=M,s(M),T(),Math.abs(M)>.2*r){P(N.deltaX),a(M,Date.now()-w.current);return}m.current=E(()=>k(M),2*i)}else P(N.deltaX)});U(()=>e(hd,R),[e,R])}const Bd=us("container"),Ld=kt(null),Jn=De("useController","ControllerContext",Ld);function $1({children:t,...e}){var n;const{carousel:r,animation:i,controller:o,on:s,styles:a,render:u}=e,{closeOnPullUp:h,closeOnPullDown:c,preventDefaultWheelX:f,preventDefaultWheelY:m}=o,[g,v]=H(),w=Wr(),E=b1(),[_,C]=H(St.NONE),T=F(0),I=F(0),k=F(1),{registerSensors:R,subscribeSensors:N}=D1(),{subscribe:P,publish:M}=jr(),B=Kr(),O=Kr(),et=Kr(),{containerRef:ht,setContainerRef:Mt,containerRect:G}=Rd(),hn=ps(V1({preventDefaultWheelX:f,preventDefaultWheelY:m}),Mt),K=F(null),wt=ps(K,void 0),{getOwnerDocument:Lt}=fs(),jt=ms(),W=D=>(jt?-1:1)*(typeof D=="number"?D:1),Yt=gt(()=>{var D;return(D=ht.current)===null||D===void 0?void 0:D.focus()}),ni=gt(()=>e),ft=gt(()=>w),_t=Q(D=>M(Re,D),[M]),Oe=Q(D=>M(Ne,D),[M]),ye=Q(()=>M(cn),[M]),fn=D=>!(r.finite&&(W(D)>0&&w.currentIndex===0||W(D)<0&&w.currentIndex===w.slides.length-1)),nr=D=>{var Z;T.current=D,(Z=ht.current)===null||Z===void 0||Z.style.setProperty(It("swipe_offset"),`${Math.round(D)}px`)},pn=D=>{var Z,bt;I.current=D,k.current=(()=>{const de=c&&D>0?D:h&&D<0?-D:0;return Math.min(Math.max(d1(1-de/60*(1-.5),2),.5),1)})(),(Z=ht.current)===null||Z===void 0||Z.style.setProperty(It("pull_offset"),`${Math.round(D)}px`),(bt=ht.current)===null||bt===void 0||bt.style.setProperty(It("pull_opacity"),`${k.current}`)},{prepareAnimation:we}=Md(K,(D,Z,bt)=>{if(K.current&&G)return{keyframes:[{transform:`translate(0, ${D.rect.y-Z.y+bt.y}px)`,opacity:D.opacity},{transform:"translate(0, 0)",opacity:1}],duration:D.duration,easing:i.easing.fade}}),mn=(D,Z)=>{if(h||c){pn(D);let bt=0;K.current&&(bt=i.fade*(Z?2:1),we({rect:K.current.getBoundingClientRect(),opacity:k.current,duration:bt})),et(()=>{pn(0),C(St.NONE)},bt),C(St.ANIMATION),Z||ye()}},{prepareAnimation:ri,isAnimationPlaying:Bs}=Md(K,(D,Z,bt)=>{var At;if(K.current&&G&&(!((At=w.animation)===null||At===void 0)&&At.duration)){const st=zr(r.spacing),de=(st.percent?st.percent*G.width/100:st.pixel)||0;return{keyframes:[{transform:`translate(${W(w.globalIndex-D.index)*(G.width+de)+D.rect.x-Z.x+bt.x}px, 0)`},{transform:"translate(0, 0)"}],duration:w.animation.duration,easing:w.animation.easing}}}),ve=gt(D=>{var Z,bt;const At=D.offset||0,st=At?i.swipe:(Z=i.navigation)!==null&&Z!==void 0?Z:i.swipe,de=!At&&!Bs()?i.easing.navigation:i.easing.swipe;let{direction:gn}=D;const Ot=(bt=D.count)!==null&&bt!==void 0?bt:1;let ir=St.ANIMATION,p=st*Ot;if(!gn){const d=G==null?void 0:G.width,y=D.duration||0,b=d?st/d*Math.abs(At):st;Ot!==0?(y<b?p=p/b*Math.max(y,b/5):d&&(p=st/d*(d-Math.abs(At))),gn=W(At)>0?Re:Ne):p=st/2}let l=0;gn===Re?fn(W(1))?l=-Ot:(ir=St.NONE,p=st):gn===Ne&&(fn(W(-1))?l=Ot:(ir=St.NONE,p=st)),p=Math.round(p),O(()=>{nr(0),C(St.NONE)},p),K.current&&ri({rect:K.current.getBoundingClientRect(),index:w.globalIndex}),C(ir),M(od,{type:"swipe",increment:l,duration:p,easing:de})});U(()=>{var D,Z;!((D=w.animation)===null||D===void 0)&&D.increment&&(!((Z=w.animation)===null||Z===void 0)&&Z.duration)&&B(()=>E({type:"swipe",increment:0}),w.animation.duration)},[w.animation,E,B]);const ue=[N,fn,(G==null?void 0:G.width)||0,i.swipe,()=>C(St.SWIPE),D=>nr(D),(D,Z)=>ve({offset:D,duration:Z,count:1}),D=>ve({offset:D,count:0})],Fe=[()=>{c&&C(St.PULL)},D=>pn(D),D=>mn(D),D=>mn(D,!0)];F1(...ue,h,c,...Fe),U1(_,...ue);const ii=gt(()=>{o.focus&&Lt().querySelector(`.${q(os)} .${q(Bd())}`)&&Yt()});U(ii,[ii]);const oi=gt(()=>{var D;(D=s.view)===null||D===void 0||D.call(s,{index:w.currentIndex})});U(oi,[w.globalIndex,oi]),U(()=>gd(P(Re,D=>ve({direction:Re,...D})),P(Ne,D=>ve({direction:Ne,...D})),P(od,D=>E(D))),[P,ve,E]);const rr=vt(()=>({prev:_t,next:Oe,close:ye,focus:Yt,slideRect:G?f1(G,r.padding):{width:0,height:0},containerRect:G||{width:0,height:0},subscribeSensors:N,containerRef:ht,setCarouselRef:wt,toolbarWidth:g,setToolbarWidth:v}),[_t,Oe,ye,Yt,N,G,ht,wt,g,v,r.padding]);return Cn(o.ref,()=>({prev:_t,next:Oe,close:ye,focus:Yt,getLightboxProps:ni,getLightboxState:ft}),[_t,Oe,ye,Yt,ni,ft]),L("div",{ref:hn,className:le(q(Bd()),q(rd)),style:{..._===St.SWIPE?{[It("swipe_offset")]:`${Math.round(T.current)}px`}:null,..._===St.PULL?{[It("pull_offset")]:`${Math.round(I.current)}px`,[It("pull_opacity")]:`${k.current}`}:null,...o.touchAction!=="none"?{[It("controller_touch_action")]:o.touchAction}:null,...a.container},...o.aria?{role:"presentation","aria-live":"polite"}:null,tabIndex:-1,...R},G&&L(Ld.Provider,{value:rr},t,(n=u.controls)===null||n===void 0?void 0:n.call(u)))}const z1=Be(ed,$1);function Le(t){return Yn(td,t)}function Od(t){return Yn("slide",t)}function j1({slide:t,offset:e}){const n=F(null),{currentIndex:r}=Wr(),{slideRect:i,close:o,focus:s}=Jn(),{render:a,carousel:{imageFit:u,imageProps:h},on:{click:c},controller:{closeOnBackdropClick:f},styles:{slide:m}}=Gn(),{getOwnerDocument:g}=fs(),v=e!==0;U(()=>{var _;v&&(!((_=n.current)===null||_===void 0)&&_.contains(g().activeElement))&&s()},[v,s,g]);const w=()=>{var _,C,T,I;let k=(_=a.slide)===null||_===void 0?void 0:_.call(a,{slide:t,offset:e,rect:i});return!k&&wd(t)&&(k=L(B1,{slide:t,offset:e,render:a,rect:i,imageFit:u,imageProps:h,onClick:v?void 0:()=>c==null?void 0:c({index:r})})),k?L(J,null,(C=a.slideHeader)===null||C===void 0?void 0:C.call(a,{slide:t}),((T=a.slideContainer)!==null&&T!==void 0?T:({children:R})=>R)({slide:t,children:k}),(I=a.slideFooter)===null||I===void 0?void 0:I.call(a,{slide:t})):null},E=_=>{const C=n.current,T=_.target instanceof HTMLElement?_.target:void 0;f&&T&&C&&(T===C||Array.from(C.children).find(I=>I===T)&&T.classList.contains(q(r1)))&&o()};return L("div",{ref:n,className:le(q(Od()),!v&&q(Od("current")),q(rd)),...y1(v),onClick:E,style:m},w())}function W1(){const t=Gn().styles.slide;return L("div",{className:q("slide"),style:t})}function H1({carousel:t}){const{slides:e,currentIndex:n,globalIndex:r}=Wr(),{setCarouselRef:i}=Jn(),o=zr(t.spacing),s=zr(t.padding),a=m1(t,e,1),u=[];if(_d(e))for(let h=n-a;h<=n+a;h+=1){const c=xd(e,h),f=r-n+h,m=t.finite&&(h<0||h>e.length-1);u.push(m?{key:f}:{key:[`${f}`,p1(c)].filter(Boolean).join("|"),offset:h-n,slide:c})}return L("div",{ref:i,className:le(q(Le()),u.length>0&&q(Le("with_slides"))),style:{[`${It(Le("slides_count"))}`]:u.length,[`${It(Le("spacing_px"))}`]:o.pixel||0,[`${It(Le("spacing_percent"))}`]:o.percent||0,[`${It(Le("padding_px"))}`]:s.pixel||0,[`${It(Le("padding_percent"))}`]:s.percent||0}},u.map(({key:h,slide:c,offset:f})=>c?L(j1,{key:h,slide:c,offset:f}):L(W1,{key:h})))}const K1=Be(td,H1);function Fd(){const{carousel:t}=Gn(),{slides:e,currentIndex:n}=Wr(),r=e.length===0||t.finite&&n===0,i=e.length===0||t.finite&&n===e.length-1;return{prevDisabled:r,nextDisabled:i}}function q1(t){var e;const n=ms(),{publish:r}=jr(),{animation:i}=Gn(),{prevDisabled:o,nextDisabled:s}=Fd(),a=((e=i.navigation)!==null&&e!==void 0?e:i.swipe)/2,u=Dd(()=>r(Re),a),h=Dd(()=>r(Ne),a),c=gt(f=>{switch(f.key){case o1:r(cn);break;case s1:(n?s:o)||(n?h:u)();break;case a1:(n?o:s)||(n?u:h)();break}});U(()=>t(dd,c),[t,c])}function Vd({label:t,icon:e,renderIcon:n,action:r,onClick:i,disabled:o,style:s}){return L(Pd,{label:t,icon:e,renderIcon:n,className:q(`navigation_${r}`),disabled:o,onClick:i,style:s,...N1(Jn().focus,o)})}function Y1({render:{buttonPrev:t,buttonNext:e,iconPrev:n,iconNext:r},styles:i}){const{prev:o,next:s,subscribeSensors:a}=Jn(),{prevDisabled:u,nextDisabled:h}=Fd();return q1(a),L(J,null,t?t():L(Vd,{label:"Previous",action:Re,icon:A1,renderIcon:n,style:i.navigationPrev,disabled:u,onClick:o}),e?e():L(Vd,{label:"Next",action:Ne,icon:P1,renderIcon:r,style:i.navigationNext,disabled:h,onClick:s}))}const G1=Be(Zy,Y1),Ud=q(n1),X1=q(id);function Z1(t){return"style"in t}function $d(t,e,n){const r=window.getComputedStyle(t),i=n?"padding-left":"padding-right",o=n?r.paddingLeft:r.paddingRight,s=t.style.getPropertyValue(i);return t.style.setProperty(i,`${($r(o)||0)+e}px`),()=>{s?t.style.setProperty(i,s):t.style.removeProperty(i)}}function J1({noScroll:{disabled:t},children:e}){const n=ms(),{getOwnerDocument:r,getOwnerWindow:i}=fs();return U(()=>{if(t)return()=>{};const o=[],s=i(),{body:a,documentElement:u}=r(),h=Math.round(s.innerWidth-u.clientWidth);if(h>0){o.push($d(a,h,n));const c=a.getElementsByTagName("*");for(let f=0;f<c.length;f+=1){const m=c[f];Z1(m)&&s.getComputedStyle(m).getPropertyValue("position")==="fixed"&&!m.classList.contains(X1)&&o.push($d(m,h,n))}}return a.classList.add(Ud),()=>{a.classList.remove(Ud),o.forEach(c=>c())}},[n,t,r,i]),L(J,null,e)}const Q1=Be(Jy,J1);function zd(t){return Yn(os,t)}function jd(t,e,n){const r=t.getAttribute(e);return t.setAttribute(e,n),()=>{r?t.setAttribute(e,r):t.removeAttribute(e)}}function tw({children:t,animation:e,styles:n,className:r,on:i,portal:o,close:s}){const[a,u]=H(!1),[h,c]=H(!1),f=F([]),m=F(null),{setTimeout:g}=Hr(),{subscribe:v}=jr(),E=Id()?0:e.fade;U(()=>(u(!0),()=>{u(!1),c(!1)}),[]);const _=gt(()=>{f.current.forEach(k=>k()),f.current=[]}),C=gt(()=>{var k;c(!1),_(),(k=i.exiting)===null||k===void 0||k.call(i),g(()=>{var R;(R=i.exited)===null||R===void 0||R.call(i),s()},E)});U(()=>v(cn,C),[v,C]);const T=gt(k=>{var R,N,P;k.scrollTop,c(!0),(R=i.entering)===null||R===void 0||R.call(i);const M=(P=(N=k.parentNode)===null||N===void 0?void 0:N.children)!==null&&P!==void 0?P:[];for(let B=0;B<M.length;B+=1){const O=M[B];["TEMPLATE","SCRIPT","STYLE"].indexOf(O.tagName)===-1&&O!==k&&(f.current.push(jd(O,"inert","")),f.current.push(jd(O,"aria-hidden","true")))}f.current.push(()=>{var B,O;(O=(B=m.current)===null||B===void 0?void 0:B.focus)===null||O===void 0||O.call(B)}),g(()=>{var B;(B=i.entered)===null||B===void 0||B.call(i)},E)}),I=Q(k=>{k?T(k):_()},[T,_]);return a?Si(L(L1,{ref:I,className:le(r,q(zd()),q(id),h&&q(zd("open"))),role:"presentation","aria-live":"polite",style:{...e.fade!==hs.animation.fade?{[It("fade_animation_duration")]:`${E}ms`}:null,...e.easing.fade!==hs.animation.easing.fade?{[It("fade_animation_timing_function")]:e.easing.fade}:null,...n.root},onFocus:k=>{m.current||(m.current=k.relatedTarget)}},t),o.root||document.body):null}const ew=Be(os,tw);function nw({children:t}){return L(J,null,t)}const rw=Be(Qy,nw);function iw(t){return Yn(nd,t)}function ow({toolbar:{buttons:t},render:{buttonClose:e,iconClose:n},styles:r}){const{close:i,setToolbarWidth:o}=Jn(),{setContainerRef:s,containerRect:a}=Rd();Zn(()=>{o(a==null?void 0:a.width)},[o,a==null?void 0:a.width]);const u=()=>e?e():L(Pd,{key:cn,label:"Close",icon:T1,renderIcon:n,onClick:i});return L("div",{ref:s,style:r.toolbar,className:q(iw())},t==null?void 0:t.map(h=>h===cn?u():h))}const sw=Be(nd,ow);function Wd(t,e){var n;return L(t.module.component,{key:t.module.name,...e},(n=t.children)===null||n===void 0?void 0:n.map(r=>Wd(r,e)))}function aw(t,e={}){const{easing:n,...r}=t,{easing:i,...o}=e;return{easing:{...n,...i},...r,...o}}function cw({carousel:t,animation:e,render:n,toolbar:r,controller:i,noScroll:o,on:s,plugins:a,slides:u,index:h,...c}){const{animation:f,carousel:m,render:g,toolbar:v,controller:w,noScroll:E,on:_,slides:C,index:T,plugins:I,...k}=hs,{config:R,augmentation:N}=w1([xt(ew,[xt(Q1,[xt(z1,[xt(K1),xt(sw),xt(G1)])])])],a||I),P=N({animation:aw(f,e),carousel:{...m,...t},render:{...g,...n},toolbar:{...v,...r},controller:{...w,...i},noScroll:{...E,...o},on:{..._,...s},...k,...c});return P.open?L(x1,{...P},L(E1,{slides:u||C,index:$r(h||T)},L(S1,null,L(_1,null,Wd(xt(rw,R),P))))):null}function Hd(t){var e;return t.contentType?t.contentType==="image/gif":((e=t.name)==null?void 0:e.toLowerCase().endsWith(".gif"))??!1}const Kd=({messageIndexKey:t,attachments:e})=>{const{setFullScreen:n}=ot(),[r,i]=H(!1),o=ut(Ch);function s(){if(o){const c=o.getElementById("deskcord-lightbox-portal");if(c)return c}const h=document.getElementById("deskcord-lightbox-portal");return h||document.body}const a=(e==null?void 0:e.filter(h=>!Hd(h)))??[];function u(){return a.length?x(cw,{open:r,portal:{root:s()},close:()=>{i(!1),n(!1)},slides:a.map(h=>({src:h.proxyURL}))}):null}return e!=null&&e.length?x("div",{children:[e.map((h,c)=>{const{proxyURL:f,width:m,height:g}=h;return Hd(h)?x("div",{children:x("img",{src:f,alt:"GIF",className:`rounded-lg w-[${m}px] h-[${g}px] max-w-[200px] max-h-[200px] aspect-auto`})},`conv-cus-attachment-${t}-${c}`):x("div",{onClick:()=>{n(!0),i(!0)},className:"cursor-pointer",children:x("img",{src:f,alt:"Preview",className:`rounded-lg w-[${m}px] h-[${g}px] max-w-[200px] max-h-[200px] aspect-auto`})},`conv-cus-attachment-${t}-${c}`)}),u()]},`conv-cus-attachment-${t}`):null},qd=({imageUrls:t,messageIndexKey:e})=>t.length?x("div",{className:"flex flex-col gap-1 mt-1",children:t.map((n,r)=>x("div",{className:"inline-block",children:x("img",{src:n,alt:"Inline image",className:"rounded-lg max-w-[200px] max-h-[200px] object-contain",loading:"lazy"})},`inline-img-${e}-${r}`))}):null,lw=["tenor.com","giphy.com","imgur.com","gfycat.com","media.discordapp.net","cdn.discordapp.com","i.redd.it","i.imgur.com"],uw=[".gif",".jpg",".jpeg",".png",".webp",".apng"];function dw(t){try{const e=new URL(t),n=e.pathname.toLowerCase(),r=e.hostname.toLowerCase();for(const i of uw)if(n.endsWith(i))return!0;for(const i of lw)if(r===i||r.endsWith(`.${i}`))return!0;return!1}catch{return!1}}const hw=/https?:\/\/[^\s<>]+/gi;function Yd(t){if(!t)return{text:"",imageUrls:[]};const e=[];let n=t;const r=t.match(hw);if(r)for(const i of r)dw(i)&&(e.push(i),n=n.replace(i,""));return n=n.replace(/\s+/g," ").trim(),{text:n,imageUrls:e}}const fw=({renderTimestamp:t,message:e,indexKey:n})=>{function r(s,a){const u=/<\w?:\w+:\d+>/g,h=s.split(u),c=s.match(u)??[],f=[];for(let m=0;m<h.length;m++)if(f.push(h[m]),c[m]){const g=a[c[m]];g&&f.push(x("img",{src:g.imageURL,alt:"",style:{display:"inline-block",width:"20px",height:"20px"}},m))}return f}const{text:i,imageUrls:o}=Yd(e.content??"");return x("li",{className:"flex flex-col items-start max-w-lg gap-x-2 sm:gap-x-4 me-11",children:[i&&x("div",{style:{background:"linear-gradient(167deg, #27292A 0%, #404547 100%)"},className:"text-white text-sm min-w-10 inline-block rounded-lg px-3 py-2 shadow-sm",children:r(i,e.emojis??{})}),x(qd,{imageUrls:o,messageIndexKey:n}),x("div",{className:"flex flex-1",children:x(Kd,{attachments:e.attachments,messageIndexKey:n})}),t&&x("div",{children:x("span",{className:"mt-1.5 flex items-center gap-x-1 text-xs text-gray-500",children:[e.authorName," · ",Qu(e.date)," ",e.edited?"(edited)":""]})})]},`conv-cs-${n}`)},pw=({message:t,indexKey:e})=>{const{text:n,imageUrls:r}=Yd(t.content??"");return x("li",{className:`flex flex-col items-end ms-auto my-[3px] ${t.pending?"opacity-80":""}`,children:[n&&x("div",{className:"grow",children:x("div",{style:{background:"linear-gradient(167deg, #7289DA 0%, #5B6EAB 100%)"},className:"min-w-10 inline-block rounded-lg px-3 py-2 shadow-sm",children:x("p",{className:"text-left text-sm text-white",children:n})})}),x(qd,{imageUrls:r,messageIndexKey:e}),t.attachments&&x("div",{className:"flex flex-1 justify-end",children:x(Kd,{attachments:t.attachments,messageIndexKey:e})},`conv-cus-${e}-attachments`)]},`conv-cus-${e}`)},mw=({message:t,indexKey:e})=>x("li",{className:"max-w-lg flex gap-x-2 sm:gap-x-4 me-11",children:x("div",{className:"bg-white border border-gray-200 rounded-2xl p-4 space-y-3 dark:bg-neutral-900 dark:border-neutral-700",children:x("p",{className:"mb-1.5 text-sm text-gray-800 dark:text-white",children:t.content})})},`conv-system-${e}`),gw=()=>{const{setEmail:t,setUsername:e,username:n,email:r,token:i}=ot(),[o,s]=H(r),[a,u]=H(n),[h,c]=H(""),[f,m]=H(!1),g=_=>/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(_),v=!!n&&!!r,w=_=>{if(_.preventDefault(),!!a.trim()){if(!g(o)){c("Please enter a valid email address");return}f||(m(!0),c(""),t(o),e(a))}};function E(){return x("form",{onSubmit:w,className:"w-full space-y-4",children:[x("div",{className:"mb-4",children:[x("h3",{className:"text-base font-semibold text-gray-900 mb-1",children:"Let's get started"}),x("p",{className:"text-sm text-gray-600",children:"Tell us a bit about yourself so we can assist you better."})]}),x("div",{children:[x("label",{htmlFor:"name",className:"block text-sm font-medium text-gray-700 mb-2",children:"Your name"}),x("div",{className:"relative",children:[x("div",{className:"absolute inset-y-0 start-0 flex items-center pointer-events-none z-20 ps-3.5",children:x(Bg,{size:18,className:"text-gray-400"})}),x("input",{type:"text",id:"name",value:a,onChange:_=>u(_.target.value),name:"name",className:"py-2.5 px-4 ps-11 block w-full bg-white border border-gray-300 rounded-lg text-base md:text-sm text-gray-900 placeholder-gray-500 transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-[#7289DA] focus:ring-opacity-50 focus:border-transparent disabled:bg-gray-100 disabled:text-gray-500 disabled:cursor-not-allowed",placeholder:"John Smith",disabled:v,required:!0})]})]}),x("div",{children:[x("label",{htmlFor:"email",className:"block text-sm font-medium text-gray-700 mb-2",children:"Email address"}),x("div",{className:"relative",children:[x("div",{className:"absolute inset-y-0 start-0 flex items-center pointer-events-none z-20 ps-3.5",children:x(Pg,{size:18,className:"text-gray-400"})}),x("input",{type:"email",id:"email",value:o,onChange:_=>{s(_.target.value),h&&c("")},name:"email",className:`py-2.5 px-4 ps-11 block w-full bg-white rounded-lg text-base md:text-sm text-gray-900 placeholder-gray-500 transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-opacity-50 focus:border-transparent disabled:bg-gray-100 disabled:text-gray-500 disabled:cursor-not-allowed border ${h?"border-red-500 focus:ring-red-500":"border-gray-300 focus:ring-[#7289DA]"}`,placeholder:"you@example.com",disabled:v,required:!0})]}),h&&x("p",{className:"text-red-600 text-sm mt-2 flex items-center gap-1",children:[x("span",{className:"inline-block w-1 h-1 bg-red-600 rounded-full"}),h]})]}),x("p",{className:"text-xs text-gray-500 text-center",children:"We'll never share your information"}),!n||!r?x("button",{type:"submit",className:"w-full py-2.5 px-4 bg-[#7289DA] hover:bg-[#5B6EAB] text-white font-medium text-sm rounded-lg transition-all duration-200 transform hover:shadow-md active:scale-95 focus:outline-none focus:ring-2 focus:ring-[#7289DA] focus:ring-opacity-50 disabled:opacity-50 disabled:cursor-not-allowed",disabled:f,children:"Start Chatting"}):null]})}return x(J,{children:[x("li",{className:`max-w-lg flex gap-x-2 sm:gap-x-4 me-11 ${i?"opacity-75":""}`,children:x("div",{className:"w-full rounded-xl p-5 bg-white shadow-lg border border-gray-100 overflow-hidden",children:E()})}),n&&r&&x("li",{className:"flex ms-auto my-4 animate-slide-in",style:{marginTop:"1rem"},children:x("div",{className:"grow",children:x("div",{style:{background:"linear-gradient(167deg, #7289DA 0%, #5B6EAB 100%)"},className:"min-w-10 inline-block rounded-lg px-4 py-2 shadow-sm flex items-center gap-2",children:[x(Tg,{size:16,className:"text-white flex-shrink-0"}),x("p",{className:"text-sm text-white font-medium",children:["Nice to meet you, ",x("span",{className:"font-semibold",children:n}),"! Feel free to ask us anything."]})]})})})]})};function yw(t,e){const n=F();U(()=>{n.current=t},[t]),U(()=>{function r(){var i;(i=n==null?void 0:n.current)==null||i.call(n)}if(e!==null){const i=setInterval(r,e);return()=>clearInterval(i)}},[e])}function ww(t,e=!1,n=1){const r=e?1e3:1024;if(Math.abs(t)<r)return t+" B";const i=e?["kB","MB","GB","TB","PB","EB","ZB","YB"]:["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];let o=-1;const s=10**n;do t/=r,++o;while(Math.round(Math.abs(t)*s)/s>=r&&o<i.length-1);return t.toFixed(n)+" "+i[o]}const vw=({indexKey:t,message:e})=>{const n=e.customRendererProps.file,r=n.status==="error",[i,o]=H(!0),[s,a]=H(0);return yw(()=>{s<88?a(s+2.5):o(!1)},i&&!r?250:null),x("li",{className:"max-w-lg flex gap-x-2 sm:gap-x-4",style:{marginTop:"20px",marginBottom:"20px"},children:x("div",{className:"w-full bg-white border border-gray-200 rounded-2xl p-4 space-y-4",children:x("div",{children:[x("div",{className:"mb-2 flex justify-between items-center",children:[x("div",{className:"flex items-center gap-x-3",children:[x("span",{className:`size-8 flex ${r?"text-red-500":"text-blue-600"} justify-center items-center border border-gray-200 rounded-lg dark:border-neutral-700 dark:text-neutral-500`,children:x(Ag,{})}),x("div",{children:[x("p",{className:`text-sm ${r?"font-semibold text-red-500":"font-medium text-gray-800"}`,children:n.fileName}),x("p",{className:"text-xs text-gray-500 dark:text-neutral-500",children:ww(n.size)})]})]}),r&&x("div",{className:"inline-flex items-center gap-x-2",children:x("span",{className:"relative",children:[x("svg",{className:"shrink-0 size-4 text-red-500",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",children:x("path",{d:"M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"})}),x("span",{className:"sr-only",children:"Danger"})]})})]}),x("div",{className:"flex items-center gap-x-3 whitespace-nowrap",children:[x("div",{className:"flex w-full h-2 bg-gray-200 rounded-full overflow-hidden dark:bg-neutral-700",role:"progressbar",children:x("div",{className:`flex flex-col justify-center rounded-full overflow-hidden ${r?"bg-red-500":"bg-blue-600"} text-xs text-white text-center whitespace-nowrap transition duration-500 dark:bg-blue-500`,style:{width:`${s}%`}})}),x("div",{className:"w-6 text-end",children:x("span",{className:"text-sm text-gray-800 dark:text-white",children:[Math.round(s),"%"]})})]})]})})},`conv-fileupload-${t}`)},_w=({conversation:t,open:e})=>{const n=F(!1),{isChatOpen:r}=ot();U(()=>{r?n.current=!0:n.current=!1},[r]);function i(u,h){const c=`${u.date}-${h}`;let f;if(typeof u.customRenderer<"u")switch(u.customRenderer){case an.IntroduceYourself:f=x(gw,{});break;case an.UploadFile:f=x(vw,{message:u,indexKey:c});break;default:f=a(u,c)}else u.authorName===qn?f=a(u,c):u.support?f=o(u,c):f=s(u,c);return r&&(u.pending??(u.support&&n.current))?x(ce.li,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:f},c):x("li",{children:f},c)}function o(u,h){var g;const c=(g=t==null?void 0:t.messages)==null?void 0:g.filter(v=>v.support),f=c==null?void 0:c[c.length-1],m=u.date===(f==null?void 0:f.date);return x(fw,{renderTimestamp:m,message:u,indexKey:h})}function s(u,h){return x(pw,{message:u,indexKey:h})}function a(u,h){return x(mw,{message:u,indexKey:h})}return x("ul",{className:"space-y-[3px]",children:[[...(t==null?void 0:t.messages)??[]].sort((u,h)=>u.date-h.date).map(i),t&&!e&&i(Vy,1)]})},xw=()=>{const{getConversation:t,addMessage:e,tempConversationToThread:n,username:r,email:i,updateMessage:o,isChatOpen:s}=ot(),a=!!(r&&i),u=F(!1);U(()=>{s&&!u.current&&(u.current=!0),s||(u.current=!1)},[s]);const[h,c]=H(!1),[f,m]=H([]),[g,v]=H({}),w=t(),E=(w==null?void 0:w.status)==="open",[_,C]=H("");U(()=>{const R={};f.forEach(N=>{const P=new FileReader;P.addEventListener("load",function(){const M=new Image;M.onload=()=>{R[N.name]={url:P.result,width:M.width,height:M.height,size:N.size},v(R)},M.src=P.result},!1),P.readAsDataURL(N)})},[f]);const T=R=>{C(N=>N+R)},I=async()=>{const R=Date.now(),N={support:!1,content:_,date:R,authorName:r,pending:!0};if(_.trim()!==""){C(""),e(w?w.threadId:"TEMP",N);const P=await Fy({content:_});P&&((!w||w.threadId==="TEMP")&&n(P.threadId),o(P.threadId,R,{...N,pending:!1,date:P.date}))}},k=s&&!u.current;return x(J,{children:[x("div",{className:"flex-1 overflow-y-auto overflow-x-hidden p-4 flex flex-col-reverse space-y-4 space-y-reverse",children:x(ce.div,{initial:k?{opacity:0,x:20}:!1,animate:{opacity:1,x:0},transition:{duration:.3,ease:"easeOut",delay:.1},children:x(_w,{conversation:w,open:E})})}),x(Xy,{attachmentPreviews:g,files:f,setFiles:m,inputMessage:_,setInputMessage:C,showEmojiPicker:h,setShowEmojiPicker:c,addEmoji:T,sendMessage:I,disabled:!a})]})};function Gd(t,e){switch(t){case"online":return e==="text"?"text-teal-600":"bg-teal-400";case"idle":return e==="text"?"text-yellow-600":"bg-yellow-400";case"dnd":return e==="text"?"text-red-600":"bg-red-400";case"offline":case"invisible":return e==="text"?"text-black":"bg-gray-400";default:return e==="text"?"text-black":"bg-gray-400"}}function bw(t){switch(t){case"online":return"Online";case"idle":case"offline":case"invisible":return"Away";case"dnd":return"Unavailable";default:return"Away"}}const Qt=Object.create(null);Qt.open="0",Qt.close="1",Qt.ping="2",Qt.pong="3",Qt.message="4",Qt.upgrade="5",Qt.noop="6";const qr=Object.create(null);Object.keys(Qt).forEach(t=>{qr[Qt[t]]=t});const vs={type:"error",data:"parser error"},Xd=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Zd=typeof ArrayBuffer=="function",Jd=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,_s=({type:t,data:e},n,r)=>Xd&&e instanceof Blob?n?r(e):Qd(e,r):Zd&&(e instanceof ArrayBuffer||Jd(e))?n?r(e):Qd(new Blob([e]),r):r(Qt[t]+(e||"")),Qd=(t,e)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];e("b"+(r||""))},n.readAsDataURL(t)};function th(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let xs;function Cw(t,e){if(Xd&&t.data instanceof Blob)return t.data.arrayBuffer().then(th).then(e);if(Zd&&(t.data instanceof ArrayBuffer||Jd(t.data)))return e(th(t.data));_s(t,!1,n=>{xs||(xs=new TextEncoder),e(xs.encode(n))})}const eh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Qn=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<eh.length;t++)Qn[eh.charCodeAt(t)]=t;const Ew=t=>{let e=t.length*.75,n=t.length,r,i=0,o,s,a,u;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const h=new ArrayBuffer(e),c=new Uint8Array(h);for(r=0;r<n;r+=4)o=Qn[t.charCodeAt(r)],s=Qn[t.charCodeAt(r+1)],a=Qn[t.charCodeAt(r+2)],u=Qn[t.charCodeAt(r+3)],c[i++]=o<<2|s>>4,c[i++]=(s&15)<<4|a>>2,c[i++]=(a&3)<<6|u&63;return h},Sw=typeof ArrayBuffer=="function",bs=(t,e)=>{if(typeof t!="string")return{type:"message",data:nh(t,e)};const n=t.charAt(0);return n==="b"?{type:"message",data:kw(t.substring(1),e)}:qr[n]?t.length>1?{type:qr[n],data:t.substring(1)}:{type:qr[n]}:vs},kw=(t,e)=>{if(Sw){const n=Ew(t);return nh(n,e)}else return{base64:!0,data:t}},nh=(t,e)=>{switch(e){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},rh="",Tw=(t,e)=>{const n=t.length,r=new Array(n);let i=0;t.forEach((o,s)=>{_s(o,!1,a=>{r[s]=a,++i===n&&e(r.join(rh))})})},Aw=(t,e)=>{const n=t.split(rh),r=[];for(let i=0;i<n.length;i++){const o=bs(n[i],e);if(r.push(o),o.type==="error")break}return r};function Pw(){return new TransformStream({transform(t,e){Cw(t,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const o=new DataView(i.buffer);o.setUint8(0,126),o.setUint16(1,r)}else{i=new Uint8Array(9);const o=new DataView(i.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(r))}t.data&&typeof t.data!="string"&&(i[0]|=128),e.enqueue(i),e.enqueue(n)})}})}let Cs;function Yr(t){return t.reduce((e,n)=>e+n.length,0)}function Gr(t,e){if(t[0].length===e)return t.shift();const n=new Uint8Array(e);let r=0;for(let i=0;i<e;i++)n[i]=t[0][r++],r===t[0].length&&(t.shift(),r=0);return t.length&&r<t[0].length&&(t[0]=t[0].slice(r)),n}function Iw(t,e){Cs||(Cs=new TextDecoder);const n=[];let r=0,i=-1,o=!1;return new TransformStream({transform(s,a){for(n.push(s);;){if(r===0){if(Yr(n)<1)break;const u=Gr(n,1);o=(u[0]&128)===128,i=u[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if(Yr(n)<2)break;const u=Gr(n,2);i=new DataView(u.buffer,u.byteOffset,u.length).getUint16(0),r=3}else if(r===2){if(Yr(n)<8)break;const u=Gr(n,8),h=new DataView(u.buffer,u.byteOffset,u.length),c=h.getUint32(0);if(c>Math.pow(2,21)-1){a.enqueue(vs);break}i=c*Math.pow(2,32)+h.getUint32(4),r=3}else{if(Yr(n)<i)break;const u=Gr(n,i);a.enqueue(bs(o?u:Cs.decode(u),e)),r=0}if(i===0||i>t){a.enqueue(vs);break}}}})}const ih=4;function yt(t){if(t)return Mw(t)}function Mw(t){for(var e in yt.prototype)t[e]=yt.prototype[e];return t}yt.prototype.on=yt.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},yt.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},yt.prototype.off=yt.prototype.removeListener=yt.prototype.removeAllListeners=yt.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+t];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===e||r.fn===e){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+t],this},yt.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,e)}return this},yt.prototype.emitReserved=yt.prototype.emit,yt.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},yt.prototype.hasListeners=function(t){return!!this.listeners(t).length};const $t=typeof self<"u"?self:typeof window<"u"?window:Function("return this")();function oh(t,...e){return e.reduce((n,r)=>(t.hasOwnProperty(r)&&(n[r]=t[r]),n),{})}const Rw=$t.setTimeout,Nw=$t.clearTimeout;function Xr(t,e){e.useNativeTimers?(t.setTimeoutFn=Rw.bind($t),t.clearTimeoutFn=Nw.bind($t)):(t.setTimeoutFn=$t.setTimeout.bind($t),t.clearTimeoutFn=$t.clearTimeout.bind($t))}const Dw=1.33;function Bw(t){return typeof t=="string"?Lw(t):Math.ceil((t.byteLength||t.size)*Dw)}function Lw(t){let e=0,n=0;for(let r=0,i=t.length;r<i;r++)e=t.charCodeAt(r),e<128?n+=1:e<2048?n+=2:e<55296||e>=57344?n+=3:(r++,n+=4);return n}function Ow(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}function Fw(t){let e={},n=t.split("&");for(let r=0,i=n.length;r<i;r++){let o=n[r].split("=");e[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return e}class Vw extends Error{constructor(e,n,r){super(e),this.description=n,this.context=r,this.type="TransportError"}}class Es extends yt{constructor(e){super(),this.writable=!1,Xr(this,e),this.opts=e,this.query=e.query,this.socket=e.socket}onError(e,n,r){return super.emitReserved("error",new Vw(e,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const n=bs(e,this.socket.binaryType);this.onPacket(n)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,n={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const n=Ow(e);return n.length?"?"+n:""}}const sh="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),Ss=64,Uw={};let ah=0,Zr=0,ch;function lh(t){let e="";do e=sh[t%Ss]+e,t=Math.floor(t/Ss);while(t>0);return e}function uh(){const t=lh(+new Date);return t!==ch?(ah=0,ch=t):t+"."+lh(ah++)}for(;Zr<Ss;Zr++)Uw[sh[Zr]]=Zr;let dh=!1;try{dh=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const $w=dh;function hh(t){const e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||$w))return new XMLHttpRequest}catch{}if(!e)try{return new $t[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function t_(){}function zw(){}const jw=function(){return new hh({xdomain:!1}).responseType!=null}();class Ww extends Es{constructor(e){if(super(e),this.polling=!1,typeof location<"u"){const r=location.protocol==="https:";let i=location.port;i||(i=r?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||i!==e.port}const n=e&&e.forceBase64;this.supportsBinary=jw&&!n,this.opts.withCredentials&&(this.cookieJar=void 0)}get name(){return"polling"}doOpen(){this.poll()}pause(e){this.readyState="pausing";const n=()=>{this.readyState="paused",e()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};Aw(e,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,Tw(e,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=uh()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(e,n)}request(e={}){return Object.assign(e,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new te(this.uri(),e)}doWrite(e,n){const r=this.request({method:"POST",data:e});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=e}}class te extends yt{constructor(e,n){super(),Xr(this,n),this.opts=n,this.method=n.method||"GET",this.uri=e,this.data=n.data!==void 0?n.data:null,this.create()}create(){var e;const n=oh(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new hh(n);try{r.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this.opts.extraHeaders[i])}}catch{}if(this.method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(e=this.opts.cookieJar)===null||e===void 0||e.addCookies(r),"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this.opts.cookieJar)===null||i===void 0||i.parseCookies(r)),r.readyState===4&&(r.status===200||r.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof r.status=="number"?r.status:0)},0))},r.send(this.data)}catch(i){this.setTimeoutFn(()=>{this.onError(i)},0);return}typeof document<"u"&&(this.index=te.requestsCount++,te.requests[this.index]=this)}onError(e){this.emitReserved("error",e,this.xhr),this.cleanup(!0)}cleanup(e){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=zw,e)try{this.xhr.abort()}catch{}typeof document<"u"&&delete te.requests[this.index],this.xhr=null}}onLoad(){const e=this.xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}if(te.requestsCount=0,te.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",fh);else if(typeof addEventListener=="function"){const t="onpagehide"in $t?"pagehide":"unload";addEventListener(t,fh,!1)}}function fh(){for(let t in te.requests)te.requests.hasOwnProperty(t)&&te.requests[t].abort()}var Hw={},Jr={};Jr.byteLength=Yw,Jr.toByteArray=Xw,Jr.fromByteArray=Qw;for(var ee=[],zt=[],Kw=typeof Uint8Array<"u"?Uint8Array:Array,ks="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",un=0,qw=ks.length;un<qw;++un)ee[un]=ks[un],zt[ks.charCodeAt(un)]=un;zt[45]=62,zt[95]=63;function ph(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");n===-1&&(n=e);var r=n===e?0:4-n%4;return[n,r]}function Yw(t){var e=ph(t),n=e[0],r=e[1];return(n+r)*3/4-r}function Gw(t,e,n){return(e+n)*3/4-n}function Xw(t){var e,n=ph(t),r=n[0],i=n[1],o=new Kw(Gw(t,r,i)),s=0,a=i>0?r-4:r,u;for(u=0;u<a;u+=4)e=zt[t.charCodeAt(u)]<<18|zt[t.charCodeAt(u+1)]<<12|zt[t.charCodeAt(u+2)]<<6|zt[t.charCodeAt(u+3)],o[s++]=e>>16&255,o[s++]=e>>8&255,o[s++]=e&255;return i===2&&(e=zt[t.charCodeAt(u)]<<2|zt[t.charCodeAt(u+1)]>>4,o[s++]=e&255),i===1&&(e=zt[t.charCodeAt(u)]<<10|zt[t.charCodeAt(u+1)]<<4|zt[t.charCodeAt(u+2)]>>2,o[s++]=e>>8&255,o[s++]=e&255),o}function Zw(t){return ee[t>>18&63]+ee[t>>12&63]+ee[t>>6&63]+ee[t&63]}function Jw(t,e,n){for(var r,i=[],o=e;o<n;o+=3)r=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(t[o+2]&255),i.push(Zw(r));return i.join("")}function Qw(t){for(var e,n=t.length,r=n%3,i=[],o=16383,s=0,a=n-r;s<a;s+=o)i.push(Jw(t,s,s+o>a?a:s+o));return r===1?(e=t[n-1],i.push(ee[e>>2]+ee[e<<4&63]+"==")):r===2&&(e=(t[n-2]<<8)+t[n-1],i.push(ee[e>>10]+ee[e>>4&63]+ee[e<<2&63]+"=")),i.join("")}var Ts={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Ts.read=function(t,e,n,r,i){var o,s,a=i*8-r-1,u=(1<<a)-1,h=u>>1,c=-7,f=n?i-1:0,m=n?-1:1,g=t[e+f];for(f+=m,o=g&(1<<-c)-1,g>>=-c,c+=a;c>0;o=o*256+t[e+f],f+=m,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=r;c>0;s=s*256+t[e+f],f+=m,c-=8);if(o===0)o=1-h;else{if(o===u)return s?NaN:(g?-1:1)*(1/0);s=s+Math.pow(2,r),o=o-h}return(g?-1:1)*s*Math.pow(2,o-r)},Ts.write=function(t,e,n,r,i,o){var s,a,u,h=o*8-i-1,c=(1<<h)-1,f=c>>1,m=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=r?0:o-1,v=r?1:-1,w=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),s+f>=1?e+=m/u:e+=m*Math.pow(2,1-f),e*u>=2&&(s++,u/=2),s+f>=c?(a=0,s=c):s+f>=1?(a=(e*u-1)*Math.pow(2,i),s=s+f):(a=e*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;t[n+g]=a&255,g+=v,a/=256,i-=8);for(s=s<<i|a,h+=i;h>0;t[n+g]=s&255,g+=v,s/=256,h-=8);t[n+g-v]|=w*128};/*!
101
101
  * The buffer module from node.js, for the browser.
102
102
  *
103
103
  * @author Feross Aboukhadijeh <https://feross.org>
104
104
  * @license MIT
105
- */(function(t){const e=ki,n=ga,r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=c,t.SlowBuffer=O,t.INSPECT_MAX_BYTES=50;const i=2147483647;t.kMaxLength=i;const{Uint8Array:o,ArrayBuffer:s,SharedArrayBuffer:a}=globalThis;c.TYPED_ARRAY_SUPPORT=l(),!c.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function l(){try{const p=new o(1),u={foo:function(){return 42}};return Object.setPrototypeOf(u,o.prototype),Object.setPrototypeOf(p,u),p.foo()===42}catch{return!1}}Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}});function d(p){if(p>i)throw new RangeError('The value "'+p+'" is invalid for option "size"');const u=new o(p);return Object.setPrototypeOf(u,c.prototype),u}function c(p,u,f){if(typeof p=="number"){if(typeof u=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return w(p)}return h(p,u,f)}c.poolSize=8192;function h(p,u,f){if(typeof p=="string")return _(p,u);if(s.isView(p))return x(p);if(p==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof p);if(R(p,s)||p&&R(p.buffer,s)||typeof a<"u"&&(R(p,a)||p&&R(p.buffer,a)))return v(p,u,f);if(typeof p=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const g=p.valueOf&&p.valueOf();if(g!=null&&g!==p)return c.from(g,u,f);const C=E(p);if(C)return C;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof p[Symbol.toPrimitive]=="function")return c.from(p[Symbol.toPrimitive]("string"),u,f);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof p)}c.from=function(p,u,f){return h(p,u,f)},Object.setPrototypeOf(c.prototype,o.prototype),Object.setPrototypeOf(c,o);function m(p){if(typeof p!="number")throw new TypeError('"size" argument must be of type number');if(p<0)throw new RangeError('The value "'+p+'" is invalid for option "size"')}function y(p,u,f){return m(p),p<=0?d(p):u!==void 0?typeof f=="string"?d(p).fill(u,f):d(p).fill(u):d(p)}c.alloc=function(p,u,f){return y(p,u,f)};function w(p){return m(p),d(p<0?0:M(p)|0)}c.allocUnsafe=function(p){return w(p)},c.allocUnsafeSlow=function(p){return w(p)};function _(p,u){if((typeof u!="string"||u==="")&&(u="utf8"),!c.isEncoding(u))throw new TypeError("Unknown encoding: "+u);const f=j(p,u)|0;let g=d(f);const C=g.write(p,u);return C!==f&&(g=g.slice(0,C)),g}function P(p){const u=p.length<0?0:M(p.length)|0,f=d(u);for(let g=0;g<u;g+=1)f[g]=p[g]&255;return f}function x(p){if(R(p,o)){const u=new o(p);return v(u.buffer,u.byteOffset,u.byteLength)}return P(p)}function v(p,u,f){if(u<0||p.byteLength<u)throw new RangeError('"offset" is outside of buffer bounds');if(p.byteLength<u+(f||0))throw new RangeError('"length" is outside of buffer bounds');let g;return u===void 0&&f===void 0?g=new o(p):f===void 0?g=new o(p,u):g=new o(p,u,f),Object.setPrototypeOf(g,c.prototype),g}function E(p){if(c.isBuffer(p)){const u=M(p.length)|0,f=d(u);return f.length===0||p.copy(f,0,0,u),f}if(p.length!==void 0)return typeof p.length!="number"||X(p.length)?d(0):P(p);if(p.type==="Buffer"&&Array.isArray(p.data))return P(p.data)}function M(p){if(p>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return p|0}function O(p){return+p!=p&&(p=0),c.alloc(+p)}c.isBuffer=function(u){return u!=null&&u._isBuffer===!0&&u!==c.prototype},c.compare=function(u,f){if(R(u,o)&&(u=c.from(u,u.offset,u.byteLength)),R(f,o)&&(f=c.from(f,f.offset,f.byteLength)),!c.isBuffer(u)||!c.isBuffer(f))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(u===f)return 0;let g=u.length,C=f.length;for(let D=0,V=Math.min(g,C);D<V;++D)if(u[D]!==f[D]){g=u[D],C=f[D];break}return g<C?-1:C<g?1:0},c.isEncoding=function(u){switch(String(u).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(u,f){if(!Array.isArray(u))throw new TypeError('"list" argument must be an Array of Buffers');if(u.length===0)return c.alloc(0);let g;if(f===void 0)for(f=0,g=0;g<u.length;++g)f+=u[g].length;const C=c.allocUnsafe(f);let D=0;for(g=0;g<u.length;++g){let V=u[g];if(R(V,o))D+V.length>C.length?(c.isBuffer(V)||(V=c.from(V)),V.copy(C,D)):o.prototype.set.call(C,V,D);else if(c.isBuffer(V))V.copy(C,D);else throw new TypeError('"list" argument must be an Array of Buffers');D+=V.length}return C};function j(p,u){if(c.isBuffer(p))return p.length;if(s.isView(p)||R(p,s))return p.byteLength;if(typeof p!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof p);const f=p.length,g=arguments.length>2&&arguments[2]===!0;if(!g&&f===0)return 0;let C=!1;for(;;)switch(u){case"ascii":case"latin1":case"binary":return f;case"utf8":case"utf-8":return me(p).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return f*2;case"hex":return f>>>1;case"base64":return Et(p).length;default:if(C)return g?-1:me(p).length;u=(""+u).toLowerCase(),C=!0}}c.byteLength=j;function B(p,u,f){let g=!1;if((u===void 0||u<0)&&(u=0),u>this.length||((f===void 0||f>this.length)&&(f=this.length),f<=0)||(f>>>=0,u>>>=0,f<=u))return"";for(p||(p="utf8");;)switch(p){case"hex":return S(this,u,f);case"utf8":case"utf-8":return at(this,u,f);case"ascii":return H(this,u,f);case"latin1":case"binary":return G(this,u,f);case"base64":return It(this,u,f);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,u,f);default:if(g)throw new TypeError("Unknown encoding: "+p);p=(p+"").toLowerCase(),g=!0}}c.prototype._isBuffer=!0;function L(p,u,f){const g=p[u];p[u]=p[f],p[f]=g}c.prototype.swap16=function(){const u=this.length;if(u%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let f=0;f<u;f+=2)L(this,f,f+1);return this},c.prototype.swap32=function(){const u=this.length;if(u%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let f=0;f<u;f+=4)L(this,f,f+3),L(this,f+1,f+2);return this},c.prototype.swap64=function(){const u=this.length;if(u%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let f=0;f<u;f+=8)L(this,f,f+7),L(this,f+1,f+6),L(this,f+2,f+5),L(this,f+3,f+4);return this},c.prototype.toString=function(){const u=this.length;return u===0?"":arguments.length===0?at(this,0,u):B.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(u){if(!c.isBuffer(u))throw new TypeError("Argument must be a Buffer");return this===u?!0:c.compare(this,u)===0},c.prototype.inspect=function(){let u="";const f=t.INSPECT_MAX_BYTES;return u=this.toString("hex",0,f).replace(/(.{2})/g,"$1 ").trim(),this.length>f&&(u+=" ... "),"<Buffer "+u+">"},r&&(c.prototype[r]=c.prototype.inspect),c.prototype.compare=function(u,f,g,C,D){if(R(u,o)&&(u=c.from(u,u.offset,u.byteLength)),!c.isBuffer(u))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof u);if(f===void 0&&(f=0),g===void 0&&(g=u?u.length:0),C===void 0&&(C=0),D===void 0&&(D=this.length),f<0||g>u.length||C<0||D>this.length)throw new RangeError("out of range index");if(C>=D&&f>=g)return 0;if(C>=D)return-1;if(f>=g)return 1;if(f>>>=0,g>>>=0,C>>>=0,D>>>=0,this===u)return 0;let V=D-C,lt=g-f;const bt=Math.min(V,lt),xt=this.slice(C,D),Bt=u.slice(f,g);for(let Ct=0;Ct<bt;++Ct)if(xt[Ct]!==Bt[Ct]){V=xt[Ct],lt=Bt[Ct];break}return V<lt?-1:lt<V?1:0};function F(p,u,f,g,C){if(p.length===0)return-1;if(typeof f=="string"?(g=f,f=0):f>2147483647?f=2147483647:f<-2147483648&&(f=-2147483648),f=+f,X(f)&&(f=C?0:p.length-1),f<0&&(f=p.length+f),f>=p.length){if(C)return-1;f=p.length-1}else if(f<0)if(C)f=0;else return-1;if(typeof u=="string"&&(u=c.from(u,g)),c.isBuffer(u))return u.length===0?-1:Y(p,u,f,g,C);if(typeof u=="number")return u=u&255,typeof o.prototype.indexOf=="function"?C?o.prototype.indexOf.call(p,u,f):o.prototype.lastIndexOf.call(p,u,f):Y(p,[u],f,g,C);throw new TypeError("val must be string, number or Buffer")}function Y(p,u,f,g,C){let D=1,V=p.length,lt=u.length;if(g!==void 0&&(g=String(g).toLowerCase(),g==="ucs2"||g==="ucs-2"||g==="utf16le"||g==="utf-16le")){if(p.length<2||u.length<2)return-1;D=2,V/=2,lt/=2,f/=2}function bt(Bt,Ct){return D===1?Bt[Ct]:Bt.readUInt16BE(Ct*D)}let xt;if(C){let Bt=-1;for(xt=f;xt<V;xt++)if(bt(p,xt)===bt(u,Bt===-1?0:xt-Bt)){if(Bt===-1&&(Bt=xt),xt-Bt+1===lt)return Bt*D}else Bt!==-1&&(xt-=xt-Bt),Bt=-1}else for(f+lt>V&&(f=V-lt),xt=f;xt>=0;xt--){let Bt=!0;for(let Ct=0;Ct<lt;Ct++)if(bt(p,xt+Ct)!==bt(u,Ct)){Bt=!1;break}if(Bt)return xt}return-1}c.prototype.includes=function(u,f,g){return this.indexOf(u,f,g)!==-1},c.prototype.indexOf=function(u,f,g){return F(this,u,f,g,!0)},c.prototype.lastIndexOf=function(u,f,g){return F(this,u,f,g,!1)};function Z(p,u,f,g){f=Number(f)||0;const C=p.length-f;g?(g=Number(g),g>C&&(g=C)):g=C;const D=u.length;g>D/2&&(g=D/2);let V;for(V=0;V<g;++V){const lt=parseInt(u.substr(V*2,2),16);if(X(lt))return V;p[f+V]=lt}return V}function nt(p,u,f,g){return k(me(u,p.length-f),p,f,g)}function st(p,u,f,g){return k(J(u),p,f,g)}function _t(p,u,f,g){return k(Et(u),p,f,g)}function dt(p,u,f,g){return k(vt(u,p.length-f),p,f,g)}c.prototype.write=function(u,f,g,C){if(f===void 0)C="utf8",g=this.length,f=0;else if(g===void 0&&typeof f=="string")C=f,g=this.length,f=0;else if(isFinite(f))f=f>>>0,isFinite(g)?(g=g>>>0,C===void 0&&(C="utf8")):(C=g,g=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const D=this.length-f;if((g===void 0||g>D)&&(g=D),u.length>0&&(g<0||f<0)||f>this.length)throw new RangeError("Attempt to write outside buffer bounds");C||(C="utf8");let V=!1;for(;;)switch(C){case"hex":return Z(this,u,f,g);case"utf8":case"utf-8":return nt(this,u,f,g);case"ascii":case"latin1":case"binary":return st(this,u,f,g);case"base64":return _t(this,u,f,g);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return dt(this,u,f,g);default:if(V)throw new TypeError("Unknown encoding: "+C);C=(""+C).toLowerCase(),V=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function It(p,u,f){return u===0&&f===p.length?e.fromByteArray(p):e.fromByteArray(p.slice(u,f))}function at(p,u,f){f=Math.min(p.length,f);const g=[];let C=u;for(;C<f;){const D=p[C];let V=null,lt=D>239?4:D>223?3:D>191?2:1;if(C+lt<=f){let bt,xt,Bt,Ct;switch(lt){case 1:D<128&&(V=D);break;case 2:bt=p[C+1],(bt&192)===128&&(Ct=(D&31)<<6|bt&63,Ct>127&&(V=Ct));break;case 3:bt=p[C+1],xt=p[C+2],(bt&192)===128&&(xt&192)===128&&(Ct=(D&15)<<12|(bt&63)<<6|xt&63,Ct>2047&&(Ct<55296||Ct>57343)&&(V=Ct));break;case 4:bt=p[C+1],xt=p[C+2],Bt=p[C+3],(bt&192)===128&&(xt&192)===128&&(Bt&192)===128&&(Ct=(D&15)<<18|(bt&63)<<12|(xt&63)<<6|Bt&63,Ct>65535&&Ct<1114112&&(V=Ct))}}V===null?(V=65533,lt=1):V>65535&&(V-=65536,g.push(V>>>10&1023|55296),V=56320|V&1023),g.push(V),C+=lt}return z(g)}const pt=4096;function z(p){const u=p.length;if(u<=pt)return String.fromCharCode.apply(String,p);let f="",g=0;for(;g<u;)f+=String.fromCharCode.apply(String,p.slice(g,g+=pt));return f}function H(p,u,f){let g="";f=Math.min(p.length,f);for(let C=u;C<f;++C)g+=String.fromCharCode(p[C]&127);return g}function G(p,u,f){let g="";f=Math.min(p.length,f);for(let C=u;C<f;++C)g+=String.fromCharCode(p[C]);return g}function S(p,u,f){const g=p.length;(!u||u<0)&&(u=0),(!f||f<0||f>g)&&(f=g);let C="";for(let D=u;D<f;++D)C+=tt[p[D]];return C}function N(p,u,f){const g=p.slice(u,f);let C="";for(let D=0;D<g.length-1;D+=2)C+=String.fromCharCode(g[D]+g[D+1]*256);return C}c.prototype.slice=function(u,f){const g=this.length;u=~~u,f=f===void 0?g:~~f,u<0?(u+=g,u<0&&(u=0)):u>g&&(u=g),f<0?(f+=g,f<0&&(f=0)):f>g&&(f=g),f<u&&(f=u);const C=this.subarray(u,f);return Object.setPrototypeOf(C,c.prototype),C};function b(p,u,f){if(p%1!==0||p<0)throw new RangeError("offset is not uint");if(p+u>f)throw new RangeError("Trying to access beyond buffer length")}c.prototype.readUintLE=c.prototype.readUIntLE=function(u,f,g){u=u>>>0,f=f>>>0,g||b(u,f,this.length);let C=this[u],D=1,V=0;for(;++V<f&&(D*=256);)C+=this[u+V]*D;return C},c.prototype.readUintBE=c.prototype.readUIntBE=function(u,f,g){u=u>>>0,f=f>>>0,g||b(u,f,this.length);let C=this[u+--f],D=1;for(;f>0&&(D*=256);)C+=this[u+--f]*D;return C},c.prototype.readUint8=c.prototype.readUInt8=function(u,f){return u=u>>>0,f||b(u,1,this.length),this[u]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(u,f){return u=u>>>0,f||b(u,2,this.length),this[u]|this[u+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(u,f){return u=u>>>0,f||b(u,2,this.length),this[u]<<8|this[u+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(u,f){return u=u>>>0,f||b(u,4,this.length),(this[u]|this[u+1]<<8|this[u+2]<<16)+this[u+3]*16777216},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(u,f){return u=u>>>0,f||b(u,4,this.length),this[u]*16777216+(this[u+1]<<16|this[u+2]<<8|this[u+3])},c.prototype.readBigUInt64LE=Q(function(u){u=u>>>0,Yt(u,"offset");const f=this[u],g=this[u+7];(f===void 0||g===void 0)&&Jt(u,this.length-8);const C=f+this[++u]*2**8+this[++u]*2**16+this[++u]*2**24,D=this[++u]+this[++u]*2**8+this[++u]*2**16+g*2**24;return BigInt(C)+(BigInt(D)<<BigInt(32))}),c.prototype.readBigUInt64BE=Q(function(u){u=u>>>0,Yt(u,"offset");const f=this[u],g=this[u+7];(f===void 0||g===void 0)&&Jt(u,this.length-8);const C=f*2**24+this[++u]*2**16+this[++u]*2**8+this[++u],D=this[++u]*2**24+this[++u]*2**16+this[++u]*2**8+g;return(BigInt(C)<<BigInt(32))+BigInt(D)}),c.prototype.readIntLE=function(u,f,g){u=u>>>0,f=f>>>0,g||b(u,f,this.length);let C=this[u],D=1,V=0;for(;++V<f&&(D*=256);)C+=this[u+V]*D;return D*=128,C>=D&&(C-=Math.pow(2,8*f)),C},c.prototype.readIntBE=function(u,f,g){u=u>>>0,f=f>>>0,g||b(u,f,this.length);let C=f,D=1,V=this[u+--C];for(;C>0&&(D*=256);)V+=this[u+--C]*D;return D*=128,V>=D&&(V-=Math.pow(2,8*f)),V},c.prototype.readInt8=function(u,f){return u=u>>>0,f||b(u,1,this.length),this[u]&128?(255-this[u]+1)*-1:this[u]},c.prototype.readInt16LE=function(u,f){u=u>>>0,f||b(u,2,this.length);const g=this[u]|this[u+1]<<8;return g&32768?g|4294901760:g},c.prototype.readInt16BE=function(u,f){u=u>>>0,f||b(u,2,this.length);const g=this[u+1]|this[u]<<8;return g&32768?g|4294901760:g},c.prototype.readInt32LE=function(u,f){return u=u>>>0,f||b(u,4,this.length),this[u]|this[u+1]<<8|this[u+2]<<16|this[u+3]<<24},c.prototype.readInt32BE=function(u,f){return u=u>>>0,f||b(u,4,this.length),this[u]<<24|this[u+1]<<16|this[u+2]<<8|this[u+3]},c.prototype.readBigInt64LE=Q(function(u){u=u>>>0,Yt(u,"offset");const f=this[u],g=this[u+7];(f===void 0||g===void 0)&&Jt(u,this.length-8);const C=this[u+4]+this[u+5]*2**8+this[u+6]*2**16+(g<<24);return(BigInt(C)<<BigInt(32))+BigInt(f+this[++u]*2**8+this[++u]*2**16+this[++u]*2**24)}),c.prototype.readBigInt64BE=Q(function(u){u=u>>>0,Yt(u,"offset");const f=this[u],g=this[u+7];(f===void 0||g===void 0)&&Jt(u,this.length-8);const C=(f<<24)+this[++u]*2**16+this[++u]*2**8+this[++u];return(BigInt(C)<<BigInt(32))+BigInt(this[++u]*2**24+this[++u]*2**16+this[++u]*2**8+g)}),c.prototype.readFloatLE=function(u,f){return u=u>>>0,f||b(u,4,this.length),n.read(this,u,!0,23,4)},c.prototype.readFloatBE=function(u,f){return u=u>>>0,f||b(u,4,this.length),n.read(this,u,!1,23,4)},c.prototype.readDoubleLE=function(u,f){return u=u>>>0,f||b(u,8,this.length),n.read(this,u,!0,52,8)},c.prototype.readDoubleBE=function(u,f){return u=u>>>0,f||b(u,8,this.length),n.read(this,u,!1,52,8)};function A(p,u,f,g,C,D){if(!c.isBuffer(p))throw new TypeError('"buffer" argument must be a Buffer instance');if(u>C||u<D)throw new RangeError('"value" argument is out of bounds');if(f+g>p.length)throw new RangeError("Index out of range")}c.prototype.writeUintLE=c.prototype.writeUIntLE=function(u,f,g,C){if(u=+u,f=f>>>0,g=g>>>0,!C){const lt=Math.pow(2,8*g)-1;A(this,u,f,g,lt,0)}let D=1,V=0;for(this[f]=u&255;++V<g&&(D*=256);)this[f+V]=u/D&255;return f+g},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(u,f,g,C){if(u=+u,f=f>>>0,g=g>>>0,!C){const lt=Math.pow(2,8*g)-1;A(this,u,f,g,lt,0)}let D=g-1,V=1;for(this[f+D]=u&255;--D>=0&&(V*=256);)this[f+D]=u/V&255;return f+g},c.prototype.writeUint8=c.prototype.writeUInt8=function(u,f,g){return u=+u,f=f>>>0,g||A(this,u,f,1,255,0),this[f]=u&255,f+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(u,f,g){return u=+u,f=f>>>0,g||A(this,u,f,2,65535,0),this[f]=u&255,this[f+1]=u>>>8,f+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(u,f,g){return u=+u,f=f>>>0,g||A(this,u,f,2,65535,0),this[f]=u>>>8,this[f+1]=u&255,f+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(u,f,g){return u=+u,f=f>>>0,g||A(this,u,f,4,4294967295,0),this[f+3]=u>>>24,this[f+2]=u>>>16,this[f+1]=u>>>8,this[f]=u&255,f+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(u,f,g){return u=+u,f=f>>>0,g||A(this,u,f,4,4294967295,0),this[f]=u>>>24,this[f+1]=u>>>16,this[f+2]=u>>>8,this[f+3]=u&255,f+4};function I(p,u,f,g,C){$t(u,g,C,p,f,7);let D=Number(u&BigInt(4294967295));p[f++]=D,D=D>>8,p[f++]=D,D=D>>8,p[f++]=D,D=D>>8,p[f++]=D;let V=Number(u>>BigInt(32)&BigInt(4294967295));return p[f++]=V,V=V>>8,p[f++]=V,V=V>>8,p[f++]=V,V=V>>8,p[f++]=V,f}function W(p,u,f,g,C){$t(u,g,C,p,f,7);let D=Number(u&BigInt(4294967295));p[f+7]=D,D=D>>8,p[f+6]=D,D=D>>8,p[f+5]=D,D=D>>8,p[f+4]=D;let V=Number(u>>BigInt(32)&BigInt(4294967295));return p[f+3]=V,V=V>>8,p[f+2]=V,V=V>>8,p[f+1]=V,V=V>>8,p[f]=V,f+8}c.prototype.writeBigUInt64LE=Q(function(u,f=0){return I(this,u,f,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeBigUInt64BE=Q(function(u,f=0){return W(this,u,f,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeIntLE=function(u,f,g,C){if(u=+u,f=f>>>0,!C){const bt=Math.pow(2,8*g-1);A(this,u,f,g,bt-1,-bt)}let D=0,V=1,lt=0;for(this[f]=u&255;++D<g&&(V*=256);)u<0&&lt===0&&this[f+D-1]!==0&&(lt=1),this[f+D]=(u/V>>0)-lt&255;return f+g},c.prototype.writeIntBE=function(u,f,g,C){if(u=+u,f=f>>>0,!C){const bt=Math.pow(2,8*g-1);A(this,u,f,g,bt-1,-bt)}let D=g-1,V=1,lt=0;for(this[f+D]=u&255;--D>=0&&(V*=256);)u<0&&lt===0&&this[f+D+1]!==0&&(lt=1),this[f+D]=(u/V>>0)-lt&255;return f+g},c.prototype.writeInt8=function(u,f,g){return u=+u,f=f>>>0,g||A(this,u,f,1,127,-128),u<0&&(u=255+u+1),this[f]=u&255,f+1},c.prototype.writeInt16LE=function(u,f,g){return u=+u,f=f>>>0,g||A(this,u,f,2,32767,-32768),this[f]=u&255,this[f+1]=u>>>8,f+2},c.prototype.writeInt16BE=function(u,f,g){return u=+u,f=f>>>0,g||A(this,u,f,2,32767,-32768),this[f]=u>>>8,this[f+1]=u&255,f+2},c.prototype.writeInt32LE=function(u,f,g){return u=+u,f=f>>>0,g||A(this,u,f,4,2147483647,-2147483648),this[f]=u&255,this[f+1]=u>>>8,this[f+2]=u>>>16,this[f+3]=u>>>24,f+4},c.prototype.writeInt32BE=function(u,f,g){return u=+u,f=f>>>0,g||A(this,u,f,4,2147483647,-2147483648),u<0&&(u=4294967295+u+1),this[f]=u>>>24,this[f+1]=u>>>16,this[f+2]=u>>>8,this[f+3]=u&255,f+4},c.prototype.writeBigInt64LE=Q(function(u,f=0){return I(this,u,f,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeBigInt64BE=Q(function(u,f=0){return W(this,u,f,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function $(p,u,f,g,C,D){if(f+g>p.length)throw new RangeError("Index out of range");if(f<0)throw new RangeError("Index out of range")}function q(p,u,f,g,C){return u=+u,f=f>>>0,C||$(p,u,f,4),n.write(p,u,f,g,23,4),f+4}c.prototype.writeFloatLE=function(u,f,g){return q(this,u,f,!0,g)},c.prototype.writeFloatBE=function(u,f,g){return q(this,u,f,!1,g)};function K(p,u,f,g,C){return u=+u,f=f>>>0,C||$(p,u,f,8),n.write(p,u,f,g,52,8),f+8}c.prototype.writeDoubleLE=function(u,f,g){return K(this,u,f,!0,g)},c.prototype.writeDoubleBE=function(u,f,g){return K(this,u,f,!1,g)},c.prototype.copy=function(u,f,g,C){if(!c.isBuffer(u))throw new TypeError("argument should be a Buffer");if(g||(g=0),!C&&C!==0&&(C=this.length),f>=u.length&&(f=u.length),f||(f=0),C>0&&C<g&&(C=g),C===g||u.length===0||this.length===0)return 0;if(f<0)throw new RangeError("targetStart out of bounds");if(g<0||g>=this.length)throw new RangeError("Index out of range");if(C<0)throw new RangeError("sourceEnd out of bounds");C>this.length&&(C=this.length),u.length-f<C-g&&(C=u.length-f+g);const D=C-g;return this===u&&typeof o.prototype.copyWithin=="function"?this.copyWithin(f,g,C):o.prototype.set.call(u,this.subarray(g,C),f),D},c.prototype.fill=function(u,f,g,C){if(typeof u=="string"){if(typeof f=="string"?(C=f,f=0,g=this.length):typeof g=="string"&&(C=g,g=this.length),C!==void 0&&typeof C!="string")throw new TypeError("encoding must be a string");if(typeof C=="string"&&!c.isEncoding(C))throw new TypeError("Unknown encoding: "+C);if(u.length===1){const V=u.charCodeAt(0);(C==="utf8"&&V<128||C==="latin1")&&(u=V)}}else typeof u=="number"?u=u&255:typeof u=="boolean"&&(u=Number(u));if(f<0||this.length<f||this.length<g)throw new RangeError("Out of range index");if(g<=f)return this;f=f>>>0,g=g===void 0?this.length:g>>>0,u||(u=0);let D;if(typeof u=="number")for(D=f;D<g;++D)this[D]=u;else{const V=c.isBuffer(u)?u:c.from(u,C),lt=V.length;if(lt===0)throw new TypeError('The value "'+u+'" is invalid for argument "value"');for(D=0;D<g-f;++D)this[D+f]=V[D%lt]}return this};const rt={};function ht(p,u,f){rt[p]=class extends f{constructor(){super(),Object.defineProperty(this,"message",{value:u.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${p}]`,this.stack,delete this.name}get code(){return p}set code(C){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:C,writable:!0})}toString(){return`${this.name} [${p}]: ${this.message}`}}}ht("ERR_BUFFER_OUT_OF_BOUNDS",function(p){return p?`${p} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),ht("ERR_INVALID_ARG_TYPE",function(p,u){return`The "${p}" argument must be of type number. Received type ${typeof u}`},TypeError),ht("ERR_OUT_OF_RANGE",function(p,u,f){let g=`The value of "${p}" is out of range.`,C=f;return Number.isInteger(f)&&Math.abs(f)>2**32?C=wt(String(f)):typeof f=="bigint"&&(C=String(f),(f>BigInt(2)**BigInt(32)||f<-(BigInt(2)**BigInt(32)))&&(C=wt(C)),C+="n"),g+=` It must be ${u}. Received ${C}`,g},RangeError);function wt(p){let u="",f=p.length;const g=p[0]==="-"?1:0;for(;f>=g+4;f-=3)u=`_${p.slice(f-3,f)}${u}`;return`${p.slice(0,f)}${u}`}function Tt(p,u,f){Yt(u,"offset"),(p[u]===void 0||p[u+f]===void 0)&&Jt(u,p.length-(f+1))}function $t(p,u,f,g,C,D){if(p>f||p<u){const V=typeof u=="bigint"?"n":"";let lt;throw u===0||u===BigInt(0)?lt=`>= 0${V} and < 2${V} ** ${(D+1)*8}${V}`:lt=`>= -(2${V} ** ${(D+1)*8-1}${V}) and < 2 ** ${(D+1)*8-1}${V}`,new rt.ERR_OUT_OF_RANGE("value",lt,p)}Tt(g,C,D)}function Yt(p,u){if(typeof p!="number")throw new rt.ERR_INVALID_ARG_TYPE(u,"number",p)}function Jt(p,u,f){throw Math.floor(p)!==p?(Yt(p,f),new rt.ERR_OUT_OF_RANGE("offset","an integer",p)):u<0?new rt.ERR_BUFFER_OUT_OF_BOUNDS:new rt.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${u}`,p)}const qt=/[^+/0-9A-Za-z-_]/g;function U(p){if(p=p.split("=")[0],p=p.trim().replace(qt,""),p.length<2)return"";for(;p.length%4!==0;)p=p+"=";return p}function me(p,u){u=u||1/0;let f;const g=p.length;let C=null;const D=[];for(let V=0;V<g;++V){if(f=p.charCodeAt(V),f>55295&&f<57344){if(!C){if(f>56319){(u-=3)>-1&&D.push(239,191,189);continue}else if(V+1===g){(u-=3)>-1&&D.push(239,191,189);continue}C=f;continue}if(f<56320){(u-=3)>-1&&D.push(239,191,189),C=f;continue}f=(C-55296<<10|f-56320)+65536}else C&&(u-=3)>-1&&D.push(239,191,189);if(C=null,f<128){if((u-=1)<0)break;D.push(f)}else if(f<2048){if((u-=2)<0)break;D.push(f>>6|192,f&63|128)}else if(f<65536){if((u-=3)<0)break;D.push(f>>12|224,f>>6&63|128,f&63|128)}else if(f<1114112){if((u-=4)<0)break;D.push(f>>18|240,f>>12&63|128,f>>6&63|128,f&63|128)}else throw new Error("Invalid code point")}return D}function J(p){const u=[];for(let f=0;f<p.length;++f)u.push(p.charCodeAt(f)&255);return u}function vt(p,u){let f,g,C;const D=[];for(let V=0;V<p.length&&!((u-=2)<0);++V)f=p.charCodeAt(V),g=f>>8,C=f%256,D.push(C),D.push(g);return D}function Et(p){return e.toByteArray(U(p))}function k(p,u,f,g){let C;for(C=0;C<g&&!(C+f>=u.length||C>=p.length);++C)u[C+f]=p[C];return C}function R(p,u){return p instanceof u||p!=null&&p.constructor!=null&&p.constructor.name!=null&&p.constructor.name===u.name}function X(p){return p!==p}const tt=function(){const p="0123456789abcdef",u=new Array(256);for(let f=0;f<16;++f){const g=f*16;for(let C=0;C<16;++C)u[g+C]=p[f]+p[C]}return u}();function Q(p){return typeof BigInt>"u"?ct:p}function ct(){throw new Error("BigInt not supported")}})(j_);const va=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,n)=>n(e,0),Oi=he.WebSocket||he.MozWebSocket,Jh=!0,K_="arraybuffer",Zh=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Y_ extends pa{constructor(e){super(e),this.supportsBinary=!e.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const e=this.uri(),n=this.opts.protocols,r=Zh?{}:Vh(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=Jh&&!Zh?n?new Oi(e,n):new Oi(e):new Oi(e,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let n=0;n<e.length;n++){const r=e[n],i=n===e.length-1;ua(r,this.supportsBinary,o=>{const s={};try{Jh&&this.ws.send(o)}catch{}i&&va(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=Hh()),this.supportsBinary||(n.b64=1),this.createUri(e,n)}check(){return!!Oi}}class X_ extends pa{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(e=>{const n=E_(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=e.readable.pipeThrough(n).getReader(),i=S_();i.readable.pipeTo(e.writable),this.writer=i.writable.getWriter();const o=()=>{r.read().then(({done:a,value:l})=>{a||(this.onPacket(l),o())}).catch(a=>{})};o();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this.writer.write(s).then(()=>this.onOpen())})}))}write(e){this.writable=!1;for(let n=0;n<e.length;n++){const r=e[n],i=n===e.length-1;this.writer.write(r).then(()=>{i&&va(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this.transport)===null||e===void 0||e.close()}}const J_={websocket:Y_,webtransport:X_,polling:F_},Z_=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Q_=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function wa(t){if(t.length>2e3)throw"URI too long";const e=t,n=t.indexOf("["),r=t.indexOf("]");n!=-1&&r!=-1&&(t=t.substring(0,n)+t.substring(n,r).replace(/:/g,";")+t.substring(r,t.length));let i=Z_.exec(t||""),o={},s=14;for(;s--;)o[Q_[s]]=i[s]||"";return n!=-1&&r!=-1&&(o.source=e,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=t2(o,o.path),o.queryKey=e2(o,o.query),o}function t2(t,e){const n=/\/{2,9}/g,r=e.replace(n,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&r.splice(0,1),e.slice(-1)=="/"&&r.splice(r.length-1,1),r}function e2(t,e){const n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}let Qh=class qn extends zt{constructor(e,n={}){super(),this.binaryType=K_,this.writeBuffer=[],e&&typeof e=="object"&&(n=e,e=null),e?(e=wa(e),n.hostname=e.host,n.secure=e.protocol==="https"||e.protocol==="wss",n.port=e.port,e.query&&(n.query=e.query)):n.host&&(n.hostname=wa(n.host).host),Ti(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=R_(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(e){const n=Object.assign({},this.opts.query);n.EIO=$h,n.transport=e,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new J_[e](r)}open(){let e;if(this.opts.rememberUpgrade&&qn.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)e="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else e=this.transports[0];this.readyState="opening";try{e=this.createTransport(e)}catch{this.transports.shift(),this.open();return}e.open(),this.setTransport(e)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(e){let n=this.createTransport(e),r=!1;qn.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",h=>{if(!r)if(h.type==="pong"&&h.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;qn.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(c(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,c(),n.close(),n=null)}const s=h=>{const m=new Error("probe error: "+h);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function a(){s("transport closed")}function l(){s("socket closed")}function d(h){n&&h.name!==n.name&&o()}const c=()=>{n.removeListener("open",i),n.removeListener("error",s),n.removeListener("close",a),this.off("close",l),this.off("upgrading",d)};n.once("open",i),n.once("error",s),n.once("close",a),this.once("close",l),this.once("upgrading",d),this.upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onOpen(){if(this.readyState="open",qn.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let e=0;const n=this.upgrades.length;for(;e<n;e++)this.probe(this.upgrades[e])}}onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),this.resetPingTimeout(),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const n=new Error("server error");n.code=e.data,this.onError(n);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this.getWritablePackets();this.transport.send(e),this.prevBufferLen=e.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=k_(i)),r>0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(e,n,r){return this.sendPacket("message",e,n,r),this}send(e,n,r){return this.sendPacket("message",e,n,r),this}sendPacket(e,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:e,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const e=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),e()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():e()}):this.upgrading?r():e()),this}onError(e){qn.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}onClose(e,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",e,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(e){const n=[];let r=0;const i=e.length;for(;r<i;r++)~this.transports.indexOf(e[r])&&n.push(e[r]);return n}};Qh.protocol=$h;function n2(t,e="",n){let r=t;n=n||typeof location<"u"&&location,t==null&&(t=n.protocol+"//"+n.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=n.protocol+t:t=n.host+t),/^(https?|wss?):\/\//.test(t)||(typeof n<"u"?t=n.protocol+"//"+t:t="https://"+t),r=wa(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const o=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port+e,r.href=r.protocol+"://"+o+(n&&n.port===r.port?"":":"+r.port),r}const r2=typeof ArrayBuffer=="function",i2=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,tp=Object.prototype.toString,o2=typeof Blob=="function"||typeof Blob<"u"&&tp.call(Blob)==="[object BlobConstructor]",s2=typeof File=="function"||typeof File<"u"&&tp.call(File)==="[object FileConstructor]";function ba(t){return r2&&(t instanceof ArrayBuffer||i2(t))||o2&&t instanceof Blob||s2&&t instanceof File}function Ii(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let n=0,r=t.length;n<r;n++)if(Ii(t[n]))return!0;return!1}if(ba(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return Ii(t.toJSON(),!0);for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&Ii(t[n]))return!0;return!1}function a2(t){const e=[],n=t.data,r=t;return r.data=_a(n,e),r.attachments=e.length,{packet:r,buffers:e}}function _a(t,e){if(!t)return t;if(ba(t)){const n={_placeholder:!0,num:e.length};return e.push(t),n}else if(Array.isArray(t)){const n=new Array(t.length);for(let r=0;r<t.length;r++)n[r]=_a(t[r],e);return n}else if(typeof t=="object"&&!(t instanceof Date)){const n={};for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=_a(t[r],e));return n}return t}function c2(t,e){return t.data=xa(t.data,e),delete t.attachments,t}function xa(t,e){if(!t)return t;if(t&&t._placeholder===!0){if(typeof t.num=="number"&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}else if(Array.isArray(t))for(let n=0;n<t.length;n++)t[n]=xa(t[n],e);else if(typeof t=="object")for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(t[n]=xa(t[n],e));return t}const l2=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],u2=5;var yt;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})(yt||(yt={}));class f2{constructor(e){this.replacer=e}encode(e){return(e.type===yt.EVENT||e.type===yt.ACK)&&Ii(e)?this.encodeAsBinary({type:e.type===yt.EVENT?yt.BINARY_EVENT:yt.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let n=""+e.type;return(e.type===yt.BINARY_EVENT||e.type===yt.BINARY_ACK)&&(n+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(n+=e.nsp+","),e.id!=null&&(n+=e.id),e.data!=null&&(n+=JSON.stringify(e.data,this.replacer)),n}encodeAsBinary(e){const n=a2(e),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function ep(t){return Object.prototype.toString.call(t)==="[object Object]"}class Sa extends zt{constructor(e){super(),this.reviver=e}add(e){let n;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(e);const r=n.type===yt.BINARY_EVENT;r||n.type===yt.BINARY_ACK?(n.type=r?yt.EVENT:yt.ACK,this.reconstructor=new d2(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(ba(e)||e.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(e),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let n=0;const r={type:Number(e.charAt(0))};if(yt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===yt.BINARY_EVENT||r.type===yt.BINARY_ACK){const o=n+1;for(;e.charAt(++n)!=="-"&&n!=e.length;);const s=e.substring(o,n);if(s!=Number(s)||e.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(s)}if(e.charAt(n+1)==="/"){const o=n+1;for(;++n&&!(e.charAt(n)===","||n===e.length););r.nsp=e.substring(o,n)}else r.nsp="/";const i=e.charAt(n+1);if(i!==""&&Number(i)==i){const o=n+1;for(;++n;){const s=e.charAt(n);if(s==null||Number(s)!=s){--n;break}if(n===e.length)break}r.id=Number(e.substring(o,n+1))}if(e.charAt(++n)){const o=this.tryParse(e.substr(n));if(Sa.isPayloadValid(r.type,o))r.data=o;else throw new Error("invalid payload")}return r}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,n){switch(e){case yt.CONNECT:return ep(n);case yt.DISCONNECT:return n===void 0;case yt.CONNECT_ERROR:return typeof n=="string"||ep(n);case yt.EVENT:case yt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&l2.indexOf(n[0])===-1);case yt.ACK:case yt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class d2{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const n=c2(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const h2=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Sa,Encoder:f2,get PacketType(){return yt},protocol:u2},Symbol.toStringTag,{value:"Module"}));function we(t,e,n){return t.on(e,n),function(){t.off(e,n)}}const p2=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class np extends zt{constructor(e,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[we(e,"open",this.onopen.bind(this)),we(e,"packet",this.onpacket.bind(this)),we(e,"error",this.onerror.bind(this)),we(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...n){if(p2.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(n.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const r={type:yt.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const s=this.ids++,a=n.pop();this._registerAckCallback(s,a),r.id=s}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(e,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[e]=n;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===e&&this.sendBuffer.splice(a,1);n.call(this,new Error("operation has timed out"))},i),s=(...a)=>{this.io.clearTimeoutFn(o),n.apply(this,a)};s.withError=!0,this.acks[e]=s}emitWithAck(e,...n){return new Promise((r,i)=>{const o=(s,a)=>s?i(s):r(a);o.withError=!0,n.push(o),this.emit(e,...n)})}_addToQueue(e){let n;typeof e[e.length-1]=="function"&&(n=e.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((i,...o)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...o)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!e||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:yt.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(r=>String(r.id)===e)){const r=this.acks[e];delete this.acks[e],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case yt.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case yt.EVENT:case yt.BINARY_EVENT:this.onevent(e);break;case yt.ACK:case yt.BINARY_ACK:this.onack(e);break;case yt.DISCONNECT:this.ondisconnect();break;case yt.CONNECT_ERROR:this.destroy();const r=new Error(e.data.message);r.data=e.data.data,this.emitReserved("connect_error",r);break}}onevent(e){const n=e.data||[];e.id!=null&&n.push(this.ack(e.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:yt.ACK,id:e,data:i}))}}onack(e){const n=this.acks[e.id];typeof n=="function"&&(delete this.acks[e.id],n.withError&&e.data.unshift(null),n.apply(this,e.data))}onconnect(e,n){this.id=e,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:yt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(e===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(e===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,e.data)}}}function Ln(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}Ln.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=Math.floor(e*10)&1?t+n:t-n}return Math.min(t,this.max)|0},Ln.prototype.reset=function(){this.attempts=0},Ln.prototype.setMin=function(t){this.ms=t},Ln.prototype.setMax=function(t){this.max=t},Ln.prototype.setJitter=function(t){this.jitter=t};class Ea extends zt{constructor(e,n){var r;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(n=e,e=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Ti(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Ln({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=e;const i=n.parser||h2;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var n;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(n=this.backoff)===null||n===void 0||n.setMin(e),this)}randomizationFactor(e){var n;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(n=this.backoff)===null||n===void 0||n.setJitter(e),this)}reconnectionDelayMax(e){var n;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(n=this.backoff)===null||n===void 0||n.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new Qh(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=we(n,"open",function(){r.onopen(),e&&e()}),o=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},s=we(n,"error",o);if(this._timeout!==!1){const a=this._timeout,l=this.setTimeoutFn(()=>{i(),o(new Error("timeout")),n.close()},a);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(i),this.subs.push(s),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(we(e,"ping",this.onping.bind(this)),we(e,"data",this.ondata.bind(this)),we(e,"error",this.onerror.bind(this)),we(e,"close",this.onclose.bind(this)),we(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(n){this.onclose("parse error",n)}}ondecoded(e){va(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,n){let r=this.nsps[e];return r?this._autoConnect&&!r.active&&r.connect():(r=new np(this,e,n),this.nsps[e]=r),r}_destroy(e){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(e){const n=this.encoder.encode(e);for(let r=0;r<n.length;r++)this.engine.write(n[r],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(e,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(i=>{i?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",i)):e.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const kr={};function Ri(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const n=n2(t,e.path||"/socket.io"),r=n.source,i=n.id,o=n.path,s=kr[i]&&o in kr[i].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||s;let l;return a?l=new Ea(r,e):(kr[i]||(kr[i]=new Ea(r,e)),l=kr[i]),n.query&&!e.query&&(e.query=n.queryKey),l.socket(n.path,e)}Object.assign(Ri,{Manager:Ea,Socket:np,io:Ri,connect:Ri});function m2(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var rp={exports:{}},jt=rp.exports={},Te,Pe;function Aa(){throw new Error("setTimeout has not been defined")}function Ca(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Te=setTimeout:Te=Aa}catch{Te=Aa}try{typeof clearTimeout=="function"?Pe=clearTimeout:Pe=Ca}catch{Pe=Ca}})();function ip(t){if(Te===setTimeout)return setTimeout(t,0);if((Te===Aa||!Te)&&setTimeout)return Te=setTimeout,setTimeout(t,0);try{return Te(t,0)}catch{try{return Te.call(null,t,0)}catch{return Te.call(this,t,0)}}}function y2(t){if(Pe===clearTimeout)return clearTimeout(t);if((Pe===Ca||!Pe)&&clearTimeout)return Pe=clearTimeout,clearTimeout(t);try{return Pe(t)}catch{try{return Pe.call(null,t)}catch{return Pe.call(this,t)}}}var Le=[],Fn=!1,ln,Mi=-1;function g2(){!Fn||!ln||(Fn=!1,ln.length?Le=ln.concat(Le):Mi=-1,Le.length&&op())}function op(){if(!Fn){var t=ip(g2);Fn=!0;for(var e=Le.length;e;){for(ln=Le,Le=[];++Mi<e;)ln&&ln[Mi].run();Mi=-1,e=Le.length}ln=null,Fn=!1,y2(t)}}jt.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];Le.push(new sp(t,e)),Le.length===1&&!Fn&&ip(op)};function sp(t,e){this.fun=t,this.array=e}sp.prototype.run=function(){this.fun.apply(null,this.array)},jt.title="browser",jt.browser=!0,jt.env={},jt.argv=[],jt.version="",jt.versions={};function Fe(){}jt.on=Fe,jt.addListener=Fe,jt.once=Fe,jt.off=Fe,jt.removeListener=Fe,jt.removeAllListeners=Fe,jt.emit=Fe,jt.prependListener=Fe,jt.prependOnceListener=Fe,jt.listeners=function(t){return[]},jt.binding=function(t){throw new Error("process.binding is not supported")},jt.cwd=function(){return"/"},jt.chdir=function(t){throw new Error("process.chdir is not supported")},jt.umask=function(){return 0};var v2=rp.exports;const Wt=m2(v2);var un={},ap={},Ta=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;e[n]=i;for(var o in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var s=Object.getOwnPropertySymbols(e);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(e,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(e,n);if(a.value!==i||a.enumerable!==!0)return!1}return!0},w2=Ta,Pa=function(){return w2()&&!!Symbol.toStringTag},cp=Object,b2=Error,_2=EvalError,x2=RangeError,S2=ReferenceError,lp=SyntaxError,Ni=TypeError,E2=URIError,A2=Math.abs,C2=Math.floor,T2=Math.max,P2=Math.min,k2=Math.pow,O2=Object.getOwnPropertyDescriptor,Di=O2;if(Di)try{Di([],"length")}catch{Di=null}var Or=Di,Bi=Object.defineProperty||!1;if(Bi)try{Bi({},"a",{value:1})}catch{Bi=!1}var Li=Bi,ka,up;function I2(){if(up)return ka;up=1;var t=typeof Symbol<"u"&&Symbol,e=Ta;return ka=function(){return typeof t!="function"||typeof Symbol!="function"||typeof t("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},ka}var R2="Function.prototype.bind called on incompatible ",M2=Object.prototype.toString,N2=Math.max,D2="[object Function]",fp=function(e,n){for(var r=[],i=0;i<e.length;i+=1)r[i]=e[i];for(var o=0;o<n.length;o+=1)r[o+e.length]=n[o];return r},B2=function(e,n){for(var r=[],i=n,o=0;i<e.length;i+=1,o+=1)r[o]=e[i];return r},L2=function(t,e){for(var n="",r=0;r<t.length;r+=1)n+=t[r],r+1<t.length&&(n+=e);return n},F2=function(e){var n=this;if(typeof n!="function"||M2.apply(n)!==D2)throw new TypeError(R2+n);for(var r=B2(arguments,1),i,o=function(){if(this instanceof i){var c=n.apply(this,fp(r,arguments));return Object(c)===c?c:this}return n.apply(e,fp(r,arguments))},s=N2(0,n.length-r.length),a=[],l=0;l<s;l++)a[l]="$"+l;if(i=Function("binder","return function ("+L2(a,",")+"){ return binder.apply(this,arguments); }")(o),n.prototype){var d=function(){};d.prototype=n.prototype,i.prototype=new d,d.prototype=null}return i},j2=F2,Ir=Function.prototype.bind||j2,Oa=Function.prototype.call,Ia=Function.prototype.apply,$2=typeof Reflect<"u"&&Reflect&&Reflect.apply,V2=Ir,U2=Ia,z2=Oa,W2=$2,dp=W2||V2.call(z2,U2),q2=Ir,H2=Ni,G2=Oa,K2=dp,Ra=function(e){if(e.length<1||typeof e[0]!="function")throw new H2("a function is required");return K2(q2,G2,e)},Ma,hp;function Y2(){if(hp)return Ma;hp=1;var t=Ra,e=Or,n;try{n=[].__proto__===Array.prototype}catch(s){if(!s||typeof s!="object"||!("code"in s)||s.code!=="ERR_PROTO_ACCESS")throw s}var r=!!n&&e&&e(Object.prototype,"__proto__"),i=Object,o=i.getPrototypeOf;return Ma=r&&typeof r.get=="function"?t([r.get]):typeof o=="function"?function(a){return o(a==null?a:i(a))}:!1,Ma}var Na,pp;function X2(){if(pp)return Na;pp=1;var t=Function.prototype.call,e=Object.prototype.hasOwnProperty,n=Ir;return Na=n.call(t,e),Na}var mt,mp=cp,J2=b2,Z2=_2,Q2=x2,tx=S2,jn=lp,$n=Ni,ex=E2,nx=A2,rx=C2,ix=T2,ox=P2,sx=k2,yp=Function,Da=function(t){try{return yp('"use strict"; return ('+t+").constructor;")()}catch{}},Rr=Or,ax=Li,Ba=function(){throw new $n},cx=Rr?function(){try{return arguments.callee,Ba}catch{try{return Rr(arguments,"callee").get}catch{return Ba}}}():Ba,Vn=I2()(),lx=Y2(),Kt=typeof Reflect=="function"&&Reflect.getPrototypeOf||mp.getPrototypeOf||lx,gp=Ia,Mr=Oa,Un={},ux=typeof Uint8Array>"u"||!Kt?mt:Kt(Uint8Array),fn={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?mt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?mt:ArrayBuffer,"%ArrayIteratorPrototype%":Vn&&Kt?Kt([][Symbol.iterator]()):mt,"%AsyncFromSyncIteratorPrototype%":mt,"%AsyncFunction%":Un,"%AsyncGenerator%":Un,"%AsyncGeneratorFunction%":Un,"%AsyncIteratorPrototype%":Un,"%Atomics%":typeof Atomics>"u"?mt:Atomics,"%BigInt%":typeof BigInt>"u"?mt:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?mt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?mt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?mt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":J2,"%eval%":eval,"%EvalError%":Z2,"%Float32Array%":typeof Float32Array>"u"?mt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?mt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?mt:FinalizationRegistry,"%Function%":yp,"%GeneratorFunction%":Un,"%Int8Array%":typeof Int8Array>"u"?mt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?mt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?mt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Vn&&Kt?Kt(Kt([][Symbol.iterator]())):mt,"%JSON%":typeof JSON=="object"?JSON:mt,"%Map%":typeof Map>"u"?mt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Vn||!Kt?mt:Kt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":mp,"%Object.getOwnPropertyDescriptor%":Rr,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?mt:Promise,"%Proxy%":typeof Proxy>"u"?mt:Proxy,"%RangeError%":Q2,"%ReferenceError%":tx,"%Reflect%":typeof Reflect>"u"?mt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?mt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Vn||!Kt?mt:Kt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?mt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Vn&&Kt?Kt(""[Symbol.iterator]()):mt,"%Symbol%":Vn?Symbol:mt,"%SyntaxError%":jn,"%ThrowTypeError%":cx,"%TypedArray%":ux,"%TypeError%":$n,"%Uint8Array%":typeof Uint8Array>"u"?mt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?mt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?mt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?mt:Uint32Array,"%URIError%":ex,"%WeakMap%":typeof WeakMap>"u"?mt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?mt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?mt:WeakSet,"%Function.prototype.call%":Mr,"%Function.prototype.apply%":gp,"%Object.defineProperty%":ax,"%Math.abs%":nx,"%Math.floor%":rx,"%Math.max%":ix,"%Math.min%":ox,"%Math.pow%":sx};if(Kt)try{null.error}catch(t){var fx=Kt(Kt(t));fn["%Error.prototype%"]=fx}var dx=function t(e){var n;if(e==="%AsyncFunction%")n=Da("async function () {}");else if(e==="%GeneratorFunction%")n=Da("function* () {}");else if(e==="%AsyncGeneratorFunction%")n=Da("async function* () {}");else if(e==="%AsyncGenerator%"){var r=t("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=t("%AsyncGenerator%");i&&Kt&&(n=Kt(i.prototype))}return fn[e]=n,n},vp={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Nr=Ir,Fi=X2(),hx=Nr.call(Mr,Array.prototype.concat),px=Nr.call(gp,Array.prototype.splice),wp=Nr.call(Mr,String.prototype.replace),ji=Nr.call(Mr,String.prototype.slice),mx=Nr.call(Mr,RegExp.prototype.exec),yx=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,gx=/\\(\\)?/g,vx=function(e){var n=ji(e,0,1),r=ji(e,-1);if(n==="%"&&r!=="%")throw new jn("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new jn("invalid intrinsic syntax, expected opening `%`");var i=[];return wp(e,yx,function(o,s,a,l){i[i.length]=a?wp(l,gx,"$1"):s||o}),i},wx=function(e,n){var r=e,i;if(Fi(vp,r)&&(i=vp[r],r="%"+i[0]+"%"),Fi(fn,r)){var o=fn[r];if(o===Un&&(o=dx(r)),typeof o>"u"&&!n)throw new $n("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:o}}throw new jn("intrinsic "+e+" does not exist!")},La=function(e,n){if(typeof e!="string"||e.length===0)throw new $n("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new $n('"allowMissing" argument must be a boolean');if(mx(/^%?[^%]*%?$/,e)===null)throw new jn("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=vx(e),i=r.length>0?r[0]:"",o=wx("%"+i+"%",n),s=o.name,a=o.value,l=!1,d=o.alias;d&&(i=d[0],px(r,hx([0,1],d)));for(var c=1,h=!0;c<r.length;c+=1){var m=r[c],y=ji(m,0,1),w=ji(m,-1);if((y==='"'||y==="'"||y==="`"||w==='"'||w==="'"||w==="`")&&y!==w)throw new jn("property names with quotes must have matching quotes");if((m==="constructor"||!h)&&(l=!0),i+="."+m,s="%"+i+"%",Fi(fn,s))a=fn[s];else if(a!=null){if(!(m in a)){if(!n)throw new $n("base intrinsic for "+e+" exists, but the property is not available.");return}if(Rr&&c+1>=r.length){var _=Rr(a,m);h=!!_,h&&"get"in _&&!("originalValue"in _.get)?a=_.get:a=a[m]}else h=Fi(a,m),a=a[m];h&&!l&&(fn[s]=a)}}return a},bp=La,_p=Ra,bx=_p([bp("%String.prototype.indexOf%")]),Fa=function(e,n){var r=bp(e,!!n);return typeof r=="function"&&bx(e,".prototype.")>-1?_p([r]):r},_x=Pa(),xx=Fa,ja=xx("Object.prototype.toString"),$i=function(e){return _x&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:ja(e)==="[object Arguments]"},xp=function(e){return $i(e)?!0:e!==null&&typeof e=="object"&&"length"in e&&typeof e.length=="number"&&e.length>=0&&ja(e)!=="[object Array]"&&"callee"in e&&ja(e.callee)==="[object Function]"},Sx=function(){return $i(arguments)}();$i.isLegacyArguments=xp;var Ex=Sx?$i:xp,Ax=Object.prototype.toString,Cx=Function.prototype.toString,Tx=/^\s*(?:function)?\*/,Sp=Pa(),$a=Object.getPrototypeOf,Px=function(){if(!Sp)return!1;try{return Function("return function*() {}")()}catch{}},Va,kx=function(e){if(typeof e!="function")return!1;if(Tx.test(Cx.call(e)))return!0;if(!Sp){var n=Ax.call(e);return n==="[object GeneratorFunction]"}if(!$a)return!1;if(typeof Va>"u"){var r=Px();Va=r?$a(r):!1}return $a(e)===Va},Ep=Function.prototype.toString,zn=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,Ua,Vi;if(typeof zn=="function"&&typeof Object.defineProperty=="function")try{Ua=Object.defineProperty({},"length",{get:function(){throw Vi}}),Vi={},zn(function(){throw 42},null,Ua)}catch(t){t!==Vi&&(zn=null)}else zn=null;var Ox=/^\s*class\b/,za=function(e){try{var n=Ep.call(e);return Ox.test(n)}catch{return!1}},Wa=function(e){try{return za(e)?!1:(Ep.call(e),!0)}catch{return!1}},Ui=Object.prototype.toString,Ix="[object Object]",Rx="[object Function]",Mx="[object GeneratorFunction]",Nx="[object HTMLAllCollection]",Dx="[object HTML document.all class]",Bx="[object HTMLCollection]",Lx=typeof Symbol=="function"&&!!Symbol.toStringTag,Fx=!(0 in[,]),qa=function(){return!1};if(typeof document=="object"){var jx=document.all;Ui.call(jx)===Ui.call(document.all)&&(qa=function(e){if((Fx||!e)&&(typeof e>"u"||typeof e=="object"))try{var n=Ui.call(e);return(n===Nx||n===Dx||n===Bx||n===Ix)&&e("")==null}catch{}return!1})}var $x=zn?function(e){if(qa(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{zn(e,null,Ua)}catch(n){if(n!==Vi)return!1}return!za(e)&&Wa(e)}:function(e){if(qa(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(Lx)return Wa(e);if(za(e))return!1;var n=Ui.call(e);return n!==Rx&&n!==Mx&&!/^\[object HTML/.test(n)?!1:Wa(e)},Vx=$x,Ux=Object.prototype.toString,Ap=Object.prototype.hasOwnProperty,zx=function(e,n,r){for(var i=0,o=e.length;i<o;i++)Ap.call(e,i)&&(r==null?n(e[i],i,e):n.call(r,e[i],i,e))},Wx=function(e,n,r){for(var i=0,o=e.length;i<o;i++)r==null?n(e.charAt(i),i,e):n.call(r,e.charAt(i),i,e)},qx=function(e,n,r){for(var i in e)Ap.call(e,i)&&(r==null?n(e[i],i,e):n.call(r,e[i],i,e))},Hx=function(e,n,r){if(!Vx(n))throw new TypeError("iterator must be a function");var i;arguments.length>=3&&(i=r),Ux.call(e)==="[object Array]"?zx(e,n,i):typeof e=="string"?Wx(e,n,i):qx(e,n,i)},Gx=Hx,Kx=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"],Ha=Kx,Yx=typeof globalThis>"u"?gr:globalThis,Xx=function(){for(var e=[],n=0;n<Ha.length;n++)typeof Yx[Ha[n]]=="function"&&(e[e.length]=Ha[n]);return e},Cp={exports:{}},Tp=Li,Jx=lp,Wn=Ni,Pp=Or,kp=function(e,n,r){if(!e||typeof e!="object"&&typeof e!="function")throw new Wn("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new Wn("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Wn("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Wn("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Wn("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Wn("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,l=!!Pp&&Pp(e,n);if(Tp)Tp(e,n,{configurable:s===null&&l?l.configurable:!s,enumerable:i===null&&l?l.enumerable:!i,value:r,writable:o===null&&l?l.writable:!o});else if(a||!i&&!o&&!s)e[n]=r;else throw new Jx("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Ga=Li,Op=function(){return!!Ga};Op.hasArrayLengthDefineBug=function(){if(!Ga)return null;try{return Ga([],"length",{value:1}).length!==1}catch{return!0}};var Ip=Op,Zx=La,Rp=kp,Qx=Ip(),Mp=Or,Np=Ni,t3=Zx("%Math.floor%"),e3=function(e,n){if(typeof e!="function")throw new Np("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||t3(n)!==n)throw new Np("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],i=!0,o=!0;if("length"in e&&Mp){var s=Mp(e,"length");s&&!s.configurable&&(i=!1),s&&!s.writable&&(o=!1)}return(i||o||!r)&&(Qx?Rp(e,"length",n,!0,!0):Rp(e,"length",n)),e},n3=Ir,r3=Ia,i3=dp,o3=function(){return i3(n3,r3,arguments)};(function(t){var e=e3,n=Li,r=Ra,i=o3;t.exports=function(s){var a=r(arguments),l=s.length-(arguments.length-1);return e(a,1+(l>0?l:0),!0)},n?n(t.exports,"apply",{value:i}):t.exports.apply=i})(Cp);var zi=Cp.exports,Wi=Gx,s3=Xx,Dp=zi,Ka=Fa,qi=Or,a3=Ka("Object.prototype.toString"),Bp=Pa(),Lp=typeof globalThis>"u"?gr:globalThis,Ya=s3(),Xa=Ka("String.prototype.slice"),Ja=Object.getPrototypeOf,c3=Ka("Array.prototype.indexOf",!0)||function(e,n){for(var r=0;r<e.length;r+=1)if(e[r]===n)return r;return-1},Hi={__proto__:null};Bp&&qi&&Ja?Wi(Ya,function(t){var e=new Lp[t];if(Symbol.toStringTag in e){var n=Ja(e),r=qi(n,Symbol.toStringTag);if(!r){var i=Ja(n);r=qi(i,Symbol.toStringTag)}Hi["$"+t]=Dp(r.get)}}):Wi(Ya,function(t){var e=new Lp[t],n=e.slice||e.set;n&&(Hi["$"+t]=Dp(n))});var l3=function(e){var n=!1;return Wi(Hi,function(r,i){if(!n)try{"$"+r(e)===i&&(n=Xa(i,1))}catch{}}),n},u3=function(e){var n=!1;return Wi(Hi,function(r,i){if(!n)try{r(e),n=Xa(i,1)}catch{}}),n},Fp=function(e){if(!e||typeof e!="object")return!1;if(!Bp){var n=Xa(a3(e),8,-1);return c3(Ya,n)>-1?n:n!=="Object"?!1:u3(e)}return qi?l3(e):null},f3=Fp,d3=function(e){return!!f3(e)};(function(t){var e=Ex,n=kx,r=Fp,i=d3;function o(U){return U.call.bind(U)}var s=typeof BigInt<"u",a=typeof Symbol<"u",l=o(Object.prototype.toString),d=o(Number.prototype.valueOf),c=o(String.prototype.valueOf),h=o(Boolean.prototype.valueOf);if(s)var m=o(BigInt.prototype.valueOf);if(a)var y=o(Symbol.prototype.valueOf);function w(U,me){if(typeof U!="object")return!1;try{return me(U),!0}catch{return!1}}t.isArgumentsObject=e,t.isGeneratorFunction=n,t.isTypedArray=i;function _(U){return typeof Promise<"u"&&U instanceof Promise||U!==null&&typeof U=="object"&&typeof U.then=="function"&&typeof U.catch=="function"}t.isPromise=_;function P(U){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(U):i(U)||N(U)}t.isArrayBufferView=P;function x(U){return r(U)==="Uint8Array"}t.isUint8Array=x;function v(U){return r(U)==="Uint8ClampedArray"}t.isUint8ClampedArray=v;function E(U){return r(U)==="Uint16Array"}t.isUint16Array=E;function M(U){return r(U)==="Uint32Array"}t.isUint32Array=M;function O(U){return r(U)==="Int8Array"}t.isInt8Array=O;function j(U){return r(U)==="Int16Array"}t.isInt16Array=j;function B(U){return r(U)==="Int32Array"}t.isInt32Array=B;function L(U){return r(U)==="Float32Array"}t.isFloat32Array=L;function F(U){return r(U)==="Float64Array"}t.isFloat64Array=F;function Y(U){return r(U)==="BigInt64Array"}t.isBigInt64Array=Y;function Z(U){return r(U)==="BigUint64Array"}t.isBigUint64Array=Z;function nt(U){return l(U)==="[object Map]"}nt.working=typeof Map<"u"&&nt(new Map);function st(U){return typeof Map>"u"?!1:nt.working?nt(U):U instanceof Map}t.isMap=st;function _t(U){return l(U)==="[object Set]"}_t.working=typeof Set<"u"&&_t(new Set);function dt(U){return typeof Set>"u"?!1:_t.working?_t(U):U instanceof Set}t.isSet=dt;function It(U){return l(U)==="[object WeakMap]"}It.working=typeof WeakMap<"u"&&It(new WeakMap);function at(U){return typeof WeakMap>"u"?!1:It.working?It(U):U instanceof WeakMap}t.isWeakMap=at;function pt(U){return l(U)==="[object WeakSet]"}pt.working=typeof WeakSet<"u"&&pt(new WeakSet);function z(U){return pt(U)}t.isWeakSet=z;function H(U){return l(U)==="[object ArrayBuffer]"}H.working=typeof ArrayBuffer<"u"&&H(new ArrayBuffer);function G(U){return typeof ArrayBuffer>"u"?!1:H.working?H(U):U instanceof ArrayBuffer}t.isArrayBuffer=G;function S(U){return l(U)==="[object DataView]"}S.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&S(new DataView(new ArrayBuffer(1),0,1));function N(U){return typeof DataView>"u"?!1:S.working?S(U):U instanceof DataView}t.isDataView=N;var b=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function A(U){return l(U)==="[object SharedArrayBuffer]"}function I(U){return typeof b>"u"?!1:(typeof A.working>"u"&&(A.working=A(new b)),A.working?A(U):U instanceof b)}t.isSharedArrayBuffer=I;function W(U){return l(U)==="[object AsyncFunction]"}t.isAsyncFunction=W;function $(U){return l(U)==="[object Map Iterator]"}t.isMapIterator=$;function q(U){return l(U)==="[object Set Iterator]"}t.isSetIterator=q;function K(U){return l(U)==="[object Generator]"}t.isGeneratorObject=K;function rt(U){return l(U)==="[object WebAssembly.Module]"}t.isWebAssemblyCompiledModule=rt;function ht(U){return w(U,d)}t.isNumberObject=ht;function wt(U){return w(U,c)}t.isStringObject=wt;function Tt(U){return w(U,h)}t.isBooleanObject=Tt;function $t(U){return s&&w(U,m)}t.isBigIntObject=$t;function Yt(U){return a&&w(U,y)}t.isSymbolObject=Yt;function Jt(U){return ht(U)||wt(U)||Tt(U)||$t(U)||Yt(U)}t.isBoxedPrimitive=Jt;function qt(U){return typeof Uint8Array<"u"&&(G(U)||I(U))}t.isAnyArrayBuffer=qt,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(U){Object.defineProperty(t,U,{enumerable:!1,value:function(){throw new Error(U+" is not supported in userland")}})})})(ap);var h3=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"},Za={exports:{}};typeof Object.create=="function"?Za.exports=function(e,n){n&&(e.super_=n,e.prototype=Object.create(n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Za.exports=function(e,n){if(n){e.super_=n;var r=function(){};r.prototype=n.prototype,e.prototype=new r,e.prototype.constructor=e}};var p3=Za.exports;(function(t){var e=Object.getOwnPropertyDescriptors||function(N){for(var b=Object.keys(N),A={},I=0;I<b.length;I++)A[b[I]]=Object.getOwnPropertyDescriptor(N,b[I]);return A},n=/%[sdj%]/g;t.format=function(S){if(!O(S)){for(var N=[],b=0;b<arguments.length;b++)N.push(s(arguments[b]));return N.join(" ")}for(var b=1,A=arguments,I=A.length,W=String(S).replace(n,function(q){if(q==="%%")return"%";if(b>=I)return q;switch(q){case"%s":return String(A[b++]);case"%d":return Number(A[b++]);case"%j":try{return JSON.stringify(A[b++])}catch{return"[Circular]"}default:return q}}),$=A[b];b<I;$=A[++b])v($)||!F($)?W+=" "+$:W+=" "+s($);return W},t.deprecate=function(S,N){if(typeof Wt<"u"&&Wt.noDeprecation===!0)return S;if(typeof Wt>"u")return function(){return t.deprecate(S,N).apply(this,arguments)};var b=!1;function A(){if(!b){if(Wt.throwDeprecation)throw new Error(N);Wt.traceDeprecation?console.trace(N):console.error(N),b=!0}return S.apply(this,arguments)}return A};var r={},i=/^$/;if(Wt.env.NODE_DEBUG){var o=Wt.env.NODE_DEBUG;o=o.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),i=new RegExp("^"+o+"$","i")}t.debuglog=function(S){if(S=S.toUpperCase(),!r[S])if(i.test(S)){var N=Wt.pid;r[S]=function(){var b=t.format.apply(t,arguments);console.error("%s %d: %s",S,N,b)}}else r[S]=function(){};return r[S]};function s(S,N){var b={seen:[],stylize:l};return arguments.length>=3&&(b.depth=arguments[2]),arguments.length>=4&&(b.colors=arguments[3]),x(N)?b.showHidden=N:N&&t._extend(b,N),B(b.showHidden)&&(b.showHidden=!1),B(b.depth)&&(b.depth=2),B(b.colors)&&(b.colors=!1),B(b.customInspect)&&(b.customInspect=!0),b.colors&&(b.stylize=a),c(b,S,b.depth)}t.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function a(S,N){var b=s.styles[N];return b?"\x1B["+s.colors[b][0]+"m"+S+"\x1B["+s.colors[b][1]+"m":S}function l(S,N){return S}function d(S){var N={};return S.forEach(function(b,A){N[b]=!0}),N}function c(S,N,b){if(S.customInspect&&N&&nt(N.inspect)&&N.inspect!==t.inspect&&!(N.constructor&&N.constructor.prototype===N)){var A=N.inspect(b,S);return O(A)||(A=c(S,A,b)),A}var I=h(S,N);if(I)return I;var W=Object.keys(N),$=d(W);if(S.showHidden&&(W=Object.getOwnPropertyNames(N)),Z(N)&&(W.indexOf("message")>=0||W.indexOf("description")>=0))return m(N);if(W.length===0){if(nt(N)){var q=N.name?": "+N.name:"";return S.stylize("[Function"+q+"]","special")}if(L(N))return S.stylize(RegExp.prototype.toString.call(N),"regexp");if(Y(N))return S.stylize(Date.prototype.toString.call(N),"date");if(Z(N))return m(N)}var K="",rt=!1,ht=["{","}"];if(P(N)&&(rt=!0,ht=["[","]"]),nt(N)){var wt=N.name?": "+N.name:"";K=" [Function"+wt+"]"}if(L(N)&&(K=" "+RegExp.prototype.toString.call(N)),Y(N)&&(K=" "+Date.prototype.toUTCString.call(N)),Z(N)&&(K=" "+m(N)),W.length===0&&(!rt||N.length==0))return ht[0]+K+ht[1];if(b<0)return L(N)?S.stylize(RegExp.prototype.toString.call(N),"regexp"):S.stylize("[Object]","special");S.seen.push(N);var Tt;return rt?Tt=y(S,N,b,$,W):Tt=W.map(function($t){return w(S,N,b,$,$t,rt)}),S.seen.pop(),_(Tt,K,ht)}function h(S,N){if(B(N))return S.stylize("undefined","undefined");if(O(N)){var b="'"+JSON.stringify(N).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return S.stylize(b,"string")}if(M(N))return S.stylize(""+N,"number");if(x(N))return S.stylize(""+N,"boolean");if(v(N))return S.stylize("null","null")}function m(S){return"["+Error.prototype.toString.call(S)+"]"}function y(S,N,b,A,I){for(var W=[],$=0,q=N.length;$<q;++$)pt(N,String($))?W.push(w(S,N,b,A,String($),!0)):W.push("");return I.forEach(function(K){K.match(/^\d+$/)||W.push(w(S,N,b,A,K,!0))}),W}function w(S,N,b,A,I,W){var $,q,K;if(K=Object.getOwnPropertyDescriptor(N,I)||{value:N[I]},K.get?K.set?q=S.stylize("[Getter/Setter]","special"):q=S.stylize("[Getter]","special"):K.set&&(q=S.stylize("[Setter]","special")),pt(A,I)||($="["+I+"]"),q||(S.seen.indexOf(K.value)<0?(v(b)?q=c(S,K.value,null):q=c(S,K.value,b-1),q.indexOf(`
106
- `)>-1&&(W?q=q.split(`
107
- `).map(function(rt){return" "+rt}).join(`
108
- `).slice(2):q=`
109
- `+q.split(`
110
- `).map(function(rt){return" "+rt}).join(`
111
- `))):q=S.stylize("[Circular]","special")),B($)){if(W&&I.match(/^\d+$/))return q;$=JSON.stringify(""+I),$.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?($=$.slice(1,-1),$=S.stylize($,"name")):($=$.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),$=S.stylize($,"string"))}return $+": "+q}function _(S,N,b){var A=S.reduce(function(I,W){return W.indexOf(`
112
- `)>=0,I+W.replace(/\u001b\[\d\d?m/g,"").length+1},0);return A>60?b[0]+(N===""?"":N+`
113
- `)+" "+S.join(`,
114
- `)+" "+b[1]:b[0]+N+" "+S.join(", ")+" "+b[1]}t.types=ap;function P(S){return Array.isArray(S)}t.isArray=P;function x(S){return typeof S=="boolean"}t.isBoolean=x;function v(S){return S===null}t.isNull=v;function E(S){return S==null}t.isNullOrUndefined=E;function M(S){return typeof S=="number"}t.isNumber=M;function O(S){return typeof S=="string"}t.isString=O;function j(S){return typeof S=="symbol"}t.isSymbol=j;function B(S){return S===void 0}t.isUndefined=B;function L(S){return F(S)&&_t(S)==="[object RegExp]"}t.isRegExp=L,t.types.isRegExp=L;function F(S){return typeof S=="object"&&S!==null}t.isObject=F;function Y(S){return F(S)&&_t(S)==="[object Date]"}t.isDate=Y,t.types.isDate=Y;function Z(S){return F(S)&&(_t(S)==="[object Error]"||S instanceof Error)}t.isError=Z,t.types.isNativeError=Z;function nt(S){return typeof S=="function"}t.isFunction=nt;function st(S){return S===null||typeof S=="boolean"||typeof S=="number"||typeof S=="string"||typeof S=="symbol"||typeof S>"u"}t.isPrimitive=st,t.isBuffer=h3;function _t(S){return Object.prototype.toString.call(S)}function dt(S){return S<10?"0"+S.toString(10):S.toString(10)}var It=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function at(){var S=new Date,N=[dt(S.getHours()),dt(S.getMinutes()),dt(S.getSeconds())].join(":");return[S.getDate(),It[S.getMonth()],N].join(" ")}t.log=function(){console.log("%s - %s",at(),t.format.apply(t,arguments))},t.inherits=p3,t._extend=function(S,N){if(!N||!F(N))return S;for(var b=Object.keys(N),A=b.length;A--;)S[b[A]]=N[b[A]];return S};function pt(S,N){return Object.prototype.hasOwnProperty.call(S,N)}var z=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;t.promisify=function(N){if(typeof N!="function")throw new TypeError('The "original" argument must be of type Function');if(z&&N[z]){var b=N[z];if(typeof b!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(b,z,{value:b,enumerable:!1,writable:!1,configurable:!0}),b}function b(){for(var A,I,W=new Promise(function(K,rt){A=K,I=rt}),$=[],q=0;q<arguments.length;q++)$.push(arguments[q]);$.push(function(K,rt){K?I(K):A(rt)});try{N.apply(this,$)}catch(K){I(K)}return W}return Object.setPrototypeOf(b,Object.getPrototypeOf(N)),z&&Object.defineProperty(b,z,{value:b,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(b,e(N))},t.promisify.custom=z;function H(S,N){if(!S){var b=new Error("Promise was rejected with a falsy value");b.reason=S,S=b}return N(S)}function G(S){if(typeof S!="function")throw new TypeError('The "original" argument must be of type Function');function N(){for(var b=[],A=0;A<arguments.length;A++)b.push(arguments[A]);var I=b.pop();if(typeof I!="function")throw new TypeError("The last argument must be of type Function");var W=this,$=function(){return I.apply(W,arguments)};S.apply(this,b).then(function(q){Wt.nextTick($.bind(null,null,q))},function(q){Wt.nextTick(H.bind(null,q,$))})}return Object.setPrototypeOf(N,Object.getPrototypeOf(S)),Object.defineProperties(N,e(S)),N}t.callbackify=G})(un);var Qa={exports:{}},tc={},jp;function $p(){if(jp)return tc;jp=1;function t(v){"@babel/helpers - typeof";return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},t(v)}function e(v,E,M){return Object.defineProperty(v,"prototype",{writable:!1}),v}function n(v,E){if(!(v instanceof E))throw new TypeError("Cannot call a class as a function")}function r(v,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function");v.prototype=Object.create(E&&E.prototype,{constructor:{value:v,writable:!0,configurable:!0}}),Object.defineProperty(v,"prototype",{writable:!1}),E&&i(v,E)}function i(v,E){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(O,j){return O.__proto__=j,O},i(v,E)}function o(v){var E=l();return function(){var O=d(v),j;if(E){var B=d(this).constructor;j=Reflect.construct(O,arguments,B)}else j=O.apply(this,arguments);return s(this,j)}}function s(v,E){if(E&&(t(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return a(v)}function a(v){if(v===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v}function l(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function d(v){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(M){return M.__proto__||Object.getPrototypeOf(M)},d(v)}var c={},h,m;function y(v,E,M){M||(M=Error);function O(B,L,F){return typeof E=="string"?E:E(B,L,F)}var j=function(B){r(F,B);var L=o(F);function F(Y,Z,nt){var st;return n(this,F),st=L.call(this,O(Y,Z,nt)),st.code=v,st}return e(F)}(M);c[v]=j}function w(v,E){if(Array.isArray(v)){var M=v.length;return v=v.map(function(O){return String(O)}),M>2?"one of ".concat(E," ").concat(v.slice(0,M-1).join(", "),", or ")+v[M-1]:M===2?"one of ".concat(E," ").concat(v[0]," or ").concat(v[1]):"of ".concat(E," ").concat(v[0])}else return"of ".concat(E," ").concat(String(v))}function _(v,E,M){return v.substr(0,E.length)===E}function P(v,E,M){return(M===void 0||M>v.length)&&(M=v.length),v.substring(M-E.length,M)===E}function x(v,E,M){return typeof M!="number"&&(M=0),M+E.length>v.length?!1:v.indexOf(E,M)!==-1}return y("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),y("ERR_INVALID_ARG_TYPE",function(v,E,M){h===void 0&&(h=hc()),h(typeof v=="string","'name' must be a string");var O;typeof E=="string"&&_(E,"not ")?(O="must not be",E=E.replace(/^not /,"")):O="must be";var j;if(P(v," argument"))j="The ".concat(v," ").concat(O," ").concat(w(E,"type"));else{var B=x(v,".")?"property":"argument";j='The "'.concat(v,'" ').concat(B," ").concat(O," ").concat(w(E,"type"))}return j+=". Received type ".concat(t(M)),j},TypeError),y("ERR_INVALID_ARG_VALUE",function(v,E){var M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";m===void 0&&(m=un);var O=m.inspect(E);return O.length>128&&(O="".concat(O.slice(0,128),"...")),"The argument '".concat(v,"' ").concat(M,". Received ").concat(O)},TypeError),y("ERR_INVALID_RETURN_VALUE",function(v,E,M){var O;return M&&M.constructor&&M.constructor.name?O="instance of ".concat(M.constructor.name):O="type ".concat(t(M)),"Expected ".concat(v,' to be returned from the "').concat(E,'"')+" function but got ".concat(O,".")},TypeError),y("ERR_MISSING_ARGS",function(){for(var v=arguments.length,E=new Array(v),M=0;M<v;M++)E[M]=arguments[M];h===void 0&&(h=hc()),h(E.length>0,"At least one arg needs to be specified");var O="The ",j=E.length;switch(E=E.map(function(B){return'"'.concat(B,'"')}),j){case 1:O+="".concat(E[0]," argument");break;case 2:O+="".concat(E[0]," and ").concat(E[1]," arguments");break;default:O+=E.slice(0,j-1).join(", "),O+=", and ".concat(E[j-1]," arguments");break}return"".concat(O," must be specified")},TypeError),tc.codes=c,tc}var ec,Vp;function m3(){if(Vp)return ec;Vp=1;function t(z,H){var G=Object.keys(z);if(Object.getOwnPropertySymbols){var S=Object.getOwnPropertySymbols(z);H&&(S=S.filter(function(N){return Object.getOwnPropertyDescriptor(z,N).enumerable})),G.push.apply(G,S)}return G}function e(z){for(var H=1;H<arguments.length;H++){var G=arguments[H]!=null?arguments[H]:{};H%2?t(Object(G),!0).forEach(function(S){n(z,S,G[S])}):Object.getOwnPropertyDescriptors?Object.defineProperties(z,Object.getOwnPropertyDescriptors(G)):t(Object(G)).forEach(function(S){Object.defineProperty(z,S,Object.getOwnPropertyDescriptor(G,S))})}return z}function n(z,H,G){return H=s(H),H in z?Object.defineProperty(z,H,{value:G,enumerable:!0,configurable:!0,writable:!0}):z[H]=G,z}function r(z,H){if(!(z instanceof H))throw new TypeError("Cannot call a class as a function")}function i(z,H){for(var G=0;G<H.length;G++){var S=H[G];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(z,s(S.key),S)}}function o(z,H,G){return H&&i(z.prototype,H),Object.defineProperty(z,"prototype",{writable:!1}),z}function s(z){var H=a(z,"string");return v(H)==="symbol"?H:String(H)}function a(z,H){if(v(z)!=="object"||z===null)return z;var G=z[Symbol.toPrimitive];if(G!==void 0){var S=G.call(z,H||"default");if(v(S)!=="object")return S;throw new TypeError("@@toPrimitive must return a primitive value.")}return(H==="string"?String:Number)(z)}function l(z,H){if(typeof H!="function"&&H!==null)throw new TypeError("Super expression must either be null or a function");z.prototype=Object.create(H&&H.prototype,{constructor:{value:z,writable:!0,configurable:!0}}),Object.defineProperty(z,"prototype",{writable:!1}),H&&P(z,H)}function d(z){var H=w();return function(){var S=x(z),N;if(H){var b=x(this).constructor;N=Reflect.construct(S,arguments,b)}else N=S.apply(this,arguments);return c(this,N)}}function c(z,H){if(H&&(v(H)==="object"||typeof H=="function"))return H;if(H!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return h(z)}function h(z){if(z===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return z}function m(z){var H=typeof Map=="function"?new Map:void 0;return m=function(S){if(S===null||!_(S))return S;if(typeof S!="function")throw new TypeError("Super expression must either be null or a function");if(typeof H<"u"){if(H.has(S))return H.get(S);H.set(S,N)}function N(){return y(S,arguments,x(this).constructor)}return N.prototype=Object.create(S.prototype,{constructor:{value:N,enumerable:!1,writable:!0,configurable:!0}}),P(N,S)},m(z)}function y(z,H,G){return w()?y=Reflect.construct.bind():y=function(N,b,A){var I=[null];I.push.apply(I,b);var W=Function.bind.apply(N,I),$=new W;return A&&P($,A.prototype),$},y.apply(null,arguments)}function w(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _(z){return Function.toString.call(z).indexOf("[native code]")!==-1}function P(z,H){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(S,N){return S.__proto__=N,S},P(z,H)}function x(z){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(G){return G.__proto__||Object.getPrototypeOf(G)},x(z)}function v(z){"@babel/helpers - typeof";return v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(H){return typeof H}:function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H},v(z)}var E=un,M=E.inspect,O=$p(),j=O.codes.ERR_INVALID_ARG_TYPE;function B(z,H,G){return(G===void 0||G>z.length)&&(G=z.length),z.substring(G-H.length,G)===H}function L(z,H){if(H=Math.floor(H),z.length==0||H==0)return"";var G=z.length*H;for(H=Math.floor(Math.log(H)/Math.log(2));H;)z+=z,H--;return z+=z.substring(0,G-z.length),z}var F="",Y="",Z="",nt="",st={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},_t=10;function dt(z){var H=Object.keys(z),G=Object.create(Object.getPrototypeOf(z));return H.forEach(function(S){G[S]=z[S]}),Object.defineProperty(G,"message",{value:z.message}),G}function It(z){return M(z,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function at(z,H,G){var S="",N="",b=0,A="",I=!1,W=It(z),$=W.split(`
115
- `),q=It(H).split(`
116
- `),K=0,rt="";if(G==="strictEqual"&&v(z)==="object"&&v(H)==="object"&&z!==null&&H!==null&&(G="strictEqualObject"),$.length===1&&q.length===1&&$[0]!==q[0]){var ht=$[0].length+q[0].length;if(ht<=_t){if((v(z)!=="object"||z===null)&&(v(H)!=="object"||H===null)&&(z!==0||H!==0))return"".concat(st[G],`
117
-
118
- `)+"".concat($[0]," !== ").concat(q[0],`
119
- `)}else if(G!=="strictEqualObject"){var wt=Wt.stderr&&Wt.stderr.isTTY?Wt.stderr.columns:80;if(ht<wt){for(;$[0][K]===q[0][K];)K++;K>2&&(rt=`
120
- `.concat(L(" ",K),"^"),K=0)}}}for(var Tt=$[$.length-1],$t=q[q.length-1];Tt===$t&&(K++<2?A=`
121
- `.concat(Tt).concat(A):S=Tt,$.pop(),q.pop(),!($.length===0||q.length===0));)Tt=$[$.length-1],$t=q[q.length-1];var Yt=Math.max($.length,q.length);if(Yt===0){var Jt=W.split(`
122
- `);if(Jt.length>30)for(Jt[26]="".concat(F,"...").concat(nt);Jt.length>27;)Jt.pop();return"".concat(st.notIdentical,`
123
-
124
- `).concat(Jt.join(`
125
- `),`
126
- `)}K>3&&(A=`
127
- `.concat(F,"...").concat(nt).concat(A),I=!0),S!==""&&(A=`
128
- `.concat(S).concat(A),S="");var qt=0,U=st[G]+`
129
- `.concat(Y,"+ actual").concat(nt," ").concat(Z,"- expected").concat(nt),me=" ".concat(F,"...").concat(nt," Lines skipped");for(K=0;K<Yt;K++){var J=K-b;if($.length<K+1)J>1&&K>2&&(J>4?(N+=`
130
- `.concat(F,"...").concat(nt),I=!0):J>3&&(N+=`
131
- `.concat(q[K-2]),qt++),N+=`
132
- `.concat(q[K-1]),qt++),b=K,S+=`
133
- `.concat(Z,"-").concat(nt," ").concat(q[K]),qt++;else if(q.length<K+1)J>1&&K>2&&(J>4?(N+=`
134
- `.concat(F,"...").concat(nt),I=!0):J>3&&(N+=`
135
- `.concat($[K-2]),qt++),N+=`
136
- `.concat($[K-1]),qt++),b=K,N+=`
137
- `.concat(Y,"+").concat(nt," ").concat($[K]),qt++;else{var vt=q[K],Et=$[K],k=Et!==vt&&(!B(Et,",")||Et.slice(0,-1)!==vt);k&&B(vt,",")&&vt.slice(0,-1)===Et&&(k=!1,Et+=","),k?(J>1&&K>2&&(J>4?(N+=`
138
- `.concat(F,"...").concat(nt),I=!0):J>3&&(N+=`
139
- `.concat($[K-2]),qt++),N+=`
140
- `.concat($[K-1]),qt++),b=K,N+=`
141
- `.concat(Y,"+").concat(nt," ").concat(Et),S+=`
142
- `.concat(Z,"-").concat(nt," ").concat(vt),qt+=2):(N+=S,S="",(J===1||K===0)&&(N+=`
143
- `.concat(Et),qt++))}if(qt>20&&K<Yt-2)return"".concat(U).concat(me,`
144
- `).concat(N,`
145
- `).concat(F,"...").concat(nt).concat(S,`
146
- `)+"".concat(F,"...").concat(nt)}return"".concat(U).concat(I?me:"",`
147
- `).concat(N).concat(S).concat(A).concat(rt)}var pt=function(z,H){l(S,z);var G=d(S);function S(N){var b;if(r(this,S),v(N)!=="object"||N===null)throw new j("options","Object",N);var A=N.message,I=N.operator,W=N.stackStartFn,$=N.actual,q=N.expected,K=Error.stackTraceLimit;if(Error.stackTraceLimit=0,A!=null)b=G.call(this,String(A));else if(Wt.stderr&&Wt.stderr.isTTY&&(Wt.stderr&&Wt.stderr.getColorDepth&&Wt.stderr.getColorDepth()!==1?(F="\x1B[34m",Y="\x1B[32m",nt="\x1B[39m",Z="\x1B[31m"):(F="",Y="",nt="",Z="")),v($)==="object"&&$!==null&&v(q)==="object"&&q!==null&&"stack"in $&&$ instanceof Error&&"stack"in q&&q instanceof Error&&($=dt($),q=dt(q)),I==="deepStrictEqual"||I==="strictEqual")b=G.call(this,at($,q,I));else if(I==="notDeepStrictEqual"||I==="notStrictEqual"){var rt=st[I],ht=It($).split(`
148
- `);if(I==="notStrictEqual"&&v($)==="object"&&$!==null&&(rt=st.notStrictEqualObject),ht.length>30)for(ht[26]="".concat(F,"...").concat(nt);ht.length>27;)ht.pop();ht.length===1?b=G.call(this,"".concat(rt," ").concat(ht[0])):b=G.call(this,"".concat(rt,`
149
-
150
- `).concat(ht.join(`
151
- `),`
152
- `))}else{var wt=It($),Tt="",$t=st[I];I==="notDeepEqual"||I==="notEqual"?(wt="".concat(st[I],`
153
-
154
- `).concat(wt),wt.length>1024&&(wt="".concat(wt.slice(0,1021),"..."))):(Tt="".concat(It(q)),wt.length>512&&(wt="".concat(wt.slice(0,509),"...")),Tt.length>512&&(Tt="".concat(Tt.slice(0,509),"...")),I==="deepEqual"||I==="equal"?wt="".concat($t,`
155
-
156
- `).concat(wt,`
157
-
158
- should equal
159
-
160
- `):Tt=" ".concat(I," ").concat(Tt)),b=G.call(this,"".concat(wt).concat(Tt))}return Error.stackTraceLimit=K,b.generatedMessage=!A,Object.defineProperty(h(b),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),b.code="ERR_ASSERTION",b.actual=$,b.expected=q,b.operator=I,Error.captureStackTrace&&Error.captureStackTrace(h(b),W),b.stack,b.name="AssertionError",c(b)}return o(S,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:H,value:function(b,A){return M(this,e(e({},A),{},{customInspect:!1,depth:0}))}}]),S}(m(Error),M.custom);return ec=pt,ec}var Up=Object.prototype.toString,zp=function(e){var n=Up.call(e),r=n==="[object Arguments]";return r||(r=n!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&Up.call(e.callee)==="[object Function]"),r},nc,Wp;function y3(){if(Wp)return nc;Wp=1;var t;if(!Object.keys){var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=zp,i=Object.prototype.propertyIsEnumerable,o=!i.call({toString:null},"toString"),s=i.call(function(){},"prototype"),a=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(m){var y=m.constructor;return y&&y.prototype===m},d={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},c=function(){if(typeof window>"u")return!1;for(var m in window)try{if(!d["$"+m]&&e.call(window,m)&&window[m]!==null&&typeof window[m]=="object")try{l(window[m])}catch{return!0}}catch{return!0}return!1}(),h=function(m){if(typeof window>"u"||!c)return l(m);try{return l(m)}catch{return!1}};t=function(y){var w=y!==null&&typeof y=="object",_=n.call(y)==="[object Function]",P=r(y),x=w&&n.call(y)==="[object String]",v=[];if(!w&&!_&&!P)throw new TypeError("Object.keys called on a non-object");var E=s&&_;if(x&&y.length>0&&!e.call(y,0))for(var M=0;M<y.length;++M)v.push(String(M));if(P&&y.length>0)for(var O=0;O<y.length;++O)v.push(String(O));else for(var j in y)!(E&&j==="prototype")&&e.call(y,j)&&v.push(String(j));if(o)for(var B=h(y),L=0;L<a.length;++L)!(B&&a[L]==="constructor")&&e.call(y,a[L])&&v.push(a[L]);return v}}return nc=t,nc}var g3=Array.prototype.slice,v3=zp,qp=Object.keys,Gi=qp?function(e){return qp(e)}:y3(),Hp=Object.keys;Gi.shim=function(){if(Object.keys){var e=function(){var n=Object.keys(arguments);return n&&n.length===arguments.length}(1,2);e||(Object.keys=function(r){return v3(r)?Hp(g3.call(r)):Hp(r)})}else Object.keys=Gi;return Object.keys||Gi};var Gp=Gi,w3=Gp,Kp=Ta(),Yp=Fa,Ki=cp,b3=Yp("Array.prototype.push"),Xp=Yp("Object.prototype.propertyIsEnumerable"),_3=Kp?Ki.getOwnPropertySymbols:null,x3=function(e,n){if(e==null)throw new TypeError("target must be an object");var r=Ki(e);if(arguments.length===1)return r;for(var i=1;i<arguments.length;++i){var o=Ki(arguments[i]),s=w3(o),a=Kp&&(Ki.getOwnPropertySymbols||_3);if(a)for(var l=a(o),d=0;d<l.length;++d){var c=l[d];Xp(o,c)&&b3(s,c)}for(var h=0;h<s.length;++h){var m=s[h];if(Xp(o,m)){var y=o[m];r[m]=y}}}return r},rc=x3,S3=function(){if(!Object.assign)return!1;for(var t="abcdefghijklmnopqrst",e=t.split(""),n={},r=0;r<e.length;++r)n[e[r]]=e[r];var i=Object.assign({},n),o="";for(var s in i)o+=s;return t!==o},E3=function(){if(!Object.assign||!Object.preventExtensions)return!1;var t=Object.preventExtensions({1:2});try{Object.assign(t,"xy")}catch{return t[1]==="y"}return!1},A3=function(){return!Object.assign||S3()||E3()?rc:Object.assign},Jp=function(t){return t!==t},Zp=function(e,n){return e===0&&n===0?1/e===1/n:!!(e===n||Jp(e)&&Jp(n))},C3=Zp,ic=function(){return typeof Object.is=="function"?Object.is:C3},Qp=La,tm=zi,T3=tm(Qp("String.prototype.indexOf")),P3=function(e,n){var r=Qp(e,!!n);return typeof r=="function"&&T3(e,".prototype.")>-1?tm(r):r},oc,em;function Yi(){if(em)return oc;em=1;var t=Gp,e=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",n=Object.prototype.toString,r=Array.prototype.concat,i=kp,o=function(d){return typeof d=="function"&&n.call(d)==="[object Function]"},s=Ip(),a=function(d,c,h,m){if(c in d){if(m===!0){if(d[c]===h)return}else if(!o(m)||!m())return}s?i(d,c,h,!0):i(d,c,h)},l=function(d,c){var h=arguments.length>2?arguments[2]:{},m=t(c);e&&(m=r.call(m,Object.getOwnPropertySymbols(c)));for(var y=0;y<m.length;y+=1)a(d,m[y],c[m[y]],h[m[y]])};return l.supportsDescriptors=!!s,oc=l,oc}var sc,nm;function k3(){if(nm)return sc;nm=1;var t=ic,e=Yi();return sc=function(){var r=t();return e(Object,{is:r},{is:function(){return Object.is!==r}}),r},sc}var ac,rm;function O3(){if(rm)return ac;rm=1;var t=Yi(),e=zi,n=Zp,r=ic,i=k3(),o=e(r(),Object);return t(o,{getPolyfill:r,implementation:n,shim:i}),ac=o,ac}var cc,im;function om(){return im||(im=1,cc=function(e){return e!==e}),cc}var lc,sm;function am(){if(sm)return lc;sm=1;var t=om();return lc=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:t},lc}var uc,cm;function I3(){if(cm)return uc;cm=1;var t=Yi(),e=am();return uc=function(){var r=e();return t(Number,{isNaN:r},{isNaN:function(){return Number.isNaN!==r}}),r},uc}var fc,lm;function R3(){if(lm)return fc;lm=1;var t=zi,e=Yi(),n=om(),r=am(),i=I3(),o=t(r(),Number);return e(o,{getPolyfill:r,implementation:n,shim:i}),fc=o,fc}var dc,um;function M3(){if(um)return dc;um=1;function t(k,R){return o(k)||i(k,R)||n(k,R)||e()}function e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
161
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function n(k,R){if(k){if(typeof k=="string")return r(k,R);var X=Object.prototype.toString.call(k).slice(8,-1);if(X==="Object"&&k.constructor&&(X=k.constructor.name),X==="Map"||X==="Set")return Array.from(k);if(X==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(X))return r(k,R)}}function r(k,R){(R==null||R>k.length)&&(R=k.length);for(var X=0,tt=new Array(R);X<R;X++)tt[X]=k[X];return tt}function i(k,R){var X=k==null?null:typeof Symbol<"u"&&k[Symbol.iterator]||k["@@iterator"];if(X!=null){var tt,Q,ct,p,u=[],f=!0,g=!1;try{if(ct=(X=X.call(k)).next,R!==0)for(;!(f=(tt=ct.call(X)).done)&&(u.push(tt.value),u.length!==R);f=!0);}catch(C){g=!0,Q=C}finally{try{if(!f&&X.return!=null&&(p=X.return(),Object(p)!==p))return}finally{if(g)throw Q}}return u}}function o(k){if(Array.isArray(k))return k}function s(k){"@babel/helpers - typeof";return s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(R){return typeof R}:function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R},s(k)}var a=/a/g.flags!==void 0,l=function(R){var X=[];return R.forEach(function(tt){return X.push(tt)}),X},d=function(R){var X=[];return R.forEach(function(tt,Q){return X.push([Q,tt])}),X},c=Object.is?Object.is:O3(),h=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},m=Number.isNaN?Number.isNaN:R3();function y(k){return k.call.bind(k)}var w=y(Object.prototype.hasOwnProperty),_=y(Object.prototype.propertyIsEnumerable),P=y(Object.prototype.toString),x=un.types,v=x.isAnyArrayBuffer,E=x.isArrayBufferView,M=x.isDate,O=x.isMap,j=x.isRegExp,B=x.isSet,L=x.isNativeError,F=x.isBoxedPrimitive,Y=x.isNumberObject,Z=x.isStringObject,nt=x.isBooleanObject,st=x.isBigIntObject,_t=x.isSymbolObject,dt=x.isFloat32Array,It=x.isFloat64Array;function at(k){if(k.length===0||k.length>10)return!0;for(var R=0;R<k.length;R++){var X=k.charCodeAt(R);if(X<48||X>57)return!0}return k.length===10&&k>=Math.pow(2,32)}function pt(k){return Object.keys(k).filter(at).concat(h(k).filter(Object.prototype.propertyIsEnumerable.bind(k)))}/*!
162
- * The buffer module from node.js, for the browser.
163
- *
164
- * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
165
- * @license MIT
166
- */function z(k,R){if(k===R)return 0;for(var X=k.length,tt=R.length,Q=0,ct=Math.min(X,tt);Q<ct;++Q)if(k[Q]!==R[Q]){X=k[Q],tt=R[Q];break}return X<tt?-1:tt<X?1:0}var H=!0,G=!1,S=0,N=1,b=2,A=3;function I(k,R){return a?k.source===R.source&&k.flags===R.flags:RegExp.prototype.toString.call(k)===RegExp.prototype.toString.call(R)}function W(k,R){if(k.byteLength!==R.byteLength)return!1;for(var X=0;X<k.byteLength;X++)if(k[X]!==R[X])return!1;return!0}function $(k,R){return k.byteLength!==R.byteLength?!1:z(new Uint8Array(k.buffer,k.byteOffset,k.byteLength),new Uint8Array(R.buffer,R.byteOffset,R.byteLength))===0}function q(k,R){return k.byteLength===R.byteLength&&z(new Uint8Array(k),new Uint8Array(R))===0}function K(k,R){return Y(k)?Y(R)&&c(Number.prototype.valueOf.call(k),Number.prototype.valueOf.call(R)):Z(k)?Z(R)&&String.prototype.valueOf.call(k)===String.prototype.valueOf.call(R):nt(k)?nt(R)&&Boolean.prototype.valueOf.call(k)===Boolean.prototype.valueOf.call(R):st(k)?st(R)&&BigInt.prototype.valueOf.call(k)===BigInt.prototype.valueOf.call(R):_t(R)&&Symbol.prototype.valueOf.call(k)===Symbol.prototype.valueOf.call(R)}function rt(k,R,X,tt){if(k===R)return k!==0?!0:X?c(k,R):!0;if(X){if(s(k)!=="object")return typeof k=="number"&&m(k)&&m(R);if(s(R)!=="object"||k===null||R===null||Object.getPrototypeOf(k)!==Object.getPrototypeOf(R))return!1}else{if(k===null||s(k)!=="object")return R===null||s(R)!=="object"?k==R:!1;if(R===null||s(R)!=="object")return!1}var Q=P(k),ct=P(R);if(Q!==ct)return!1;if(Array.isArray(k)){if(k.length!==R.length)return!1;var p=pt(k),u=pt(R);return p.length!==u.length?!1:wt(k,R,X,tt,N,p)}if(Q==="[object Object]"&&(!O(k)&&O(R)||!B(k)&&B(R)))return!1;if(M(k)){if(!M(R)||Date.prototype.getTime.call(k)!==Date.prototype.getTime.call(R))return!1}else if(j(k)){if(!j(R)||!I(k,R))return!1}else if(L(k)||k instanceof Error){if(k.message!==R.message||k.name!==R.name)return!1}else if(E(k)){if(!X&&(dt(k)||It(k))){if(!W(k,R))return!1}else if(!$(k,R))return!1;var f=pt(k),g=pt(R);return f.length!==g.length?!1:wt(k,R,X,tt,S,f)}else{if(B(k))return!B(R)||k.size!==R.size?!1:wt(k,R,X,tt,b);if(O(k))return!O(R)||k.size!==R.size?!1:wt(k,R,X,tt,A);if(v(k)){if(!q(k,R))return!1}else if(F(k)&&!K(k,R))return!1}return wt(k,R,X,tt,S)}function ht(k,R){return R.filter(function(X){return _(k,X)})}function wt(k,R,X,tt,Q,ct){if(arguments.length===5){ct=Object.keys(k);var p=Object.keys(R);if(ct.length!==p.length)return!1}for(var u=0;u<ct.length;u++)if(!w(R,ct[u]))return!1;if(X&&arguments.length===5){var f=h(k);if(f.length!==0){var g=0;for(u=0;u<f.length;u++){var C=f[u];if(_(k,C)){if(!_(R,C))return!1;ct.push(C),g++}else if(_(R,C))return!1}var D=h(R);if(f.length!==D.length&&ht(R,D).length!==g)return!1}else{var V=h(R);if(V.length!==0&&ht(R,V).length!==0)return!1}}if(ct.length===0&&(Q===S||Q===N&&k.length===0||k.size===0))return!0;if(tt===void 0)tt={val1:new Map,val2:new Map,position:0};else{var lt=tt.val1.get(k);if(lt!==void 0){var bt=tt.val2.get(R);if(bt!==void 0)return lt===bt}tt.position++}tt.val1.set(k,tt.position),tt.val2.set(R,tt.position);var xt=J(k,R,X,ct,tt,Q);return tt.val1.delete(k),tt.val2.delete(R),xt}function Tt(k,R,X,tt){for(var Q=l(k),ct=0;ct<Q.length;ct++){var p=Q[ct];if(rt(R,p,X,tt))return k.delete(p),!0}return!1}function $t(k){switch(s(k)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":k=+k;case"number":if(m(k))return!1}return!0}function Yt(k,R,X){var tt=$t(X);return tt??(R.has(tt)&&!k.has(tt))}function Jt(k,R,X,tt,Q){var ct=$t(X);if(ct!=null)return ct;var p=R.get(ct);return p===void 0&&!R.has(ct)||!rt(tt,p,!1,Q)?!1:!k.has(ct)&&rt(tt,p,!1,Q)}function qt(k,R,X,tt){for(var Q=null,ct=l(k),p=0;p<ct.length;p++){var u=ct[p];if(s(u)==="object"&&u!==null)Q===null&&(Q=new Set),Q.add(u);else if(!R.has(u)){if(X||!Yt(k,R,u))return!1;Q===null&&(Q=new Set),Q.add(u)}}if(Q!==null){for(var f=l(R),g=0;g<f.length;g++){var C=f[g];if(s(C)==="object"&&C!==null){if(!Tt(Q,C,X,tt))return!1}else if(!X&&!k.has(C)&&!Tt(Q,C,X,tt))return!1}return Q.size===0}return!0}function U(k,R,X,tt,Q,ct){for(var p=l(k),u=0;u<p.length;u++){var f=p[u];if(rt(X,f,Q,ct)&&rt(tt,R.get(f),Q,ct))return k.delete(f),!0}return!1}function me(k,R,X,tt){for(var Q=null,ct=d(k),p=0;p<ct.length;p++){var u=t(ct[p],2),f=u[0],g=u[1];if(s(f)==="object"&&f!==null)Q===null&&(Q=new Set),Q.add(f);else{var C=R.get(f);if(C===void 0&&!R.has(f)||!rt(g,C,X,tt)){if(X||!Jt(k,R,f,g,tt))return!1;Q===null&&(Q=new Set),Q.add(f)}}}if(Q!==null){for(var D=d(R),V=0;V<D.length;V++){var lt=t(D[V],2),bt=lt[0],xt=lt[1];if(s(bt)==="object"&&bt!==null){if(!U(Q,k,bt,xt,X,tt))return!1}else if(!X&&(!k.has(bt)||!rt(k.get(bt),xt,!1,tt))&&!U(Q,k,bt,xt,!1,tt))return!1}return Q.size===0}return!0}function J(k,R,X,tt,Q,ct){var p=0;if(ct===b){if(!qt(k,R,X,Q))return!1}else if(ct===A){if(!me(k,R,X,Q))return!1}else if(ct===N)for(;p<k.length;p++)if(w(k,p)){if(!w(R,p)||!rt(k[p],R[p],X,Q))return!1}else{if(w(R,p))return!1;for(var u=Object.keys(k);p<u.length;p++){var f=u[p];if(!w(R,f)||!rt(k[f],R[f],X,Q))return!1}return u.length===Object.keys(R).length}for(p=0;p<tt.length;p++){var g=tt[p];if(!rt(k[g],R[g],X,Q))return!1}return!0}function vt(k,R){return rt(k,R,G)}function Et(k,R){return rt(k,R,H)}return dc={isDeepEqual:vt,isDeepStrictEqual:Et},dc}var fm;function hc(){if(fm)return Qa.exports;fm=1;function t(b){"@babel/helpers - typeof";return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},t(b)}function e(b,A,I){return Object.defineProperty(b,"prototype",{writable:!1}),b}function n(b,A){if(!(b instanceof A))throw new TypeError("Cannot call a class as a function")}var r=$p(),i=r.codes,o=i.ERR_AMBIGUOUS_ARGUMENT,s=i.ERR_INVALID_ARG_TYPE,a=i.ERR_INVALID_ARG_VALUE,l=i.ERR_INVALID_RETURN_VALUE,d=i.ERR_MISSING_ARGS,c=m3(),h=un,m=h.inspect,y=un.types,w=y.isPromise,_=y.isRegExp,P=A3(),x=ic(),v=P3("RegExp.prototype.test"),E,M;function O(){var b=M3();E=b.isDeepEqual,M=b.isDeepStrictEqual}var j=!1,B=Qa.exports=nt,L={};function F(b){throw b.message instanceof Error?b.message:new c(b)}function Y(b,A,I,W,$){var q=arguments.length,K;if(q===0)K="Failed";else if(q===1)I=b,b=void 0;else{if(j===!1){j=!0;var rt=Wt.emitWarning?Wt.emitWarning:console.warn.bind(console);rt("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}q===2&&(W="!=")}if(I instanceof Error)throw I;var ht={actual:b,expected:A,operator:W===void 0?"fail":W,stackStartFn:$||Y};I!==void 0&&(ht.message=I);var wt=new c(ht);throw K&&(wt.message=K,wt.generatedMessage=!0),wt}B.fail=Y,B.AssertionError=c;function Z(b,A,I,W){if(!I){var $=!1;if(A===0)$=!0,W="No value argument passed to `assert.ok()`";else if(W instanceof Error)throw W;var q=new c({actual:I,expected:!0,message:W,operator:"==",stackStartFn:b});throw q.generatedMessage=$,q}}function nt(){for(var b=arguments.length,A=new Array(b),I=0;I<b;I++)A[I]=arguments[I];Z.apply(void 0,[nt,A.length].concat(A))}B.ok=nt,B.equal=function b(A,I,W){if(arguments.length<2)throw new d("actual","expected");A!=I&&F({actual:A,expected:I,message:W,operator:"==",stackStartFn:b})},B.notEqual=function b(A,I,W){if(arguments.length<2)throw new d("actual","expected");A==I&&F({actual:A,expected:I,message:W,operator:"!=",stackStartFn:b})},B.deepEqual=function b(A,I,W){if(arguments.length<2)throw new d("actual","expected");E===void 0&&O(),E(A,I)||F({actual:A,expected:I,message:W,operator:"deepEqual",stackStartFn:b})},B.notDeepEqual=function b(A,I,W){if(arguments.length<2)throw new d("actual","expected");E===void 0&&O(),E(A,I)&&F({actual:A,expected:I,message:W,operator:"notDeepEqual",stackStartFn:b})},B.deepStrictEqual=function b(A,I,W){if(arguments.length<2)throw new d("actual","expected");E===void 0&&O(),M(A,I)||F({actual:A,expected:I,message:W,operator:"deepStrictEqual",stackStartFn:b})},B.notDeepStrictEqual=st;function st(b,A,I){if(arguments.length<2)throw new d("actual","expected");E===void 0&&O(),M(b,A)&&F({actual:b,expected:A,message:I,operator:"notDeepStrictEqual",stackStartFn:st})}B.strictEqual=function b(A,I,W){if(arguments.length<2)throw new d("actual","expected");x(A,I)||F({actual:A,expected:I,message:W,operator:"strictEqual",stackStartFn:b})},B.notStrictEqual=function b(A,I,W){if(arguments.length<2)throw new d("actual","expected");x(A,I)&&F({actual:A,expected:I,message:W,operator:"notStrictEqual",stackStartFn:b})};var _t=e(function b(A,I,W){var $=this;n(this,b),I.forEach(function(q){q in A&&(W!==void 0&&typeof W[q]=="string"&&_(A[q])&&v(A[q],W[q])?$[q]=W[q]:$[q]=A[q])})});function dt(b,A,I,W,$,q){if(!(I in b)||!M(b[I],A[I])){if(!W){var K=new _t(b,$),rt=new _t(A,$,b),ht=new c({actual:K,expected:rt,operator:"deepStrictEqual",stackStartFn:q});throw ht.actual=b,ht.expected=A,ht.operator=q.name,ht}F({actual:b,expected:A,message:W,operator:q.name,stackStartFn:q})}}function It(b,A,I,W){if(typeof A!="function"){if(_(A))return v(A,b);if(arguments.length===2)throw new s("expected",["Function","RegExp"],A);if(t(b)!=="object"||b===null){var $=new c({actual:b,expected:A,message:I,operator:"deepStrictEqual",stackStartFn:W});throw $.operator=W.name,$}var q=Object.keys(A);if(A instanceof Error)q.push("name","message");else if(q.length===0)throw new a("error",A,"may not be an empty object");return E===void 0&&O(),q.forEach(function(K){typeof b[K]=="string"&&_(A[K])&&v(A[K],b[K])||dt(b,A,K,I,q,W)}),!0}return A.prototype!==void 0&&b instanceof A?!0:Error.isPrototypeOf(A)?!1:A.call({},b)===!0}function at(b){if(typeof b!="function")throw new s("fn","Function",b);try{b()}catch(A){return A}return L}function pt(b){return w(b)||b!==null&&t(b)==="object"&&typeof b.then=="function"&&typeof b.catch=="function"}function z(b){return Promise.resolve().then(function(){var A;if(typeof b=="function"){if(A=b(),!pt(A))throw new l("instance of Promise","promiseFn",A)}else if(pt(b))A=b;else throw new s("promiseFn",["Function","Promise"],b);return Promise.resolve().then(function(){return A}).then(function(){return L}).catch(function(I){return I})})}function H(b,A,I,W){if(typeof I=="string"){if(arguments.length===4)throw new s("error",["Object","Error","Function","RegExp"],I);if(t(A)==="object"&&A!==null){if(A.message===I)throw new o("error/message",'The error message "'.concat(A.message,'" is identical to the message.'))}else if(A===I)throw new o("error/message",'The error "'.concat(A,'" is identical to the message.'));W=I,I=void 0}else if(I!=null&&t(I)!=="object"&&typeof I!="function")throw new s("error",["Object","Error","Function","RegExp"],I);if(A===L){var $="";I&&I.name&&($+=" (".concat(I.name,")")),$+=W?": ".concat(W):".";var q=b.name==="rejects"?"rejection":"exception";F({actual:void 0,expected:I,operator:b.name,message:"Missing expected ".concat(q).concat($),stackStartFn:b})}if(I&&!It(A,I,W,b))throw A}function G(b,A,I,W){if(A!==L){if(typeof I=="string"&&(W=I,I=void 0),!I||It(A,I)){var $=W?": ".concat(W):".",q=b.name==="doesNotReject"?"rejection":"exception";F({actual:A,expected:I,operator:b.name,message:"Got unwanted ".concat(q).concat($,`
167
- `)+'Actual message: "'.concat(A&&A.message,'"'),stackStartFn:b})}throw A}}B.throws=function b(A){for(var I=arguments.length,W=new Array(I>1?I-1:0),$=1;$<I;$++)W[$-1]=arguments[$];H.apply(void 0,[b,at(A)].concat(W))},B.rejects=function b(A){for(var I=arguments.length,W=new Array(I>1?I-1:0),$=1;$<I;$++)W[$-1]=arguments[$];return z(A).then(function(q){return H.apply(void 0,[b,q].concat(W))})},B.doesNotThrow=function b(A){for(var I=arguments.length,W=new Array(I>1?I-1:0),$=1;$<I;$++)W[$-1]=arguments[$];G.apply(void 0,[b,at(A)].concat(W))},B.doesNotReject=function b(A){for(var I=arguments.length,W=new Array(I>1?I-1:0),$=1;$<I;$++)W[$-1]=arguments[$];return z(A).then(function(q){return G.apply(void 0,[b,q].concat(W))})},B.ifError=function b(A){if(A!=null){var I="ifError got unwanted exception: ";t(A)==="object"&&typeof A.message=="string"?A.message.length===0&&A.constructor?I+=A.constructor.name:I+=A.message:I+=m(A);var W=new c({actual:A,expected:null,operator:"ifError",message:I,stackStartFn:b}),$=A.stack;if(typeof $=="string"){var q=$.split(`
168
- `);q.shift();for(var K=W.stack.split(`
169
- `),rt=0;rt<q.length;rt++){var ht=K.indexOf(q[rt]);if(ht!==-1){K=K.slice(0,ht);break}}W.stack="".concat(K.join(`
170
- `),`
171
- `).concat(q.join(`
172
- `))}throw W}};function S(b,A,I,W,$){if(!_(A))throw new s("regexp","RegExp",A);var q=$==="match";if(typeof b!="string"||v(A,b)!==q){if(I instanceof Error)throw I;var K=!I;I=I||(typeof b!="string"?'The "string" argument must be of type string. Received type '+"".concat(t(b)," (").concat(m(b),")"):(q?"The input did not match the regular expression ":"The input was expected to not match the regular expression ")+"".concat(m(A),`. Input:
173
-
174
- `).concat(m(b),`
175
- `));var rt=new c({actual:b,expected:A,message:I,operator:$,stackStartFn:W});throw rt.generatedMessage=K,rt}}B.match=function b(A,I,W){S(A,I,W,b,"match")},B.doesNotMatch=function b(A,I,W){S(A,I,W,b,"doesNotMatch")};function N(){for(var b=arguments.length,A=new Array(b),I=0;I<b;I++)A[I]=arguments[I];Z.apply(void 0,[N,A.length].concat(A))}return B.strict=P(N,B,{equal:B.strictEqual,deepEqual:B.deepStrictEqual,notEqual:B.notStrictEqual,notDeepEqual:B.notDeepStrictEqual}),B.strict.strict=B.strict,Qa.exports}var pc=un,N3=hc();function dm(){return new Date().getTime()}var D3=Array.prototype.slice,re,mc={};typeof gr<"u"&&gr.console?re=gr.console:typeof window<"u"&&window.console?re=window.console:re={};for(var hm=[[L3,"log"],[F3,"info"],[j3,"warn"],[$3,"error"],[V3,"time"],[U3,"timeEnd"],[z3,"trace"],[W3,"dir"],[q3,"assert"]],yc=0;yc<hm.length;yc++){var pm=hm[yc],B3=pm[0],mm=pm[1];re[mm]||(re[mm]=B3)}var je=re;function L3(){}function F3(){re.log.apply(re,arguments)}function j3(){re.log.apply(re,arguments)}function $3(){re.warn.apply(re,arguments)}function V3(t){mc[t]=dm()}function U3(t){var e=mc[t];if(!e)throw new Error("No such label: "+t);delete mc[t];var n=dm()-e;re.log(t+": "+n+"ms")}function z3(){var t=new Error;t.name="Trace",t.message=pc.format.apply(null,arguments),re.error(t.stack)}function W3(t){re.log(pc.inspect(t)+`
176
- `)}function q3(t){if(!t){var e=D3.call(arguments,1);N3.ok(!1,pc.format.apply(null,e))}}function H3(t){je.log("onNewSupportMessage",t);const{conversations:e,addMessage:n,isChatOpen:r,incrementUnreadCount:i}=Nt.getState(),o={support:!0,content:t.message.content,authorName:t.message.authorName,date:t.message.date,attachments:t.message.attachments,emojis:t.message.emojis},s=e.find(a=>a.threadId===t.threadId);if(s&&E1(s.messages,o)){je.log("Duplicate message detected, skipping:",t.threadId);return}n(t.threadId,o),r||i()}function G3(t){const e=Nt.getState().setConversationOpen;e(t.threadId,!1)}function K3(t){const{setConversationCSMember:e,addMessage:n,tempConversationToThread:r}=Nt.getState();r(t.threadId),e(t.threadId,t.csMember),n(t.threadId,D1(t.csMember.displayName))}function Y3(t){je.log("✨ onUpdatedSupportMessage",t);const{conversations:e,updateMessage:n}=Nt.getState(),r=e.find(o=>o.threadId===t.threadId);if(!r){je.log("⚠️ Conversation not found for update:",t.threadId);return}if(!r.messages.some(o=>o.date===t.message.date)){je.log("⚠️ Message not found for update:",t.message.date);return}n(t.threadId,t.message.date,{support:!0,content:t.message.content,authorName:t.message.authorName,date:t.message.date,attachments:t.message.attachments,edited:!0,emojis:t.message.emojis})}function X3(t){je.log("✨ onDeletedSupportMessage",t);const{conversations:e,removeMessage:n}=Nt.getState(),r=e.find(o=>o.threadId===t.threadId);if(!r){je.log("⚠️ Conversation not found for deletion:",t.threadId);return}if(!r.messages.some(o=>o.date===t.messageDate)){je.log("⚠️ Message not found for deletion:",t.messageDate);return}n(t.threadId,t.messageDate)}function J3(){return new Promise(t=>{const e=Ri(le.domain,{path:"/socket"});e.on("connect",async()=>(je.log("⚡ socket connected"),e.on("new-support-message",H3),e.on("updated-support-message",Y3),e.on("deleted-support-message",X3),e.on("thread-closed",G3),e.on("thread-assigned",K3),t(e)))})}async function Z3({name:t,email:e}){const n=JSON.stringify({guildId:le.app_id,name:t,email:e}),r=new Headers;r.append("Content-Type","application/json");const i={method:"POST",headers:r,body:n},s=await(await fetch(`${le.domain}/auth/token`,i)).json();return s.token&&s.token!=="undefined"&&(Qe.set("discord-widget",s.token),Nt.getState().setToken(s.token)),s}async function Q3(t){const e=new Headers;e.append("Content-Type","application/json"),e.append("Authorization",`Bearer ${t}`);try{const n=await fetch(`${le.domain}/conversations/current`,{method:"GET",headers:e});return n.status!==200?null:(await n.json()).currentConversation??null}catch(n){return console.error("Error fetching current conversation",n),null}}async function t6(t){const e=new Headers;e.append("Content-Type","application/json"),e.append("Authorization",`Bearer ${t}`);try{const n=await fetch(`${le.domain}/conversations/past`,{method:"GET",headers:e});return n.status!==200?null:(await n.json()).pastConversations??null}catch(n){return console.error("Error fetching past conversations",n),null}}async function e6(t){const e=await J3();return e.emit("identify",{jwt:t}),e}async function n6(t){const{smartMergeCurrentConversation:e,setConversationOpen:n,conversations:r}=Nt.getState();try{const i=await Q3(t);if(i)ne("✅ Found current conversation:",i.threadId),e(i);else{ne("ℹ️ No current conversation found");const o=r.find(s=>s.status==="open"&&s.threadId!=="TEMP");o&&(ne("ℹ️ Closing stale conversation:",o.threadId),n(o.threadId,!1))}}catch{Nt.getState().setNetworkError("Failed to load conversation")}}async function r6(t){const{pastConversationsLastFetchedAt:e,smartMergePastConversations:n,setLoading:r,setNetworkError:i}=Nt.getState(),o=5*60*1e3;if(!e||Date.now()-e>o)try{r(!0);const a=await t6(t);a&&a.length>0?(ne(`✅ Loaded ${a.length} past conversations`),n(a)):ne("ℹ️ No past conversations found")}catch{i("Failed to load conversation history")}finally{r(!1)}}async function i6(){const{username:t,email:e,setNetworkError:n,setLoading:r}=Nt.getState();try{r(!0),n(null);let i=Qe.get("discord-widget");i?ne("ℹ️ Returning user - JWT found in cookies"):(ne("ℹ️ New user - obtaining JWT token..."),i=(await Z3({name:t,email:e})).token,ne("✅ JWT token obtained")),await e6(i),await n6(i),ne("✅ Network initialization complete")}catch(i){n(i instanceof Error?i.message:"Network initialization failed")}finally{r(!1)}}const o6=()=>{const{conversations:t,setOpenConversationId:e,pastConversationsLastFetchedAt:n}=Nt(),r=t.filter(a=>a.status==="open").length;ut(()=>{const a=Qe.get("discord-widget");if(!a)return;const l=5*60*1e3;(!n||Date.now()-n>l)&&r6(a)},[n]);function i(){return r!==0?null:T(De.button,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},onClick:()=>e("TEMP"),style:{background:"linear-gradient(135deg, #7289DA, #5B6EAB)"},type:"button",className:"flex justify-center items-center w-full h-16 border-t border-gray-200",children:T("div",{className:`flex flex-row items-center transform transition-transform duration-150
177
- hover:scale-105 active:scale-95`,children:[T("span",{className:"text-sm text-slate-50 pr-3",children:"Send us a new message"}),T(Cw,{color:"#FFFFFF",size:18,strokeWidth:1})]})})}function o(a,l,d){var m,y,w;const c=a.messages[a.messages.length-1],h=a.status==="open";return T("div",{className:`flex flex-row items-center px-3 py-4 hover:bg-gray-200 cursor-pointer ${d?"":"border-b border-gray-200 "}`,onClick:()=>e(a.threadId),children:[T("div",{className:"relative inline-block mr-3",children:[T("img",{className:"inline-block size-[32px] rounded-full",src:((m=a==null?void 0:a.csMember)==null?void 0:m.displayAvatarURL)??"http://placehold.co/250x250"}),((y=a==null?void 0:a.csMember)==null?void 0:y.status)&&T("span",{className:`absolute top-0 end-0 block size-3 rounded-full ring-2 ring-white dark:ring-neutral-900 ${Ih(a.csMember.status,"bg")}`})]}),T("div",{className:"flex flex-1 flex-col",children:[T("p",{className:`text-sm/3 ${h?"font-semibold":""}`,children:(w=a==null?void 0:a.csMember)==null?void 0:w.displayName}),T("p",{className:"text-xs text-gray-500 line-clamp-1",children:c.content})]}),T("div",{className:"ml-2",children:T("p",{className:"text-xs text-gray-500",children:Dd(c.date)})})]},`conversation-${l}`)}function s(){const a=[...t].filter(c=>c.status==="open"),l=[...t].filter(c=>c.status==="closed"),d=c=>c.sort((h,m)=>m.lastMessageDate-h.lastMessageDate).map((h,m)=>h.messages.length?o(h,m,m+1===c.length):null);return T(De.div,{initial:{opacity:0,x:-30},animate:{opacity:1,x:0},transition:{duration:.3,ease:"easeOut"},className:"flex flex-col flex-1 p-2 overflow-y-scroll",children:[a.length>0&&T("div",{className:"mb-2",children:[T("span",{className:"text-sm",children:"Current conversation"}),d(a)]}),l.length>0&&T(Pt,{children:[T("span",{className:"text-sm",children:"Closed messages"}),d(l)]})]})}return T("div",{className:"flex flex-col flex-1 overflow-scroll",children:[s(),i()]})},ym=({IconComponent:t,onClick:e})=>T("button",{onClick:e,className:`flex mr-2 items-center justify-center w-8 h-8
105
+ */(function(t){const e=Jr,n=Ts,r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=c,t.SlowBuffer=k,t.INSPECT_MAX_BYTES=50;const i=2147483647;t.kMaxLength=i;const{Uint8Array:o,ArrayBuffer:s,SharedArrayBuffer:a}=globalThis;c.TYPED_ARRAY_SUPPORT=u(),!c.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function u(){try{const p=new o(1),l={foo:function(){return 42}};return Object.setPrototypeOf(l,o.prototype),Object.setPrototypeOf(p,l),p.foo()===42}catch{return!1}}Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}});function h(p){if(p>i)throw new RangeError('The value "'+p+'" is invalid for option "size"');const l=new o(p);return Object.setPrototypeOf(l,c.prototype),l}function c(p,l,d){if(typeof p=="number"){if(typeof l=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return v(p)}return f(p,l,d)}c.poolSize=8192;function f(p,l,d){if(typeof p=="string")return w(p,l);if(s.isView(p))return _(p);if(p==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof p);if(st(p,s)||p&&st(p.buffer,s)||typeof a<"u"&&(st(p,a)||p&&st(p.buffer,a)))return C(p,l,d);if(typeof p=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const y=p.valueOf&&p.valueOf();if(y!=null&&y!==p)return c.from(y,l,d);const b=T(p);if(b)return b;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof p[Symbol.toPrimitive]=="function")return c.from(p[Symbol.toPrimitive]("string"),l,d);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof p)}c.from=function(p,l,d){return f(p,l,d)},Object.setPrototypeOf(c.prototype,o.prototype),Object.setPrototypeOf(c,o);function m(p){if(typeof p!="number")throw new TypeError('"size" argument must be of type number');if(p<0)throw new RangeError('The value "'+p+'" is invalid for option "size"')}function g(p,l,d){return m(p),p<=0?h(p):l!==void 0?typeof d=="string"?h(p).fill(l,d):h(p).fill(l):h(p)}c.alloc=function(p,l,d){return g(p,l,d)};function v(p){return m(p),h(p<0?0:I(p)|0)}c.allocUnsafe=function(p){return v(p)},c.allocUnsafeSlow=function(p){return v(p)};function w(p,l){if((typeof l!="string"||l==="")&&(l="utf8"),!c.isEncoding(l))throw new TypeError("Unknown encoding: "+l);const d=R(p,l)|0;let y=h(d);const b=y.write(p,l);return b!==d&&(y=y.slice(0,b)),y}function E(p){const l=p.length<0?0:I(p.length)|0,d=h(l);for(let y=0;y<l;y+=1)d[y]=p[y]&255;return d}function _(p){if(st(p,o)){const l=new o(p);return C(l.buffer,l.byteOffset,l.byteLength)}return E(p)}function C(p,l,d){if(l<0||p.byteLength<l)throw new RangeError('"offset" is outside of buffer bounds');if(p.byteLength<l+(d||0))throw new RangeError('"length" is outside of buffer bounds');let y;return l===void 0&&d===void 0?y=new o(p):d===void 0?y=new o(p,l):y=new o(p,l,d),Object.setPrototypeOf(y,c.prototype),y}function T(p){if(c.isBuffer(p)){const l=I(p.length)|0,d=h(l);return d.length===0||p.copy(d,0,0,l),d}if(p.length!==void 0)return typeof p.length!="number"||de(p.length)?h(0):E(p);if(p.type==="Buffer"&&Array.isArray(p.data))return E(p.data)}function I(p){if(p>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return p|0}function k(p){return+p!=p&&(p=0),c.alloc(+p)}c.isBuffer=function(l){return l!=null&&l._isBuffer===!0&&l!==c.prototype},c.compare=function(l,d){if(st(l,o)&&(l=c.from(l,l.offset,l.byteLength)),st(d,o)&&(d=c.from(d,d.offset,d.byteLength)),!c.isBuffer(l)||!c.isBuffer(d))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(l===d)return 0;let y=l.length,b=d.length;for(let S=0,A=Math.min(y,b);S<A;++S)if(l[S]!==d[S]){y=l[S],b=d[S];break}return y<b?-1:b<y?1:0},c.isEncoding=function(l){switch(String(l).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(l,d){if(!Array.isArray(l))throw new TypeError('"list" argument must be an Array of Buffers');if(l.length===0)return c.alloc(0);let y;if(d===void 0)for(d=0,y=0;y<l.length;++y)d+=l[y].length;const b=c.allocUnsafe(d);let S=0;for(y=0;y<l.length;++y){let A=l[y];if(st(A,o))S+A.length>b.length?(c.isBuffer(A)||(A=c.from(A)),A.copy(b,S)):o.prototype.set.call(b,A,S);else if(c.isBuffer(A))A.copy(b,S);else throw new TypeError('"list" argument must be an Array of Buffers');S+=A.length}return b};function R(p,l){if(c.isBuffer(p))return p.length;if(s.isView(p)||st(p,s))return p.byteLength;if(typeof p!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof p);const d=p.length,y=arguments.length>2&&arguments[2]===!0;if(!y&&d===0)return 0;let b=!1;for(;;)switch(l){case"ascii":case"latin1":case"binary":return d;case"utf8":case"utf-8":return rr(p).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return d*2;case"hex":return d>>>1;case"base64":return bt(p).length;default:if(b)return y?-1:rr(p).length;l=(""+l).toLowerCase(),b=!0}}c.byteLength=R;function N(p,l,d){let y=!1;if((l===void 0||l<0)&&(l=0),l>this.length||((d===void 0||d>this.length)&&(d=this.length),d<=0)||(d>>>=0,l>>>=0,d<=l))return"";for(p||(p="utf8");;)switch(p){case"hex":return Yt(this,l,d);case"utf8":case"utf-8":return K(this,l,d);case"ascii":return jt(this,l,d);case"latin1":case"binary":return W(this,l,d);case"base64":return hn(this,l,d);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ni(this,l,d);default:if(y)throw new TypeError("Unknown encoding: "+p);p=(p+"").toLowerCase(),y=!0}}c.prototype._isBuffer=!0;function P(p,l,d){const y=p[l];p[l]=p[d],p[d]=y}c.prototype.swap16=function(){const l=this.length;if(l%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let d=0;d<l;d+=2)P(this,d,d+1);return this},c.prototype.swap32=function(){const l=this.length;if(l%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let d=0;d<l;d+=4)P(this,d,d+3),P(this,d+1,d+2);return this},c.prototype.swap64=function(){const l=this.length;if(l%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let d=0;d<l;d+=8)P(this,d,d+7),P(this,d+1,d+6),P(this,d+2,d+5),P(this,d+3,d+4);return this},c.prototype.toString=function(){const l=this.length;return l===0?"":arguments.length===0?K(this,0,l):N.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(l){if(!c.isBuffer(l))throw new TypeError("Argument must be a Buffer");return this===l?!0:c.compare(this,l)===0},c.prototype.inspect=function(){let l="";const d=t.INSPECT_MAX_BYTES;return l=this.toString("hex",0,d).replace(/(.{2})/g,"$1 ").trim(),this.length>d&&(l+=" ... "),"<Buffer "+l+">"},r&&(c.prototype[r]=c.prototype.inspect),c.prototype.compare=function(l,d,y,b,S){if(st(l,o)&&(l=c.from(l,l.offset,l.byteLength)),!c.isBuffer(l))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof l);if(d===void 0&&(d=0),y===void 0&&(y=l?l.length:0),b===void 0&&(b=0),S===void 0&&(S=this.length),d<0||y>l.length||b<0||S>this.length)throw new RangeError("out of range index");if(b>=S&&d>=y)return 0;if(b>=S)return-1;if(d>=y)return 1;if(d>>>=0,y>>>=0,b>>>=0,S>>>=0,this===l)return 0;let A=S-b,z=y-d;const ct=Math.min(A,z),nt=this.slice(b,S),lt=l.slice(d,y);for(let X=0;X<ct;++X)if(nt[X]!==lt[X]){A=nt[X],z=lt[X];break}return A<z?-1:z<A?1:0};function M(p,l,d,y,b){if(p.length===0)return-1;if(typeof d=="string"?(y=d,d=0):d>2147483647?d=2147483647:d<-2147483648&&(d=-2147483648),d=+d,de(d)&&(d=b?0:p.length-1),d<0&&(d=p.length+d),d>=p.length){if(b)return-1;d=p.length-1}else if(d<0)if(b)d=0;else return-1;if(typeof l=="string"&&(l=c.from(l,y)),c.isBuffer(l))return l.length===0?-1:B(p,l,d,y,b);if(typeof l=="number")return l=l&255,typeof o.prototype.indexOf=="function"?b?o.prototype.indexOf.call(p,l,d):o.prototype.lastIndexOf.call(p,l,d):B(p,[l],d,y,b);throw new TypeError("val must be string, number or Buffer")}function B(p,l,d,y,b){let S=1,A=p.length,z=l.length;if(y!==void 0&&(y=String(y).toLowerCase(),y==="ucs2"||y==="ucs-2"||y==="utf16le"||y==="utf-16le")){if(p.length<2||l.length<2)return-1;S=2,A/=2,z/=2,d/=2}function ct(lt,X){return S===1?lt[X]:lt.readUInt16BE(X*S)}let nt;if(b){let lt=-1;for(nt=d;nt<A;nt++)if(ct(p,nt)===ct(l,lt===-1?0:nt-lt)){if(lt===-1&&(lt=nt),nt-lt+1===z)return lt*S}else lt!==-1&&(nt-=nt-lt),lt=-1}else for(d+z>A&&(d=A-z),nt=d;nt>=0;nt--){let lt=!0;for(let X=0;X<z;X++)if(ct(p,nt+X)!==ct(l,X)){lt=!1;break}if(lt)return nt}return-1}c.prototype.includes=function(l,d,y){return this.indexOf(l,d,y)!==-1},c.prototype.indexOf=function(l,d,y){return M(this,l,d,y,!0)},c.prototype.lastIndexOf=function(l,d,y){return M(this,l,d,y,!1)};function O(p,l,d,y){d=Number(d)||0;const b=p.length-d;y?(y=Number(y),y>b&&(y=b)):y=b;const S=l.length;y>S/2&&(y=S/2);let A;for(A=0;A<y;++A){const z=parseInt(l.substr(A*2,2),16);if(de(z))return A;p[d+A]=z}return A}function et(p,l,d,y){return At(rr(l,p.length-d),p,d,y)}function ht(p,l,d,y){return At(D(l),p,d,y)}function Mt(p,l,d,y){return At(bt(l),p,d,y)}function G(p,l,d,y){return At(Z(l,p.length-d),p,d,y)}c.prototype.write=function(l,d,y,b){if(d===void 0)b="utf8",y=this.length,d=0;else if(y===void 0&&typeof d=="string")b=d,y=this.length,d=0;else if(isFinite(d))d=d>>>0,isFinite(y)?(y=y>>>0,b===void 0&&(b="utf8")):(b=y,y=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const S=this.length-d;if((y===void 0||y>S)&&(y=S),l.length>0&&(y<0||d<0)||d>this.length)throw new RangeError("Attempt to write outside buffer bounds");b||(b="utf8");let A=!1;for(;;)switch(b){case"hex":return O(this,l,d,y);case"utf8":case"utf-8":return et(this,l,d,y);case"ascii":case"latin1":case"binary":return ht(this,l,d,y);case"base64":return Mt(this,l,d,y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,l,d,y);default:if(A)throw new TypeError("Unknown encoding: "+b);b=(""+b).toLowerCase(),A=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function hn(p,l,d){return l===0&&d===p.length?e.fromByteArray(p):e.fromByteArray(p.slice(l,d))}function K(p,l,d){d=Math.min(p.length,d);const y=[];let b=l;for(;b<d;){const S=p[b];let A=null,z=S>239?4:S>223?3:S>191?2:1;if(b+z<=d){let ct,nt,lt,X;switch(z){case 1:S<128&&(A=S);break;case 2:ct=p[b+1],(ct&192)===128&&(X=(S&31)<<6|ct&63,X>127&&(A=X));break;case 3:ct=p[b+1],nt=p[b+2],(ct&192)===128&&(nt&192)===128&&(X=(S&15)<<12|(ct&63)<<6|nt&63,X>2047&&(X<55296||X>57343)&&(A=X));break;case 4:ct=p[b+1],nt=p[b+2],lt=p[b+3],(ct&192)===128&&(nt&192)===128&&(lt&192)===128&&(X=(S&15)<<18|(ct&63)<<12|(nt&63)<<6|lt&63,X>65535&&X<1114112&&(A=X))}}A===null?(A=65533,z=1):A>65535&&(A-=65536,y.push(A>>>10&1023|55296),A=56320|A&1023),y.push(A),b+=z}return Lt(y)}const wt=4096;function Lt(p){const l=p.length;if(l<=wt)return String.fromCharCode.apply(String,p);let d="",y=0;for(;y<l;)d+=String.fromCharCode.apply(String,p.slice(y,y+=wt));return d}function jt(p,l,d){let y="";d=Math.min(p.length,d);for(let b=l;b<d;++b)y+=String.fromCharCode(p[b]&127);return y}function W(p,l,d){let y="";d=Math.min(p.length,d);for(let b=l;b<d;++b)y+=String.fromCharCode(p[b]);return y}function Yt(p,l,d){const y=p.length;(!l||l<0)&&(l=0),(!d||d<0||d>y)&&(d=y);let b="";for(let S=l;S<d;++S)b+=gn[p[S]];return b}function ni(p,l,d){const y=p.slice(l,d);let b="";for(let S=0;S<y.length-1;S+=2)b+=String.fromCharCode(y[S]+y[S+1]*256);return b}c.prototype.slice=function(l,d){const y=this.length;l=~~l,d=d===void 0?y:~~d,l<0?(l+=y,l<0&&(l=0)):l>y&&(l=y),d<0?(d+=y,d<0&&(d=0)):d>y&&(d=y),d<l&&(d=l);const b=this.subarray(l,d);return Object.setPrototypeOf(b,c.prototype),b};function ft(p,l,d){if(p%1!==0||p<0)throw new RangeError("offset is not uint");if(p+l>d)throw new RangeError("Trying to access beyond buffer length")}c.prototype.readUintLE=c.prototype.readUIntLE=function(l,d,y){l=l>>>0,d=d>>>0,y||ft(l,d,this.length);let b=this[l],S=1,A=0;for(;++A<d&&(S*=256);)b+=this[l+A]*S;return b},c.prototype.readUintBE=c.prototype.readUIntBE=function(l,d,y){l=l>>>0,d=d>>>0,y||ft(l,d,this.length);let b=this[l+--d],S=1;for(;d>0&&(S*=256);)b+=this[l+--d]*S;return b},c.prototype.readUint8=c.prototype.readUInt8=function(l,d){return l=l>>>0,d||ft(l,1,this.length),this[l]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(l,d){return l=l>>>0,d||ft(l,2,this.length),this[l]|this[l+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(l,d){return l=l>>>0,d||ft(l,2,this.length),this[l]<<8|this[l+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(l,d){return l=l>>>0,d||ft(l,4,this.length),(this[l]|this[l+1]<<8|this[l+2]<<16)+this[l+3]*16777216},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(l,d){return l=l>>>0,d||ft(l,4,this.length),this[l]*16777216+(this[l+1]<<16|this[l+2]<<8|this[l+3])},c.prototype.readBigUInt64LE=Ot(function(l){l=l>>>0,ue(l,"offset");const d=this[l],y=this[l+7];(d===void 0||y===void 0)&&Fe(l,this.length-8);const b=d+this[++l]*2**8+this[++l]*2**16+this[++l]*2**24,S=this[++l]+this[++l]*2**8+this[++l]*2**16+y*2**24;return BigInt(b)+(BigInt(S)<<BigInt(32))}),c.prototype.readBigUInt64BE=Ot(function(l){l=l>>>0,ue(l,"offset");const d=this[l],y=this[l+7];(d===void 0||y===void 0)&&Fe(l,this.length-8);const b=d*2**24+this[++l]*2**16+this[++l]*2**8+this[++l],S=this[++l]*2**24+this[++l]*2**16+this[++l]*2**8+y;return(BigInt(b)<<BigInt(32))+BigInt(S)}),c.prototype.readIntLE=function(l,d,y){l=l>>>0,d=d>>>0,y||ft(l,d,this.length);let b=this[l],S=1,A=0;for(;++A<d&&(S*=256);)b+=this[l+A]*S;return S*=128,b>=S&&(b-=Math.pow(2,8*d)),b},c.prototype.readIntBE=function(l,d,y){l=l>>>0,d=d>>>0,y||ft(l,d,this.length);let b=d,S=1,A=this[l+--b];for(;b>0&&(S*=256);)A+=this[l+--b]*S;return S*=128,A>=S&&(A-=Math.pow(2,8*d)),A},c.prototype.readInt8=function(l,d){return l=l>>>0,d||ft(l,1,this.length),this[l]&128?(255-this[l]+1)*-1:this[l]},c.prototype.readInt16LE=function(l,d){l=l>>>0,d||ft(l,2,this.length);const y=this[l]|this[l+1]<<8;return y&32768?y|4294901760:y},c.prototype.readInt16BE=function(l,d){l=l>>>0,d||ft(l,2,this.length);const y=this[l+1]|this[l]<<8;return y&32768?y|4294901760:y},c.prototype.readInt32LE=function(l,d){return l=l>>>0,d||ft(l,4,this.length),this[l]|this[l+1]<<8|this[l+2]<<16|this[l+3]<<24},c.prototype.readInt32BE=function(l,d){return l=l>>>0,d||ft(l,4,this.length),this[l]<<24|this[l+1]<<16|this[l+2]<<8|this[l+3]},c.prototype.readBigInt64LE=Ot(function(l){l=l>>>0,ue(l,"offset");const d=this[l],y=this[l+7];(d===void 0||y===void 0)&&Fe(l,this.length-8);const b=this[l+4]+this[l+5]*2**8+this[l+6]*2**16+(y<<24);return(BigInt(b)<<BigInt(32))+BigInt(d+this[++l]*2**8+this[++l]*2**16+this[++l]*2**24)}),c.prototype.readBigInt64BE=Ot(function(l){l=l>>>0,ue(l,"offset");const d=this[l],y=this[l+7];(d===void 0||y===void 0)&&Fe(l,this.length-8);const b=(d<<24)+this[++l]*2**16+this[++l]*2**8+this[++l];return(BigInt(b)<<BigInt(32))+BigInt(this[++l]*2**24+this[++l]*2**16+this[++l]*2**8+y)}),c.prototype.readFloatLE=function(l,d){return l=l>>>0,d||ft(l,4,this.length),n.read(this,l,!0,23,4)},c.prototype.readFloatBE=function(l,d){return l=l>>>0,d||ft(l,4,this.length),n.read(this,l,!1,23,4)},c.prototype.readDoubleLE=function(l,d){return l=l>>>0,d||ft(l,8,this.length),n.read(this,l,!0,52,8)},c.prototype.readDoubleBE=function(l,d){return l=l>>>0,d||ft(l,8,this.length),n.read(this,l,!1,52,8)};function _t(p,l,d,y,b,S){if(!c.isBuffer(p))throw new TypeError('"buffer" argument must be a Buffer instance');if(l>b||l<S)throw new RangeError('"value" argument is out of bounds');if(d+y>p.length)throw new RangeError("Index out of range")}c.prototype.writeUintLE=c.prototype.writeUIntLE=function(l,d,y,b){if(l=+l,d=d>>>0,y=y>>>0,!b){const z=Math.pow(2,8*y)-1;_t(this,l,d,y,z,0)}let S=1,A=0;for(this[d]=l&255;++A<y&&(S*=256);)this[d+A]=l/S&255;return d+y},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(l,d,y,b){if(l=+l,d=d>>>0,y=y>>>0,!b){const z=Math.pow(2,8*y)-1;_t(this,l,d,y,z,0)}let S=y-1,A=1;for(this[d+S]=l&255;--S>=0&&(A*=256);)this[d+S]=l/A&255;return d+y},c.prototype.writeUint8=c.prototype.writeUInt8=function(l,d,y){return l=+l,d=d>>>0,y||_t(this,l,d,1,255,0),this[d]=l&255,d+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(l,d,y){return l=+l,d=d>>>0,y||_t(this,l,d,2,65535,0),this[d]=l&255,this[d+1]=l>>>8,d+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(l,d,y){return l=+l,d=d>>>0,y||_t(this,l,d,2,65535,0),this[d]=l>>>8,this[d+1]=l&255,d+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(l,d,y){return l=+l,d=d>>>0,y||_t(this,l,d,4,4294967295,0),this[d+3]=l>>>24,this[d+2]=l>>>16,this[d+1]=l>>>8,this[d]=l&255,d+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(l,d,y){return l=+l,d=d>>>0,y||_t(this,l,d,4,4294967295,0),this[d]=l>>>24,this[d+1]=l>>>16,this[d+2]=l>>>8,this[d+3]=l&255,d+4};function Oe(p,l,d,y,b){ve(l,y,b,p,d,7);let S=Number(l&BigInt(4294967295));p[d++]=S,S=S>>8,p[d++]=S,S=S>>8,p[d++]=S,S=S>>8,p[d++]=S;let A=Number(l>>BigInt(32)&BigInt(4294967295));return p[d++]=A,A=A>>8,p[d++]=A,A=A>>8,p[d++]=A,A=A>>8,p[d++]=A,d}function ye(p,l,d,y,b){ve(l,y,b,p,d,7);let S=Number(l&BigInt(4294967295));p[d+7]=S,S=S>>8,p[d+6]=S,S=S>>8,p[d+5]=S,S=S>>8,p[d+4]=S;let A=Number(l>>BigInt(32)&BigInt(4294967295));return p[d+3]=A,A=A>>8,p[d+2]=A,A=A>>8,p[d+1]=A,A=A>>8,p[d]=A,d+8}c.prototype.writeBigUInt64LE=Ot(function(l,d=0){return Oe(this,l,d,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeBigUInt64BE=Ot(function(l,d=0){return ye(this,l,d,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeIntLE=function(l,d,y,b){if(l=+l,d=d>>>0,!b){const ct=Math.pow(2,8*y-1);_t(this,l,d,y,ct-1,-ct)}let S=0,A=1,z=0;for(this[d]=l&255;++S<y&&(A*=256);)l<0&&z===0&&this[d+S-1]!==0&&(z=1),this[d+S]=(l/A>>0)-z&255;return d+y},c.prototype.writeIntBE=function(l,d,y,b){if(l=+l,d=d>>>0,!b){const ct=Math.pow(2,8*y-1);_t(this,l,d,y,ct-1,-ct)}let S=y-1,A=1,z=0;for(this[d+S]=l&255;--S>=0&&(A*=256);)l<0&&z===0&&this[d+S+1]!==0&&(z=1),this[d+S]=(l/A>>0)-z&255;return d+y},c.prototype.writeInt8=function(l,d,y){return l=+l,d=d>>>0,y||_t(this,l,d,1,127,-128),l<0&&(l=255+l+1),this[d]=l&255,d+1},c.prototype.writeInt16LE=function(l,d,y){return l=+l,d=d>>>0,y||_t(this,l,d,2,32767,-32768),this[d]=l&255,this[d+1]=l>>>8,d+2},c.prototype.writeInt16BE=function(l,d,y){return l=+l,d=d>>>0,y||_t(this,l,d,2,32767,-32768),this[d]=l>>>8,this[d+1]=l&255,d+2},c.prototype.writeInt32LE=function(l,d,y){return l=+l,d=d>>>0,y||_t(this,l,d,4,2147483647,-2147483648),this[d]=l&255,this[d+1]=l>>>8,this[d+2]=l>>>16,this[d+3]=l>>>24,d+4},c.prototype.writeInt32BE=function(l,d,y){return l=+l,d=d>>>0,y||_t(this,l,d,4,2147483647,-2147483648),l<0&&(l=4294967295+l+1),this[d]=l>>>24,this[d+1]=l>>>16,this[d+2]=l>>>8,this[d+3]=l&255,d+4},c.prototype.writeBigInt64LE=Ot(function(l,d=0){return Oe(this,l,d,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeBigInt64BE=Ot(function(l,d=0){return ye(this,l,d,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function fn(p,l,d,y,b,S){if(d+y>p.length)throw new RangeError("Index out of range");if(d<0)throw new RangeError("Index out of range")}function nr(p,l,d,y,b){return l=+l,d=d>>>0,b||fn(p,l,d,4),n.write(p,l,d,y,23,4),d+4}c.prototype.writeFloatLE=function(l,d,y){return nr(this,l,d,!0,y)},c.prototype.writeFloatBE=function(l,d,y){return nr(this,l,d,!1,y)};function pn(p,l,d,y,b){return l=+l,d=d>>>0,b||fn(p,l,d,8),n.write(p,l,d,y,52,8),d+8}c.prototype.writeDoubleLE=function(l,d,y){return pn(this,l,d,!0,y)},c.prototype.writeDoubleBE=function(l,d,y){return pn(this,l,d,!1,y)},c.prototype.copy=function(l,d,y,b){if(!c.isBuffer(l))throw new TypeError("argument should be a Buffer");if(y||(y=0),!b&&b!==0&&(b=this.length),d>=l.length&&(d=l.length),d||(d=0),b>0&&b<y&&(b=y),b===y||l.length===0||this.length===0)return 0;if(d<0)throw new RangeError("targetStart out of bounds");if(y<0||y>=this.length)throw new RangeError("Index out of range");if(b<0)throw new RangeError("sourceEnd out of bounds");b>this.length&&(b=this.length),l.length-d<b-y&&(b=l.length-d+y);const S=b-y;return this===l&&typeof o.prototype.copyWithin=="function"?this.copyWithin(d,y,b):o.prototype.set.call(l,this.subarray(y,b),d),S},c.prototype.fill=function(l,d,y,b){if(typeof l=="string"){if(typeof d=="string"?(b=d,d=0,y=this.length):typeof y=="string"&&(b=y,y=this.length),b!==void 0&&typeof b!="string")throw new TypeError("encoding must be a string");if(typeof b=="string"&&!c.isEncoding(b))throw new TypeError("Unknown encoding: "+b);if(l.length===1){const A=l.charCodeAt(0);(b==="utf8"&&A<128||b==="latin1")&&(l=A)}}else typeof l=="number"?l=l&255:typeof l=="boolean"&&(l=Number(l));if(d<0||this.length<d||this.length<y)throw new RangeError("Out of range index");if(y<=d)return this;d=d>>>0,y=y===void 0?this.length:y>>>0,l||(l=0);let S;if(typeof l=="number")for(S=d;S<y;++S)this[S]=l;else{const A=c.isBuffer(l)?l:c.from(l,b),z=A.length;if(z===0)throw new TypeError('The value "'+l+'" is invalid for argument "value"');for(S=0;S<y-d;++S)this[S+d]=A[S%z]}return this};const we={};function mn(p,l,d){we[p]=class extends d{constructor(){super(),Object.defineProperty(this,"message",{value:l.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${p}]`,this.stack,delete this.name}get code(){return p}set code(b){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:b,writable:!0})}toString(){return`${this.name} [${p}]: ${this.message}`}}}mn("ERR_BUFFER_OUT_OF_BOUNDS",function(p){return p?`${p} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),mn("ERR_INVALID_ARG_TYPE",function(p,l){return`The "${p}" argument must be of type number. Received type ${typeof l}`},TypeError),mn("ERR_OUT_OF_RANGE",function(p,l,d){let y=`The value of "${p}" is out of range.`,b=d;return Number.isInteger(d)&&Math.abs(d)>2**32?b=ri(String(d)):typeof d=="bigint"&&(b=String(d),(d>BigInt(2)**BigInt(32)||d<-(BigInt(2)**BigInt(32)))&&(b=ri(b)),b+="n"),y+=` It must be ${l}. Received ${b}`,y},RangeError);function ri(p){let l="",d=p.length;const y=p[0]==="-"?1:0;for(;d>=y+4;d-=3)l=`_${p.slice(d-3,d)}${l}`;return`${p.slice(0,d)}${l}`}function Bs(p,l,d){ue(l,"offset"),(p[l]===void 0||p[l+d]===void 0)&&Fe(l,p.length-(d+1))}function ve(p,l,d,y,b,S){if(p>d||p<l){const A=typeof l=="bigint"?"n":"";let z;throw l===0||l===BigInt(0)?z=`>= 0${A} and < 2${A} ** ${(S+1)*8}${A}`:z=`>= -(2${A} ** ${(S+1)*8-1}${A}) and < 2 ** ${(S+1)*8-1}${A}`,new we.ERR_OUT_OF_RANGE("value",z,p)}Bs(y,b,S)}function ue(p,l){if(typeof p!="number")throw new we.ERR_INVALID_ARG_TYPE(l,"number",p)}function Fe(p,l,d){throw Math.floor(p)!==p?(ue(p,d),new we.ERR_OUT_OF_RANGE("offset","an integer",p)):l<0?new we.ERR_BUFFER_OUT_OF_BOUNDS:new we.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${l}`,p)}const ii=/[^+/0-9A-Za-z-_]/g;function oi(p){if(p=p.split("=")[0],p=p.trim().replace(ii,""),p.length<2)return"";for(;p.length%4!==0;)p=p+"=";return p}function rr(p,l){l=l||1/0;let d;const y=p.length;let b=null;const S=[];for(let A=0;A<y;++A){if(d=p.charCodeAt(A),d>55295&&d<57344){if(!b){if(d>56319){(l-=3)>-1&&S.push(239,191,189);continue}else if(A+1===y){(l-=3)>-1&&S.push(239,191,189);continue}b=d;continue}if(d<56320){(l-=3)>-1&&S.push(239,191,189),b=d;continue}d=(b-55296<<10|d-56320)+65536}else b&&(l-=3)>-1&&S.push(239,191,189);if(b=null,d<128){if((l-=1)<0)break;S.push(d)}else if(d<2048){if((l-=2)<0)break;S.push(d>>6|192,d&63|128)}else if(d<65536){if((l-=3)<0)break;S.push(d>>12|224,d>>6&63|128,d&63|128)}else if(d<1114112){if((l-=4)<0)break;S.push(d>>18|240,d>>12&63|128,d>>6&63|128,d&63|128)}else throw new Error("Invalid code point")}return S}function D(p){const l=[];for(let d=0;d<p.length;++d)l.push(p.charCodeAt(d)&255);return l}function Z(p,l){let d,y,b;const S=[];for(let A=0;A<p.length&&!((l-=2)<0);++A)d=p.charCodeAt(A),y=d>>8,b=d%256,S.push(b),S.push(y);return S}function bt(p){return e.toByteArray(oi(p))}function At(p,l,d,y){let b;for(b=0;b<y&&!(b+d>=l.length||b>=p.length);++b)l[b+d]=p[b];return b}function st(p,l){return p instanceof l||p!=null&&p.constructor!=null&&p.constructor.name!=null&&p.constructor.name===l.name}function de(p){return p!==p}const gn=function(){const p="0123456789abcdef",l=new Array(256);for(let d=0;d<16;++d){const y=d*16;for(let b=0;b<16;++b)l[y+b]=p[d]+p[b]}return l}();function Ot(p){return typeof BigInt>"u"?ir:p}function ir(){throw new Error("BigInt not supported")}})(Hw);const As=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,n)=>n(e,0),Qr=$t.WebSocket||$t.MozWebSocket,mh=!0,tv="arraybuffer",gh=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class ev extends Es{constructor(e){super(e),this.supportsBinary=!e.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const e=this.uri(),n=this.opts.protocols,r=gh?{}:oh(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=mh&&!gh?n?new Qr(e,n):new Qr(e):new Qr(e,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let n=0;n<e.length;n++){const r=e[n],i=n===e.length-1;_s(r,this.supportsBinary,o=>{const s={};try{mh&&this.ws.send(o)}catch{}i&&As(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=uh()),this.supportsBinary||(n.b64=1),this.createUri(e,n)}check(){return!!Qr}}class nv extends Es{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(e=>{const n=Iw(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=e.readable.pipeThrough(n).getReader(),i=Pw();i.readable.pipeTo(e.writable),this.writer=i.writable.getWriter();const o=()=>{r.read().then(({done:a,value:u})=>{a||(this.onPacket(u),o())}).catch(a=>{})};o();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this.writer.write(s).then(()=>this.onOpen())})}))}write(e){this.writable=!1;for(let n=0;n<e.length;n++){const r=e[n],i=n===e.length-1;this.writer.write(r).then(()=>{i&&As(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this.transport)===null||e===void 0||e.close()}}const rv={websocket:ev,webtransport:nv,polling:Ww},iv=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,ov=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Ps(t){if(t.length>2e3)throw"URI too long";const e=t,n=t.indexOf("["),r=t.indexOf("]");n!=-1&&r!=-1&&(t=t.substring(0,n)+t.substring(n,r).replace(/:/g,";")+t.substring(r,t.length));let i=iv.exec(t||""),o={},s=14;for(;s--;)o[ov[s]]=i[s]||"";return n!=-1&&r!=-1&&(o.source=e,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=sv(o,o.path),o.queryKey=av(o,o.query),o}function sv(t,e){const n=/\/{2,9}/g,r=e.replace(n,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&r.splice(0,1),e.slice(-1)=="/"&&r.splice(r.length-1,1),r}function av(t,e){const n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}let yh=class yn extends yt{constructor(e,n={}){super(),this.binaryType=tv,this.writeBuffer=[],e&&typeof e=="object"&&(n=e,e=null),e?(e=Ps(e),n.hostname=e.host,n.secure=e.protocol==="https"||e.protocol==="wss",n.port=e.port,e.query&&(n.query=e.query)):n.host&&(n.hostname=Ps(n.host).host),Xr(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Fw(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(e){const n=Object.assign({},this.opts.query);n.EIO=ih,n.transport=e,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new rv[e](r)}open(){let e;if(this.opts.rememberUpgrade&&yn.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)e="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else e=this.transports[0];this.readyState="opening";try{e=this.createTransport(e)}catch{this.transports.shift(),this.open();return}e.open(),this.setTransport(e)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(e){let n=this.createTransport(e),r=!1;yn.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",f=>{if(!r)if(f.type==="pong"&&f.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;yn.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(c(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,c(),n.close(),n=null)}const s=f=>{const m=new Error("probe error: "+f);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function a(){s("transport closed")}function u(){s("socket closed")}function h(f){n&&f.name!==n.name&&o()}const c=()=>{n.removeListener("open",i),n.removeListener("error",s),n.removeListener("close",a),this.off("close",u),this.off("upgrading",h)};n.once("open",i),n.once("error",s),n.once("close",a),this.once("close",u),this.once("upgrading",h),this.upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onOpen(){if(this.readyState="open",yn.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let e=0;const n=this.upgrades.length;for(;e<n;e++)this.probe(this.upgrades[e])}}onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),this.resetPingTimeout(),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const n=new Error("server error");n.code=e.data,this.onError(n);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this.getWritablePackets();this.transport.send(e),this.prevBufferLen=e.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=Bw(i)),r>0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(e,n,r){return this.sendPacket("message",e,n,r),this}send(e,n,r){return this.sendPacket("message",e,n,r),this}sendPacket(e,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:e,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const e=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),e()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():e()}):this.upgrading?r():e()),this}onError(e){yn.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}onClose(e,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",e,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(e){const n=[];let r=0;const i=e.length;for(;r<i;r++)~this.transports.indexOf(e[r])&&n.push(e[r]);return n}};yh.protocol=ih;function cv(t,e="",n){let r=t;n=n||typeof location<"u"&&location,t==null&&(t=n.protocol+"//"+n.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=n.protocol+t:t=n.host+t),/^(https?|wss?):\/\//.test(t)||(typeof n<"u"?t=n.protocol+"//"+t:t="https://"+t),r=Ps(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const o=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port+e,r.href=r.protocol+"://"+o+(n&&n.port===r.port?"":":"+r.port),r}const lv=typeof ArrayBuffer=="function",uv=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,wh=Object.prototype.toString,dv=typeof Blob=="function"||typeof Blob<"u"&&wh.call(Blob)==="[object BlobConstructor]",hv=typeof File=="function"||typeof File<"u"&&wh.call(File)==="[object FileConstructor]";function Is(t){return lv&&(t instanceof ArrayBuffer||uv(t))||dv&&t instanceof Blob||hv&&t instanceof File}function ti(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let n=0,r=t.length;n<r;n++)if(ti(t[n]))return!0;return!1}if(Is(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return ti(t.toJSON(),!0);for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&ti(t[n]))return!0;return!1}function fv(t){const e=[],n=t.data,r=t;return r.data=Ms(n,e),r.attachments=e.length,{packet:r,buffers:e}}function Ms(t,e){if(!t)return t;if(Is(t)){const n={_placeholder:!0,num:e.length};return e.push(t),n}else if(Array.isArray(t)){const n=new Array(t.length);for(let r=0;r<t.length;r++)n[r]=Ms(t[r],e);return n}else if(typeof t=="object"&&!(t instanceof Date)){const n={};for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=Ms(t[r],e));return n}return t}function pv(t,e){return t.data=Rs(t.data,e),delete t.attachments,t}function Rs(t,e){if(!t)return t;if(t&&t._placeholder===!0){if(typeof t.num=="number"&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}else if(Array.isArray(t))for(let n=0;n<t.length;n++)t[n]=Rs(t[n],e);else if(typeof t=="object")for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(t[n]=Rs(t[n],e));return t}const mv=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],gv=5;var j;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})(j||(j={}));class yv{constructor(e){this.replacer=e}encode(e){return(e.type===j.EVENT||e.type===j.ACK)&&ti(e)?this.encodeAsBinary({type:e.type===j.EVENT?j.BINARY_EVENT:j.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let n=""+e.type;return(e.type===j.BINARY_EVENT||e.type===j.BINARY_ACK)&&(n+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(n+=e.nsp+","),e.id!=null&&(n+=e.id),e.data!=null&&(n+=JSON.stringify(e.data,this.replacer)),n}encodeAsBinary(e){const n=fv(e),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function vh(t){return Object.prototype.toString.call(t)==="[object Object]"}class Ns extends yt{constructor(e){super(),this.reviver=e}add(e){let n;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(e);const r=n.type===j.BINARY_EVENT;r||n.type===j.BINARY_ACK?(n.type=r?j.EVENT:j.ACK,this.reconstructor=new wv(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Is(e)||e.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(e),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let n=0;const r={type:Number(e.charAt(0))};if(j[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===j.BINARY_EVENT||r.type===j.BINARY_ACK){const o=n+1;for(;e.charAt(++n)!=="-"&&n!=e.length;);const s=e.substring(o,n);if(s!=Number(s)||e.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(s)}if(e.charAt(n+1)==="/"){const o=n+1;for(;++n&&!(e.charAt(n)===","||n===e.length););r.nsp=e.substring(o,n)}else r.nsp="/";const i=e.charAt(n+1);if(i!==""&&Number(i)==i){const o=n+1;for(;++n;){const s=e.charAt(n);if(s==null||Number(s)!=s){--n;break}if(n===e.length)break}r.id=Number(e.substring(o,n+1))}if(e.charAt(++n)){const o=this.tryParse(e.substr(n));if(Ns.isPayloadValid(r.type,o))r.data=o;else throw new Error("invalid payload")}return r}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,n){switch(e){case j.CONNECT:return vh(n);case j.DISCONNECT:return n===void 0;case j.CONNECT_ERROR:return typeof n=="string"||vh(n);case j.EVENT:case j.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&mv.indexOf(n[0])===-1);case j.ACK:case j.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class wv{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const n=pv(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const vv=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Ns,Encoder:yv,get PacketType(){return j},protocol:gv},Symbol.toStringTag,{value:"Module"}));function qt(t,e,n){return t.on(e,n),function(){t.off(e,n)}}const _v=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class _h extends yt{constructor(e,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[qt(e,"open",this.onopen.bind(this)),qt(e,"packet",this.onpacket.bind(this)),qt(e,"error",this.onerror.bind(this)),qt(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...n){if(_v.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(n.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const r={type:j.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const s=this.ids++,a=n.pop();this._registerAckCallback(s,a),r.id=s}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(e,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[e]=n;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===e&&this.sendBuffer.splice(a,1);n.call(this,new Error("operation has timed out"))},i),s=(...a)=>{this.io.clearTimeoutFn(o),n.apply(this,a)};s.withError=!0,this.acks[e]=s}emitWithAck(e,...n){return new Promise((r,i)=>{const o=(s,a)=>s?i(s):r(a);o.withError=!0,n.push(o),this.emit(e,...n)})}_addToQueue(e){let n;typeof e[e.length-1]=="function"&&(n=e.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((i,...o)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...o)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!e||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:j.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(r=>String(r.id)===e)){const r=this.acks[e];delete this.acks[e],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case j.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case j.EVENT:case j.BINARY_EVENT:this.onevent(e);break;case j.ACK:case j.BINARY_ACK:this.onack(e);break;case j.DISCONNECT:this.ondisconnect();break;case j.CONNECT_ERROR:this.destroy();const r=new Error(e.data.message);r.data=e.data.data,this.emitReserved("connect_error",r);break}}onevent(e){const n=e.data||[];e.id!=null&&n.push(this.ack(e.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:j.ACK,id:e,data:i}))}}onack(e){const n=this.acks[e.id];typeof n=="function"&&(delete this.acks[e.id],n.withError&&e.data.unshift(null),n.apply(this,e.data))}onconnect(e,n){this.id=e,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:j.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(e===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(e===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,e.data)}}}function dn(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}dn.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=Math.floor(e*10)&1?t+n:t-n}return Math.min(t,this.max)|0},dn.prototype.reset=function(){this.attempts=0},dn.prototype.setMin=function(t){this.ms=t},dn.prototype.setMax=function(t){this.max=t},dn.prototype.setJitter=function(t){this.jitter=t};class Ds extends yt{constructor(e,n){var r;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(n=e,e=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Xr(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new dn({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=e;const i=n.parser||vv;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var n;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(n=this.backoff)===null||n===void 0||n.setMin(e),this)}randomizationFactor(e){var n;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(n=this.backoff)===null||n===void 0||n.setJitter(e),this)}reconnectionDelayMax(e){var n;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(n=this.backoff)===null||n===void 0||n.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new yh(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=qt(n,"open",function(){r.onopen(),e&&e()}),o=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},s=qt(n,"error",o);if(this._timeout!==!1){const a=this._timeout,u=this.setTimeoutFn(()=>{i(),o(new Error("timeout")),n.close()},a);this.opts.autoUnref&&u.unref(),this.subs.push(()=>{this.clearTimeoutFn(u)})}return this.subs.push(i),this.subs.push(s),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(qt(e,"ping",this.onping.bind(this)),qt(e,"data",this.ondata.bind(this)),qt(e,"error",this.onerror.bind(this)),qt(e,"close",this.onclose.bind(this)),qt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(n){this.onclose("parse error",n)}}ondecoded(e){As(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,n){let r=this.nsps[e];return r?this._autoConnect&&!r.active&&r.connect():(r=new _h(this,e,n),this.nsps[e]=r),r}_destroy(e){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(e){const n=this.encoder.encode(e);for(let r=0;r<n.length;r++)this.engine.write(n[r],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(e,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(i=>{i?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",i)):e.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const tr={};function ei(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const n=cv(t,e.path||"/socket.io"),r=n.source,i=n.id,o=n.path,s=tr[i]&&o in tr[i].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||s;let u;return a?u=new Ds(r,e):(tr[i]||(tr[i]=new Ds(r,e)),u=tr[i]),n.query&&!e.query&&(e.query=n.queryKey),u.socket(n.path,e)}Object.assign(ei,{Manager:Ds,Socket:_h,io:ei,connect:ei});function xv(t){const{conversations:e,addMessage:n,isChatOpen:r,incrementUnreadCount:i}=ot.getState(),o={support:!0,content:t.message.content,authorName:t.message.authorName,date:t.message.date,attachments:t.message.attachments,emojis:t.message.emojis},s=e.find(a=>a.threadId===t.threadId);if(s&&Iy(s.messages,o)){mt("Duplicate message detected, skipping:",t.threadId);return}n(t.threadId,o),r||i()}function bv(t){const e=ot.getState().setConversationOpen;e(t.threadId,!1)}function Cv(t){const{setConversationCSMember:e,addMessage:n,tempConversationToThread:r}=ot.getState();r(t.threadId),e(t.threadId,t.csMember),n(t.threadId,$y(t.csMember.displayName))}function Ev(t){const{conversations:e,updateMessage:n}=ot.getState(),r=e.find(o=>o.threadId===t.threadId);if(!r){mt("⚠️ Conversation not found for update:",t.threadId);return}if(!r.messages.some(o=>o.date===t.message.date)){mt("⚠️ Message not found for update:",t.message.date);return}n(t.threadId,t.message.date,{support:!0,content:t.message.content,authorName:t.message.authorName,date:t.message.date,attachments:t.message.attachments,edited:!0,emojis:t.message.emojis})}function Sv(t){const{conversations:e,removeMessage:n}=ot.getState(),r=e.find(o=>o.threadId===t.threadId);if(!r){mt("⚠️ Conversation not found for deletion:",t.threadId);return}if(!r.messages.some(o=>o.date===t.messageDate)){mt("⚠️ Message not found for deletion:",t.messageDate);return}n(t.threadId,t.messageDate)}function kv(t){return new Promise(e=>{const n=ei(Bt.domain,{path:"/socket"});n.on("new-support-message",xv),n.on("updated-support-message",Ev),n.on("deleted-support-message",Sv),n.on("thread-closed",bv),n.on("thread-assigned",Cv),n.on("connect",()=>{n.emit("identify",{jwt:t}),e(n)})})}async function Tv({name:t,email:e}){const n=JSON.stringify({guildId:Bt.app_id,name:t,email:e}),r=new Headers;r.append("Content-Type","application/json");const i={method:"POST",headers:r,body:n},s=await(await fetch(`${Bt.domain}/auth/token`,i)).json();return s.token&&s.token!=="undefined"&&(Ae.set("discord-widget",s.token,{sameSite:"strict",secure:window.location.protocol==="https:"}),ot.getState().setToken(s.token)),s}async function Av(t){const e=new Headers;e.append("Content-Type","application/json"),e.append("Authorization",`Bearer ${t}`);try{const n=await fetch(`${Bt.domain}/conversations/current`,{method:"GET",headers:e});return n.status!==200?null:(await n.json()).currentConversation??null}catch(n){return console.error("Error fetching current conversation",n),null}}async function Pv(t){const e=new Headers;e.append("Content-Type","application/json"),e.append("Authorization",`Bearer ${t}`);try{const n=await fetch(`${Bt.domain}/conversations/past`,{method:"GET",headers:e});return n.status!==200?null:(await n.json()).pastConversations??null}catch(n){return console.error("Error fetching past conversations",n),null}}async function Iv(t){return await kv(t)}async function Mv(t){const{smartMergeCurrentConversation:e,setConversationOpen:n,conversations:r}=ot.getState();try{const i=await Av(t);if(i)mt("✅ Found current conversation:",i.threadId),e(i);else{mt("ℹ️ No current conversation found");const o=r.find(s=>s.status==="open"&&s.threadId!=="TEMP");o&&(mt("ℹ️ Closing stale conversation:",o.threadId),n(o.threadId,!1))}}catch{ot.getState().setNetworkError("Failed to load conversation")}}async function Rv(t){const{pastConversationsLastFetchedAt:e,smartMergePastConversations:n,setLoading:r,setNetworkError:i}=ot.getState(),o=5*60*1e3;if(!e||Date.now()-e>o)try{r(!0);const a=await Pv(t);a&&a.length>0?(mt(`✅ Loaded ${a.length} past conversations`),n(a)):mt("ℹ️ No past conversations found")}catch{i("Failed to load conversation history")}finally{r(!1)}}async function Nv(){const{username:t,email:e,setNetworkError:n,setLoading:r}=ot.getState();try{r(!0),n(null);let i=Ae.get("discord-widget");i?mt("ℹ️ Returning user - JWT found in cookies"):(mt("ℹ️ New user - obtaining JWT token..."),i=(await Tv({name:t,email:e})).token,mt("✅ JWT token obtained")),await Iv(i),await Mv(i),mt("✅ Network initialization complete")}catch(i){n(i instanceof Error?i.message:"Network initialization failed")}finally{r(!1)}}const Dv=()=>{const{conversations:t,setOpenConversationId:e,pastConversationsLastFetchedAt:n}=ot(),r=t.filter(a=>a.status==="open").length;U(()=>{const a=Ae.get("discord-widget");if(!a)return;const u=5*60*1e3;(!n||Date.now()-n>u)&&Rv(a)},[n]);function i(){return r!==0?null:x(ce.button,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},onClick:()=>e("TEMP"),style:{background:"linear-gradient(135deg, #7289DA, #5B6EAB)"},type:"button",className:"flex justify-center items-center w-full h-16 border-t border-gray-200",children:x("div",{className:`flex flex-row items-center transform transition-transform duration-150
106
+ hover:scale-105 active:scale-95`,children:[x("span",{className:"text-sm text-slate-50 pr-3",children:"Send us a new message"}),x(Rg,{color:"#FFFFFF",size:18,strokeWidth:1})]})})}function o(a,u,h){var m,g,v;const c=a.messages[a.messages.length-1],f=a.status==="open";return x("div",{className:`flex flex-row items-center px-3 py-4 hover:bg-gray-200 cursor-pointer ${h?"":"border-b border-gray-200 "}`,onClick:()=>e(a.threadId),children:[x("div",{className:"relative inline-block mr-3",children:[x("img",{className:"inline-block size-[32px] rounded-full",src:((m=a==null?void 0:a.csMember)==null?void 0:m.displayAvatarURL)??"http://placehold.co/250x250"}),((g=a==null?void 0:a.csMember)==null?void 0:g.status)&&x("span",{className:`absolute top-0 end-0 block size-3 rounded-full ring-2 ring-white dark:ring-neutral-900 ${Gd(a.csMember.status,"bg")}`})]}),x("div",{className:"flex flex-1 flex-col",children:[x("p",{className:`text-sm/3 ${f?"font-semibold":""}`,children:(v=a==null?void 0:a.csMember)==null?void 0:v.displayName}),x("p",{className:"text-xs text-gray-500 line-clamp-1",children:c.content})]}),x("div",{className:"ml-2",children:x("p",{className:"text-xs text-gray-500",children:Qu(c.date)})})]},`conversation-${u}`)}function s(){const a=[...t].filter(c=>c.status==="open"),u=[...t].filter(c=>c.status==="closed"),h=c=>c.sort((f,m)=>m.lastMessageDate-f.lastMessageDate).map((f,m)=>f.messages.length?o(f,m,m+1===c.length):null);return x(ce.div,{initial:{opacity:0,x:-30},animate:{opacity:1,x:0},transition:{duration:.3,ease:"easeOut"},className:"flex flex-col flex-1 p-2 overflow-y-auto",children:[a.length>0&&x("div",{className:"mb-2",children:[x("span",{className:"text-sm",children:"Current conversation"}),h(a)]}),u.length>0&&x(J,{children:[x("span",{className:"text-sm",children:"Closed messages"}),h(u)]})]})}return x("div",{className:"flex flex-col flex-1 overflow-auto",children:[s(),i()]})},xh=({IconComponent:t,onClick:e})=>x("button",{onClick:e,className:`flex mr-2 items-center justify-center w-8 h-8
178
107
  transform transition-transform duration-150
179
- hover:scale-110 active:scale-95`,children:T(t,{})}),s6=({size:t})=>T("svg",{xmlns:"http://www.w3.org/2000/svg",width:t||26,height:t||26,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-x",children:[T("path",{d:"M18 6 6 18"}),T("path",{d:"m6 6 12 12"})]}),a6=({size:t})=>T("svg",{xmlns:"http://www.w3.org/2000/svg",width:t||24,height:t||24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-chevron-left",children:T("path",{d:"m15 18-6-6 6-6"})}),gm={title:"Hi there 👋",subtitle:"We typically reply within a few minutes"},c6=()=>{var h,m,y,w,_,P;const{setChatOpen:t,setOpenConversationId:e,guildSettings:n,conversations:r,openConversationId:i}=Nt(),o=r.find(x=>x.status==="open"),s=!!i,a=r.length===1&&r[0].status==="closed",l=r.length>1,d=s&&(a||l),c=i&&(o!=null&&o.csMember)&&((h=o==null?void 0:o.csMember)==null?void 0:h.displayName)!=="Customer support"?{title:(m=o==null?void 0:o.csMember)==null?void 0:m.displayName,subtitle:(y=o==null?void 0:o.csMember)!=null&&y.status?y_((w=o==null?void 0:o.csMember)==null?void 0:w.status):null,avatar:(_=o==null?void 0:o.csMember)==null?void 0:_.displayAvatarURL,status:(P=o==null?void 0:o.csMember)==null?void 0:P.status}:{title:(n==null?void 0:n.header_title)??gm.title,subtitle:(n==null?void 0:n.header_subtitle)??gm.subtitle,avatar:(n==null?void 0:n.iconURL)||"https://i.imgur.com/ecjl5HR.png"};return T("div",{style:{background:"linear-gradient(135deg, #7289DA, #5B6EAB)",boxShadow:"0 4px 4px rgba(0, 0, 0, 0.1)"},className:"flex flex-row items-center py-5 px-4 text-white",children:[d&&T(ym,{onClick:()=>e(null),IconComponent:a6}),T("div",{className:"relative inline-block mr-3",children:[T("img",{className:"inline-block w-[40px] rounded-full",src:c.avatar}),c.status&&T("span",{className:`absolute top-0 end-0 block size-3.5 rounded-full ring-2 ring-white dark:ring-neutral-900 ${Ih(c.status,"bg")}`})]}),T("div",{className:"flex-1 flex-col",children:[T("p",{className:"text-lg/5 font-regular",children:c.title}),c.subtitle&&T("p",{className:"flex-1 text-xs/4 line-clamp-2",children:c.subtitle})]}),T(ym,{onClick:()=>t(!1),IconComponent:s6})]})};function l6(){const[t,e]=gt({width:null,height:null});return Re(()=>{const n=()=>{e({width:window.innerWidth,height:window.innerHeight})};return n(),window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)}},[]),t}const u6=()=>{const t=l6();return!t.width||!t.height?!1:t.width>t.height?t.width<=Id||t.height<=A1:t.width<=Id},f6=()=>{const{openConversationId:t,conversations:e,isChatVisible:n}=Nt(),r=u6(),i=!t&&e.length,o={position:"fixed",inset:"0px",width:"100%",height:"100%",zIndex:9999,transformOrigin:"bottom right"},s={position:"fixed",bottom:"110px",right:"30px",width:"400px",height:"700px",maxWidth:"calc(100% - 60px)",maxHeight:"calc(100% - 124px)",zIndex:9999,transformOrigin:"bottom right"};return T(cs,{children:n&&T(De.div,{initial:{opacity:0,scale:.8,y:r?0:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.8,y:r?0:20},transition:r?{duration:.2,ease:"easeInOut"}:{type:"spring",stiffness:500,damping:28,mass:.8},style:r?o:s,children:T("div",{className:`flex flex-col h-full bg-white shadow-xl overflow-hidden ${r?"":"rounded-xl"}`,children:[T(c6,{}),i?T(o6,{}):T(m_,{})]})},"chatbox")})};async function d6(){const{setGuildSettings:t,guildSettings:e}=Nt.getState();if(e.lastUpdate)return;const n=new Headers;n.append("Content-Type","application/json");try{const i=await(await fetch(`${le.domain}/guildSettings/${le.app_id}`,{method:"GET",headers:n})).json();t(i)}catch{}}async function h6(){const t=new Headers;t.append("Content-Type","application/json");try{return(await(await fetch(`${le.domain}/guildSettings/status/${le.app_id}`,{method:"GET",headers:t})).json()).active}catch{return!1}}function p6(t,e){const n=it(document.title),r=it(null),i=it(!1);ut(()=>{n.current||(n.current=document.title)},[]),ut(()=>{if(r.current!==null&&(clearInterval(r.current),r.current=null),e&&t>0){const o=()=>{const s=t>1?"s":"";return`(${t}) New message${s} - ${n.current}`};document.title=o(),i.current=!0,r.current=window.setInterval(()=>{i.current?(document.title=n.current,i.current=!1):(document.title=o(),i.current=!0)},5e3)}else document.title=n.current,i.current=!1;return()=>{r.current!==null&&(clearInterval(r.current),r.current=null),document.title=n.current}},[t,e]),ut(()=>{if(e&&t>0&&i.current){const o=t>1?"s":"";document.title=`(${t}) New message${o} - ${n.current}`}},[t,e])}function m6(){const{isChatOpen:t,setChatVisible:e,toggleChatOpen:n,isNetworkInitialized:r,setNetworkInitialized:i,username:o,email:s,addMessage:a,conversations:l,_REHYDRATED_:d,networkError:c,isLoading:h,unreadCount:m,markMessagesAsReadWithSync:y,syncUnreadCountFromServer:w,initializeUnreadState:_}=Nt(),[P,x]=gt(!1);p6(m,m>0&&!t),ut(()=>{t&&m>0&&y()},[t,m,y]),ut(()=>{(async()=>{const O=await h6();x(O)})()},[]),ut(()=>{_()},[_]);const v=kt(()=>(!o||!s)&&!l.filter(j=>j.messages.filter(B=>B.customRenderer===Mn.IntroduceYourself)).length?(a("TEMP",N1),!0):!1,[o,s,a,l]);return ut(()=>{d&&(async()=>(await d6(),!v()&&(o||s)&&!r&&(i6(),i(!0),w())))()},[r,i,v,w,o,s,d]),ut(()=>{if(t)e(!0);else{const O=setTimeout(()=>e(!1),300);return()=>clearTimeout(O)}},[t,e]),P?T(Pt,{children:[T(Iw,{onClick:()=>n(),isOpen:t,unreadCount:m}),T(f6,{}),T(()=>c?T("div",{style:{position:"fixed",bottom:"90px",right:"20px",backgroundColor:"#EF4444",color:"white",padding:"12px 16px",borderRadius:"8px",boxShadow:"0 4px 6px rgba(0, 0, 0, 0.1)",zIndex:9999,maxWidth:"300px",fontSize:"14px"},children:[T("strong",{children:"Connection Error"}),T("p",{style:{margin:"4px 0 0 0",fontSize:"12px"},children:c})]}):null,{}),T(()=>!h||!t?null:T("div",{style:{position:"fixed",bottom:"90px",right:"20px",backgroundColor:"#7289DA",color:"white",padding:"8px 12px",borderRadius:"8px",boxShadow:"0 4px 6px rgba(0, 0, 0, 0.1)",zIndex:9999,fontSize:"12px"},children:"Loading..."}),{}),T("div",{id:"deskcord-lightbox-portal",style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:2147482e3,pointerEvents:"none"}})]}):null}const y6=()=>{const t=it(null),[e,n]=gt(null),[r,i]=gt(null);return ut(()=>{if(!t.current)return;let o=t.current.shadowRoot;o||(o=t.current.attachShadow({mode:"open"}));let s=o.querySelector("#deskcord-shadow-container");s||(s=document.createElement("div"),s.id="deskcord-shadow-container",s.style.cssText=`
108
+ hover:scale-110 active:scale-95`,children:x(t,{})}),Bv=({size:t})=>x("svg",{xmlns:"http://www.w3.org/2000/svg",width:t||26,height:t||26,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-x",children:[x("path",{d:"M18 6 6 18"}),x("path",{d:"m6 6 12 12"})]}),Lv=({size:t})=>x("svg",{xmlns:"http://www.w3.org/2000/svg",width:t||24,height:t||24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-chevron-left",children:x("path",{d:"m15 18-6-6 6-6"})}),bh={title:"Hi there 👋",subtitle:"We typically reply within a few minutes"},Ov=()=>{var f,m,g,v,w,E;const{setChatOpen:t,setOpenConversationId:e,guildSettings:n,conversations:r,openConversationId:i}=ot(),o=r.find(_=>_.status==="open"),s=!!i,a=r.length===1&&r[0].status==="closed",u=r.length>1,h=s&&(a||u),c=i&&(o!=null&&o.csMember)&&((f=o==null?void 0:o.csMember)==null?void 0:f.displayName)!=="Customer support"?{title:(m=o==null?void 0:o.csMember)==null?void 0:m.displayName,subtitle:(g=o==null?void 0:o.csMember)!=null&&g.status?bw((v=o==null?void 0:o.csMember)==null?void 0:v.status):null,avatar:(w=o==null?void 0:o.csMember)==null?void 0:w.displayAvatarURL,status:(E=o==null?void 0:o.csMember)==null?void 0:E.status}:{title:(n==null?void 0:n.header_title)??bh.title,subtitle:(n==null?void 0:n.header_subtitle)??bh.subtitle,avatar:(n==null?void 0:n.iconURL)||"https://i.imgur.com/ecjl5HR.png"};return x("div",{style:{background:"linear-gradient(135deg, #7289DA, #5B6EAB)",boxShadow:"0 4px 4px rgba(0, 0, 0, 0.1)"},className:"flex flex-row items-center py-5 px-4 text-white",children:[h&&x(xh,{onClick:()=>e(null),IconComponent:Lv}),x("div",{className:"relative inline-block mr-3",children:[x("img",{className:"inline-block w-[40px] rounded-full",src:c.avatar}),c.status&&x("span",{className:`absolute top-0 end-0 block size-3.5 rounded-full ring-2 ring-white dark:ring-neutral-900 ${Gd(c.status,"bg")}`})]}),x("div",{className:"flex-1 flex-col",children:[x("p",{className:"text-lg/5 font-regular",children:c.title}),c.subtitle&&x("p",{className:"flex-1 text-xs/4 line-clamp-2",children:c.subtitle})]}),x(xh,{onClick:()=>t(!1),IconComponent:Bv})]})};function Fv(){const[t,e]=H({width:null,height:null});return oe(()=>{const n=()=>{e({width:window.innerWidth,height:window.innerHeight})};return n(),window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)}},[]),t}const Vv=()=>{const t=Fv();return!t.width||!t.height?!1:t.width>t.height?t.width<=Gu||t.height<=My:t.width<=Gu},Uv=()=>{const{openConversationId:t,conversations:e,isChatVisible:n}=ot(),r=Vv(),i=!t&&e.length,o={position:"fixed",inset:"0px",width:"100%",height:"100%",zIndex:9999,transformOrigin:"bottom right"},s={position:"fixed",bottom:"110px",right:"30px",width:"400px",height:"700px",maxWidth:"calc(100% - 60px)",maxHeight:"calc(100% - 124px)",zIndex:9999,transformOrigin:"bottom right"};return x(wo,{children:n&&x(ce.div,{initial:{opacity:0,scale:.8,y:r?0:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.8,y:r?0:20},transition:r?{duration:.2,ease:"easeInOut"}:{type:"spring",stiffness:500,damping:28,mass:.8},style:r?o:s,children:x("div",{className:`flex flex-col h-full bg-white shadow-xl overflow-hidden ${r?"":"rounded-xl"}`,children:[x(Ov,{}),i?x(Dv,{}):x(xw,{})]})},"chatbox")})};async function $v(){const{setGuildSettings:t,guildSettings:e}=ot.getState();if(e.lastUpdate)return;const n=new Headers;n.append("Content-Type","application/json");try{const i=await(await fetch(`${Bt.domain}/guildSettings/${Bt.app_id}`,{method:"GET",headers:n})).json();t(i)}catch{}}async function zv(){const t=new Headers;t.append("Content-Type","application/json");try{return(await(await fetch(`${Bt.domain}/guildSettings/status/${Bt.app_id}`,{method:"GET",headers:t})).json()).active}catch{return!1}}function jv(t,e){const n=F(document.title),r=F(null),i=F(!1);U(()=>{n.current||(n.current=document.title)},[]),U(()=>{if(r.current!==null&&(clearInterval(r.current),r.current=null),e&&t>0){const o=()=>{const s=t>1?"s":"";return`(${t}) New message${s} - ${n.current}`};document.title=o(),i.current=!0,r.current=window.setInterval(()=>{i.current?(document.title=n.current,i.current=!1):(document.title=o(),i.current=!0)},5e3)}else document.title=n.current,i.current=!1;return()=>{r.current!==null&&(clearInterval(r.current),r.current=null),document.title=n.current}},[t,e]),U(()=>{if(e&&t>0&&i.current){const o=t>1?"s":"";document.title=`(${t}) New message${o} - ${n.current}`}},[t,e])}function Wv(){const{isChatOpen:t,setChatVisible:e,toggleChatOpen:n,isNetworkInitialized:r,setNetworkInitialized:i,username:o,email:s,addMessage:a,conversations:u,_REHYDRATED_:h,networkError:c,isLoading:f,unreadCount:m,markMessagesAsReadWithSync:g,syncUnreadCountFromServer:v,initializeUnreadState:w}=ot(),[E,_]=H(!1);jv(m,m>0&&!t),U(()=>{t&&m>0&&g()},[t,m,g]),U(()=>{(async()=>{const k=await zv();_(k)})()},[]),U(()=>{w()},[w]);const C=Q(()=>(!o||!s)&&!u.filter(R=>R.messages.filter(N=>N.customRenderer===an.IntroduceYourself)).length?(a("TEMP",Uy),!0):!1,[o,s,a,u]);return U(()=>{h&&(async()=>(await $v(),!C()&&(o||s)&&!r&&(Nv(),i(!0),v())))()},[r,i,C,v,o,s,h]),U(()=>{if(t)e(!0);else{const k=setTimeout(()=>e(!1),300);return()=>clearTimeout(k)}},[t,e]),E?x(J,{children:[x(Og,{onClick:()=>n(),isOpen:t,unreadCount:m}),x(Uv,{}),x(()=>c?x("div",{style:{position:"fixed",bottom:"90px",right:"20px",backgroundColor:"#EF4444",color:"white",padding:"12px 16px",borderRadius:"8px",boxShadow:"0 4px 6px rgba(0, 0, 0, 0.1)",zIndex:9999,maxWidth:"300px",fontSize:"14px"},children:[x("strong",{children:"Connection Error"}),x("p",{style:{margin:"4px 0 0 0",fontSize:"12px"},children:c})]}):null,{}),x(()=>!f||!t?null:x("div",{style:{position:"fixed",bottom:"90px",right:"20px",backgroundColor:"#7289DA",color:"white",padding:"8px 12px",borderRadius:"8px",boxShadow:"0 4px 6px rgba(0, 0, 0, 0.1)",zIndex:9999,fontSize:"12px"},children:"Loading..."}),{}),x("div",{id:"deskcord-lightbox-portal",style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:2147482e3,pointerEvents:"none"}})]}):null}const Hv=()=>{const t=F(null),[e,n]=H(null),[r,i]=H(null);return U(()=>{if(!t.current)return;let o=t.current.shadowRoot;o||(o=t.current.attachShadow({mode:"open"}));let s=o.querySelector("#deskcord-shadow-container");s||(s=document.createElement("div"),s.id="deskcord-shadow-container",s.style.cssText=`
180
109
  all: initial;
181
110
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
182
111
  font-size: 16px;
183
112
  line-height: 1.5;
184
113
  color: #000;
185
114
  box-sizing: border-box;
186
- `,o.appendChild(s));let a=o.querySelector("#deskcord-tailwind-styles");a||(a=document.createElement("style"),a.id="deskcord-tailwind-styles",a.textContent=zm,o.insertBefore(a,o.firstChild));let l=o.querySelector("#deskcord-lightbox-styles");l||(l=document.createElement("style"),l.id="deskcord-lightbox-styles",l.textContent=Wm,o.insertBefore(l,a.nextSibling));let d=o.querySelector("#deskcord-reset-styles");return d||(d=document.createElement("style"),d.id="deskcord-reset-styles",d.textContent=`
115
+ `,o.appendChild(s));let a=o.querySelector("#deskcord-tailwind-styles");a||(a=document.createElement("style"),a.id="deskcord-tailwind-styles",a.textContent=Yh,o.insertBefore(a,o.firstChild));let u=o.querySelector("#deskcord-lightbox-styles");u||(u=document.createElement("style"),u.id="deskcord-lightbox-styles",u.textContent=Gh,o.insertBefore(u,a.nextSibling));let h=o.querySelector("#deskcord-reset-styles");return h||(h=document.createElement("style"),h.id="deskcord-reset-styles",h.textContent=`
187
116
  /* Reset styles to ensure isolation from parent page */
188
117
  :host {
189
118
  all: initial;
@@ -195,6 +124,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
195
124
  height: 0;
196
125
  z-index: 2147483647;
197
126
  pointer-events: none;
127
+ overflow-x: hidden;
198
128
  }
199
129
 
200
130
  /* Allow pointer events on actual widget elements */
@@ -213,4 +143,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
213
143
  -webkit-font-smoothing: antialiased;
214
144
  -moz-osx-font-smoothing: grayscale;
215
145
  }
216
- `,o.insertBefore(d,o.firstChild)),n(o),i(s),()=>{}},[]),T(Pt,{children:[T("div",{ref:t,id:"deskcord-shadow-host",style:{position:"fixed",top:0,left:0,width:0,height:0,overflow:"visible",zIndex:2147483647,pointerEvents:"none"}}),e&&r&&gn.createPortal(T(g6,{value:e,children:T(m6,{})}),r)]})},vm=gn.createContext(null),g6=({value:t,children:e})=>T(vm.Provider,{value:t,children:e});window.deskcord?window.deskcord.openChatbox=()=>{Nt.getState().setChatOpen(!0)}:window.deskcord={settings:{app_id:""},openChatbox:()=>{}};let Dr=document.getElementById("deskcord-root");Dr||(Dr=document.createElement("div"),Dr.id="deskcord-root",document.body.appendChild(Dr)),gn.render(T(gn.StrictMode,{children:T(y6,{})}),Dr)})();
146
+ `,o.insertBefore(h,o.firstChild)),n(o),i(s),()=>{}},[]),x(J,{children:[x("div",{ref:t,id:"deskcord-shadow-host",style:{position:"fixed",top:0,left:0,width:0,height:0,overflow:"visible",zIndex:2147483647,pointerEvents:"none"}}),e&&r&&We.createPortal(x(Kv,{value:e,children:x(Wv,{})}),r)]})},Ch=We.createContext(null),Kv=({value:t,children:e})=>x(Ch.Provider,{value:t,children:e});window.deskcord?window.deskcord.openChatbox=()=>{ot.getState().setChatOpen(!0)}:window.deskcord={settings:{app_id:""},openChatbox:()=>{}};let er=document.getElementById("deskcord-root");er||(er=document.createElement("div"),er.id="deskcord-root",document.body.appendChild(er)),We.render(x(We.StrictMode,{children:x(Hv,{})}),er)})();