deskcord 0.2.2 → 0.2.3

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,4 +1,4 @@
1
- (function(){"use strict";var Vn,ut,hc,Ue,pc,mc,qi,yc,Hi,Gi,Ki,gc,$n={},vc=[],cm=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Or=Array.isArray;function Pe(t,e){for(var n in e)t[n]=e[n];return t}function Yi(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function nt(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?Vn.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 Un(t,s,r,i,null)}function Un(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??++hc,__i:-1,__u:0};return i==null&&ut.vnode!=null&&ut.vnode(o),o}function bc(){return{current:null}}function Ot(t){return t.children}function oe(t,e){this.props=t,this.context=e}function cn(t,e){if(e==null)return t.__?cn(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"?cn(t):null}function wc(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 wc(t)}}function Xi(t){(!t.__d&&(t.__d=!0)&&Ue.push(t)&&!Cr.__r++||pc!==ut.debounceRendering)&&((pc=ut.debounceRendering)||mc)(Cr)}function Cr(){var t,e,n,r,i,o,s,a;for(Ue.sort(qi);t=Ue.shift();)t.__d&&(e=Ue.length,r=void 0,o=(i=(n=t).__v).__e,s=[],a=[],n.__P&&((r=Pe({},i)).__v=i.__v+1,ut.vnode&&ut.vnode(r),Ji(n.__P,r,i,n.__n,n.__P.namespaceURI,32&i.__u?[o]:null,s,o??cn(i),!!(32&i.__u),a),r.__v=i.__v,r.__.__k[r.__i]=r,Ac(s,r,a),r.__e!=o&&wc(r)),Ue.length>e&&Ue.sort(qi));Cr.__r=0}function _c(t,e,n,r,i,o,s,a,l,d,c){var h,m,y,_,w,k,x=r&&r.__k||vc,v=e.length;for(l=lm(n,e,x,l,v),h=0;h<v;h++)(y=n.__k[h])!=null&&(m=y.__i===-1?$n:x[y.__i]||$n,y.__i=h,k=Ji(t,y,m,i,o,s,a,l,d,c),_=y.__e,y.ref&&m.ref!=y.ref&&(m.ref&&Zi(m.ref,null,y),c.push(y.ref,y.__c||_,y)),w==null&&_!=null&&(w=_),4&y.__u||m.__k===y.__k?l=xc(y,l,t):typeof y.type=="function"&&k!==void 0?l=k:_&&(l=_.nextSibling),y.__u&=-7);return n.__e=w,l}function lm(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?Un(null,s,null,null,null):Or(s)?Un(Ot,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?Un(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=um(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=cn(a)),Tc(a,a));return r}function xc(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=xc(r[i],e,n));return e}t.__e!=e&&(e&&t.type&&!n.contains(e)&&(e=cn(t)),n.insertBefore(t.__e,e||null),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function ke(t,e){return e=e||[],t==null||typeof t=="boolean"||(Or(t)?t.some(function(n){ke(n,e)}):e.push(t)),e}function um(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 Sc(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||cm.test(e)?n:n+"px"}function Ir(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||Sc(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||Sc(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(yc,"$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=Hi,t.addEventListener(e,o?Ki:Gi,o)):t.removeEventListener(e,o?Ki:Gi,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 Ec(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=Hi++;else if(e.t<n.u)return;return n(ut.event?ut.event(e):e)}}}function Ji(t,e,n,r,i,o,s,a,l,d){var c,h,m,y,_,w,k,x,v,S,R,O,B,L,W,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=ut.__b)&&c(e);t:if(typeof Z=="function")try{if(x=e.props,v="prototype"in Z&&Z.prototype.render,S=(c=Z.contextType)&&r[c.__c],R=c?S?S.props.value:c.__:r,n.__c?k=(h=e.__c=n.__c).__=h.__E:(v?e.__c=h=new Z(x,R):(e.__c=h=new oe(x,R),h.constructor=Z,h.render=dm),S&&S.sub(h),h.props=x,h.state||(h.state={}),h.context=R,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=Pe({},h.__s)),Pe(h.__s,Z.getDerivedStateFromProps(x,h.__s))),y=h.props,_=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,R),!h.__e&&(h.shouldComponentUpdate!=null&&h.shouldComponentUpdate(x,h.__s,R)===!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(et){et&&(et.__=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,R),v&&h.componentDidUpdate!=null&&h.__h.push(function(){h.componentDidUpdate(y,_,w)})}if(h.context=R,h.props=x,h.__P=t,h.__e=!1,B=ut.__r,L=0,v){for(h.state=h.__s,h.__d=!1,B&&B(e),c=h.render(h.props,h.state,h.context),W=0;W<h._sb.length;W++)h.__h.push(h._sb[W]);h._sb=[]}else do h.__d=!1,B&&B(e),c=h.render(h.props,h.state,h.context),h.state=h.__s;while(h.__d&&++L<25);h.state=h.__s,h.getChildContext!=null&&(r=Pe(Pe({},r),h.getChildContext())),v&&!m&&h.getSnapshotBeforeUpdate!=null&&(w=h.getSnapshotBeforeUpdate(y,_)),a=_c(t,Or(F=c!=null&&c.type===Ot&&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),k&&(h.__E=h.__=null)}catch(et){if(e.__v=null,l||o!=null)if(et.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--;)Yi(o[Y]);else e.__e=n.__e,e.__k=n.__k;ut.__e(et,e,n)}else o==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):a=e.__e=fm(n.__e,e,n,r,i,o,s,l,d);return(c=ut.diffed)&&c(e),128&e.__u?void 0:a}function Ac(t,e,n){for(var r=0;r<n.length;r++)Zi(n[r],n[++r],n[++r]);ut.__c&&ut.__c(e,t),t.some(function(i){try{t=i.__h,i.__h=[],t.some(function(o){o.call(i)})}catch(o){ut.__e(o,i.__v)}})}function fm(t,e,n,r,i,o,s,a,l){var d,c,h,m,y,_,w,k=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&&(ut.__m&&ut.__m(e,o),a=!1),o=null}if(v===null)k===x||a&&t.data===x||(t.data=x);else{if(o=o&&Vn.call(t.childNodes),k=n.props||$n,!a&&o!=null)for(k={},d=0;d<t.attributes.length;d++)k[(y=t.attributes[d]).name]=y.value;for(d in k)if(y=k[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;Ir(t,d,null,y,i)}}for(d in x)y=x[d],d=="children"?m=y:d=="dangerouslySetInnerHTML"?c=y:d=="value"?_=y:d=="checked"?w=y:a&&typeof y!="function"||k[d]===y||Ir(t,d,y,k[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=""),_c(t,Or(m)?m:[m],e,n,r,v=="foreignObject"?"http://www.w3.org/1999/xhtml":i,o,s,o?o[0]:n.__k&&cn(n,0),a,l),o!=null)for(d=o.length;d--;)Yi(o[d]);a||(d="value",v=="progress"&&_==null?t.removeAttribute("value"):_!==void 0&&(_!==t[d]||v=="progress"&&!_||v=="option"&&_!==k[d])&&Ir(t,d,_,k[d],i),d="checked",w!==void 0&&w!==t[d]&&Ir(t,d,w,k[d],i))}return t}function Zi(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){ut.__e(i,n)}}function Tc(t,e,n){var r,i;if(ut.unmount&&ut.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||Zi(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){ut.__e(o,e)}r.base=r.__P=null}if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&Tc(r[i],e,n||typeof t.type!="function");n||Yi(t.__e),t.__c=t.__=t.__e=void 0}function dm(t,e,n){return this.constructor(t,n)}function zn(t,e,n){var r,i,o,s;e==document&&(e=document.documentElement),ut.__&&ut.__(t,e),i=(r=typeof n=="function")?null:n&&n.__k||e.__k,o=[],s=[],Ji(e,t=(!r&&n||e).__k=nt(Ot,null,[t]),i||$n,$n,e.namespaceURI,!r&&n?[n]:i?null:e.firstChild?Vn.call(e.childNodes):null,o,!r&&n?n:i?i.__e:e.firstChild,r,s),Ac(o,t,s)}function Pc(t,e){zn(t,e,Pc)}function hm(t,e,n){var r,i,o,s,a=Pe({},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?Vn.call(arguments,2):n),Un(t.type,a,r||t.key,i||t.ref,null)}function te(t,e){var n={__c:e="__cC"+gc++,__: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,Xi(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}Vn=vc.slice,ut={__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}},hc=0,oe.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Pe({},this.state),typeof t=="function"&&(t=t(Pe({},n),this.props)),t&&Pe(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),Xi(this))},oe.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Xi(this))},oe.prototype.render=Ot,Ue=[],mc=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,qi=function(t,e){return t.__v.__b-e.__v.__b},Cr.__r=0,yc=/(PointerCapture)$|Capture$/i,Hi=0,Gi=Ec(!1),Ki=Ec(!0),gc=0;var pm=0;function M(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:--pm,__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 ut.vnode&&ut.vnode(d),d}var Oe,Et,Qi,kc,ln=0,Oc=[],Rt=ut,Cc=Rt.__b,Ic=Rt.__r,Rc=Rt.diffed,Mc=Rt.__c,Nc=Rt.unmount,Dc=Rt.__;function ze(t,e){Rt.__h&&Rt.__h(Et,t,ln||e),ln=0;var n=Et.__H||(Et.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function wt(t){return ln=1,Wn(Lc,t)}function Wn(t,e,n){var r=ze(Oe++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):Lc(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=Et,!Et.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};Et.u=!0;var o=Et.shouldComponentUpdate,s=Et.componentWillUpdate;Et.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)},Et.shouldComponentUpdate=i}return r.__N||r.__}function yt(t,e){var n=ze(Oe++,3);!Rt.__s&&no(n.__H,e)&&(n.__=t,n.i=e,Et.__H.__h.push(n))}function Ce(t,e){var n=ze(Oe++,4);!Rt.__s&&no(n.__H,e)&&(n.__=t,n.i=e,Et.__h.push(n))}function ot(t){return ln=5,qt(function(){return{current:t}},[])}function qn(t,e,n){ln=6,Ce(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 qt(t,e){var n=ze(Oe++,7);return no(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function kt(t,e){return ln=8,qt(function(){return t},e)}function jt(t){var e=Et.context[t.__c],n=ze(Oe++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(Et)),e.props.value):t.__}function to(t,e){Rt.useDebugValue&&Rt.useDebugValue(e?e(t):t)}function mm(t){var e=ze(Oe++,10),n=wt();return e.__=t,Et.componentDidCatch||(Et.componentDidCatch=function(r,i){e.__&&e.__(r,i),n[1](r)}),[n[0],function(){n[1](void 0)}]}function un(){var t=ze(Oe++,11);if(!t.__){for(var e=Et.__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 ym(){for(var t;t=Oc.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Rr),t.__H.__h.forEach(eo),t.__H.__h=[]}catch(e){t.__H.__h=[],Rt.__e(e,t.__v)}}Rt.__b=function(t){Et=null,Cc&&Cc(t)},Rt.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),Dc&&Dc(t,e)},Rt.__r=function(t){Ic&&Ic(t),Oe=0;var e=(Et=t.__c).__H;e&&(Qi===Et?(e.__h=[],Et.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(e.__h.forEach(Rr),e.__h.forEach(eo),e.__h=[],Oe=0)),Qi=Et},Rt.diffed=function(t){Rc&&Rc(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Oc.push(e)!==1&&kc===Rt.requestAnimationFrame||((kc=Rt.requestAnimationFrame)||gm)(ym)),e.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),Qi=Et=null},Rt.__c=function(t,e){e.some(function(n){try{n.__h.forEach(Rr),n.__h=n.__h.filter(function(r){return!r.__||eo(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],Rt.__e(r,n.__v)}}),Mc&&Mc(t,e)},Rt.unmount=function(t){Nc&&Nc(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Rr(r)}catch(i){e=i}}),n.__H=void 0,e&&Rt.__e(e,n.__v))};var Bc=typeof requestAnimationFrame=="function";function gm(t){var e,n=function(){clearTimeout(r),Bc&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);Bc&&(e=requestAnimationFrame(n))}function Rr(t){var e=Et,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),Et=e}function eo(t){var e=Et;t.__c=t.__(),Et=e}function no(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}function Lc(t,e){return typeof e=="function"?e(t):e}function Fc(t,e){for(var n in e)t[n]=e[n];return t}function ro(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 io(t,e){var n=e(),r=wt({t:{__:n,u:e}}),i=r[0].t,o=r[1];return Ce(function(){i.__=n,i.u=e,oo(i)&&o({t:i})},[t,n,e]),yt(function(){return oo(i)&&o({t:i}),t(function(){oo(i)&&o({t:i})})},[t]),n}function oo(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 so(t){t()}function ao(t){return t}function co(){return[!1,so]}var Hn=Ce;function Mr(t,e){this.props=t,this.context=e}function jc(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:ro(this.props,i)}function r(i){return this.shouldComponentUpdate=n,nt(t,i)}return r.displayName="Memo("+(t.displayName||t.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Mr.prototype=new oe).isPureReactComponent=!0,Mr.prototype.shouldComponentUpdate=function(t,e){return ro(this.props,t)||ro(this.state,e)};var Vc=ut.__b;ut.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),Vc&&Vc(t)};var vm=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Le(t){function e(n){var r=Fc({},n);return delete r.ref,t(r,n.ref||null)}return e.$$typeof=vm,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var $c=function(t,e){return t==null?null:ke(ke(t).map(e))},lo={map:$c,forEach:$c,count:function(t){return t?ke(t).length:0},only:function(t){var e=ke(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:ke},bm=ut.__e;ut.__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)}bm(t,e,n,r)};var Uc=ut.unmount;function zc(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=Fc({},t)).__c!=null&&(t.__c.__P===n&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map(function(r){return zc(r,e,n)})),t}function Wc(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(r){return Wc(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 Gn(){this.__u=0,this.o=null,this.__b=null}function qc(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function Hc(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 nt(n,o)}return i.displayName="Lazy",i.__f=!0,i}function fn(){this.i=null,this.l=null}ut.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),Uc&&Uc(t)},(Gn.prototype=new oe).__c=function(t,e){var n=e.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var i=qc(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]=Wc(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)},Gn.prototype.componentWillUnmount=function(){this.o=[]},Gn.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]=zc(this.__b,n,r.__O=r.__P)}this.__b=null}var i=e.__a&&nt(Ot,null,t.fallback);return i&&(i.__u&=-33),[nt(Ot,null,e.__a?null:t.children),i]};var Gc=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 wm(t){return this.getChildContext=function(){return t.context},t.children}function _m(t){var e=this,n=t.h;e.componentWillUnmount=function(){zn(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)}}),zn(nt(wm,{context:e.context},t.__v),e.v)}function uo(t,e){var n=nt(_m,{__v:t,h:e});return n.containerInfo=e,n}(fn.prototype=new oe).__a=function(t){var e=this,n=qc(e.__v),r=e.l.get(t);return r[0]++,function(i){var o=function(){e.props.revealOrder?(r.push(i),Gc(e,t,r)):i()};n?n(o):o()}},fn.prototype.render=function(t){this.i=null,this.l=new Map;var e=ke(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},fn.prototype.componentDidUpdate=fn.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,n){Gc(t,n,e)})};var Kc=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,xm=/^(?: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]/,Sm=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Em=/[A-Z0-9]/g,Am=typeof document<"u",Tm=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function Yc(t,e,n){return e.__k==null&&(e.textContent=""),zn(t,e),typeof n=="function"&&n(),t?t.__c:null}function Xc(t,e,n){return Pc(t,e),typeof n=="function"&&n(),t?t.__c:null}oe.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(oe.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var Jc=ut.event;function Pm(){}function km(){return this.cancelBubble}function Om(){return this.defaultPrevented}ut.event=function(t){return Jc&&(t=Jc(t)),t.persist=Pm,t.isPropagationStopped=km,t.isDefaultPrevented=Om,t.nativeEvent=t};var fo,Cm={enumerable:!1,configurable:!0,get:function(){return this.class}},Zc=ut.vnode;ut.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||Am&&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"||Tm(n.type)?l==="onfocus"?s="onfocusin":l==="onblur"?s="onfocusout":Sm.test(s)&&(s=l):l=s="oninput":o&&xm.test(s)?s=s.replace(Em,"-$&").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=ke(n.children).forEach(function(d){d.props.selected=i.value.indexOf(d.props.value)!=-1})),r=="select"&&i.defaultValue!=null&&(i.value=ke(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",Cm)):(n.className&&!n.class||n.class&&n.className)&&(i.class=i.className=n.className),e.props=i}(t),t.$$typeof=Kc,Zc&&Zc(t)};var Qc=ut.__r;ut.__r=function(t){Qc&&Qc(t),fo=t.__c};var tl=ut.diffed;ut.diffed=function(t){tl&&tl(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),fo=null};var el={ReactCurrentDispatcher:{current:{readContext:function(t){return fo.__n[t.__c].props.value},useCallback:kt,useContext:jt,useDebugValue:to,useDeferredValue:ao,useEffect:yt,useId:un,useImperativeHandle:qn,useInsertionEffect:Hn,useLayoutEffect:Ce,useMemo:qt,useReducer:Wn,useRef:ot,useState:wt,useSyncExternalStore:io,useTransition:co}}},nl="18.3.1";function rl(t){return nt.bind(null,t)}function dn(t){return!!t&&t.$$typeof===Kc}function il(t){return dn(t)&&t.type===Ot}function ol(t){return!!t&&!!t.displayName&&(typeof t.displayName=="string"||t.displayName instanceof String)&&t.displayName.startsWith("Memo(")}function ho(t){return dn(t)?hm.apply(null,arguments):t}function sl(t){return!!t.__k&&(zn(null,t),!0)}function al(t){return t&&(t.base||t.nodeType===1&&t)||null}var cl=function(t,e){return t(e)},ll=function(t,e){return t(e)},ul=Ot,fl=dn,Nr={useState:wt,useId:un,useReducer:Wn,useEffect:yt,useLayoutEffect:Ce,useInsertionEffect:Hn,useTransition:co,useDeferredValue:ao,useSyncExternalStore:io,startTransition:so,useRef:ot,useImperativeHandle:qn,useMemo:qt,useCallback:kt,useContext:jt,useDebugValue:to,version:"18.3.1",Children:lo,render:Yc,hydrate:Xc,unmountComponentAtNode:sl,createPortal:uo,createElement:nt,createContext:te,createFactory:rl,cloneElement:ho,createRef:bc,Fragment:Ot,isValidElement:dn,isElement:fl,isFragment:il,isMemo:ol,findDOMNode:al,Component:oe,PureComponent:Mr,memo:jc,forwardRef:Le,flushSync:ll,unstable_batchedUpdates:cl,StrictMode:ul,Suspense:Gn,SuspenseList:fn,lazy:Hc,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:el};const Im=Object.freeze(Object.defineProperty({__proto__:null,Children:lo,Component:oe,Fragment:Ot,PureComponent:Mr,StrictMode:ul,Suspense:Gn,SuspenseList:fn,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:el,cloneElement:ho,createContext:te,createElement:nt,createFactory:rl,createPortal:uo,createRef:bc,default:Nr,findDOMNode:al,flushSync:ll,forwardRef:Le,hydrate:Xc,isElement:fl,isFragment:il,isMemo:ol,isValidElement:dn,lazy:Hc,memo:jc,render:Yc,startTransition:so,unmountComponentAtNode:sl,unstable_batchedUpdates:cl,useCallback:kt,useContext:jt,useDebugValue:to,useDeferredValue:ao,useEffect:yt,useErrorBoundary:mm,useId:un,useImperativeHandle:qn,useInsertionEffect:Hn,useLayoutEffect:Ce,useMemo:qt,useReducer:Wn,useRef:ot,useState:wt,useSyncExternalStore:io,useTransition:co,version:nl},Symbol.toStringTag,{value:"Module"})),Rm='*,: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}#deskcord-root{--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%}#deskcord-root .dark{--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%}#deskcord-root *{border-color:hsl(var(--border))}#deskcord-root body{background-color:hsl(var(--background))}#deskcord-root body{color:hsl(var(--foreground))}*,: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-x-px{left:1px;right:1px}.inset-y-0{top:0;bottom:0}.bottom-0{bottom:0}.bottom-full{bottom:100%}.bottom-px{bottom:1px}.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}.\\!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}.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\\.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}.size-\\[40px\\]{width:40px;height:40px}.\\!h-2\\.5{height:.625rem!important}.h-16{height:4rem}.h-2{height:.5rem}.h-32{height:8rem}.h-8{height:2rem}.h-full{height:100%}.max-h-40{max-height:10rem}.max-h-\\[100px\\]{max-height:100px}.max-h-\\[200px\\]{max-height:200px}.\\!w-2\\.5{width:.625rem!important}.w-10{width:2.5rem}.w-16{width:4rem}.w-32{width:8rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-\\[calc\\(100\\%-2rem\\)\\]{width:calc(100% - 2rem)}.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}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 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 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-nowrap{flex-wrap:nowrap}.items-start{align-items:flex-start}.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-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-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.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))}.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}.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-b-md{border-bottom-right-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.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-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-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-blue-200{--tw-bg-opacity: 1;background-color:rgb(191 219 254 / 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-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}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.\\!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-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-12{padding-bottom:3rem}.ps-11{padding-inline-start:2.75rem}.ps-4{padding-inline-start:1rem}.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-\\[12px\\]{font-size:12px}.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-800{--tw-text-opacity: 1;color:rgb(31 41 55 / 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-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))}.opacity-0{opacity:0}.opacity-80{opacity:.8}.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-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)}.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}.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-200{animation-duration:.2s}.duration-500{animation-duration:.5s}.running{animation-play-state:running}.hover\\:bg-blue-500:hover{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / 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\\:bg-gray-700:hover{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / 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-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))}.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\\:bg-blue-500:focus{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.focus\\:bg-blue-700:focus{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity))}.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-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}.focus\\:ring-gray-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(75 85 99 / var(--tw-ring-opacity))}.focus\\:ring-opacity-50:focus{--tw-ring-opacity: .5}.disabled\\:pointer-events-none:disabled{pointer-events:none}.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-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\\:focus\\:bg-neutral-800:focus:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}.dark\\:focus\\:ring-neutral-600:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(82 82 82 / var(--tw-ring-opacity))}@media (min-width: 640px){.sm\\:gap-x-4{-moz-column-gap:1rem;column-gap:1rem}}',Mm=".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}}",po=te({});function mo(t){const e=ot(null);return e.current===null&&(e.current=t()),e.current}const yo=typeof window<"u",dl=yo?Ce:yt,Dr=te(null);function go(t,e){t.indexOf(e)===-1&&t.push(e)}function vo(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const Ie=(t,e,n)=>n>e?e:n<t?t:n;let Br=()=>{};const Re={},hl=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function pl(t){return typeof t=="object"&&t!==null}const ml=t=>/^0[^.\s]+$/u.test(t);function bo(t){let e;return()=>(e===void 0&&(e=t()),e)}const ce=t=>t,Nm=(t,e)=>n=>e(t(n)),Kn=(...t)=>t.reduce(Nm),Yn=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r};class wo{constructor(){this.subscriptions=[]}add(e){return go(this.subscriptions,e),()=>vo(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,we=t=>t/1e3;function yl(t,e){return e?t*(1e3/e):0}const gl=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Dm=1e-7,Bm=12;function Lm(t,e,n,r,i){let o,s,a=0;do s=e+(n-e)/2,o=gl(s,r,i)-t,o>0?n=s:e=s;while(Math.abs(o)>Dm&&++a<Bm);return s}function Xn(t,e,n,r){if(t===e&&n===r)return ce;const i=o=>Lm(o,0,1,t,n);return o=>o===0||o===1?o:gl(i(o),e,r)}const vl=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,bl=t=>e=>1-t(1-e),wl=Xn(.33,1.53,.69,.99),_o=bl(wl),_l=vl(_o),xl=t=>(t*=2)<1?.5*_o(t):.5*(2-Math.pow(2,-10*(t-1))),xo=t=>1-Math.sin(Math.acos(t)),Sl=bl(xo),El=vl(xo),Fm=Xn(.42,0,1,1),jm=Xn(0,0,.58,1),Al=Xn(.42,0,.58,1),Vm=t=>Array.isArray(t)&&typeof t[0]!="number",Tl=t=>Array.isArray(t)&&typeof t[0]=="number",Pl={linear:ce,easeIn:Fm,easeInOut:Al,easeOut:jm,circIn:xo,circInOut:El,circOut:Sl,backIn:_o,backInOut:_l,backOut:wl,anticipate:xl},$m=t=>typeof t=="string",kl=t=>{if(Tl(t)){Br(t.length===4);const[e,n,r,i]=t;return Xn(e,n,r,i)}else if($m(t))return Br(Pl[t]!==void 0),Pl[t];return t},Lr=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],Ol={value:null,addProjectionMetrics:null};function Um(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 w=y&&i?n:r;return m&&s.add(h),w.has(h)||w.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&&Ol.value&&Ol.value.frameloop[e].push(l),l=0,n.clear(),i=!1,o&&(o=!1,c.process(h))}};return c}const zm=40;function Cl(t,e){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=Lr.reduce((S,R)=>(S[R]=Um(o,e?R:void 0),S),{}),{setup:a,read:l,resolveKeyframes:d,preUpdate:c,update:h,preRender:m,render:y,postRender:_}=s,w=()=>{const S=Re.useManualTiming?i.timestamp:performance.now();n=!1,Re.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(S-i.timestamp,zm),1)),i.timestamp=S,i.isProcessing=!0,a.process(i),l.process(i),d.process(i),c.process(i),h.process(i),m.process(i),y.process(i),_.process(i),i.isProcessing=!1,n&&e&&(r=!1,t(w))},k=()=>{n=!0,r=!0,i.isProcessing||t(w)};return{schedule:Lr.reduce((S,R)=>{const O=s[R];return S[R]=(B,L=!1,W=!1)=>(n||k(),O.schedule(B,L,W)),S},{}),cancel:S=>{for(let R=0;R<Lr.length;R++)s[Lr[R]].cancel(S)},state:i,steps:s}}const{schedule:Ct,cancel:Fe,state:Xt,steps:So}=Cl(typeof requestAnimationFrame<"u"?requestAnimationFrame:ce,!0);let Fr;function Wm(){Fr=void 0}const re={now:()=>(Fr===void 0&&re.set(Xt.isProcessing||Re.useManualTiming?Xt.timestamp:performance.now()),Fr),set:t=>{Fr=t,queueMicrotask(Wm)}},Il=t=>e=>typeof e=="string"&&e.startsWith(t),Eo=Il("--"),qm=Il("var(--"),Ao=t=>qm(t)?Hm.test(t.split("/*")[0].trim()):!1,Hm=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,hn={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Jn={...hn,transform:t=>Ie(0,1,t)},jr={...hn,default:1},Zn=t=>Math.round(t*1e5)/1e5,To=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Gm(t){return t==null}const Km=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Po=(t,e)=>n=>!!(typeof n=="string"&&Km.test(n)&&n.startsWith(t)||e&&!Gm(n)&&Object.prototype.hasOwnProperty.call(n,e)),Rl=(t,e,n)=>r=>{if(typeof r!="string")return r;const[i,o,s,a]=r.match(To);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},Ym=t=>Ie(0,255,t),ko={...hn,transform:t=>Math.round(Ym(t))},We={test:Po("rgb","red"),parse:Rl("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+ko.transform(t)+", "+ko.transform(e)+", "+ko.transform(n)+", "+Zn(Jn.transform(r))+")"};function Xm(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 Oo={test:Po("#"),parse:Xm,transform:We.transform},Qn=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),je=Qn("deg"),_e=Qn("%"),it=Qn("px"),Jm=Qn("vh"),Zm=Qn("vw"),Ml={..._e,parse:t=>_e.parse(t)/100,transform:t=>_e.transform(t*100)},pn={test:Po("hsl","hue"),parse:Rl("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+_e.transform(Zn(e))+", "+_e.transform(Zn(n))+", "+Zn(Jn.transform(r))+")"},Vt={test:t=>We.test(t)||Oo.test(t)||pn.test(t),parse:t=>We.test(t)?We.parse(t):pn.test(t)?pn.parse(t):Oo.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?We.transform(t):pn.transform(t),getAnimatableNone:t=>{const e=Vt.parse(t);return e.alpha=0,Vt.transform(e)}},Qm=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function ty(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(To))==null?void 0:e.length)||0)+(((n=t.match(Qm))==null?void 0:n.length)||0)>0}const Nl="number",Dl="color",ey="var",ny="var(",Bl="${}",ry=/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 tr(t){const e=t.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(ry,l=>(Vt.test(l)?(r.color.push(o),i.push(Dl),n.push(Vt.parse(l))):l.startsWith(ny)?(r.var.push(o),i.push(ey),n.push(l)):(r.number.push(o),i.push(Nl),n.push(parseFloat(l))),++o,Bl)).split(Bl);return{values:n,split:a,indexes:r,types:i}}function Ll(t){return tr(t).values}function Fl(t){const{split:e,types:n}=tr(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===Nl?o+=Zn(i[s]):a===Dl?o+=Vt.transform(i[s]):o+=i[s]}return o}}const iy=t=>typeof t=="number"?0:Vt.test(t)?Vt.getAnimatableNone(t):t;function oy(t){const e=Ll(t);return Fl(t)(e.map(iy))}const Ve={test:ty,parse:Ll,createTransformer:Fl,getAnimatableNone:oy};function Co(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 sy({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=Co(l,a,t+1/3),o=Co(l,a,t),s=Co(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}function Vr(t,e){return n=>n>0?e:t}const Mt=(t,e,n)=>t+(e-t)*n,Io=(t,e,n)=>{const r=t*t,i=n*(e*e-r)+r;return i<0?0:Math.sqrt(i)},ay=[Oo,We,pn],cy=t=>ay.find(e=>e.test(t));function jl(t){const e=cy(t);if(!e)return!1;let n=e.parse(t);return e===pn&&(n=sy(n)),n}const Vl=(t,e)=>{const n=jl(t),r=jl(e);if(!n||!r)return Vr(t,e);const i={...n};return o=>(i.red=Io(n.red,r.red,o),i.green=Io(n.green,r.green,o),i.blue=Io(n.blue,r.blue,o),i.alpha=Mt(n.alpha,r.alpha,o),We.transform(i))},Ro=new Set(["none","hidden"]);function ly(t,e){return Ro.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function uy(t,e){return n=>Mt(t,e,n)}function Mo(t){return typeof t=="number"?uy:typeof t=="string"?Ao(t)?Vr:Vt.test(t)?Vl:hy:Array.isArray(t)?$l:typeof t=="object"?Vt.test(t)?Vl:fy:Vr}function $l(t,e){const n=[...t],r=n.length,i=t.map((o,s)=>Mo(o)(o,e[s]));return o=>{for(let s=0;s<r;s++)n[s]=i[s](o);return n}}function fy(t,e){const n={...t,...e},r={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(r[i]=Mo(t[i])(t[i],e[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}}function dy(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 hy=(t,e)=>{const n=Ve.createTransformer(e),r=tr(t),i=tr(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?Ro.has(t)&&!i.values.length||Ro.has(e)&&!r.values.length?ly(t,e):Kn($l(dy(r,i),i.values),n):Vr(t,e)};function Ul(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?Mt(t,e,n):Mo(t)(t,e)}const py=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>Ct.update(e,n),stop:()=>Fe(e),now:()=>Xt.isProcessing?Xt.timestamp:re.now()}},zl=(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)})`},$r=2e4;function No(t){let e=0;const n=50;let r=t.next(e);for(;!r.done&&e<$r;)e+=n,r=t.next(e);return e>=$r?1/0:e}function my(t,e=100,n){const r=n({...t,keyframes:[0,e]}),i=Math.min(No(r),$r);return{type:"keyframes",ease:o=>r.next(i*o).value/e,duration:we(i)}}const yy=5;function Wl(t,e,n){const r=Math.max(e-yy,0);return yl(n-t(r),e-r)}const Nt={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},Do=.001;function gy({duration:t=Nt.duration,bounce:e=Nt.bounce,velocity:n=Nt.velocity,mass:r=Nt.mass}){let i,o,s=1-e;s=Ie(Nt.minDamping,Nt.maxDamping,s),t=Ie(Nt.minDuration,Nt.maxDuration,we(t)),s<1?(i=d=>{const c=d*s,h=c*t,m=c-n,y=Bo(d,s),_=Math.exp(-h);return Do-m/y*_},o=d=>{const h=d*s*t,m=h*n+n,y=Math.pow(s,2)*Math.pow(d,2)*t,_=Math.exp(-h),w=Bo(Math.pow(d,2),s);return(-i(d)+Do>0?-1:1)*((m-y)*_)/w}):(i=d=>{const c=Math.exp(-d*t),h=(d-n)*t+1;return-Do+c*h},o=d=>{const c=Math.exp(-d*t),h=(n-d)*(t*t);return c*h});const a=5/t,l=by(i,o,a);if(t=be(t),isNaN(l))return{stiffness:Nt.stiffness,damping:Nt.damping,duration:t};{const d=Math.pow(l,2)*r;return{stiffness:d,damping:s*2*Math.sqrt(r*d),duration:t}}}const vy=12;function by(t,e,n){let r=n;for(let i=1;i<vy;i++)r=r-t(r)/e(r);return r}function Bo(t,e){return t*Math.sqrt(1-e*e)}const wy=["duration","bounce"],_y=["stiffness","damping","mass"];function ql(t,e){return e.some(n=>t[n]!==void 0)}function xy(t){let e={velocity:Nt.velocity,stiffness:Nt.stiffness,damping:Nt.damping,mass:Nt.mass,isResolvedFromDuration:!1,...t};if(!ql(t,_y)&&ql(t,wy))if(t.visualDuration){const n=t.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,o=2*Ie(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:Nt.mass,stiffness:i,damping:o}}else{const n=gy(t);e={...e,...n,mass:Nt.mass},e.isResolvedFromDuration=!0}return e}function Ur(t=Nt.visualDuration,e=Nt.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}=xy({...n,velocity:-we(n.velocity||0)}),_=m||0,w=d/(2*Math.sqrt(l*c)),k=s-o,x=we(Math.sqrt(l/c)),v=Math.abs(k)<5;r||(r=v?Nt.restSpeed.granular:Nt.restSpeed.default),i||(i=v?Nt.restDelta.granular:Nt.restDelta.default);let S;if(w<1){const O=Bo(x,w);S=B=>{const L=Math.exp(-w*x*B);return s-L*((_+w*x*k)/O*Math.sin(O*B)+k*Math.cos(O*B))}}else if(w===1)S=O=>s-Math.exp(-x*O)*(k+(_+x*k)*O);else{const O=x*Math.sqrt(w*w-1);S=B=>{const L=Math.exp(-w*x*B),W=Math.min(O*B,300);return s-L*((_+w*x*k)*Math.sinh(W)+O*k*Math.cosh(W))/O}}const R={calculatedDuration:y&&h||null,next:O=>{const B=S(O);if(y)a.done=O>=h;else{let L=O===0?_:0;w<1&&(L=O===0?be(_):Wl(S,O,B));const W=Math.abs(L)<=r,F=Math.abs(s-B)<=i;a.done=W&&F}return a.value=a.done?s:B,a},toString:()=>{const O=Math.min(No(R),$r),B=zl(L=>R.next(O*L).value,O,30);return O+"ms "+B},toTransition:()=>{}};return R}Ur.applyToOptions=t=>{const e=my(t,100,Ur);return t.ease=e.ease,t.duration=be(e.duration),t.type="keyframes",t};function Lo({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=W=>a!==void 0&&W<a||l!==void 0&&W>l,_=W=>a===void 0?l:l===void 0||Math.abs(a-W)<Math.abs(l-W)?a:l;let w=n*e;const k=h+w,x=s===void 0?k:s(k);x!==k&&(w=x-h);const v=W=>-w*Math.exp(-W/r),S=W=>x+v(W),R=W=>{const F=v(W),Y=S(W);m.done=Math.abs(F)<=d,m.value=m.done?x:Y};let O,B;const L=W=>{y(m.value)&&(O=W,B=Ur({keyframes:[m.value,_(m.value)],velocity:Wl(S,W,m.value),damping:i,stiffness:o,restDelta:d,restSpeed:c}))};return L(0),{calculatedDuration:null,next:W=>{let F=!1;return!B&&O===void 0&&(F=!0,R(W),L(W)),O!==void 0&&W>=O?B.next(W-O):(!F&&R(W),m)}}}function Sy(t,e,n){const r=[],i=n||Re.mix||Ul,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]||ce:e;a=Kn(l,a)}r.push(a)}return r}function Ey(t,e,{clamp:n=!0,ease:r,mixer:i}={}){const o=t.length;if(Br(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=Sy(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=Yn(t[h],t[h+1],c);return a[h](m)};return n?c=>d(Ie(t[0],t[o-1],c)):d}function Ay(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const i=Yn(0,e,r);t.push(Mt(n,1,i))}}function Ty(t){const e=[0];return Ay(e,t.length-1),e}function Py(t,e){return t.map(n=>n*e)}function ky(t,e){return t.map(()=>e||Al).splice(0,t.length-1)}function er({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const i=Vm(r)?r.map(kl):kl(r),o={done:!1,value:e[0]},s=Py(n&&n.length===e.length?n:Ty(e),t),a=Ey(s,e,{ease:Array.isArray(i)?i:ky(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}const Oy=t=>t!==null;function Fo(t,{repeat:e,repeatType:n="loop"},r,i=1){const o=t.filter(Oy),a=i<0||e&&n!=="loop"&&e%2===1?0:o.length-1;return!a||r===void 0?o[a]:r}const Cy={decay:Lo,inertia:Lo,tween:er,keyframes:er,spring:Ur};function Hl(t){typeof t.type=="string"&&(t.type=Cy[t.type])}class jo{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 Iy=t=>t/100;class Vo extends jo{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!==re.now()&&this.tick(re.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;Hl(e);const{type:n=er,repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:s=0}=e;let{keyframes:a}=e;const l=n||er;l!==er&&typeof a[0]!="number"&&(this.mixKeyframes=Kn(Iy,Ul(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=No(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:_,onUpdate:w,finalKeyframe:k}=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 S=this.currentTime,R=r;if(h){const W=Math.min(this.currentTime,i)/a;let F=Math.floor(W),Y=W%1;!Y&&W>=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"&&(R=s)),S=Ie(0,1,Y)*a}const O=v?{done:!1,value:c[0]}:R.next(S);o&&(O.value=o(O.value));let{done:B}=O;!v&&l!==null&&(B=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const L=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&B);return L&&_!==Lo&&(O.value=Fo(c,this.options,k,this.speed)),w&&w(O.value),L&&this.finish(),O}then(e,n){return this.finished.then(e,n)}get duration(){return we(this.calculatedDuration)}get time(){return we(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(re.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=we(this.currentTime))}play(){var i,o;if(this.isStopped)return;const{driver:e=py,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(re.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 Ry(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const qe=t=>t*180/Math.PI,$o=t=>{const e=qe(Math.atan2(t[1],t[0]));return Uo(e)},My={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:$o,rotateZ:$o,skewX:t=>qe(Math.atan(t[1])),skewY:t=>qe(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Uo=t=>(t=t%360,t<0&&(t+=360),t),Gl=$o,Kl=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Yl=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Ny={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Kl,scaleY:Yl,scale:t=>(Kl(t)+Yl(t))/2,rotateX:t=>Uo(qe(Math.atan2(t[6],t[5]))),rotateY:t=>Uo(qe(Math.atan2(-t[2],t[0]))),rotateZ:Gl,rotate:Gl,skewX:t=>qe(Math.atan(t[4])),skewY:t=>qe(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function zo(t){return t.includes("scale")?1:0}function Wo(t,e){if(!t||t==="none")return zo(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=Ny,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=My,i=a}if(!i)return zo(e);const o=r[e],s=i[1].split(",").map(By);return typeof o=="function"?o(s):s[o]}const Dy=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Wo(n,e)};function By(t){return parseFloat(t.trim())}const mn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],yn=new Set(mn),Xl=t=>t===hn||t===it,Ly=new Set(["x","y","z"]),Fy=mn.filter(t=>!Ly.has(t));function jy(t){const e=[];return Fy.forEach(n=>{const r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e}const He={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})=>Wo(e,"x"),y:(t,{transform:e})=>Wo(e,"y")};He.translateX=He.x,He.translateY=He.y;const Ge=new Set;let qo=!1,Ho=!1,Go=!1;function Jl(){if(Ho){const t=Array.from(Ge).filter(r=>r.needsMeasurement),e=new Set(t.map(r=>r.element)),n=new Map;e.forEach(r=>{const i=jy(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)})}Ho=!1,qo=!1,Ge.forEach(t=>t.complete(Go)),Ge.clear()}function Zl(){Ge.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Ho=!0)})}function Vy(){Go=!0,Zl(),Jl(),Go=!1}class Ko{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?(Ge.add(this),qo||(qo=!0,Ct.read(Zl),Ct.resolveKeyframes(Jl))):(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])}Ry(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Ge.delete(this)}cancel(){this.state==="scheduled"&&(Ge.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const $y=t=>t.startsWith("--");function Uy(t,e,n){$y(e)?t.style.setProperty(e,n):t.style[e]=n}const zy=bo(()=>window.ScrollTimeline!==void 0),Wy={};function qy(t,e){const n=bo(t);return()=>Wy[e]??n()}const Ql=qy(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),nr=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,tu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:nr([0,.65,.55,1]),circOut:nr([.55,0,1,.45]),backIn:nr([.31,.01,.66,-.59]),backOut:nr([.33,1.53,.69,.99])};function eu(t,e){if(t)return typeof t=="function"?Ql()?zl(t,e):"ease-out":Tl(t)?nr(t):Array.isArray(t)?t.map(n=>eu(n,e)||tu.easeOut):tu[t]}function Hy(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=eu(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 nu(t){return typeof t=="function"&&"applyToOptions"in t}function Gy({type:t,...e}){return nu(t)&&Ql()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Ky extends jo{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,Br(typeof e.type!="string");const d=Gy(e);this.animation=Hy(n,r,i,d,o),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const c=Fo(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):Uy(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 we(Number(e))}get time(){return we(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&&zy()?(this.animation.timeline=e,ce):n(this)}}const ru={anticipate:xl,backInOut:_l,circInOut:El};function Yy(t){return t in ru}function Xy(t){typeof t.ease=="string"&&Yy(t.ease)&&(t.ease=ru[t.ease])}const iu=10;class Jy extends Ky{constructor(e){Xy(e),Hl(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 Vo({...s,autoplay:!1}),l=be(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-iu).value,a.sample(l).value,iu),a.stop()}}const ou=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Ve.test(t)||t==="0")&&!t.startsWith("url("));function Zy(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 Qy(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=ou(i,e),a=ou(o,e);return!s||!a?!1:Zy(t)||(n==="spring"||nu(n))&&r}function Yo(t){t.duration=0,t.type}const tg=new Set(["opacity","clipPath","filter","transform"]),eg=bo(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function ng(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 eg()&&n&&tg.has(n)&&(n!=="transform"||!d)&&!l&&!r&&i!=="mirror"&&o!==0&&s!=="inertia"}const rg=40;class ig extends jo{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 _;super(),this.stop=()=>{var w,k;this._animation&&(this._animation.stop(),(w=this.stopTimeline)==null||w.call(this)),(k=this.keyframeResolver)==null||k.cancel()},this.createdAt=re.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)||Ko;this.keyframeResolver=new y(a,(w,k,x)=>this.onKeyframesResolved(w,k,m,!x),l,d,c),(_=this.keyframeResolver)==null||_.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=re.now(),Qy(e,o,s,a)||((Re.instantAnimations||!l)&&(c==null||c(Fo(e,r,n))),e[0]=e[e.length-1],Yo(r),r.repeat=0);const m={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>rg?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:e},y=!d&&ng(m)?new Jy({...m,element:m.motionValue.owner.current}):new Vo(m);y.finished.then(()=>this.notifyFinished()).catch(ce),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(),Vy()),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 og=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function sg(t){const e=og.exec(t);if(!e)return[,];const[,n,r,i]=e;return[`--${n??r}`,i]}function su(t,e,n=1){const[r,i]=sg(t);if(!r)return;const o=window.getComputedStyle(e).getPropertyValue(r);if(o){const s=o.trim();return hl(s)?parseFloat(s):s}return Ao(i)?su(i,e,n+1):i}function Xo(t,e){return(t==null?void 0:t[e])??(t==null?void 0:t.default)??t}const au=new Set(["width","height","top","left","right","bottom",...mn]),ag={test:t=>t==="auto",parse:t=>t},cu=t=>e=>e.test(t),lu=[hn,it,_e,je,Zm,Jm,ag],uu=t=>lu.find(cu(t));function cg(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||ml(t):!0}const lg=new Set(["brightness","contrast","saturate","opacity"]);function ug(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(To)||[];if(!r)return t;const i=n.replace(r,"");let o=lg.has(e)?1:0;return r!==n&&(o*=100),e+"("+o+i+")"}const fg=/\b([a-z-]*)\(.*?\)/gu,Jo={...Ve,getAnimatableNone:t=>{const e=t.match(fg);return e?e.map(ug).join(" "):t}},fu={...hn,transform:Math.round},Zo={borderWidth:it,borderTopWidth:it,borderRightWidth:it,borderBottomWidth:it,borderLeftWidth:it,borderRadius:it,radius:it,borderTopLeftRadius:it,borderTopRightRadius:it,borderBottomRightRadius:it,borderBottomLeftRadius:it,width:it,maxWidth:it,height:it,maxHeight:it,top:it,right:it,bottom:it,left:it,padding:it,paddingTop:it,paddingRight:it,paddingBottom:it,paddingLeft:it,margin:it,marginTop:it,marginRight:it,marginBottom:it,marginLeft:it,backgroundPositionX:it,backgroundPositionY:it,...{rotate:je,rotateX:je,rotateY:je,rotateZ:je,scale:jr,scaleX:jr,scaleY:jr,scaleZ:jr,skew:je,skewX:je,skewY:je,distance:it,translateX:it,translateY:it,translateZ:it,x:it,y:it,z:it,perspective:it,transformPerspective:it,opacity:Jn,originX:Ml,originY:Ml,originZ:it},zIndex:fu,fillOpacity:Jn,strokeOpacity:Jn,numOctaves:fu},dg={...Zo,color:Vt,backgroundColor:Vt,outlineColor:Vt,fill:Vt,stroke:Vt,borderColor:Vt,borderTopColor:Vt,borderRightColor:Vt,borderBottomColor:Vt,borderLeftColor:Vt,filter:Jo,WebkitFilter:Jo},du=t=>dg[t];function hu(t,e){let n=du(t);return n!==Jo&&(n=Ve),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const hg=new Set(["auto","none","0"]);function pg(t,e,n){let r=0,i;for(;r<t.length&&!i;){const o=t[r];typeof o=="string"&&!hg.has(o)&&tr(o).values.length&&(i=t[r]),r++}if(i&&n)for(const o of e)t[o]=hu(n,i)}class mg extends Ko{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(),Ao(d))){const c=su(d,n.current);c!==void 0&&(e[l]=c),l===e.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!au.has(r)||e.length!==2)return;const[i,o]=e,s=uu(i),a=uu(o);if(s!==a)if(Xl(s)&&Xl(a))for(let l=0;l<e.length;l++){const d=e[l];typeof d=="string"&&(e[l]=parseFloat(d))}else He[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,r=[];for(let i=0;i<e.length;i++)(e[i]===null||cg(e[i]))&&r.push(i);r.length&&pg(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=He[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]=He[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 yg(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 pu=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function mu(t){return pl(t)&&"offsetHeight"in t}const yu=30,gg=t=>!isNaN(parseFloat(t));class vg{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var o;const i=re.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=re.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=gg(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 wo);const r=this.events[e].add(n);return e==="change"?()=>{r(),Ct.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=re.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>yu)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,yu);return yl(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 gn(t,e){return new vg(t,e)}const{schedule:Qo,cancel:GE}=Cl(queueMicrotask,!1),pe={x:!1,y:!1};function gu(){return pe.x||pe.y}function bg(t){return t==="x"||t==="y"?pe[t]?null:(pe[t]=!0,()=>{pe[t]=!1}):pe.x||pe.y?null:(pe.x=pe.y=!0,()=>{pe.x=pe.y=!1})}function vu(t,e){const n=yg(t),r=new AbortController,i={passive:!0,...e,signal:r.signal};return[n,i,()=>r.abort()]}function bu(t){return!(t.pointerType==="touch"||gu())}function wg(t,e,n={}){const[r,i,o]=vu(t,n),s=a=>{if(!bu(a))return;const{target:l}=a,d=e(l,a);if(typeof d!="function"||!l)return;const c=h=>{bu(h)&&(d(h),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,i)};return r.forEach(a=>{a.addEventListener("pointerenter",s,i)}),o}const wu=(t,e)=>e?t===e?!0:wu(t,e.parentElement):!1,ts=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,_g=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function xg(t){return _g.has(t.tagName)||t.tabIndex!==-1}const zr=new WeakSet;function _u(t){return e=>{e.key==="Enter"&&t(e)}}function es(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Sg=(t,e)=>{const n=t.currentTarget;if(!n)return;const r=_u(()=>{if(zr.has(n))return;es(n,"down");const i=_u(()=>{es(n,"up")}),o=()=>es(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 xu(t){return ts(t)&&!gu()}function Eg(t,e,n={}){const[r,i,o]=vu(t,n),s=a=>{const l=a.currentTarget;if(!xu(a))return;zr.add(l);const d=e(l,a),c=(y,_)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",m),zr.has(l)&&zr.delete(l),xu(y)&&typeof d=="function"&&d(y,{success:_})},h=y=>{c(y,l===window||l===document||n.useGlobalTarget||wu(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),mu(a)&&(a.addEventListener("focus",d=>Sg(d,i)),!xg(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function Su(t){return pl(t)&&"ownerSVGElement"in t}function Ag(t){return Su(t)&&t.tagName==="svg"}const Zt=t=>!!(t&&t.getVelocity),Tg=[...lu,Vt,Ve],Pg=t=>Tg.find(cu(t)),ns=te({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});class kg extends oe{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const r=n.offsetParent,i=mu(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 Og({children:t,isPresent:e,anchorX:n,root:r}){const i=un(),o=ot(null),s=ot({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=jt(ns);return Hn(()=>{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 _=document.createElement("style");a&&(_.nonce=a);const w=r??document.head;return w.appendChild(_),_.sheet&&_.sheet.insertRule(`
1
+ (function(){"use strict";var Vn,ut,yc,Ue,gc,vc,Wi,bc,Hi,Gi,Ki,wc,$n={},_c=[],mm=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Or=Array.isArray;function Pe(t,e){for(var n in e)t[n]=e[n];return t}function Yi(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function nt(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?Vn.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 Un(t,s,r,i,null)}function Un(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??++yc,__i:-1,__u:0};return i==null&&ut.vnode!=null&&ut.vnode(o),o}function xc(){return{current:null}}function Ot(t){return t.children}function oe(t,e){this.props=t,this.context=e}function cn(t,e){if(e==null)return t.__?cn(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"?cn(t):null}function Sc(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 Sc(t)}}function Xi(t){(!t.__d&&(t.__d=!0)&&Ue.push(t)&&!Cr.__r++||gc!==ut.debounceRendering)&&((gc=ut.debounceRendering)||vc)(Cr)}function Cr(){var t,e,n,r,i,o,s,a;for(Ue.sort(Wi);t=Ue.shift();)t.__d&&(e=Ue.length,r=void 0,o=(i=(n=t).__v).__e,s=[],a=[],n.__P&&((r=Pe({},i)).__v=i.__v+1,ut.vnode&&ut.vnode(r),Ji(n.__P,r,i,n.__n,n.__P.namespaceURI,32&i.__u?[o]:null,s,o??cn(i),!!(32&i.__u),a),r.__v=i.__v,r.__.__k[r.__i]=r,kc(s,r,a),r.__e!=o&&Sc(r)),Ue.length>e&&Ue.sort(Wi));Cr.__r=0}function Ec(t,e,n,r,i,o,s,a,l,d,c){var h,m,y,_,b,P,x=r&&r.__k||_c,v=e.length;for(l=ym(n,e,x,l,v),h=0;h<v;h++)(y=n.__k[h])!=null&&(m=y.__i===-1?$n:x[y.__i]||$n,y.__i=h,P=Ji(t,y,m,i,o,s,a,l,d,c),_=y.__e,y.ref&&m.ref!=y.ref&&(m.ref&&Zi(m.ref,null,y),c.push(y.ref,y.__c||_,y)),b==null&&_!=null&&(b=_),4&y.__u||m.__k===y.__k?l=Ac(y,l,t):typeof y.type=="function"&&P!==void 0?l=P:_&&(l=_.nextSibling),y.__u&=-7);return n.__e=b,l}function ym(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?Un(null,s,null,null,null):Or(s)?Un(Ot,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?Un(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=gm(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=cn(a)),Oc(a,a));return r}function Ac(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=Ac(r[i],e,n));return e}t.__e!=e&&(e&&t.type&&!n.contains(e)&&(e=cn(t)),n.insertBefore(t.__e,e||null),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function ke(t,e){return e=e||[],t==null||typeof t=="boolean"||(Or(t)?t.some(function(n){ke(n,e)}):e.push(t)),e}function gm(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"||mm.test(e)?n:n+"px"}function Ir(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=Hi,t.addEventListener(e,o?Ki:Gi,o)):t.removeEventListener(e,o?Ki:Gi,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=Hi++;else if(e.t<n.u)return;return n(ut.event?ut.event(e):e)}}}function Ji(t,e,n,r,i,o,s,a,l,d){var c,h,m,y,_,b,P,x,v,S,R,O,D,F,q,L,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=ut.__b)&&c(e);t:if(typeof Z=="function")try{if(x=e.props,v="prototype"in Z&&Z.prototype.render,S=(c=Z.contextType)&&r[c.__c],R=c?S?S.props.value:c.__:r,n.__c?P=(h=e.__c=n.__c).__=h.__E:(v?e.__c=h=new Z(x,R):(e.__c=h=new oe(x,R),h.constructor=Z,h.render=bm),S&&S.sub(h),h.props=x,h.state||(h.state={}),h.context=R,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=Pe({},h.__s)),Pe(h.__s,Z.getDerivedStateFromProps(x,h.__s))),y=h.props,_=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,R),!h.__e&&(h.shouldComponentUpdate!=null&&h.shouldComponentUpdate(x,h.__s,R)===!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(et){et&&(et.__=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,R),v&&h.componentDidUpdate!=null&&h.__h.push(function(){h.componentDidUpdate(y,_,b)})}if(h.context=R,h.props=x,h.__P=t,h.__e=!1,D=ut.__r,F=0,v){for(h.state=h.__s,h.__d=!1,D&&D(e),c=h.render(h.props,h.state,h.context),q=0;q<h._sb.length;q++)h.__h.push(h._sb[q]);h._sb=[]}else do h.__d=!1,D&&D(e),c=h.render(h.props,h.state,h.context),h.state=h.__s;while(h.__d&&++F<25);h.state=h.__s,h.getChildContext!=null&&(r=Pe(Pe({},r),h.getChildContext())),v&&!m&&h.getSnapshotBeforeUpdate!=null&&(b=h.getSnapshotBeforeUpdate(y,_)),a=Ec(t,Or(L=c!=null&&c.type===Ot&&c.key==null?c.props.children:c)?L:[L],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(et){if(e.__v=null,l||o!=null)if(et.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--;)Yi(o[Y]);else e.__e=n.__e,e.__k=n.__k;ut.__e(et,e,n)}else o==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):a=e.__e=vm(n.__e,e,n,r,i,o,s,l,d);return(c=ut.diffed)&&c(e),128&e.__u?void 0:a}function kc(t,e,n){for(var r=0;r<n.length;r++)Zi(n[r],n[++r],n[++r]);ut.__c&&ut.__c(e,t),t.some(function(i){try{t=i.__h,i.__h=[],t.some(function(o){o.call(i)})}catch(o){ut.__e(o,i.__v)}})}function vm(t,e,n,r,i,o,s,a,l){var d,c,h,m,y,_,b,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&&(ut.__m&&ut.__m(e,o),a=!1),o=null}if(v===null)P===x||a&&t.data===x||(t.data=x);else{if(o=o&&Vn.call(t.childNodes),P=n.props||$n,!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;Ir(t,d,null,y,i)}}for(d in x)y=x[d],d=="children"?m=y:d=="dangerouslySetInnerHTML"?c=y:d=="value"?_=y:d=="checked"?b=y:a&&typeof y!="function"||P[d]===y||Ir(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=""),Ec(t,Or(m)?m:[m],e,n,r,v=="foreignObject"?"http://www.w3.org/1999/xhtml":i,o,s,o?o[0]:n.__k&&cn(n,0),a,l),o!=null)for(d=o.length;d--;)Yi(o[d]);a||(d="value",v=="progress"&&_==null?t.removeAttribute("value"):_!==void 0&&(_!==t[d]||v=="progress"&&!_||v=="option"&&_!==P[d])&&Ir(t,d,_,P[d],i),d="checked",b!==void 0&&b!==t[d]&&Ir(t,d,b,P[d],i))}return t}function Zi(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){ut.__e(i,n)}}function Oc(t,e,n){var r,i;if(ut.unmount&&ut.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||Zi(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){ut.__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||Yi(t.__e),t.__c=t.__=t.__e=void 0}function bm(t,e,n){return this.constructor(t,n)}function zn(t,e,n){var r,i,o,s;e==document&&(e=document.documentElement),ut.__&&ut.__(t,e),i=(r=typeof n=="function")?null:n&&n.__k||e.__k,o=[],s=[],Ji(e,t=(!r&&n||e).__k=nt(Ot,null,[t]),i||$n,$n,e.namespaceURI,!r&&n?[n]:i?null:e.firstChild?Vn.call(e.childNodes):null,o,!r&&n?n:i?i.__e:e.firstChild,r,s),kc(o,t,s)}function Cc(t,e){zn(t,e,Cc)}function wm(t,e,n){var r,i,o,s,a=Pe({},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?Vn.call(arguments,2):n),Un(t.type,a,r||t.key,i||t.ref,null)}function te(t,e){var n={__c:e="__cC"+wc++,__: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,Xi(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}Vn=_c.slice,ut={__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}},yc=0,oe.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Pe({},this.state),typeof t=="function"&&(t=t(Pe({},n),this.props)),t&&Pe(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),Xi(this))},oe.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Xi(this))},oe.prototype.render=Ot,Ue=[],vc=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Wi=function(t,e){return t.__v.__b-e.__v.__b},Cr.__r=0,bc=/(PointerCapture)$|Capture$/i,Hi=0,Gi=Pc(!1),Ki=Pc(!0),wc=0;var _m=0;function M(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:--_m,__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 ut.vnode&&ut.vnode(d),d}var Oe,Et,Qi,Ic,ln=0,Rc=[],Rt=ut,Mc=Rt.__b,Nc=Rt.__r,Bc=Rt.diffed,Dc=Rt.__c,Fc=Rt.unmount,Lc=Rt.__;function ze(t,e){Rt.__h&&Rt.__h(Et,t,ln||e),ln=0;var n=Et.__H||(Et.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function wt(t){return ln=1,qn(Vc,t)}function qn(t,e,n){var r=ze(Oe++,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=Et,!Et.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};Et.u=!0;var o=Et.shouldComponentUpdate,s=Et.componentWillUpdate;Et.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)},Et.shouldComponentUpdate=i}return r.__N||r.__}function yt(t,e){var n=ze(Oe++,3);!Rt.__s&&no(n.__H,e)&&(n.__=t,n.i=e,Et.__H.__h.push(n))}function Ce(t,e){var n=ze(Oe++,4);!Rt.__s&&no(n.__H,e)&&(n.__=t,n.i=e,Et.__h.push(n))}function ot(t){return ln=5,Wt(function(){return{current:t}},[])}function Wn(t,e,n){ln=6,Ce(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 Wt(t,e){var n=ze(Oe++,7);return no(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function kt(t,e){return ln=8,Wt(function(){return t},e)}function jt(t){var e=Et.context[t.__c],n=ze(Oe++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(Et)),e.props.value):t.__}function to(t,e){Rt.useDebugValue&&Rt.useDebugValue(e?e(t):t)}function xm(t){var e=ze(Oe++,10),n=wt();return e.__=t,Et.componentDidCatch||(Et.componentDidCatch=function(r,i){e.__&&e.__(r,i),n[1](r)}),[n[0],function(){n[1](void 0)}]}function un(){var t=ze(Oe++,11);if(!t.__){for(var e=Et.__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 Sm(){for(var t;t=Rc.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Rr),t.__H.__h.forEach(eo),t.__H.__h=[]}catch(e){t.__H.__h=[],Rt.__e(e,t.__v)}}Rt.__b=function(t){Et=null,Mc&&Mc(t)},Rt.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),Lc&&Lc(t,e)},Rt.__r=function(t){Nc&&Nc(t),Oe=0;var e=(Et=t.__c).__H;e&&(Qi===Et?(e.__h=[],Et.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(e.__h.forEach(Rr),e.__h.forEach(eo),e.__h=[],Oe=0)),Qi=Et},Rt.diffed=function(t){Bc&&Bc(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Rc.push(e)!==1&&Ic===Rt.requestAnimationFrame||((Ic=Rt.requestAnimationFrame)||Em)(Sm)),e.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),Qi=Et=null},Rt.__c=function(t,e){e.some(function(n){try{n.__h.forEach(Rr),n.__h=n.__h.filter(function(r){return!r.__||eo(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],Rt.__e(r,n.__v)}}),Dc&&Dc(t,e)},Rt.unmount=function(t){Fc&&Fc(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Rr(r)}catch(i){e=i}}),n.__H=void 0,e&&Rt.__e(e,n.__v))};var jc=typeof requestAnimationFrame=="function";function Em(t){var e,n=function(){clearTimeout(r),jc&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);jc&&(e=requestAnimationFrame(n))}function Rr(t){var e=Et,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),Et=e}function eo(t){var e=Et;t.__c=t.__(),Et=e}function no(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 $c(t,e){for(var n in e)t[n]=e[n];return t}function ro(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 io(t,e){var n=e(),r=wt({t:{__:n,u:e}}),i=r[0].t,o=r[1];return Ce(function(){i.__=n,i.u=e,oo(i)&&o({t:i})},[t,n,e]),yt(function(){return oo(i)&&o({t:i}),t(function(){oo(i)&&o({t:i})})},[t]),n}function oo(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 so(t){t()}function ao(t){return t}function co(){return[!1,so]}var Hn=Ce;function Mr(t,e){this.props=t,this.context=e}function Uc(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:ro(this.props,i)}function r(i){return this.shouldComponentUpdate=n,nt(t,i)}return r.displayName="Memo("+(t.displayName||t.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Mr.prototype=new oe).isPureReactComponent=!0,Mr.prototype.shouldComponentUpdate=function(t,e){return ro(this.props,t)||ro(this.state,e)};var zc=ut.__b;ut.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),zc&&zc(t)};var Am=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Fe(t){function e(n){var r=$c({},n);return delete r.ref,t(r,n.ref||null)}return e.$$typeof=Am,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:ke(ke(t).map(e))},lo={map:qc,forEach:qc,count:function(t){return t?ke(t).length:0},only:function(t){var e=ke(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:ke},Tm=ut.__e;ut.__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)}Tm(t,e,n,r)};var Wc=ut.unmount;function Hc(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=$c({},t)).__c!=null&&(t.__c.__P===n&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map(function(r){return Hc(r,e,n)})),t}function Gc(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(r){return Gc(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 Gn(){this.__u=0,this.o=null,this.__b=null}function Kc(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function Yc(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 nt(n,o)}return i.displayName="Lazy",i.__f=!0,i}function fn(){this.i=null,this.l=null}ut.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),Wc&&Wc(t)},(Gn.prototype=new oe).__c=function(t,e){var n=e.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var i=Kc(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]=Gc(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)},Gn.prototype.componentWillUnmount=function(){this.o=[]},Gn.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]=Hc(this.__b,n,r.__O=r.__P)}this.__b=null}var i=e.__a&&nt(Ot,null,t.fallback);return i&&(i.__u&=-33),[nt(Ot,null,e.__a?null:t.children),i]};var Xc=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 Pm(t){return this.getChildContext=function(){return t.context},t.children}function km(t){var e=this,n=t.h;e.componentWillUnmount=function(){zn(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)}}),zn(nt(Pm,{context:e.context},t.__v),e.v)}function uo(t,e){var n=nt(km,{__v:t,h:e});return n.containerInfo=e,n}(fn.prototype=new oe).__a=function(t){var e=this,n=Kc(e.__v),r=e.l.get(t);return r[0]++,function(i){var o=function(){e.props.revealOrder?(r.push(i),Xc(e,t,r)):i()};n?n(o):o()}},fn.prototype.render=function(t){this.i=null,this.l=new Map;var e=ke(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},fn.prototype.componentDidUpdate=fn.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,n){Xc(t,n,e)})};var Jc=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Om=/^(?: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]/,Cm=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Im=/[A-Z0-9]/g,Rm=typeof document<"u",Mm=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function Zc(t,e,n){return e.__k==null&&(e.textContent=""),zn(t,e),typeof n=="function"&&n(),t?t.__c:null}function Qc(t,e,n){return Cc(t,e),typeof n=="function"&&n(),t?t.__c:null}oe.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(oe.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var tl=ut.event;function Nm(){}function Bm(){return this.cancelBubble}function Dm(){return this.defaultPrevented}ut.event=function(t){return tl&&(t=tl(t)),t.persist=Nm,t.isPropagationStopped=Bm,t.isDefaultPrevented=Dm,t.nativeEvent=t};var fo,Fm={enumerable:!1,configurable:!0,get:function(){return this.class}},el=ut.vnode;ut.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||Rm&&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"||Mm(n.type)?l==="onfocus"?s="onfocusin":l==="onblur"?s="onfocusout":Cm.test(s)&&(s=l):l=s="oninput":o&&Om.test(s)?s=s.replace(Im,"-$&").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=ke(n.children).forEach(function(d){d.props.selected=i.value.indexOf(d.props.value)!=-1})),r=="select"&&i.defaultValue!=null&&(i.value=ke(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",Fm)):(n.className&&!n.class||n.class&&n.className)&&(i.class=i.className=n.className),e.props=i}(t),t.$$typeof=Jc,el&&el(t)};var nl=ut.__r;ut.__r=function(t){nl&&nl(t),fo=t.__c};var rl=ut.diffed;ut.diffed=function(t){rl&&rl(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),fo=null};var il={ReactCurrentDispatcher:{current:{readContext:function(t){return fo.__n[t.__c].props.value},useCallback:kt,useContext:jt,useDebugValue:to,useDeferredValue:ao,useEffect:yt,useId:un,useImperativeHandle:Wn,useInsertionEffect:Hn,useLayoutEffect:Ce,useMemo:Wt,useReducer:qn,useRef:ot,useState:wt,useSyncExternalStore:io,useTransition:co}}},ol="18.3.1";function sl(t){return nt.bind(null,t)}function dn(t){return!!t&&t.$$typeof===Jc}function al(t){return dn(t)&&t.type===Ot}function cl(t){return!!t&&!!t.displayName&&(typeof t.displayName=="string"||t.displayName instanceof String)&&t.displayName.startsWith("Memo(")}function ho(t){return dn(t)?wm.apply(null,arguments):t}function ll(t){return!!t.__k&&(zn(null,t),!0)}function ul(t){return t&&(t.base||t.nodeType===1&&t)||null}var fl=function(t,e){return t(e)},dl=function(t,e){return t(e)},hl=Ot,pl=dn,Nr={useState:wt,useId:un,useReducer:qn,useEffect:yt,useLayoutEffect:Ce,useInsertionEffect:Hn,useTransition:co,useDeferredValue:ao,useSyncExternalStore:io,startTransition:so,useRef:ot,useImperativeHandle:Wn,useMemo:Wt,useCallback:kt,useContext:jt,useDebugValue:to,version:"18.3.1",Children:lo,render:Zc,hydrate:Qc,unmountComponentAtNode:ll,createPortal:uo,createElement:nt,createContext:te,createFactory:sl,cloneElement:ho,createRef:xc,Fragment:Ot,isValidElement:dn,isElement:pl,isFragment:al,isMemo:cl,findDOMNode:ul,Component:oe,PureComponent:Mr,memo:Uc,forwardRef:Fe,flushSync:dl,unstable_batchedUpdates:fl,StrictMode:hl,Suspense:Gn,SuspenseList:fn,lazy:Yc,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:il};const Lm=Object.freeze(Object.defineProperty({__proto__:null,Children:lo,Component:oe,Fragment:Ot,PureComponent:Mr,StrictMode:hl,Suspense:Gn,SuspenseList:fn,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:il,cloneElement:ho,createContext:te,createElement:nt,createFactory:sl,createPortal:uo,createRef:xc,default:Nr,findDOMNode:ul,flushSync:dl,forwardRef:Fe,hydrate:Qc,isElement:pl,isFragment:al,isMemo:cl,isValidElement:dn,lazy:Yc,memo:Uc,render:Zc,startTransition:so,unmountComponentAtNode:ll,unstable_batchedUpdates:fl,useCallback:kt,useContext:jt,useDebugValue:to,useDeferredValue:ao,useEffect:yt,useErrorBoundary:xm,useId:un,useImperativeHandle:Wn,useInsertionEffect:Hn,useLayoutEffect:Ce,useMemo:Wt,useReducer:qn,useRef:ot,useState:wt,useSyncExternalStore:io,useTransition:co,version:ol},Symbol.toStringTag,{value:"Module"})),jm='*,: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}#deskcord-root{--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%}#deskcord-root .dark{--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%}#deskcord-root *{border-color:hsl(var(--border))}#deskcord-root body{background-color:hsl(var(--background))}#deskcord-root body{color:hsl(var(--foreground))}*,: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-x-px{left:1px;right:1px}.inset-y-0{top:0;bottom:0}.bottom-0{bottom:0}.bottom-full{bottom:100%}.bottom-px{bottom:1px}.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-\\[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}.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\\.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}.size-\\[40px\\]{width:40px;height:40px}.\\!h-2\\.5{height:.625rem!important}.h-14{height:3.5rem}.h-2{height:.5rem}.h-32{height:8rem}.h-8{height:2rem}.h-full{height:100%}.max-h-40{max-height:10rem}.max-h-\\[100px\\]{max-height:100px}.max-h-\\[200px\\]{max-height:200px}.\\!w-2\\.5{width:.625rem!important}.w-10{width:2.5rem}.w-14{width:3.5rem}.w-32{width:8rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-\\[calc\\(100\\%-2rem\\)\\]{width:calc(100% - 2rem)}.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}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 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 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-nowrap{flex-wrap:nowrap}.items-start{align-items:flex-start}.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-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))}.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}.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-b-md{border-bottom-right-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.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-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-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-blue-200{--tw-bg-opacity: 1;background-color:rgb(191 219 254 / 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-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}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.\\!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-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.pb-12{padding-bottom:3rem}.ps-11{padding-inline-start:2.75rem}.ps-4{padding-inline-start:1rem}.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-\\[12px\\]{font-size:12px}.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-800{--tw-text-opacity: 1;color:rgb(31 41 55 / 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-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))}.opacity-0{opacity:0}.opacity-80{opacity:.8}.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-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)}.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}.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-500{animation-duration:.5s}.running{animation-play-state:running}.hover\\:bg-blue-500:hover{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / 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-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))}.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\\:bg-blue-500:focus{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.focus\\:bg-blue-700:focus{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity))}.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-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}.disabled\\:pointer-events-none:disabled{pointer-events:none}.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-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\\:focus\\:bg-neutral-800:focus:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}.dark\\:focus\\:ring-neutral-600:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(82 82 82 / var(--tw-ring-opacity))}@media (min-width: 640px){.sm\\:gap-x-4{-moz-column-gap:1rem;column-gap:1rem}}',Vm=".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}}",po=te({});function mo(t){const e=ot(null);return e.current===null&&(e.current=t()),e.current}const yo=typeof window<"u",ml=yo?Ce:yt,Br=te(null);function go(t,e){t.indexOf(e)===-1&&t.push(e)}function vo(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const Ie=(t,e,n)=>n>e?e:n<t?t:n;let Dr=()=>{};const Re={},yl=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function gl(t){return typeof t=="object"&&t!==null}const vl=t=>/^0[^.\s]+$/u.test(t);function bo(t){let e;return()=>(e===void 0&&(e=t()),e)}const ce=t=>t,$m=(t,e)=>n=>e(t(n)),Kn=(...t)=>t.reduce($m),Yn=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r};class wo{constructor(){this.subscriptions=[]}add(e){return go(this.subscriptions,e),()=>vo(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,we=t=>t/1e3;function bl(t,e){return e?t*(1e3/e):0}const wl=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Um=1e-7,zm=12;function qm(t,e,n,r,i){let o,s,a=0;do s=e+(n-e)/2,o=wl(s,r,i)-t,o>0?n=s:e=s;while(Math.abs(o)>Um&&++a<zm);return s}function Xn(t,e,n,r){if(t===e&&n===r)return ce;const i=o=>qm(o,0,1,t,n);return o=>o===0||o===1?o:wl(i(o),e,r)}const _l=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,xl=t=>e=>1-t(1-e),Sl=Xn(.33,1.53,.69,.99),_o=xl(Sl),El=_l(_o),Al=t=>(t*=2)<1?.5*_o(t):.5*(2-Math.pow(2,-10*(t-1))),xo=t=>1-Math.sin(Math.acos(t)),Tl=xl(xo),Pl=_l(xo),Wm=Xn(.42,0,1,1),Hm=Xn(0,0,.58,1),kl=Xn(.42,0,.58,1),Gm=t=>Array.isArray(t)&&typeof t[0]!="number",Ol=t=>Array.isArray(t)&&typeof t[0]=="number",Cl={linear:ce,easeIn:Wm,easeInOut:kl,easeOut:Hm,circIn:xo,circInOut:Pl,circOut:Tl,backIn:_o,backInOut:El,backOut:Sl,anticipate:Al},Km=t=>typeof t=="string",Il=t=>{if(Ol(t)){Dr(t.length===4);const[e,n,r,i]=t;return Xn(e,n,r,i)}else if(Km(t))return Dr(Cl[t]!==void 0),Cl[t];return t},Fr=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],Rl={value:null,addProjectionMetrics:null};function Ym(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 b=y&&i?n:r;return m&&s.add(h),b.has(h)||b.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&&Rl.value&&Rl.value.frameloop[e].push(l),l=0,n.clear(),i=!1,o&&(o=!1,c.process(h))}};return c}const Xm=40;function Ml(t,e){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=Fr.reduce((S,R)=>(S[R]=Ym(o,e?R:void 0),S),{}),{setup:a,read:l,resolveKeyframes:d,preUpdate:c,update:h,preRender:m,render:y,postRender:_}=s,b=()=>{const S=Re.useManualTiming?i.timestamp:performance.now();n=!1,Re.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(S-i.timestamp,Xm),1)),i.timestamp=S,i.isProcessing=!0,a.process(i),l.process(i),d.process(i),c.process(i),h.process(i),m.process(i),y.process(i),_.process(i),i.isProcessing=!1,n&&e&&(r=!1,t(b))},P=()=>{n=!0,r=!0,i.isProcessing||t(b)};return{schedule:Fr.reduce((S,R)=>{const O=s[R];return S[R]=(D,F=!1,q=!1)=>(n||P(),O.schedule(D,F,q)),S},{}),cancel:S=>{for(let R=0;R<Fr.length;R++)s[Fr[R]].cancel(S)},state:i,steps:s}}const{schedule:Ct,cancel:Le,state:Xt,steps:So}=Ml(typeof requestAnimationFrame<"u"?requestAnimationFrame:ce,!0);let Lr;function Jm(){Lr=void 0}const re={now:()=>(Lr===void 0&&re.set(Xt.isProcessing||Re.useManualTiming?Xt.timestamp:performance.now()),Lr),set:t=>{Lr=t,queueMicrotask(Jm)}},Nl=t=>e=>typeof e=="string"&&e.startsWith(t),Eo=Nl("--"),Zm=Nl("var(--"),Ao=t=>Zm(t)?Qm.test(t.split("/*")[0].trim()):!1,Qm=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,hn={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Jn={...hn,transform:t=>Ie(0,1,t)},jr={...hn,default:1},Zn=t=>Math.round(t*1e5)/1e5,To=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ty(t){return t==null}const ey=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Po=(t,e)=>n=>!!(typeof n=="string"&&ey.test(n)&&n.startsWith(t)||e&&!ty(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(To);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},ny=t=>Ie(0,255,t),ko={...hn,transform:t=>Math.round(ny(t))},qe={test:Po("rgb","red"),parse:Bl("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+ko.transform(t)+", "+ko.transform(e)+", "+ko.transform(n)+", "+Zn(Jn.transform(r))+")"};function ry(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 Oo={test:Po("#"),parse:ry,transform:qe.transform},Qn=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),je=Qn("deg"),_e=Qn("%"),it=Qn("px"),iy=Qn("vh"),oy=Qn("vw"),Dl={..._e,parse:t=>_e.parse(t)/100,transform:t=>_e.transform(t*100)},pn={test:Po("hsl","hue"),parse:Bl("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+_e.transform(Zn(e))+", "+_e.transform(Zn(n))+", "+Zn(Jn.transform(r))+")"},Vt={test:t=>qe.test(t)||Oo.test(t)||pn.test(t),parse:t=>qe.test(t)?qe.parse(t):pn.test(t)?pn.parse(t):Oo.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?qe.transform(t):pn.transform(t),getAnimatableNone:t=>{const e=Vt.parse(t);return e.alpha=0,Vt.transform(e)}},sy=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function ay(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(To))==null?void 0:e.length)||0)+(((n=t.match(sy))==null?void 0:n.length)||0)>0}const Fl="number",Ll="color",cy="var",ly="var(",jl="${}",uy=/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 tr(t){const e=t.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(uy,l=>(Vt.test(l)?(r.color.push(o),i.push(Ll),n.push(Vt.parse(l))):l.startsWith(ly)?(r.var.push(o),i.push(cy),n.push(l)):(r.number.push(o),i.push(Fl),n.push(parseFloat(l))),++o,jl)).split(jl);return{values:n,split:a,indexes:r,types:i}}function Vl(t){return tr(t).values}function $l(t){const{split:e,types:n}=tr(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+=Zn(i[s]):a===Ll?o+=Vt.transform(i[s]):o+=i[s]}return o}}const fy=t=>typeof t=="number"?0:Vt.test(t)?Vt.getAnimatableNone(t):t;function dy(t){const e=Vl(t);return $l(t)(e.map(fy))}const Ve={test:ay,parse:Vl,createTransformer:$l,getAnimatableNone:dy};function Co(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 hy({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=Co(l,a,t+1/3),o=Co(l,a,t),s=Co(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}function Vr(t,e){return n=>n>0?e:t}const Mt=(t,e,n)=>t+(e-t)*n,Io=(t,e,n)=>{const r=t*t,i=n*(e*e-r)+r;return i<0?0:Math.sqrt(i)},py=[Oo,qe,pn],my=t=>py.find(e=>e.test(t));function Ul(t){const e=my(t);if(!e)return!1;let n=e.parse(t);return e===pn&&(n=hy(n)),n}const zl=(t,e)=>{const n=Ul(t),r=Ul(e);if(!n||!r)return Vr(t,e);const i={...n};return o=>(i.red=Io(n.red,r.red,o),i.green=Io(n.green,r.green,o),i.blue=Io(n.blue,r.blue,o),i.alpha=Mt(n.alpha,r.alpha,o),qe.transform(i))},Ro=new Set(["none","hidden"]);function yy(t,e){return Ro.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function gy(t,e){return n=>Mt(t,e,n)}function Mo(t){return typeof t=="number"?gy:typeof t=="string"?Ao(t)?Vr:Vt.test(t)?zl:wy:Array.isArray(t)?ql:typeof t=="object"?Vt.test(t)?zl:vy:Vr}function ql(t,e){const n=[...t],r=n.length,i=t.map((o,s)=>Mo(o)(o,e[s]));return o=>{for(let s=0;s<r;s++)n[s]=i[s](o);return n}}function vy(t,e){const n={...t,...e},r={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(r[i]=Mo(t[i])(t[i],e[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}}function by(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 wy=(t,e)=>{const n=Ve.createTransformer(e),r=tr(t),i=tr(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?Ro.has(t)&&!i.values.length||Ro.has(e)&&!r.values.length?yy(t,e):Kn(ql(by(r,i),i.values),n):Vr(t,e)};function Wl(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?Mt(t,e,n):Mo(t)(t,e)}const _y=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>Ct.update(e,n),stop:()=>Le(e),now:()=>Xt.isProcessing?Xt.timestamp:re.now()}},Hl=(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)})`},$r=2e4;function No(t){let e=0;const n=50;let r=t.next(e);for(;!r.done&&e<$r;)e+=n,r=t.next(e);return e>=$r?1/0:e}function xy(t,e=100,n){const r=n({...t,keyframes:[0,e]}),i=Math.min(No(r),$r);return{type:"keyframes",ease:o=>r.next(i*o).value/e,duration:we(i)}}const Sy=5;function Gl(t,e,n){const r=Math.max(e-Sy,0);return bl(n-t(r),e-r)}const Nt={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},Bo=.001;function Ey({duration:t=Nt.duration,bounce:e=Nt.bounce,velocity:n=Nt.velocity,mass:r=Nt.mass}){let i,o,s=1-e;s=Ie(Nt.minDamping,Nt.maxDamping,s),t=Ie(Nt.minDuration,Nt.maxDuration,we(t)),s<1?(i=d=>{const c=d*s,h=c*t,m=c-n,y=Do(d,s),_=Math.exp(-h);return Bo-m/y*_},o=d=>{const h=d*s*t,m=h*n+n,y=Math.pow(s,2)*Math.pow(d,2)*t,_=Math.exp(-h),b=Do(Math.pow(d,2),s);return(-i(d)+Bo>0?-1:1)*((m-y)*_)/b}):(i=d=>{const c=Math.exp(-d*t),h=(d-n)*t+1;return-Bo+c*h},o=d=>{const c=Math.exp(-d*t),h=(n-d)*(t*t);return c*h});const a=5/t,l=Ty(i,o,a);if(t=be(t),isNaN(l))return{stiffness:Nt.stiffness,damping:Nt.damping,duration:t};{const d=Math.pow(l,2)*r;return{stiffness:d,damping:s*2*Math.sqrt(r*d),duration:t}}}const Ay=12;function Ty(t,e,n){let r=n;for(let i=1;i<Ay;i++)r=r-t(r)/e(r);return r}function Do(t,e){return t*Math.sqrt(1-e*e)}const Py=["duration","bounce"],ky=["stiffness","damping","mass"];function Kl(t,e){return e.some(n=>t[n]!==void 0)}function Oy(t){let e={velocity:Nt.velocity,stiffness:Nt.stiffness,damping:Nt.damping,mass:Nt.mass,isResolvedFromDuration:!1,...t};if(!Kl(t,ky)&&Kl(t,Py))if(t.visualDuration){const n=t.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,o=2*Ie(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:Nt.mass,stiffness:i,damping:o}}else{const n=Ey(t);e={...e,...n,mass:Nt.mass},e.isResolvedFromDuration=!0}return e}function Ur(t=Nt.visualDuration,e=Nt.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}=Oy({...n,velocity:-we(n.velocity||0)}),_=m||0,b=d/(2*Math.sqrt(l*c)),P=s-o,x=we(Math.sqrt(l/c)),v=Math.abs(P)<5;r||(r=v?Nt.restSpeed.granular:Nt.restSpeed.default),i||(i=v?Nt.restDelta.granular:Nt.restDelta.default);let S;if(b<1){const O=Do(x,b);S=D=>{const F=Math.exp(-b*x*D);return s-F*((_+b*x*P)/O*Math.sin(O*D)+P*Math.cos(O*D))}}else if(b===1)S=O=>s-Math.exp(-x*O)*(P+(_+x*P)*O);else{const O=x*Math.sqrt(b*b-1);S=D=>{const F=Math.exp(-b*x*D),q=Math.min(O*D,300);return s-F*((_+b*x*P)*Math.sinh(q)+O*P*Math.cosh(q))/O}}const R={calculatedDuration:y&&h||null,next:O=>{const D=S(O);if(y)a.done=O>=h;else{let F=O===0?_:0;b<1&&(F=O===0?be(_):Gl(S,O,D));const q=Math.abs(F)<=r,L=Math.abs(s-D)<=i;a.done=q&&L}return a.value=a.done?s:D,a},toString:()=>{const O=Math.min(No(R),$r),D=Hl(F=>R.next(O*F).value,O,30);return O+"ms "+D},toTransition:()=>{}};return R}Ur.applyToOptions=t=>{const e=xy(t,100,Ur);return t.ease=e.ease,t.duration=be(e.duration),t.type="keyframes",t};function Fo({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=q=>a!==void 0&&q<a||l!==void 0&&q>l,_=q=>a===void 0?l:l===void 0||Math.abs(a-q)<Math.abs(l-q)?a:l;let b=n*e;const P=h+b,x=s===void 0?P:s(P);x!==P&&(b=x-h);const v=q=>-b*Math.exp(-q/r),S=q=>x+v(q),R=q=>{const L=v(q),Y=S(q);m.done=Math.abs(L)<=d,m.value=m.done?x:Y};let O,D;const F=q=>{y(m.value)&&(O=q,D=Ur({keyframes:[m.value,_(m.value)],velocity:Gl(S,q,m.value),damping:i,stiffness:o,restDelta:d,restSpeed:c}))};return F(0),{calculatedDuration:null,next:q=>{let L=!1;return!D&&O===void 0&&(L=!0,R(q),F(q)),O!==void 0&&q>=O?D.next(q-O):(!L&&R(q),m)}}}function Cy(t,e,n){const r=[],i=n||Re.mix||Wl,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]||ce:e;a=Kn(l,a)}r.push(a)}return r}function Iy(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=Cy(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=Yn(t[h],t[h+1],c);return a[h](m)};return n?c=>d(Ie(t[0],t[o-1],c)):d}function Ry(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const i=Yn(0,e,r);t.push(Mt(n,1,i))}}function My(t){const e=[0];return Ry(e,t.length-1),e}function Ny(t,e){return t.map(n=>n*e)}function By(t,e){return t.map(()=>e||kl).splice(0,t.length-1)}function er({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const i=Gm(r)?r.map(Il):Il(r),o={done:!1,value:e[0]},s=Ny(n&&n.length===e.length?n:My(e),t),a=Iy(s,e,{ease:Array.isArray(i)?i:By(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}const Dy=t=>t!==null;function Lo(t,{repeat:e,repeatType:n="loop"},r,i=1){const o=t.filter(Dy),a=i<0||e&&n!=="loop"&&e%2===1?0:o.length-1;return!a||r===void 0?o[a]:r}const Fy={decay:Fo,inertia:Fo,tween:er,keyframes:er,spring:Ur};function Yl(t){typeof t.type=="string"&&(t.type=Fy[t.type])}class jo{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 Ly=t=>t/100;class Vo extends jo{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!==re.now()&&this.tick(re.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;Yl(e);const{type:n=er,repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:s=0}=e;let{keyframes:a}=e;const l=n||er;l!==er&&typeof a[0]!="number"&&(this.mixKeyframes=Kn(Ly,Wl(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=No(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:_,onUpdate:b,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 S=this.currentTime,R=r;if(h){const q=Math.min(this.currentTime,i)/a;let L=Math.floor(q),Y=q%1;!Y&&q>=1&&(Y=1),Y===1&&L--,L=Math.min(L,h+1),!!(L%2)&&(m==="reverse"?(Y=1-Y,y&&(Y-=y/a)):m==="mirror"&&(R=s)),S=Ie(0,1,Y)*a}const O=v?{done:!1,value:c[0]}:R.next(S);o&&(O.value=o(O.value));let{done:D}=O;!v&&l!==null&&(D=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const F=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&D);return F&&_!==Fo&&(O.value=Lo(c,this.options,P,this.speed)),b&&b(O.value),F&&this.finish(),O}then(e,n){return this.finished.then(e,n)}get duration(){return we(this.calculatedDuration)}get time(){return we(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(re.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=we(this.currentTime))}play(){var i,o;if(this.isStopped)return;const{driver:e=_y,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(re.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 jy(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const We=t=>t*180/Math.PI,$o=t=>{const e=We(Math.atan2(t[1],t[0]));return Uo(e)},Vy={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:$o,rotateZ:$o,skewX:t=>We(Math.atan(t[1])),skewY:t=>We(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Uo=t=>(t=t%360,t<0&&(t+=360),t),Xl=$o,Jl=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Zl=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),$y={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Jl,scaleY:Zl,scale:t=>(Jl(t)+Zl(t))/2,rotateX:t=>Uo(We(Math.atan2(t[6],t[5]))),rotateY:t=>Uo(We(Math.atan2(-t[2],t[0]))),rotateZ:Xl,rotate:Xl,skewX:t=>We(Math.atan(t[4])),skewY:t=>We(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function zo(t){return t.includes("scale")?1:0}function qo(t,e){if(!t||t==="none")return zo(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=$y,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Vy,i=a}if(!i)return zo(e);const o=r[e],s=i[1].split(",").map(zy);return typeof o=="function"?o(s):s[o]}const Uy=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return qo(n,e)};function zy(t){return parseFloat(t.trim())}const mn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],yn=new Set(mn),Ql=t=>t===hn||t===it,qy=new Set(["x","y","z"]),Wy=mn.filter(t=>!qy.has(t));function Hy(t){const e=[];return Wy.forEach(n=>{const r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e}const He={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})=>qo(e,"x"),y:(t,{transform:e})=>qo(e,"y")};He.translateX=He.x,He.translateY=He.y;const Ge=new Set;let Wo=!1,Ho=!1,Go=!1;function tu(){if(Ho){const t=Array.from(Ge).filter(r=>r.needsMeasurement),e=new Set(t.map(r=>r.element)),n=new Map;e.forEach(r=>{const i=Hy(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)})}Ho=!1,Wo=!1,Ge.forEach(t=>t.complete(Go)),Ge.clear()}function eu(){Ge.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Ho=!0)})}function Gy(){Go=!0,eu(),tu(),Go=!1}class Ko{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?(Ge.add(this),Wo||(Wo=!0,Ct.read(eu),Ct.resolveKeyframes(tu))):(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])}jy(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Ge.delete(this)}cancel(){this.state==="scheduled"&&(Ge.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Ky=t=>t.startsWith("--");function Yy(t,e,n){Ky(e)?t.style.setProperty(e,n):t.style[e]=n}const Xy=bo(()=>window.ScrollTimeline!==void 0),Jy={};function Zy(t,e){const n=bo(t);return()=>Jy[e]??n()}const nu=Zy(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),nr=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,ru={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:nr([0,.65,.55,1]),circOut:nr([.55,0,1,.45]),backIn:nr([.31,.01,.66,-.59]),backOut:nr([.33,1.53,.69,.99])};function iu(t,e){if(t)return typeof t=="function"?nu()?Hl(t,e):"ease-out":Ol(t)?nr(t):Array.isArray(t)?t.map(n=>iu(n,e)||ru.easeOut):ru[t]}function Qy(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=iu(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 ou(t){return typeof t=="function"&&"applyToOptions"in t}function tg({type:t,...e}){return ou(t)&&nu()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class eg extends jo{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,Dr(typeof e.type!="string");const d=tg(e);this.animation=Qy(n,r,i,d,o),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const c=Lo(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):Yy(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 we(Number(e))}get time(){return we(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&&Xy()?(this.animation.timeline=e,ce):n(this)}}const su={anticipate:Al,backInOut:El,circInOut:Pl};function ng(t){return t in su}function rg(t){typeof t.ease=="string"&&ng(t.ease)&&(t.ease=su[t.ease])}const au=10;class ig extends eg{constructor(e){rg(e),Yl(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 Vo({...s,autoplay:!1}),l=be(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-au).value,a.sample(l).value,au),a.stop()}}const cu=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Ve.test(t)||t==="0")&&!t.startsWith("url("));function og(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 sg(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=cu(i,e),a=cu(o,e);return!s||!a?!1:og(t)||(n==="spring"||ou(n))&&r}function Yo(t){t.duration=0,t.type}const ag=new Set(["opacity","clipPath","filter","transform"]),cg=bo(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function lg(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 cg()&&n&&ag.has(n)&&(n!=="transform"||!d)&&!l&&!r&&i!=="mirror"&&o!==0&&s!=="inertia"}const ug=40;class fg extends jo{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 _;super(),this.stop=()=>{var b,P;this._animation&&(this._animation.stop(),(b=this.stopTimeline)==null||b.call(this)),(P=this.keyframeResolver)==null||P.cancel()},this.createdAt=re.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)||Ko;this.keyframeResolver=new y(a,(b,P,x)=>this.onKeyframesResolved(b,P,m,!x),l,d,c),(_=this.keyframeResolver)==null||_.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=re.now(),sg(e,o,s,a)||((Re.instantAnimations||!l)&&(c==null||c(Lo(e,r,n))),e[0]=e[e.length-1],Yo(r),r.repeat=0);const m={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>ug?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:e},y=!d&&lg(m)?new ig({...m,element:m.motionValue.owner.current}):new Vo(m);y.finished.then(()=>this.notifyFinished()).catch(ce),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(),Gy()),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 dg=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function hg(t){const e=dg.exec(t);if(!e)return[,];const[,n,r,i]=e;return[`--${n??r}`,i]}function lu(t,e,n=1){const[r,i]=hg(t);if(!r)return;const o=window.getComputedStyle(e).getPropertyValue(r);if(o){const s=o.trim();return yl(s)?parseFloat(s):s}return Ao(i)?lu(i,e,n+1):i}function Xo(t,e){return(t==null?void 0:t[e])??(t==null?void 0:t.default)??t}const uu=new Set(["width","height","top","left","right","bottom",...mn]),pg={test:t=>t==="auto",parse:t=>t},fu=t=>e=>e.test(t),du=[hn,it,_e,je,oy,iy,pg],hu=t=>du.find(fu(t));function mg(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||vl(t):!0}const yg=new Set(["brightness","contrast","saturate","opacity"]);function gg(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(To)||[];if(!r)return t;const i=n.replace(r,"");let o=yg.has(e)?1:0;return r!==n&&(o*=100),e+"("+o+i+")"}const vg=/\b([a-z-]*)\(.*?\)/gu,Jo={...Ve,getAnimatableNone:t=>{const e=t.match(vg);return e?e.map(gg).join(" "):t}},pu={...hn,transform:Math.round},Zo={borderWidth:it,borderTopWidth:it,borderRightWidth:it,borderBottomWidth:it,borderLeftWidth:it,borderRadius:it,radius:it,borderTopLeftRadius:it,borderTopRightRadius:it,borderBottomRightRadius:it,borderBottomLeftRadius:it,width:it,maxWidth:it,height:it,maxHeight:it,top:it,right:it,bottom:it,left:it,padding:it,paddingTop:it,paddingRight:it,paddingBottom:it,paddingLeft:it,margin:it,marginTop:it,marginRight:it,marginBottom:it,marginLeft:it,backgroundPositionX:it,backgroundPositionY:it,...{rotate:je,rotateX:je,rotateY:je,rotateZ:je,scale:jr,scaleX:jr,scaleY:jr,scaleZ:jr,skew:je,skewX:je,skewY:je,distance:it,translateX:it,translateY:it,translateZ:it,x:it,y:it,z:it,perspective:it,transformPerspective:it,opacity:Jn,originX:Dl,originY:Dl,originZ:it},zIndex:pu,fillOpacity:Jn,strokeOpacity:Jn,numOctaves:pu},bg={...Zo,color:Vt,backgroundColor:Vt,outlineColor:Vt,fill:Vt,stroke:Vt,borderColor:Vt,borderTopColor:Vt,borderRightColor:Vt,borderBottomColor:Vt,borderLeftColor:Vt,filter:Jo,WebkitFilter:Jo},mu=t=>bg[t];function yu(t,e){let n=mu(t);return n!==Jo&&(n=Ve),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const wg=new Set(["auto","none","0"]);function _g(t,e,n){let r=0,i;for(;r<t.length&&!i;){const o=t[r];typeof o=="string"&&!wg.has(o)&&tr(o).values.length&&(i=t[r]),r++}if(i&&n)for(const o of e)t[o]=yu(n,i)}class xg extends Ko{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(),Ao(d))){const c=lu(d,n.current);c!==void 0&&(e[l]=c),l===e.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!uu.has(r)||e.length!==2)return;const[i,o]=e,s=hu(i),a=hu(o);if(s!==a)if(Ql(s)&&Ql(a))for(let l=0;l<e.length;l++){const d=e[l];typeof d=="string"&&(e[l]=parseFloat(d))}else He[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,r=[];for(let i=0;i<e.length;i++)(e[i]===null||mg(e[i]))&&r.push(i);r.length&&_g(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=He[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]=He[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 Sg(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 gu=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function vu(t){return gl(t)&&"offsetHeight"in t}const bu=30,Eg=t=>!isNaN(parseFloat(t));class Ag{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var o;const i=re.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=re.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Eg(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 wo);const r=this.events[e].add(n);return e==="change"?()=>{r(),Ct.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=re.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 gn(t,e){return new Ag(t,e)}const{schedule:Qo,cancel:GE}=Ml(queueMicrotask,!1),pe={x:!1,y:!1};function wu(){return pe.x||pe.y}function Tg(t){return t==="x"||t==="y"?pe[t]?null:(pe[t]=!0,()=>{pe[t]=!1}):pe.x||pe.y?null:(pe.x=pe.y=!0,()=>{pe.x=pe.y=!1})}function _u(t,e){const n=Sg(t),r=new AbortController,i={passive:!0,...e,signal:r.signal};return[n,i,()=>r.abort()]}function xu(t){return!(t.pointerType==="touch"||wu())}function Pg(t,e,n={}){const[r,i,o]=_u(t,n),s=a=>{if(!xu(a))return;const{target:l}=a,d=e(l,a);if(typeof d!="function"||!l)return;const c=h=>{xu(h)&&(d(h),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,i)};return r.forEach(a=>{a.addEventListener("pointerenter",s,i)}),o}const Su=(t,e)=>e?t===e?!0:Su(t,e.parentElement):!1,ts=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,kg=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Og(t){return kg.has(t.tagName)||t.tabIndex!==-1}const zr=new WeakSet;function Eu(t){return e=>{e.key==="Enter"&&t(e)}}function es(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Cg=(t,e)=>{const n=t.currentTarget;if(!n)return;const r=Eu(()=>{if(zr.has(n))return;es(n,"down");const i=Eu(()=>{es(n,"up")}),o=()=>es(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 Au(t){return ts(t)&&!wu()}function Ig(t,e,n={}){const[r,i,o]=_u(t,n),s=a=>{const l=a.currentTarget;if(!Au(a))return;zr.add(l);const d=e(l,a),c=(y,_)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",m),zr.has(l)&&zr.delete(l),Au(y)&&typeof d=="function"&&d(y,{success:_})},h=y=>{c(y,l===window||l===document||n.useGlobalTarget||Su(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),vu(a)&&(a.addEventListener("focus",d=>Cg(d,i)),!Og(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function Tu(t){return gl(t)&&"ownerSVGElement"in t}function Rg(t){return Tu(t)&&t.tagName==="svg"}const Zt=t=>!!(t&&t.getVelocity),Mg=[...du,Vt,Ve],Ng=t=>Mg.find(fu(t)),ns=te({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});class Bg extends oe{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const r=n.offsetParent,i=vu(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 Dg({children:t,isPresent:e,anchorX:n,root:r}){const i=un(),o=ot(null),s=ot({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=jt(ns);return Hn(()=>{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 _=document.createElement("style");a&&(_.nonce=a);const b=r??document.head;return b.appendChild(_),_.sheet&&_.sheet.insertRule(`
2
2
  [data-motion-pop-id="${i}"] {
3
3
  position: absolute !important;
4
4
  width: ${l}px !important;
@@ -6,72 +6,72 @@
6
6
  ${y}px !important;
7
7
  top: ${c}px !important;
8
8
  }
9
- `),()=>{w.contains(_)&&w.removeChild(_)}},[e]),M(kg,{isPresent:e,childRef:o,sizeRef:s,children:ho(t,{ref:o})})}const Cg=({children:t,initial:e,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s,anchorX:a,root:l})=>{const d=mo(Ig),c=un();let h=!0,m=qt(()=>(h=!1,{id:c,initial:e,isPresent:n,custom:i,onExitComplete:y=>{d.set(y,!0);for(const _ of d.values())if(!_)return;r&&r()},register:y=>(d.set(y,!1),()=>d.delete(y))}),[n,d,r]);return o&&h&&(m={...m}),qt(()=>{d.forEach((y,_)=>d.set(_,!1))},[n]),yt(()=>{!n&&!d.size&&r&&r()},[n]),s==="popLayout"&&(t=M(Og,{isPresent:n,anchorX:a,root:l,children:t})),M(Dr.Provider,{value:m,children:t})};function Ig(){return new Map}function Eu(t=!0){const e=jt(Dr);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=e,o=un();yt(()=>{if(t)return i(o)},[t]);const s=kt(()=>t&&r&&r(o),[o,r,t]);return!n&&r?[!1,s]:[!0]}const Wr=t=>t.key||"";function Au(t){const e=[];return lo.forEach(t,n=>{dn(n)&&e.push(n)}),e}const Tu=({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]=Eu(s),h=qt(()=>Au(t),[t]),m=s&&!d?[]:h.map(Wr),y=ot(!0),_=ot(h),w=mo(()=>new Map),[k,x]=wt(h),[v,S]=wt(h);dl(()=>{y.current=!1,_.current=h;for(let B=0;B<v.length;B++){const L=Wr(v[B]);m.includes(L)?w.delete(L):w.get(L)!==!0&&w.set(L,!1)}},[v,m.length,m.join("-")]);const R=[];if(h!==k){let B=[...h];for(let L=0;L<v.length;L++){const W=v[L],F=Wr(W);m.includes(F)||(B.splice(L,0,W),R.push(W))}return o==="wait"&&R.length&&(B=R),S(Au(B)),x(h),null}const{forceRender:O}=jt(po);return M(Ot,{children:v.map(B=>{const L=Wr(B),W=s&&!d?!1:h===v||m.includes(L),F=()=>{if(w.has(L))w.set(L,!0);else return;let Y=!0;w.forEach(Z=>{Z||(Y=!1)}),Y&&(O==null||O(),S(_.current),s&&(c==null||c()),r&&r())};return M(Cg,{isPresent:W,initial:!y.current||n?void 0:!1,custom:e,presenceAffectsLayout:i,mode:o,root:l,onExitComplete:W?void 0:F,anchorX:a,children:B},L)})})},Pu=te({strict:!1}),ku={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"]},vn={};for(const t in ku)vn[t]={isEnabled:e=>ku[t].some(n=>!!e[n])};function Rg(t){for(const e in t)vn[e]={...vn[e],...t[e]}}const Mg=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 qr(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Mg.has(t)}let Ou=t=>!qr(t);function Ng(t){typeof t=="function"&&(Ou=e=>e.startsWith("on")?!qr(e):t(e))}try{Ng(require("@emotion/is-prop-valid").default)}catch{}function Dg(t,e,n){const r={};for(const i in t)i==="values"&&typeof t.values=="object"||(Ou(i)||n===!0&&qr(i)||!e&&!qr(i)||t.draggable&&i.startsWith("onDrag"))&&(r[i]=t[i]);return r}const Hr=te({});function Gr(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function rr(t){return typeof t=="string"||Array.isArray(t)}const rs=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],is=["initial",...rs];function Kr(t){return Gr(t.animate)||is.some(e=>rr(t[e]))}function Cu(t){return!!(Kr(t)||t.variants)}function Bg(t,e){if(Kr(t)){const{initial:n,animate:r}=t;return{initial:n===!1||rr(n)?n:void 0,animate:rr(r)?r:void 0}}return t.inherit!==!1?e:{}}function Lg(t){const{initial:e,animate:n}=Bg(t,jt(Hr));return qt(()=>({initial:e,animate:n}),[Iu(e),Iu(n)])}function Iu(t){return Array.isArray(t)?t.join(" "):t}const ir={};function Fg(t){for(const e in t)ir[e]=t[e],Eo(e)&&(ir[e].isCSSVariable=!0)}function Ru(t,{layout:e,layoutId:n}){return yn.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!ir[t]||t==="opacity")}const jg={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Vg=mn.length;function $g(t,e,n){let r="",i=!0;for(let o=0;o<Vg;o++){const s=mn[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=pu(a,Zo[s]);if(!l){i=!1;const c=jg[s]||s;r+=`${c}(${d}) `}n&&(e[s]=d)}}return r=r.trim(),n?r=n(e,i?"":r):i&&(r="none"),r}function os(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(yn.has(l)){s=!0;continue}else if(Eo(l)){i[l]=d;continue}else{const c=pu(d,Zo[l]);l.startsWith("origin")?(a=!0,o[l]=c):r[l]=c}}if(e.transform||(s||n?r.transform=$g(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 ss=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Mu(t,e,n){for(const r in e)!Zt(e[r])&&!Ru(r,n)&&(t[r]=e[r])}function Ug({transformTemplate:t},e){return qt(()=>{const n=ss();return os(n,e,t),Object.assign({},n.vars,n.style)},[e])}function zg(t,e){const n=t.style||{},r={};return Mu(r,n,t),Object.assign(r,Ug(t,e)),r}function Wg(t,e){const n={},r=zg(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 qg={offset:"stroke-dashoffset",array:"stroke-dasharray"},Hg={offset:"strokeDashoffset",array:"strokeDasharray"};function Gg(t,e,n=1,r=0,i=!0){t.pathLength=1;const o=i?qg:Hg;t[o.offset]=it.transform(-r);const s=it.transform(e),a=it.transform(n);t[o.array]=`${s} ${a}`}function Nu(t,{attrX:e,attrY:n,attrScale:r,pathLength:i,pathSpacing:o=1,pathOffset:s=0,...a},l,d,c){if(os(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&&Gg(h,i,o,s,!1)}const Du=()=>({...ss(),attrs:{}}),Bu=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Kg(t,e,n,r){const i=qt(()=>{const o=Du();return Nu(o,e,Bu(r),t.transformTemplate,t.style),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};Mu(o,t.style,t),i.style={...o,...i.style}}return i}const Yg=["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 as(t){return typeof t!="string"||t.includes("-")?!1:!!(Yg.indexOf(t)>-1||/[A-Z]/u.test(t))}function Xg(t,e,n,{latestValues:r},i,o=!1){const a=(as(t)?Kg:Wg)(e,r,i,t),l=Dg(e,typeof t=="string",o),d=t!==Ot?{...l,...a,ref:n}:{},{children:c}=e,h=qt(()=>Zt(c)?c.get():c,[c]);return nt(t,{...d,children:h})}function Lu(t){const e=[{},{}];return t==null||t.values.forEach((n,r)=>{e[0][r]=n.get(),e[1][r]=n.getVelocity()}),e}function cs(t,e,n,r){if(typeof e=="function"){const[i,o]=Lu(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]=Lu(r);e=e(n!==void 0?n:t.custom,i,o)}return e}function Yr(t){return Zt(t)?t.get():t}function Jg({scrapeMotionValuesFromProps:t,createRenderState:e},n,r,i){return{latestValues:Zg(n,r,i,t),renderState:e()}}function Zg(t,e,n,r){const i={},o=r(t,{});for(const m in o)i[m]=Yr(o[m]);let{initial:s,animate:a}=t;const l=Kr(t),d=Cu(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"&&!Gr(h)){const m=Array.isArray(h)?h:[h];for(let y=0;y<m.length;y++){const _=cs(t,m[y]);if(_){const{transitionEnd:w,transition:k,...x}=_;for(const v in x){let S=x[v];if(Array.isArray(S)){const R=c?S.length-1:0;S=S[R]}S!==null&&(i[v]=S)}for(const v in w)i[v]=w[v]}}}return i}const Fu=t=>(e,n)=>{const r=jt(Hr),i=jt(Dr),o=()=>Jg(t,e,r,i);return n?o():mo(o)};function ls(t,e,n){var o;const{style:r}=t,i={};for(const s in r)(Zt(r[s])||e.style&&Zt(e.style[s])||Ru(s,t)||((o=n==null?void 0:n.getValue(s))==null?void 0:o.liveStyle)!==void 0)&&(i[s]=r[s]);return i}const Qg=Fu({scrapeMotionValuesFromProps:ls,createRenderState:ss});function ju(t,e,n){const r=ls(t,e,n);for(const i in t)if(Zt(t[i])||Zt(e[i])){const o=mn.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=t[i]}return r}const t0=Fu({scrapeMotionValuesFromProps:ju,createRenderState:Du}),e0=Symbol.for("motionComponentSymbol");function bn(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function n0(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):bn(n)&&(n.current=r))},[e])}const us=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Vu="data-"+us("framerAppearId"),$u=te({});function r0(t,e,n,r,i){var w,k;const{visualElement:o}=jt(Hr),s=jt(Pu),a=jt(Dr),l=jt(ns).reducedMotion,d=ot(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=jt($u);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&i0(d.current,n,i,h);const m=ot(!1);Hn(()=>{c&&m.current&&c.update(n,a)});const y=n[Vu],_=ot(!!y&&!((w=window.MotionHandoffIsComplete)!=null&&w.call(window,y))&&((k=window.MotionHasOptimisedAnimation)==null?void 0:k.call(window,y)));return dl(()=>{c&&(m.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),_.current&&c.animationState&&c.animationState.animateChanges())}),yt(()=>{c&&(!_.current&&c.animationState&&c.animationState.animateChanges(),_.current&&(queueMicrotask(()=>{var x;(x=window.MotionHandoffMarkAsComplete)==null||x.call(window,y)}),_.current=!1),c.enteringChildren=void 0)}),c}function i0(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:Uu(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!s||a&&bn(a),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:c,layoutScroll:l,layoutRoot:d})}function Uu(t){if(t)return t.options.allowProjection!==!1?t.projection:Uu(t.parent)}function fs(t,{forwardMotionProps:e=!1}={},n,r){n&&Rg(n);const i=as(t)?t0:Qg;function o(a,l){let d;const c={...jt(ns),...a,layoutId:o0(a)},{isStatic:h}=c,m=Lg(a),y=i(a,h);if(!h&&yo){s0();const _=a0(c);d=_.MeasureLayout,m.visualElement=r0(t,y,c,r,_.ProjectionNode)}return M(Hr.Provider,{value:m,children:[d&&m.visualElement?M(d,{visualElement:m.visualElement,...c}):null,Xg(t,a,n0(y,m.visualElement,l),y,h,e)]})}o.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const s=Le(o);return s[e0]=t,s}function o0({layoutId:t}){const e=jt(po).id;return e&&t!==void 0?e+"-"+t:t}function s0(t,e){jt(Pu).strict}function a0(t){const{drag:e,layout:n}=vn;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 c0(t,e){if(typeof Proxy>"u")return fs;const n=new Map,r=(o,s)=>fs(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,fs(s,void 0,t,e)),n.get(s))})}function zu({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function l0({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function u0(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 ds(t){return t===void 0||t===1}function hs({scale:t,scaleX:e,scaleY:n}){return!ds(t)||!ds(e)||!ds(n)}function Ke(t){return hs(t)||Wu(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Wu(t){return qu(t.x)||qu(t.y)}function qu(t){return t&&t!=="0%"}function Xr(t,e,n){const r=t-n,i=e*r;return n+i}function Hu(t,e,n,r,i){return i!==void 0&&(t=Xr(t,i,r)),Xr(t,n,r)+e}function ps(t,e=0,n=1,r,i){t.min=Hu(t.min,e,n,r,i),t.max=Hu(t.max,e,n,r,i)}function Gu(t,{x:e,y:n}){ps(t.x,e.translate,e.scale,e.originPoint),ps(t.y,n.translate,n.scale,n.originPoint)}const Ku=.999999999999,Yu=1.0000000000001;function f0(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&&_n(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(e.x*=s.x.scale,e.y*=s.y.scale,Gu(t,s)),r&&Ke(o.latestValues)&&_n(t,o.latestValues))}e.x<Yu&&e.x>Ku&&(e.x=1),e.y<Yu&&e.y>Ku&&(e.y=1)}function wn(t,e){t.min=t.min+e,t.max=t.max+e}function Xu(t,e,n,r,i=.5){const o=Mt(t.min,t.max,i);ps(t,e,n,o,r)}function _n(t,e){Xu(t.x,e.x,e.scaleX,e.scale,e.originX),Xu(t.y,e.y,e.scaleY,e.scale,e.originY)}function Ju(t,e){return zu(u0(t.getBoundingClientRect(),e))}function d0(t,e,n){const r=Ju(t,n),{scroll:i}=e;return i&&(wn(r.x,i.offset.x),wn(r.y,i.offset.y)),r}const Zu=()=>({translate:0,scale:1,origin:0,originPoint:0}),xn=()=>({x:Zu(),y:Zu()}),Qu=()=>({min:0,max:0}),Bt=()=>({x:Qu(),y:Qu()}),ms={current:null},tf={current:!1};function h0(){if(tf.current=!0,!!yo)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ms.current=t.matches;t.addEventListener("change",e),e()}else ms.current=!1}const p0=new WeakMap;function m0(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,gn(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,gn(s!==void 0?s:i,{owner:t}))}}for(const r in n)e[r]===void 0&&t.removeValue(r);return e}const ef=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class y0{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=Ko,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=re.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,Ct.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=Kr(n),this.isVariantNode=Cu(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,p0.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)),tf.current||h0(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ms.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=yn.has(e);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",s=>{this.latestValues[e]=s,this.props.onUpdate&&Ct.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 vn){const n=vn[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):Bt()}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<ef.length;r++){const i=ef[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=m0(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=gn(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"&&(hl(r)||ml(r))?r=parseFloat(r):!Pg(r)&&Ve.test(n)&&(r=hu(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=cs(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 wo),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){Qo.render(this.render)}}class nf extends y0{constructor(){super(...arguments),this.KeyframeResolver=mg}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 rf(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 g0(t){return window.getComputedStyle(t)}class v0 extends nf{constructor(){super(...arguments),this.type="html",this.renderInstance=rf}readValueFromInstance(e,n){var r;if(yn.has(n))return(r=this.projection)!=null&&r.isProjecting?zo(n):Dy(e,n);{const i=g0(e),o=(Eo(n)?i.getPropertyValue(n):i[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Ju(e,n)}build(e,n,r){os(e,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,n,r){return ls(e,n,r)}}const of=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 b0(t,e,n,r){rf(t,e,void 0,r);for(const i in e.attrs)t.setAttribute(of.has(i)?i:us(i),e.attrs[i])}class w0 extends nf{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Bt}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(yn.has(n)){const r=du(n);return r&&r.default||0}return n=of.has(n)?n:us(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,r){return ju(e,n,r)}build(e,n,r){Nu(e,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(e,n,r,i){b0(e,n,r,i)}mount(e){this.isSVGTag=Bu(e.tagName),super.mount(e)}}const _0=(t,e)=>as(t)?new w0(e):new v0(e,{allowProjection:t!==Ot});function Sn(t,e,n){const r=t.getProps();return cs(r,e,n!==void 0?n:r.custom,t)}const ys=t=>Array.isArray(t);function x0(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,gn(n))}function S0(t){return ys(t)?t[t.length-1]||0:t}function E0(t,e){const n=Sn(t,e);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const s in o){const a=S0(o[s]);x0(t,s,a)}}function A0(t){return!!(Zt(t)&&t.add)}function gs(t,e){const n=t.getValue("willChange");if(A0(n))return n.add(e);if(!n&&Re.WillChange){const r=new Re.WillChange("auto");t.addValue("willChange",r),r.add(e)}}function sf(t){return t.props[Vu]}const T0=t=>t!==null;function P0(t,{repeat:e,repeatType:n="loop"},r){const i=t.filter(T0),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return!o||r===void 0?i[o]:r}const k0={type:"spring",stiffness:500,damping:25,restSpeed:10},O0=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),C0={type:"keyframes",duration:.8},I0={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},R0=(t,{keyframes:e})=>e.length>2?C0:yn.has(t)?t.startsWith("scale")?O0(e[1]):k0:I0;function M0({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 vs=(t,e,n,r={},i,o)=>s=>{const a=Xo(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};M0(a)||Object.assign(c,R0(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)&&(Yo(c),c.delay===0&&(h=!0)),(Re.instantAnimations||Re.skipAnimations)&&(h=!0,Yo(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,h&&!o&&e.get()!==void 0){const m=P0(c.keyframes,a);if(m!==void 0){Ct.update(()=>{c.onUpdate(m),c.onComplete()});return}}return a.isSync?new Vo(c):new ig(c)};function N0({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,r}function af(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&&N0(d,c))continue;const y={delay:n,...Xo(o||{},c)},_=h.get();if(_!==void 0&&!h.isAnimating&&!Array.isArray(m)&&m===_&&!y.velocity)continue;let w=!1;if(window.MotionHandoffAnimation){const x=sf(t);if(x){const v=window.MotionHandoffAnimation(x,c,Ct);v!==null&&(y.startTime=v,w=!0)}}gs(t,c),h.start(vs(c,h,m,t.shouldReduceMotion&&au.has(c)?{type:!1}:y,t,w));const k=h.animation;k&&l.push(k)}return s&&Promise.all(l).then(()=>{Ct.update(()=>{s&&E0(t,s)})}),l}function cf(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 bs(t,e,n={}){var l;const r=Sn(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(af(t,r,n)):()=>Promise.resolve(),s=t.variantChildren&&t.variantChildren.size?(d=0)=>{const{delayChildren:c=0,staggerChildren:h,staggerDirection:m}=i;return D0(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 D0(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(bs(l,e,{...s,delay:n+(typeof r=="function"?0:r)+cf(t.variantChildren,l,r,i,o)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function B0(t,e,n={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){const i=e.map(o=>bs(t,o,n));r=Promise.all(i)}else if(typeof e=="string")r=bs(t,e,n);else{const i=typeof e=="function"?Sn(t,e,n.custom):e;r=Promise.all(af(t,i,n))}return r.then(()=>{t.notify("AnimationComplete",e)})}function lf(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 L0=is.length;function uf(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?uf(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<L0;n++){const r=is[n],i=t.props[r];(rr(i)||i===!1)&&(e[r]=i)}return e}const F0=[...rs].reverse(),j0=rs.length;function V0(t){return e=>Promise.all(e.map(({animation:n,options:r})=>B0(t,n,r)))}function $0(t){let e=V0(t),n=ff(),r=!0;const i=l=>(d,c)=>{var m;const h=Sn(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=uf(t.parent)||{},h=[],m=new Set;let y={},_=1/0;for(let k=0;k<j0;k++){const x=F0[k],v=n[x],S=d[x]!==void 0?d[x]:c[x],R=rr(S),O=x===l?v.isActive:null;O===!1&&(_=k);let B=S===c[x]&&S!==d[x]&&R;if(B&&r&&t.manuallyAnimateOnMount&&(B=!1),v.protectedKeys={...y},!v.isActive&&O===null||!S&&!v.prevProp||Gr(S)||typeof S=="boolean")continue;const L=U0(v.prevProp,S);let W=L||x===l&&v.isActive&&!B&&R||k>_&&R,F=!1;const Y=Array.isArray(S)?S:[S];let Z=Y.reduce(i(x),{});O===!1&&(Z={});const{prevResolvedValues:et={}}=v,st={...et,...Z},At=at=>{W=!0,m.has(at)&&(F=!0,m.delete(at)),v.needsAnimating[at]=!0;const ht=t.getValue(at);ht&&(ht.liveStyle=!1)};for(const at in st){const ht=Z[at],U=et[at];if(y.hasOwnProperty(at))continue;let H=!1;ys(ht)&&ys(U)?H=!lf(ht,U):H=ht!==U,H?ht!=null?At(at):m.add(at):ht!==void 0&&m.has(at)?At(at):v.protectedKeys[at]=!0}v.prevProp=S,v.prevResolvedValues=Z,v.isActive&&(y={...y,...Z}),r&&t.blockInitialAnimation&&(W=!1);const dt=B&&L;W&&(!dt||F)&&h.push(...Y.map(at=>{const ht={type:x};if(typeof at=="string"&&r&&!dt&&t.manuallyAnimateOnMount&&t.parent){const{parent:U}=t,H=Sn(U,at);if(U.enteringChildren&&H){const{delayChildren:G}=H.transition||{};ht.delay=cf(U.enteringChildren,t,G)}}return{animation:at,options:ht}}))}if(m.size){const k={};if(typeof d.initial!="boolean"){const x=Sn(t,Array.isArray(d.initial)?d.initial[0]:d.initial);x&&x.transition&&(k.transition=x.transition)}m.forEach(x=>{const v=t.getBaseTarget(x),S=t.getValue(x);S&&(S.liveStyle=!0),k[x]=v??null}),h.push({animation:k})}let w=!!h.length;return r&&(d.initial===!1||d.initial===d.animate)&&!t.manuallyAnimateOnMount&&(w=!1),r=!1,w?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=ff(),r=!0}}}function U0(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!lf(e,t):!1}function Ye(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ff(){return{animate:Ye(!0),whileInView:Ye(),whileHover:Ye(),whileTap:Ye(),whileDrag:Ye(),whileFocus:Ye(),exit:Ye()}}class $e{constructor(e){this.isMounted=!1,this.node=e}update(){}}class z0 extends $e{constructor(e){super(e),e.animationState||(e.animationState=$0(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Gr(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 W0=0;class q0 extends $e{constructor(){super(...arguments),this.id=W0++}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 H0={animation:{Feature:z0},exit:{Feature:q0}};function or(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}function sr(t){return{point:{x:t.pageX,y:t.pageY}}}const G0=t=>e=>ts(e)&&t(e,sr(e));function ar(t,e,n,r){return or(t,e,G0(n),r)}const df=1e-4,K0=1-df,Y0=1+df,hf=.01,X0=0-hf,J0=0+hf;function ee(t){return t.max-t.min}function Z0(t,e,n){return Math.abs(t-e)<=n}function pf(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>=K0&&t.scale<=Y0||isNaN(t.scale))&&(t.scale=1),(t.translate>=X0&&t.translate<=J0||isNaN(t.translate))&&(t.translate=0)}function cr(t,e,n,r){pf(t.x,e.x,n.x,r?r.originX:void 0),pf(t.y,e.y,n.y,r?r.originY:void 0)}function mf(t,e,n){t.min=n.min+e.min,t.max=t.min+ee(e)}function Q0(t,e,n){mf(t.x,e.x,n.x),mf(t.y,e.y,n.y)}function yf(t,e,n){t.min=e.min-n.min,t.max=t.min+ee(e)}function lr(t,e,n){yf(t.x,e.x,n.x),yf(t.y,e.y,n.y)}function le(t){return[t("x"),t("y")]}const gf=({current:t})=>t?t.ownerDocument.defaultView:null,vf=(t,e)=>Math.abs(t-e);function tv(t,e){const n=vf(t.x,e.x),r=vf(t.y,e.y);return Math.sqrt(n**2+r**2)}class bf{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=_s(this.lastMoveEventInfo,this.history),y=this.startEvent!==null,_=tv(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!y&&!_)return;const{point:w}=m,{timestamp:k}=Xt;this.history.push({...w,timestamp:k});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=ws(y,this.transformPagePoint),Ct.update(this.updatePoint,!0)},this.handlePointerUp=(m,y)=>{this.end();const{onEnd:_,onSessionEnd:w,resumeAnimation:k}=this.handlers;if(this.dragSnapToOrigin&&k&&k(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=_s(m.type==="pointercancel"?this.lastMoveEventInfo:ws(y,this.transformPagePoint),this.history);this.startEvent&&_&&_(m,x),w&&w(m,x)},!ts(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=s,this.contextWindow=i||window;const a=sr(e),l=ws(a,this.transformPagePoint),{point:d}=l,{timestamp:c}=Xt;this.history=[{...d,timestamp:c}];const{onSessionStart:h}=n;h&&h(e,_s(l,this.history)),this.removeListeners=Kn(ar(this.contextWindow,"pointermove",this.handlePointerMove),ar(this.contextWindow,"pointerup",this.handlePointerUp),ar(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Fe(this.updatePoint)}}function ws(t,e){return e?{point:e(t.point)}:t}function wf(t,e){return{x:t.x-e.x,y:t.y-e.y}}function _s({point:t},e){return{point:t,delta:wf(t,_f(e)),offset:wf(t,ev(e)),velocity:nv(e,.1)}}function ev(t){return t[0]}function _f(t){return t[t.length-1]}function nv(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const i=_f(t);for(;n>=0&&(r=t[n],!(i.timestamp-r.timestamp>be(e)));)n--;if(!r)return{x:0,y:0};const o=we(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 rv(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 xf(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 iv(t,{top:e,left:n,bottom:r,right:i}){return{x:xf(t.x,n,i),y:xf(t.y,e,r)}}function Sf(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 ov(t,e){return{x:Sf(t.x,e.x),y:Sf(t.y,e.y)}}function sv(t,e){let n=.5;const r=ee(t),i=ee(e);return i>r?n=Yn(e.min,e.max-r,t.min):r>i&&(n=Yn(t.min,t.max-i,e.min)),Ie(0,1,n)}function av(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 xs=.35;function cv(t=xs){return t===!1?t=0:t===!0&&(t=xs),{x:Ef(t,"left","right"),y:Ef(t,"top","bottom")}}function Ef(t,e,n){return{min:Af(t,e),max:Af(t,n)}}function Af(t,e){return typeof t=="number"?t:t[e]||0}const lv=new WeakMap;class uv{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=Bt(),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(sr(h).point)},s=(h,m)=>{const{drag:y,dragPropagation:_,onDragStart:w}=this.getProps();if(y&&!_&&(this.openDragLock&&this.openDragLock(),this.openDragLock=bg(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),le(x=>{let v=this.getAxisMotionValue(x).get()||0;if(_e.test(v)){const{projection:S}=this.visualElement;if(S&&S.layout){const R=S.layout.layoutBox[x];R&&(v=ee(R)*(parseFloat(v)/100))}}this.originPoint[x]=v}),w&&Ct.postRender(()=>w(h,m)),gs(this.visualElement,"transform");const{animationState:k}=this.visualElement;k&&k.setActive("whileDrag",!0)},a=(h,m)=>{this.latestPointerEvent=h,this.latestPanInfo=m;const{dragPropagation:y,dragDirectionLock:_,onDirectionLock:w,onDrag:k}=this.getProps();if(!y&&!this.openDragLock)return;const{offset:x}=m;if(_&&this.currentDirection===null){this.currentDirection=fv(x),this.currentDirection!==null&&w&&w(this.currentDirection);return}this.updateAxis("x",m.point,x),this.updateAxis("y",m.point,x),this.visualElement.render(),k&&k(h,m)},l=(h,m)=>{this.latestPointerEvent=h,this.latestPanInfo=m,this.stop(h,m),this.latestPointerEvent=null,this.latestPanInfo=null},d=()=>le(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 bf(e,{onSessionStart:o,onStart:s,onMove:a,onSessionEnd:l,resumeAnimation:d},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:gf(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&&Ct.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||!Jr(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let s=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(s=rv(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&&bn(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=iv(r.layoutBox,e):this.constraints=!1,this.elastic=cv(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&le(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=av(r.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!bn(e))return!1;const r=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=d0(r,i.root,this.visualElement.getTransformPagePoint());let s=ov(i.layout.layoutBox,o);if(n){const a=n(l0(s));this.hasMutatedConstraints=!!a,a&&(s=zu(a))}return s}startAnimation(e){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},d=le(c=>{if(!Jr(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,_={type:"inertia",velocity:r?e[c]:0,bounceStiffness:m,bounceDamping:y,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(c,_)});return Promise.all(d).then(a)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return gs(this.visualElement,e),r.start(vs(e,r,0,n,this.visualElement,!1))}stopAnimation(){le(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){le(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){le(n=>{const{drag:r}=this.getProps();if(!Jr(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(!bn(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};le(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();i[s]=sv({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(),le(s=>{if(!Jr(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;lv.set(this.visualElement,this);const e=this.visualElement.current,n=ar(e,"pointerdown",l=>{const{drag:d,dragListener:c=!0}=this.getProps();d&&c&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();bn(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()),Ct.read(r);const s=or(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:d})=>{this.isDragging&&d&&(le(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=xs,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:a}}}function Jr(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function fv(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class dv extends $e{constructor(e){super(e),this.removeGroupControls=ce,this.removeListeners=ce,this.controls=new uv(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ce}unmount(){this.removeGroupControls(),this.removeListeners()}}const Tf=t=>(e,n)=>{t&&Ct.postRender(()=>t(e,n))};class hv extends $e{constructor(){super(...arguments),this.removePointerDownListener=ce}onPointerDown(e){this.session=new bf(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:gf(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:Tf(e),onStart:Tf(n),onMove:r,onEnd:(o,s)=>{delete this.session,i&&Ct.postRender(()=>i(o,s))}}}mount(){this.removePointerDownListener=ar(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 Zr={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Pf(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const ur={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(it.test(t))t=parseFloat(t);else return t;const n=Pf(t,e.target.x),r=Pf(t,e.target.y);return`${n}% ${r}%`}},pv={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,i=Ve.parse(t);if(i.length>5)return r;const o=Ve.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 Ss=!1;class mv extends oe{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=e;Fg(yv),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),Ss&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Zr.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,{projection:s}=r;return s&&(s.isPresent=o,Ss=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==o?s.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?s.promote():s.relegate()||Ct.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Qo.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=e;Ss=!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 kf(t){const[e,n]=Eu(),r=jt(po);return M(mv,{...t,layoutGroup:r,switchLayoutGroup:jt($u),isPresent:e,safeToRemove:n})}const yv={borderRadius:{...ur,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ur,borderTopRightRadius:ur,borderBottomLeftRadius:ur,borderBottomRightRadius:ur,boxShadow:pv};function gv(t,e,n){const r=Zt(t)?t:gn(t);return r.start(vs("",r,e,n)),r.animation}const vv=(t,e)=>t.depth-e.depth;class bv{constructor(){this.children=[],this.isDirty=!1}add(e){go(this.children,e),this.isDirty=!0}remove(e){vo(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(vv),this.isDirty=!1,this.children.forEach(e)}}function wv(t,e){const n=re.now(),r=({timestamp:i})=>{const o=i-n;o>=e&&(Fe(r),t(o-e))};return Ct.setup(r,!0),()=>Fe(r)}const Of=["TopLeft","TopRight","BottomLeft","BottomRight"],_v=Of.length,Cf=t=>typeof t=="string"?parseFloat(t):t,If=t=>typeof t=="number"||it.test(t);function xv(t,e,n,r,i,o){i?(t.opacity=Mt(0,n.opacity??1,Sv(r)),t.opacityExit=Mt(e.opacity??1,0,Ev(r))):o&&(t.opacity=Mt(e.opacity??1,n.opacity??1,r));for(let s=0;s<_v;s++){const a=`border${Of[s]}Radius`;let l=Rf(e,a),d=Rf(n,a);if(l===void 0&&d===void 0)continue;l||(l=0),d||(d=0),l===0||d===0||If(l)===If(d)?(t[a]=Math.max(Mt(Cf(l),Cf(d),r),0),(_e.test(d)||_e.test(l))&&(t[a]+="%")):t[a]=d}(e.rotate||n.rotate)&&(t.rotate=Mt(e.rotate||0,n.rotate||0,r))}function Rf(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Sv=Mf(0,.5,Sl),Ev=Mf(.5,.95,ce);function Mf(t,e,n){return r=>r<t?0:r>e?1:n(Yn(t,e,r))}function Nf(t,e){t.min=e.min,t.max=e.max}function ue(t,e){Nf(t.x,e.x),Nf(t.y,e.y)}function Df(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Bf(t,e,n,r,i){return t-=e,t=Xr(t,1/n,r),i!==void 0&&(t=Xr(t,1/i,r)),t}function Av(t,e=0,n=1,r=.5,i,o=t,s=t){if(_e.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=Bf(t.min,e,n,a,i),t.max=Bf(t.max,e,n,a,i)}function Lf(t,e,[n,r,i],o,s){Av(t,e[n],e[r],e[i],e.scale,o,s)}const Tv=["x","scaleX","originX"],Pv=["y","scaleY","originY"];function Ff(t,e,n,r){Lf(t.x,e,Tv,n?n.x:void 0,r?r.x:void 0),Lf(t.y,e,Pv,n?n.y:void 0,r?r.y:void 0)}function jf(t){return t.translate===0&&t.scale===1}function Vf(t){return jf(t.x)&&jf(t.y)}function $f(t,e){return t.min===e.min&&t.max===e.max}function kv(t,e){return $f(t.x,e.x)&&$f(t.y,e.y)}function Uf(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function zf(t,e){return Uf(t.x,e.x)&&Uf(t.y,e.y)}function Wf(t){return ee(t.x)/ee(t.y)}function qf(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Ov{constructor(){this.members=[]}add(e){go(this.members,e),e.scheduleRender()}remove(e){if(vo(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 Cv(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:_}=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) `),_&&(r+=`skewY(${_}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 Es=["","X","Y","Z"],Iv=1e3;let Rv=0;function As(t,e,n,r){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),r&&(r[t]=0))}function Hf(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=sf(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",Ct,!(i||o))}const{parent:r}=t;r&&!r.hasCheckedOptimisedAppear&&Hf(r)}function Gf({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},a=e==null?void 0:e()){this.id=Rv++,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(Dv),this.nodes.forEach(jv),this.nodes.forEach(Vv),this.nodes.forEach(Bv)},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 bv)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new wo),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=Su(s)&&!Ag(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;Ct.read(()=>{h=window.innerWidth}),t(s,()=>{const y=window.innerWidth;y!==h&&(h=y,this.root.updateBlockedByResize=!0,c&&c(),c=wv(m,250),Zr.hasAnimatedSinceResize&&(Zr.hasAnimatedSinceResize=!1,this.nodes.forEach(Xf)))})}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 _=this.options.transition||d.getDefaultTransition()||qv,{onLayoutAnimationStart:w,onLayoutAnimationComplete:k}=d.getProps(),x=!this.targetLayout||!zf(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 S={...Xo(_,"layout"),onPlay:w,onComplete:k};(d.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S),this.setAnimationOrigin(c,v)}else h||Xf(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(),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($v),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&&Hf(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(Kf);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Yf);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Fv),this.nodes.forEach(Mv),this.nodes.forEach(Nv)):this.nodes.forEach(Yf),this.clearAllSnapshots();const a=re.now();Xt.delta=Ie(0,1e3/60,a-Xt.timestamp),Xt.timestamp=a,Xt.isProcessing=!0,So.update.process(Xt),So.preRender.process(Xt),So.render.process(Xt),Xt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Qo.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Lv),this.sharedNodes.forEach(Uv)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ct.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ct.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=Bt(),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&&!Vf(this.projectionDelta),l=this.getTransformTemplate(),d=l?l(this.latestValues,""):void 0,c=d!==this.prevTransformTemplateValue;s&&this.instance&&(a||Ke(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)),Hv(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var d;const{visualElement:s}=this.options;if(!s)return Bt();const a=s.measureViewportBox();if(!(((d=this.scroll)==null?void 0:d.wasRoot)||this.path.some(Gv))){const{scroll:c}=this.root;c&&(wn(a.x,c.offset.x),wn(a.y,c.offset.y))}return a}removeElementScroll(s){var l;const a=Bt();if(ue(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&&ue(a,s),wn(a.x,h.offset.x),wn(a.y,h.offset.y))}return a}applyTransform(s,a=!1){const l=Bt();ue(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&&_n(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Ke(c.latestValues)&&_n(l,c.latestValues)}return Ke(this.latestValues)&&_n(l,this.latestValues),l}removeTransform(s){const a=Bt();ue(a,s);for(let l=0;l<this.path.length;l++){const d=this.path[l];if(!d.instance||!Ke(d.latestValues))continue;hs(d.latestValues)&&d.updateSnapshot();const c=Bt(),h=d.measurePageBox();ue(c,h),Ff(a,d.latestValues,d.snapshot?d.snapshot.layoutBox:void 0,c)}return Ke(this.latestValues)&&Ff(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=Bt(),this.relativeTargetOrigin=Bt(),lr(this.relativeTargetOrigin,this.layout.layoutBox,y.layout.layoutBox),ue(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Bt(),this.targetWithTransforms=Bt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Q0(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ue(this.target,this.layout.layoutBox),Gu(this.target,this.targetDelta)):ue(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=Bt(),this.relativeTargetOrigin=Bt(),lr(this.relativeTargetOrigin,this.target,y.target),ue(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||hs(this.parent.latestValues)||Wu(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 _;const s=this.getLead(),a=!!this.resumingFrom||this!==s;let l=!0;if((this.isProjectionDirty||(_=this.parent)!=null&&_.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;ue(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,m=this.treeScale.y;f0(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=Bt());const{target:y}=s;if(!y){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Df(this.prevProjectionDelta.x,this.projectionDelta.x),Df(this.prevProjectionDelta.y,this.projectionDelta.y)),cr(this.projectionDelta,this.layoutCorrected,y,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==m||!qf(this.projectionDelta.x,this.prevProjectionDelta.x)||!qf(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=xn(),this.projectionDelta=xn(),this.projectionDeltaWithTransform=xn()}setAnimationOrigin(s,a=!1){const l=this.snapshot,d=l?l.latestValues:{},c={...this.latestValues},h=xn();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const m=Bt(),y=l?l.source:void 0,_=this.layout?this.layout.source:void 0,w=y!==_,k=this.getStack(),x=!k||k.members.length<=1,v=!!(w&&!x&&this.options.crossfade===!0&&!this.path.some(Wv));this.animationProgress=0;let S;this.mixTargetDelta=R=>{const O=R/1e3;Jf(h.x,s.x,O),Jf(h.y,s.y,O),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(lr(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox),zv(this.relativeTarget,this.relativeTargetOrigin,m,O),S&&kv(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=Bt()),ue(S,this.relativeTarget)),w&&(this.animationValues=c,xv(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&&(Fe(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ct.update(()=>{Zr.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=gn(0)),this.currentAnimation=gv(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(Iv),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&&nd(this.options.animationType,this.layout.layoutBox,d.layoutBox)){l=this.target||Bt();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}ue(a,l),_n(a,c),cr(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new Ov),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&&As("z",s,d,this.animationValues);for(let c=0;c<Es.length;c++)As(`rotate${Es[c]}`,s,d,this.animationValues),As(`skew${Es[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=Yr(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=Yr(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Ke(this.latestValues)&&(s.transform=l?l({},""):"none",this.hasProjected=!1);return}s.visibility="";const c=d.animationValues||d.latestValues;this.applyTransformsToTarget();let h=Cv(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 _ in ir){if(c[_]===void 0)continue;const{correct:w,applyTo:k,isCSSVariable:x}=ir[_],v=h==="none"?c[_]:w(c[_],d);if(k){const S=k.length;for(let R=0;R<S;R++)s[k[R]]=v}else x?this.options.visualElement.renderState.vars[_]=v:s[_]=v}this.options.layoutId&&(s.pointerEvents=d===this?Yr(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(Kf),this.root.sharedNodes.clear()}}}function Mv(t){t.updateLayout()}function Nv(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"?le(h=>{const m=s?e.measuredBox[h]:e.layoutBox[h],y=ee(m);m.min=r[h].min,m.max=m.min+y}):nd(o,e.layoutBox,r)&&le(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=xn();cr(a,r,e.layoutBox);const l=xn();s?cr(l,t.applyTransform(i,!0),e.measuredBox):cr(l,r,e.layoutBox);const d=!Vf(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 _=Bt();lr(_,e.layoutBox,m.layoutBox);const w=Bt();lr(w,r,y.layoutBox),zf(_,w)||(c=!0),h.options.layoutRoot&&(t.relativeTarget=w,t.relativeTargetOrigin=_,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 Dv(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 Bv(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Lv(t){t.clearSnapshot()}function Kf(t){t.clearMeasurements()}function Yf(t){t.isLayoutDirty=!1}function Fv(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Xf(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function jv(t){t.resolveTargetDelta()}function Vv(t){t.calcProjection()}function $v(t){t.resetSkewAndRotation()}function Uv(t){t.removeLeadSnapshot()}function Jf(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 Zf(t,e,n,r){t.min=Mt(e.min,n.min,r),t.max=Mt(e.max,n.max,r)}function zv(t,e,n,r){Zf(t.x,e.x,n.x,r),Zf(t.y,e.y,n.y,r)}function Wv(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const qv={duration:.45,ease:[.4,0,.1,1]},Qf=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),td=Qf("applewebkit/")&&!Qf("chrome/")?Math.round:ce;function ed(t){t.min=td(t.min),t.max=td(t.max)}function Hv(t){ed(t.x),ed(t.y)}function nd(t,e,n){return t==="position"||t==="preserve-aspect"&&!Z0(Wf(e),Wf(n),.2)}function Gv(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const Kv=Gf({attachResizeListener:(t,e)=>or(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ts={current:void 0},rd=Gf({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Ts.current){const t=new Kv({});t.mount(window),t.setOptions({layoutScroll:!0}),Ts.current=t}return Ts.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Yv={pan:{Feature:hv},drag:{Feature:dv,ProjectionNode:rd,MeasureLayout:kf}};function id(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&&Ct.postRender(()=>o(e,sr(e)))}class Xv extends $e{mount(){const{current:e}=this.node;e&&(this.unmount=wg(e,(n,r)=>(id(this.node,r,"Start"),i=>id(this.node,i,"End"))))}unmount(){}}class Jv extends $e{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(or(this.node.current,"focus",()=>this.onFocus()),or(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function od(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&&Ct.postRender(()=>o(e,sr(e)))}class Zv extends $e{mount(){const{current:e}=this.node;e&&(this.unmount=Eg(e,(n,r)=>(od(this.node,r,"Start"),(i,{success:o})=>od(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Ps=new WeakMap,ks=new WeakMap,Qv=t=>{const e=Ps.get(t.target);e&&e(t)},tb=t=>{t.forEach(Qv)};function eb({root:t,...e}){const n=t||document;ks.has(n)||ks.set(n,{});const r=ks.get(n),i=JSON.stringify(e);return r[i]||(r[i]=new IntersectionObserver(tb,{root:t,...e})),r[i]}function nb(t,e,n){const r=eb(e);return Ps.set(t,n),r.observe(t),()=>{Ps.delete(t),r.unobserve(t)}}const rb={some:0,all:1};class ib extends $e{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:rb[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 nb(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(ob(e,n))&&this.startObserver()}unmount(){}}function ob({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const sb={...H0,...{inView:{Feature:ib},tap:{Feature:Zv},focus:{Feature:Jv},hover:{Feature:Xv}},...Yv,...{layout:{ProjectionNode:rd,MeasureLayout:kf}}},Os=c0(sb,_0);/**
9
+ `),()=>{b.contains(_)&&b.removeChild(_)}},[e]),M(Bg,{isPresent:e,childRef:o,sizeRef:s,children:ho(t,{ref:o})})}const Fg=({children:t,initial:e,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s,anchorX:a,root:l})=>{const d=mo(Lg),c=un();let h=!0,m=Wt(()=>(h=!1,{id:c,initial:e,isPresent:n,custom:i,onExitComplete:y=>{d.set(y,!0);for(const _ of d.values())if(!_)return;r&&r()},register:y=>(d.set(y,!1),()=>d.delete(y))}),[n,d,r]);return o&&h&&(m={...m}),Wt(()=>{d.forEach((y,_)=>d.set(_,!1))},[n]),yt(()=>{!n&&!d.size&&r&&r()},[n]),s==="popLayout"&&(t=M(Dg,{isPresent:n,anchorX:a,root:l,children:t})),M(Br.Provider,{value:m,children:t})};function Lg(){return new Map}function Pu(t=!0){const e=jt(Br);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=e,o=un();yt(()=>{if(t)return i(o)},[t]);const s=kt(()=>t&&r&&r(o),[o,r,t]);return!n&&r?[!1,s]:[!0]}const qr=t=>t.key||"";function ku(t){const e=[];return lo.forEach(t,n=>{dn(n)&&e.push(n)}),e}const Ou=({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=Wt(()=>ku(t),[t]),m=s&&!d?[]:h.map(qr),y=ot(!0),_=ot(h),b=mo(()=>new Map),[P,x]=wt(h),[v,S]=wt(h);ml(()=>{y.current=!1,_.current=h;for(let D=0;D<v.length;D++){const F=qr(v[D]);m.includes(F)?b.delete(F):b.get(F)!==!0&&b.set(F,!1)}},[v,m.length,m.join("-")]);const R=[];if(h!==P){let D=[...h];for(let F=0;F<v.length;F++){const q=v[F],L=qr(q);m.includes(L)||(D.splice(F,0,q),R.push(q))}return o==="wait"&&R.length&&(D=R),S(ku(D)),x(h),null}const{forceRender:O}=jt(po);return M(Ot,{children:v.map(D=>{const F=qr(D),q=s&&!d?!1:h===v||m.includes(F),L=()=>{if(b.has(F))b.set(F,!0);else return;let Y=!0;b.forEach(Z=>{Z||(Y=!1)}),Y&&(O==null||O(),S(_.current),s&&(c==null||c()),r&&r())};return M(Fg,{isPresent:q,initial:!y.current||n?void 0:!1,custom:e,presenceAffectsLayout:i,mode:o,root:l,onExitComplete:q?void 0:L,anchorX:a,children:D},F)})})},Cu=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"]},vn={};for(const t in Iu)vn[t]={isEnabled:e=>Iu[t].some(n=>!!e[n])};function jg(t){for(const e in t)vn[e]={...vn[e],...t[e]}}const Vg=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 Wr(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Vg.has(t)}let Ru=t=>!Wr(t);function $g(t){typeof t=="function"&&(Ru=e=>e.startsWith("on")?!Wr(e):t(e))}try{$g(require("@emotion/is-prop-valid").default)}catch{}function Ug(t,e,n){const r={};for(const i in t)i==="values"&&typeof t.values=="object"||(Ru(i)||n===!0&&Wr(i)||!e&&!Wr(i)||t.draggable&&i.startsWith("onDrag"))&&(r[i]=t[i]);return r}const Hr=te({});function Gr(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function rr(t){return typeof t=="string"||Array.isArray(t)}const rs=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],is=["initial",...rs];function Kr(t){return Gr(t.animate)||is.some(e=>rr(t[e]))}function Mu(t){return!!(Kr(t)||t.variants)}function zg(t,e){if(Kr(t)){const{initial:n,animate:r}=t;return{initial:n===!1||rr(n)?n:void 0,animate:rr(r)?r:void 0}}return t.inherit!==!1?e:{}}function qg(t){const{initial:e,animate:n}=zg(t,jt(Hr));return Wt(()=>({initial:e,animate:n}),[Nu(e),Nu(n)])}function Nu(t){return Array.isArray(t)?t.join(" "):t}const ir={};function Wg(t){for(const e in t)ir[e]=t[e],Eo(e)&&(ir[e].isCSSVariable=!0)}function Bu(t,{layout:e,layoutId:n}){return yn.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!ir[t]||t==="opacity")}const Hg={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Gg=mn.length;function Kg(t,e,n){let r="",i=!0;for(let o=0;o<Gg;o++){const s=mn[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=gu(a,Zo[s]);if(!l){i=!1;const c=Hg[s]||s;r+=`${c}(${d}) `}n&&(e[s]=d)}}return r=r.trim(),n?r=n(e,i?"":r):i&&(r="none"),r}function os(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(yn.has(l)){s=!0;continue}else if(Eo(l)){i[l]=d;continue}else{const c=gu(d,Zo[l]);l.startsWith("origin")?(a=!0,o[l]=c):r[l]=c}}if(e.transform||(s||n?r.transform=Kg(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 ss=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Du(t,e,n){for(const r in e)!Zt(e[r])&&!Bu(r,n)&&(t[r]=e[r])}function Yg({transformTemplate:t},e){return Wt(()=>{const n=ss();return os(n,e,t),Object.assign({},n.vars,n.style)},[e])}function Xg(t,e){const n=t.style||{},r={};return Du(r,n,t),Object.assign(r,Yg(t,e)),r}function Jg(t,e){const n={},r=Xg(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 Zg={offset:"stroke-dashoffset",array:"stroke-dasharray"},Qg={offset:"strokeDashoffset",array:"strokeDasharray"};function t0(t,e,n=1,r=0,i=!0){t.pathLength=1;const o=i?Zg:Qg;t[o.offset]=it.transform(-r);const s=it.transform(e),a=it.transform(n);t[o.array]=`${s} ${a}`}function Fu(t,{attrX:e,attrY:n,attrScale:r,pathLength:i,pathSpacing:o=1,pathOffset:s=0,...a},l,d,c){if(os(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&&t0(h,i,o,s,!1)}const Lu=()=>({...ss(),attrs:{}}),ju=t=>typeof t=="string"&&t.toLowerCase()==="svg";function e0(t,e,n,r){const i=Wt(()=>{const o=Lu();return Fu(o,e,ju(r),t.transformTemplate,t.style),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};Du(o,t.style,t),i.style={...o,...i.style}}return i}const n0=["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 as(t){return typeof t!="string"||t.includes("-")?!1:!!(n0.indexOf(t)>-1||/[A-Z]/u.test(t))}function r0(t,e,n,{latestValues:r},i,o=!1){const a=(as(t)?e0:Jg)(e,r,i,t),l=Ug(e,typeof t=="string",o),d=t!==Ot?{...l,...a,ref:n}:{},{children:c}=e,h=Wt(()=>Zt(c)?c.get():c,[c]);return nt(t,{...d,children:h})}function Vu(t){const e=[{},{}];return t==null||t.values.forEach((n,r)=>{e[0][r]=n.get(),e[1][r]=n.getVelocity()}),e}function cs(t,e,n,r){if(typeof e=="function"){const[i,o]=Vu(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]=Vu(r);e=e(n!==void 0?n:t.custom,i,o)}return e}function Yr(t){return Zt(t)?t.get():t}function i0({scrapeMotionValuesFromProps:t,createRenderState:e},n,r,i){return{latestValues:o0(n,r,i,t),renderState:e()}}function o0(t,e,n,r){const i={},o=r(t,{});for(const m in o)i[m]=Yr(o[m]);let{initial:s,animate:a}=t;const l=Kr(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"&&!Gr(h)){const m=Array.isArray(h)?h:[h];for(let y=0;y<m.length;y++){const _=cs(t,m[y]);if(_){const{transitionEnd:b,transition:P,...x}=_;for(const v in x){let S=x[v];if(Array.isArray(S)){const R=c?S.length-1:0;S=S[R]}S!==null&&(i[v]=S)}for(const v in b)i[v]=b[v]}}}return i}const $u=t=>(e,n)=>{const r=jt(Hr),i=jt(Br),o=()=>i0(t,e,r,i);return n?o():mo(o)};function ls(t,e,n){var o;const{style:r}=t,i={};for(const s in r)(Zt(r[s])||e.style&&Zt(e.style[s])||Bu(s,t)||((o=n==null?void 0:n.getValue(s))==null?void 0:o.liveStyle)!==void 0)&&(i[s]=r[s]);return i}const s0=$u({scrapeMotionValuesFromProps:ls,createRenderState:ss});function Uu(t,e,n){const r=ls(t,e,n);for(const i in t)if(Zt(t[i])||Zt(e[i])){const o=mn.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=t[i]}return r}const a0=$u({scrapeMotionValuesFromProps:Uu,createRenderState:Lu}),c0=Symbol.for("motionComponentSymbol");function bn(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function l0(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):bn(n)&&(n.current=r))},[e])}const us=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),zu="data-"+us("framerAppearId"),qu=te({});function u0(t,e,n,r,i){var b,P;const{visualElement:o}=jt(Hr),s=jt(Cu),a=jt(Br),l=jt(ns).reducedMotion,d=ot(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=jt(qu);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&f0(d.current,n,i,h);const m=ot(!1);Hn(()=>{c&&m.current&&c.update(n,a)});const y=n[zu],_=ot(!!y&&!((b=window.MotionHandoffIsComplete)!=null&&b.call(window,y))&&((P=window.MotionHasOptimisedAnimation)==null?void 0:P.call(window,y)));return ml(()=>{c&&(m.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),_.current&&c.animationState&&c.animationState.animateChanges())}),yt(()=>{c&&(!_.current&&c.animationState&&c.animationState.animateChanges(),_.current&&(queueMicrotask(()=>{var x;(x=window.MotionHandoffMarkAsComplete)==null||x.call(window,y)}),_.current=!1),c.enteringChildren=void 0)}),c}function f0(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:Wu(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!s||a&&bn(a),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:c,layoutScroll:l,layoutRoot:d})}function Wu(t){if(t)return t.options.allowProjection!==!1?t.projection:Wu(t.parent)}function fs(t,{forwardMotionProps:e=!1}={},n,r){n&&jg(n);const i=as(t)?a0:s0;function o(a,l){let d;const c={...jt(ns),...a,layoutId:d0(a)},{isStatic:h}=c,m=qg(a),y=i(a,h);if(!h&&yo){h0();const _=p0(c);d=_.MeasureLayout,m.visualElement=u0(t,y,c,r,_.ProjectionNode)}return M(Hr.Provider,{value:m,children:[d&&m.visualElement?M(d,{visualElement:m.visualElement,...c}):null,r0(t,a,l0(y,m.visualElement,l),y,h,e)]})}o.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const s=Fe(o);return s[c0]=t,s}function d0({layoutId:t}){const e=jt(po).id;return e&&t!==void 0?e+"-"+t:t}function h0(t,e){jt(Cu).strict}function p0(t){const{drag:e,layout:n}=vn;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 m0(t,e){if(typeof Proxy>"u")return fs;const n=new Map,r=(o,s)=>fs(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,fs(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 y0({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function g0(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 ds(t){return t===void 0||t===1}function hs({scale:t,scaleX:e,scaleY:n}){return!ds(t)||!ds(e)||!ds(n)}function Ke(t){return hs(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 Xr(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=Xr(t,i,r)),Xr(t,n,r)+e}function ps(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}){ps(t.x,e.translate,e.scale,e.originPoint),ps(t.y,n.translate,n.scale,n.originPoint)}const Ju=.999999999999,Zu=1.0000000000001;function v0(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&&_n(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&&Ke(o.latestValues)&&_n(t,o.latestValues))}e.x<Zu&&e.x>Ju&&(e.x=1),e.y<Zu&&e.y>Ju&&(e.y=1)}function wn(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);ps(t,e,n,o,r)}function _n(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(g0(t.getBoundingClientRect(),e))}function b0(t,e,n){const r=tf(t,n),{scroll:i}=e;return i&&(wn(r.x,i.offset.x),wn(r.y,i.offset.y)),r}const ef=()=>({translate:0,scale:1,origin:0,originPoint:0}),xn=()=>({x:ef(),y:ef()}),nf=()=>({min:0,max:0}),Dt=()=>({x:nf(),y:nf()}),ms={current:null},rf={current:!1};function w0(){if(rf.current=!0,!!yo)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ms.current=t.matches;t.addEventListener("change",e),e()}else ms.current=!1}const _0=new WeakMap;function x0(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,gn(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,gn(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 S0{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=Ko,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=re.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,Ct.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=Kr(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,_0.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||w0(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ms.current,(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var e;this.projection&&this.projection.unmount(),Le(this.notifyUpdate),Le(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=yn.has(e);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",s=>{this.latestValues[e]=s,this.props.onUpdate&&Ct.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 vn){const n=vn[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<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=x0(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=gn(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"&&(yl(r)||vl(r))?r=parseFloat(r):!Ng(r)&&Ve.test(n)&&(r=yu(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=cs(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 wo),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){Qo.render(this.render)}}class sf extends S0{constructor(){super(...arguments),this.KeyframeResolver=xg}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 E0(t){return window.getComputedStyle(t)}class A0 extends sf{constructor(){super(...arguments),this.type="html",this.renderInstance=af}readValueFromInstance(e,n){var r;if(yn.has(n))return(r=this.projection)!=null&&r.isProjecting?zo(n):Uy(e,n);{const i=E0(e),o=(Eo(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){os(e,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,n,r){return ls(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 T0(t,e,n,r){af(t,e,void 0,r);for(const i in e.attrs)t.setAttribute(cf.has(i)?i:us(i),e.attrs[i])}class P0 extends sf{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Dt}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(yn.has(n)){const r=mu(n);return r&&r.default||0}return n=cf.has(n)?n:us(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,r){return Uu(e,n,r)}build(e,n,r){Fu(e,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(e,n,r,i){T0(e,n,r,i)}mount(e){this.isSVGTag=ju(e.tagName),super.mount(e)}}const k0=(t,e)=>as(t)?new P0(e):new A0(e,{allowProjection:t!==Ot});function Sn(t,e,n){const r=t.getProps();return cs(r,e,n!==void 0?n:r.custom,t)}const ys=t=>Array.isArray(t);function O0(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,gn(n))}function C0(t){return ys(t)?t[t.length-1]||0:t}function I0(t,e){const n=Sn(t,e);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const s in o){const a=C0(o[s]);O0(t,s,a)}}function R0(t){return!!(Zt(t)&&t.add)}function gs(t,e){const n=t.getValue("willChange");if(R0(n))return n.add(e);if(!n&&Re.WillChange){const r=new Re.WillChange("auto");t.addValue("willChange",r),r.add(e)}}function lf(t){return t.props[zu]}const M0=t=>t!==null;function N0(t,{repeat:e,repeatType:n="loop"},r){const i=t.filter(M0),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return!o||r===void 0?i[o]:r}const B0={type:"spring",stiffness:500,damping:25,restSpeed:10},D0=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),F0={type:"keyframes",duration:.8},L0={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},j0=(t,{keyframes:e})=>e.length>2?F0:yn.has(t)?t.startsWith("scale")?D0(e[1]):B0:L0;function V0({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 vs=(t,e,n,r={},i,o)=>s=>{const a=Xo(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};V0(a)||Object.assign(c,j0(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)&&(Yo(c),c.delay===0&&(h=!0)),(Re.instantAnimations||Re.skipAnimations)&&(h=!0,Yo(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,h&&!o&&e.get()!==void 0){const m=N0(c.keyframes,a);if(m!==void 0){Ct.update(()=>{c.onUpdate(m),c.onComplete()});return}}return a.isSync?new Vo(c):new fg(c)};function $0({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&&$0(d,c))continue;const y={delay:n,...Xo(o||{},c)},_=h.get();if(_!==void 0&&!h.isAnimating&&!Array.isArray(m)&&m===_&&!y.velocity)continue;let b=!1;if(window.MotionHandoffAnimation){const x=lf(t);if(x){const v=window.MotionHandoffAnimation(x,c,Ct);v!==null&&(y.startTime=v,b=!0)}}gs(t,c),h.start(vs(c,h,m,t.shouldReduceMotion&&uu.has(c)?{type:!1}:y,t,b));const P=h.animation;P&&l.push(P)}return s&&Promise.all(l).then(()=>{Ct.update(()=>{s&&I0(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 bs(t,e,n={}){var l;const r=Sn(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 U0(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 U0(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(bs(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 z0(t,e,n={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){const i=e.map(o=>bs(t,o,n));r=Promise.all(i)}else if(typeof e=="string")r=bs(t,e,n);else{const i=typeof e=="function"?Sn(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 q0=is.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<q0;n++){const r=is[n],i=t.props[r];(rr(i)||i===!1)&&(e[r]=i)}return e}const W0=[...rs].reverse(),H0=rs.length;function G0(t){return e=>Promise.all(e.map(({animation:n,options:r})=>z0(t,n,r)))}function K0(t){let e=G0(t),n=pf(),r=!0;const i=l=>(d,c)=>{var m;const h=Sn(t,c,l==="exit"?(m=t.presenceContext)==null?void 0:m.custom:void 0);if(h){const{transition:y,transitionEnd:_,...b}=h;d={...d,...b,..._}}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={},_=1/0;for(let P=0;P<H0;P++){const x=W0[P],v=n[x],S=d[x]!==void 0?d[x]:c[x],R=rr(S),O=x===l?v.isActive:null;O===!1&&(_=P);let D=S===c[x]&&S!==d[x]&&R;if(D&&r&&t.manuallyAnimateOnMount&&(D=!1),v.protectedKeys={...y},!v.isActive&&O===null||!S&&!v.prevProp||Gr(S)||typeof S=="boolean")continue;const F=Y0(v.prevProp,S);let q=F||x===l&&v.isActive&&!D&&R||P>_&&R,L=!1;const Y=Array.isArray(S)?S:[S];let Z=Y.reduce(i(x),{});O===!1&&(Z={});const{prevResolvedValues:et={}}=v,st={...et,...Z},At=at=>{q=!0,m.has(at)&&(L=!0,m.delete(at)),v.needsAnimating[at]=!0;const ht=t.getValue(at);ht&&(ht.liveStyle=!1)};for(const at in st){const ht=Z[at],U=et[at];if(y.hasOwnProperty(at))continue;let H=!1;ys(ht)&&ys(U)?H=!df(ht,U):H=ht!==U,H?ht!=null?At(at):m.add(at):ht!==void 0&&m.has(at)?At(at):v.protectedKeys[at]=!0}v.prevProp=S,v.prevResolvedValues=Z,v.isActive&&(y={...y,...Z}),r&&t.blockInitialAnimation&&(q=!1);const dt=D&&F;q&&(!dt||L)&&h.push(...Y.map(at=>{const ht={type:x};if(typeof at=="string"&&r&&!dt&&t.manuallyAnimateOnMount&&t.parent){const{parent:U}=t,H=Sn(U,at);if(U.enteringChildren&&H){const{delayChildren:G}=H.transition||{};ht.delay=ff(U.enteringChildren,t,G)}}return{animation:at,options:ht}}))}if(m.size){const P={};if(typeof d.initial!="boolean"){const x=Sn(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),S=t.getValue(x);S&&(S.liveStyle=!0),P[x]=v??null}),h.push({animation:P})}let b=!!h.length;return r&&(d.initial===!1||d.initial===d.animate)&&!t.manuallyAnimateOnMount&&(b=!1),r=!1,b?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 Y0(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!df(e,t):!1}function Ye(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function pf(){return{animate:Ye(!0),whileInView:Ye(),whileHover:Ye(),whileTap:Ye(),whileDrag:Ye(),whileFocus:Ye(),exit:Ye()}}class $e{constructor(e){this.isMounted=!1,this.node=e}update(){}}class X0 extends $e{constructor(e){super(e),e.animationState||(e.animationState=K0(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Gr(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 J0=0;class Z0 extends $e{constructor(){super(...arguments),this.id=J0++}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 Q0={animation:{Feature:X0},exit:{Feature:Z0}};function or(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}function sr(t){return{point:{x:t.pageX,y:t.pageY}}}const tv=t=>e=>ts(e)&&t(e,sr(e));function ar(t,e,n,r){return or(t,e,tv(n),r)}const mf=1e-4,ev=1-mf,nv=1+mf,yf=.01,rv=0-yf,iv=0+yf;function ee(t){return t.max-t.min}function ov(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>=ev&&t.scale<=nv||isNaN(t.scale))&&(t.scale=1),(t.translate>=rv&&t.translate<=iv||isNaN(t.translate))&&(t.translate=0)}function cr(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 sv(t,e,n){vf(t.x,e.x,n.x),vf(t.y,e.y,n.y)}function bf(t,e,n){t.min=e.min-n.min,t.max=t.min+ee(e)}function lr(t,e,n){bf(t.x,e.x,n.x),bf(t.y,e.y,n.y)}function le(t){return[t("x"),t("y")]}const wf=({current:t})=>t?t.ownerDocument.defaultView:null,_f=(t,e)=>Math.abs(t-e);function av(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=_s(this.lastMoveEventInfo,this.history),y=this.startEvent!==null,_=av(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!y&&!_)return;const{point:b}=m,{timestamp:P}=Xt;this.history.push({...b,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=ws(y,this.transformPagePoint),Ct.update(this.updatePoint,!0)},this.handlePointerUp=(m,y)=>{this.end();const{onEnd:_,onSessionEnd:b,resumeAnimation:P}=this.handlers;if(this.dragSnapToOrigin&&P&&P(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=_s(m.type==="pointercancel"?this.lastMoveEventInfo:ws(y,this.transformPagePoint),this.history);this.startEvent&&_&&_(m,x),b&&b(m,x)},!ts(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=s,this.contextWindow=i||window;const a=sr(e),l=ws(a,this.transformPagePoint),{point:d}=l,{timestamp:c}=Xt;this.history=[{...d,timestamp:c}];const{onSessionStart:h}=n;h&&h(e,_s(l,this.history)),this.removeListeners=Kn(ar(this.contextWindow,"pointermove",this.handlePointerMove),ar(this.contextWindow,"pointerup",this.handlePointerUp),ar(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Le(this.updatePoint)}}function ws(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 _s({point:t},e){return{point:t,delta:Sf(t,Ef(e)),offset:Sf(t,cv(e)),velocity:lv(e,.1)}}function cv(t){return t[0]}function Ef(t){return t[t.length-1]}function lv(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=we(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 uv(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 fv(t,{top:e,left:n,bottom:r,right:i}){return{x:Af(t.x,n,i),y:Af(t.y,e,r)}}function Tf(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 dv(t,e){return{x:Tf(t.x,e.x),y:Tf(t.y,e.y)}}function hv(t,e){let n=.5;const r=ee(t),i=ee(e);return i>r?n=Yn(e.min,e.max-r,t.min):r>i&&(n=Yn(t.min,t.max-i,e.min)),Ie(0,1,n)}function pv(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 xs=.35;function mv(t=xs){return t===!1?t=0:t===!0&&(t=xs),{x:Pf(t,"left","right"),y:Pf(t,"top","bottom")}}function Pf(t,e,n){return{min:kf(t,e),max:kf(t,n)}}function kf(t,e){return typeof t=="number"?t:t[e]||0}const yv=new WeakMap;class gv{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=h=>{const{dragSnapToOrigin:m}=this.getProps();m?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(sr(h).point)},s=(h,m)=>{const{drag:y,dragPropagation:_,onDragStart:b}=this.getProps();if(y&&!_&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Tg(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),le(x=>{let v=this.getAxisMotionValue(x).get()||0;if(_e.test(v)){const{projection:S}=this.visualElement;if(S&&S.layout){const R=S.layout.layoutBox[x];R&&(v=ee(R)*(parseFloat(v)/100))}}this.originPoint[x]=v}),b&&Ct.postRender(()=>b(h,m)),gs(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:_,onDirectionLock:b,onDrag:P}=this.getProps();if(!y&&!this.openDragLock)return;const{offset:x}=m;if(_&&this.currentDirection===null){this.currentDirection=vv(x),this.currentDirection!==null&&b&&b(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=()=>le(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:wf(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&&Ct.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||!Jr(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let s=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(s=uv(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&&bn(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=fv(r.layoutBox,e):this.constraints=!1,this.elastic=mv(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&le(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=pv(r.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!bn(e))return!1;const r=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=b0(r,i.root,this.visualElement.getTransformPagePoint());let s=dv(i.layout.layoutBox,o);if(n){const a=n(y0(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=le(c=>{if(!Jr(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,_={type:"inertia",velocity:r?e[c]:0,bounceStiffness:m,bounceDamping:y,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(c,_)});return Promise.all(d).then(a)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return gs(this.visualElement,e),r.start(vs(e,r,0,n,this.visualElement,!1))}stopAnimation(){le(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){le(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){le(n=>{const{drag:r}=this.getProps();if(!Jr(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(!bn(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};le(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();i[s]=hv({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(),le(s=>{if(!Jr(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;yv.set(this.visualElement,this);const e=this.visualElement.current,n=ar(e,"pointerdown",l=>{const{drag:d,dragListener:c=!0}=this.getProps();d&&c&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();bn(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()),Ct.read(r);const s=or(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:d})=>{this.isDragging&&d&&(le(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=xs,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:a}}}function Jr(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function vv(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class bv extends $e{constructor(e){super(e),this.removeGroupControls=ce,this.removeListeners=ce,this.controls=new gv(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ce}unmount(){this.removeGroupControls(),this.removeListeners()}}const Of=t=>(e,n)=>{t&&Ct.postRender(()=>t(e,n))};class wv extends $e{constructor(){super(...arguments),this.removePointerDownListener=ce}onPointerDown(e){this.session=new xf(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:wf(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:Of(e),onStart:Of(n),onMove:r,onEnd:(o,s)=>{delete this.session,i&&Ct.postRender(()=>i(o,s))}}}mount(){this.removePointerDownListener=ar(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 Zr={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Cf(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const ur={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(it.test(t))t=parseFloat(t);else return t;const n=Cf(t,e.target.x),r=Cf(t,e.target.y);return`${n}% ${r}%`}},_v={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,i=Ve.parse(t);if(i.length>5)return r;const o=Ve.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 Ss=!1;class xv extends oe{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=e;Wg(Sv),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),Ss&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Zr.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,{projection:s}=r;return s&&(s.isPresent=o,Ss=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==o?s.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?s.promote():s.relegate()||Ct.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Qo.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=e;Ss=!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=jt(po);return M(xv,{...t,layoutGroup:r,switchLayoutGroup:jt(qu),isPresent:e,safeToRemove:n})}const Sv={borderRadius:{...ur,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ur,borderTopRightRadius:ur,borderBottomLeftRadius:ur,borderBottomRightRadius:ur,boxShadow:_v};function Ev(t,e,n){const r=Zt(t)?t:gn(t);return r.start(vs("",r,e,n)),r.animation}const Av=(t,e)=>t.depth-e.depth;class Tv{constructor(){this.children=[],this.isDirty=!1}add(e){go(this.children,e),this.isDirty=!0}remove(e){vo(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Av),this.isDirty=!1,this.children.forEach(e)}}function Pv(t,e){const n=re.now(),r=({timestamp:i})=>{const o=i-n;o>=e&&(Le(r),t(o-e))};return Ct.setup(r,!0),()=>Le(r)}const Rf=["TopLeft","TopRight","BottomLeft","BottomRight"],kv=Rf.length,Mf=t=>typeof t=="string"?parseFloat(t):t,Nf=t=>typeof t=="number"||it.test(t);function Ov(t,e,n,r,i,o){i?(t.opacity=Mt(0,n.opacity??1,Cv(r)),t.opacityExit=Mt(e.opacity??1,0,Iv(r))):o&&(t.opacity=Mt(e.opacity??1,n.opacity??1,r));for(let s=0;s<kv;s++){const a=`border${Rf[s]}Radius`;let l=Bf(e,a),d=Bf(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),(_e.test(d)||_e.test(l))&&(t[a]+="%")):t[a]=d}(e.rotate||n.rotate)&&(t.rotate=Mt(e.rotate||0,n.rotate||0,r))}function Bf(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Cv=Df(0,.5,Tl),Iv=Df(.5,.95,ce);function Df(t,e,n){return r=>r<t?0:r>e?1:n(Yn(t,e,r))}function Ff(t,e){t.min=e.min,t.max=e.max}function ue(t,e){Ff(t.x,e.x),Ff(t.y,e.y)}function Lf(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=Xr(t,1/n,r),i!==void 0&&(t=Xr(t,1/i,r)),t}function Rv(t,e=0,n=1,r=.5,i,o=t,s=t){if(_e.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 Vf(t,e,[n,r,i],o,s){Rv(t,e[n],e[r],e[i],e.scale,o,s)}const Mv=["x","scaleX","originX"],Nv=["y","scaleY","originY"];function $f(t,e,n,r){Vf(t.x,e,Mv,n?n.x:void 0,r?r.x:void 0),Vf(t.y,e,Nv,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 qf(t,e){return t.min===e.min&&t.max===e.max}function Bv(t,e){return qf(t.x,e.x)&&qf(t.y,e.y)}function Wf(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Hf(t,e){return Wf(t.x,e.x)&&Wf(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 Dv{constructor(){this.members=[]}add(e){go(this.members,e),e.scheduleRender()}remove(e){if(vo(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 Fv(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:_}=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) `),_&&(r+=`skewY(${_}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 Es=["","X","Y","Z"],Lv=1e3;let jv=0;function As(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",Ct,!(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=jv++,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(Uv),this.nodes.forEach(Hv),this.nodes.forEach(Gv),this.nodes.forEach(zv)},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 Tv)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new wo),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)&&!Rg(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;Ct.read(()=>{h=window.innerWidth}),t(s,()=>{const y=window.innerWidth;y!==h&&(h=y,this.root.updateBlockedByResize=!0,c&&c(),c=Pv(m,250),Zr.hasAnimatedSinceResize&&(Zr.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 _=this.options.transition||d.getDefaultTransition()||Zv,{onLayoutAnimationStart:b,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 S={...Xo(_,"layout"),onPlay:b,onComplete:P};(d.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S),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(),Le(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(Kv),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(Wv),this.nodes.forEach(Vv),this.nodes.forEach($v)):this.nodes.forEach(Zf),this.clearAllSnapshots();const a=re.now();Xt.delta=Ie(0,1e3/60,a-Xt.timestamp),Xt.timestamp=a,Xt.isProcessing=!0,So.update.process(Xt),So.preRender.process(Xt),So.render.process(Xt),Xt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Qo.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(qv),this.sharedNodes.forEach(Yv)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ct.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ct.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=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 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||Ke(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)),Qv(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var d;const{visualElement:s}=this.options;if(!s)return Dt();const a=s.measureViewportBox();if(!(((d=this.scroll)==null?void 0:d.wasRoot)||this.path.some(tb))){const{scroll:c}=this.root;c&&(wn(a.x,c.offset.x),wn(a.y,c.offset.y))}return a}removeElementScroll(s){var l;const a=Dt();if(ue(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&&ue(a,s),wn(a.x,h.offset.x),wn(a.y,h.offset.y))}return a}applyTransform(s,a=!1){const l=Dt();ue(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&&_n(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Ke(c.latestValues)&&_n(l,c.latestValues)}return Ke(this.latestValues)&&_n(l,this.latestValues),l}removeTransform(s){const a=Dt();ue(a,s);for(let l=0;l<this.path.length;l++){const d=this.path[l];if(!d.instance||!Ke(d.latestValues))continue;hs(d.latestValues)&&d.updateSnapshot();const c=Dt(),h=d.measurePageBox();ue(c,h),$f(a,d.latestValues,d.snapshot?d.snapshot.layoutBox:void 0,c)}return Ke(this.latestValues)&&$f(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=Dt(),this.relativeTargetOrigin=Dt(),lr(this.relativeTargetOrigin,this.layout.layoutBox,y.layout.layoutBox),ue(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(),sv(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ue(this.target,this.layout.layoutBox),Xu(this.target,this.targetDelta)):ue(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=Dt(),this.relativeTargetOrigin=Dt(),lr(this.relativeTargetOrigin,this.target,y.target),ue(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||hs(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 _;const s=this.getLead(),a=!!this.resumingFrom||this!==s;let l=!0;if((this.isProjectionDirty||(_=this.parent)!=null&&_.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;ue(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,m=this.treeScale.y;v0(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:y}=s;if(!y){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Lf(this.prevProjectionDelta.x,this.projectionDelta.x),Lf(this.prevProjectionDelta.y,this.projectionDelta.y)),cr(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=xn(),this.projectionDelta=xn(),this.projectionDeltaWithTransform=xn()}setAnimationOrigin(s,a=!1){const l=this.snapshot,d=l?l.latestValues:{},c={...this.latestValues},h=xn();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const m=Dt(),y=l?l.source:void 0,_=this.layout?this.layout.source:void 0,b=y!==_,P=this.getStack(),x=!P||P.members.length<=1,v=!!(b&&!x&&this.options.crossfade===!0&&!this.path.some(Jv));this.animationProgress=0;let S;this.mixTargetDelta=R=>{const O=R/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&&(lr(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Xv(this.relativeTarget,this.relativeTargetOrigin,m,O),S&&Bv(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=Dt()),ue(S,this.relativeTarget)),b&&(this.animationValues=c,Ov(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&&(Le(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ct.update(()=>{Zr.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=gn(0)),this.currentAnimation=Ev(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(Lv),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||Dt();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}ue(a,l),_n(a,c),cr(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new Dv),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&&As("z",s,d,this.animationValues);for(let c=0;c<Es.length;c++)As(`rotate${Es[c]}`,s,d,this.animationValues),As(`skew${Es[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=Yr(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=Yr(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Ke(this.latestValues)&&(s.transform=l?l({},""):"none",this.hasProjected=!1);return}s.visibility="";const c=d.animationValues||d.latestValues;this.applyTransformsToTarget();let h=Fv(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 _ in ir){if(c[_]===void 0)continue;const{correct:b,applyTo:P,isCSSVariable:x}=ir[_],v=h==="none"?c[_]:b(c[_],d);if(P){const S=P.length;for(let R=0;R<S;R++)s[P[R]]=v}else x?this.options.visualElement.renderState.vars[_]=v:s[_]=v}this.options.layoutId&&(s.pointerEvents=d===this?Yr(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 Vv(t){t.updateLayout()}function $v(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"?le(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)&&le(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=xn();cr(a,r,e.layoutBox);const l=xn();s?cr(l,t.applyTransform(i,!0),e.measuredBox):cr(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 _=Dt();lr(_,e.layoutBox,m.layoutBox);const b=Dt();lr(b,r,y.layoutBox),Hf(_,b)||(c=!0),h.options.layoutRoot&&(t.relativeTarget=b,t.relativeTargetOrigin=_,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 Uv(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 zv(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function qv(t){t.clearSnapshot()}function Jf(t){t.clearMeasurements()}function Zf(t){t.isLayoutDirty=!1}function Wv(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 Hv(t){t.resolveTargetDelta()}function Gv(t){t.calcProjection()}function Kv(t){t.resetSkewAndRotation()}function Yv(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 Xv(t,e,n,r){ed(t.x,e.x,n.x,r),ed(t.y,e.y,n.y,r)}function Jv(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Zv={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:ce;function id(t){t.min=rd(t.min),t.max=rd(t.max)}function Qv(t){id(t.x),id(t.y)}function od(t,e,n){return t==="position"||t==="preserve-aspect"&&!ov(Gf(e),Gf(n),.2)}function tb(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const eb=Xf({attachResizeListener:(t,e)=>or(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ts={current:void 0},sd=Xf({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Ts.current){const t=new eb({});t.mount(window),t.setOptions({layoutScroll:!0}),Ts.current=t}return Ts.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),nb={pan:{Feature:wv},drag:{Feature:bv,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&&Ct.postRender(()=>o(e,sr(e)))}class rb extends $e{mount(){const{current:e}=this.node;e&&(this.unmount=Pg(e,(n,r)=>(ad(this.node,r,"Start"),i=>ad(this.node,i,"End"))))}unmount(){}}class ib extends $e{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(or(this.node.current,"focus",()=>this.onFocus()),or(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&&Ct.postRender(()=>o(e,sr(e)))}class ob extends $e{mount(){const{current:e}=this.node;e&&(this.unmount=Ig(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 Ps=new WeakMap,ks=new WeakMap,sb=t=>{const e=Ps.get(t.target);e&&e(t)},ab=t=>{t.forEach(sb)};function cb({root:t,...e}){const n=t||document;ks.has(n)||ks.set(n,{});const r=ks.get(n),i=JSON.stringify(e);return r[i]||(r[i]=new IntersectionObserver(ab,{root:t,...e})),r[i]}function lb(t,e,n){const r=cb(e);return Ps.set(t,n),r.observe(t),()=>{Ps.delete(t),r.unobserve(t)}}const ub={some:0,all:1};class fb extends $e{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:ub[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 lb(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(db(e,n))&&this.startObserver()}unmount(){}}function db({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const hb={...Q0,...{inView:{Feature:fb},tap:{Feature:ob},focus:{Feature:ib},hover:{Feature:rb}},...nb,...{layout:{ProjectionNode:sd,MeasureLayout:If}}},Os=m0(hb,k0);/**
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 ab=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),sd=(...t)=>t.filter((e,n,r)=>!!e&&r.indexOf(e)===n).join(" ");/**
14
+ */const pb=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(" ");/**
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 cb={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 mb={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 lb=Le(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:s,...a},l)=>nt("svg",{ref:l,...cb,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:sd("lucide",i),...a},[...s.map(([d,c])=>nt(d,c)),...Array.isArray(o)?o:[o]]));/**
24
+ */const yb=Fe(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:s,...a},l)=>nt("svg",{ref:l,...mb,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:ld("lucide",i),...a},[...s.map(([d,c])=>nt(d,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 Me=(t,e)=>{const n=Le(({className:r,...i},o)=>nt(lb,{ref:o,iconNode:e,className:sd(`lucide-${ab(t)}`,r),...i}));return n.displayName=`${t}`,n};/**
29
+ */const Me=(t,e)=>{const n=Fe(({className:r,...i},o)=>nt(yb,{ref:o,iconNode:e,className:ld(`lucide-${pb(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 ub=Me("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"}]]);/**
34
+ */const gb=Me("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"}]]);/**
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 fb=Me("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"}]]);/**
39
+ */const vb=Me("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"}]]);/**
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 db=Me("MessageCirclePlus",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);/**
44
+ */const bb=Me("MessageCirclePlus",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);/**
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 hb=Me("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 wb=Me("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 pb=Me("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 _b=Me("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 mb=Me("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"}]]);/**
59
+ */const xb=Me("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"}]]);/**
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 yb=Me("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"}]]);/**
64
+ */const Sb=Me("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"}]]);/**
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 gb=Me("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"}]]);/**
69
+ */const Eb=Me("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"}]]);/**
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 vb=Me("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),bb=({onClick:t,isOpen:e})=>M(Os.button,{onClick:t,className:"fixed w-16 h-16 bg-gray-800 text-white rounded-full shadow-lg flex items-center justify-center hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-gray-600 focus:ring-opacity-50 transition-colors duration-200",style:{zIndex:9998,bottom:30,right:30},"aria-label":e?"Close chat":"Open chat",animate:{scale:e?[1,.9,1.05,1]:[1,.9,1.05,1]},transition:{duration:.25,ease:"easeOut"},children:M(Tu,{mode:"wait",initial:!1,children:M(Os.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",children:e?M(vb,{size:28}):M(hb,{size:28})},e?"close":"open")})});/*! js-cookie v3.0.5 | MIT */function Qr(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 wb={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 Cs(t,e){function n(i,o,s){if(!(typeof document>"u")){s=Qr({},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,"",Qr({},o,{expires:-1}))},withAttributes:function(i){return Cs(this.converter,Qr({},this.attributes,i))},withConverter:function(i){return Cs(Qr({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var ti=Cs(wb,{path:"/"});const _b={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},ad=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(_=>_(e,y))}},i=()=>e,l={setState:r,getState:i,getInitialState:()=>d,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{(_b?"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},xb=t=>t?ad(t):ad;var fr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Sb(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Eb(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 cd={exports:{}},ld={};const ud=Eb(Im);var fd={exports:{}},dd={};/**
74
+ */const Ab=Me("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Tb=({onClick:t,isOpen:e})=>M(Os.button,{onClick:t,className:"fixed w-14 h-14 rounded-full shadow-lg flex items-center justify-center outline-none",style:{zIndex:9998,bottom:30,right:30,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:M(Ou,{mode:"wait",initial:!1,children:M(Os.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?M(Ab,{size:24,color:"#FFFFFF"}):M(wb,{size:22,fill:"#FFFFFF",color:"#FFFFFF"})},e?"close":"open")})});/*! js-cookie v3.0.5 | MIT */function Qr(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 Pb={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 Cs(t,e){function n(i,o,s){if(!(typeof document>"u")){s=Qr({},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,"",Qr({},o,{expires:-1}))},withAttributes:function(i){return Cs(this.converter,Qr({},this.attributes,i))},withConverter:function(i){return Cs(Qr({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var ti=Cs(Pb,{path:"/"});const kb={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(_=>_(e,y))}},i=()=>e,l={setState:r,getState:i,getInitialState:()=>d,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{(kb?"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},Ob=t=>t?ud(t):ud;var fr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Cb(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Ib(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=Ib(Lm);var pd={exports:{}},md={};/**
75
75
  * @license React
76
76
  * use-sync-external-store-shim.production.min.js
77
77
  *
@@ -79,7 +79,7 @@
79
79
  *
80
80
  * This source code is licensed under the MIT license found in the
81
81
  * LICENSE file in the root directory of this source tree.
82
- */var En=ud;function Ab(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Tb=typeof Object.is=="function"?Object.is:Ab,Pb=En.useState,kb=En.useEffect,Ob=En.useLayoutEffect,Cb=En.useDebugValue;function Ib(t,e){var n=e(),r=Pb({inst:{value:n,getSnapshot:e}}),i=r[0].inst,o=r[1];return Ob(function(){i.value=n,i.getSnapshot=e,Is(i)&&o({inst:i})},[t,n,e]),kb(function(){return Is(i)&&o({inst:i}),t(function(){Is(i)&&o({inst:i})})},[t]),Cb(n),n}function Is(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Tb(t,n)}catch{return!0}}function Rb(t,e){return e()}var Mb=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Rb:Ib;dd.useSyncExternalStore=En.useSyncExternalStore!==void 0?En.useSyncExternalStore:Mb,fd.exports=dd;var Nb=fd.exports;/**
82
+ */var En=hd;function Rb(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Mb=typeof Object.is=="function"?Object.is:Rb,Nb=En.useState,Bb=En.useEffect,Db=En.useLayoutEffect,Fb=En.useDebugValue;function Lb(t,e){var n=e(),r=Nb({inst:{value:n,getSnapshot:e}}),i=r[0].inst,o=r[1];return Db(function(){i.value=n,i.getSnapshot=e,Is(i)&&o({inst:i})},[t,n,e]),Bb(function(){return Is(i)&&o({inst:i}),t(function(){Is(i)&&o({inst:i})})},[t]),Fb(n),n}function Is(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Mb(t,n)}catch{return!0}}function jb(t,e){return e()}var Vb=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?jb:Lb;md.useSyncExternalStore=En.useSyncExternalStore!==void 0?En.useSyncExternalStore:Vb,pd.exports=md;var $b=pd.exports;/**
83
83
  * @license React
84
84
  * use-sync-external-store-shim/with-selector.production.min.js
85
85
  *
@@ -87,85 +87,85 @@
87
87
  *
88
88
  * This source code is licensed under the MIT license found in the
89
89
  * LICENSE file in the root directory of this source tree.
90
- */var ei=ud,Db=Nb;function Bb(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Lb=typeof Object.is=="function"?Object.is:Bb,Fb=Db.useSyncExternalStore,jb=ei.useRef,Vb=ei.useEffect,$b=ei.useMemo,Ub=ei.useDebugValue;ld.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var o=jb(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=$b(function(){function l(y){if(!d){if(d=!0,c=y,y=r(y),i!==void 0&&s.hasValue){var _=s.value;if(i(_,y))return h=_}return h=y}if(_=h,Lb(c,y))return _;var w=r(y);return i!==void 0&&i(_,w)?_:(c=y,h=w)}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=Fb(t,o[0],o[1]);return Vb(function(){s.hasValue=!0,s.value=a},[a]),Ub(a),a},cd.exports=ld;var zb=cd.exports;const Wb=Sb(zb),hd={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:qb}=Nr,{useSyncExternalStoreWithSelector:Hb}=Wb;let pd=!1;const Gb=t=>t;function Kb(t,e=Gb,n){(hd?"production":void 0)!=="production"&&n&&!pd&&(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"),pd=!0);const r=Hb(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,n);return qb(r),r}const md=t=>{(hd?"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"?xb(t):t,n=(r,i)=>Kb(e,r,i);return Object.assign(n,e),n},Yb=t=>t?md(t):md;var yd=Symbol.for("immer-nothing"),gd=Symbol.for("immer-draftable"),se=Symbol.for("immer-state");function me(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var An=Object.getPrototypeOf;function Tn(t){return!!t&&!!t[se]}function Xe(t){var e;return t?vd(t)||Array.isArray(t)||!!t[gd]||!!((e=t.constructor)!=null&&e[gd])||ii(t)||oi(t):!1}var Xb=Object.prototype.constructor.toString();function vd(t){if(!t||typeof t!="object")return!1;const e=An(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)===Xb}function ni(t,e){ri(t)===0?Reflect.ownKeys(t).forEach(n=>{e(n,t[n],t)}):t.forEach((n,r)=>e(r,n,t))}function ri(t){const e=t[se];return e?e.type_:Array.isArray(t)?1:ii(t)?2:oi(t)?3:0}function Rs(t,e){return ri(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function bd(t,e,n){const r=ri(t);r===2?t.set(e,n):r===3?t.add(n):t[e]=n}function Jb(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}function ii(t){return t instanceof Map}function oi(t){return t instanceof Set}function Je(t){return t.copy_||t.base_}function Ms(t,e){if(ii(t))return new Map(t);if(oi(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);const n=vd(t);if(e===!0||e==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(t);delete r[se];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(An(t),r)}else{const r=An(t);if(r!==null&&n)return{...t};const i=Object.create(r);return Object.assign(i,t)}}function Ns(t,e=!1){return si(t)||Tn(t)||!Xe(t)||(ri(t)>1&&(t.set=t.add=t.clear=t.delete=Zb),Object.freeze(t),e&&Object.entries(t).forEach(([n,r])=>Ns(r,!0))),t}function Zb(){me(2)}function si(t){return Object.isFrozen(t)}var Qb={};function Ze(t){const e=Qb[t];return e||me(0,t),e}var dr;function wd(){return dr}function tw(t,e){return{drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function _d(t,e){e&&(Ze("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function Ds(t){Bs(t),t.drafts_.forEach(ew),t.drafts_=null}function Bs(t){t===dr&&(dr=t.parent_)}function xd(t){return dr=tw(dr,t)}function ew(t){const e=t[se];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function Sd(t,e){e.unfinalizedDrafts_=e.drafts_.length;const n=e.drafts_[0];return t!==void 0&&t!==n?(n[se].modified_&&(Ds(e),me(4)),Xe(t)&&(t=ai(e,t),e.parent_||ci(e,t)),e.patches_&&Ze("Patches").generateReplacementPatches_(n[se].base_,t,e.patches_,e.inversePatches_)):t=ai(e,n,[]),Ds(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==yd?t:void 0}function ai(t,e,n){if(si(e))return e;const r=e[se];if(!r)return ni(e,(i,o)=>Ed(t,r,e,i,o,n)),e;if(r.scope_!==t)return e;if(!r.modified_)return ci(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),ni(o,(a,l)=>Ed(t,r,i,a,l,n,s)),ci(t,i,!1),n&&t.patches_&&Ze("Patches").generatePatches_(r,n,t.patches_,t.inversePatches_)}return r.copy_}function Ed(t,e,n,r,i,o,s){if(Tn(i)){const a=o&&e&&e.type_!==3&&!Rs(e.assigned_,r)?o.concat(r):void 0,l=ai(t,i,a);if(bd(n,r,l),Tn(l))t.canAutoFreeze_=!1;else return}else s&&n.add(i);if(Xe(i)&&!si(i)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;ai(t,i),(!e||!e.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&ci(t,i)}}function ci(t,e,n=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&Ns(e,n)}function nw(t,e){const n=Array.isArray(t),r={type_:n?1:0,scope_:e?e.scope_:wd(),modified_:!1,finalized_:!1,assigned_:{},parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=Ls;n&&(i=[r],o=hr);const{revoke:s,proxy:a}=Proxy.revocable(i,o);return r.draft_=a,r.revoke_=s,a}var Ls={get(t,e){if(e===se)return t;const n=Je(t);if(!Rs(n,e))return rw(t,n,e);const r=n[e];return t.finalized_||!Xe(r)?r:r===Fs(t.base_,e)?(Vs(t),t.copy_[e]=$s(r,t)):r},has(t,e){return e in Je(t)},ownKeys(t){return Reflect.ownKeys(Je(t))},set(t,e,n){const r=Ad(Je(t),e);if(r!=null&&r.set)return r.set.call(t.draft_,n),!0;if(!t.modified_){const i=Fs(Je(t),e),o=i==null?void 0:i[se];if(o&&o.base_===n)return t.copy_[e]=n,t.assigned_[e]=!1,!0;if(Jb(n,i)&&(n!==void 0||Rs(t.base_,e)))return!0;Vs(t),js(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 Fs(t.base_,e)!==void 0||e in t.base_?(t.assigned_[e]=!1,Vs(t),js(t)):delete t.assigned_[e],t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){const n=Je(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r&&{writable:!0,configurable:t.type_!==1||e!=="length",enumerable:r.enumerable,value:n[e]}},defineProperty(){me(11)},getPrototypeOf(t){return An(t.base_)},setPrototypeOf(){me(12)}},hr={};ni(Ls,(t,e)=>{hr[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),hr.deleteProperty=function(t,e){return hr.set.call(this,t,e,void 0)},hr.set=function(t,e,n){return Ls.set.call(this,t[0],e,n,t[0])};function Fs(t,e){const n=t[se];return(n?Je(n):t)[e]}function rw(t,e,n){var i;const r=Ad(e,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(t.draft_):void 0}function Ad(t,e){if(!(e in t))return;let n=An(t);for(;n;){const r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=An(n)}}function js(t){t.modified_||(t.modified_=!0,t.parent_&&js(t.parent_))}function Vs(t){t.copy_||(t.copy_=Ms(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var iw=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"&&me(6),r!==void 0&&typeof r!="function"&&me(7);let i;if(Xe(e)){const o=xd(this),s=$s(e,void 0);let a=!0;try{i=n(s),a=!1}finally{a?Ds(o):Bs(o)}return _d(o,r),Sd(i,o)}else if(!e||typeof e!="object"){if(i=n(e),i===void 0&&(i=e),i===yd&&(i=void 0),this.autoFreeze_&&Ns(i,!0),r){const o=[],s=[];Ze("Patches").generateReplacementPatches_(e,i,o,s),r(o,s)}return i}else me(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){Xe(t)||me(8),Tn(t)&&(t=ow(t));const e=xd(this),n=$s(t,void 0);return n[se].isManual_=!0,Bs(e),n}finishDraft(t,e){const n=t&&t[se];(!n||!n.isManual_)&&me(9);const{scope_:r}=n;return _d(r,e),Sd(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=Ze("Patches").applyPatches_;return Tn(t)?r(t,e):this.produce(t,i=>r(i,e))}};function $s(t,e){const n=ii(t)?Ze("MapSet").proxyMap_(t,e):oi(t)?Ze("MapSet").proxySet_(t,e):nw(t,e);return(e?e.scope_:wd()).drafts_.push(n),n}function ow(t){return Tn(t)||me(10,t),Td(t)}function Td(t){if(!Xe(t)||si(t))return t;const e=t[se];let n;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,n=Ms(t,e.scope_.immer_.useStrictShallowCopy_)}else n=Ms(t,!0);return ni(n,(r,i)=>{bd(n,r,Td(i))}),e&&(e.finalized_=!1),n}var ae=new iw,li=ae.produce;ae.produceWithPatches.bind(ae),ae.setAutoFreeze.bind(ae),ae.setUseStrictShallowCopy.bind(ae),ae.applyPatches.bind(ae),ae.createDraft.bind(ae),ae.finishDraft.bind(ae);const ui={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Us=new Map,fi=t=>{const e=Us.get(t);return e?Object.fromEntries(Object.entries(e.stores).map(([n,r])=>[n,r.getState()])):{}},sw=(t,e,n)=>{if(t===void 0)return{type:"untracked",connection:e.connect(n)};const r=Us.get(n.name);if(r)return{type:"tracked",store:t,...r};const i={connection:e.connect(n),stores:{}};return Us.set(n.name,i),{type:"tracked",store:t,...i}},aw=(t,e={})=>(n,r,i)=>{const{enabled:o,anonymousActionType:s,store:a,...l}=e;let d;try{d=(o??(ui?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!d)return(ui?"production":void 0)!=="production"&&o&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),t(n,r,i);const{connection:c,...h}=sw(a,d,l);let m=!0;i.setState=(w,k,x)=>{const v=n(w,k);if(!m)return v;const S=x===void 0?{type:s||"anonymous"}:typeof x=="string"?{type:x}:x;return a===void 0?(c==null||c.send(S,r()),v):(c==null||c.send({...S,type:`${a}/${S.type}`},{...fi(l.name),[a]:i.getState()}),v)};const y=(...w)=>{const k=m;m=!1,n(...w),m=k},_=t(i.setState,r,i);if(h.type==="untracked"?c==null||c.init(_):(h.stores[h.store]=i,c==null||c.init(Object.fromEntries(Object.entries(h.stores).map(([w,k])=>[w,w===h.store?_:k.getState()])))),i.dispatchFromDevtools&&typeof i.dispatch=="function"){let w=!1;const k=i.dispatch;i.dispatch=(...x)=>{(ui?"production":void 0)!=="production"&&x[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),k(...x)}}return c.subscribe(w=>{var k;switch(w.type){case"ACTION":if(typeof w.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return zs(w.payload,x=>{if(x.type==="__setState"){if(a===void 0){y(x.state);return}Object.keys(x.state).length!==1&&console.error(`
90
+ */var ei=hd,Ub=$b;function zb(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var qb=typeof Object.is=="function"?Object.is:zb,Wb=Ub.useSyncExternalStore,Hb=ei.useRef,Gb=ei.useEffect,Kb=ei.useMemo,Yb=ei.useDebugValue;dd.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var o=Hb(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=Kb(function(){function l(y){if(!d){if(d=!0,c=y,y=r(y),i!==void 0&&s.hasValue){var _=s.value;if(i(_,y))return h=_}return h=y}if(_=h,qb(c,y))return _;var b=r(y);return i!==void 0&&i(_,b)?_:(c=y,h=b)}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=Wb(t,o[0],o[1]);return Gb(function(){s.hasValue=!0,s.value=a},[a]),Yb(a),a},fd.exports=dd;var Xb=fd.exports;const Jb=Cb(Xb),yd={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:Zb}=Nr,{useSyncExternalStoreWithSelector:Qb}=Jb;let gd=!1;const tw=t=>t;function ew(t,e=tw,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=Qb(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,n);return Zb(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"?Ob(t):t,n=(r,i)=>ew(e,r,i);return Object.assign(n,e),n},nw=t=>t?vd(t):vd;var bd=Symbol.for("immer-nothing"),wd=Symbol.for("immer-draftable"),se=Symbol.for("immer-state");function me(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var An=Object.getPrototypeOf;function Tn(t){return!!t&&!!t[se]}function Xe(t){var e;return t?_d(t)||Array.isArray(t)||!!t[wd]||!!((e=t.constructor)!=null&&e[wd])||ii(t)||oi(t):!1}var rw=Object.prototype.constructor.toString();function _d(t){if(!t||typeof t!="object")return!1;const e=An(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)===rw}function ni(t,e){ri(t)===0?Reflect.ownKeys(t).forEach(n=>{e(n,t[n],t)}):t.forEach((n,r)=>e(r,n,t))}function ri(t){const e=t[se];return e?e.type_:Array.isArray(t)?1:ii(t)?2:oi(t)?3:0}function Rs(t,e){return ri(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function xd(t,e,n){const r=ri(t);r===2?t.set(e,n):r===3?t.add(n):t[e]=n}function iw(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}function ii(t){return t instanceof Map}function oi(t){return t instanceof Set}function Je(t){return t.copy_||t.base_}function Ms(t,e){if(ii(t))return new Map(t);if(oi(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[se];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(An(t),r)}else{const r=An(t);if(r!==null&&n)return{...t};const i=Object.create(r);return Object.assign(i,t)}}function Ns(t,e=!1){return si(t)||Tn(t)||!Xe(t)||(ri(t)>1&&(t.set=t.add=t.clear=t.delete=ow),Object.freeze(t),e&&Object.entries(t).forEach(([n,r])=>Ns(r,!0))),t}function ow(){me(2)}function si(t){return Object.isFrozen(t)}var sw={};function Ze(t){const e=sw[t];return e||me(0,t),e}var dr;function Sd(){return dr}function aw(t,e){return{drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Ed(t,e){e&&(Ze("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function Bs(t){Ds(t),t.drafts_.forEach(cw),t.drafts_=null}function Ds(t){t===dr&&(dr=t.parent_)}function Ad(t){return dr=aw(dr,t)}function cw(t){const e=t[se];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function Td(t,e){e.unfinalizedDrafts_=e.drafts_.length;const n=e.drafts_[0];return t!==void 0&&t!==n?(n[se].modified_&&(Bs(e),me(4)),Xe(t)&&(t=ai(e,t),e.parent_||ci(e,t)),e.patches_&&Ze("Patches").generateReplacementPatches_(n[se].base_,t,e.patches_,e.inversePatches_)):t=ai(e,n,[]),Bs(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==bd?t:void 0}function ai(t,e,n){if(si(e))return e;const r=e[se];if(!r)return ni(e,(i,o)=>Pd(t,r,e,i,o,n)),e;if(r.scope_!==t)return e;if(!r.modified_)return ci(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),ni(o,(a,l)=>Pd(t,r,i,a,l,n,s)),ci(t,i,!1),n&&t.patches_&&Ze("Patches").generatePatches_(r,n,t.patches_,t.inversePatches_)}return r.copy_}function Pd(t,e,n,r,i,o,s){if(Tn(i)){const a=o&&e&&e.type_!==3&&!Rs(e.assigned_,r)?o.concat(r):void 0,l=ai(t,i,a);if(xd(n,r,l),Tn(l))t.canAutoFreeze_=!1;else return}else s&&n.add(i);if(Xe(i)&&!si(i)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;ai(t,i),(!e||!e.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&ci(t,i)}}function ci(t,e,n=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&Ns(e,n)}function lw(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=Fs;n&&(i=[r],o=hr);const{revoke:s,proxy:a}=Proxy.revocable(i,o);return r.draft_=a,r.revoke_=s,a}var Fs={get(t,e){if(e===se)return t;const n=Je(t);if(!Rs(n,e))return uw(t,n,e);const r=n[e];return t.finalized_||!Xe(r)?r:r===Ls(t.base_,e)?(Vs(t),t.copy_[e]=$s(r,t)):r},has(t,e){return e in Je(t)},ownKeys(t){return Reflect.ownKeys(Je(t))},set(t,e,n){const r=kd(Je(t),e);if(r!=null&&r.set)return r.set.call(t.draft_,n),!0;if(!t.modified_){const i=Ls(Je(t),e),o=i==null?void 0:i[se];if(o&&o.base_===n)return t.copy_[e]=n,t.assigned_[e]=!1,!0;if(iw(n,i)&&(n!==void 0||Rs(t.base_,e)))return!0;Vs(t),js(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 Ls(t.base_,e)!==void 0||e in t.base_?(t.assigned_[e]=!1,Vs(t),js(t)):delete t.assigned_[e],t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){const n=Je(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r&&{writable:!0,configurable:t.type_!==1||e!=="length",enumerable:r.enumerable,value:n[e]}},defineProperty(){me(11)},getPrototypeOf(t){return An(t.base_)},setPrototypeOf(){me(12)}},hr={};ni(Fs,(t,e)=>{hr[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),hr.deleteProperty=function(t,e){return hr.set.call(this,t,e,void 0)},hr.set=function(t,e,n){return Fs.set.call(this,t[0],e,n,t[0])};function Ls(t,e){const n=t[se];return(n?Je(n):t)[e]}function uw(t,e,n){var i;const r=kd(e,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(t.draft_):void 0}function kd(t,e){if(!(e in t))return;let n=An(t);for(;n;){const r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=An(n)}}function js(t){t.modified_||(t.modified_=!0,t.parent_&&js(t.parent_))}function Vs(t){t.copy_||(t.copy_=Ms(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var fw=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"&&me(6),r!==void 0&&typeof r!="function"&&me(7);let i;if(Xe(e)){const o=Ad(this),s=$s(e,void 0);let a=!0;try{i=n(s),a=!1}finally{a?Bs(o):Ds(o)}return Ed(o,r),Td(i,o)}else if(!e||typeof e!="object"){if(i=n(e),i===void 0&&(i=e),i===bd&&(i=void 0),this.autoFreeze_&&Ns(i,!0),r){const o=[],s=[];Ze("Patches").generateReplacementPatches_(e,i,o,s),r(o,s)}return i}else me(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){Xe(t)||me(8),Tn(t)&&(t=dw(t));const e=Ad(this),n=$s(t,void 0);return n[se].isManual_=!0,Ds(e),n}finishDraft(t,e){const n=t&&t[se];(!n||!n.isManual_)&&me(9);const{scope_:r}=n;return Ed(r,e),Td(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=Ze("Patches").applyPatches_;return Tn(t)?r(t,e):this.produce(t,i=>r(i,e))}};function $s(t,e){const n=ii(t)?Ze("MapSet").proxyMap_(t,e):oi(t)?Ze("MapSet").proxySet_(t,e):lw(t,e);return(e?e.scope_:Sd()).drafts_.push(n),n}function dw(t){return Tn(t)||me(10,t),Od(t)}function Od(t){if(!Xe(t)||si(t))return t;const e=t[se];let n;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,n=Ms(t,e.scope_.immer_.useStrictShallowCopy_)}else n=Ms(t,!0);return ni(n,(r,i)=>{xd(n,r,Od(i))}),e&&(e.finalized_=!1),n}var ae=new fw,li=ae.produce;ae.produceWithPatches.bind(ae),ae.setAutoFreeze.bind(ae),ae.setUseStrictShallowCopy.bind(ae),ae.applyPatches.bind(ae),ae.createDraft.bind(ae),ae.finishDraft.bind(ae);const ui={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Us=new Map,fi=t=>{const e=Us.get(t);return e?Object.fromEntries(Object.entries(e.stores).map(([n,r])=>[n,r.getState()])):{}},hw=(t,e,n)=>{if(t===void 0)return{type:"untracked",connection:e.connect(n)};const r=Us.get(n.name);if(r)return{type:"tracked",store:t,...r};const i={connection:e.connect(n),stores:{}};return Us.set(n.name,i),{type:"tracked",store:t,...i}},pw=(t,e={})=>(n,r,i)=>{const{enabled:o,anonymousActionType:s,store:a,...l}=e;let d;try{d=(o??(ui?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!d)return(ui?"production":void 0)!=="production"&&o&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),t(n,r,i);const{connection:c,...h}=hw(a,d,l);let m=!0;i.setState=(b,P,x)=>{const v=n(b,P);if(!m)return v;const S=x===void 0?{type:s||"anonymous"}:typeof x=="string"?{type:x}:x;return a===void 0?(c==null||c.send(S,r()),v):(c==null||c.send({...S,type:`${a}/${S.type}`},{...fi(l.name),[a]:i.getState()}),v)};const y=(...b)=>{const P=m;m=!1,n(...b),m=P},_=t(i.setState,r,i);if(h.type==="untracked"?c==null||c.init(_):(h.stores[h.store]=i,c==null||c.init(Object.fromEntries(Object.entries(h.stores).map(([b,P])=>[b,b===h.store?_:P.getState()])))),i.dispatchFromDevtools&&typeof i.dispatch=="function"){let b=!1;const P=i.dispatch;i.dispatch=(...x)=>{(ui?"production":void 0)!=="production"&&x[0].type==="__setState"&&!b&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),b=!0),P(...x)}}return c.subscribe(b=>{var P;switch(b.type){case"ACTION":if(typeof b.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return zs(b.payload,x=>{if(x.type==="__setState"){if(a===void 0){y(x.state);return}Object.keys(x.state).length!==1&&console.error(`
91
91
  [zustand devtools middleware] Unsupported __setState action format.
92
92
  When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
93
93
  and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
94
- `);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(w.payload.type){case"RESET":return y(_),a===void 0?c==null?void 0:c.init(i.getState()):c==null?void 0:c.init(fi(l.name));case"COMMIT":if(a===void 0){c==null||c.init(i.getState());return}return c==null?void 0:c.init(fi(l.name));case"ROLLBACK":return zs(w.state,x=>{if(a===void 0){y(x),c==null||c.init(i.getState());return}y(x[a]),c==null||c.init(fi(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return zs(w.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}=w.payload,v=(k=x.computedStates.slice(-1)[0])==null?void 0:k.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}}),_},zs=(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 cw(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 pr=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(r){return pr(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return pr(r)(n)}}}},lw=(t,e)=>(n,r,i)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:k=>k,version:0,merge:(k,x)=>({...x,...k}),...e},s=!1;const a=new Set,l=new Set;let d;try{d=o.getStorage()}catch{}if(!d)return t((...k)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...k)},r,i);const c=pr(o.serialize),h=()=>{const k=o.partialize({...r()});let x;const v=c({state:k,version:o.version}).then(S=>d.setItem(o.name,S)).catch(S=>{x=S});if(x)throw x;return v},m=i.setState;i.setState=(k,x)=>{m(k,x),h()};const y=t((...k)=>{n(...k),h()},r,i);let _;const w=()=>{var k;if(!d)return;s=!1,a.forEach(v=>v(r()));const x=((k=o.onRehydrateStorage)==null?void 0:k.call(o,r()))||void 0;return pr(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 S;return _=o.merge(v,(S=r())!=null?S:y),n(_,!0),h()}).then(()=>{x==null||x(_,void 0),s=!0,l.forEach(v=>v(_))}).catch(v=>{x==null||x(void 0,v)})};return i.persist={setOptions:k=>{o={...o,...k},k.getStorage&&(d=k.getStorage())},clearStorage:()=>{d==null||d.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>w(),hasHydrated:()=>s,onHydrate:k=>(a.add(k),()=>{a.delete(k)}),onFinishHydration:k=>(l.add(k),()=>{l.delete(k)})},w(),_||y},uw=(t,e)=>(n,r,i)=>{let o={storage:cw(()=>localStorage),partialize:w=>w,version:0,merge:(w,k)=>({...k,...w}),...e},s=!1;const a=new Set,l=new Set;let d=o.storage;if(!d)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 d.setItem(o.name,{state:w,version:o.version})},h=i.setState;i.setState=(w,k)=>{h(w,k),c()};const m=t((...w)=>{n(...w),c()},r,i);i.getInitialState=()=>m;let y;const _=()=>{var w,k;if(!d)return;s=!1,a.forEach(v=>{var S;return v((S=r())!=null?S:m)});const x=((k=o.onRehydrateStorage)==null?void 0:k.call(o,(w=r())!=null?w:m))||void 0;return pr(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 S;const[R,O]=v;if(y=o.merge(O,(S=r())!=null?S:m),n(y,!0),R)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:w=>{o={...o,...w},w.storage&&(d=w.storage)},clearStorage:()=>{d==null||d.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>_(),hasHydrated:()=>s,onHydrate:w=>(a.add(w),()=>{a.delete(w)}),onFinishHydration:w=>(l.add(w),()=>{l.delete(w)})},o.skipHydration||_(),y||m},Ht=Yb(aw(((t,e)=>"getStorage"in e||"serialize"in e||"deserialize"in e?((ui?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),lw(t,e)):uw(t,e))((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,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(li(i=>{const o=i.conversations.find(s=>s.threadId===n);o&&(o.csMember=r)})),addMessage:(n,r)=>t(li(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(li(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(li(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}}),{name:"discord-widget-storage",partialize:t=>({token:t.token,username:t.username,email:t.email,openConversationId:t.openConversationId,conversations:fw(t.conversations),guildSettings:t.guildSettings}),onRehydrateStorage:t=>()=>t.setRehydrated(!0)}),{enabled:!1}));function fw(t){return t.map(e=>({...e,messages:e.messages.filter(n=>!n.ephemeral&&!n.pending)}))}const Pd=460,dw="https://api.staging.deskcord.chat",hw=750;function pw(){var e,n;const t={app_id:(e=window==null?void 0:window.deskcordSettings)==null?void 0:e.app_id,api:((n=window==null?void 0:window.deskcordSettings)==null?void 0:n.api)??dw};if(!t.app_id)throw new Error("Cannot initialize discord chat. Please check your installation and embed.");return t}const ye=pw();async function mw({content:t}){const e=Ht.getState().username,n=ti.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(`${ye.api}/conversations/sendMessage`,o)).json()}var Pn=(t=>(t[t.IntroduceYourself=0]="IntroduceYourself",t[t.UploadFile=1]="UploadFile",t))(Pn||{});const mr="System",yw={content:"This conversation has been closed by the support.",support:!0,authorName:mr,date:Date.now()},gw={content:"",support:!0,authorName:mr,date:Date.now(),customRenderer:Pn.IntroduceYourself};function vw(t){return{content:`You are now chatting with ${t}.`,support:!0,authorName:mr,date:Date.now(),ephemeral:!0}}function bw(t){return{content:"",support:!0,authorName:mr,date:Date.now(),customRenderer:Pn.UploadFile,customRendererProps:{file:t},ephemeral:!0}}function ww(t){return{content:"",support:!1,authorName:"",date:Date.now(),ephemeral:!0,attachments:t}}const _w=Le(({accept:t,maxSize:e,uploadConfig:n,onFileSelect:r,onUploadComplete:i,onUploadStart:o,onError:s},a)=>{const l=ot(null),d=ot(null),{addMessage:c,getConversation:h,removeMessage:m,updateMessage:y}=Ht(),_=h();qn(a,()=>({upload:async()=>{if(d.current)try{const R=new FormData;R.append("file",d.current),o==null||o(d.current),k(d.current);const O=await fetch(n.url,{method:n.method,headers:n.headers,body:R}),B=await O.json();i==null||i(O),x(d.current),w(B)}catch(R){s==null||s(R),v(d.current)}},clear:()=>{d.current=null,l.current&&(l.current.value=""),r==null||r(null)}}));function w(R){_&&c(_.threadId,ww(R.attachments))}function k(R){_&&c(_.threadId,bw({fileName:R.name,status:"uploading",size:R.size}))}function x(R){var B;if(!_)return;const O=(B=h())==null?void 0:B.messages.find(L=>{var W,F;return((F=(W=L.customRendererProps)==null?void 0:W.file)==null?void 0:F.fileName)===R.name});O&&m(_.threadId,O.date)}function v(R){var B,L;if(!_)return;const O=(B=h())==null?void 0:B.messages.find(W=>{var F,Y;return((Y=(F=W.customRendererProps)==null?void 0:F.file)==null?void 0:Y.fileName)===R.name});(L=O==null?void 0:O.customRendererProps)!=null&&L.file&&y(_.threadId,O.date,{...O,customRendererProps:{...O.customRendererProps,file:{...O.customRendererProps.file,status:"error"}}})}return M(Ot,{children:[M("button",{className:"text-gray-500 hover:text-blue-500","aria-label":"Upload file",onClick:()=>{var R;return(R=l.current)==null?void 0:R.click()},children:M(pb,{size:16})}),M("input",{type:"file",accept:t,ref:l,style:{display:"none"},onChange:R=>{var B;const O=(B=R.target.files)==null?void 0:B[0];O&&O.size<=e?(d.current=O,r==null||r(O)):(d.current=null,r==null||r(null))}})]})}),xw=({size:t})=>M("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:M("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"})}),Sw=({onPickEmoji:t})=>M("div",{className:"mb-2 p-2 bg-white max-h-40 overflow-y-auto",children:M("div",{className:"grid grid-cols-8 gap-2",children:Ew.map((e,n)=>M("button",{className:"text-2xl hover:bg-gray-100 rounded",onClick:()=>t(e),children:e},n))})}),Ew=["😀","😃","😄","😁","😆","😅","😂","🤣","😊","😇","🙂","🙃","😉","😌","😍","🥰","😘","😗","😙","😚","😋","😛","😝","😜","🤪","🤨","🧐","🤓","😎","🤩","🥳","😏","😒","😞","😔","😟","😕","🙁","☹️","😣","😖","😫","😩","🥺","😢","😭","😤","😠","😡","🤬","🤯","😳","🥵","🥶","😱","😨","😰","😥","😓","🤗","🤔","🤭","🤫","🤥","😶","😐","😑","😬","🙄","😯","😦","😧","😮","😲","🥱","😴","🤤","😪","😵","🤐","🥴","🤢","🤮","🤧","😷","🤒","🤕"],Aw=({imageUrl:t,fileName:e,onDelete:n,width:r,height:i})=>M("div",{className:"relative w-32 h-32 rounded-lg overflow-hidden bg-gray-100 border border-gray-200",children:[M("div",{className:"flex justify-center absolute inset-0",children:M("img",{src:t,alt:"Preview",className:`w-[${r}px] h-[${i}px] max-w-[100px] max-h-[100px] aspect-auto`})}),M("button",{onClick:n,className:"absolute top-1 right-1 bg-gray-600 p-1 rounded-lg text-red-400 hover:text-white transition",children:M(yb,{size:20})}),M("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})]}),Tw=t=>{const{inputMessage:e,setInputMessage:n,sendMessage:r,setFiles:i,files:o,showEmojiPicker:s,addEmoji:a,setShowEmojiPicker:l,attachmentPreviews:d}=t,{getConversation:c}=Ht(),h=c(),m=ti.get("discord-widget"),y=ot(null),_=(h==null?void 0:h.status)==="closed",w=()=>{},k=B=>{i(o.filter(L=>(B==null?void 0:B.name)!==L.name))},x=B=>{B&&i([...o,B])},v=()=>{var B;(B=y.current)==null||B.upload()},S=()=>{o.length&&v(),r()},R=B=>{B.key==="Enter"&&(B.shiftKey?(B.preventDefault(),n(`${e}
95
- `)):(B.preventDefault(),S()))};return M("div",{className:"relative border-t border-t-gray-200",children:[s&&M(Sw,{onPickEmoji:a}),(()=>{if(!(o!=null&&o.length))return null;const B=o.map((L,W)=>{if(!d[L.name])return null;const{url:F,width:Y,height:Z}=d[L.name];return M(Aw,{onDelete:()=>{var et;i(o.filter(st=>st.name!==L.name)),(et=y.current)==null||et.clear()},fileName:L.name,width:Y,height:Z,imageUrl:F},`attachment-preview-${W}`)});return M("div",{className:"m-2",children:B})})(),M("textarea",{id:"hs-textarea-ex-1",disabled:_,value:e,onChange:B=>n(B.target.value),onKeyDown:R,className:"p-4 pb-12 block w-full border-t border-gray-200 text-sm outline-none disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 resize-none",placeholder:"Ask us anything!","data-hs-textarea-auto-height":""}),M("div",{className:"absolute bottom-px inset-x-px p-2 rounded-b-md bg-white dark:bg-neutral-900",children:M("div",{className:"flex justify-between items-center",children:[M("div",{className:"flex items-center",children:M("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",children:M(_w,{ref:y,accept:"image/*",maxSize:10*1024*1024,uploadConfig:{url:`${ye.api}/conversations/uploadAttachment`,method:"POST",headers:{Authorization:`Bearer ${m}`}},onUploadComplete:w,onUploadStart:k,onFileSelect:x})})}),M("div",{className:"flex items-center gap-x-1",children:[M("button",{type:"button",onClick:_?void 0:()=>l(!s),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",children:M(mb,{size:16})}),M("button",{type:"button",onClick:()=>S(),className:"inline-flex shrink-0 justify-center items-center size-8 rounded-lg text-white bg-blue-600 hover:bg-blue-500 focus:z-10 focus:outline-none focus:bg-blue-500",children:M(xw,{size:16})})]})]})})]})},kd=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`},Od="carousel",Cd="controller",Pw="navigation",kw="no-scroll",Ws="portal",Ow="root",Id="toolbar",qs="loading",Hs="error",Gs="complete",Cw="placeholder",Iw=t=>`active-slide-${t}`,Rd="flex_center",Rw="no_scroll",Md="no_scroll_padding",Mw="slide_wrapper",Qe="prev",tn="next",Nd="swipe",kn="close",Dd="onPointerDown",Bd="onPointerMove",Ld="onPointerUp",Fd="onPointerLeave",jd="onPointerCancel",Vd="onKeyDown",Nw="onKeyUp",$d="onWheel",Dw="Escape",Bw="ArrowLeft",Lw="ArrowRight",Fw="button",Ks="icon",Ud="contain",zd="cover",jw="Unknown action type",Wd="yarl__";function Ne(...t){return[...t].filter(Boolean).join(" ")}function xt(t){return`${Wd}${t}`}function ie(t){return`--${Wd}${t}`}function yr(t,e){return`${t}${e?`_${e}`:""}`}function Ys(t){return e=>yr(t,e)}function Vw(t,e){var n;return(n=t==null?void 0:t[e])!==null&&n!==void 0?n:e}function qd(...t){return()=>{t.forEach(e=>{e()})}}function en(t,e,n){return()=>{const r=jt(n);if(!r)throw new Error(`${t} must be used within a ${e}.Provider`);return r}}function Hd(){return typeof window<"u"}function $w(t,e=0){const n=10**e;return Math.round((t+Number.EPSILON)*n)/n}function Gd(t){return t.type===void 0||t.type==="image"}function Uw(t,e){return t.imageFit===zd||t.imageFit!==Ud&&e===zd}function di(t){return typeof t=="string"?Number.parseInt(t,10):t}function hi(t){if(typeof t=="number")return{pixel:t};if(typeof t=="string"){const e=di(t);return t.endsWith("%")?{percent:e}:{pixel:e}}return{pixel:0}}function zw(t,e){const n=hi(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 Kd(t,e){return e>0?(t%e+e)%e:0}function Yd(t){return t.length>0}function Xd(t,e){return t[Kd(e,t.length)]}function Xs(t,e){return Yd(t)?Xd(t,e):void 0}function Ww(t){return Gd(t)?t.src:void 0}function qw(t,e,n=0){return Math.min(t.preload,Math.max(t.finite?e.length-1:Math.floor(e.length/2),n))}const Hw=Number(nl.split(".")[0])>=19;function Gw(t){return{inert:Hw?t:t?"":void 0}}const Js={open:!1,close:()=>{},index:0,slides:[],render:{},plugins:[],toolbar:{buttons:[kn]},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:Ud,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 nn(t,e){return{name:t,component:e}}function Gt(t,e){return{module:t,children:e}}function Jd(t,e,n){return t.module.name===e?n(t):t.children?[Gt(t.module,t.children.flatMap(r=>{var i;return(i=Jd(r,e,n))!==null&&i!==void 0?i:[]}))]:[t]}function On(t,e,n){return t.flatMap(r=>{var i;return(i=Jd(r,e,n))!==null&&i!==void 0?i:[]})}function Kw(t,e=[],n=[]){let r=t;const i=y=>{const _=[...r];for(;_.length>0;){const w=_.pop();if((w==null?void 0:w.module.name)===y)return!0;w!=null&&w.children&&_.push(...w.children)}return!1},o=(y,_)=>{if(y===""){r=[Gt(_,r)];return}r=On(r,y,w=>[Gt(_,[w])])},s=(y,_)=>{r=On(r,y,w=>[Gt(w.module,[Gt(_,w.children)])])},a=(y,_,w)=>{r=On(r,y,k=>{var x;return[Gt(k.module,[...w?[Gt(_)]:[],...(x=k.children)!==null&&x!==void 0?x:[],...w?[]:[Gt(_)]])]})},l=(y,_,w)=>{r=On(r,y,k=>[...w?[Gt(_)]:[],k,...w?[]:[Gt(_)]])},d=y=>{s(Cd,y)},c=(y,_)=>{r=On(r,y,w=>[Gt(_,w.children)])},h=y=>{r=On(r,y,_=>_.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 Zd=te(null),Zs=en("useDocument","DocumentContext",Zd);function Yw({nodeRef:t,children:e}){const n=qt(()=>{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 nt(Zd.Provider,{value:n},e)}const Qd=te(null),pi=en("useEvents","EventsContext",Qd);function Xw({children:t}){const[e]=wt({});yt(()=>()=>{Object.keys(e).forEach(r=>delete e[r])},[e]);const n=qt(()=>{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 nt(Qd.Provider,{value:n},t)}const th=te(null),gr=en("useLightboxProps","LightboxPropsContext",th);function Jw({children:t,...e}){return nt(th.Provider,{value:e},t)}const eh=te(null),mi=en("useLightboxState","LightboxStateContext",eh),nh=te(null),Zw=en("useLightboxDispatch","LightboxDispatchContext",nh);function Qw(t,e){switch(e.type){case"swipe":{const{slides:n}=t,r=(e==null?void 0:e.increment)||0,i=t.globalIndex+r,o=Kd(i,n.length),s=Xs(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:Xs(e.slides,e.index)}:t;default:throw new Error(jw)}}function t_({slides:t,index:e,children:n}){const[r,i]=Wn(Qw,{slides:t,currentIndex:e,globalIndex:e,currentSlide:Xs(t,e)});yt(()=>{i({type:"update",slides:t,index:e})},[t,e]);const o=qt(()=>({...r,state:r,dispatch:i}),[r,i]);return nt(nh.Provider,{value:i},nt(eh.Provider,{value:o},n))}const rh=te(null),yi=en("useTimeouts","TimeoutsContext",rh);function e_({children:t}){const[e]=wt([]);yt(()=>()=>{e.forEach(r=>window.clearTimeout(r)),e.splice(0,e.length)},[e]);const n=qt(()=>{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 nt(rh.Provider,{value:n},t)}const ih=Le(function({label:e,className:n,icon:r,renderIcon:i,onClick:o,style:s,...a},l){const{styles:d,labels:c}=gr(),h=Vw(c,e);return nt("button",{ref:l,type:"button",title:h,"aria-label":h,className:Ne(xt(Fw),n),onClick:o,style:{...s,...d.button},...a},i?i():nt(r,{className:xt(Ks),style:d.icon}))});function n_(t,e){const n=r=>nt("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 vr(t,e){return n_(t,nt("g",{fill:"currentColor"},nt("path",{d:"M0 0h24v24H0z",fill:"none"}),e))}const r_=vr("Close",nt("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"})),i_=vr("Previous",nt("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})),o_=vr("Next",nt("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),s_=vr("Loading",nt(Ot,null,Array.from({length:8}).map((t,e,n)=>nt("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)`})))),a_=vr("Error",nt("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"})),br=Hd()?Ce:yt;function oh(){const[t,e]=wt(!1);return yt(()=>{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 c_(t){let e=0,n=0,r=0;const o=window.getComputedStyle(t).transform.match(/matrix.*\((.+)\)/);if(o){const s=o[1].split(",").map(di);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 sh(t,e){const n=ot(),r=ot(),i=oh();return br(()=>{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(),c_(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 ah(){const t=ot(null),e=ot(),[n,r]=wt();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 gi(){const t=ot(),{setTimeout:e,clearTimeout:n}=yi();return kt((r,i)=>{n(t.current),t.current=e(r,i>0?i:0)},[e,n])}function $t(t){const e=ot(t);return br(()=>{e.current=t}),kt((...n)=>{var r;return(r=e.current)===null||r===void 0?void 0:r.call(e,...n)},[])}function ch(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function Qs(t,e){return qt(()=>t==null&&e==null?null:n=>{ch(t,n),ch(e,n)},[t,e])}function l_(t,e=!1){const n=ot();br(()=>{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 ta(){const[t,e]=wt(!1);return br(()=>{e(window.getComputedStyle(window.document.documentElement).direction==="rtl")},[]),t}function u_(){const[t]=wt({}),e=kt((i,o)=>{var s;(s=t[i])===null||s===void 0||s.forEach(a=>{o.isPropagationStopped()||a(o)})},[t]),n=qt(()=>({onPointerDown:i=>e(Dd,i),onPointerMove:i=>e(Bd,i),onPointerUp:i=>e(Ld,i),onPointerLeave:i=>e(Fd,i),onPointerCancel:i=>e(jd,i),onKeyDown:i=>e(Vd,i),onKeyUp:i=>e(Nw,i),onWheel:i=>e($d,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 lh(t,e){const n=ot(0),r=gi(),i=$t((...o)=>{n.current=Date.now(),t(o)});return kt((...o)=>{r(()=>{i(o)},e-(Date.now()-n.current))},[e,i,r])}const ea=Ys("slide"),na=Ys("slide_image");function f_({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,k;const[x,v]=wt(qs),{publish:S}=pi(),{setTimeout:R}=yi(),O=ot(null);yt(()=>{e===0&&S(Iw(x))},[e,x,S]);const B=$t(G=>{("decode"in G?G.decode():Promise.resolve()).catch(()=>{}).then(()=>{G.parentNode&&(v(Gs),R(()=>{a==null||a(G)},0))})}),L=kt(G=>{O.current=G,G!=null&&G.complete&&B(G)},[B]),W=kt(G=>{B(G.currentTarget)},[B]),F=$t(()=>{v(Hs),l==null||l()}),Y=Uw(t,i),Z=(G,E)=>Number.isFinite(G)?G:E,et=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(...((_=(y=t.srcSet)===null||y===void 0?void 0:y.map(G=>G.height))!==null&&_!==void 0?_:[]).concat(t.height?[t.height]:[]).filter(Boolean)),((w=O.current)===null||w===void 0?void 0:w.naturalHeight)||0),At=et&&st?{maxWidth:`min(${et}px, 100%)`,maxHeight:`min(${st}px, 100%)`}:{maxWidth:"100%",maxHeight:"100%"},dt=(k=t.srcSet)===null||k===void 0?void 0:k.sort((G,E)=>G.width-E.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&&Hd()?`${Math.round(Math.min(It(),r.width))}px`:void 0,{style:ht,className:U,...H}=o||{};return nt(Ot,null,nt("img",{ref:L,onLoad:W,onError:F,onClick:s,draggable:!1,className:Ne(xt(na()),Y&&xt(na("cover")),x!==Gs&&xt(na("loading")),U),style:{...At,...d,...ht},...H,alt:t.alt,sizes:at,srcSet:dt,src:t.src}),x!==Gs&&nt("div",{className:xt(ea(Cw))},x===qs&&(n!=null&&n.iconLoading?n.iconLoading():nt(s_,{className:Ne(xt(Ks),xt(ea(qs)))})),x===Hs&&(n!=null&&n.iconError?n.iconError():nt(a_,{className:Ne(xt(Ks),xt(ea(Hs)))}))))}const d_=Le(function({className:e,children:n,...r},i){const o=ot(null);return nt(Yw,{nodeRef:o},nt("div",{ref:Qs(i,o),className:Ne(xt("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 h_(t,e,n,r,i){yt(()=>qd(t(Dd,e),t(Bd,n),t(Ld,r),t(Fd,r),t(jd,r)),[t,e,n,r,i])}var ge;(function(t){t[t.NONE=0]="NONE",t[t.SWIPE=1]="SWIPE",t[t.PULL=2]="PULL"})(ge||(ge={}));const ra=30;function p_(t,e,n,r,i,o,s,a,l,d,c,h,m,y){const _=ot(0),w=ot([]),k=ot(),x=ot(0),v=ot(ge.NONE),S=kt(F=>{k.current===F.pointerId&&(k.current=void 0,v.current=ge.NONE);const Y=w.current;Y.splice(0,Y.length,...Y.filter(Z=>Z.pointerId!==F.pointerId))},[]),R=kt(F=>{S(F),F.persist(),w.current.push(F)},[S]),O=$t(F=>{R(F)}),B=(F,Y)=>d&&F>Y||l&&F<-Y,L=$t(F=>{if(w.current.find(Y=>Y.pointerId===F.pointerId)&&k.current===F.pointerId){const Y=Date.now()-x.current,Z=_.current;v.current===ge.SWIPE?Math.abs(Z)>.3*n||Math.abs(Z)>5&&Y<r?s(Z,Y):a(Z):v.current===ge.PULL&&(B(Z,2*ra)?m(Z,Y):y(Z)),_.current=0,v.current=ge.NONE}S(F)}),W=$t(F=>{const Y=w.current.find(Z=>Z.pointerId===F.pointerId);if(Y){const Z=k.current===F.pointerId;if(F.buttons===0){Z&&_.current!==0?L(F):S(Y);return}const et=F.clientX-Y.clientX,st=F.clientY-Y.clientY;if(k.current===void 0){const At=dt=>{R(F),k.current=F.pointerId,x.current=Date.now(),v.current=dt};Math.abs(et)>Math.abs(st)&&Math.abs(et)>ra&&e(et)?(At(ge.SWIPE),i()):Math.abs(st)>Math.abs(et)&&B(st,ra)&&(At(ge.PULL),c())}else Z&&(v.current===ge.SWIPE?(_.current=et,o(et)):v.current===ge.PULL&&(_.current=st,h(st)))}});h_(t,O,W,L)}function m_({preventDefaultWheelX:t,preventDefaultWheelY:e}){const n=ot(null),r=$t(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 y_(t,e,n,r,i,o,s,a,l){const d=ot(0),c=ot(0),h=ot(),m=ot(),y=ot(0),_=ot(),w=ot(0),{setTimeout:k,clearTimeout:x}=yi(),v=kt(()=>{h.current&&(x(h.current),h.current=void 0)},[x]),S=kt(()=>{m.current&&(x(m.current),m.current=void 0)},[x]),R=$t(()=>{t!==Qt.SWIPE&&(d.current=0,w.current=0,v(),S())});yt(R,[t,R]);const O=$t(L=>{m.current=void 0,d.current===L&&l(d.current)}),B=$t(L=>{if(L.ctrlKey||Math.abs(L.deltaY)>Math.abs(L.deltaX))return;const W=F=>{y.current=F,x(_.current),_.current=F>0?k(()=>{y.current=0,_.current=void 0},300):void 0};if(t===Qt.NONE){if(Math.abs(L.deltaX)<=1.2*Math.abs(y.current)){W(L.deltaX);return}if(!n(-L.deltaX))return;if(c.current+=L.deltaX,v(),Math.abs(c.current)>30)c.current=0,W(0),w.current=Date.now(),o();else{const F=c.current;h.current=k(()=>{h.current=void 0,F===c.current&&(c.current=0)},i)}}else if(t===Qt.SWIPE){let F=d.current-L.deltaX;if(F=Math.min(Math.abs(F),r)*Math.sign(F),d.current=F,s(F),S(),Math.abs(F)>.2*r){W(L.deltaX),a(F,Date.now()-w.current);return}m.current=k(()=>O(F),2*i)}else W(L.deltaX)});yt(()=>e($d,B),[e,B])}const uh=Ys("container"),fh=te(null),wr=en("useController","ControllerContext",fh);function g_({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,_]=wt(),w=mi(),k=Zw(),[x,v]=wt(Qt.NONE),S=ot(0),R=ot(0),O=ot(1),{registerSensors:B,subscribeSensors:L}=u_(),{subscribe:W,publish:F}=pi(),Y=gi(),Z=gi(),et=gi(),{containerRef:st,setContainerRef:At,containerRect:dt}=ah(),It=Qs(m_({preventDefaultWheelX:h,preventDefaultWheelY:m}),At),at=ot(null),ht=Qs(at,void 0),{getOwnerDocument:U}=Zs(),H=ta(),G=J=>(H?-1:1)*(typeof J=="number"?J:1),E=$t(()=>{var J;return(J=st.current)===null||J===void 0?void 0:J.focus()}),N=$t(()=>e),b=$t(()=>w),A=kt(J=>F(Qe,J),[F]),C=kt(J=>F(tn,J),[F]),z=kt(()=>F(kn),[F]),j=J=>!(r.finite&&(G(J)>0&&w.currentIndex===0||G(J)<0&&w.currentIndex===w.slides.length-1)),q=J=>{var gt;S.current=J,(gt=st.current)===null||gt===void 0||gt.style.setProperty(ie("swipe_offset"),`${Math.round(J)}px`)},K=J=>{var gt,St;R.current=J,O.current=(()=>{const X=c&&J>0?J:d&&J<0?-J:0;return Math.min(Math.max($w(1-X/60*(1-.5),2),.5),1)})(),(gt=st.current)===null||gt===void 0||gt.style.setProperty(ie("pull_offset"),`${Math.round(J)}px`),(St=st.current)===null||St===void 0||St.style.setProperty(ie("pull_opacity"),`${O.current}`)},{prepareAnimation:rt}=sh(at,(J,gt,St)=>{if(at.current&&dt)return{keyframes:[{transform:`translate(0, ${J.rect.y-gt.y+St.y}px)`,opacity:J.opacity},{transform:"translate(0, 0)",opacity:1}],duration:J.duration,easing:i.easing.fade}}),ft=(J,gt)=>{if(d||c){K(J);let St=0;at.current&&(St=i.fade*(gt?2:1),rt({rect:at.current.getBoundingClientRect(),opacity:O.current,duration:St})),et(()=>{K(0),v(Qt.NONE)},St),v(Qt.ANIMATION),gt||z()}},{prepareAnimation:vt,isAnimationPlaying:Pt}=sh(at,(J,gt,St)=>{var P;if(at.current&&dt&&(!((P=w.animation)===null||P===void 0)&&P.duration)){const I=hi(r.spacing),X=(I.percent?I.percent*dt.width/100:I.pixel)||0;return{keyframes:[{transform:`translate(${G(w.globalIndex-J.index)*(dt.width+X)+J.rect.x-gt.x+St.x}px, 0)`},{transform:"translate(0, 0)"}],duration:w.animation.duration,easing:w.animation.easing}}}),Ft=$t(J=>{var gt,St;const P=J.offset||0,I=P?i.swipe:(gt=i.navigation)!==null&&gt!==void 0?gt:i.swipe,X=!P&&!Pt()?i.easing.navigation:i.easing.swipe;let{direction:tt}=J;const Q=(St=J.count)!==null&&St!==void 0?St:1;let ct=Qt.ANIMATION,p=I*Q;if(!tt){const f=dt==null?void 0:dt.width,g=J.duration||0,T=f?I/f*Math.abs(P):I;Q!==0?(g<T?p=p/T*Math.max(g,T/5):f&&(p=I/f*(f-Math.abs(P))),tt=G(P)>0?Qe:tn):p=I/2}let u=0;tt===Qe?j(G(1))?u=-Q:(ct=Qt.NONE,p=I):tt===tn&&(j(G(-1))?u=Q:(ct=Qt.NONE,p=I)),p=Math.round(p),Z(()=>{q(0),v(Qt.NONE)},p),at.current&&vt({rect:at.current.getBoundingClientRect(),index:w.globalIndex}),v(ct),F(Nd,{type:"swipe",increment:u,duration:p,easing:X})});yt(()=>{var J,gt;!((J=w.animation)===null||J===void 0)&&J.increment&&(!((gt=w.animation)===null||gt===void 0)&&gt.duration)&&Y(()=>k({type:"swipe",increment:0}),w.animation.duration)},[w.animation,k,Y]);const Yt=[L,j,(dt==null?void 0:dt.width)||0,i.swipe,()=>v(Qt.SWIPE),J=>q(J),(J,gt)=>Ft({offset:J,duration:gt,count:1}),J=>Ft({offset:J,count:0})],Jt=[()=>{c&&v(Qt.PULL)},J=>K(J),J=>ft(J),J=>ft(J,!0)];p_(...Yt,d,c,...Jt),y_(x,...Yt);const Wt=$t(()=>{o.focus&&U().querySelector(`.${xt(Ws)} .${xt(uh())}`)&&E()});yt(Wt,[Wt]);const $=$t(()=>{var J;(J=s.view)===null||J===void 0||J.call(s,{index:w.currentIndex})});yt($,[w.globalIndex,$]),yt(()=>qd(W(Qe,J=>Ft({direction:Qe,...J})),W(tn,J=>Ft({direction:tn,...J})),W(Nd,J=>k(J))),[W,Ft,k]);const he=qt(()=>({prev:A,next:C,close:z,focus:E,slideRect:dt?zw(dt,r.padding):{width:0,height:0},containerRect:dt||{width:0,height:0},subscribeSensors:L,containerRef:st,setCarouselRef:ht,toolbarWidth:y,setToolbarWidth:_}),[A,C,z,E,L,dt,st,ht,y,_,r.padding]);return qn(o.ref,()=>({prev:A,next:C,close:z,focus:E,getLightboxProps:N,getLightboxState:b}),[A,C,z,E,N,b]),nt("div",{ref:It,className:Ne(xt(uh()),xt(Rd)),style:{...x===Qt.SWIPE?{[ie("swipe_offset")]:`${Math.round(S.current)}px`}:null,...x===Qt.PULL?{[ie("pull_offset")]:`${Math.round(R.current)}px`,[ie("pull_opacity")]:`${O.current}`}:null,...o.touchAction!=="none"?{[ie("controller_touch_action")]:o.touchAction}:null,...a.container},...o.aria?{role:"presentation","aria-live":"polite"}:null,tabIndex:-1,...B},dt&&nt(fh.Provider,{value:he},t,(n=l.controls)===null||n===void 0?void 0:n.call(l)))}const v_=nn(Cd,g_);function rn(t){return yr(Od,t)}function dh(t){return yr("slide",t)}function b_({slide:t,offset:e}){const n=ot(null),{currentIndex:r}=mi(),{slideRect:i,close:o,focus:s}=wr(),{render:a,carousel:{imageFit:l,imageProps:d},on:{click:c},controller:{closeOnBackdropClick:h},styles:{slide:m}}=gr(),{getOwnerDocument:y}=Zs(),_=e!==0;yt(()=>{var x;_&&(!((x=n.current)===null||x===void 0)&&x.contains(y().activeElement))&&s()},[_,s,y]);const w=()=>{var x,v,S,R;let O=(x=a.slide)===null||x===void 0?void 0:x.call(a,{slide:t,offset:e,rect:i});return!O&&Gd(t)&&(O=nt(f_,{slide:t,offset:e,render:a,rect:i,imageFit:l,imageProps:d,onClick:_?void 0:()=>c==null?void 0:c({index:r})})),O?nt(Ot,null,(v=a.slideHeader)===null||v===void 0?void 0:v.call(a,{slide:t}),((S=a.slideContainer)!==null&&S!==void 0?S:({children:B})=>B)({slide:t,children:O}),(R=a.slideFooter)===null||R===void 0?void 0:R.call(a,{slide:t})):null},k=x=>{const v=n.current,S=x.target instanceof HTMLElement?x.target:void 0;h&&S&&v&&(S===v||Array.from(v.children).find(R=>R===S)&&S.classList.contains(xt(Mw)))&&o()};return nt("div",{ref:n,className:Ne(xt(dh()),!_&&xt(dh("current")),xt(Rd)),...Gw(_),onClick:k,style:m},w())}function w_(){const t=gr().styles.slide;return nt("div",{className:xt("slide"),style:t})}function __({carousel:t}){const{slides:e,currentIndex:n,globalIndex:r}=mi(),{setCarouselRef:i}=wr(),o=hi(t.spacing),s=hi(t.padding),a=qw(t,e,1),l=[];if(Yd(e))for(let d=n-a;d<=n+a;d+=1){const c=Xd(e,d),h=r-n+d,m=t.finite&&(d<0||d>e.length-1);l.push(m?{key:h}:{key:[`${h}`,Ww(c)].filter(Boolean).join("|"),offset:d-n,slide:c})}return nt("div",{ref:i,className:Ne(xt(rn()),l.length>0&&xt(rn("with_slides"))),style:{[`${ie(rn("slides_count"))}`]:l.length,[`${ie(rn("spacing_px"))}`]:o.pixel||0,[`${ie(rn("spacing_percent"))}`]:o.percent||0,[`${ie(rn("padding_px"))}`]:s.pixel||0,[`${ie(rn("padding_percent"))}`]:s.percent||0}},l.map(({key:d,slide:c,offset:h})=>c?nt(b_,{key:d,slide:c,offset:h}):nt(w_,{key:d})))}const x_=nn(Od,__);function hh(){const{carousel:t}=gr(),{slides:e,currentIndex:n}=mi(),r=e.length===0||t.finite&&n===0,i=e.length===0||t.finite&&n===e.length-1;return{prevDisabled:r,nextDisabled:i}}function S_(t){var e;const n=ta(),{publish:r}=pi(),{animation:i}=gr(),{prevDisabled:o,nextDisabled:s}=hh(),a=((e=i.navigation)!==null&&e!==void 0?e:i.swipe)/2,l=lh(()=>r(Qe),a),d=lh(()=>r(tn),a),c=$t(h=>{switch(h.key){case Dw:r(kn);break;case Bw:(n?s:o)||(n?d:l)();break;case Lw:(n?o:s)||(n?l:d)();break}});yt(()=>t(Vd,c),[t,c])}function ph({label:t,icon:e,renderIcon:n,action:r,onClick:i,disabled:o,style:s}){return nt(ih,{label:t,icon:e,renderIcon:n,className:xt(`navigation_${r}`),disabled:o,onClick:i,style:s,...l_(wr().focus,o)})}function E_({render:{buttonPrev:t,buttonNext:e,iconPrev:n,iconNext:r},styles:i}){const{prev:o,next:s,subscribeSensors:a}=wr(),{prevDisabled:l,nextDisabled:d}=hh();return S_(a),nt(Ot,null,t?t():nt(ph,{label:"Previous",action:Qe,icon:i_,renderIcon:n,style:i.navigationPrev,disabled:l,onClick:o}),e?e():nt(ph,{label:"Next",action:tn,icon:o_,renderIcon:r,style:i.navigationNext,disabled:d,onClick:s}))}const A_=nn(Pw,E_),mh=xt(Rw),T_=xt(Md);function P_(t){return"style"in t}function yh(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,`${(di(o)||0)+e}px`),()=>{s?t.style.setProperty(i,s):t.style.removeProperty(i)}}function k_({noScroll:{disabled:t},children:e}){const n=ta(),{getOwnerDocument:r,getOwnerWindow:i}=Zs();return yt(()=>{if(t)return()=>{};const o=[],s=i(),{body:a,documentElement:l}=r(),d=Math.round(s.innerWidth-l.clientWidth);if(d>0){o.push(yh(a,d,n));const c=a.getElementsByTagName("*");for(let h=0;h<c.length;h+=1){const m=c[h];P_(m)&&s.getComputedStyle(m).getPropertyValue("position")==="fixed"&&!m.classList.contains(T_)&&o.push(yh(m,d,n))}}return a.classList.add(mh),()=>{a.classList.remove(mh),o.forEach(c=>c())}},[n,t,r,i]),nt(Ot,null,e)}const O_=nn(kw,k_);function gh(t){return yr(Ws,t)}function vh(t,e,n){const r=t.getAttribute(e);return t.setAttribute(e,n),()=>{r?t.setAttribute(e,r):t.removeAttribute(e)}}function C_({children:t,animation:e,styles:n,className:r,on:i,portal:o,close:s}){const[a,l]=wt(!1),[d,c]=wt(!1),h=ot([]),m=ot(null),{setTimeout:y}=yi(),{subscribe:_}=pi(),k=oh()?0:e.fade;yt(()=>(l(!0),()=>{l(!1),c(!1)}),[]);const x=$t(()=>{h.current.forEach(O=>O()),h.current=[]}),v=$t(()=>{var O;c(!1),x(),(O=i.exiting)===null||O===void 0||O.call(i),y(()=>{var B;(B=i.exited)===null||B===void 0||B.call(i),s()},k)});yt(()=>_(kn,v),[_,v]);const S=$t(O=>{var B,L,W;O.scrollTop,c(!0),(B=i.entering)===null||B===void 0||B.call(i);const F=(W=(L=O.parentNode)===null||L===void 0?void 0:L.children)!==null&&W!==void 0?W:[];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(vh(Z,"inert","")),h.current.push(vh(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)},k)}),R=kt(O=>{O?S(O):x()},[S,x]);return a?uo(nt(d_,{ref:R,className:Ne(r,xt(gh()),xt(Md),d&&xt(gh("open"))),role:"presentation","aria-live":"polite",style:{...e.fade!==Js.animation.fade?{[ie("fade_animation_duration")]:`${k}ms`}:null,...e.easing.fade!==Js.animation.easing.fade?{[ie("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 I_=nn(Ws,C_);function R_({children:t}){return nt(Ot,null,t)}const M_=nn(Ow,R_);function N_(t){return yr(Id,t)}function D_({toolbar:{buttons:t},render:{buttonClose:e,iconClose:n},styles:r}){const{close:i,setToolbarWidth:o}=wr(),{setContainerRef:s,containerRect:a}=ah();br(()=>{o(a==null?void 0:a.width)},[o,a==null?void 0:a.width]);const l=()=>e?e():nt(ih,{key:kn,label:"Close",icon:r_,renderIcon:n,onClick:i});return nt("div",{ref:s,style:r.toolbar,className:xt(N_())},t==null?void 0:t.map(d=>d===kn?l():d))}const B_=nn(Id,D_);function bh(t,e){var n;return nt(t.module.component,{key:t.module.name,...e},(n=t.children)===null||n===void 0?void 0:n.map(r=>bh(r,e)))}function L_(t,e={}){const{easing:n,...r}=t,{easing:i,...o}=e;return{easing:{...n,...i},...r,...o}}function F_({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:_,controller:w,noScroll:k,on:x,slides:v,index:S,plugins:R,...O}=Js,{config:B,augmentation:L}=Kw([Gt(I_,[Gt(O_,[Gt(v_,[Gt(x_),Gt(B_),Gt(A_)])])])],a||R),W=L({animation:L_(h,e),carousel:{...m,...t},render:{...y,...n},toolbar:{..._,...r},controller:{...w,...i},noScroll:{...k,...o},on:{...x,...s},...O,...c});return W.open?nt(Jw,{...W},nt(t_,{slides:l||v,index:di(d||S)},nt(e_,null,nt(Xw,null,bh(Gt(M_,B),W))))):null}const wh=({messageIndexKey:t,attachments:e})=>{const{setFullScreen:n}=Ht(),[r,i]=wt(!1);function o(){return document.getElementById("deskcord-lightbox-portal")??document.body}function s(){return e!=null&&e.length?M(F_,{open:r,portal:{root:o()},close:()=>{i(!1),n(!1)},slides:e.map(a=>({src:a.proxyURL}))}):null}return e!=null&&e.length?M("div",{children:[e.map((a,l)=>{const{proxyURL:d,width:c,height:h}=a;return M("div",{onClick:()=>{n(!0),i(!0)},children:M("img",{src:d,alt:"Preview",className:`rounded-lg w-[${c}px] h-[${h}px] max-w-[200px] max-h-[200px] aspect-auto`})},`conv-cus-attachment-${t}-${l}`)}),s()]},`conv-cus-attachment-${t}`):null},j_=({renderTimestamp:t,message:e,indexKey:n})=>{function r(i,o){const s=/<\w?:\w+:\d+>/g,a=i.split(s),l=i.match(s)??[],d=[];for(let c=0;c<a.length;c++)if(d.push(a[c]),l[c]){const h=o[l[c]];h&&d.push(M("img",{src:h.imageURL,alt:"",style:{display:"inline-block",width:"20px",height:"20px"}},c))}return d}return M("li",{className:"flex flex-col items-start max-w-lg gap-x-2 sm:gap-x-4 me-11",children:[e.content&&M("div",{className:"min-w-10 bg-blue-200 border border-gray-200 rounded-2xl p-2 space-y-1 dark:bg-neutral-900 dark:border-neutral-700",children:r(e.content,e.emojis??{})}),M("div",{className:"flex flex-1",children:M(wh,{attachments:e.attachments,messageIndexKey:n})}),t&&M("div",{children:M("span",{className:"mt-1.5 flex items-center gap-x-1 text-xs text-gray-500",children:[e.authorName," · ",kd(e.date)," ",e.edited?"(edited)":""]})})]},`conv-cs-${n}`)},V_=({message:t,indexKey:e})=>M("li",{className:`flex ms-auto gap-x-2 sm:gap-x-4 ${t.pending?"opacity-80":""}`,children:[t.content&&M("div",{className:"grow text-end space-y-1",children:M("div",{className:"min-w-10 inline-block bg-blue-600 rounded-2xl p-2 shadow-sm",children:M("p",{className:"text-center text-sm text-white",children:t.content})})}),t.attachments&&M("div",{className:"flex flex-1 justify-end",children:M(wh,{attachments:t.attachments,messageIndexKey:e})},`conv-cus-${e}-attachments`)]},`conv-cus-${e}`),$_=({message:t,indexKey:e})=>M("li",{className:"max-w-lg flex gap-x-2 sm:gap-x-4 me-11",children:M("div",{className:"bg-white border border-gray-200 rounded-2xl p-4 space-y-3 dark:bg-neutral-900 dark:border-neutral-700",children:M("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}=Ht(),[o,s]=wt(r),[a,l]=wt(n),[d,c]=wt(""),h=w=>/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(w),m=!!n&&!!r,y=()=>{h(o)?(c(""),t(o)):c("Please enter a valid email address"),e(a)};function _(){return M("div",{className:"max-w-sm space-y-3",children:[M("div",{children:[M("label",{htmlFor:"hs-leading-icon",className:"block text-sm font-medium mb-2 dark:text-white",children:"Name"}),M("div",{className:"relative",children:[M("input",{type:"text",id:"name",value:a,onChange:w=>l(w.target.value),name:"name",className:"py-3 px-4 ps-11 block w-full border-gray-200 shadow-sm rounded-lg text-sm focus:z-10 focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600",placeholder:"John Smith",disabled:m,required:!0}),M("div",{className:"absolute inset-y-0 start-0 flex items-center pointer-events-none z-20 ps-4 text-gray-400",children:M(gb,{size:16})})]})]}),M("div",{children:[M("label",{htmlFor:"hs-leading-icon",className:"block text-sm font-medium mb-2 dark:text-white",children:"Email address"}),M("div",{className:"relative",children:[M("input",{type:"email",id:"email",value:o,onChange:w=>s(w.target.value),name:"email",className:"py-3 px-4 ps-11 block w-full border-gray-200 shadow-sm rounded-lg text-sm focus:z-10 focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600",placeholder:"you@site.com",disabled:m,required:!0}),M("div",{className:"absolute inset-y-0 start-0 flex items-center pointer-events-none z-20 ps-4 text-gray-400",children:M(fb,{size:16})})]}),d&&M("p",{className:"text-red-500 text-sm mt-2",children:d})]}),!n||!r?M("button",{type:"submit",onClick:y,className:"py-3 px-4 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 focus:outline-none focus:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none",children:"Submit"}):null]})}return M(Ot,{children:[M("li",{className:"max-w-lg flex gap-x-2 sm:gap-x-4 me-11",children:M("div",{className:"border border-gray-200 rounded-2xl p-4 space-y-3 bg-blue-200",children:M("p",{className:"mb-1.5 text-sm text-gray-800 dark:text-white",children:"Hello! Please introduce yourself."})})}),M("li",{className:"max-w-lg flex gap-x-2 sm:gap-x-4 me-11",children:M("div",{className:"border border-gray-200 rounded-2xl p-4 space-y-3 bg-blue-200",children:_()})}),n&&r&&!i&&M("li",{className:"max-w-lg flex gap-x-2 sm:gap-x-4 me-11",children:M("div",{className:"border border-gray-200 rounded-2xl p-4 space-y-3 bg-blue-200",children:M("div",{className:"animate-spin inline-block size-8 border-[3px] border-current border-t-transparent text-blue-600 rounded-full dark:text-blue-500",role:"status","aria-label":"loading",children:M("span",{className:"sr-only",children:"Loading..."})})})}),n&&r&&M("li",{className:"max-w-lg flex gap-x-2 sm:gap-x-4 me-11",children:M("div",{className:"border border-gray-200 rounded-2xl p-4 space-y-3 bg-blue-200",children:M("p",{className:"mb-1.5 text-sm text-gray-800 dark:text-white",children:"Nice to meet you! Feel free to ask us anything."})})})]})};function z_(t,e){const n=ot();yt(()=>{n.current=t},[t]),yt(()=>{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 W_(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 q_=({indexKey:t,message:e})=>{const n=e.customRendererProps.file,r=n.status==="error",[i,o]=wt(!0),[s,a]=wt(0);return z_(()=>{s<88?a(s+2.5):o(!1)},i&&!r?250:null),M("li",{className:"max-w-lg flex gap-x-2 sm:gap-x-4",style:{marginTop:"20px",marginBottom:"20px"},children:M("div",{className:"w-full bg-white border border-gray-200 rounded-2xl p-4 space-y-4",children:M("div",{children:[M("div",{className:"mb-2 flex justify-between items-center",children:[M("div",{className:"flex items-center gap-x-3",children:[M("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:M(ub,{})}),M("div",{children:[M("p",{className:`text-sm ${r?"font-semibold text-red-500":"font-medium text-gray-800"}`,children:n.fileName}),M("p",{className:"text-xs text-gray-500 dark:text-neutral-500",children:W_(n.size)})]})]}),r&&M("div",{className:"inline-flex items-center gap-x-2",children:M("span",{className:"relative",children:[M("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:M("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"})}),M("span",{className:"sr-only",children:"Danger"})]})})]}),M("div",{className:"flex items-center gap-x-3 whitespace-nowrap",children:[M("div",{className:"flex w-full h-2 bg-gray-200 rounded-full overflow-hidden dark:bg-neutral-700",role:"progressbar",children:M("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}%`}})}),M("div",{className:"w-6 text-end",children:M("span",{className:"text-sm text-gray-800 dark:text-white",children:[Math.round(s),"%"]})})]})]})})},`conv-fileupload-${t}`)},H_=({conversation:t,open:e})=>{function n(s,a){const l=`${s.date}-${a}`;if(typeof s.customRenderer<"u")switch(s.customRenderer){case Pn.IntroduceYourself:return M(U_,{});case Pn.UploadFile:return M(q_,{message:s,indexKey:l});default:return o(s,l)}else return s.authorName===mr?o(s,l):s.support?r(s,l):i(s,l)}function r(s,a){var h;const l=(h=t==null?void 0:t.messages)==null?void 0:h.filter(m=>m.support),d=l==null?void 0:l[l.length-1],c=s.date===(d==null?void 0:d.date);return M(j_,{renderTimestamp:c,message:s,indexKey:a})}function i(s,a){return M(V_,{message:s,indexKey:a})}function o(s,a){return M($_,{message:s,indexKey:a})}return M("ul",{className:"space-y-2",children:[[...(t==null?void 0:t.messages)??[]].sort((s,a)=>s.date-a.date).map(n),t&&!e&&n(yw,1)]})},G_=()=>{var v;const{getConversation:t,addMessage:e,tempConversationToThread:n,username:r,updateMessage:i}=Ht(),[o,s]=wt(!1),[a,l]=wt([]),[d,c]=wt({}),h=ot(null),m=t(),y=(m==null?void 0:m.status)==="open",[_,w]=wt("");return yt(()=>{h.current&&h.current.scrollTo({top:h.current.scrollHeight,behavior:"smooth"})},[(v=m==null?void 0:m.messages)==null?void 0:v.length]),yt(()=>{const S={};a.forEach(R=>{const O=new FileReader;O.addEventListener("load",function(){const B=new Image;B.onload=()=>{S[R.name]={url:O.result,width:B.width,height:B.height,size:R.size},c(S)},B.src=O.result},!1),O.readAsDataURL(R)})},[a]),M(Ot,{children:[M("div",{ref:h,className:"flex-1 overflow-y-auto p-4 space-y-4",children:M(H_,{conversation:m,open:y})}),M(Tw,{attachmentPreviews:d,files:a,setFiles:l,inputMessage:_,setInputMessage:w,showEmojiPicker:o,setShowEmojiPicker:s,addEmoji:S=>{w(_+S)},sendMessage:async()=>{const S=Date.now(),R={support:!1,content:_,date:S,authorName:r,pending:!0};if(_.trim()!==""){w(""),e(m?m.threadId:"TEMP",R);const O=await mw({content:_});O&&(m||n(O.threadId),i(O.threadId,S,{...R,pending:!1,date:O.date}))}}})]})};function ia(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 K_(t){switch(t){case"online":return"Online";case"idle":case"offline":case"invisible":return"Away";case"dnd":return"Unavailable";default:return"Away"}}const Y_=()=>{const{conversations:t,setOpenConversationId:e}=Ht(),n=t.filter(s=>s.status==="open").length;function r(){return n!==0?null:M("div",{className:"flex justify-center my-2",children:M("button",{onClick:()=>e("TEMP"),type:"button",className:"py-3 px-4 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 focus:outline-none focus:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none",children:["Start a new conversation",M(db,{})]})})}function i(s,a){var c,h,m;const l=s.messages[s.messages.length-1],d=s.status==="open";return M("div",{className:"flex flex-row items-center px-3 py-4 border-b border-gray-200 hover:bg-gray-200 cursor-pointer",onClick:()=>e(s.threadId),children:[M("div",{className:"relative inline-block mr-3",children:[M("img",{className:"inline-block size-[32px] rounded-full",src:((c=s==null?void 0:s.csMember)==null?void 0:c.displayAvatarURL)??"http://placehold.co/250x250"}),((h=s==null?void 0:s.csMember)==null?void 0:h.status)&&M("span",{className:`absolute top-0 end-0 block size-3 rounded-full ring-2 ring-white dark:ring-neutral-900 ${ia(s.csMember.status,"bg")}`})]}),M("div",{className:"flex flex-1 flex-col",children:[M("p",{className:`text-sm/3 ${d?"font-semibold":""}`,children:(m=s==null?void 0:s.csMember)==null?void 0:m.displayName}),M("p",{className:"text-xs text-gray-500 line-clamp-1",children:l.content})]}),M("div",{className:"ml-2",children:M("p",{className:"text-xs text-gray-500",children:kd(l.date)})})]},`conversation-${a}`)}function o(){return[...t].sort((s,a)=>a.lastMessageDate-s.lastMessageDate).map((s,a)=>s.messages.length?i(s,a):null)}return M("div",{className:"overflow-scroll",children:[r(),M(Ot,{children:o()})]})},_h=({IconComponent:t,onClick:e})=>M("button",{className:"flex mr-2 items-center justify-center w-8 h-8 rounded-full hover:bg-gray-100",onClick:e,children:M(t,{})}),X_=({size:t})=>M("svg",{xmlns:"http://www.w3.org/2000/svg",width:t||20,height:t||20,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-x",children:[M("path",{d:"M18 6 6 18"}),M("path",{d:"m6 6 12 12"})]}),J_=({size:t})=>M("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:M("path",{d:"m15 18-6-6 6-6"})}),xh={title:"Hi there 👋",subtitle:"We typically reply within a few minutes"},Z_=()=>{var a,l,d,c,h,m;const{setChatOpen:t,setOpenConversationId:e,guildSettings:n,conversations:r,openConversationId:i}=Ht(),o=r.find(y=>y.status==="open"),s=i&&(o!=null&&o.csMember)&&((a=o==null?void 0:o.csMember)==null?void 0:a.displayName)!=="Customer support"?{title:(l=o==null?void 0:o.csMember)==null?void 0:l.displayName,subtitle:(d=o==null?void 0:o.csMember)!=null&&d.status?K_((c=o==null?void 0:o.csMember)==null?void 0:c.status):null,avatar:(h=o==null?void 0:o.csMember)==null?void 0:h.displayAvatarURL,status:(m=o==null?void 0:o.csMember)==null?void 0:m.status}:{title:(n==null?void 0:n.header_title)??xh.title,subtitle:(n==null?void 0:n.header_subtitle)??xh.subtitle,avatar:(n==null?void 0:n.iconURL)||"https://placehold.co/250x250"};return M("div",{className:"flex flex-row items-center bg-white py-2 px-4 border-b border-grey-200",children:[r.length>0&&i&&M(_h,{onClick:()=>e(null),IconComponent:J_}),M("div",{className:"relative inline-block mr-3",children:[M("img",{className:"inline-block size-[40px] rounded-full",src:s.avatar}),s.status&&M("span",{className:`absolute top-0 end-0 block size-3.5 rounded-full ring-2 ring-white dark:ring-neutral-900 ${ia(s.status,"bg")}`})]}),M("div",{className:"flex-1 flex-col",children:[M("p",{className:"text-lg/5 font-semibold",children:s.title}),s.subtitle&&M("p",{className:`flex-1 text-xs/4 line-clamp-2 ${s.status?ia(s.status,"text"):""}`,children:s.subtitle})]}),M(_h,{onClick:()=>t(!1),IconComponent:X_})]})};function Q_(){const[t,e]=wt({width:null,height:null});return Ce(()=>{const n=()=>{e({width:window.innerWidth,height:window.innerHeight})};return n(),window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)}},[]),t}const t1=()=>{const t=Q_();return!t.width||!t.height?!1:t.width>t.height?t.width<=Pd||t.height<=hw:t.width<=Pd},e1=()=>{const{openConversationId:t,conversations:e,isChatVisible:n}=Ht(),r=t1(),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 M(Tu,{children:n&&M(Os.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:M("div",{className:"flex flex-col h-full bg-white rounded-lg shadow-xl overflow-hidden",children:[M(Z_,{}),i?M(Y_,{}):M(G_,{})]})},"chatbox")})},xe=Object.create(null);xe.open="0",xe.close="1",xe.ping="2",xe.pong="3",xe.message="4",xe.upgrade="5",xe.noop="6";const vi=Object.create(null);Object.keys(xe).forEach(t=>{vi[xe[t]]=t});const oa={type:"error",data:"parser error"},Sh=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Eh=typeof ArrayBuffer=="function",Ah=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,sa=({type:t,data:e},n,r)=>Sh&&e instanceof Blob?n?r(e):Th(e,r):Eh&&(e instanceof ArrayBuffer||Ah(e))?n?r(e):Th(new Blob([e]),r):r(xe[t]+(e||"")),Th=(t,e)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];e("b"+(r||""))},n.readAsDataURL(t)};function Ph(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let aa;function n1(t,e){if(Sh&&t.data instanceof Blob)return t.data.arrayBuffer().then(Ph).then(e);if(Eh&&(t.data instanceof ArrayBuffer||Ah(t.data)))return e(Ph(t.data));sa(t,!1,n=>{aa||(aa=new TextEncoder),e(aa.encode(n))})}const kh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_r=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<kh.length;t++)_r[kh.charCodeAt(t)]=t;const r1=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=_r[t.charCodeAt(r)],s=_r[t.charCodeAt(r+1)],a=_r[t.charCodeAt(r+2)],l=_r[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},i1=typeof ArrayBuffer=="function",ca=(t,e)=>{if(typeof t!="string")return{type:"message",data:Oh(t,e)};const n=t.charAt(0);return n==="b"?{type:"message",data:o1(t.substring(1),e)}:vi[n]?t.length>1?{type:vi[n],data:t.substring(1)}:{type:vi[n]}:oa},o1=(t,e)=>{if(i1){const n=r1(t);return Oh(n,e)}else return{base64:!0,data:t}},Oh=(t,e)=>{switch(e){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},Ch="",s1=(t,e)=>{const n=t.length,r=new Array(n);let i=0;t.forEach((o,s)=>{sa(o,!1,a=>{r[s]=a,++i===n&&e(r.join(Ch))})})},a1=(t,e)=>{const n=t.split(Ch),r=[];for(let i=0;i<n.length;i++){const o=ca(n[i],e);if(r.push(o),o.type==="error")break}return r};function c1(){return new TransformStream({transform(t,e){n1(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 la;function bi(t){return t.reduce((e,n)=>e+n.length,0)}function wi(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 l1(t,e){la||(la=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(bi(n)<1)break;const l=wi(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(bi(n)<2)break;const l=wi(n,2);i=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(bi(n)<8)break;const l=wi(n,8),d=new DataView(l.buffer,l.byteOffset,l.length),c=d.getUint32(0);if(c>Math.pow(2,21)-1){a.enqueue(oa);break}i=c*Math.pow(2,32)+d.getUint32(4),r=3}else{if(bi(n)<i)break;const l=wi(n,i);a.enqueue(ca(o?l:la.decode(l),e)),r=0}if(i===0||i>t){a.enqueue(oa);break}}}})}const Ih=4;function Ut(t){if(t)return u1(t)}function u1(t){for(var e in Ut.prototype)t[e]=Ut.prototype[e];return t}Ut.prototype.on=Ut.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},Ut.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},Ut.prototype.off=Ut.prototype.removeListener=Ut.prototype.removeAllListeners=Ut.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},Ut.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},Ut.prototype.emitReserved=Ut.prototype.emit,Ut.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},Ut.prototype.hasListeners=function(t){return!!this.listeners(t).length};const fe=typeof self<"u"?self:typeof window<"u"?window:Function("return this")();function Rh(t,...e){return e.reduce((n,r)=>(t.hasOwnProperty(r)&&(n[r]=t[r]),n),{})}const f1=fe.setTimeout,d1=fe.clearTimeout;function _i(t,e){e.useNativeTimers?(t.setTimeoutFn=f1.bind(fe),t.clearTimeoutFn=d1.bind(fe)):(t.setTimeoutFn=fe.setTimeout.bind(fe),t.clearTimeoutFn=fe.clearTimeout.bind(fe))}const h1=1.33;function p1(t){return typeof t=="string"?m1(t):Math.ceil((t.byteLength||t.size)*h1)}function m1(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 y1(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}function g1(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 v1 extends Error{constructor(e,n,r){super(e),this.description=n,this.context=r,this.type="TransportError"}}class ua extends Ut{constructor(e){super(),this.writable=!1,_i(this,e),this.opts=e,this.query=e.query,this.socket=e.socket}onError(e,n,r){return super.emitReserved("error",new v1(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=ca(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=y1(e);return n.length?"?"+n:""}}const Mh="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),fa=64,b1={};let Nh=0,xi=0,Dh;function Bh(t){let e="";do e=Mh[t%fa]+e,t=Math.floor(t/fa);while(t>0);return e}function Lh(){const t=Bh(+new Date);return t!==Dh?(Nh=0,Dh=t):t+"."+Bh(Nh++)}for(;xi<fa;xi++)b1[Mh[xi]]=xi;let Fh=!1;try{Fh=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const w1=Fh;function jh(t){const e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||w1))return new XMLHttpRequest}catch{}if(!e)try{return new fe[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function tA(){}function _1(){}const x1=function(){return new jh({xdomain:!1}).responseType!=null}();class S1 extends ua{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=x1&&!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)};a1(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,s1(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]=Lh()),!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 Se(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 Se extends Ut{constructor(e,n){super(),_i(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=Rh(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new jh(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=Se.requestsCount++,Se.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=_1,e)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Se.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(Se.requestsCount=0,Se.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Vh);else if(typeof addEventListener=="function"){const t="onpagehide"in fe?"pagehide":"unload";addEventListener(t,Vh,!1)}}function Vh(){for(let t in Se.requests)Se.requests.hasOwnProperty(t)&&Se.requests[t].abort()}var E1={},Si={};Si.byteLength=P1,Si.toByteArray=O1,Si.fromByteArray=R1;for(var Ee=[],de=[],A1=typeof Uint8Array<"u"?Uint8Array:Array,da="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Cn=0,T1=da.length;Cn<T1;++Cn)Ee[Cn]=da[Cn],de[da.charCodeAt(Cn)]=Cn;de[45]=62,de[95]=63;function $h(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 P1(t){var e=$h(t),n=e[0],r=e[1];return(n+r)*3/4-r}function k1(t,e,n){return(e+n)*3/4-n}function O1(t){var e,n=$h(t),r=n[0],i=n[1],o=new A1(k1(t,r,i)),s=0,a=i>0?r-4:r,l;for(l=0;l<a;l+=4)e=de[t.charCodeAt(l)]<<18|de[t.charCodeAt(l+1)]<<12|de[t.charCodeAt(l+2)]<<6|de[t.charCodeAt(l+3)],o[s++]=e>>16&255,o[s++]=e>>8&255,o[s++]=e&255;return i===2&&(e=de[t.charCodeAt(l)]<<2|de[t.charCodeAt(l+1)]>>4,o[s++]=e&255),i===1&&(e=de[t.charCodeAt(l)]<<10|de[t.charCodeAt(l+1)]<<4|de[t.charCodeAt(l+2)]>>2,o[s++]=e>>8&255,o[s++]=e&255),o}function C1(t){return Ee[t>>18&63]+Ee[t>>12&63]+Ee[t>>6&63]+Ee[t&63]}function I1(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(C1(r));return i.join("")}function R1(t){for(var e,n=t.length,r=n%3,i=[],o=16383,s=0,a=n-r;s<a;s+=o)i.push(I1(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 ha={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ha.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)},ha.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,_=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*(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+=_,a/=256,i-=8);for(s=s<<i|a,d+=i;d>0;t[n+y]=s&255,y+=_,s/=256,d-=8);t[n+y-_]|=w*128};/*!
94
+ `);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(b.payload.type){case"RESET":return y(_),a===void 0?c==null?void 0:c.init(i.getState()):c==null?void 0:c.init(fi(l.name));case"COMMIT":if(a===void 0){c==null||c.init(i.getState());return}return c==null?void 0:c.init(fi(l.name));case"ROLLBACK":return zs(b.state,x=>{if(a===void 0){y(x),c==null||c.init(i.getState());return}y(x[a]),c==null||c.init(fi(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return zs(b.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}=b.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}}),_},zs=(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 mw(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 pr=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(r){return pr(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return pr(r)(n)}}}},yw=(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=pr(o.serialize),h=()=>{const P=o.partialize({...r()});let x;const v=c({state:P,version:o.version}).then(S=>d.setItem(o.name,S)).catch(S=>{x=S});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 _;const b=()=>{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 pr(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 S;return _=o.merge(v,(S=r())!=null?S:y),n(_,!0),h()}).then(()=>{x==null||x(_,void 0),s=!0,l.forEach(v=>v(_))}).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:()=>b(),hasHydrated:()=>s,onHydrate:P=>(a.add(P),()=>{a.delete(P)}),onFinishHydration:P=>(l.add(P),()=>{l.delete(P)})},b(),_||y},gw=(t,e)=>(n,r,i)=>{let o={storage:mw(()=>localStorage),partialize:b=>b,version:0,merge:(b,P)=>({...P,...b}),...e},s=!1;const a=new Set,l=new Set;let d=o.storage;if(!d)return t((...b)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...b)},r,i);const c=()=>{const b=o.partialize({...r()});return d.setItem(o.name,{state:b,version:o.version})},h=i.setState;i.setState=(b,P)=>{h(b,P),c()};const m=t((...b)=>{n(...b),c()},r,i);i.getInitialState=()=>m;let y;const _=()=>{var b,P;if(!d)return;s=!1,a.forEach(v=>{var S;return v((S=r())!=null?S:m)});const x=((P=o.onRehydrateStorage)==null?void 0:P.call(o,(b=r())!=null?b:m))||void 0;return pr(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 S;const[R,O]=v;if(y=o.merge(O,(S=r())!=null?S:m),n(y,!0),R)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:b=>{o={...o,...b},b.storage&&(d=b.storage)},clearStorage:()=>{d==null||d.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>_(),hasHydrated:()=>s,onHydrate:b=>(a.add(b),()=>{a.delete(b)}),onFinishHydration:b=>(l.add(b),()=>{l.delete(b)})},o.skipHydration||_(),y||m},Ht=nw(pw(((t,e)=>"getStorage"in e||"serialize"in e||"deserialize"in e?((ui?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),yw(t,e)):gw(t,e))((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,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(li(i=>{const o=i.conversations.find(s=>s.threadId===n);o&&(o.csMember=r)})),addMessage:(n,r)=>t(li(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(li(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(li(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}}),{name:"discord-widget-storage",partialize:t=>({token:t.token,username:t.username,email:t.email,openConversationId:t.openConversationId,conversations:vw(t.conversations),guildSettings:t.guildSettings}),onRehydrateStorage:t=>()=>t.setRehydrated(!0)}),{enabled:!1}));function vw(t){return t.map(e=>({...e,messages:e.messages.filter(n=>!n.ephemeral&&!n.pending)}))}const Cd=460,bw="https://api.staging.deskcord.chat",ww=750;function _w(){var e,n;const t={app_id:(e=window==null?void 0:window.deskcordSettings)==null?void 0:e.app_id,api:((n=window==null?void 0:window.deskcordSettings)==null?void 0:n.api)??bw};if(!t.app_id)throw new Error("Cannot initialize discord chat. Please check your installation and embed.");return t}const ye=_w();async function xw({content:t}){const e=Ht.getState().username,n=ti.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(`${ye.api}/conversations/sendMessage`,o)).json()}var Pn=(t=>(t[t.IntroduceYourself=0]="IntroduceYourself",t[t.UploadFile=1]="UploadFile",t))(Pn||{});const mr="System",Sw={content:"This conversation has been closed by the support.",support:!0,authorName:mr,date:Date.now()},Ew={content:"",support:!0,authorName:mr,date:Date.now(),customRenderer:Pn.IntroduceYourself};function Aw(t){return{content:`You are now chatting with ${t}.`,support:!0,authorName:mr,date:Date.now(),ephemeral:!0}}function Tw(t){return{content:"",support:!0,authorName:mr,date:Date.now(),customRenderer:Pn.UploadFile,customRendererProps:{file:t},ephemeral:!0}}function Pw(t){return{content:"",support:!1,authorName:"",date:Date.now(),ephemeral:!0,attachments:t}}const kw=Fe(({accept:t,maxSize:e,uploadConfig:n,onFileSelect:r,onUploadComplete:i,onUploadStart:o,onError:s},a)=>{const l=ot(null),d=ot(null),{addMessage:c,getConversation:h,removeMessage:m,updateMessage:y}=Ht(),_=h();Wn(a,()=>({upload:async()=>{if(d.current)try{const R=new FormData;R.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:R}),D=await O.json();i==null||i(O),x(d.current),b(D)}catch(R){s==null||s(R),v(d.current)}},clear:()=>{d.current=null,l.current&&(l.current.value=""),r==null||r(null)}}));function b(R){_&&c(_.threadId,Pw(R.attachments))}function P(R){_&&c(_.threadId,Tw({fileName:R.name,status:"uploading",size:R.size}))}function x(R){var D;if(!_)return;const O=(D=h())==null?void 0:D.messages.find(F=>{var q,L;return((L=(q=F.customRendererProps)==null?void 0:q.file)==null?void 0:L.fileName)===R.name});O&&m(_.threadId,O.date)}function v(R){var D,F;if(!_)return;const O=(D=h())==null?void 0:D.messages.find(q=>{var L,Y;return((Y=(L=q.customRendererProps)==null?void 0:L.file)==null?void 0:Y.fileName)===R.name});(F=O==null?void 0:O.customRendererProps)!=null&&F.file&&y(_.threadId,O.date,{...O,customRendererProps:{...O.customRendererProps,file:{...O.customRendererProps.file,status:"error"}}})}return M(Ot,{children:[M("button",{className:"text-gray-500 hover:text-blue-500","aria-label":"Upload file",onClick:()=>{var R;return(R=l.current)==null?void 0:R.click()},children:M(_b,{size:16})}),M("input",{type:"file",accept:t,ref:l,style:{display:"none"},onChange:R=>{var D;const O=(D=R.target.files)==null?void 0:D[0];O&&O.size<=e?(d.current=O,r==null||r(O)):(d.current=null,r==null||r(null))}})]})}),Ow=({size:t})=>M("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:M("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"})}),Cw=({onPickEmoji:t})=>M("div",{className:"mb-2 p-2 bg-white max-h-40 overflow-y-auto",children:M("div",{className:"grid grid-cols-8 gap-2",children:Iw.map((e,n)=>M("button",{className:"text-2xl hover:bg-gray-100 rounded",onClick:()=>t(e),children:e},n))})}),Iw=["😀","😃","😄","😁","😆","😅","😂","🤣","😊","😇","🙂","🙃","😉","😌","😍","🥰","😘","😗","😙","😚","😋","😛","😝","😜","🤪","🤨","🧐","🤓","😎","🤩","🥳","😏","😒","😞","😔","😟","😕","🙁","☹️","😣","😖","😫","😩","🥺","😢","😭","😤","😠","😡","🤬","🤯","😳","🥵","🥶","😱","😨","😰","😥","😓","🤗","🤔","🤭","🤫","🤥","😶","😐","😑","😬","🙄","😯","😦","😧","😮","😲","🥱","😴","🤤","😪","😵","🤐","🥴","🤢","🤮","🤧","😷","🤒","🤕"],Rw=({imageUrl:t,fileName:e,onDelete:n,width:r,height:i})=>M("div",{className:"relative w-32 h-32 rounded-lg overflow-hidden bg-gray-100 border border-gray-200",children:[M("div",{className:"flex justify-center absolute inset-0",children:M("img",{src:t,alt:"Preview",className:`w-[${r}px] h-[${i}px] max-w-[100px] max-h-[100px] aspect-auto`})}),M("button",{onClick:n,className:"absolute top-1 right-1 bg-gray-600 p-1 rounded-lg text-red-400 hover:text-white transition",children:M(Sb,{size:20})}),M("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})]}),Mw=t=>{const{inputMessage:e,setInputMessage:n,sendMessage:r,setFiles:i,files:o,showEmojiPicker:s,addEmoji:a,setShowEmojiPicker:l,attachmentPreviews:d}=t,{getConversation:c}=Ht(),h=c(),m=ti.get("discord-widget"),y=ot(null),_=(h==null?void 0:h.status)==="closed",b=()=>{},P=D=>{i(o.filter(F=>(D==null?void 0:D.name)!==F.name))},x=D=>{D&&i([...o,D])},v=()=>{var D;(D=y.current)==null||D.upload()},S=()=>{o.length&&v(),r()},R=D=>{D.key==="Enter"&&(D.shiftKey?(D.preventDefault(),n(`${e}
95
+ `)):(D.preventDefault(),S()))};return M("div",{className:"relative border-t border-t-gray-200",children:[s&&M(Cw,{onPickEmoji:a}),(()=>{if(!(o!=null&&o.length))return null;const D=o.map((F,q)=>{if(!d[F.name])return null;const{url:L,width:Y,height:Z}=d[F.name];return M(Rw,{onDelete:()=>{var et;i(o.filter(st=>st.name!==F.name)),(et=y.current)==null||et.clear()},fileName:F.name,width:Y,height:Z,imageUrl:L},`attachment-preview-${q}`)});return M("div",{className:"m-2",children:D})})(),M("textarea",{id:"hs-textarea-ex-1",disabled:_,value:e,onChange:D=>n(D.target.value),onKeyDown:R,className:"p-4 pb-12 block w-full border-t border-gray-200 text-sm outline-none disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 resize-none",placeholder:"Ask us anything!","data-hs-textarea-auto-height":""}),M("div",{className:"absolute bottom-px inset-x-px p-2 rounded-b-md bg-white dark:bg-neutral-900",children:M("div",{className:"flex justify-between items-center",children:[M("div",{className:"flex items-center",children:M("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",children:M(kw,{ref:y,accept:"image/*",maxSize:10*1024*1024,uploadConfig:{url:`${ye.api}/conversations/uploadAttachment`,method:"POST",headers:{Authorization:`Bearer ${m}`}},onUploadComplete:b,onUploadStart:P,onFileSelect:x})})}),M("div",{className:"flex items-center gap-x-1",children:[M("button",{type:"button",onClick:_?void 0:()=>l(!s),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",children:M(xb,{size:16})}),M("button",{type:"button",onClick:()=>S(),className:"inline-flex shrink-0 justify-center items-center size-8 rounded-lg text-white bg-blue-600 hover:bg-blue-500 focus:z-10 focus:outline-none focus:bg-blue-500",children:M(Ow,{size:16})})]})]})})]})},Id=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`},Rd="carousel",Md="controller",Nw="navigation",Bw="no-scroll",qs="portal",Dw="root",Nd="toolbar",Ws="loading",Hs="error",Gs="complete",Fw="placeholder",Lw=t=>`active-slide-${t}`,Bd="flex_center",jw="no_scroll",Dd="no_scroll_padding",Vw="slide_wrapper",Qe="prev",tn="next",Fd="swipe",kn="close",Ld="onPointerDown",jd="onPointerMove",Vd="onPointerUp",$d="onPointerLeave",Ud="onPointerCancel",zd="onKeyDown",$w="onKeyUp",qd="onWheel",Uw="Escape",zw="ArrowLeft",qw="ArrowRight",Ww="button",Ks="icon",Wd="contain",Hd="cover",Hw="Unknown action type",Gd="yarl__";function Ne(...t){return[...t].filter(Boolean).join(" ")}function xt(t){return`${Gd}${t}`}function ie(t){return`--${Gd}${t}`}function yr(t,e){return`${t}${e?`_${e}`:""}`}function Ys(t){return e=>yr(t,e)}function Gw(t,e){var n;return(n=t==null?void 0:t[e])!==null&&n!==void 0?n:e}function Kd(...t){return()=>{t.forEach(e=>{e()})}}function en(t,e,n){return()=>{const r=jt(n);if(!r)throw new Error(`${t} must be used within a ${e}.Provider`);return r}}function Yd(){return typeof window<"u"}function Kw(t,e=0){const n=10**e;return Math.round((t+Number.EPSILON)*n)/n}function Xd(t){return t.type===void 0||t.type==="image"}function Yw(t,e){return t.imageFit===Hd||t.imageFit!==Wd&&e===Hd}function di(t){return typeof t=="string"?Number.parseInt(t,10):t}function hi(t){if(typeof t=="number")return{pixel:t};if(typeof t=="string"){const e=di(t);return t.endsWith("%")?{percent:e}:{pixel:e}}return{pixel:0}}function Xw(t,e){const n=hi(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 Jd(t,e){return e>0?(t%e+e)%e:0}function Zd(t){return t.length>0}function Qd(t,e){return t[Jd(e,t.length)]}function Xs(t,e){return Zd(t)?Qd(t,e):void 0}function Jw(t){return Xd(t)?t.src:void 0}function Zw(t,e,n=0){return Math.min(t.preload,Math.max(t.finite?e.length-1:Math.floor(e.length/2),n))}const Qw=Number(ol.split(".")[0])>=19;function t_(t){return{inert:Qw?t:t?"":void 0}}const Js={open:!1,close:()=>{},index:0,slides:[],render:{},plugins:[],toolbar:{buttons:[kn]},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:Wd,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 nn(t,e){return{name:t,component:e}}function Gt(t,e){return{module:t,children:e}}function th(t,e,n){return t.module.name===e?n(t):t.children?[Gt(t.module,t.children.flatMap(r=>{var i;return(i=th(r,e,n))!==null&&i!==void 0?i:[]}))]:[t]}function On(t,e,n){return t.flatMap(r=>{var i;return(i=th(r,e,n))!==null&&i!==void 0?i:[]})}function e_(t,e=[],n=[]){let r=t;const i=y=>{const _=[...r];for(;_.length>0;){const b=_.pop();if((b==null?void 0:b.module.name)===y)return!0;b!=null&&b.children&&_.push(...b.children)}return!1},o=(y,_)=>{if(y===""){r=[Gt(_,r)];return}r=On(r,y,b=>[Gt(_,[b])])},s=(y,_)=>{r=On(r,y,b=>[Gt(b.module,[Gt(_,b.children)])])},a=(y,_,b)=>{r=On(r,y,P=>{var x;return[Gt(P.module,[...b?[Gt(_)]:[],...(x=P.children)!==null&&x!==void 0?x:[],...b?[]:[Gt(_)]])]})},l=(y,_,b)=>{r=On(r,y,P=>[...b?[Gt(_)]:[],P,...b?[]:[Gt(_)]])},d=y=>{s(Md,y)},c=(y,_)=>{r=On(r,y,b=>[Gt(_,b.children)])},h=y=>{r=On(r,y,_=>_.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((_,b)=>b(_),y)}}const eh=te(null),Zs=en("useDocument","DocumentContext",eh);function n_({nodeRef:t,children:e}){const n=Wt(()=>{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 nt(eh.Provider,{value:n},e)}const nh=te(null),pi=en("useEvents","EventsContext",nh);function r_({children:t}){const[e]=wt({});yt(()=>()=>{Object.keys(e).forEach(r=>delete e[r])},[e]);const n=Wt(()=>{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 nt(nh.Provider,{value:n},t)}const rh=te(null),gr=en("useLightboxProps","LightboxPropsContext",rh);function i_({children:t,...e}){return nt(rh.Provider,{value:e},t)}const ih=te(null),mi=en("useLightboxState","LightboxStateContext",ih),oh=te(null),o_=en("useLightboxDispatch","LightboxDispatchContext",oh);function s_(t,e){switch(e.type){case"swipe":{const{slides:n}=t,r=(e==null?void 0:e.increment)||0,i=t.globalIndex+r,o=Jd(i,n.length),s=Xs(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:Xs(e.slides,e.index)}:t;default:throw new Error(Hw)}}function a_({slides:t,index:e,children:n}){const[r,i]=qn(s_,{slides:t,currentIndex:e,globalIndex:e,currentSlide:Xs(t,e)});yt(()=>{i({type:"update",slides:t,index:e})},[t,e]);const o=Wt(()=>({...r,state:r,dispatch:i}),[r,i]);return nt(oh.Provider,{value:i},nt(ih.Provider,{value:o},n))}const sh=te(null),yi=en("useTimeouts","TimeoutsContext",sh);function c_({children:t}){const[e]=wt([]);yt(()=>()=>{e.forEach(r=>window.clearTimeout(r)),e.splice(0,e.length)},[e]);const n=Wt(()=>{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 nt(sh.Provider,{value:n},t)}const ah=Fe(function({label:e,className:n,icon:r,renderIcon:i,onClick:o,style:s,...a},l){const{styles:d,labels:c}=gr(),h=Gw(c,e);return nt("button",{ref:l,type:"button",title:h,"aria-label":h,className:Ne(xt(Ww),n),onClick:o,style:{...s,...d.button},...a},i?i():nt(r,{className:xt(Ks),style:d.icon}))});function l_(t,e){const n=r=>nt("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 vr(t,e){return l_(t,nt("g",{fill:"currentColor"},nt("path",{d:"M0 0h24v24H0z",fill:"none"}),e))}const u_=vr("Close",nt("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"})),f_=vr("Previous",nt("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})),d_=vr("Next",nt("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),h_=vr("Loading",nt(Ot,null,Array.from({length:8}).map((t,e,n)=>nt("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)`})))),p_=vr("Error",nt("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"})),br=Yd()?Ce:yt;function ch(){const[t,e]=wt(!1);return yt(()=>{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 m_(t){let e=0,n=0,r=0;const o=window.getComputedStyle(t).transform.match(/matrix.*\((.+)\)/);if(o){const s=o[1].split(",").map(di);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 lh(t,e){const n=ot(),r=ot(),i=ch();return br(()=>{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(),m_(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 uh(){const t=ot(null),e=ot(),[n,r]=wt();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 gi(){const t=ot(),{setTimeout:e,clearTimeout:n}=yi();return kt((r,i)=>{n(t.current),t.current=e(r,i>0?i:0)},[e,n])}function $t(t){const e=ot(t);return br(()=>{e.current=t}),kt((...n)=>{var r;return(r=e.current)===null||r===void 0?void 0:r.call(e,...n)},[])}function fh(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function Qs(t,e){return Wt(()=>t==null&&e==null?null:n=>{fh(t,n),fh(e,n)},[t,e])}function y_(t,e=!1){const n=ot();br(()=>{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 ta(){const[t,e]=wt(!1);return br(()=>{e(window.getComputedStyle(window.document.documentElement).direction==="rtl")},[]),t}function g_(){const[t]=wt({}),e=kt((i,o)=>{var s;(s=t[i])===null||s===void 0||s.forEach(a=>{o.isPropagationStopped()||a(o)})},[t]),n=Wt(()=>({onPointerDown:i=>e(Ld,i),onPointerMove:i=>e(jd,i),onPointerUp:i=>e(Vd,i),onPointerLeave:i=>e($d,i),onPointerCancel:i=>e(Ud,i),onKeyDown:i=>e(zd,i),onKeyUp:i=>e($w,i),onWheel:i=>e(qd,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 dh(t,e){const n=ot(0),r=gi(),i=$t((...o)=>{n.current=Date.now(),t(o)});return kt((...o)=>{r(()=>{i(o)},e-(Date.now()-n.current))},[e,i,r])}const ea=Ys("slide"),na=Ys("slide_image");function v_({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,_,b,P;const[x,v]=wt(Ws),{publish:S}=pi(),{setTimeout:R}=yi(),O=ot(null);yt(()=>{e===0&&S(Lw(x))},[e,x,S]);const D=$t(G=>{("decode"in G?G.decode():Promise.resolve()).catch(()=>{}).then(()=>{G.parentNode&&(v(Gs),R(()=>{a==null||a(G)},0))})}),F=kt(G=>{O.current=G,G!=null&&G.complete&&D(G)},[D]),q=kt(G=>{D(G.currentTarget)},[D]),L=$t(()=>{v(Hs),l==null||l()}),Y=Yw(t,i),Z=(G,E)=>Number.isFinite(G)?G:E,et=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(...((_=(y=t.srcSet)===null||y===void 0?void 0:y.map(G=>G.height))!==null&&_!==void 0?_:[]).concat(t.height?[t.height]:[]).filter(Boolean)),((b=O.current)===null||b===void 0?void 0:b.naturalHeight)||0),At=et&&st?{maxWidth:`min(${et}px, 100%)`,maxHeight:`min(${st}px, 100%)`}:{maxWidth:"100%",maxHeight:"100%"},dt=(P=t.srcSet)===null||P===void 0?void 0:P.sort((G,E)=>G.width-E.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&&Yd()?`${Math.round(Math.min(It(),r.width))}px`:void 0,{style:ht,className:U,...H}=o||{};return nt(Ot,null,nt("img",{ref:F,onLoad:q,onError:L,onClick:s,draggable:!1,className:Ne(xt(na()),Y&&xt(na("cover")),x!==Gs&&xt(na("loading")),U),style:{...At,...d,...ht},...H,alt:t.alt,sizes:at,srcSet:dt,src:t.src}),x!==Gs&&nt("div",{className:xt(ea(Fw))},x===Ws&&(n!=null&&n.iconLoading?n.iconLoading():nt(h_,{className:Ne(xt(Ks),xt(ea(Ws)))})),x===Hs&&(n!=null&&n.iconError?n.iconError():nt(p_,{className:Ne(xt(Ks),xt(ea(Hs)))}))))}const b_=Fe(function({className:e,children:n,...r},i){const o=ot(null);return nt(n_,{nodeRef:o},nt("div",{ref:Qs(i,o),className:Ne(xt("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 w_(t,e,n,r,i){yt(()=>Kd(t(Ld,e),t(jd,n),t(Vd,r),t($d,r),t(Ud,r)),[t,e,n,r,i])}var ge;(function(t){t[t.NONE=0]="NONE",t[t.SWIPE=1]="SWIPE",t[t.PULL=2]="PULL"})(ge||(ge={}));const ra=30;function __(t,e,n,r,i,o,s,a,l,d,c,h,m,y){const _=ot(0),b=ot([]),P=ot(),x=ot(0),v=ot(ge.NONE),S=kt(L=>{P.current===L.pointerId&&(P.current=void 0,v.current=ge.NONE);const Y=b.current;Y.splice(0,Y.length,...Y.filter(Z=>Z.pointerId!==L.pointerId))},[]),R=kt(L=>{S(L),L.persist(),b.current.push(L)},[S]),O=$t(L=>{R(L)}),D=(L,Y)=>d&&L>Y||l&&L<-Y,F=$t(L=>{if(b.current.find(Y=>Y.pointerId===L.pointerId)&&P.current===L.pointerId){const Y=Date.now()-x.current,Z=_.current;v.current===ge.SWIPE?Math.abs(Z)>.3*n||Math.abs(Z)>5&&Y<r?s(Z,Y):a(Z):v.current===ge.PULL&&(D(Z,2*ra)?m(Z,Y):y(Z)),_.current=0,v.current=ge.NONE}S(L)}),q=$t(L=>{const Y=b.current.find(Z=>Z.pointerId===L.pointerId);if(Y){const Z=P.current===L.pointerId;if(L.buttons===0){Z&&_.current!==0?F(L):S(Y);return}const et=L.clientX-Y.clientX,st=L.clientY-Y.clientY;if(P.current===void 0){const At=dt=>{R(L),P.current=L.pointerId,x.current=Date.now(),v.current=dt};Math.abs(et)>Math.abs(st)&&Math.abs(et)>ra&&e(et)?(At(ge.SWIPE),i()):Math.abs(st)>Math.abs(et)&&D(st,ra)&&(At(ge.PULL),c())}else Z&&(v.current===ge.SWIPE?(_.current=et,o(et)):v.current===ge.PULL&&(_.current=st,h(st)))}});w_(t,O,q,F)}function x_({preventDefaultWheelX:t,preventDefaultWheelY:e}){const n=ot(null),r=$t(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 S_(t,e,n,r,i,o,s,a,l){const d=ot(0),c=ot(0),h=ot(),m=ot(),y=ot(0),_=ot(),b=ot(0),{setTimeout:P,clearTimeout:x}=yi(),v=kt(()=>{h.current&&(x(h.current),h.current=void 0)},[x]),S=kt(()=>{m.current&&(x(m.current),m.current=void 0)},[x]),R=$t(()=>{t!==Qt.SWIPE&&(d.current=0,b.current=0,v(),S())});yt(R,[t,R]);const O=$t(F=>{m.current=void 0,d.current===F&&l(d.current)}),D=$t(F=>{if(F.ctrlKey||Math.abs(F.deltaY)>Math.abs(F.deltaX))return;const q=L=>{y.current=L,x(_.current),_.current=L>0?P(()=>{y.current=0,_.current=void 0},300):void 0};if(t===Qt.NONE){if(Math.abs(F.deltaX)<=1.2*Math.abs(y.current)){q(F.deltaX);return}if(!n(-F.deltaX))return;if(c.current+=F.deltaX,v(),Math.abs(c.current)>30)c.current=0,q(0),b.current=Date.now(),o();else{const L=c.current;h.current=P(()=>{h.current=void 0,L===c.current&&(c.current=0)},i)}}else if(t===Qt.SWIPE){let L=d.current-F.deltaX;if(L=Math.min(Math.abs(L),r)*Math.sign(L),d.current=L,s(L),S(),Math.abs(L)>.2*r){q(F.deltaX),a(L,Date.now()-b.current);return}m.current=P(()=>O(L),2*i)}else q(F.deltaX)});yt(()=>e(qd,D),[e,D])}const hh=Ys("container"),ph=te(null),wr=en("useController","ControllerContext",ph);function E_({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,_]=wt(),b=mi(),P=o_(),[x,v]=wt(Qt.NONE),S=ot(0),R=ot(0),O=ot(1),{registerSensors:D,subscribeSensors:F}=g_(),{subscribe:q,publish:L}=pi(),Y=gi(),Z=gi(),et=gi(),{containerRef:st,setContainerRef:At,containerRect:dt}=uh(),It=Qs(x_({preventDefaultWheelX:h,preventDefaultWheelY:m}),At),at=ot(null),ht=Qs(at,void 0),{getOwnerDocument:U}=Zs(),H=ta(),G=J=>(H?-1:1)*(typeof J=="number"?J:1),E=$t(()=>{var J;return(J=st.current)===null||J===void 0?void 0:J.focus()}),N=$t(()=>e),w=$t(()=>b),A=kt(J=>L(Qe,J),[L]),C=kt(J=>L(tn,J),[L]),z=kt(()=>L(kn),[L]),j=J=>!(r.finite&&(G(J)>0&&b.currentIndex===0||G(J)<0&&b.currentIndex===b.slides.length-1)),W=J=>{var gt;S.current=J,(gt=st.current)===null||gt===void 0||gt.style.setProperty(ie("swipe_offset"),`${Math.round(J)}px`)},K=J=>{var gt,St;R.current=J,O.current=(()=>{const X=c&&J>0?J:d&&J<0?-J:0;return Math.min(Math.max(Kw(1-X/60*(1-.5),2),.5),1)})(),(gt=st.current)===null||gt===void 0||gt.style.setProperty(ie("pull_offset"),`${Math.round(J)}px`),(St=st.current)===null||St===void 0||St.style.setProperty(ie("pull_opacity"),`${O.current}`)},{prepareAnimation:rt}=lh(at,(J,gt,St)=>{if(at.current&&dt)return{keyframes:[{transform:`translate(0, ${J.rect.y-gt.y+St.y}px)`,opacity:J.opacity},{transform:"translate(0, 0)",opacity:1}],duration:J.duration,easing:i.easing.fade}}),ft=(J,gt)=>{if(d||c){K(J);let St=0;at.current&&(St=i.fade*(gt?2:1),rt({rect:at.current.getBoundingClientRect(),opacity:O.current,duration:St})),et(()=>{K(0),v(Qt.NONE)},St),v(Qt.ANIMATION),gt||z()}},{prepareAnimation:vt,isAnimationPlaying:Pt}=lh(at,(J,gt,St)=>{var k;if(at.current&&dt&&(!((k=b.animation)===null||k===void 0)&&k.duration)){const I=hi(r.spacing),X=(I.percent?I.percent*dt.width/100:I.pixel)||0;return{keyframes:[{transform:`translate(${G(b.globalIndex-J.index)*(dt.width+X)+J.rect.x-gt.x+St.x}px, 0)`},{transform:"translate(0, 0)"}],duration:b.animation.duration,easing:b.animation.easing}}}),Lt=$t(J=>{var gt,St;const k=J.offset||0,I=k?i.swipe:(gt=i.navigation)!==null&&gt!==void 0?gt:i.swipe,X=!k&&!Pt()?i.easing.navigation:i.easing.swipe;let{direction:tt}=J;const Q=(St=J.count)!==null&&St!==void 0?St:1;let ct=Qt.ANIMATION,p=I*Q;if(!tt){const f=dt==null?void 0:dt.width,g=J.duration||0,T=f?I/f*Math.abs(k):I;Q!==0?(g<T?p=p/T*Math.max(g,T/5):f&&(p=I/f*(f-Math.abs(k))),tt=G(k)>0?Qe:tn):p=I/2}let u=0;tt===Qe?j(G(1))?u=-Q:(ct=Qt.NONE,p=I):tt===tn&&(j(G(-1))?u=Q:(ct=Qt.NONE,p=I)),p=Math.round(p),Z(()=>{W(0),v(Qt.NONE)},p),at.current&&vt({rect:at.current.getBoundingClientRect(),index:b.globalIndex}),v(ct),L(Fd,{type:"swipe",increment:u,duration:p,easing:X})});yt(()=>{var J,gt;!((J=b.animation)===null||J===void 0)&&J.increment&&(!((gt=b.animation)===null||gt===void 0)&&gt.duration)&&Y(()=>P({type:"swipe",increment:0}),b.animation.duration)},[b.animation,P,Y]);const Yt=[F,j,(dt==null?void 0:dt.width)||0,i.swipe,()=>v(Qt.SWIPE),J=>W(J),(J,gt)=>Lt({offset:J,duration:gt,count:1}),J=>Lt({offset:J,count:0})],Jt=[()=>{c&&v(Qt.PULL)},J=>K(J),J=>ft(J),J=>ft(J,!0)];__(...Yt,d,c,...Jt),S_(x,...Yt);const qt=$t(()=>{o.focus&&U().querySelector(`.${xt(qs)} .${xt(hh())}`)&&E()});yt(qt,[qt]);const $=$t(()=>{var J;(J=s.view)===null||J===void 0||J.call(s,{index:b.currentIndex})});yt($,[b.globalIndex,$]),yt(()=>Kd(q(Qe,J=>Lt({direction:Qe,...J})),q(tn,J=>Lt({direction:tn,...J})),q(Fd,J=>P(J))),[q,Lt,P]);const he=Wt(()=>({prev:A,next:C,close:z,focus:E,slideRect:dt?Xw(dt,r.padding):{width:0,height:0},containerRect:dt||{width:0,height:0},subscribeSensors:F,containerRef:st,setCarouselRef:ht,toolbarWidth:y,setToolbarWidth:_}),[A,C,z,E,F,dt,st,ht,y,_,r.padding]);return Wn(o.ref,()=>({prev:A,next:C,close:z,focus:E,getLightboxProps:N,getLightboxState:w}),[A,C,z,E,N,w]),nt("div",{ref:It,className:Ne(xt(hh()),xt(Bd)),style:{...x===Qt.SWIPE?{[ie("swipe_offset")]:`${Math.round(S.current)}px`}:null,...x===Qt.PULL?{[ie("pull_offset")]:`${Math.round(R.current)}px`,[ie("pull_opacity")]:`${O.current}`}:null,...o.touchAction!=="none"?{[ie("controller_touch_action")]:o.touchAction}:null,...a.container},...o.aria?{role:"presentation","aria-live":"polite"}:null,tabIndex:-1,...D},dt&&nt(ph.Provider,{value:he},t,(n=l.controls)===null||n===void 0?void 0:n.call(l)))}const A_=nn(Md,E_);function rn(t){return yr(Rd,t)}function mh(t){return yr("slide",t)}function T_({slide:t,offset:e}){const n=ot(null),{currentIndex:r}=mi(),{slideRect:i,close:o,focus:s}=wr(),{render:a,carousel:{imageFit:l,imageProps:d},on:{click:c},controller:{closeOnBackdropClick:h},styles:{slide:m}}=gr(),{getOwnerDocument:y}=Zs(),_=e!==0;yt(()=>{var x;_&&(!((x=n.current)===null||x===void 0)&&x.contains(y().activeElement))&&s()},[_,s,y]);const b=()=>{var x,v,S,R;let O=(x=a.slide)===null||x===void 0?void 0:x.call(a,{slide:t,offset:e,rect:i});return!O&&Xd(t)&&(O=nt(v_,{slide:t,offset:e,render:a,rect:i,imageFit:l,imageProps:d,onClick:_?void 0:()=>c==null?void 0:c({index:r})})),O?nt(Ot,null,(v=a.slideHeader)===null||v===void 0?void 0:v.call(a,{slide:t}),((S=a.slideContainer)!==null&&S!==void 0?S:({children:D})=>D)({slide:t,children:O}),(R=a.slideFooter)===null||R===void 0?void 0:R.call(a,{slide:t})):null},P=x=>{const v=n.current,S=x.target instanceof HTMLElement?x.target:void 0;h&&S&&v&&(S===v||Array.from(v.children).find(R=>R===S)&&S.classList.contains(xt(Vw)))&&o()};return nt("div",{ref:n,className:Ne(xt(mh()),!_&&xt(mh("current")),xt(Bd)),...t_(_),onClick:P,style:m},b())}function P_(){const t=gr().styles.slide;return nt("div",{className:xt("slide"),style:t})}function k_({carousel:t}){const{slides:e,currentIndex:n,globalIndex:r}=mi(),{setCarouselRef:i}=wr(),o=hi(t.spacing),s=hi(t.padding),a=Zw(t,e,1),l=[];if(Zd(e))for(let d=n-a;d<=n+a;d+=1){const c=Qd(e,d),h=r-n+d,m=t.finite&&(d<0||d>e.length-1);l.push(m?{key:h}:{key:[`${h}`,Jw(c)].filter(Boolean).join("|"),offset:d-n,slide:c})}return nt("div",{ref:i,className:Ne(xt(rn()),l.length>0&&xt(rn("with_slides"))),style:{[`${ie(rn("slides_count"))}`]:l.length,[`${ie(rn("spacing_px"))}`]:o.pixel||0,[`${ie(rn("spacing_percent"))}`]:o.percent||0,[`${ie(rn("padding_px"))}`]:s.pixel||0,[`${ie(rn("padding_percent"))}`]:s.percent||0}},l.map(({key:d,slide:c,offset:h})=>c?nt(T_,{key:d,slide:c,offset:h}):nt(P_,{key:d})))}const O_=nn(Rd,k_);function yh(){const{carousel:t}=gr(),{slides:e,currentIndex:n}=mi(),r=e.length===0||t.finite&&n===0,i=e.length===0||t.finite&&n===e.length-1;return{prevDisabled:r,nextDisabled:i}}function C_(t){var e;const n=ta(),{publish:r}=pi(),{animation:i}=gr(),{prevDisabled:o,nextDisabled:s}=yh(),a=((e=i.navigation)!==null&&e!==void 0?e:i.swipe)/2,l=dh(()=>r(Qe),a),d=dh(()=>r(tn),a),c=$t(h=>{switch(h.key){case Uw:r(kn);break;case zw:(n?s:o)||(n?d:l)();break;case qw:(n?o:s)||(n?l:d)();break}});yt(()=>t(zd,c),[t,c])}function gh({label:t,icon:e,renderIcon:n,action:r,onClick:i,disabled:o,style:s}){return nt(ah,{label:t,icon:e,renderIcon:n,className:xt(`navigation_${r}`),disabled:o,onClick:i,style:s,...y_(wr().focus,o)})}function I_({render:{buttonPrev:t,buttonNext:e,iconPrev:n,iconNext:r},styles:i}){const{prev:o,next:s,subscribeSensors:a}=wr(),{prevDisabled:l,nextDisabled:d}=yh();return C_(a),nt(Ot,null,t?t():nt(gh,{label:"Previous",action:Qe,icon:f_,renderIcon:n,style:i.navigationPrev,disabled:l,onClick:o}),e?e():nt(gh,{label:"Next",action:tn,icon:d_,renderIcon:r,style:i.navigationNext,disabled:d,onClick:s}))}const R_=nn(Nw,I_),vh=xt(jw),M_=xt(Dd);function N_(t){return"style"in t}function bh(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,`${(di(o)||0)+e}px`),()=>{s?t.style.setProperty(i,s):t.style.removeProperty(i)}}function B_({noScroll:{disabled:t},children:e}){const n=ta(),{getOwnerDocument:r,getOwnerWindow:i}=Zs();return yt(()=>{if(t)return()=>{};const o=[],s=i(),{body:a,documentElement:l}=r(),d=Math.round(s.innerWidth-l.clientWidth);if(d>0){o.push(bh(a,d,n));const c=a.getElementsByTagName("*");for(let h=0;h<c.length;h+=1){const m=c[h];N_(m)&&s.getComputedStyle(m).getPropertyValue("position")==="fixed"&&!m.classList.contains(M_)&&o.push(bh(m,d,n))}}return a.classList.add(vh),()=>{a.classList.remove(vh),o.forEach(c=>c())}},[n,t,r,i]),nt(Ot,null,e)}const D_=nn(Bw,B_);function wh(t){return yr(qs,t)}function _h(t,e,n){const r=t.getAttribute(e);return t.setAttribute(e,n),()=>{r?t.setAttribute(e,r):t.removeAttribute(e)}}function F_({children:t,animation:e,styles:n,className:r,on:i,portal:o,close:s}){const[a,l]=wt(!1),[d,c]=wt(!1),h=ot([]),m=ot(null),{setTimeout:y}=yi(),{subscribe:_}=pi(),P=ch()?0:e.fade;yt(()=>(l(!0),()=>{l(!1),c(!1)}),[]);const x=$t(()=>{h.current.forEach(O=>O()),h.current=[]}),v=$t(()=>{var O;c(!1),x(),(O=i.exiting)===null||O===void 0||O.call(i),y(()=>{var D;(D=i.exited)===null||D===void 0||D.call(i),s()},P)});yt(()=>_(kn,v),[_,v]);const S=$t(O=>{var D,F,q;O.scrollTop,c(!0),(D=i.entering)===null||D===void 0||D.call(i);const L=(q=(F=O.parentNode)===null||F===void 0?void 0:F.children)!==null&&q!==void 0?q:[];for(let Y=0;Y<L.length;Y+=1){const Z=L[Y];["TEMPLATE","SCRIPT","STYLE"].indexOf(Z.tagName)===-1&&Z!==O&&(h.current.push(_h(Z,"inert","")),h.current.push(_h(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)}),R=kt(O=>{O?S(O):x()},[S,x]);return a?uo(nt(b_,{ref:R,className:Ne(r,xt(wh()),xt(Dd),d&&xt(wh("open"))),role:"presentation","aria-live":"polite",style:{...e.fade!==Js.animation.fade?{[ie("fade_animation_duration")]:`${P}ms`}:null,...e.easing.fade!==Js.animation.easing.fade?{[ie("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 L_=nn(qs,F_);function j_({children:t}){return nt(Ot,null,t)}const V_=nn(Dw,j_);function $_(t){return yr(Nd,t)}function U_({toolbar:{buttons:t},render:{buttonClose:e,iconClose:n},styles:r}){const{close:i,setToolbarWidth:o}=wr(),{setContainerRef:s,containerRect:a}=uh();br(()=>{o(a==null?void 0:a.width)},[o,a==null?void 0:a.width]);const l=()=>e?e():nt(ah,{key:kn,label:"Close",icon:u_,renderIcon:n,onClick:i});return nt("div",{ref:s,style:r.toolbar,className:xt($_())},t==null?void 0:t.map(d=>d===kn?l():d))}const z_=nn(Nd,U_);function xh(t,e){var n;return nt(t.module.component,{key:t.module.name,...e},(n=t.children)===null||n===void 0?void 0:n.map(r=>xh(r,e)))}function q_(t,e={}){const{easing:n,...r}=t,{easing:i,...o}=e;return{easing:{...n,...i},...r,...o}}function W_({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:_,controller:b,noScroll:P,on:x,slides:v,index:S,plugins:R,...O}=Js,{config:D,augmentation:F}=e_([Gt(L_,[Gt(D_,[Gt(A_,[Gt(O_),Gt(z_),Gt(R_)])])])],a||R),q=F({animation:q_(h,e),carousel:{...m,...t},render:{...y,...n},toolbar:{..._,...r},controller:{...b,...i},noScroll:{...P,...o},on:{...x,...s},...O,...c});return q.open?nt(i_,{...q},nt(a_,{slides:l||v,index:di(d||S)},nt(c_,null,nt(r_,null,xh(Gt(V_,D),q))))):null}const Sh=({messageIndexKey:t,attachments:e})=>{const{setFullScreen:n}=Ht(),[r,i]=wt(!1);function o(){return document.getElementById("deskcord-lightbox-portal")??document.body}function s(){return e!=null&&e.length?M(W_,{open:r,portal:{root:o()},close:()=>{i(!1),n(!1)},slides:e.map(a=>({src:a.proxyURL}))}):null}return e!=null&&e.length?M("div",{children:[e.map((a,l)=>{const{proxyURL:d,width:c,height:h}=a;return M("div",{onClick:()=>{n(!0),i(!0)},children:M("img",{src:d,alt:"Preview",className:`rounded-lg w-[${c}px] h-[${h}px] max-w-[200px] max-h-[200px] aspect-auto`})},`conv-cus-attachment-${t}-${l}`)}),s()]},`conv-cus-attachment-${t}`):null},H_=({renderTimestamp:t,message:e,indexKey:n})=>{function r(i,o){const s=/<\w?:\w+:\d+>/g,a=i.split(s),l=i.match(s)??[],d=[];for(let c=0;c<a.length;c++)if(d.push(a[c]),l[c]){const h=o[l[c]];h&&d.push(M("img",{src:h.imageURL,alt:"",style:{display:"inline-block",width:"20px",height:"20px"}},c))}return d}return M("li",{className:"flex flex-col items-start max-w-lg gap-x-2 sm:gap-x-4 me-11",children:[e.content&&M("div",{style:{background:"linear-gradient(167deg, #27292A 0%, #404547 100%)"},className:"text-white min-w-10 inline-block rounded-lg px-3 py-2 shadow-sm",children:r(e.content,e.emojis??{})}),M("div",{className:"flex flex-1",children:M(Sh,{attachments:e.attachments,messageIndexKey:n})}),t&&M("div",{children:M("span",{className:"mt-1.5 flex items-center gap-x-1 text-xs text-gray-500",children:[e.authorName," · ",Id(e.date)," ",e.edited?"(edited)":""]})})]},`conv-cs-${n}`)},G_=({message:t,indexKey:e})=>M("li",{className:`flex ms-auto my-[3px] ${t.pending?"opacity-80":""}`,children:[t.content&&M("div",{className:"grow text-end",children:M("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:M("p",{className:"text-center text-sm text-white",children:t.content})})}),t.attachments&&M("div",{className:"flex flex-1 justify-end",children:M(Sh,{attachments:t.attachments,messageIndexKey:e})},`conv-cus-${e}-attachments`)]},`conv-cus-${e}`),K_=({message:t,indexKey:e})=>M("li",{className:"max-w-lg flex gap-x-2 sm:gap-x-4 me-11",children:M("div",{className:"bg-white border border-gray-200 rounded-2xl p-4 space-y-3 dark:bg-neutral-900 dark:border-neutral-700",children:M("p",{className:"mb-1.5 text-sm text-gray-800 dark:text-white",children:t.content})})},`conv-system-${e}`),Y_=()=>{const{setEmail:t,setUsername:e,username:n,email:r,token:i}=Ht(),[o,s]=wt(r),[a,l]=wt(n),[d,c]=wt(""),h=b=>/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(b),m=!!n&&!!r,y=()=>{h(o)?(c(""),t(o)):c("Please enter a valid email address"),e(a)};function _(){return M("div",{className:"max-w-sm space-y-3",children:[M("div",{children:[M("label",{htmlFor:"hs-leading-icon",className:"block text-sm font-medium mb-2 dark:text-white",children:"Name"}),M("div",{className:"relative",children:[M("input",{type:"text",id:"name",value:a,onChange:b=>l(b.target.value),name:"name",className:"py-3 px-4 ps-11 block w-full border-gray-200 shadow-sm rounded-lg text-sm focus:z-10 focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600",placeholder:"John Smith",disabled:m,required:!0}),M("div",{className:"absolute inset-y-0 start-0 flex items-center pointer-events-none z-20 ps-4 text-gray-400",children:M(Eb,{size:16})})]})]}),M("div",{children:[M("label",{htmlFor:"hs-leading-icon",className:"block text-sm font-medium mb-2 dark:text-white",children:"Email address"}),M("div",{className:"relative",children:[M("input",{type:"email",id:"email",value:o,onChange:b=>s(b.target.value),name:"email",className:"py-3 px-4 ps-11 block w-full border-gray-200 shadow-sm rounded-lg text-sm focus:z-10 focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 dark:focus:ring-neutral-600",placeholder:"you@site.com",disabled:m,required:!0}),M("div",{className:"absolute inset-y-0 start-0 flex items-center pointer-events-none z-20 ps-4 text-gray-400",children:M(vb,{size:16})})]}),d&&M("p",{className:"text-red-500 text-sm mt-2",children:d})]}),!n||!r?M("button",{type:"submit",onClick:y,className:"py-3 px-4 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 focus:outline-none focus:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none",children:"Submit"}):null]})}return M(Ot,{children:[M("li",{className:"max-w-lg flex gap-x-2 sm:gap-x-4 me-11",children:M("div",{className:"border border-gray-200 rounded-2xl p-4 space-y-3 bg-blue-200",children:M("p",{className:"mb-1.5 text-sm text-gray-800 dark:text-white",children:"Hello! Please introduce yourself."})})}),M("li",{className:"max-w-lg flex gap-x-2 sm:gap-x-4 me-11",children:M("div",{className:"border border-gray-200 rounded-2xl p-4 space-y-3 bg-blue-200",children:_()})}),n&&r&&!i&&M("li",{className:"max-w-lg flex gap-x-2 sm:gap-x-4 me-11",children:M("div",{className:"border border-gray-200 rounded-2xl p-4 space-y-3 bg-blue-200",children:M("div",{className:"animate-spin inline-block size-8 border-[3px] border-current border-t-transparent text-blue-600 rounded-full dark:text-blue-500",role:"status","aria-label":"loading",children:M("span",{className:"sr-only",children:"Loading..."})})})}),n&&r&&M("li",{className:"max-w-lg flex gap-x-2 sm:gap-x-4 me-11",children:M("div",{className:"border border-gray-200 rounded-2xl p-4 space-y-3 bg-blue-200",children:M("p",{className:"mb-1.5 text-sm text-gray-800 dark:text-white",children:"Nice to meet you! Feel free to ask us anything."})})})]})};function X_(t,e){const n=ot();yt(()=>{n.current=t},[t]),yt(()=>{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 J_(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 Z_=({indexKey:t,message:e})=>{const n=e.customRendererProps.file,r=n.status==="error",[i,o]=wt(!0),[s,a]=wt(0);return X_(()=>{s<88?a(s+2.5):o(!1)},i&&!r?250:null),M("li",{className:"max-w-lg flex gap-x-2 sm:gap-x-4",style:{marginTop:"20px",marginBottom:"20px"},children:M("div",{className:"w-full bg-white border border-gray-200 rounded-2xl p-4 space-y-4",children:M("div",{children:[M("div",{className:"mb-2 flex justify-between items-center",children:[M("div",{className:"flex items-center gap-x-3",children:[M("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:M(gb,{})}),M("div",{children:[M("p",{className:`text-sm ${r?"font-semibold text-red-500":"font-medium text-gray-800"}`,children:n.fileName}),M("p",{className:"text-xs text-gray-500 dark:text-neutral-500",children:J_(n.size)})]})]}),r&&M("div",{className:"inline-flex items-center gap-x-2",children:M("span",{className:"relative",children:[M("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:M("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"})}),M("span",{className:"sr-only",children:"Danger"})]})})]}),M("div",{className:"flex items-center gap-x-3 whitespace-nowrap",children:[M("div",{className:"flex w-full h-2 bg-gray-200 rounded-full overflow-hidden dark:bg-neutral-700",role:"progressbar",children:M("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}%`}})}),M("div",{className:"w-6 text-end",children:M("span",{className:"text-sm text-gray-800 dark:text-white",children:[Math.round(s),"%"]})})]})]})})},`conv-fileupload-${t}`)},Q_=({conversation:t,open:e})=>{function n(s,a){const l=`${s.date}-${a}`;if(typeof s.customRenderer<"u")switch(s.customRenderer){case Pn.IntroduceYourself:return M(Y_,{});case Pn.UploadFile:return M(Z_,{message:s,indexKey:l});default:return o(s,l)}else return s.authorName===mr?o(s,l):s.support?r(s,l):i(s,l)}function r(s,a){var h;const l=(h=t==null?void 0:t.messages)==null?void 0:h.filter(m=>m.support),d=l==null?void 0:l[l.length-1],c=s.date===(d==null?void 0:d.date);return M(H_,{renderTimestamp:c,message:s,indexKey:a})}function i(s,a){return M(G_,{message:s,indexKey:a})}function o(s,a){return M(K_,{message:s,indexKey:a})}return M("ul",{className:"space-y-[3px]",children:[[...(t==null?void 0:t.messages)??[]].sort((s,a)=>s.date-a.date).map(n),t&&!e&&n(Sw,1)]})},t1=()=>{var v;const{getConversation:t,addMessage:e,tempConversationToThread:n,username:r,updateMessage:i}=Ht(),[o,s]=wt(!1),[a,l]=wt([]),[d,c]=wt({}),h=ot(null),m=t(),y=(m==null?void 0:m.status)==="open",[_,b]=wt("");return yt(()=>{h.current&&h.current.scrollTo({top:h.current.scrollHeight,behavior:"smooth"})},[(v=m==null?void 0:m.messages)==null?void 0:v.length]),yt(()=>{const S={};a.forEach(R=>{const O=new FileReader;O.addEventListener("load",function(){const D=new Image;D.onload=()=>{S[R.name]={url:O.result,width:D.width,height:D.height,size:R.size},c(S)},D.src=O.result},!1),O.readAsDataURL(R)})},[a]),M(Ot,{children:[M("div",{ref:h,className:"flex-1 overflow-y-auto p-4 space-y-4",children:M(Q_,{conversation:m,open:y})}),M(Mw,{attachmentPreviews:d,files:a,setFiles:l,inputMessage:_,setInputMessage:b,showEmojiPicker:o,setShowEmojiPicker:s,addEmoji:S=>{b(_+S)},sendMessage:async()=>{const S=Date.now(),R={support:!1,content:_,date:S,authorName:r,pending:!0};if(_.trim()!==""){b(""),e(m?m.threadId:"TEMP",R);const O=await xw({content:_});O&&(m||n(O.threadId),i(O.threadId,S,{...R,pending:!1,date:O.date}))}}})]})};function Eh(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 e1(t){switch(t){case"online":return"Online";case"idle":case"offline":case"invisible":return"Away";case"dnd":return"Unavailable";default:return"Away"}}const n1=()=>{const{conversations:t,setOpenConversationId:e}=Ht(),n=t.filter(s=>s.status==="open").length;function r(){return n!==0?null:M("div",{className:"flex justify-center my-2",children:M("button",{onClick:()=>e("TEMP"),type:"button",className:"py-3 px-4 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 focus:outline-none focus:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none",children:["Start a new conversation",M(bb,{})]})})}function i(s,a){var c,h,m;const l=s.messages[s.messages.length-1],d=s.status==="open";return M("div",{className:"flex flex-row items-center px-3 py-4 border-b border-gray-200 hover:bg-gray-200 cursor-pointer",onClick:()=>e(s.threadId),children:[M("div",{className:"relative inline-block mr-3",children:[M("img",{className:"inline-block size-[32px] rounded-full",src:((c=s==null?void 0:s.csMember)==null?void 0:c.displayAvatarURL)??"http://placehold.co/250x250"}),((h=s==null?void 0:s.csMember)==null?void 0:h.status)&&M("span",{className:`absolute top-0 end-0 block size-3 rounded-full ring-2 ring-white dark:ring-neutral-900 ${Eh(s.csMember.status,"bg")}`})]}),M("div",{className:"flex flex-1 flex-col",children:[M("p",{className:`text-sm/3 ${d?"font-semibold":""}`,children:(m=s==null?void 0:s.csMember)==null?void 0:m.displayName}),M("p",{className:"text-xs text-gray-500 line-clamp-1",children:l.content})]}),M("div",{className:"ml-2",children:M("p",{className:"text-xs text-gray-500",children:Id(l.date)})})]},`conversation-${a}`)}function o(){return[...t].sort((s,a)=>a.lastMessageDate-s.lastMessageDate).map((s,a)=>s.messages.length?i(s,a):null)}return M("div",{className:"overflow-scroll",children:[r(),M(Ot,{children:o()})]})},Ah=({IconComponent:t,onClick:e})=>M("button",{className:"flex mr-2 items-center justify-center w-8 h-8 rounded-full hover:bg-gray-100",onClick:e,children:M(t,{})}),r1=({size:t})=>M("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:[M("path",{d:"M18 6 6 18"}),M("path",{d:"m6 6 12 12"})]}),i1=({size:t})=>M("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:M("path",{d:"m15 18-6-6 6-6"})}),Th={title:"Hi there 👋",subtitle:"We typically reply within a few minutes"},o1=()=>{var a,l,d,c,h,m;const{setChatOpen:t,setOpenConversationId:e,guildSettings:n,conversations:r,openConversationId:i}=Ht(),o=r.find(y=>y.status==="open"),s=i&&(o!=null&&o.csMember)&&((a=o==null?void 0:o.csMember)==null?void 0:a.displayName)!=="Customer support"?{title:(l=o==null?void 0:o.csMember)==null?void 0:l.displayName,subtitle:(d=o==null?void 0:o.csMember)!=null&&d.status?e1((c=o==null?void 0:o.csMember)==null?void 0:c.status):null,avatar:(h=o==null?void 0:o.csMember)==null?void 0:h.displayAvatarURL,status:(m=o==null?void 0:o.csMember)==null?void 0:m.status}:{title:(n==null?void 0:n.header_title)??Th.title,subtitle:(n==null?void 0:n.header_subtitle)??Th.subtitle,avatar:(n==null?void 0:n.iconURL)||"https://placehold.co/250x250"};return M("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:[r.length>0&&i&&M(Ah,{onClick:()=>e(null),IconComponent:i1}),M("div",{className:"relative inline-block mr-3",children:[M("img",{className:"inline-block size-[40px] rounded-full",src:s.avatar}),s.status&&M("span",{className:`absolute top-0 end-0 block size-3.5 rounded-full ring-2 ring-white dark:ring-neutral-900 ${Eh(s.status,"bg")}`})]}),M("div",{className:"flex-1 flex-col",children:[M("p",{className:"text-lg/5 font-regular",children:s.title}),s.subtitle&&M("p",{className:"flex-1 text-xs/4 line-clamp-2",children:s.subtitle})]}),M(Ah,{onClick:()=>t(!1),IconComponent:r1})]})};function s1(){const[t,e]=wt({width:null,height:null});return Ce(()=>{const n=()=>{e({width:window.innerWidth,height:window.innerHeight})};return n(),window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)}},[]),t}const a1=()=>{const t=s1();return!t.width||!t.height?!1:t.width>t.height?t.width<=Cd||t.height<=ww:t.width<=Cd},c1=()=>{const{openConversationId:t,conversations:e,isChatVisible:n}=Ht(),r=a1(),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 M(Ou,{children:n&&M(Os.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:M("div",{className:"flex flex-col h-full bg-white rounded-xl shadow-xl overflow-hidden",children:[M(o1,{}),i?M(n1,{}):M(t1,{})]})},"chatbox")})},xe=Object.create(null);xe.open="0",xe.close="1",xe.ping="2",xe.pong="3",xe.message="4",xe.upgrade="5",xe.noop="6";const vi=Object.create(null);Object.keys(xe).forEach(t=>{vi[xe[t]]=t});const ia={type:"error",data:"parser error"},Ph=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",kh=typeof ArrayBuffer=="function",Oh=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,oa=({type:t,data:e},n,r)=>Ph&&e instanceof Blob?n?r(e):Ch(e,r):kh&&(e instanceof ArrayBuffer||Oh(e))?n?r(e):Ch(new Blob([e]),r):r(xe[t]+(e||"")),Ch=(t,e)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];e("b"+(r||""))},n.readAsDataURL(t)};function Ih(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let sa;function l1(t,e){if(Ph&&t.data instanceof Blob)return t.data.arrayBuffer().then(Ih).then(e);if(kh&&(t.data instanceof ArrayBuffer||Oh(t.data)))return e(Ih(t.data));oa(t,!1,n=>{sa||(sa=new TextEncoder),e(sa.encode(n))})}const Rh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_r=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<Rh.length;t++)_r[Rh.charCodeAt(t)]=t;const u1=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=_r[t.charCodeAt(r)],s=_r[t.charCodeAt(r+1)],a=_r[t.charCodeAt(r+2)],l=_r[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},f1=typeof ArrayBuffer=="function",aa=(t,e)=>{if(typeof t!="string")return{type:"message",data:Mh(t,e)};const n=t.charAt(0);return n==="b"?{type:"message",data:d1(t.substring(1),e)}:vi[n]?t.length>1?{type:vi[n],data:t.substring(1)}:{type:vi[n]}:ia},d1=(t,e)=>{if(f1){const n=u1(t);return Mh(n,e)}else return{base64:!0,data:t}},Mh=(t,e)=>{switch(e){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},Nh="",h1=(t,e)=>{const n=t.length,r=new Array(n);let i=0;t.forEach((o,s)=>{oa(o,!1,a=>{r[s]=a,++i===n&&e(r.join(Nh))})})},p1=(t,e)=>{const n=t.split(Nh),r=[];for(let i=0;i<n.length;i++){const o=aa(n[i],e);if(r.push(o),o.type==="error")break}return r};function m1(){return new TransformStream({transform(t,e){l1(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 ca;function bi(t){return t.reduce((e,n)=>e+n.length,0)}function wi(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 y1(t,e){ca||(ca=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(bi(n)<1)break;const l=wi(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(bi(n)<2)break;const l=wi(n,2);i=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(bi(n)<8)break;const l=wi(n,8),d=new DataView(l.buffer,l.byteOffset,l.length),c=d.getUint32(0);if(c>Math.pow(2,21)-1){a.enqueue(ia);break}i=c*Math.pow(2,32)+d.getUint32(4),r=3}else{if(bi(n)<i)break;const l=wi(n,i);a.enqueue(aa(o?l:ca.decode(l),e)),r=0}if(i===0||i>t){a.enqueue(ia);break}}}})}const Bh=4;function Ut(t){if(t)return g1(t)}function g1(t){for(var e in Ut.prototype)t[e]=Ut.prototype[e];return t}Ut.prototype.on=Ut.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},Ut.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},Ut.prototype.off=Ut.prototype.removeListener=Ut.prototype.removeAllListeners=Ut.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},Ut.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},Ut.prototype.emitReserved=Ut.prototype.emit,Ut.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},Ut.prototype.hasListeners=function(t){return!!this.listeners(t).length};const fe=typeof self<"u"?self:typeof window<"u"?window:Function("return this")();function Dh(t,...e){return e.reduce((n,r)=>(t.hasOwnProperty(r)&&(n[r]=t[r]),n),{})}const v1=fe.setTimeout,b1=fe.clearTimeout;function _i(t,e){e.useNativeTimers?(t.setTimeoutFn=v1.bind(fe),t.clearTimeoutFn=b1.bind(fe)):(t.setTimeoutFn=fe.setTimeout.bind(fe),t.clearTimeoutFn=fe.clearTimeout.bind(fe))}const w1=1.33;function _1(t){return typeof t=="string"?x1(t):Math.ceil((t.byteLength||t.size)*w1)}function x1(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 S1(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}function E1(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 A1 extends Error{constructor(e,n,r){super(e),this.description=n,this.context=r,this.type="TransportError"}}class la extends Ut{constructor(e){super(),this.writable=!1,_i(this,e),this.opts=e,this.query=e.query,this.socket=e.socket}onError(e,n,r){return super.emitReserved("error",new A1(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=aa(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=S1(e);return n.length?"?"+n:""}}const Fh="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),ua=64,T1={};let Lh=0,xi=0,jh;function Vh(t){let e="";do e=Fh[t%ua]+e,t=Math.floor(t/ua);while(t>0);return e}function $h(){const t=Vh(+new Date);return t!==jh?(Lh=0,jh=t):t+"."+Vh(Lh++)}for(;xi<ua;xi++)T1[Fh[xi]]=xi;let Uh=!1;try{Uh=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const P1=Uh;function zh(t){const e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||P1))return new XMLHttpRequest}catch{}if(!e)try{return new fe[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function tA(){}function k1(){}const O1=function(){return new zh({xdomain:!1}).responseType!=null}();class C1 extends la{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=O1&&!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)};p1(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,h1(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]=$h()),!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 Se(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 Se extends Ut{constructor(e,n){super(),_i(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=Dh(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new zh(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=Se.requestsCount++,Se.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=k1,e)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Se.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(Se.requestsCount=0,Se.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",qh);else if(typeof addEventListener=="function"){const t="onpagehide"in fe?"pagehide":"unload";addEventListener(t,qh,!1)}}function qh(){for(let t in Se.requests)Se.requests.hasOwnProperty(t)&&Se.requests[t].abort()}var I1={},Si={};Si.byteLength=N1,Si.toByteArray=D1,Si.fromByteArray=j1;for(var Ee=[],de=[],R1=typeof Uint8Array<"u"?Uint8Array:Array,fa="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Cn=0,M1=fa.length;Cn<M1;++Cn)Ee[Cn]=fa[Cn],de[fa.charCodeAt(Cn)]=Cn;de[45]=62,de[95]=63;function Wh(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 N1(t){var e=Wh(t),n=e[0],r=e[1];return(n+r)*3/4-r}function B1(t,e,n){return(e+n)*3/4-n}function D1(t){var e,n=Wh(t),r=n[0],i=n[1],o=new R1(B1(t,r,i)),s=0,a=i>0?r-4:r,l;for(l=0;l<a;l+=4)e=de[t.charCodeAt(l)]<<18|de[t.charCodeAt(l+1)]<<12|de[t.charCodeAt(l+2)]<<6|de[t.charCodeAt(l+3)],o[s++]=e>>16&255,o[s++]=e>>8&255,o[s++]=e&255;return i===2&&(e=de[t.charCodeAt(l)]<<2|de[t.charCodeAt(l+1)]>>4,o[s++]=e&255),i===1&&(e=de[t.charCodeAt(l)]<<10|de[t.charCodeAt(l+1)]<<4|de[t.charCodeAt(l+2)]>>2,o[s++]=e>>8&255,o[s++]=e&255),o}function F1(t){return Ee[t>>18&63]+Ee[t>>12&63]+Ee[t>>6&63]+Ee[t&63]}function L1(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(F1(r));return i.join("")}function j1(t){for(var e,n=t.length,r=n%3,i=[],o=16383,s=0,a=n-r;s<a;s+=o)i.push(L1(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 da={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */da.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)},da.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,_=r?1:-1,b=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+=_,a/=256,i-=8);for(s=s<<i|a,d+=i;d>0;t[n+y]=s&255,y+=_,s/=256,d-=8);t[n+y-_]|=b*128};/*!
96
96
  * The buffer module from node.js, for the browser.
97
97
  *
98
98
  * @author Feross Aboukhadijeh <https://feross.org>
99
99
  * @license MIT
100
- */(function(t){const e=Si,n=ha,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 _(p)}return h(p,u,f)}c.poolSize=8192;function h(p,u,f){if(typeof p=="string")return w(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(I(p,s)||p&&I(p.buffer,s)||typeof a<"u"&&(I(p,a)||p&&I(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 T=S(p);if(T)return T;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 _(p){return m(p),d(p<0?0:R(p)|0)}c.allocUnsafe=function(p){return _(p)},c.allocUnsafeSlow=function(p){return _(p)};function w(p,u){if((typeof u!="string"||u==="")&&(u="utf8"),!c.isEncoding(u))throw new TypeError("Unknown encoding: "+u);const f=B(p,u)|0;let g=d(f);const T=g.write(p,u);return T!==f&&(g=g.slice(0,T)),g}function k(p){const u=p.length<0?0:R(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(I(p,o)){const u=new o(p);return v(u.buffer,u.byteOffset,u.byteLength)}return k(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 S(p){if(c.isBuffer(p)){const u=R(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):k(p);if(p.type==="Buffer"&&Array.isArray(p.data))return k(p.data)}function R(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(I(u,o)&&(u=c.from(u,u.offset,u.byteLength)),I(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,T=f.length;for(let D=0,V=Math.min(g,T);D<V;++D)if(u[D]!==f[D]){g=u[D],T=f[D];break}return g<T?-1:T<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 T=c.allocUnsafe(f);let D=0;for(g=0;g<u.length;++g){let V=u[g];if(I(V,o))D+V.length>T.length?(c.isBuffer(V)||(V=c.from(V)),V.copy(T,D)):o.prototype.set.call(T,V,D);else if(c.isBuffer(V))V.copy(T,D);else throw new TypeError('"list" argument must be an Array of Buffers');D+=V.length}return T};function B(p,u){if(c.isBuffer(p))return p.length;if(s.isView(p)||I(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 T=!1;for(;;)switch(u){case"ascii":case"latin1":case"binary":return f;case"utf8":case"utf-8":return he(p).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return f*2;case"hex":return f>>>1;case"base64":return St(p).length;default:if(T)return g?-1:he(p).length;u=(""+u).toLowerCase(),T=!0}}c.byteLength=B;function L(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 E(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 W(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)W(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)W(this,f,f+3),W(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)W(this,f,f+7),W(this,f+1,f+6),W(this,f+2,f+5),W(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):L.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,T,D){if(I(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),T===void 0&&(T=0),D===void 0&&(D=this.length),f<0||g>u.length||T<0||D>this.length)throw new RangeError("out of range index");if(T>=D&&f>=g)return 0;if(T>=D)return-1;if(f>=g)return 1;if(f>>>=0,g>>>=0,T>>>=0,D>>>=0,this===u)return 0;let V=D-T,lt=g-f;const bt=Math.min(V,lt),_t=this.slice(T,D),Dt=u.slice(f,g);for(let Tt=0;Tt<bt;++Tt)if(_t[Tt]!==Dt[Tt]){V=_t[Tt],lt=Dt[Tt];break}return V<lt?-1:lt<V?1:0};function F(p,u,f,g,T){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=T?0:p.length-1),f<0&&(f=p.length+f),f>=p.length){if(T)return-1;f=p.length-1}else if(f<0)if(T)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,T);if(typeof u=="number")return u=u&255,typeof o.prototype.indexOf=="function"?T?o.prototype.indexOf.call(p,u,f):o.prototype.lastIndexOf.call(p,u,f):Y(p,[u],f,g,T);throw new TypeError("val must be string, number or Buffer")}function Y(p,u,f,g,T){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(Dt,Tt){return D===1?Dt[Tt]:Dt.readUInt16BE(Tt*D)}let _t;if(T){let Dt=-1;for(_t=f;_t<V;_t++)if(bt(p,_t)===bt(u,Dt===-1?0:_t-Dt)){if(Dt===-1&&(Dt=_t),_t-Dt+1===lt)return Dt*D}else Dt!==-1&&(_t-=_t-Dt),Dt=-1}else for(f+lt>V&&(f=V-lt),_t=f;_t>=0;_t--){let Dt=!0;for(let Tt=0;Tt<lt;Tt++)if(bt(p,_t+Tt)!==bt(u,Tt)){Dt=!1;break}if(Dt)return _t}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 T=p.length-f;g?(g=Number(g),g>T&&(g=T)):g=T;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 et(p,u,f,g){return P(he(u,p.length-f),p,f,g)}function st(p,u,f,g){return P(J(u),p,f,g)}function At(p,u,f,g){return P(St(u),p,f,g)}function dt(p,u,f,g){return P(gt(u,p.length-f),p,f,g)}c.prototype.write=function(u,f,g,T){if(f===void 0)T="utf8",g=this.length,f=0;else if(g===void 0&&typeof f=="string")T=f,g=this.length,f=0;else if(isFinite(f))f=f>>>0,isFinite(g)?(g=g>>>0,T===void 0&&(T="utf8")):(T=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");T||(T="utf8");let V=!1;for(;;)switch(T){case"hex":return Z(this,u,f,g);case"utf8":case"utf-8":return et(this,u,f,g);case"ascii":case"latin1":case"binary":return st(this,u,f,g);case"base64":return At(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: "+T);T=(""+T).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 T=u;for(;T<f;){const D=p[T];let V=null,lt=D>239?4:D>223?3:D>191?2:1;if(T+lt<=f){let bt,_t,Dt,Tt;switch(lt){case 1:D<128&&(V=D);break;case 2:bt=p[T+1],(bt&192)===128&&(Tt=(D&31)<<6|bt&63,Tt>127&&(V=Tt));break;case 3:bt=p[T+1],_t=p[T+2],(bt&192)===128&&(_t&192)===128&&(Tt=(D&15)<<12|(bt&63)<<6|_t&63,Tt>2047&&(Tt<55296||Tt>57343)&&(V=Tt));break;case 4:bt=p[T+1],_t=p[T+2],Dt=p[T+3],(bt&192)===128&&(_t&192)===128&&(Dt&192)===128&&(Tt=(D&15)<<18|(bt&63)<<12|(_t&63)<<6|Dt&63,Tt>65535&&Tt<1114112&&(V=Tt))}}V===null?(V=65533,lt=1):V>65535&&(V-=65536,g.push(V>>>10&1023|55296),V=56320|V&1023),g.push(V),T+=lt}return U(g)}const ht=4096;function U(p){const u=p.length;if(u<=ht)return String.fromCharCode.apply(String,p);let f="",g=0;for(;g<u;)f+=String.fromCharCode.apply(String,p.slice(g,g+=ht));return f}function H(p,u,f){let g="";f=Math.min(p.length,f);for(let T=u;T<f;++T)g+=String.fromCharCode(p[T]&127);return g}function G(p,u,f){let g="";f=Math.min(p.length,f);for(let T=u;T<f;++T)g+=String.fromCharCode(p[T]);return g}function E(p,u,f){const g=p.length;(!u||u<0)&&(u=0),(!f||f<0||f>g)&&(f=g);let T="";for(let D=u;D<f;++D)T+=tt[p[D]];return T}function N(p,u,f){const g=p.slice(u,f);let T="";for(let D=0;D<g.length-1;D+=2)T+=String.fromCharCode(g[D]+g[D+1]*256);return T}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 T=this.subarray(u,f);return Object.setPrototypeOf(T,c.prototype),T};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 T=this[u],D=1,V=0;for(;++V<f&&(D*=256);)T+=this[u+V]*D;return T},c.prototype.readUintBE=c.prototype.readUIntBE=function(u,f,g){u=u>>>0,f=f>>>0,g||b(u,f,this.length);let T=this[u+--f],D=1;for(;f>0&&(D*=256);)T+=this[u+--f]*D;return T},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 T=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(T)+(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 T=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(T)<<BigInt(32))+BigInt(D)}),c.prototype.readIntLE=function(u,f,g){u=u>>>0,f=f>>>0,g||b(u,f,this.length);let T=this[u],D=1,V=0;for(;++V<f&&(D*=256);)T+=this[u+V]*D;return D*=128,T>=D&&(T-=Math.pow(2,8*f)),T},c.prototype.readIntBE=function(u,f,g){u=u>>>0,f=f>>>0,g||b(u,f,this.length);let T=f,D=1,V=this[u+--T];for(;T>0&&(D*=256);)V+=this[u+--T]*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 T=this[u+4]+this[u+5]*2**8+this[u+6]*2**16+(g<<24);return(BigInt(T)<<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 T=(f<<24)+this[++u]*2**16+this[++u]*2**8+this[++u];return(BigInt(T)<<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,T,D){if(!c.isBuffer(p))throw new TypeError('"buffer" argument must be a Buffer instance');if(u>T||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,T){if(u=+u,f=f>>>0,g=g>>>0,!T){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,T){if(u=+u,f=f>>>0,g=g>>>0,!T){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 C(p,u,f,g,T){Ft(u,g,T,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 z(p,u,f,g,T){Ft(u,g,T,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 C(this,u,f,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeBigUInt64BE=Q(function(u,f=0){return z(this,u,f,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeIntLE=function(u,f,g,T){if(u=+u,f=f>>>0,!T){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,T){if(u=+u,f=f>>>0,!T){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 C(this,u,f,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeBigInt64BE=Q(function(u,f=0){return z(this,u,f,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function j(p,u,f,g,T,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,T){return u=+u,f=f>>>0,T||j(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,T){return u=+u,f=f>>>0,T||j(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,T){if(!c.isBuffer(u))throw new TypeError("argument should be a Buffer");if(g||(g=0),!T&&T!==0&&(T=this.length),f>=u.length&&(f=u.length),f||(f=0),T>0&&T<g&&(T=g),T===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(T<0)throw new RangeError("sourceEnd out of bounds");T>this.length&&(T=this.length),u.length-f<T-g&&(T=u.length-f+g);const D=T-g;return this===u&&typeof o.prototype.copyWithin=="function"?this.copyWithin(f,g,T):o.prototype.set.call(u,this.subarray(g,T),f),D},c.prototype.fill=function(u,f,g,T){if(typeof u=="string"){if(typeof f=="string"?(T=f,f=0,g=this.length):typeof g=="string"&&(T=g,g=this.length),T!==void 0&&typeof T!="string")throw new TypeError("encoding must be a string");if(typeof T=="string"&&!c.isEncoding(T))throw new TypeError("Unknown encoding: "+T);if(u.length===1){const V=u.charCodeAt(0);(T==="utf8"&&V<128||T==="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,T),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 ft(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(T){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:T,writable:!0})}toString(){return`${this.name} [${p}]: ${this.message}`}}}ft("ERR_BUFFER_OUT_OF_BOUNDS",function(p){return p?`${p} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),ft("ERR_INVALID_ARG_TYPE",function(p,u){return`The "${p}" argument must be of type number. Received type ${typeof u}`},TypeError),ft("ERR_OUT_OF_RANGE",function(p,u,f){let g=`The value of "${p}" is out of range.`,T=f;return Number.isInteger(f)&&Math.abs(f)>2**32?T=vt(String(f)):typeof f=="bigint"&&(T=String(f),(f>BigInt(2)**BigInt(32)||f<-(BigInt(2)**BigInt(32)))&&(T=vt(T)),T+="n"),g+=` It must be ${u}. Received ${T}`,g},RangeError);function vt(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 Pt(p,u,f){Yt(u,"offset"),(p[u]===void 0||p[u+f]===void 0)&&Jt(u,p.length-(f+1))}function Ft(p,u,f,g,T,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)}Pt(g,T,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 Wt=/[^+/0-9A-Za-z-_]/g;function $(p){if(p=p.split("=")[0],p=p.trim().replace(Wt,""),p.length<2)return"";for(;p.length%4!==0;)p=p+"=";return p}function he(p,u){u=u||1/0;let f;const g=p.length;let T=null;const D=[];for(let V=0;V<g;++V){if(f=p.charCodeAt(V),f>55295&&f<57344){if(!T){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}T=f;continue}if(f<56320){(u-=3)>-1&&D.push(239,191,189),T=f;continue}f=(T-55296<<10|f-56320)+65536}else T&&(u-=3)>-1&&D.push(239,191,189);if(T=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 gt(p,u){let f,g,T;const D=[];for(let V=0;V<p.length&&!((u-=2)<0);++V)f=p.charCodeAt(V),g=f>>8,T=f%256,D.push(T),D.push(g);return D}function St(p){return e.toByteArray($(p))}function P(p,u,f,g){let T;for(T=0;T<g&&!(T+f>=u.length||T>=p.length);++T)u[T+f]=p[T];return T}function I(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 T=0;T<16;++T)u[g+T]=p[f]+p[T]}return u}();function Q(p){return typeof BigInt>"u"?ct:p}function ct(){throw new Error("BigInt not supported")}})(E1);const pa=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,n)=>n(e,0),Ei=fe.WebSocket||fe.MozWebSocket,Uh=!0,M1="arraybuffer",zh=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class N1 extends ua{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?{}:Rh(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=Uh&&!zh?n?new Ei(e,n):new Ei(e):new Ei(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;sa(r,this.supportsBinary,o=>{const s={};try{Uh&&this.ws.send(o)}catch{}i&&pa(()=>{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]=Lh()),this.supportsBinary||(n.b64=1),this.createUri(e,n)}check(){return!!Ei}}class D1 extends ua{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=l1(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=e.readable.pipeThrough(n).getReader(),i=c1();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&&pa(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this.transport)===null||e===void 0||e.close()}}const B1={websocket:N1,webtransport:D1,polling:S1},L1=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,F1=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function ma(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=L1.exec(t||""),o={},s=14;for(;s--;)o[F1[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=j1(o,o.path),o.queryKey=V1(o,o.query),o}function j1(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 V1(t,e){const n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}let Wh=class jn extends Ut{constructor(e,n={}){super(),this.binaryType=M1,this.writeBuffer=[],e&&typeof e=="object"&&(n=e,e=null),e?(e=ma(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=ma(n.host).host),_i(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=g1(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 B1[e](r)}open(){let e;if(this.opts.rememberUpgrade&&jn.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;jn.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;jn.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",jn.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+=p1(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){jn.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}};Wh.protocol=Ih;function $1(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=ma(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 U1=typeof ArrayBuffer=="function",z1=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,qh=Object.prototype.toString,W1=typeof Blob=="function"||typeof Blob<"u"&&qh.call(Blob)==="[object BlobConstructor]",q1=typeof File=="function"||typeof File<"u"&&qh.call(File)==="[object FileConstructor]";function ya(t){return U1&&(t instanceof ArrayBuffer||z1(t))||W1&&t instanceof Blob||q1&&t instanceof File}function Ai(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let n=0,r=t.length;n<r;n++)if(Ai(t[n]))return!0;return!1}if(ya(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return Ai(t.toJSON(),!0);for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&Ai(t[n]))return!0;return!1}function H1(t){const e=[],n=t.data,r=t;return r.data=ga(n,e),r.attachments=e.length,{packet:r,buffers:e}}function ga(t,e){if(!t)return t;if(ya(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]=ga(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]=ga(t[r],e));return n}return t}function G1(t,e){return t.data=va(t.data,e),delete t.attachments,t}function va(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]=va(t[n],e);else if(typeof t=="object")for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(t[n]=va(t[n],e));return t}const K1=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Y1=5;var mt;(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"})(mt||(mt={}));class X1{constructor(e){this.replacer=e}encode(e){return(e.type===mt.EVENT||e.type===mt.ACK)&&Ai(e)?this.encodeAsBinary({type:e.type===mt.EVENT?mt.BINARY_EVENT:mt.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let n=""+e.type;return(e.type===mt.BINARY_EVENT||e.type===mt.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=H1(e),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function Hh(t){return Object.prototype.toString.call(t)==="[object Object]"}class ba extends Ut{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===mt.BINARY_EVENT;r||n.type===mt.BINARY_ACK?(n.type=r?mt.EVENT:mt.ACK,this.reconstructor=new J1(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(ya(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(mt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===mt.BINARY_EVENT||r.type===mt.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(ba.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 mt.CONNECT:return Hh(n);case mt.DISCONNECT:return n===void 0;case mt.CONNECT_ERROR:return typeof n=="string"||Hh(n);case mt.EVENT:case mt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&K1.indexOf(n[0])===-1);case mt.ACK:case mt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class J1{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=G1(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Z1=Object.freeze(Object.defineProperty({__proto__:null,Decoder:ba,Encoder:X1,get PacketType(){return mt},protocol:Y1},Symbol.toStringTag,{value:"Module"}));function ve(t,e,n){return t.on(e,n),function(){t.off(e,n)}}const Q1=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Gh extends Ut{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=[ve(e,"open",this.onopen.bind(this)),ve(e,"packet",this.onpacket.bind(this)),ve(e,"error",this.onerror.bind(this)),ve(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(Q1.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:mt.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:mt.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 mt.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 mt.EVENT:case mt.BINARY_EVENT:this.onevent(e);break;case mt.ACK:case mt.BINARY_ACK:this.onack(e);break;case mt.DISCONNECT:this.ondisconnect();break;case mt.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:mt.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:mt.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 In(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}In.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},In.prototype.reset=function(){this.attempts=0},In.prototype.setMin=function(t){this.ms=t},In.prototype.setMax=function(t){this.max=t},In.prototype.setJitter=function(t){this.jitter=t};class wa extends Ut{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,_i(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 In({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||Z1;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 Wh(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=ve(n,"open",function(){r.onopen(),e&&e()}),o=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},s=ve(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(ve(e,"ping",this.onping.bind(this)),ve(e,"data",this.ondata.bind(this)),ve(e,"error",this.onerror.bind(this)),ve(e,"close",this.onclose.bind(this)),ve(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){pa(()=>{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 Gh(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 xr={};function Ti(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const n=$1(t,e.path||"/socket.io"),r=n.source,i=n.id,o=n.path,s=xr[i]&&o in xr[i].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||s;let l;return a?l=new wa(r,e):(xr[i]||(xr[i]=new wa(r,e)),l=xr[i]),n.query&&!e.query&&(e.query=n.queryKey),l.socket(n.path,e)}Object.assign(Ti,{Manager:wa,Socket:Gh,io:Ti,connect:Ti});function tx(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Kh={exports:{}},Lt=Kh.exports={},Ae,Te;function _a(){throw new Error("setTimeout has not been defined")}function xa(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Ae=setTimeout:Ae=_a}catch{Ae=_a}try{typeof clearTimeout=="function"?Te=clearTimeout:Te=xa}catch{Te=xa}})();function Yh(t){if(Ae===setTimeout)return setTimeout(t,0);if((Ae===_a||!Ae)&&setTimeout)return Ae=setTimeout,setTimeout(t,0);try{return Ae(t,0)}catch{try{return Ae.call(null,t,0)}catch{return Ae.call(this,t,0)}}}function ex(t){if(Te===clearTimeout)return clearTimeout(t);if((Te===xa||!Te)&&clearTimeout)return Te=clearTimeout,clearTimeout(t);try{return Te(t)}catch{try{return Te.call(null,t)}catch{return Te.call(this,t)}}}var De=[],Rn=!1,on,Pi=-1;function nx(){!Rn||!on||(Rn=!1,on.length?De=on.concat(De):Pi=-1,De.length&&Xh())}function Xh(){if(!Rn){var t=Yh(nx);Rn=!0;for(var e=De.length;e;){for(on=De,De=[];++Pi<e;)on&&on[Pi].run();Pi=-1,e=De.length}on=null,Rn=!1,ex(t)}}Lt.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];De.push(new Jh(t,e)),De.length===1&&!Rn&&Yh(Xh)};function Jh(t,e){this.fun=t,this.array=e}Jh.prototype.run=function(){this.fun.apply(null,this.array)},Lt.title="browser",Lt.browser=!0,Lt.env={},Lt.argv=[],Lt.version="",Lt.versions={};function Be(){}Lt.on=Be,Lt.addListener=Be,Lt.once=Be,Lt.off=Be,Lt.removeListener=Be,Lt.removeAllListeners=Be,Lt.emit=Be,Lt.prependListener=Be,Lt.prependOnceListener=Be,Lt.listeners=function(t){return[]},Lt.binding=function(t){throw new Error("process.binding is not supported")},Lt.cwd=function(){return"/"},Lt.chdir=function(t){throw new Error("process.chdir is not supported")},Lt.umask=function(){return 0};var rx=Kh.exports;const zt=tx(rx);var sn={},Zh={},Sa=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},ix=Sa,Ea=function(){return ix()&&!!Symbol.toStringTag},Qh=Object,ox=Error,sx=EvalError,ax=RangeError,cx=ReferenceError,tp=SyntaxError,ki=TypeError,lx=URIError,ux=Math.abs,fx=Math.floor,dx=Math.max,hx=Math.min,px=Math.pow,mx=Object.getOwnPropertyDescriptor,Oi=mx;if(Oi)try{Oi([],"length")}catch{Oi=null}var Sr=Oi,Ci=Object.defineProperty||!1;if(Ci)try{Ci({},"a",{value:1})}catch{Ci=!1}var Ii=Ci,Aa,ep;function yx(){if(ep)return Aa;ep=1;var t=typeof Symbol<"u"&&Symbol,e=Sa;return Aa=function(){return typeof t!="function"||typeof Symbol!="function"||typeof t("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},Aa}var gx="Function.prototype.bind called on incompatible ",vx=Object.prototype.toString,bx=Math.max,wx="[object Function]",np=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},_x=function(e,n){for(var r=[],i=n,o=0;i<e.length;i+=1,o+=1)r[o]=e[i];return r},xx=function(t,e){for(var n="",r=0;r<t.length;r+=1)n+=t[r],r+1<t.length&&(n+=e);return n},Sx=function(e){var n=this;if(typeof n!="function"||vx.apply(n)!==wx)throw new TypeError(gx+n);for(var r=_x(arguments,1),i,o=function(){if(this instanceof i){var c=n.apply(this,np(r,arguments));return Object(c)===c?c:this}return n.apply(e,np(r,arguments))},s=bx(0,n.length-r.length),a=[],l=0;l<s;l++)a[l]="$"+l;if(i=Function("binder","return function ("+xx(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},Ex=Sx,Er=Function.prototype.bind||Ex,Ta=Function.prototype.call,Pa=Function.prototype.apply,Ax=typeof Reflect<"u"&&Reflect&&Reflect.apply,Tx=Er,Px=Pa,kx=Ta,Ox=Ax,rp=Ox||Tx.call(kx,Px),Cx=Er,Ix=ki,Rx=Ta,Mx=rp,ka=function(e){if(e.length<1||typeof e[0]!="function")throw new Ix("a function is required");return Mx(Cx,Rx,e)},Oa,ip;function Nx(){if(ip)return Oa;ip=1;var t=ka,e=Sr,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 Oa=r&&typeof r.get=="function"?t([r.get]):typeof o=="function"?function(a){return o(a==null?a:i(a))}:!1,Oa}var Ca,op;function Dx(){if(op)return Ca;op=1;var t=Function.prototype.call,e=Object.prototype.hasOwnProperty,n=Er;return Ca=n.call(t,e),Ca}var pt,sp=Qh,Bx=ox,Lx=sx,Fx=ax,jx=cx,Mn=tp,Nn=ki,Vx=lx,$x=ux,Ux=fx,zx=dx,Wx=hx,qx=px,ap=Function,Ia=function(t){try{return ap('"use strict"; return ('+t+").constructor;")()}catch{}},Ar=Sr,Hx=Ii,Ra=function(){throw new Nn},Gx=Ar?function(){try{return arguments.callee,Ra}catch{try{return Ar(arguments,"callee").get}catch{return Ra}}}():Ra,Dn=yx()(),Kx=Nx(),Kt=typeof Reflect=="function"&&Reflect.getPrototypeOf||sp.getPrototypeOf||Kx,cp=Pa,Tr=Ta,Bn={},Yx=typeof Uint8Array>"u"||!Kt?pt:Kt(Uint8Array),an={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?pt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?pt:ArrayBuffer,"%ArrayIteratorPrototype%":Dn&&Kt?Kt([][Symbol.iterator]()):pt,"%AsyncFromSyncIteratorPrototype%":pt,"%AsyncFunction%":Bn,"%AsyncGenerator%":Bn,"%AsyncGeneratorFunction%":Bn,"%AsyncIteratorPrototype%":Bn,"%Atomics%":typeof Atomics>"u"?pt:Atomics,"%BigInt%":typeof BigInt>"u"?pt:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?pt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?pt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?pt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Bx,"%eval%":eval,"%EvalError%":Lx,"%Float32Array%":typeof Float32Array>"u"?pt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?pt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?pt:FinalizationRegistry,"%Function%":ap,"%GeneratorFunction%":Bn,"%Int8Array%":typeof Int8Array>"u"?pt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?pt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?pt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Dn&&Kt?Kt(Kt([][Symbol.iterator]())):pt,"%JSON%":typeof JSON=="object"?JSON:pt,"%Map%":typeof Map>"u"?pt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Dn||!Kt?pt:Kt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":sp,"%Object.getOwnPropertyDescriptor%":Ar,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?pt:Promise,"%Proxy%":typeof Proxy>"u"?pt:Proxy,"%RangeError%":Fx,"%ReferenceError%":jx,"%Reflect%":typeof Reflect>"u"?pt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?pt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Dn||!Kt?pt:Kt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?pt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Dn&&Kt?Kt(""[Symbol.iterator]()):pt,"%Symbol%":Dn?Symbol:pt,"%SyntaxError%":Mn,"%ThrowTypeError%":Gx,"%TypedArray%":Yx,"%TypeError%":Nn,"%Uint8Array%":typeof Uint8Array>"u"?pt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?pt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?pt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?pt:Uint32Array,"%URIError%":Vx,"%WeakMap%":typeof WeakMap>"u"?pt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?pt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?pt:WeakSet,"%Function.prototype.call%":Tr,"%Function.prototype.apply%":cp,"%Object.defineProperty%":Hx,"%Math.abs%":$x,"%Math.floor%":Ux,"%Math.max%":zx,"%Math.min%":Wx,"%Math.pow%":qx};if(Kt)try{null.error}catch(t){var Xx=Kt(Kt(t));an["%Error.prototype%"]=Xx}var Jx=function t(e){var n;if(e==="%AsyncFunction%")n=Ia("async function () {}");else if(e==="%GeneratorFunction%")n=Ia("function* () {}");else if(e==="%AsyncGeneratorFunction%")n=Ia("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 an[e]=n,n},lp={__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"]},Pr=Er,Ri=Dx(),Zx=Pr.call(Tr,Array.prototype.concat),Qx=Pr.call(cp,Array.prototype.splice),up=Pr.call(Tr,String.prototype.replace),Mi=Pr.call(Tr,String.prototype.slice),tS=Pr.call(Tr,RegExp.prototype.exec),eS=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,nS=/\\(\\)?/g,rS=function(e){var n=Mi(e,0,1),r=Mi(e,-1);if(n==="%"&&r!=="%")throw new Mn("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Mn("invalid intrinsic syntax, expected opening `%`");var i=[];return up(e,eS,function(o,s,a,l){i[i.length]=a?up(l,nS,"$1"):s||o}),i},iS=function(e,n){var r=e,i;if(Ri(lp,r)&&(i=lp[r],r="%"+i[0]+"%"),Ri(an,r)){var o=an[r];if(o===Bn&&(o=Jx(r)),typeof o>"u"&&!n)throw new Nn("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:o}}throw new Mn("intrinsic "+e+" does not exist!")},Ma=function(e,n){if(typeof e!="string"||e.length===0)throw new Nn("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Nn('"allowMissing" argument must be a boolean');if(tS(/^%?[^%]*%?$/,e)===null)throw new Mn("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=rS(e),i=r.length>0?r[0]:"",o=iS("%"+i+"%",n),s=o.name,a=o.value,l=!1,d=o.alias;d&&(i=d[0],Qx(r,Zx([0,1],d)));for(var c=1,h=!0;c<r.length;c+=1){var m=r[c],y=Mi(m,0,1),_=Mi(m,-1);if((y==='"'||y==="'"||y==="`"||_==='"'||_==="'"||_==="`")&&y!==_)throw new Mn("property names with quotes must have matching quotes");if((m==="constructor"||!h)&&(l=!0),i+="."+m,s="%"+i+"%",Ri(an,s))a=an[s];else if(a!=null){if(!(m in a)){if(!n)throw new Nn("base intrinsic for "+e+" exists, but the property is not available.");return}if(Ar&&c+1>=r.length){var w=Ar(a,m);h=!!w,h&&"get"in w&&!("originalValue"in w.get)?a=w.get:a=a[m]}else h=Ri(a,m),a=a[m];h&&!l&&(an[s]=a)}}return a},fp=Ma,dp=ka,oS=dp([fp("%String.prototype.indexOf%")]),Na=function(e,n){var r=fp(e,!!n);return typeof r=="function"&&oS(e,".prototype.")>-1?dp([r]):r},sS=Ea(),aS=Na,Da=aS("Object.prototype.toString"),Ni=function(e){return sS&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:Da(e)==="[object Arguments]"},hp=function(e){return Ni(e)?!0:e!==null&&typeof e=="object"&&"length"in e&&typeof e.length=="number"&&e.length>=0&&Da(e)!=="[object Array]"&&"callee"in e&&Da(e.callee)==="[object Function]"},cS=function(){return Ni(arguments)}();Ni.isLegacyArguments=hp;var lS=cS?Ni:hp,uS=Object.prototype.toString,fS=Function.prototype.toString,dS=/^\s*(?:function)?\*/,pp=Ea(),Ba=Object.getPrototypeOf,hS=function(){if(!pp)return!1;try{return Function("return function*() {}")()}catch{}},La,pS=function(e){if(typeof e!="function")return!1;if(dS.test(fS.call(e)))return!0;if(!pp){var n=uS.call(e);return n==="[object GeneratorFunction]"}if(!Ba)return!1;if(typeof La>"u"){var r=hS();La=r?Ba(r):!1}return Ba(e)===La},mp=Function.prototype.toString,Ln=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,Fa,Di;if(typeof Ln=="function"&&typeof Object.defineProperty=="function")try{Fa=Object.defineProperty({},"length",{get:function(){throw Di}}),Di={},Ln(function(){throw 42},null,Fa)}catch(t){t!==Di&&(Ln=null)}else Ln=null;var mS=/^\s*class\b/,ja=function(e){try{var n=mp.call(e);return mS.test(n)}catch{return!1}},Va=function(e){try{return ja(e)?!1:(mp.call(e),!0)}catch{return!1}},Bi=Object.prototype.toString,yS="[object Object]",gS="[object Function]",vS="[object GeneratorFunction]",bS="[object HTMLAllCollection]",wS="[object HTML document.all class]",_S="[object HTMLCollection]",xS=typeof Symbol=="function"&&!!Symbol.toStringTag,SS=!(0 in[,]),$a=function(){return!1};if(typeof document=="object"){var ES=document.all;Bi.call(ES)===Bi.call(document.all)&&($a=function(e){if((SS||!e)&&(typeof e>"u"||typeof e=="object"))try{var n=Bi.call(e);return(n===bS||n===wS||n===_S||n===yS)&&e("")==null}catch{}return!1})}var AS=Ln?function(e){if($a(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{Ln(e,null,Fa)}catch(n){if(n!==Di)return!1}return!ja(e)&&Va(e)}:function(e){if($a(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(xS)return Va(e);if(ja(e))return!1;var n=Bi.call(e);return n!==gS&&n!==vS&&!/^\[object HTML/.test(n)?!1:Va(e)},TS=AS,PS=Object.prototype.toString,yp=Object.prototype.hasOwnProperty,kS=function(e,n,r){for(var i=0,o=e.length;i<o;i++)yp.call(e,i)&&(r==null?n(e[i],i,e):n.call(r,e[i],i,e))},OS=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)},CS=function(e,n,r){for(var i in e)yp.call(e,i)&&(r==null?n(e[i],i,e):n.call(r,e[i],i,e))},IS=function(e,n,r){if(!TS(n))throw new TypeError("iterator must be a function");var i;arguments.length>=3&&(i=r),PS.call(e)==="[object Array]"?kS(e,n,i):typeof e=="string"?OS(e,n,i):CS(e,n,i)},RS=IS,MS=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"],Ua=MS,NS=typeof globalThis>"u"?fr:globalThis,DS=function(){for(var e=[],n=0;n<Ua.length;n++)typeof NS[Ua[n]]=="function"&&(e[e.length]=Ua[n]);return e},gp={exports:{}},vp=Ii,BS=tp,Fn=ki,bp=Sr,wp=function(e,n,r){if(!e||typeof e!="object"&&typeof e!="function")throw new Fn("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new Fn("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Fn("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Fn("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Fn("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Fn("`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=!!bp&&bp(e,n);if(vp)vp(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 BS("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},za=Ii,_p=function(){return!!za};_p.hasArrayLengthDefineBug=function(){if(!za)return null;try{return za([],"length",{value:1}).length!==1}catch{return!0}};var xp=_p,LS=Ma,Sp=wp,FS=xp(),Ep=Sr,Ap=ki,jS=LS("%Math.floor%"),VS=function(e,n){if(typeof e!="function")throw new Ap("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||jS(n)!==n)throw new Ap("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],i=!0,o=!0;if("length"in e&&Ep){var s=Ep(e,"length");s&&!s.configurable&&(i=!1),s&&!s.writable&&(o=!1)}return(i||o||!r)&&(FS?Sp(e,"length",n,!0,!0):Sp(e,"length",n)),e},$S=Er,US=Pa,zS=rp,WS=function(){return zS($S,US,arguments)};(function(t){var e=VS,n=Ii,r=ka,i=WS;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})(gp);var Li=gp.exports,Fi=RS,qS=DS,Tp=Li,Wa=Na,ji=Sr,HS=Wa("Object.prototype.toString"),Pp=Ea(),kp=typeof globalThis>"u"?fr:globalThis,qa=qS(),Ha=Wa("String.prototype.slice"),Ga=Object.getPrototypeOf,GS=Wa("Array.prototype.indexOf",!0)||function(e,n){for(var r=0;r<e.length;r+=1)if(e[r]===n)return r;return-1},Vi={__proto__:null};Pp&&ji&&Ga?Fi(qa,function(t){var e=new kp[t];if(Symbol.toStringTag in e){var n=Ga(e),r=ji(n,Symbol.toStringTag);if(!r){var i=Ga(n);r=ji(i,Symbol.toStringTag)}Vi["$"+t]=Tp(r.get)}}):Fi(qa,function(t){var e=new kp[t],n=e.slice||e.set;n&&(Vi["$"+t]=Tp(n))});var KS=function(e){var n=!1;return Fi(Vi,function(r,i){if(!n)try{"$"+r(e)===i&&(n=Ha(i,1))}catch{}}),n},YS=function(e){var n=!1;return Fi(Vi,function(r,i){if(!n)try{r(e),n=Ha(i,1)}catch{}}),n},Op=function(e){if(!e||typeof e!="object")return!1;if(!Pp){var n=Ha(HS(e),8,-1);return GS(qa,n)>-1?n:n!=="Object"?!1:YS(e)}return ji?KS(e):null},XS=Op,JS=function(e){return!!XS(e)};(function(t){var e=lS,n=pS,r=Op,i=JS;function o($){return $.call.bind($)}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 _($,he){if(typeof $!="object")return!1;try{return he($),!0}catch{return!1}}t.isArgumentsObject=e,t.isGeneratorFunction=n,t.isTypedArray=i;function w($){return typeof Promise<"u"&&$ instanceof Promise||$!==null&&typeof $=="object"&&typeof $.then=="function"&&typeof $.catch=="function"}t.isPromise=w;function k($){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView($):i($)||N($)}t.isArrayBufferView=k;function x($){return r($)==="Uint8Array"}t.isUint8Array=x;function v($){return r($)==="Uint8ClampedArray"}t.isUint8ClampedArray=v;function S($){return r($)==="Uint16Array"}t.isUint16Array=S;function R($){return r($)==="Uint32Array"}t.isUint32Array=R;function O($){return r($)==="Int8Array"}t.isInt8Array=O;function B($){return r($)==="Int16Array"}t.isInt16Array=B;function L($){return r($)==="Int32Array"}t.isInt32Array=L;function W($){return r($)==="Float32Array"}t.isFloat32Array=W;function F($){return r($)==="Float64Array"}t.isFloat64Array=F;function Y($){return r($)==="BigInt64Array"}t.isBigInt64Array=Y;function Z($){return r($)==="BigUint64Array"}t.isBigUint64Array=Z;function et($){return l($)==="[object Map]"}et.working=typeof Map<"u"&&et(new Map);function st($){return typeof Map>"u"?!1:et.working?et($):$ instanceof Map}t.isMap=st;function At($){return l($)==="[object Set]"}At.working=typeof Set<"u"&&At(new Set);function dt($){return typeof Set>"u"?!1:At.working?At($):$ instanceof Set}t.isSet=dt;function It($){return l($)==="[object WeakMap]"}It.working=typeof WeakMap<"u"&&It(new WeakMap);function at($){return typeof WeakMap>"u"?!1:It.working?It($):$ instanceof WeakMap}t.isWeakMap=at;function ht($){return l($)==="[object WeakSet]"}ht.working=typeof WeakSet<"u"&&ht(new WeakSet);function U($){return ht($)}t.isWeakSet=U;function H($){return l($)==="[object ArrayBuffer]"}H.working=typeof ArrayBuffer<"u"&&H(new ArrayBuffer);function G($){return typeof ArrayBuffer>"u"?!1:H.working?H($):$ instanceof ArrayBuffer}t.isArrayBuffer=G;function E($){return l($)==="[object DataView]"}E.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&E(new DataView(new ArrayBuffer(1),0,1));function N($){return typeof DataView>"u"?!1:E.working?E($):$ instanceof DataView}t.isDataView=N;var b=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function A($){return l($)==="[object SharedArrayBuffer]"}function C($){return typeof b>"u"?!1:(typeof A.working>"u"&&(A.working=A(new b)),A.working?A($):$ instanceof b)}t.isSharedArrayBuffer=C;function z($){return l($)==="[object AsyncFunction]"}t.isAsyncFunction=z;function j($){return l($)==="[object Map Iterator]"}t.isMapIterator=j;function q($){return l($)==="[object Set Iterator]"}t.isSetIterator=q;function K($){return l($)==="[object Generator]"}t.isGeneratorObject=K;function rt($){return l($)==="[object WebAssembly.Module]"}t.isWebAssemblyCompiledModule=rt;function ft($){return _($,d)}t.isNumberObject=ft;function vt($){return _($,c)}t.isStringObject=vt;function Pt($){return _($,h)}t.isBooleanObject=Pt;function Ft($){return s&&_($,m)}t.isBigIntObject=Ft;function Yt($){return a&&_($,y)}t.isSymbolObject=Yt;function Jt($){return ft($)||vt($)||Pt($)||Ft($)||Yt($)}t.isBoxedPrimitive=Jt;function Wt($){return typeof Uint8Array<"u"&&(G($)||C($))}t.isAnyArrayBuffer=Wt,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function($){Object.defineProperty(t,$,{enumerable:!1,value:function(){throw new Error($+" is not supported in userland")}})})})(Zh);var ZS=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"},Ka={exports:{}};typeof Object.create=="function"?Ka.exports=function(e,n){n&&(e.super_=n,e.prototype=Object.create(n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Ka.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 QS=Ka.exports;(function(t){var e=Object.getOwnPropertyDescriptors||function(N){for(var b=Object.keys(N),A={},C=0;C<b.length;C++)A[b[C]]=Object.getOwnPropertyDescriptor(N,b[C]);return A},n=/%[sdj%]/g;t.format=function(E){if(!O(E)){for(var N=[],b=0;b<arguments.length;b++)N.push(s(arguments[b]));return N.join(" ")}for(var b=1,A=arguments,C=A.length,z=String(E).replace(n,function(q){if(q==="%%")return"%";if(b>=C)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}}),j=A[b];b<C;j=A[++b])v(j)||!F(j)?z+=" "+j:z+=" "+s(j);return z},t.deprecate=function(E,N){if(typeof zt<"u"&&zt.noDeprecation===!0)return E;if(typeof zt>"u")return function(){return t.deprecate(E,N).apply(this,arguments)};var b=!1;function A(){if(!b){if(zt.throwDeprecation)throw new Error(N);zt.traceDeprecation?console.trace(N):console.error(N),b=!0}return E.apply(this,arguments)}return A};var r={},i=/^$/;if(zt.env.NODE_DEBUG){var o=zt.env.NODE_DEBUG;o=o.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),i=new RegExp("^"+o+"$","i")}t.debuglog=function(E){if(E=E.toUpperCase(),!r[E])if(i.test(E)){var N=zt.pid;r[E]=function(){var b=t.format.apply(t,arguments);console.error("%s %d: %s",E,N,b)}}else r[E]=function(){};return r[E]};function s(E,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),L(b.showHidden)&&(b.showHidden=!1),L(b.depth)&&(b.depth=2),L(b.colors)&&(b.colors=!1),L(b.customInspect)&&(b.customInspect=!0),b.colors&&(b.stylize=a),c(b,E,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(E,N){var b=s.styles[N];return b?"\x1B["+s.colors[b][0]+"m"+E+"\x1B["+s.colors[b][1]+"m":E}function l(E,N){return E}function d(E){var N={};return E.forEach(function(b,A){N[b]=!0}),N}function c(E,N,b){if(E.customInspect&&N&&et(N.inspect)&&N.inspect!==t.inspect&&!(N.constructor&&N.constructor.prototype===N)){var A=N.inspect(b,E);return O(A)||(A=c(E,A,b)),A}var C=h(E,N);if(C)return C;var z=Object.keys(N),j=d(z);if(E.showHidden&&(z=Object.getOwnPropertyNames(N)),Z(N)&&(z.indexOf("message")>=0||z.indexOf("description")>=0))return m(N);if(z.length===0){if(et(N)){var q=N.name?": "+N.name:"";return E.stylize("[Function"+q+"]","special")}if(W(N))return E.stylize(RegExp.prototype.toString.call(N),"regexp");if(Y(N))return E.stylize(Date.prototype.toString.call(N),"date");if(Z(N))return m(N)}var K="",rt=!1,ft=["{","}"];if(k(N)&&(rt=!0,ft=["[","]"]),et(N)){var vt=N.name?": "+N.name:"";K=" [Function"+vt+"]"}if(W(N)&&(K=" "+RegExp.prototype.toString.call(N)),Y(N)&&(K=" "+Date.prototype.toUTCString.call(N)),Z(N)&&(K=" "+m(N)),z.length===0&&(!rt||N.length==0))return ft[0]+K+ft[1];if(b<0)return W(N)?E.stylize(RegExp.prototype.toString.call(N),"regexp"):E.stylize("[Object]","special");E.seen.push(N);var Pt;return rt?Pt=y(E,N,b,j,z):Pt=z.map(function(Ft){return _(E,N,b,j,Ft,rt)}),E.seen.pop(),w(Pt,K,ft)}function h(E,N){if(L(N))return E.stylize("undefined","undefined");if(O(N)){var b="'"+JSON.stringify(N).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return E.stylize(b,"string")}if(R(N))return E.stylize(""+N,"number");if(x(N))return E.stylize(""+N,"boolean");if(v(N))return E.stylize("null","null")}function m(E){return"["+Error.prototype.toString.call(E)+"]"}function y(E,N,b,A,C){for(var z=[],j=0,q=N.length;j<q;++j)ht(N,String(j))?z.push(_(E,N,b,A,String(j),!0)):z.push("");return C.forEach(function(K){K.match(/^\d+$/)||z.push(_(E,N,b,A,K,!0))}),z}function _(E,N,b,A,C,z){var j,q,K;if(K=Object.getOwnPropertyDescriptor(N,C)||{value:N[C]},K.get?K.set?q=E.stylize("[Getter/Setter]","special"):q=E.stylize("[Getter]","special"):K.set&&(q=E.stylize("[Setter]","special")),ht(A,C)||(j="["+C+"]"),q||(E.seen.indexOf(K.value)<0?(v(b)?q=c(E,K.value,null):q=c(E,K.value,b-1),q.indexOf(`
101
- `)>-1&&(z?q=q.split(`
100
+ */(function(t){const e=Si,n=da,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 _(p)}return h(p,u,f)}c.poolSize=8192;function h(p,u,f){if(typeof p=="string")return b(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(I(p,s)||p&&I(p.buffer,s)||typeof a<"u"&&(I(p,a)||p&&I(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 T=S(p);if(T)return T;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 _(p){return m(p),d(p<0?0:R(p)|0)}c.allocUnsafe=function(p){return _(p)},c.allocUnsafeSlow=function(p){return _(p)};function b(p,u){if((typeof u!="string"||u==="")&&(u="utf8"),!c.isEncoding(u))throw new TypeError("Unknown encoding: "+u);const f=D(p,u)|0;let g=d(f);const T=g.write(p,u);return T!==f&&(g=g.slice(0,T)),g}function P(p){const u=p.length<0?0:R(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(I(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 S(p){if(c.isBuffer(p)){const u=R(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 R(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(I(u,o)&&(u=c.from(u,u.offset,u.byteLength)),I(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,T=f.length;for(let B=0,V=Math.min(g,T);B<V;++B)if(u[B]!==f[B]){g=u[B],T=f[B];break}return g<T?-1:T<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 T=c.allocUnsafe(f);let B=0;for(g=0;g<u.length;++g){let V=u[g];if(I(V,o))B+V.length>T.length?(c.isBuffer(V)||(V=c.from(V)),V.copy(T,B)):o.prototype.set.call(T,V,B);else if(c.isBuffer(V))V.copy(T,B);else throw new TypeError('"list" argument must be an Array of Buffers');B+=V.length}return T};function D(p,u){if(c.isBuffer(p))return p.length;if(s.isView(p)||I(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 T=!1;for(;;)switch(u){case"ascii":case"latin1":case"binary":return f;case"utf8":case"utf-8":return he(p).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return f*2;case"hex":return f>>>1;case"base64":return St(p).length;default:if(T)return g?-1:he(p).length;u=(""+u).toLowerCase(),T=!0}}c.byteLength=D;function F(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 E(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 q(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)q(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)q(this,f,f+3),q(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)q(this,f,f+7),q(this,f+1,f+6),q(this,f+2,f+5),q(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):F.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,T,B){if(I(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),T===void 0&&(T=0),B===void 0&&(B=this.length),f<0||g>u.length||T<0||B>this.length)throw new RangeError("out of range index");if(T>=B&&f>=g)return 0;if(T>=B)return-1;if(f>=g)return 1;if(f>>>=0,g>>>=0,T>>>=0,B>>>=0,this===u)return 0;let V=B-T,lt=g-f;const bt=Math.min(V,lt),_t=this.slice(T,B),Bt=u.slice(f,g);for(let Tt=0;Tt<bt;++Tt)if(_t[Tt]!==Bt[Tt]){V=_t[Tt],lt=Bt[Tt];break}return V<lt?-1:lt<V?1:0};function L(p,u,f,g,T){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=T?0:p.length-1),f<0&&(f=p.length+f),f>=p.length){if(T)return-1;f=p.length-1}else if(f<0)if(T)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,T);if(typeof u=="number")return u=u&255,typeof o.prototype.indexOf=="function"?T?o.prototype.indexOf.call(p,u,f):o.prototype.lastIndexOf.call(p,u,f):Y(p,[u],f,g,T);throw new TypeError("val must be string, number or Buffer")}function Y(p,u,f,g,T){let B=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;B=2,V/=2,lt/=2,f/=2}function bt(Bt,Tt){return B===1?Bt[Tt]:Bt.readUInt16BE(Tt*B)}let _t;if(T){let Bt=-1;for(_t=f;_t<V;_t++)if(bt(p,_t)===bt(u,Bt===-1?0:_t-Bt)){if(Bt===-1&&(Bt=_t),_t-Bt+1===lt)return Bt*B}else Bt!==-1&&(_t-=_t-Bt),Bt=-1}else for(f+lt>V&&(f=V-lt),_t=f;_t>=0;_t--){let Bt=!0;for(let Tt=0;Tt<lt;Tt++)if(bt(p,_t+Tt)!==bt(u,Tt)){Bt=!1;break}if(Bt)return _t}return-1}c.prototype.includes=function(u,f,g){return this.indexOf(u,f,g)!==-1},c.prototype.indexOf=function(u,f,g){return L(this,u,f,g,!0)},c.prototype.lastIndexOf=function(u,f,g){return L(this,u,f,g,!1)};function Z(p,u,f,g){f=Number(f)||0;const T=p.length-f;g?(g=Number(g),g>T&&(g=T)):g=T;const B=u.length;g>B/2&&(g=B/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 et(p,u,f,g){return k(he(u,p.length-f),p,f,g)}function st(p,u,f,g){return k(J(u),p,f,g)}function At(p,u,f,g){return k(St(u),p,f,g)}function dt(p,u,f,g){return k(gt(u,p.length-f),p,f,g)}c.prototype.write=function(u,f,g,T){if(f===void 0)T="utf8",g=this.length,f=0;else if(g===void 0&&typeof f=="string")T=f,g=this.length,f=0;else if(isFinite(f))f=f>>>0,isFinite(g)?(g=g>>>0,T===void 0&&(T="utf8")):(T=g,g=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const B=this.length-f;if((g===void 0||g>B)&&(g=B),u.length>0&&(g<0||f<0)||f>this.length)throw new RangeError("Attempt to write outside buffer bounds");T||(T="utf8");let V=!1;for(;;)switch(T){case"hex":return Z(this,u,f,g);case"utf8":case"utf-8":return et(this,u,f,g);case"ascii":case"latin1":case"binary":return st(this,u,f,g);case"base64":return At(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: "+T);T=(""+T).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 T=u;for(;T<f;){const B=p[T];let V=null,lt=B>239?4:B>223?3:B>191?2:1;if(T+lt<=f){let bt,_t,Bt,Tt;switch(lt){case 1:B<128&&(V=B);break;case 2:bt=p[T+1],(bt&192)===128&&(Tt=(B&31)<<6|bt&63,Tt>127&&(V=Tt));break;case 3:bt=p[T+1],_t=p[T+2],(bt&192)===128&&(_t&192)===128&&(Tt=(B&15)<<12|(bt&63)<<6|_t&63,Tt>2047&&(Tt<55296||Tt>57343)&&(V=Tt));break;case 4:bt=p[T+1],_t=p[T+2],Bt=p[T+3],(bt&192)===128&&(_t&192)===128&&(Bt&192)===128&&(Tt=(B&15)<<18|(bt&63)<<12|(_t&63)<<6|Bt&63,Tt>65535&&Tt<1114112&&(V=Tt))}}V===null?(V=65533,lt=1):V>65535&&(V-=65536,g.push(V>>>10&1023|55296),V=56320|V&1023),g.push(V),T+=lt}return U(g)}const ht=4096;function U(p){const u=p.length;if(u<=ht)return String.fromCharCode.apply(String,p);let f="",g=0;for(;g<u;)f+=String.fromCharCode.apply(String,p.slice(g,g+=ht));return f}function H(p,u,f){let g="";f=Math.min(p.length,f);for(let T=u;T<f;++T)g+=String.fromCharCode(p[T]&127);return g}function G(p,u,f){let g="";f=Math.min(p.length,f);for(let T=u;T<f;++T)g+=String.fromCharCode(p[T]);return g}function E(p,u,f){const g=p.length;(!u||u<0)&&(u=0),(!f||f<0||f>g)&&(f=g);let T="";for(let B=u;B<f;++B)T+=tt[p[B]];return T}function N(p,u,f){const g=p.slice(u,f);let T="";for(let B=0;B<g.length-1;B+=2)T+=String.fromCharCode(g[B]+g[B+1]*256);return T}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 T=this.subarray(u,f);return Object.setPrototypeOf(T,c.prototype),T};function w(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||w(u,f,this.length);let T=this[u],B=1,V=0;for(;++V<f&&(B*=256);)T+=this[u+V]*B;return T},c.prototype.readUintBE=c.prototype.readUIntBE=function(u,f,g){u=u>>>0,f=f>>>0,g||w(u,f,this.length);let T=this[u+--f],B=1;for(;f>0&&(B*=256);)T+=this[u+--f]*B;return T},c.prototype.readUint8=c.prototype.readUInt8=function(u,f){return u=u>>>0,f||w(u,1,this.length),this[u]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(u,f){return u=u>>>0,f||w(u,2,this.length),this[u]|this[u+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(u,f){return u=u>>>0,f||w(u,2,this.length),this[u]<<8|this[u+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(u,f){return u=u>>>0,f||w(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||w(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 T=f+this[++u]*2**8+this[++u]*2**16+this[++u]*2**24,B=this[++u]+this[++u]*2**8+this[++u]*2**16+g*2**24;return BigInt(T)+(BigInt(B)<<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 T=f*2**24+this[++u]*2**16+this[++u]*2**8+this[++u],B=this[++u]*2**24+this[++u]*2**16+this[++u]*2**8+g;return(BigInt(T)<<BigInt(32))+BigInt(B)}),c.prototype.readIntLE=function(u,f,g){u=u>>>0,f=f>>>0,g||w(u,f,this.length);let T=this[u],B=1,V=0;for(;++V<f&&(B*=256);)T+=this[u+V]*B;return B*=128,T>=B&&(T-=Math.pow(2,8*f)),T},c.prototype.readIntBE=function(u,f,g){u=u>>>0,f=f>>>0,g||w(u,f,this.length);let T=f,B=1,V=this[u+--T];for(;T>0&&(B*=256);)V+=this[u+--T]*B;return B*=128,V>=B&&(V-=Math.pow(2,8*f)),V},c.prototype.readInt8=function(u,f){return u=u>>>0,f||w(u,1,this.length),this[u]&128?(255-this[u]+1)*-1:this[u]},c.prototype.readInt16LE=function(u,f){u=u>>>0,f||w(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||w(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||w(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||w(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 T=this[u+4]+this[u+5]*2**8+this[u+6]*2**16+(g<<24);return(BigInt(T)<<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 T=(f<<24)+this[++u]*2**16+this[++u]*2**8+this[++u];return(BigInt(T)<<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||w(u,4,this.length),n.read(this,u,!0,23,4)},c.prototype.readFloatBE=function(u,f){return u=u>>>0,f||w(u,4,this.length),n.read(this,u,!1,23,4)},c.prototype.readDoubleLE=function(u,f){return u=u>>>0,f||w(u,8,this.length),n.read(this,u,!0,52,8)},c.prototype.readDoubleBE=function(u,f){return u=u>>>0,f||w(u,8,this.length),n.read(this,u,!1,52,8)};function A(p,u,f,g,T,B){if(!c.isBuffer(p))throw new TypeError('"buffer" argument must be a Buffer instance');if(u>T||u<B)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,T){if(u=+u,f=f>>>0,g=g>>>0,!T){const lt=Math.pow(2,8*g)-1;A(this,u,f,g,lt,0)}let B=1,V=0;for(this[f]=u&255;++V<g&&(B*=256);)this[f+V]=u/B&255;return f+g},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(u,f,g,T){if(u=+u,f=f>>>0,g=g>>>0,!T){const lt=Math.pow(2,8*g)-1;A(this,u,f,g,lt,0)}let B=g-1,V=1;for(this[f+B]=u&255;--B>=0&&(V*=256);)this[f+B]=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 C(p,u,f,g,T){Lt(u,g,T,p,f,7);let B=Number(u&BigInt(4294967295));p[f++]=B,B=B>>8,p[f++]=B,B=B>>8,p[f++]=B,B=B>>8,p[f++]=B;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 z(p,u,f,g,T){Lt(u,g,T,p,f,7);let B=Number(u&BigInt(4294967295));p[f+7]=B,B=B>>8,p[f+6]=B,B=B>>8,p[f+5]=B,B=B>>8,p[f+4]=B;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 C(this,u,f,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeBigUInt64BE=Q(function(u,f=0){return z(this,u,f,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeIntLE=function(u,f,g,T){if(u=+u,f=f>>>0,!T){const bt=Math.pow(2,8*g-1);A(this,u,f,g,bt-1,-bt)}let B=0,V=1,lt=0;for(this[f]=u&255;++B<g&&(V*=256);)u<0&&lt===0&&this[f+B-1]!==0&&(lt=1),this[f+B]=(u/V>>0)-lt&255;return f+g},c.prototype.writeIntBE=function(u,f,g,T){if(u=+u,f=f>>>0,!T){const bt=Math.pow(2,8*g-1);A(this,u,f,g,bt-1,-bt)}let B=g-1,V=1,lt=0;for(this[f+B]=u&255;--B>=0&&(V*=256);)u<0&&lt===0&&this[f+B+1]!==0&&(lt=1),this[f+B]=(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 C(this,u,f,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeBigInt64BE=Q(function(u,f=0){return z(this,u,f,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function j(p,u,f,g,T,B){if(f+g>p.length)throw new RangeError("Index out of range");if(f<0)throw new RangeError("Index out of range")}function W(p,u,f,g,T){return u=+u,f=f>>>0,T||j(p,u,f,4),n.write(p,u,f,g,23,4),f+4}c.prototype.writeFloatLE=function(u,f,g){return W(this,u,f,!0,g)},c.prototype.writeFloatBE=function(u,f,g){return W(this,u,f,!1,g)};function K(p,u,f,g,T){return u=+u,f=f>>>0,T||j(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,T){if(!c.isBuffer(u))throw new TypeError("argument should be a Buffer");if(g||(g=0),!T&&T!==0&&(T=this.length),f>=u.length&&(f=u.length),f||(f=0),T>0&&T<g&&(T=g),T===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(T<0)throw new RangeError("sourceEnd out of bounds");T>this.length&&(T=this.length),u.length-f<T-g&&(T=u.length-f+g);const B=T-g;return this===u&&typeof o.prototype.copyWithin=="function"?this.copyWithin(f,g,T):o.prototype.set.call(u,this.subarray(g,T),f),B},c.prototype.fill=function(u,f,g,T){if(typeof u=="string"){if(typeof f=="string"?(T=f,f=0,g=this.length):typeof g=="string"&&(T=g,g=this.length),T!==void 0&&typeof T!="string")throw new TypeError("encoding must be a string");if(typeof T=="string"&&!c.isEncoding(T))throw new TypeError("Unknown encoding: "+T);if(u.length===1){const V=u.charCodeAt(0);(T==="utf8"&&V<128||T==="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 B;if(typeof u=="number")for(B=f;B<g;++B)this[B]=u;else{const V=c.isBuffer(u)?u:c.from(u,T),lt=V.length;if(lt===0)throw new TypeError('The value "'+u+'" is invalid for argument "value"');for(B=0;B<g-f;++B)this[B+f]=V[B%lt]}return this};const rt={};function ft(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(T){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:T,writable:!0})}toString(){return`${this.name} [${p}]: ${this.message}`}}}ft("ERR_BUFFER_OUT_OF_BOUNDS",function(p){return p?`${p} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),ft("ERR_INVALID_ARG_TYPE",function(p,u){return`The "${p}" argument must be of type number. Received type ${typeof u}`},TypeError),ft("ERR_OUT_OF_RANGE",function(p,u,f){let g=`The value of "${p}" is out of range.`,T=f;return Number.isInteger(f)&&Math.abs(f)>2**32?T=vt(String(f)):typeof f=="bigint"&&(T=String(f),(f>BigInt(2)**BigInt(32)||f<-(BigInt(2)**BigInt(32)))&&(T=vt(T)),T+="n"),g+=` It must be ${u}. Received ${T}`,g},RangeError);function vt(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 Pt(p,u,f){Yt(u,"offset"),(p[u]===void 0||p[u+f]===void 0)&&Jt(u,p.length-(f+1))}function Lt(p,u,f,g,T,B){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} ** ${(B+1)*8}${V}`:lt=`>= -(2${V} ** ${(B+1)*8-1}${V}) and < 2 ** ${(B+1)*8-1}${V}`,new rt.ERR_OUT_OF_RANGE("value",lt,p)}Pt(g,T,B)}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 $(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 he(p,u){u=u||1/0;let f;const g=p.length;let T=null;const B=[];for(let V=0;V<g;++V){if(f=p.charCodeAt(V),f>55295&&f<57344){if(!T){if(f>56319){(u-=3)>-1&&B.push(239,191,189);continue}else if(V+1===g){(u-=3)>-1&&B.push(239,191,189);continue}T=f;continue}if(f<56320){(u-=3)>-1&&B.push(239,191,189),T=f;continue}f=(T-55296<<10|f-56320)+65536}else T&&(u-=3)>-1&&B.push(239,191,189);if(T=null,f<128){if((u-=1)<0)break;B.push(f)}else if(f<2048){if((u-=2)<0)break;B.push(f>>6|192,f&63|128)}else if(f<65536){if((u-=3)<0)break;B.push(f>>12|224,f>>6&63|128,f&63|128)}else if(f<1114112){if((u-=4)<0)break;B.push(f>>18|240,f>>12&63|128,f>>6&63|128,f&63|128)}else throw new Error("Invalid code point")}return B}function J(p){const u=[];for(let f=0;f<p.length;++f)u.push(p.charCodeAt(f)&255);return u}function gt(p,u){let f,g,T;const B=[];for(let V=0;V<p.length&&!((u-=2)<0);++V)f=p.charCodeAt(V),g=f>>8,T=f%256,B.push(T),B.push(g);return B}function St(p){return e.toByteArray($(p))}function k(p,u,f,g){let T;for(T=0;T<g&&!(T+f>=u.length||T>=p.length);++T)u[T+f]=p[T];return T}function I(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 T=0;T<16;++T)u[g+T]=p[f]+p[T]}return u}();function Q(p){return typeof BigInt>"u"?ct:p}function ct(){throw new Error("BigInt not supported")}})(I1);const ha=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,n)=>n(e,0),Ei=fe.WebSocket||fe.MozWebSocket,Hh=!0,V1="arraybuffer",Gh=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class $1 extends la{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?{}:Dh(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=Hh&&!Gh?n?new Ei(e,n):new Ei(e):new Ei(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;oa(r,this.supportsBinary,o=>{const s={};try{Hh&&this.ws.send(o)}catch{}i&&ha(()=>{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]=$h()),this.supportsBinary||(n.b64=1),this.createUri(e,n)}check(){return!!Ei}}class U1 extends la{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=y1(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=e.readable.pipeThrough(n).getReader(),i=m1();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&&ha(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this.transport)===null||e===void 0||e.close()}}const z1={websocket:$1,webtransport:U1,polling:C1},q1=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,W1=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function pa(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=q1.exec(t||""),o={},s=14;for(;s--;)o[W1[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=H1(o,o.path),o.queryKey=G1(o,o.query),o}function H1(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 G1(t,e){const n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}let Kh=class jn extends Ut{constructor(e,n={}){super(),this.binaryType=V1,this.writeBuffer=[],e&&typeof e=="object"&&(n=e,e=null),e?(e=pa(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=pa(n.host).host),_i(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=E1(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=Bh,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 z1[e](r)}open(){let e;if(this.opts.rememberUpgrade&&jn.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;jn.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;jn.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",jn.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+=_1(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){jn.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}};Kh.protocol=Bh;function K1(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=pa(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 Y1=typeof ArrayBuffer=="function",X1=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,Yh=Object.prototype.toString,J1=typeof Blob=="function"||typeof Blob<"u"&&Yh.call(Blob)==="[object BlobConstructor]",Z1=typeof File=="function"||typeof File<"u"&&Yh.call(File)==="[object FileConstructor]";function ma(t){return Y1&&(t instanceof ArrayBuffer||X1(t))||J1&&t instanceof Blob||Z1&&t instanceof File}function Ai(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let n=0,r=t.length;n<r;n++)if(Ai(t[n]))return!0;return!1}if(ma(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return Ai(t.toJSON(),!0);for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&Ai(t[n]))return!0;return!1}function Q1(t){const e=[],n=t.data,r=t;return r.data=ya(n,e),r.attachments=e.length,{packet:r,buffers:e}}function ya(t,e){if(!t)return t;if(ma(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]=ya(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]=ya(t[r],e));return n}return t}function tx(t,e){return t.data=ga(t.data,e),delete t.attachments,t}function ga(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]=ga(t[n],e);else if(typeof t=="object")for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(t[n]=ga(t[n],e));return t}const ex=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],nx=5;var mt;(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"})(mt||(mt={}));class rx{constructor(e){this.replacer=e}encode(e){return(e.type===mt.EVENT||e.type===mt.ACK)&&Ai(e)?this.encodeAsBinary({type:e.type===mt.EVENT?mt.BINARY_EVENT:mt.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let n=""+e.type;return(e.type===mt.BINARY_EVENT||e.type===mt.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=Q1(e),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function Xh(t){return Object.prototype.toString.call(t)==="[object Object]"}class va extends Ut{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===mt.BINARY_EVENT;r||n.type===mt.BINARY_ACK?(n.type=r?mt.EVENT:mt.ACK,this.reconstructor=new ix(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(ma(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(mt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===mt.BINARY_EVENT||r.type===mt.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(va.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 mt.CONNECT:return Xh(n);case mt.DISCONNECT:return n===void 0;case mt.CONNECT_ERROR:return typeof n=="string"||Xh(n);case mt.EVENT:case mt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&ex.indexOf(n[0])===-1);case mt.ACK:case mt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class ix{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=tx(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const ox=Object.freeze(Object.defineProperty({__proto__:null,Decoder:va,Encoder:rx,get PacketType(){return mt},protocol:nx},Symbol.toStringTag,{value:"Module"}));function ve(t,e,n){return t.on(e,n),function(){t.off(e,n)}}const sx=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Jh extends Ut{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=[ve(e,"open",this.onopen.bind(this)),ve(e,"packet",this.onpacket.bind(this)),ve(e,"error",this.onerror.bind(this)),ve(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(sx.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:mt.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:mt.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 mt.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 mt.EVENT:case mt.BINARY_EVENT:this.onevent(e);break;case mt.ACK:case mt.BINARY_ACK:this.onack(e);break;case mt.DISCONNECT:this.ondisconnect();break;case mt.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:mt.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:mt.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 In(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}In.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},In.prototype.reset=function(){this.attempts=0},In.prototype.setMin=function(t){this.ms=t},In.prototype.setMax=function(t){this.max=t},In.prototype.setJitter=function(t){this.jitter=t};class ba extends Ut{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,_i(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 In({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||ox;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 Kh(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=ve(n,"open",function(){r.onopen(),e&&e()}),o=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},s=ve(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(ve(e,"ping",this.onping.bind(this)),ve(e,"data",this.ondata.bind(this)),ve(e,"error",this.onerror.bind(this)),ve(e,"close",this.onclose.bind(this)),ve(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){ha(()=>{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 Jh(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 xr={};function Ti(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const n=K1(t,e.path||"/socket.io"),r=n.source,i=n.id,o=n.path,s=xr[i]&&o in xr[i].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||s;let l;return a?l=new ba(r,e):(xr[i]||(xr[i]=new ba(r,e)),l=xr[i]),n.query&&!e.query&&(e.query=n.queryKey),l.socket(n.path,e)}Object.assign(Ti,{Manager:ba,Socket:Jh,io:Ti,connect:Ti});function ax(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Zh={exports:{}},Ft=Zh.exports={},Ae,Te;function wa(){throw new Error("setTimeout has not been defined")}function _a(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Ae=setTimeout:Ae=wa}catch{Ae=wa}try{typeof clearTimeout=="function"?Te=clearTimeout:Te=_a}catch{Te=_a}})();function Qh(t){if(Ae===setTimeout)return setTimeout(t,0);if((Ae===wa||!Ae)&&setTimeout)return Ae=setTimeout,setTimeout(t,0);try{return Ae(t,0)}catch{try{return Ae.call(null,t,0)}catch{return Ae.call(this,t,0)}}}function cx(t){if(Te===clearTimeout)return clearTimeout(t);if((Te===_a||!Te)&&clearTimeout)return Te=clearTimeout,clearTimeout(t);try{return Te(t)}catch{try{return Te.call(null,t)}catch{return Te.call(this,t)}}}var Be=[],Rn=!1,on,Pi=-1;function lx(){!Rn||!on||(Rn=!1,on.length?Be=on.concat(Be):Pi=-1,Be.length&&tp())}function tp(){if(!Rn){var t=Qh(lx);Rn=!0;for(var e=Be.length;e;){for(on=Be,Be=[];++Pi<e;)on&&on[Pi].run();Pi=-1,e=Be.length}on=null,Rn=!1,cx(t)}}Ft.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];Be.push(new ep(t,e)),Be.length===1&&!Rn&&Qh(tp)};function ep(t,e){this.fun=t,this.array=e}ep.prototype.run=function(){this.fun.apply(null,this.array)},Ft.title="browser",Ft.browser=!0,Ft.env={},Ft.argv=[],Ft.version="",Ft.versions={};function De(){}Ft.on=De,Ft.addListener=De,Ft.once=De,Ft.off=De,Ft.removeListener=De,Ft.removeAllListeners=De,Ft.emit=De,Ft.prependListener=De,Ft.prependOnceListener=De,Ft.listeners=function(t){return[]},Ft.binding=function(t){throw new Error("process.binding is not supported")},Ft.cwd=function(){return"/"},Ft.chdir=function(t){throw new Error("process.chdir is not supported")},Ft.umask=function(){return 0};var ux=Zh.exports;const zt=ax(ux);var sn={},np={},xa=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},fx=xa,Sa=function(){return fx()&&!!Symbol.toStringTag},rp=Object,dx=Error,hx=EvalError,px=RangeError,mx=ReferenceError,ip=SyntaxError,ki=TypeError,yx=URIError,gx=Math.abs,vx=Math.floor,bx=Math.max,wx=Math.min,_x=Math.pow,xx=Object.getOwnPropertyDescriptor,Oi=xx;if(Oi)try{Oi([],"length")}catch{Oi=null}var Sr=Oi,Ci=Object.defineProperty||!1;if(Ci)try{Ci({},"a",{value:1})}catch{Ci=!1}var Ii=Ci,Ea,op;function Sx(){if(op)return Ea;op=1;var t=typeof Symbol<"u"&&Symbol,e=xa;return Ea=function(){return typeof t!="function"||typeof Symbol!="function"||typeof t("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},Ea}var Aa,sp;function Ex(){if(sp)return Aa;sp=1;var t="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,n=Math.max,r="[object Function]",i=function(l,d){for(var c=[],h=0;h<l.length;h+=1)c[h]=l[h];for(var m=0;m<d.length;m+=1)c[m+l.length]=d[m];return c},o=function(l,d){for(var c=[],h=d,m=0;h<l.length;h+=1,m+=1)c[m]=l[h];return c},s=function(a,l){for(var d="",c=0;c<a.length;c+=1)d+=a[c],c+1<a.length&&(d+=l);return d};return Aa=function(l){var d=this;if(typeof d!="function"||e.apply(d)!==r)throw new TypeError(t+d);for(var c=o(arguments,1),h,m=function(){if(this instanceof h){var x=d.apply(this,i(c,arguments));return Object(x)===x?x:this}return d.apply(l,i(c,arguments))},y=n(0,d.length-c.length),_=[],b=0;b<y;b++)_[b]="$"+b;if(h=Function("binder","return function ("+s(_,",")+"){ return binder.apply(this,arguments); }")(m),d.prototype){var P=function(){};P.prototype=d.prototype,h.prototype=new P,P.prototype=null}return h},Aa}var Ta,ap;function Er(){if(ap)return Ta;ap=1;var t=Ex();return Ta=Function.prototype.bind||t,Ta}var Pa,cp;function ka(){return cp||(cp=1,Pa=Function.prototype.call),Pa}var Oa,lp;function Ca(){return lp||(lp=1,Oa=Function.prototype.apply),Oa}var Ax=typeof Reflect<"u"&&Reflect&&Reflect.apply,Tx=Er(),Px=Ca(),kx=ka(),Ox=Ax,up=Ox||Tx.call(kx,Px),Cx=Er(),Ix=ki,Rx=ka(),Mx=up,Ia=function(e){if(e.length<1||typeof e[0]!="function")throw new Ix("a function is required");return Mx(Cx,Rx,e)},Ra,fp;function Nx(){if(fp)return Ra;fp=1;var t=Ia,e=Sr,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 Ra=r&&typeof r.get=="function"?t([r.get]):typeof o=="function"?function(a){return o(a==null?a:i(a))}:!1,Ra}var Ma,dp;function Bx(){if(dp)return Ma;dp=1;var t=Function.prototype.call,e=Object.prototype.hasOwnProperty,n=Er();return Ma=n.call(t,e),Ma}var pt,hp=rp,Dx=dx,Fx=hx,Lx=px,jx=mx,Mn=ip,Nn=ki,Vx=yx,$x=gx,Ux=vx,zx=bx,qx=wx,Wx=_x,pp=Function,Na=function(t){try{return pp('"use strict"; return ('+t+").constructor;")()}catch{}},Ar=Sr,Hx=Ii,Ba=function(){throw new Nn},Gx=Ar?function(){try{return arguments.callee,Ba}catch{try{return Ar(arguments,"callee").get}catch{return Ba}}}():Ba,Bn=Sx()(),Kx=Nx(),Kt=typeof Reflect=="function"&&Reflect.getPrototypeOf||hp.getPrototypeOf||Kx,mp=Ca(),Tr=ka(),Dn={},Yx=typeof Uint8Array>"u"||!Kt?pt:Kt(Uint8Array),an={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?pt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?pt:ArrayBuffer,"%ArrayIteratorPrototype%":Bn&&Kt?Kt([][Symbol.iterator]()):pt,"%AsyncFromSyncIteratorPrototype%":pt,"%AsyncFunction%":Dn,"%AsyncGenerator%":Dn,"%AsyncGeneratorFunction%":Dn,"%AsyncIteratorPrototype%":Dn,"%Atomics%":typeof Atomics>"u"?pt:Atomics,"%BigInt%":typeof BigInt>"u"?pt:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?pt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?pt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?pt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Dx,"%eval%":eval,"%EvalError%":Fx,"%Float32Array%":typeof Float32Array>"u"?pt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?pt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?pt:FinalizationRegistry,"%Function%":pp,"%GeneratorFunction%":Dn,"%Int8Array%":typeof Int8Array>"u"?pt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?pt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?pt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Bn&&Kt?Kt(Kt([][Symbol.iterator]())):pt,"%JSON%":typeof JSON=="object"?JSON:pt,"%Map%":typeof Map>"u"?pt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Bn||!Kt?pt:Kt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":hp,"%Object.getOwnPropertyDescriptor%":Ar,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?pt:Promise,"%Proxy%":typeof Proxy>"u"?pt:Proxy,"%RangeError%":Lx,"%ReferenceError%":jx,"%Reflect%":typeof Reflect>"u"?pt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?pt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Bn||!Kt?pt:Kt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?pt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Bn&&Kt?Kt(""[Symbol.iterator]()):pt,"%Symbol%":Bn?Symbol:pt,"%SyntaxError%":Mn,"%ThrowTypeError%":Gx,"%TypedArray%":Yx,"%TypeError%":Nn,"%Uint8Array%":typeof Uint8Array>"u"?pt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?pt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?pt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?pt:Uint32Array,"%URIError%":Vx,"%WeakMap%":typeof WeakMap>"u"?pt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?pt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?pt:WeakSet,"%Function.prototype.call%":Tr,"%Function.prototype.apply%":mp,"%Object.defineProperty%":Hx,"%Math.abs%":$x,"%Math.floor%":Ux,"%Math.max%":zx,"%Math.min%":qx,"%Math.pow%":Wx};if(Kt)try{null.error}catch(t){var Xx=Kt(Kt(t));an["%Error.prototype%"]=Xx}var Jx=function t(e){var n;if(e==="%AsyncFunction%")n=Na("async function () {}");else if(e==="%GeneratorFunction%")n=Na("function* () {}");else if(e==="%AsyncGeneratorFunction%")n=Na("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 an[e]=n,n},yp={__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"]},Pr=Er(),Ri=Bx(),Zx=Pr.call(Tr,Array.prototype.concat),Qx=Pr.call(mp,Array.prototype.splice),gp=Pr.call(Tr,String.prototype.replace),Mi=Pr.call(Tr,String.prototype.slice),tS=Pr.call(Tr,RegExp.prototype.exec),eS=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,nS=/\\(\\)?/g,rS=function(e){var n=Mi(e,0,1),r=Mi(e,-1);if(n==="%"&&r!=="%")throw new Mn("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Mn("invalid intrinsic syntax, expected opening `%`");var i=[];return gp(e,eS,function(o,s,a,l){i[i.length]=a?gp(l,nS,"$1"):s||o}),i},iS=function(e,n){var r=e,i;if(Ri(yp,r)&&(i=yp[r],r="%"+i[0]+"%"),Ri(an,r)){var o=an[r];if(o===Dn&&(o=Jx(r)),typeof o>"u"&&!n)throw new Nn("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:o}}throw new Mn("intrinsic "+e+" does not exist!")},Da=function(e,n){if(typeof e!="string"||e.length===0)throw new Nn("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Nn('"allowMissing" argument must be a boolean');if(tS(/^%?[^%]*%?$/,e)===null)throw new Mn("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=rS(e),i=r.length>0?r[0]:"",o=iS("%"+i+"%",n),s=o.name,a=o.value,l=!1,d=o.alias;d&&(i=d[0],Qx(r,Zx([0,1],d)));for(var c=1,h=!0;c<r.length;c+=1){var m=r[c],y=Mi(m,0,1),_=Mi(m,-1);if((y==='"'||y==="'"||y==="`"||_==='"'||_==="'"||_==="`")&&y!==_)throw new Mn("property names with quotes must have matching quotes");if((m==="constructor"||!h)&&(l=!0),i+="."+m,s="%"+i+"%",Ri(an,s))a=an[s];else if(a!=null){if(!(m in a)){if(!n)throw new Nn("base intrinsic for "+e+" exists, but the property is not available.");return}if(Ar&&c+1>=r.length){var b=Ar(a,m);h=!!b,h&&"get"in b&&!("originalValue"in b.get)?a=b.get:a=a[m]}else h=Ri(a,m),a=a[m];h&&!l&&(an[s]=a)}}return a},vp=Da,bp=Ia,oS=bp([vp("%String.prototype.indexOf%")]),Fa=function(e,n){var r=vp(e,!!n);return typeof r=="function"&&oS(e,".prototype.")>-1?bp([r]):r},sS=Sa(),aS=Fa,La=aS("Object.prototype.toString"),Ni=function(e){return sS&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:La(e)==="[object Arguments]"},wp=function(e){return Ni(e)?!0:e!==null&&typeof e=="object"&&"length"in e&&typeof e.length=="number"&&e.length>=0&&La(e)!=="[object Array]"&&"callee"in e&&La(e.callee)==="[object Function]"},cS=function(){return Ni(arguments)}();Ni.isLegacyArguments=wp;var lS=cS?Ni:wp,uS=Object.prototype.toString,fS=Function.prototype.toString,dS=/^\s*(?:function)?\*/,_p=Sa(),ja=Object.getPrototypeOf,hS=function(){if(!_p)return!1;try{return Function("return function*() {}")()}catch{}},Va,pS=function(e){if(typeof e!="function")return!1;if(dS.test(fS.call(e)))return!0;if(!_p){var n=uS.call(e);return n==="[object GeneratorFunction]"}if(!ja)return!1;if(typeof Va>"u"){var r=hS();Va=r?ja(r):!1}return ja(e)===Va},xp=Function.prototype.toString,Fn=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,$a,Bi;if(typeof Fn=="function"&&typeof Object.defineProperty=="function")try{$a=Object.defineProperty({},"length",{get:function(){throw Bi}}),Bi={},Fn(function(){throw 42},null,$a)}catch(t){t!==Bi&&(Fn=null)}else Fn=null;var mS=/^\s*class\b/,Ua=function(e){try{var n=xp.call(e);return mS.test(n)}catch{return!1}},za=function(e){try{return Ua(e)?!1:(xp.call(e),!0)}catch{return!1}},Di=Object.prototype.toString,yS="[object Object]",gS="[object Function]",vS="[object GeneratorFunction]",bS="[object HTMLAllCollection]",wS="[object HTML document.all class]",_S="[object HTMLCollection]",xS=typeof Symbol=="function"&&!!Symbol.toStringTag,SS=!(0 in[,]),qa=function(){return!1};if(typeof document=="object"){var ES=document.all;Di.call(ES)===Di.call(document.all)&&(qa=function(e){if((SS||!e)&&(typeof e>"u"||typeof e=="object"))try{var n=Di.call(e);return(n===bS||n===wS||n===_S||n===yS)&&e("")==null}catch{}return!1})}var AS=Fn?function(e){if(qa(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{Fn(e,null,$a)}catch(n){if(n!==Bi)return!1}return!Ua(e)&&za(e)}:function(e){if(qa(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(xS)return za(e);if(Ua(e))return!1;var n=Di.call(e);return n!==gS&&n!==vS&&!/^\[object HTML/.test(n)?!1:za(e)},TS=AS,PS=Object.prototype.toString,Sp=Object.prototype.hasOwnProperty,kS=function(e,n,r){for(var i=0,o=e.length;i<o;i++)Sp.call(e,i)&&(r==null?n(e[i],i,e):n.call(r,e[i],i,e))},OS=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)},CS=function(e,n,r){for(var i in e)Sp.call(e,i)&&(r==null?n(e[i],i,e):n.call(r,e[i],i,e))},IS=function(e,n,r){if(!TS(n))throw new TypeError("iterator must be a function");var i;arguments.length>=3&&(i=r),PS.call(e)==="[object Array]"?kS(e,n,i):typeof e=="string"?OS(e,n,i):CS(e,n,i)},RS=IS,MS=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"],Wa=MS,NS=typeof globalThis>"u"?fr:globalThis,BS=function(){for(var e=[],n=0;n<Wa.length;n++)typeof NS[Wa[n]]=="function"&&(e[e.length]=Wa[n]);return e},Ep={exports:{}},Ap=Ii,DS=ip,Ln=ki,Tp=Sr,Pp=function(e,n,r){if(!e||typeof e!="object"&&typeof e!="function")throw new Ln("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new Ln("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Ln("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Ln("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Ln("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Ln("`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=!!Tp&&Tp(e,n);if(Ap)Ap(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 DS("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Ha=Ii,kp=function(){return!!Ha};kp.hasArrayLengthDefineBug=function(){if(!Ha)return null;try{return Ha([],"length",{value:1}).length!==1}catch{return!0}};var Op=kp,FS=Da,Cp=Pp,LS=Op(),Ip=Sr,Rp=ki,jS=FS("%Math.floor%"),VS=function(e,n){if(typeof e!="function")throw new Rp("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||jS(n)!==n)throw new Rp("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],i=!0,o=!0;if("length"in e&&Ip){var s=Ip(e,"length");s&&!s.configurable&&(i=!1),s&&!s.writable&&(o=!1)}return(i||o||!r)&&(LS?Cp(e,"length",n,!0,!0):Cp(e,"length",n)),e},$S=Er(),US=Ca(),zS=up,qS=function(){return zS($S,US,arguments)};(function(t){var e=VS,n=Ii,r=Ia,i=qS;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})(Ep);var Fi=Ep.exports,Li=RS,WS=BS,Mp=Fi,Ga=Fa,ji=Sr,HS=Ga("Object.prototype.toString"),Np=Sa(),Bp=typeof globalThis>"u"?fr:globalThis,Ka=WS(),Ya=Ga("String.prototype.slice"),Xa=Object.getPrototypeOf,GS=Ga("Array.prototype.indexOf",!0)||function(e,n){for(var r=0;r<e.length;r+=1)if(e[r]===n)return r;return-1},Vi={__proto__:null};Np&&ji&&Xa?Li(Ka,function(t){var e=new Bp[t];if(Symbol.toStringTag in e){var n=Xa(e),r=ji(n,Symbol.toStringTag);if(!r){var i=Xa(n);r=ji(i,Symbol.toStringTag)}Vi["$"+t]=Mp(r.get)}}):Li(Ka,function(t){var e=new Bp[t],n=e.slice||e.set;n&&(Vi["$"+t]=Mp(n))});var KS=function(e){var n=!1;return Li(Vi,function(r,i){if(!n)try{"$"+r(e)===i&&(n=Ya(i,1))}catch{}}),n},YS=function(e){var n=!1;return Li(Vi,function(r,i){if(!n)try{r(e),n=Ya(i,1)}catch{}}),n},Dp=function(e){if(!e||typeof e!="object")return!1;if(!Np){var n=Ya(HS(e),8,-1);return GS(Ka,n)>-1?n:n!=="Object"?!1:YS(e)}return ji?KS(e):null},XS=Dp,JS=function(e){return!!XS(e)};(function(t){var e=lS,n=pS,r=Dp,i=JS;function o($){return $.call.bind($)}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 _($,he){if(typeof $!="object")return!1;try{return he($),!0}catch{return!1}}t.isArgumentsObject=e,t.isGeneratorFunction=n,t.isTypedArray=i;function b($){return typeof Promise<"u"&&$ instanceof Promise||$!==null&&typeof $=="object"&&typeof $.then=="function"&&typeof $.catch=="function"}t.isPromise=b;function P($){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView($):i($)||N($)}t.isArrayBufferView=P;function x($){return r($)==="Uint8Array"}t.isUint8Array=x;function v($){return r($)==="Uint8ClampedArray"}t.isUint8ClampedArray=v;function S($){return r($)==="Uint16Array"}t.isUint16Array=S;function R($){return r($)==="Uint32Array"}t.isUint32Array=R;function O($){return r($)==="Int8Array"}t.isInt8Array=O;function D($){return r($)==="Int16Array"}t.isInt16Array=D;function F($){return r($)==="Int32Array"}t.isInt32Array=F;function q($){return r($)==="Float32Array"}t.isFloat32Array=q;function L($){return r($)==="Float64Array"}t.isFloat64Array=L;function Y($){return r($)==="BigInt64Array"}t.isBigInt64Array=Y;function Z($){return r($)==="BigUint64Array"}t.isBigUint64Array=Z;function et($){return l($)==="[object Map]"}et.working=typeof Map<"u"&&et(new Map);function st($){return typeof Map>"u"?!1:et.working?et($):$ instanceof Map}t.isMap=st;function At($){return l($)==="[object Set]"}At.working=typeof Set<"u"&&At(new Set);function dt($){return typeof Set>"u"?!1:At.working?At($):$ instanceof Set}t.isSet=dt;function It($){return l($)==="[object WeakMap]"}It.working=typeof WeakMap<"u"&&It(new WeakMap);function at($){return typeof WeakMap>"u"?!1:It.working?It($):$ instanceof WeakMap}t.isWeakMap=at;function ht($){return l($)==="[object WeakSet]"}ht.working=typeof WeakSet<"u"&&ht(new WeakSet);function U($){return ht($)}t.isWeakSet=U;function H($){return l($)==="[object ArrayBuffer]"}H.working=typeof ArrayBuffer<"u"&&H(new ArrayBuffer);function G($){return typeof ArrayBuffer>"u"?!1:H.working?H($):$ instanceof ArrayBuffer}t.isArrayBuffer=G;function E($){return l($)==="[object DataView]"}E.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&E(new DataView(new ArrayBuffer(1),0,1));function N($){return typeof DataView>"u"?!1:E.working?E($):$ instanceof DataView}t.isDataView=N;var w=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function A($){return l($)==="[object SharedArrayBuffer]"}function C($){return typeof w>"u"?!1:(typeof A.working>"u"&&(A.working=A(new w)),A.working?A($):$ instanceof w)}t.isSharedArrayBuffer=C;function z($){return l($)==="[object AsyncFunction]"}t.isAsyncFunction=z;function j($){return l($)==="[object Map Iterator]"}t.isMapIterator=j;function W($){return l($)==="[object Set Iterator]"}t.isSetIterator=W;function K($){return l($)==="[object Generator]"}t.isGeneratorObject=K;function rt($){return l($)==="[object WebAssembly.Module]"}t.isWebAssemblyCompiledModule=rt;function ft($){return _($,d)}t.isNumberObject=ft;function vt($){return _($,c)}t.isStringObject=vt;function Pt($){return _($,h)}t.isBooleanObject=Pt;function Lt($){return s&&_($,m)}t.isBigIntObject=Lt;function Yt($){return a&&_($,y)}t.isSymbolObject=Yt;function Jt($){return ft($)||vt($)||Pt($)||Lt($)||Yt($)}t.isBoxedPrimitive=Jt;function qt($){return typeof Uint8Array<"u"&&(G($)||C($))}t.isAnyArrayBuffer=qt,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function($){Object.defineProperty(t,$,{enumerable:!1,value:function(){throw new Error($+" is not supported in userland")}})})})(np);var ZS=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"},Ja={exports:{}};typeof Object.create=="function"?Ja.exports=function(e,n){n&&(e.super_=n,e.prototype=Object.create(n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Ja.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 QS=Ja.exports;(function(t){var e=Object.getOwnPropertyDescriptors||function(N){for(var w=Object.keys(N),A={},C=0;C<w.length;C++)A[w[C]]=Object.getOwnPropertyDescriptor(N,w[C]);return A},n=/%[sdj%]/g;t.format=function(E){if(!O(E)){for(var N=[],w=0;w<arguments.length;w++)N.push(s(arguments[w]));return N.join(" ")}for(var w=1,A=arguments,C=A.length,z=String(E).replace(n,function(W){if(W==="%%")return"%";if(w>=C)return W;switch(W){case"%s":return String(A[w++]);case"%d":return Number(A[w++]);case"%j":try{return JSON.stringify(A[w++])}catch{return"[Circular]"}default:return W}}),j=A[w];w<C;j=A[++w])v(j)||!L(j)?z+=" "+j:z+=" "+s(j);return z},t.deprecate=function(E,N){if(typeof zt<"u"&&zt.noDeprecation===!0)return E;if(typeof zt>"u")return function(){return t.deprecate(E,N).apply(this,arguments)};var w=!1;function A(){if(!w){if(zt.throwDeprecation)throw new Error(N);zt.traceDeprecation?console.trace(N):console.error(N),w=!0}return E.apply(this,arguments)}return A};var r={},i=/^$/;if(zt.env.NODE_DEBUG){var o=zt.env.NODE_DEBUG;o=o.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),i=new RegExp("^"+o+"$","i")}t.debuglog=function(E){if(E=E.toUpperCase(),!r[E])if(i.test(E)){var N=zt.pid;r[E]=function(){var w=t.format.apply(t,arguments);console.error("%s %d: %s",E,N,w)}}else r[E]=function(){};return r[E]};function s(E,N){var w={seen:[],stylize:l};return arguments.length>=3&&(w.depth=arguments[2]),arguments.length>=4&&(w.colors=arguments[3]),x(N)?w.showHidden=N:N&&t._extend(w,N),F(w.showHidden)&&(w.showHidden=!1),F(w.depth)&&(w.depth=2),F(w.colors)&&(w.colors=!1),F(w.customInspect)&&(w.customInspect=!0),w.colors&&(w.stylize=a),c(w,E,w.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(E,N){var w=s.styles[N];return w?"\x1B["+s.colors[w][0]+"m"+E+"\x1B["+s.colors[w][1]+"m":E}function l(E,N){return E}function d(E){var N={};return E.forEach(function(w,A){N[w]=!0}),N}function c(E,N,w){if(E.customInspect&&N&&et(N.inspect)&&N.inspect!==t.inspect&&!(N.constructor&&N.constructor.prototype===N)){var A=N.inspect(w,E);return O(A)||(A=c(E,A,w)),A}var C=h(E,N);if(C)return C;var z=Object.keys(N),j=d(z);if(E.showHidden&&(z=Object.getOwnPropertyNames(N)),Z(N)&&(z.indexOf("message")>=0||z.indexOf("description")>=0))return m(N);if(z.length===0){if(et(N)){var W=N.name?": "+N.name:"";return E.stylize("[Function"+W+"]","special")}if(q(N))return E.stylize(RegExp.prototype.toString.call(N),"regexp");if(Y(N))return E.stylize(Date.prototype.toString.call(N),"date");if(Z(N))return m(N)}var K="",rt=!1,ft=["{","}"];if(P(N)&&(rt=!0,ft=["[","]"]),et(N)){var vt=N.name?": "+N.name:"";K=" [Function"+vt+"]"}if(q(N)&&(K=" "+RegExp.prototype.toString.call(N)),Y(N)&&(K=" "+Date.prototype.toUTCString.call(N)),Z(N)&&(K=" "+m(N)),z.length===0&&(!rt||N.length==0))return ft[0]+K+ft[1];if(w<0)return q(N)?E.stylize(RegExp.prototype.toString.call(N),"regexp"):E.stylize("[Object]","special");E.seen.push(N);var Pt;return rt?Pt=y(E,N,w,j,z):Pt=z.map(function(Lt){return _(E,N,w,j,Lt,rt)}),E.seen.pop(),b(Pt,K,ft)}function h(E,N){if(F(N))return E.stylize("undefined","undefined");if(O(N)){var w="'"+JSON.stringify(N).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return E.stylize(w,"string")}if(R(N))return E.stylize(""+N,"number");if(x(N))return E.stylize(""+N,"boolean");if(v(N))return E.stylize("null","null")}function m(E){return"["+Error.prototype.toString.call(E)+"]"}function y(E,N,w,A,C){for(var z=[],j=0,W=N.length;j<W;++j)ht(N,String(j))?z.push(_(E,N,w,A,String(j),!0)):z.push("");return C.forEach(function(K){K.match(/^\d+$/)||z.push(_(E,N,w,A,K,!0))}),z}function _(E,N,w,A,C,z){var j,W,K;if(K=Object.getOwnPropertyDescriptor(N,C)||{value:N[C]},K.get?K.set?W=E.stylize("[Getter/Setter]","special"):W=E.stylize("[Getter]","special"):K.set&&(W=E.stylize("[Setter]","special")),ht(A,C)||(j="["+C+"]"),W||(E.seen.indexOf(K.value)<0?(v(w)?W=c(E,K.value,null):W=c(E,K.value,w-1),W.indexOf(`
101
+ `)>-1&&(z?W=W.split(`
102
102
  `).map(function(rt){return" "+rt}).join(`
103
- `).slice(2):q=`
104
- `+q.split(`
103
+ `).slice(2):W=`
104
+ `+W.split(`
105
105
  `).map(function(rt){return" "+rt}).join(`
106
- `))):q=E.stylize("[Circular]","special")),L(j)){if(z&&C.match(/^\d+$/))return q;j=JSON.stringify(""+C),j.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(j=j.slice(1,-1),j=E.stylize(j,"name")):(j=j.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),j=E.stylize(j,"string"))}return j+": "+q}function w(E,N,b){var A=E.reduce(function(C,z){return z.indexOf(`
107
- `)>=0,C+z.replace(/\u001b\[\d\d?m/g,"").length+1},0);return A>60?b[0]+(N===""?"":N+`
106
+ `))):W=E.stylize("[Circular]","special")),F(j)){if(z&&C.match(/^\d+$/))return W;j=JSON.stringify(""+C),j.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(j=j.slice(1,-1),j=E.stylize(j,"name")):(j=j.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),j=E.stylize(j,"string"))}return j+": "+W}function b(E,N,w){var A=E.reduce(function(C,z){return z.indexOf(`
107
+ `)>=0,C+z.replace(/\u001b\[\d\d?m/g,"").length+1},0);return A>60?w[0]+(N===""?"":N+`
108
108
  `)+" "+E.join(`,
109
- `)+" "+b[1]:b[0]+N+" "+E.join(", ")+" "+b[1]}t.types=Zh;function k(E){return Array.isArray(E)}t.isArray=k;function x(E){return typeof E=="boolean"}t.isBoolean=x;function v(E){return E===null}t.isNull=v;function S(E){return E==null}t.isNullOrUndefined=S;function R(E){return typeof E=="number"}t.isNumber=R;function O(E){return typeof E=="string"}t.isString=O;function B(E){return typeof E=="symbol"}t.isSymbol=B;function L(E){return E===void 0}t.isUndefined=L;function W(E){return F(E)&&At(E)==="[object RegExp]"}t.isRegExp=W,t.types.isRegExp=W;function F(E){return typeof E=="object"&&E!==null}t.isObject=F;function Y(E){return F(E)&&At(E)==="[object Date]"}t.isDate=Y,t.types.isDate=Y;function Z(E){return F(E)&&(At(E)==="[object Error]"||E instanceof Error)}t.isError=Z,t.types.isNativeError=Z;function et(E){return typeof E=="function"}t.isFunction=et;function st(E){return E===null||typeof E=="boolean"||typeof E=="number"||typeof E=="string"||typeof E=="symbol"||typeof E>"u"}t.isPrimitive=st,t.isBuffer=ZS;function At(E){return Object.prototype.toString.call(E)}function dt(E){return E<10?"0"+E.toString(10):E.toString(10)}var It=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function at(){var E=new Date,N=[dt(E.getHours()),dt(E.getMinutes()),dt(E.getSeconds())].join(":");return[E.getDate(),It[E.getMonth()],N].join(" ")}t.log=function(){console.log("%s - %s",at(),t.format.apply(t,arguments))},t.inherits=QS,t._extend=function(E,N){if(!N||!F(N))return E;for(var b=Object.keys(N),A=b.length;A--;)E[b[A]]=N[b[A]];return E};function ht(E,N){return Object.prototype.hasOwnProperty.call(E,N)}var U=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(U&&N[U]){var b=N[U];if(typeof b!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(b,U,{value:b,enumerable:!1,writable:!1,configurable:!0}),b}function b(){for(var A,C,z=new Promise(function(K,rt){A=K,C=rt}),j=[],q=0;q<arguments.length;q++)j.push(arguments[q]);j.push(function(K,rt){K?C(K):A(rt)});try{N.apply(this,j)}catch(K){C(K)}return z}return Object.setPrototypeOf(b,Object.getPrototypeOf(N)),U&&Object.defineProperty(b,U,{value:b,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(b,e(N))},t.promisify.custom=U;function H(E,N){if(!E){var b=new Error("Promise was rejected with a falsy value");b.reason=E,E=b}return N(E)}function G(E){if(typeof E!="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 C=b.pop();if(typeof C!="function")throw new TypeError("The last argument must be of type Function");var z=this,j=function(){return C.apply(z,arguments)};E.apply(this,b).then(function(q){zt.nextTick(j.bind(null,null,q))},function(q){zt.nextTick(H.bind(null,q,j))})}return Object.setPrototypeOf(N,Object.getPrototypeOf(E)),Object.defineProperties(N,e(E)),N}t.callbackify=G})(sn);var Ya={exports:{}},Xa={},Cp;function Ip(){if(Cp)return Xa;Cp=1;function t(v){"@babel/helpers - typeof";return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(S){return typeof S}:function(S){return S&&typeof Symbol=="function"&&S.constructor===Symbol&&S!==Symbol.prototype?"symbol":typeof S},t(v)}function e(v,S,R){return Object.defineProperty(v,"prototype",{writable:!1}),v}function n(v,S){if(!(v instanceof S))throw new TypeError("Cannot call a class as a function")}function r(v,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function");v.prototype=Object.create(S&&S.prototype,{constructor:{value:v,writable:!0,configurable:!0}}),Object.defineProperty(v,"prototype",{writable:!1}),S&&i(v,S)}function i(v,S){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(O,B){return O.__proto__=B,O},i(v,S)}function o(v){var S=l();return function(){var O=d(v),B;if(S){var L=d(this).constructor;B=Reflect.construct(O,arguments,L)}else B=O.apply(this,arguments);return s(this,B)}}function s(v,S){if(S&&(t(S)==="object"||typeof S=="function"))return S;if(S!==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(R){return R.__proto__||Object.getPrototypeOf(R)},d(v)}var c={},h,m;function y(v,S,R){R||(R=Error);function O(L,W,F){return typeof S=="string"?S:S(L,W,F)}var B=function(L){r(F,L);var W=o(F);function F(Y,Z,et){var st;return n(this,F),st=W.call(this,O(Y,Z,et)),st.code=v,st}return e(F)}(R);c[v]=B}function _(v,S){if(Array.isArray(v)){var R=v.length;return v=v.map(function(O){return String(O)}),R>2?"one of ".concat(S," ").concat(v.slice(0,R-1).join(", "),", or ")+v[R-1]:R===2?"one of ".concat(S," ").concat(v[0]," or ").concat(v[1]):"of ".concat(S," ").concat(v[0])}else return"of ".concat(S," ").concat(String(v))}function w(v,S,R){return v.substr(0,S.length)===S}function k(v,S,R){return(R===void 0||R>v.length)&&(R=v.length),v.substring(R-S.length,R)===S}function x(v,S,R){return typeof R!="number"&&(R=0),R+S.length>v.length?!1:v.indexOf(S,R)!==-1}return y("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),y("ERR_INVALID_ARG_TYPE",function(v,S,R){h===void 0&&(h=lc()),h(typeof v=="string","'name' must be a string");var O;typeof S=="string"&&w(S,"not ")?(O="must not be",S=S.replace(/^not /,"")):O="must be";var B;if(k(v," argument"))B="The ".concat(v," ").concat(O," ").concat(_(S,"type"));else{var L=x(v,".")?"property":"argument";B='The "'.concat(v,'" ').concat(L," ").concat(O," ").concat(_(S,"type"))}return B+=". Received type ".concat(t(R)),B},TypeError),y("ERR_INVALID_ARG_VALUE",function(v,S){var R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";m===void 0&&(m=sn);var O=m.inspect(S);return O.length>128&&(O="".concat(O.slice(0,128),"...")),"The argument '".concat(v,"' ").concat(R,". Received ").concat(O)},TypeError),y("ERR_INVALID_RETURN_VALUE",function(v,S,R){var O;return R&&R.constructor&&R.constructor.name?O="instance of ".concat(R.constructor.name):O="type ".concat(t(R)),"Expected ".concat(v,' to be returned from the "').concat(S,'"')+" function but got ".concat(O,".")},TypeError),y("ERR_MISSING_ARGS",function(){for(var v=arguments.length,S=new Array(v),R=0;R<v;R++)S[R]=arguments[R];h===void 0&&(h=lc()),h(S.length>0,"At least one arg needs to be specified");var O="The ",B=S.length;switch(S=S.map(function(L){return'"'.concat(L,'"')}),B){case 1:O+="".concat(S[0]," argument");break;case 2:O+="".concat(S[0]," and ").concat(S[1]," arguments");break;default:O+=S.slice(0,B-1).join(", "),O+=", and ".concat(S[B-1]," arguments");break}return"".concat(O," must be specified")},TypeError),Xa.codes=c,Xa}var Ja,Rp;function tE(){if(Rp)return Ja;Rp=1;function t(U,H){var G=Object.keys(U);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(U);H&&(E=E.filter(function(N){return Object.getOwnPropertyDescriptor(U,N).enumerable})),G.push.apply(G,E)}return G}function e(U){for(var H=1;H<arguments.length;H++){var G=arguments[H]!=null?arguments[H]:{};H%2?t(Object(G),!0).forEach(function(E){n(U,E,G[E])}):Object.getOwnPropertyDescriptors?Object.defineProperties(U,Object.getOwnPropertyDescriptors(G)):t(Object(G)).forEach(function(E){Object.defineProperty(U,E,Object.getOwnPropertyDescriptor(G,E))})}return U}function n(U,H,G){return H=s(H),H in U?Object.defineProperty(U,H,{value:G,enumerable:!0,configurable:!0,writable:!0}):U[H]=G,U}function r(U,H){if(!(U instanceof H))throw new TypeError("Cannot call a class as a function")}function i(U,H){for(var G=0;G<H.length;G++){var E=H[G];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(U,s(E.key),E)}}function o(U,H,G){return H&&i(U.prototype,H),Object.defineProperty(U,"prototype",{writable:!1}),U}function s(U){var H=a(U,"string");return v(H)==="symbol"?H:String(H)}function a(U,H){if(v(U)!=="object"||U===null)return U;var G=U[Symbol.toPrimitive];if(G!==void 0){var E=G.call(U,H||"default");if(v(E)!=="object")return E;throw new TypeError("@@toPrimitive must return a primitive value.")}return(H==="string"?String:Number)(U)}function l(U,H){if(typeof H!="function"&&H!==null)throw new TypeError("Super expression must either be null or a function");U.prototype=Object.create(H&&H.prototype,{constructor:{value:U,writable:!0,configurable:!0}}),Object.defineProperty(U,"prototype",{writable:!1}),H&&k(U,H)}function d(U){var H=_();return function(){var E=x(U),N;if(H){var b=x(this).constructor;N=Reflect.construct(E,arguments,b)}else N=E.apply(this,arguments);return c(this,N)}}function c(U,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(U)}function h(U){if(U===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U}function m(U){var H=typeof Map=="function"?new Map:void 0;return m=function(E){if(E===null||!w(E))return E;if(typeof E!="function")throw new TypeError("Super expression must either be null or a function");if(typeof H<"u"){if(H.has(E))return H.get(E);H.set(E,N)}function N(){return y(E,arguments,x(this).constructor)}return N.prototype=Object.create(E.prototype,{constructor:{value:N,enumerable:!1,writable:!0,configurable:!0}}),k(N,E)},m(U)}function y(U,H,G){return _()?y=Reflect.construct.bind():y=function(N,b,A){var C=[null];C.push.apply(C,b);var z=Function.bind.apply(N,C),j=new z;return A&&k(j,A.prototype),j},y.apply(null,arguments)}function _(){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 w(U){return Function.toString.call(U).indexOf("[native code]")!==-1}function k(U,H){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(E,N){return E.__proto__=N,E},k(U,H)}function x(U){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(G){return G.__proto__||Object.getPrototypeOf(G)},x(U)}function v(U){"@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(U)}var S=sn,R=S.inspect,O=Ip(),B=O.codes.ERR_INVALID_ARG_TYPE;function L(U,H,G){return(G===void 0||G>U.length)&&(G=U.length),U.substring(G-H.length,G)===H}function W(U,H){if(H=Math.floor(H),U.length==0||H==0)return"";var G=U.length*H;for(H=Math.floor(Math.log(H)/Math.log(2));H;)U+=U,H--;return U+=U.substring(0,G-U.length),U}var F="",Y="",Z="",et="",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:"},At=10;function dt(U){var H=Object.keys(U),G=Object.create(Object.getPrototypeOf(U));return H.forEach(function(E){G[E]=U[E]}),Object.defineProperty(G,"message",{value:U.message}),G}function It(U){return R(U,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function at(U,H,G){var E="",N="",b=0,A="",C=!1,z=It(U),j=z.split(`
110
- `),q=It(H).split(`
111
- `),K=0,rt="";if(G==="strictEqual"&&v(U)==="object"&&v(H)==="object"&&U!==null&&H!==null&&(G="strictEqualObject"),j.length===1&&q.length===1&&j[0]!==q[0]){var ft=j[0].length+q[0].length;if(ft<=At){if((v(U)!=="object"||U===null)&&(v(H)!=="object"||H===null)&&(U!==0||H!==0))return"".concat(st[G],`
109
+ `)+" "+w[1]:w[0]+N+" "+E.join(", ")+" "+w[1]}t.types=np;function P(E){return Array.isArray(E)}t.isArray=P;function x(E){return typeof E=="boolean"}t.isBoolean=x;function v(E){return E===null}t.isNull=v;function S(E){return E==null}t.isNullOrUndefined=S;function R(E){return typeof E=="number"}t.isNumber=R;function O(E){return typeof E=="string"}t.isString=O;function D(E){return typeof E=="symbol"}t.isSymbol=D;function F(E){return E===void 0}t.isUndefined=F;function q(E){return L(E)&&At(E)==="[object RegExp]"}t.isRegExp=q,t.types.isRegExp=q;function L(E){return typeof E=="object"&&E!==null}t.isObject=L;function Y(E){return L(E)&&At(E)==="[object Date]"}t.isDate=Y,t.types.isDate=Y;function Z(E){return L(E)&&(At(E)==="[object Error]"||E instanceof Error)}t.isError=Z,t.types.isNativeError=Z;function et(E){return typeof E=="function"}t.isFunction=et;function st(E){return E===null||typeof E=="boolean"||typeof E=="number"||typeof E=="string"||typeof E=="symbol"||typeof E>"u"}t.isPrimitive=st,t.isBuffer=ZS;function At(E){return Object.prototype.toString.call(E)}function dt(E){return E<10?"0"+E.toString(10):E.toString(10)}var It=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function at(){var E=new Date,N=[dt(E.getHours()),dt(E.getMinutes()),dt(E.getSeconds())].join(":");return[E.getDate(),It[E.getMonth()],N].join(" ")}t.log=function(){console.log("%s - %s",at(),t.format.apply(t,arguments))},t.inherits=QS,t._extend=function(E,N){if(!N||!L(N))return E;for(var w=Object.keys(N),A=w.length;A--;)E[w[A]]=N[w[A]];return E};function ht(E,N){return Object.prototype.hasOwnProperty.call(E,N)}var U=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(U&&N[U]){var w=N[U];if(typeof w!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(w,U,{value:w,enumerable:!1,writable:!1,configurable:!0}),w}function w(){for(var A,C,z=new Promise(function(K,rt){A=K,C=rt}),j=[],W=0;W<arguments.length;W++)j.push(arguments[W]);j.push(function(K,rt){K?C(K):A(rt)});try{N.apply(this,j)}catch(K){C(K)}return z}return Object.setPrototypeOf(w,Object.getPrototypeOf(N)),U&&Object.defineProperty(w,U,{value:w,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(w,e(N))},t.promisify.custom=U;function H(E,N){if(!E){var w=new Error("Promise was rejected with a falsy value");w.reason=E,E=w}return N(E)}function G(E){if(typeof E!="function")throw new TypeError('The "original" argument must be of type Function');function N(){for(var w=[],A=0;A<arguments.length;A++)w.push(arguments[A]);var C=w.pop();if(typeof C!="function")throw new TypeError("The last argument must be of type Function");var z=this,j=function(){return C.apply(z,arguments)};E.apply(this,w).then(function(W){zt.nextTick(j.bind(null,null,W))},function(W){zt.nextTick(H.bind(null,W,j))})}return Object.setPrototypeOf(N,Object.getPrototypeOf(E)),Object.defineProperties(N,e(E)),N}t.callbackify=G})(sn);var Za={exports:{}},Qa={},Fp;function Lp(){if(Fp)return Qa;Fp=1;function t(v){"@babel/helpers - typeof";return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(S){return typeof S}:function(S){return S&&typeof Symbol=="function"&&S.constructor===Symbol&&S!==Symbol.prototype?"symbol":typeof S},t(v)}function e(v,S,R){return Object.defineProperty(v,"prototype",{writable:!1}),v}function n(v,S){if(!(v instanceof S))throw new TypeError("Cannot call a class as a function")}function r(v,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function");v.prototype=Object.create(S&&S.prototype,{constructor:{value:v,writable:!0,configurable:!0}}),Object.defineProperty(v,"prototype",{writable:!1}),S&&i(v,S)}function i(v,S){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(O,D){return O.__proto__=D,O},i(v,S)}function o(v){var S=l();return function(){var O=d(v),D;if(S){var F=d(this).constructor;D=Reflect.construct(O,arguments,F)}else D=O.apply(this,arguments);return s(this,D)}}function s(v,S){if(S&&(t(S)==="object"||typeof S=="function"))return S;if(S!==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(R){return R.__proto__||Object.getPrototypeOf(R)},d(v)}var c={},h,m;function y(v,S,R){R||(R=Error);function O(F,q,L){return typeof S=="string"?S:S(F,q,L)}var D=function(F){r(L,F);var q=o(L);function L(Y,Z,et){var st;return n(this,L),st=q.call(this,O(Y,Z,et)),st.code=v,st}return e(L)}(R);c[v]=D}function _(v,S){if(Array.isArray(v)){var R=v.length;return v=v.map(function(O){return String(O)}),R>2?"one of ".concat(S," ").concat(v.slice(0,R-1).join(", "),", or ")+v[R-1]:R===2?"one of ".concat(S," ").concat(v[0]," or ").concat(v[1]):"of ".concat(S," ").concat(v[0])}else return"of ".concat(S," ").concat(String(v))}function b(v,S,R){return v.substr(0,S.length)===S}function P(v,S,R){return(R===void 0||R>v.length)&&(R=v.length),v.substring(R-S.length,R)===S}function x(v,S,R){return typeof R!="number"&&(R=0),R+S.length>v.length?!1:v.indexOf(S,R)!==-1}return y("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),y("ERR_INVALID_ARG_TYPE",function(v,S,R){h===void 0&&(h=dc()),h(typeof v=="string","'name' must be a string");var O;typeof S=="string"&&b(S,"not ")?(O="must not be",S=S.replace(/^not /,"")):O="must be";var D;if(P(v," argument"))D="The ".concat(v," ").concat(O," ").concat(_(S,"type"));else{var F=x(v,".")?"property":"argument";D='The "'.concat(v,'" ').concat(F," ").concat(O," ").concat(_(S,"type"))}return D+=". Received type ".concat(t(R)),D},TypeError),y("ERR_INVALID_ARG_VALUE",function(v,S){var R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";m===void 0&&(m=sn);var O=m.inspect(S);return O.length>128&&(O="".concat(O.slice(0,128),"...")),"The argument '".concat(v,"' ").concat(R,". Received ").concat(O)},TypeError),y("ERR_INVALID_RETURN_VALUE",function(v,S,R){var O;return R&&R.constructor&&R.constructor.name?O="instance of ".concat(R.constructor.name):O="type ".concat(t(R)),"Expected ".concat(v,' to be returned from the "').concat(S,'"')+" function but got ".concat(O,".")},TypeError),y("ERR_MISSING_ARGS",function(){for(var v=arguments.length,S=new Array(v),R=0;R<v;R++)S[R]=arguments[R];h===void 0&&(h=dc()),h(S.length>0,"At least one arg needs to be specified");var O="The ",D=S.length;switch(S=S.map(function(F){return'"'.concat(F,'"')}),D){case 1:O+="".concat(S[0]," argument");break;case 2:O+="".concat(S[0]," and ").concat(S[1]," arguments");break;default:O+=S.slice(0,D-1).join(", "),O+=", and ".concat(S[D-1]," arguments");break}return"".concat(O," must be specified")},TypeError),Qa.codes=c,Qa}var tc,jp;function tE(){if(jp)return tc;jp=1;function t(U,H){var G=Object.keys(U);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(U);H&&(E=E.filter(function(N){return Object.getOwnPropertyDescriptor(U,N).enumerable})),G.push.apply(G,E)}return G}function e(U){for(var H=1;H<arguments.length;H++){var G=arguments[H]!=null?arguments[H]:{};H%2?t(Object(G),!0).forEach(function(E){n(U,E,G[E])}):Object.getOwnPropertyDescriptors?Object.defineProperties(U,Object.getOwnPropertyDescriptors(G)):t(Object(G)).forEach(function(E){Object.defineProperty(U,E,Object.getOwnPropertyDescriptor(G,E))})}return U}function n(U,H,G){return H=s(H),H in U?Object.defineProperty(U,H,{value:G,enumerable:!0,configurable:!0,writable:!0}):U[H]=G,U}function r(U,H){if(!(U instanceof H))throw new TypeError("Cannot call a class as a function")}function i(U,H){for(var G=0;G<H.length;G++){var E=H[G];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(U,s(E.key),E)}}function o(U,H,G){return H&&i(U.prototype,H),Object.defineProperty(U,"prototype",{writable:!1}),U}function s(U){var H=a(U,"string");return v(H)==="symbol"?H:String(H)}function a(U,H){if(v(U)!=="object"||U===null)return U;var G=U[Symbol.toPrimitive];if(G!==void 0){var E=G.call(U,H||"default");if(v(E)!=="object")return E;throw new TypeError("@@toPrimitive must return a primitive value.")}return(H==="string"?String:Number)(U)}function l(U,H){if(typeof H!="function"&&H!==null)throw new TypeError("Super expression must either be null or a function");U.prototype=Object.create(H&&H.prototype,{constructor:{value:U,writable:!0,configurable:!0}}),Object.defineProperty(U,"prototype",{writable:!1}),H&&P(U,H)}function d(U){var H=_();return function(){var E=x(U),N;if(H){var w=x(this).constructor;N=Reflect.construct(E,arguments,w)}else N=E.apply(this,arguments);return c(this,N)}}function c(U,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(U)}function h(U){if(U===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U}function m(U){var H=typeof Map=="function"?new Map:void 0;return m=function(E){if(E===null||!b(E))return E;if(typeof E!="function")throw new TypeError("Super expression must either be null or a function");if(typeof H<"u"){if(H.has(E))return H.get(E);H.set(E,N)}function N(){return y(E,arguments,x(this).constructor)}return N.prototype=Object.create(E.prototype,{constructor:{value:N,enumerable:!1,writable:!0,configurable:!0}}),P(N,E)},m(U)}function y(U,H,G){return _()?y=Reflect.construct.bind():y=function(N,w,A){var C=[null];C.push.apply(C,w);var z=Function.bind.apply(N,C),j=new z;return A&&P(j,A.prototype),j},y.apply(null,arguments)}function _(){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 b(U){return Function.toString.call(U).indexOf("[native code]")!==-1}function P(U,H){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(E,N){return E.__proto__=N,E},P(U,H)}function x(U){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(G){return G.__proto__||Object.getPrototypeOf(G)},x(U)}function v(U){"@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(U)}var S=sn,R=S.inspect,O=Lp(),D=O.codes.ERR_INVALID_ARG_TYPE;function F(U,H,G){return(G===void 0||G>U.length)&&(G=U.length),U.substring(G-H.length,G)===H}function q(U,H){if(H=Math.floor(H),U.length==0||H==0)return"";var G=U.length*H;for(H=Math.floor(Math.log(H)/Math.log(2));H;)U+=U,H--;return U+=U.substring(0,G-U.length),U}var L="",Y="",Z="",et="",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:"},At=10;function dt(U){var H=Object.keys(U),G=Object.create(Object.getPrototypeOf(U));return H.forEach(function(E){G[E]=U[E]}),Object.defineProperty(G,"message",{value:U.message}),G}function It(U){return R(U,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function at(U,H,G){var E="",N="",w=0,A="",C=!1,z=It(U),j=z.split(`
110
+ `),W=It(H).split(`
111
+ `),K=0,rt="";if(G==="strictEqual"&&v(U)==="object"&&v(H)==="object"&&U!==null&&H!==null&&(G="strictEqualObject"),j.length===1&&W.length===1&&j[0]!==W[0]){var ft=j[0].length+W[0].length;if(ft<=At){if((v(U)!=="object"||U===null)&&(v(H)!=="object"||H===null)&&(U!==0||H!==0))return"".concat(st[G],`
112
112
 
113
- `)+"".concat(j[0]," !== ").concat(q[0],`
114
- `)}else if(G!=="strictEqualObject"){var vt=zt.stderr&&zt.stderr.isTTY?zt.stderr.columns:80;if(ft<vt){for(;j[0][K]===q[0][K];)K++;K>2&&(rt=`
115
- `.concat(W(" ",K),"^"),K=0)}}}for(var Pt=j[j.length-1],Ft=q[q.length-1];Pt===Ft&&(K++<2?A=`
116
- `.concat(Pt).concat(A):E=Pt,j.pop(),q.pop(),!(j.length===0||q.length===0));)Pt=j[j.length-1],Ft=q[q.length-1];var Yt=Math.max(j.length,q.length);if(Yt===0){var Jt=z.split(`
117
- `);if(Jt.length>30)for(Jt[26]="".concat(F,"...").concat(et);Jt.length>27;)Jt.pop();return"".concat(st.notIdentical,`
113
+ `)+"".concat(j[0]," !== ").concat(W[0],`
114
+ `)}else if(G!=="strictEqualObject"){var vt=zt.stderr&&zt.stderr.isTTY?zt.stderr.columns:80;if(ft<vt){for(;j[0][K]===W[0][K];)K++;K>2&&(rt=`
115
+ `.concat(q(" ",K),"^"),K=0)}}}for(var Pt=j[j.length-1],Lt=W[W.length-1];Pt===Lt&&(K++<2?A=`
116
+ `.concat(Pt).concat(A):E=Pt,j.pop(),W.pop(),!(j.length===0||W.length===0));)Pt=j[j.length-1],Lt=W[W.length-1];var Yt=Math.max(j.length,W.length);if(Yt===0){var Jt=z.split(`
117
+ `);if(Jt.length>30)for(Jt[26]="".concat(L,"...").concat(et);Jt.length>27;)Jt.pop();return"".concat(st.notIdentical,`
118
118
 
119
119
  `).concat(Jt.join(`
120
120
  `),`
121
121
  `)}K>3&&(A=`
122
- `.concat(F,"...").concat(et).concat(A),C=!0),E!==""&&(A=`
123
- `.concat(E).concat(A),E="");var Wt=0,$=st[G]+`
124
- `.concat(Y,"+ actual").concat(et," ").concat(Z,"- expected").concat(et),he=" ".concat(F,"...").concat(et," Lines skipped");for(K=0;K<Yt;K++){var J=K-b;if(j.length<K+1)J>1&&K>2&&(J>4?(N+=`
125
- `.concat(F,"...").concat(et),C=!0):J>3&&(N+=`
126
- `.concat(q[K-2]),Wt++),N+=`
127
- `.concat(q[K-1]),Wt++),b=K,E+=`
128
- `.concat(Z,"-").concat(et," ").concat(q[K]),Wt++;else if(q.length<K+1)J>1&&K>2&&(J>4?(N+=`
129
- `.concat(F,"...").concat(et),C=!0):J>3&&(N+=`
130
- `.concat(j[K-2]),Wt++),N+=`
131
- `.concat(j[K-1]),Wt++),b=K,N+=`
132
- `.concat(Y,"+").concat(et," ").concat(j[K]),Wt++;else{var gt=q[K],St=j[K],P=St!==gt&&(!L(St,",")||St.slice(0,-1)!==gt);P&&L(gt,",")&&gt.slice(0,-1)===St&&(P=!1,St+=","),P?(J>1&&K>2&&(J>4?(N+=`
133
- `.concat(F,"...").concat(et),C=!0):J>3&&(N+=`
134
- `.concat(j[K-2]),Wt++),N+=`
135
- `.concat(j[K-1]),Wt++),b=K,N+=`
122
+ `.concat(L,"...").concat(et).concat(A),C=!0),E!==""&&(A=`
123
+ `.concat(E).concat(A),E="");var qt=0,$=st[G]+`
124
+ `.concat(Y,"+ actual").concat(et," ").concat(Z,"- expected").concat(et),he=" ".concat(L,"...").concat(et," Lines skipped");for(K=0;K<Yt;K++){var J=K-w;if(j.length<K+1)J>1&&K>2&&(J>4?(N+=`
125
+ `.concat(L,"...").concat(et),C=!0):J>3&&(N+=`
126
+ `.concat(W[K-2]),qt++),N+=`
127
+ `.concat(W[K-1]),qt++),w=K,E+=`
128
+ `.concat(Z,"-").concat(et," ").concat(W[K]),qt++;else if(W.length<K+1)J>1&&K>2&&(J>4?(N+=`
129
+ `.concat(L,"...").concat(et),C=!0):J>3&&(N+=`
130
+ `.concat(j[K-2]),qt++),N+=`
131
+ `.concat(j[K-1]),qt++),w=K,N+=`
132
+ `.concat(Y,"+").concat(et," ").concat(j[K]),qt++;else{var gt=W[K],St=j[K],k=St!==gt&&(!F(St,",")||St.slice(0,-1)!==gt);k&&F(gt,",")&&gt.slice(0,-1)===St&&(k=!1,St+=","),k?(J>1&&K>2&&(J>4?(N+=`
133
+ `.concat(L,"...").concat(et),C=!0):J>3&&(N+=`
134
+ `.concat(j[K-2]),qt++),N+=`
135
+ `.concat(j[K-1]),qt++),w=K,N+=`
136
136
  `.concat(Y,"+").concat(et," ").concat(St),E+=`
137
- `.concat(Z,"-").concat(et," ").concat(gt),Wt+=2):(N+=E,E="",(J===1||K===0)&&(N+=`
138
- `.concat(St),Wt++))}if(Wt>20&&K<Yt-2)return"".concat($).concat(he,`
137
+ `.concat(Z,"-").concat(et," ").concat(gt),qt+=2):(N+=E,E="",(J===1||K===0)&&(N+=`
138
+ `.concat(St),qt++))}if(qt>20&&K<Yt-2)return"".concat($).concat(he,`
139
139
  `).concat(N,`
140
- `).concat(F,"...").concat(et).concat(E,`
141
- `)+"".concat(F,"...").concat(et)}return"".concat($).concat(C?he:"",`
142
- `).concat(N).concat(E).concat(A).concat(rt)}var ht=function(U,H){l(E,U);var G=d(E);function E(N){var b;if(r(this,E),v(N)!=="object"||N===null)throw new B("options","Object",N);var A=N.message,C=N.operator,z=N.stackStartFn,j=N.actual,q=N.expected,K=Error.stackTraceLimit;if(Error.stackTraceLimit=0,A!=null)b=G.call(this,String(A));else if(zt.stderr&&zt.stderr.isTTY&&(zt.stderr&&zt.stderr.getColorDepth&&zt.stderr.getColorDepth()!==1?(F="\x1B[34m",Y="\x1B[32m",et="\x1B[39m",Z="\x1B[31m"):(F="",Y="",et="",Z="")),v(j)==="object"&&j!==null&&v(q)==="object"&&q!==null&&"stack"in j&&j instanceof Error&&"stack"in q&&q instanceof Error&&(j=dt(j),q=dt(q)),C==="deepStrictEqual"||C==="strictEqual")b=G.call(this,at(j,q,C));else if(C==="notDeepStrictEqual"||C==="notStrictEqual"){var rt=st[C],ft=It(j).split(`
143
- `);if(C==="notStrictEqual"&&v(j)==="object"&&j!==null&&(rt=st.notStrictEqualObject),ft.length>30)for(ft[26]="".concat(F,"...").concat(et);ft.length>27;)ft.pop();ft.length===1?b=G.call(this,"".concat(rt," ").concat(ft[0])):b=G.call(this,"".concat(rt,`
140
+ `).concat(L,"...").concat(et).concat(E,`
141
+ `)+"".concat(L,"...").concat(et)}return"".concat($).concat(C?he:"",`
142
+ `).concat(N).concat(E).concat(A).concat(rt)}var ht=function(U,H){l(E,U);var G=d(E);function E(N){var w;if(r(this,E),v(N)!=="object"||N===null)throw new D("options","Object",N);var A=N.message,C=N.operator,z=N.stackStartFn,j=N.actual,W=N.expected,K=Error.stackTraceLimit;if(Error.stackTraceLimit=0,A!=null)w=G.call(this,String(A));else if(zt.stderr&&zt.stderr.isTTY&&(zt.stderr&&zt.stderr.getColorDepth&&zt.stderr.getColorDepth()!==1?(L="\x1B[34m",Y="\x1B[32m",et="\x1B[39m",Z="\x1B[31m"):(L="",Y="",et="",Z="")),v(j)==="object"&&j!==null&&v(W)==="object"&&W!==null&&"stack"in j&&j instanceof Error&&"stack"in W&&W instanceof Error&&(j=dt(j),W=dt(W)),C==="deepStrictEqual"||C==="strictEqual")w=G.call(this,at(j,W,C));else if(C==="notDeepStrictEqual"||C==="notStrictEqual"){var rt=st[C],ft=It(j).split(`
143
+ `);if(C==="notStrictEqual"&&v(j)==="object"&&j!==null&&(rt=st.notStrictEqualObject),ft.length>30)for(ft[26]="".concat(L,"...").concat(et);ft.length>27;)ft.pop();ft.length===1?w=G.call(this,"".concat(rt," ").concat(ft[0])):w=G.call(this,"".concat(rt,`
144
144
 
145
145
  `).concat(ft.join(`
146
146
  `),`
147
- `))}else{var vt=It(j),Pt="",Ft=st[C];C==="notDeepEqual"||C==="notEqual"?(vt="".concat(st[C],`
147
+ `))}else{var vt=It(j),Pt="",Lt=st[C];C==="notDeepEqual"||C==="notEqual"?(vt="".concat(st[C],`
148
148
 
149
- `).concat(vt),vt.length>1024&&(vt="".concat(vt.slice(0,1021),"..."))):(Pt="".concat(It(q)),vt.length>512&&(vt="".concat(vt.slice(0,509),"...")),Pt.length>512&&(Pt="".concat(Pt.slice(0,509),"...")),C==="deepEqual"||C==="equal"?vt="".concat(Ft,`
149
+ `).concat(vt),vt.length>1024&&(vt="".concat(vt.slice(0,1021),"..."))):(Pt="".concat(It(W)),vt.length>512&&(vt="".concat(vt.slice(0,509),"...")),Pt.length>512&&(Pt="".concat(Pt.slice(0,509),"...")),C==="deepEqual"||C==="equal"?vt="".concat(Lt,`
150
150
 
151
151
  `).concat(vt,`
152
152
 
153
153
  should equal
154
154
 
155
- `):Pt=" ".concat(C," ").concat(Pt)),b=G.call(this,"".concat(vt).concat(Pt))}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=j,b.expected=q,b.operator=C,Error.captureStackTrace&&Error.captureStackTrace(h(b),z),b.stack,b.name="AssertionError",c(b)}return o(E,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:H,value:function(b,A){return R(this,e(e({},A),{},{customInspect:!1,depth:0}))}}]),E}(m(Error),R.custom);return Ja=ht,Ja}var Mp=Object.prototype.toString,Np=function(e){var n=Mp.call(e),r=n==="[object Arguments]";return r||(r=n!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&Mp.call(e.callee)==="[object Function]"),r},Za,Dp;function eE(){if(Dp)return Za;Dp=1;var t;if(!Object.keys){var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Np,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 _=y!==null&&typeof y=="object",w=n.call(y)==="[object Function]",k=r(y),x=_&&n.call(y)==="[object String]",v=[];if(!_&&!w&&!k)throw new TypeError("Object.keys called on a non-object");var S=s&&w;if(x&&y.length>0&&!e.call(y,0))for(var R=0;R<y.length;++R)v.push(String(R));if(k&&y.length>0)for(var O=0;O<y.length;++O)v.push(String(O));else for(var B in y)!(S&&B==="prototype")&&e.call(y,B)&&v.push(String(B));if(o)for(var L=h(y),W=0;W<a.length;++W)!(L&&a[W]==="constructor")&&e.call(y,a[W])&&v.push(a[W]);return v}}return Za=t,Za}var nE=Array.prototype.slice,rE=Np,Bp=Object.keys,$i=Bp?function(e){return Bp(e)}:eE(),Lp=Object.keys;$i.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 rE(r)?Lp(nE.call(r)):Lp(r)})}else Object.keys=$i;return Object.keys||$i};var Fp=$i,iE=Fp,jp=Sa(),Vp=Na,Ui=Qh,oE=Vp("Array.prototype.push"),$p=Vp("Object.prototype.propertyIsEnumerable"),sE=jp?Ui.getOwnPropertySymbols:null,aE=function(e,n){if(e==null)throw new TypeError("target must be an object");var r=Ui(e);if(arguments.length===1)return r;for(var i=1;i<arguments.length;++i){var o=Ui(arguments[i]),s=iE(o),a=jp&&(Ui.getOwnPropertySymbols||sE);if(a)for(var l=a(o),d=0;d<l.length;++d){var c=l[d];$p(o,c)&&oE(s,c)}for(var h=0;h<s.length;++h){var m=s[h];if($p(o,m)){var y=o[m];r[m]=y}}}return r},Qa=aE,cE=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},lE=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},uE=function(){return!Object.assign||cE()||lE()?Qa:Object.assign},Up=function(t){return t!==t},zp=function(e,n){return e===0&&n===0?1/e===1/n:!!(e===n||Up(e)&&Up(n))},fE=zp,tc=function(){return typeof Object.is=="function"?Object.is:fE},Wp=Ma,qp=Li,dE=qp(Wp("String.prototype.indexOf")),hE=function(e,n){var r=Wp(e,!!n);return typeof r=="function"&&dE(e,".prototype.")>-1?qp(r):r},ec,Hp;function zi(){if(Hp)return ec;Hp=1;var t=Fp,e=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",n=Object.prototype.toString,r=Array.prototype.concat,i=wp,o=function(d){return typeof d=="function"&&n.call(d)==="[object Function]"},s=xp(),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,ec=l,ec}var nc,Gp;function pE(){if(Gp)return nc;Gp=1;var t=tc,e=zi();return nc=function(){var r=t();return e(Object,{is:r},{is:function(){return Object.is!==r}}),r},nc}var rc,Kp;function mE(){if(Kp)return rc;Kp=1;var t=zi(),e=Li,n=zp,r=tc,i=pE(),o=e(r(),Object);return t(o,{getPolyfill:r,implementation:n,shim:i}),rc=o,rc}var ic,Yp;function Xp(){return Yp||(Yp=1,ic=function(e){return e!==e}),ic}var oc,Jp;function Zp(){if(Jp)return oc;Jp=1;var t=Xp();return oc=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:t},oc}var sc,Qp;function yE(){if(Qp)return sc;Qp=1;var t=zi(),e=Zp();return sc=function(){var r=e();return t(Number,{isNaN:r},{isNaN:function(){return Number.isNaN!==r}}),r},sc}var ac,tm;function gE(){if(tm)return ac;tm=1;var t=Li,e=zi(),n=Xp(),r=Zp(),i=yE(),o=t(r(),Number);return e(o,{getPolyfill:r,implementation:n,shim:i}),ac=o,ac}var cc,em;function vE(){if(em)return cc;em=1;function t(P,I){return o(P)||i(P,I)||n(P,I)||e()}function e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
156
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function n(P,I){if(P){if(typeof P=="string")return r(P,I);var X=Object.prototype.toString.call(P).slice(8,-1);if(X==="Object"&&P.constructor&&(X=P.constructor.name),X==="Map"||X==="Set")return Array.from(P);if(X==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(X))return r(P,I)}}function r(P,I){(I==null||I>P.length)&&(I=P.length);for(var X=0,tt=new Array(I);X<I;X++)tt[X]=P[X];return tt}function i(P,I){var X=P==null?null:typeof Symbol<"u"&&P[Symbol.iterator]||P["@@iterator"];if(X!=null){var tt,Q,ct,p,u=[],f=!0,g=!1;try{if(ct=(X=X.call(P)).next,I!==0)for(;!(f=(tt=ct.call(X)).done)&&(u.push(tt.value),u.length!==I);f=!0);}catch(T){g=!0,Q=T}finally{try{if(!f&&X.return!=null&&(p=X.return(),Object(p)!==p))return}finally{if(g)throw Q}}return u}}function o(P){if(Array.isArray(P))return P}function s(P){"@babel/helpers - typeof";return s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(I){return typeof I}:function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},s(P)}var a=/a/g.flags!==void 0,l=function(I){var X=[];return I.forEach(function(tt){return X.push(tt)}),X},d=function(I){var X=[];return I.forEach(function(tt,Q){return X.push([Q,tt])}),X},c=Object.is?Object.is:mE(),h=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},m=Number.isNaN?Number.isNaN:gE();function y(P){return P.call.bind(P)}var _=y(Object.prototype.hasOwnProperty),w=y(Object.prototype.propertyIsEnumerable),k=y(Object.prototype.toString),x=sn.types,v=x.isAnyArrayBuffer,S=x.isArrayBufferView,R=x.isDate,O=x.isMap,B=x.isRegExp,L=x.isSet,W=x.isNativeError,F=x.isBoxedPrimitive,Y=x.isNumberObject,Z=x.isStringObject,et=x.isBooleanObject,st=x.isBigIntObject,At=x.isSymbolObject,dt=x.isFloat32Array,It=x.isFloat64Array;function at(P){if(P.length===0||P.length>10)return!0;for(var I=0;I<P.length;I++){var X=P.charCodeAt(I);if(X<48||X>57)return!0}return P.length===10&&P>=Math.pow(2,32)}function ht(P){return Object.keys(P).filter(at).concat(h(P).filter(Object.prototype.propertyIsEnumerable.bind(P)))}/*!
155
+ `):Pt=" ".concat(C," ").concat(Pt)),w=G.call(this,"".concat(vt).concat(Pt))}return Error.stackTraceLimit=K,w.generatedMessage=!A,Object.defineProperty(h(w),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),w.code="ERR_ASSERTION",w.actual=j,w.expected=W,w.operator=C,Error.captureStackTrace&&Error.captureStackTrace(h(w),z),w.stack,w.name="AssertionError",c(w)}return o(E,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:H,value:function(w,A){return R(this,e(e({},A),{},{customInspect:!1,depth:0}))}}]),E}(m(Error),R.custom);return tc=ht,tc}var Vp=Object.prototype.toString,$p=function(e){var n=Vp.call(e),r=n==="[object Arguments]";return r||(r=n!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&Vp.call(e.callee)==="[object Function]"),r},ec,Up;function eE(){if(Up)return ec;Up=1;var t;if(!Object.keys){var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=$p,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 _=y!==null&&typeof y=="object",b=n.call(y)==="[object Function]",P=r(y),x=_&&n.call(y)==="[object String]",v=[];if(!_&&!b&&!P)throw new TypeError("Object.keys called on a non-object");var S=s&&b;if(x&&y.length>0&&!e.call(y,0))for(var R=0;R<y.length;++R)v.push(String(R));if(P&&y.length>0)for(var O=0;O<y.length;++O)v.push(String(O));else for(var D in y)!(S&&D==="prototype")&&e.call(y,D)&&v.push(String(D));if(o)for(var F=h(y),q=0;q<a.length;++q)!(F&&a[q]==="constructor")&&e.call(y,a[q])&&v.push(a[q]);return v}}return ec=t,ec}var nE=Array.prototype.slice,rE=$p,zp=Object.keys,$i=zp?function(e){return zp(e)}:eE(),qp=Object.keys;$i.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 rE(r)?qp(nE.call(r)):qp(r)})}else Object.keys=$i;return Object.keys||$i};var Wp=$i,iE=Wp,Hp=xa(),Gp=Fa,Ui=rp,oE=Gp("Array.prototype.push"),Kp=Gp("Object.prototype.propertyIsEnumerable"),sE=Hp?Ui.getOwnPropertySymbols:null,aE=function(e,n){if(e==null)throw new TypeError("target must be an object");var r=Ui(e);if(arguments.length===1)return r;for(var i=1;i<arguments.length;++i){var o=Ui(arguments[i]),s=iE(o),a=Hp&&(Ui.getOwnPropertySymbols||sE);if(a)for(var l=a(o),d=0;d<l.length;++d){var c=l[d];Kp(o,c)&&oE(s,c)}for(var h=0;h<s.length;++h){var m=s[h];if(Kp(o,m)){var y=o[m];r[m]=y}}}return r},nc=aE,cE=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},lE=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},uE=function(){return!Object.assign||cE()||lE()?nc:Object.assign},Yp=function(t){return t!==t},Xp=function(e,n){return e===0&&n===0?1/e===1/n:!!(e===n||Yp(e)&&Yp(n))},fE=Xp,rc=function(){return typeof Object.is=="function"?Object.is:fE},Jp=Da,Zp=Fi,dE=Zp(Jp("String.prototype.indexOf")),hE=function(e,n){var r=Jp(e,!!n);return typeof r=="function"&&dE(e,".prototype.")>-1?Zp(r):r},ic,Qp;function zi(){if(Qp)return ic;Qp=1;var t=Wp,e=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",n=Object.prototype.toString,r=Array.prototype.concat,i=Pp,o=function(d){return typeof d=="function"&&n.call(d)==="[object Function]"},s=Op(),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,ic=l,ic}var oc,tm;function pE(){if(tm)return oc;tm=1;var t=rc,e=zi();return oc=function(){var r=t();return e(Object,{is:r},{is:function(){return Object.is!==r}}),r},oc}var sc,em;function mE(){if(em)return sc;em=1;var t=zi(),e=Fi,n=Xp,r=rc,i=pE(),o=e(r(),Object);return t(o,{getPolyfill:r,implementation:n,shim:i}),sc=o,sc}var ac,nm;function rm(){return nm||(nm=1,ac=function(e){return e!==e}),ac}var cc,im;function om(){if(im)return cc;im=1;var t=rm();return cc=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:t},cc}var lc,sm;function yE(){if(sm)return lc;sm=1;var t=zi(),e=om();return lc=function(){var r=e();return t(Number,{isNaN:r},{isNaN:function(){return Number.isNaN!==r}}),r},lc}var uc,am;function gE(){if(am)return uc;am=1;var t=Fi,e=zi(),n=rm(),r=om(),i=yE(),o=t(r(),Number);return e(o,{getPolyfill:r,implementation:n,shim:i}),uc=o,uc}var fc,cm;function vE(){if(cm)return fc;cm=1;function t(k,I){return o(k)||i(k,I)||n(k,I)||e()}function e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
156
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function n(k,I){if(k){if(typeof k=="string")return r(k,I);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,I)}}function r(k,I){(I==null||I>k.length)&&(I=k.length);for(var X=0,tt=new Array(I);X<I;X++)tt[X]=k[X];return tt}function i(k,I){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,I!==0)for(;!(f=(tt=ct.call(X)).done)&&(u.push(tt.value),u.length!==I);f=!0);}catch(T){g=!0,Q=T}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(I){return typeof I}:function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},s(k)}var a=/a/g.flags!==void 0,l=function(I){var X=[];return I.forEach(function(tt){return X.push(tt)}),X},d=function(I){var X=[];return I.forEach(function(tt,Q){return X.push([Q,tt])}),X},c=Object.is?Object.is:mE(),h=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},m=Number.isNaN?Number.isNaN:gE();function y(k){return k.call.bind(k)}var _=y(Object.prototype.hasOwnProperty),b=y(Object.prototype.propertyIsEnumerable),P=y(Object.prototype.toString),x=sn.types,v=x.isAnyArrayBuffer,S=x.isArrayBufferView,R=x.isDate,O=x.isMap,D=x.isRegExp,F=x.isSet,q=x.isNativeError,L=x.isBoxedPrimitive,Y=x.isNumberObject,Z=x.isStringObject,et=x.isBooleanObject,st=x.isBigIntObject,At=x.isSymbolObject,dt=x.isFloat32Array,It=x.isFloat64Array;function at(k){if(k.length===0||k.length>10)return!0;for(var I=0;I<k.length;I++){var X=k.charCodeAt(I);if(X<48||X>57)return!0}return k.length===10&&k>=Math.pow(2,32)}function ht(k){return Object.keys(k).filter(at).concat(h(k).filter(Object.prototype.propertyIsEnumerable.bind(k)))}/*!
157
157
  * The buffer module from node.js, for the browser.
158
158
  *
159
159
  * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
160
160
  * @license MIT
161
- */function U(P,I){if(P===I)return 0;for(var X=P.length,tt=I.length,Q=0,ct=Math.min(X,tt);Q<ct;++Q)if(P[Q]!==I[Q]){X=P[Q],tt=I[Q];break}return X<tt?-1:tt<X?1:0}var H=!0,G=!1,E=0,N=1,b=2,A=3;function C(P,I){return a?P.source===I.source&&P.flags===I.flags:RegExp.prototype.toString.call(P)===RegExp.prototype.toString.call(I)}function z(P,I){if(P.byteLength!==I.byteLength)return!1;for(var X=0;X<P.byteLength;X++)if(P[X]!==I[X])return!1;return!0}function j(P,I){return P.byteLength!==I.byteLength?!1:U(new Uint8Array(P.buffer,P.byteOffset,P.byteLength),new Uint8Array(I.buffer,I.byteOffset,I.byteLength))===0}function q(P,I){return P.byteLength===I.byteLength&&U(new Uint8Array(P),new Uint8Array(I))===0}function K(P,I){return Y(P)?Y(I)&&c(Number.prototype.valueOf.call(P),Number.prototype.valueOf.call(I)):Z(P)?Z(I)&&String.prototype.valueOf.call(P)===String.prototype.valueOf.call(I):et(P)?et(I)&&Boolean.prototype.valueOf.call(P)===Boolean.prototype.valueOf.call(I):st(P)?st(I)&&BigInt.prototype.valueOf.call(P)===BigInt.prototype.valueOf.call(I):At(I)&&Symbol.prototype.valueOf.call(P)===Symbol.prototype.valueOf.call(I)}function rt(P,I,X,tt){if(P===I)return P!==0?!0:X?c(P,I):!0;if(X){if(s(P)!=="object")return typeof P=="number"&&m(P)&&m(I);if(s(I)!=="object"||P===null||I===null||Object.getPrototypeOf(P)!==Object.getPrototypeOf(I))return!1}else{if(P===null||s(P)!=="object")return I===null||s(I)!=="object"?P==I:!1;if(I===null||s(I)!=="object")return!1}var Q=k(P),ct=k(I);if(Q!==ct)return!1;if(Array.isArray(P)){if(P.length!==I.length)return!1;var p=ht(P),u=ht(I);return p.length!==u.length?!1:vt(P,I,X,tt,N,p)}if(Q==="[object Object]"&&(!O(P)&&O(I)||!L(P)&&L(I)))return!1;if(R(P)){if(!R(I)||Date.prototype.getTime.call(P)!==Date.prototype.getTime.call(I))return!1}else if(B(P)){if(!B(I)||!C(P,I))return!1}else if(W(P)||P instanceof Error){if(P.message!==I.message||P.name!==I.name)return!1}else if(S(P)){if(!X&&(dt(P)||It(P))){if(!z(P,I))return!1}else if(!j(P,I))return!1;var f=ht(P),g=ht(I);return f.length!==g.length?!1:vt(P,I,X,tt,E,f)}else{if(L(P))return!L(I)||P.size!==I.size?!1:vt(P,I,X,tt,b);if(O(P))return!O(I)||P.size!==I.size?!1:vt(P,I,X,tt,A);if(v(P)){if(!q(P,I))return!1}else if(F(P)&&!K(P,I))return!1}return vt(P,I,X,tt,E)}function ft(P,I){return I.filter(function(X){return w(P,X)})}function vt(P,I,X,tt,Q,ct){if(arguments.length===5){ct=Object.keys(P);var p=Object.keys(I);if(ct.length!==p.length)return!1}for(var u=0;u<ct.length;u++)if(!_(I,ct[u]))return!1;if(X&&arguments.length===5){var f=h(P);if(f.length!==0){var g=0;for(u=0;u<f.length;u++){var T=f[u];if(w(P,T)){if(!w(I,T))return!1;ct.push(T),g++}else if(w(I,T))return!1}var D=h(I);if(f.length!==D.length&&ft(I,D).length!==g)return!1}else{var V=h(I);if(V.length!==0&&ft(I,V).length!==0)return!1}}if(ct.length===0&&(Q===E||Q===N&&P.length===0||P.size===0))return!0;if(tt===void 0)tt={val1:new Map,val2:new Map,position:0};else{var lt=tt.val1.get(P);if(lt!==void 0){var bt=tt.val2.get(I);if(bt!==void 0)return lt===bt}tt.position++}tt.val1.set(P,tt.position),tt.val2.set(I,tt.position);var _t=J(P,I,X,ct,tt,Q);return tt.val1.delete(P),tt.val2.delete(I),_t}function Pt(P,I,X,tt){for(var Q=l(P),ct=0;ct<Q.length;ct++){var p=Q[ct];if(rt(I,p,X,tt))return P.delete(p),!0}return!1}function Ft(P){switch(s(P)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":P=+P;case"number":if(m(P))return!1}return!0}function Yt(P,I,X){var tt=Ft(X);return tt??(I.has(tt)&&!P.has(tt))}function Jt(P,I,X,tt,Q){var ct=Ft(X);if(ct!=null)return ct;var p=I.get(ct);return p===void 0&&!I.has(ct)||!rt(tt,p,!1,Q)?!1:!P.has(ct)&&rt(tt,p,!1,Q)}function Wt(P,I,X,tt){for(var Q=null,ct=l(P),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(!I.has(u)){if(X||!Yt(P,I,u))return!1;Q===null&&(Q=new Set),Q.add(u)}}if(Q!==null){for(var f=l(I),g=0;g<f.length;g++){var T=f[g];if(s(T)==="object"&&T!==null){if(!Pt(Q,T,X,tt))return!1}else if(!X&&!P.has(T)&&!Pt(Q,T,X,tt))return!1}return Q.size===0}return!0}function $(P,I,X,tt,Q,ct){for(var p=l(P),u=0;u<p.length;u++){var f=p[u];if(rt(X,f,Q,ct)&&rt(tt,I.get(f),Q,ct))return P.delete(f),!0}return!1}function he(P,I,X,tt){for(var Q=null,ct=d(P),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 T=I.get(f);if(T===void 0&&!I.has(f)||!rt(g,T,X,tt)){if(X||!Jt(P,I,f,g,tt))return!1;Q===null&&(Q=new Set),Q.add(f)}}}if(Q!==null){for(var D=d(I),V=0;V<D.length;V++){var lt=t(D[V],2),bt=lt[0],_t=lt[1];if(s(bt)==="object"&&bt!==null){if(!$(Q,P,bt,_t,X,tt))return!1}else if(!X&&(!P.has(bt)||!rt(P.get(bt),_t,!1,tt))&&!$(Q,P,bt,_t,!1,tt))return!1}return Q.size===0}return!0}function J(P,I,X,tt,Q,ct){var p=0;if(ct===b){if(!Wt(P,I,X,Q))return!1}else if(ct===A){if(!he(P,I,X,Q))return!1}else if(ct===N)for(;p<P.length;p++)if(_(P,p)){if(!_(I,p)||!rt(P[p],I[p],X,Q))return!1}else{if(_(I,p))return!1;for(var u=Object.keys(P);p<u.length;p++){var f=u[p];if(!_(I,f)||!rt(P[f],I[f],X,Q))return!1}return u.length===Object.keys(I).length}for(p=0;p<tt.length;p++){var g=tt[p];if(!rt(P[g],I[g],X,Q))return!1}return!0}function gt(P,I){return rt(P,I,G)}function St(P,I){return rt(P,I,H)}return cc={isDeepEqual:gt,isDeepStrictEqual:St},cc}var nm;function lc(){if(nm)return Ya.exports;nm=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,C){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=Ip(),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=tE(),h=sn,m=h.inspect,y=sn.types,_=y.isPromise,w=y.isRegExp,k=uE(),x=tc(),v=hE("RegExp.prototype.test"),S,R;function O(){var b=vE();S=b.isDeepEqual,R=b.isDeepStrictEqual}var B=!1,L=Ya.exports=et,W={};function F(b){throw b.message instanceof Error?b.message:new c(b)}function Y(b,A,C,z,j){var q=arguments.length,K;if(q===0)K="Failed";else if(q===1)C=b,b=void 0;else{if(B===!1){B=!0;var rt=zt.emitWarning?zt.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&&(z="!=")}if(C instanceof Error)throw C;var ft={actual:b,expected:A,operator:z===void 0?"fail":z,stackStartFn:j||Y};C!==void 0&&(ft.message=C);var vt=new c(ft);throw K&&(vt.message=K,vt.generatedMessage=!0),vt}L.fail=Y,L.AssertionError=c;function Z(b,A,C,z){if(!C){var j=!1;if(A===0)j=!0,z="No value argument passed to `assert.ok()`";else if(z instanceof Error)throw z;var q=new c({actual:C,expected:!0,message:z,operator:"==",stackStartFn:b});throw q.generatedMessage=j,q}}function et(){for(var b=arguments.length,A=new Array(b),C=0;C<b;C++)A[C]=arguments[C];Z.apply(void 0,[et,A.length].concat(A))}L.ok=et,L.equal=function b(A,C,z){if(arguments.length<2)throw new d("actual","expected");A!=C&&F({actual:A,expected:C,message:z,operator:"==",stackStartFn:b})},L.notEqual=function b(A,C,z){if(arguments.length<2)throw new d("actual","expected");A==C&&F({actual:A,expected:C,message:z,operator:"!=",stackStartFn:b})},L.deepEqual=function b(A,C,z){if(arguments.length<2)throw new d("actual","expected");S===void 0&&O(),S(A,C)||F({actual:A,expected:C,message:z,operator:"deepEqual",stackStartFn:b})},L.notDeepEqual=function b(A,C,z){if(arguments.length<2)throw new d("actual","expected");S===void 0&&O(),S(A,C)&&F({actual:A,expected:C,message:z,operator:"notDeepEqual",stackStartFn:b})},L.deepStrictEqual=function b(A,C,z){if(arguments.length<2)throw new d("actual","expected");S===void 0&&O(),R(A,C)||F({actual:A,expected:C,message:z,operator:"deepStrictEqual",stackStartFn:b})},L.notDeepStrictEqual=st;function st(b,A,C){if(arguments.length<2)throw new d("actual","expected");S===void 0&&O(),R(b,A)&&F({actual:b,expected:A,message:C,operator:"notDeepStrictEqual",stackStartFn:st})}L.strictEqual=function b(A,C,z){if(arguments.length<2)throw new d("actual","expected");x(A,C)||F({actual:A,expected:C,message:z,operator:"strictEqual",stackStartFn:b})},L.notStrictEqual=function b(A,C,z){if(arguments.length<2)throw new d("actual","expected");x(A,C)&&F({actual:A,expected:C,message:z,operator:"notStrictEqual",stackStartFn:b})};var At=e(function b(A,C,z){var j=this;n(this,b),C.forEach(function(q){q in A&&(z!==void 0&&typeof z[q]=="string"&&w(A[q])&&v(A[q],z[q])?j[q]=z[q]:j[q]=A[q])})});function dt(b,A,C,z,j,q){if(!(C in b)||!R(b[C],A[C])){if(!z){var K=new At(b,j),rt=new At(A,j,b),ft=new c({actual:K,expected:rt,operator:"deepStrictEqual",stackStartFn:q});throw ft.actual=b,ft.expected=A,ft.operator=q.name,ft}F({actual:b,expected:A,message:z,operator:q.name,stackStartFn:q})}}function It(b,A,C,z){if(typeof A!="function"){if(w(A))return v(A,b);if(arguments.length===2)throw new s("expected",["Function","RegExp"],A);if(t(b)!=="object"||b===null){var j=new c({actual:b,expected:A,message:C,operator:"deepStrictEqual",stackStartFn:z});throw j.operator=z.name,j}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 S===void 0&&O(),q.forEach(function(K){typeof b[K]=="string"&&w(A[K])&&v(A[K],b[K])||dt(b,A,K,C,q,z)}),!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 W}function ht(b){return _(b)||b!==null&&t(b)==="object"&&typeof b.then=="function"&&typeof b.catch=="function"}function U(b){return Promise.resolve().then(function(){var A;if(typeof b=="function"){if(A=b(),!ht(A))throw new l("instance of Promise","promiseFn",A)}else if(ht(b))A=b;else throw new s("promiseFn",["Function","Promise"],b);return Promise.resolve().then(function(){return A}).then(function(){return W}).catch(function(C){return C})})}function H(b,A,C,z){if(typeof C=="string"){if(arguments.length===4)throw new s("error",["Object","Error","Function","RegExp"],C);if(t(A)==="object"&&A!==null){if(A.message===C)throw new o("error/message",'The error message "'.concat(A.message,'" is identical to the message.'))}else if(A===C)throw new o("error/message",'The error "'.concat(A,'" is identical to the message.'));z=C,C=void 0}else if(C!=null&&t(C)!=="object"&&typeof C!="function")throw new s("error",["Object","Error","Function","RegExp"],C);if(A===W){var j="";C&&C.name&&(j+=" (".concat(C.name,")")),j+=z?": ".concat(z):".";var q=b.name==="rejects"?"rejection":"exception";F({actual:void 0,expected:C,operator:b.name,message:"Missing expected ".concat(q).concat(j),stackStartFn:b})}if(C&&!It(A,C,z,b))throw A}function G(b,A,C,z){if(A!==W){if(typeof C=="string"&&(z=C,C=void 0),!C||It(A,C)){var j=z?": ".concat(z):".",q=b.name==="doesNotReject"?"rejection":"exception";F({actual:A,expected:C,operator:b.name,message:"Got unwanted ".concat(q).concat(j,`
162
- `)+'Actual message: "'.concat(A&&A.message,'"'),stackStartFn:b})}throw A}}L.throws=function b(A){for(var C=arguments.length,z=new Array(C>1?C-1:0),j=1;j<C;j++)z[j-1]=arguments[j];H.apply(void 0,[b,at(A)].concat(z))},L.rejects=function b(A){for(var C=arguments.length,z=new Array(C>1?C-1:0),j=1;j<C;j++)z[j-1]=arguments[j];return U(A).then(function(q){return H.apply(void 0,[b,q].concat(z))})},L.doesNotThrow=function b(A){for(var C=arguments.length,z=new Array(C>1?C-1:0),j=1;j<C;j++)z[j-1]=arguments[j];G.apply(void 0,[b,at(A)].concat(z))},L.doesNotReject=function b(A){for(var C=arguments.length,z=new Array(C>1?C-1:0),j=1;j<C;j++)z[j-1]=arguments[j];return U(A).then(function(q){return G.apply(void 0,[b,q].concat(z))})},L.ifError=function b(A){if(A!=null){var C="ifError got unwanted exception: ";t(A)==="object"&&typeof A.message=="string"?A.message.length===0&&A.constructor?C+=A.constructor.name:C+=A.message:C+=m(A);var z=new c({actual:A,expected:null,operator:"ifError",message:C,stackStartFn:b}),j=A.stack;if(typeof j=="string"){var q=j.split(`
163
- `);q.shift();for(var K=z.stack.split(`
164
- `),rt=0;rt<q.length;rt++){var ft=K.indexOf(q[rt]);if(ft!==-1){K=K.slice(0,ft);break}}z.stack="".concat(K.join(`
161
+ */function U(k,I){if(k===I)return 0;for(var X=k.length,tt=I.length,Q=0,ct=Math.min(X,tt);Q<ct;++Q)if(k[Q]!==I[Q]){X=k[Q],tt=I[Q];break}return X<tt?-1:tt<X?1:0}var H=!0,G=!1,E=0,N=1,w=2,A=3;function C(k,I){return a?k.source===I.source&&k.flags===I.flags:RegExp.prototype.toString.call(k)===RegExp.prototype.toString.call(I)}function z(k,I){if(k.byteLength!==I.byteLength)return!1;for(var X=0;X<k.byteLength;X++)if(k[X]!==I[X])return!1;return!0}function j(k,I){return k.byteLength!==I.byteLength?!1:U(new Uint8Array(k.buffer,k.byteOffset,k.byteLength),new Uint8Array(I.buffer,I.byteOffset,I.byteLength))===0}function W(k,I){return k.byteLength===I.byteLength&&U(new Uint8Array(k),new Uint8Array(I))===0}function K(k,I){return Y(k)?Y(I)&&c(Number.prototype.valueOf.call(k),Number.prototype.valueOf.call(I)):Z(k)?Z(I)&&String.prototype.valueOf.call(k)===String.prototype.valueOf.call(I):et(k)?et(I)&&Boolean.prototype.valueOf.call(k)===Boolean.prototype.valueOf.call(I):st(k)?st(I)&&BigInt.prototype.valueOf.call(k)===BigInt.prototype.valueOf.call(I):At(I)&&Symbol.prototype.valueOf.call(k)===Symbol.prototype.valueOf.call(I)}function rt(k,I,X,tt){if(k===I)return k!==0?!0:X?c(k,I):!0;if(X){if(s(k)!=="object")return typeof k=="number"&&m(k)&&m(I);if(s(I)!=="object"||k===null||I===null||Object.getPrototypeOf(k)!==Object.getPrototypeOf(I))return!1}else{if(k===null||s(k)!=="object")return I===null||s(I)!=="object"?k==I:!1;if(I===null||s(I)!=="object")return!1}var Q=P(k),ct=P(I);if(Q!==ct)return!1;if(Array.isArray(k)){if(k.length!==I.length)return!1;var p=ht(k),u=ht(I);return p.length!==u.length?!1:vt(k,I,X,tt,N,p)}if(Q==="[object Object]"&&(!O(k)&&O(I)||!F(k)&&F(I)))return!1;if(R(k)){if(!R(I)||Date.prototype.getTime.call(k)!==Date.prototype.getTime.call(I))return!1}else if(D(k)){if(!D(I)||!C(k,I))return!1}else if(q(k)||k instanceof Error){if(k.message!==I.message||k.name!==I.name)return!1}else if(S(k)){if(!X&&(dt(k)||It(k))){if(!z(k,I))return!1}else if(!j(k,I))return!1;var f=ht(k),g=ht(I);return f.length!==g.length?!1:vt(k,I,X,tt,E,f)}else{if(F(k))return!F(I)||k.size!==I.size?!1:vt(k,I,X,tt,w);if(O(k))return!O(I)||k.size!==I.size?!1:vt(k,I,X,tt,A);if(v(k)){if(!W(k,I))return!1}else if(L(k)&&!K(k,I))return!1}return vt(k,I,X,tt,E)}function ft(k,I){return I.filter(function(X){return b(k,X)})}function vt(k,I,X,tt,Q,ct){if(arguments.length===5){ct=Object.keys(k);var p=Object.keys(I);if(ct.length!==p.length)return!1}for(var u=0;u<ct.length;u++)if(!_(I,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 T=f[u];if(b(k,T)){if(!b(I,T))return!1;ct.push(T),g++}else if(b(I,T))return!1}var B=h(I);if(f.length!==B.length&&ft(I,B).length!==g)return!1}else{var V=h(I);if(V.length!==0&&ft(I,V).length!==0)return!1}}if(ct.length===0&&(Q===E||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(I);if(bt!==void 0)return lt===bt}tt.position++}tt.val1.set(k,tt.position),tt.val2.set(I,tt.position);var _t=J(k,I,X,ct,tt,Q);return tt.val1.delete(k),tt.val2.delete(I),_t}function Pt(k,I,X,tt){for(var Q=l(k),ct=0;ct<Q.length;ct++){var p=Q[ct];if(rt(I,p,X,tt))return k.delete(p),!0}return!1}function Lt(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,I,X){var tt=Lt(X);return tt??(I.has(tt)&&!k.has(tt))}function Jt(k,I,X,tt,Q){var ct=Lt(X);if(ct!=null)return ct;var p=I.get(ct);return p===void 0&&!I.has(ct)||!rt(tt,p,!1,Q)?!1:!k.has(ct)&&rt(tt,p,!1,Q)}function qt(k,I,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(!I.has(u)){if(X||!Yt(k,I,u))return!1;Q===null&&(Q=new Set),Q.add(u)}}if(Q!==null){for(var f=l(I),g=0;g<f.length;g++){var T=f[g];if(s(T)==="object"&&T!==null){if(!Pt(Q,T,X,tt))return!1}else if(!X&&!k.has(T)&&!Pt(Q,T,X,tt))return!1}return Q.size===0}return!0}function $(k,I,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,I.get(f),Q,ct))return k.delete(f),!0}return!1}function he(k,I,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 T=I.get(f);if(T===void 0&&!I.has(f)||!rt(g,T,X,tt)){if(X||!Jt(k,I,f,g,tt))return!1;Q===null&&(Q=new Set),Q.add(f)}}}if(Q!==null){for(var B=d(I),V=0;V<B.length;V++){var lt=t(B[V],2),bt=lt[0],_t=lt[1];if(s(bt)==="object"&&bt!==null){if(!$(Q,k,bt,_t,X,tt))return!1}else if(!X&&(!k.has(bt)||!rt(k.get(bt),_t,!1,tt))&&!$(Q,k,bt,_t,!1,tt))return!1}return Q.size===0}return!0}function J(k,I,X,tt,Q,ct){var p=0;if(ct===w){if(!qt(k,I,X,Q))return!1}else if(ct===A){if(!he(k,I,X,Q))return!1}else if(ct===N)for(;p<k.length;p++)if(_(k,p)){if(!_(I,p)||!rt(k[p],I[p],X,Q))return!1}else{if(_(I,p))return!1;for(var u=Object.keys(k);p<u.length;p++){var f=u[p];if(!_(I,f)||!rt(k[f],I[f],X,Q))return!1}return u.length===Object.keys(I).length}for(p=0;p<tt.length;p++){var g=tt[p];if(!rt(k[g],I[g],X,Q))return!1}return!0}function gt(k,I){return rt(k,I,G)}function St(k,I){return rt(k,I,H)}return fc={isDeepEqual:gt,isDeepStrictEqual:St},fc}var lm;function dc(){if(lm)return Za.exports;lm=1;function t(w){"@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(w)}function e(w,A,C){return Object.defineProperty(w,"prototype",{writable:!1}),w}function n(w,A){if(!(w instanceof A))throw new TypeError("Cannot call a class as a function")}var r=Lp(),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=tE(),h=sn,m=h.inspect,y=sn.types,_=y.isPromise,b=y.isRegExp,P=uE(),x=rc(),v=hE("RegExp.prototype.test"),S,R;function O(){var w=vE();S=w.isDeepEqual,R=w.isDeepStrictEqual}var D=!1,F=Za.exports=et,q={};function L(w){throw w.message instanceof Error?w.message:new c(w)}function Y(w,A,C,z,j){var W=arguments.length,K;if(W===0)K="Failed";else if(W===1)C=w,w=void 0;else{if(D===!1){D=!0;var rt=zt.emitWarning?zt.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")}W===2&&(z="!=")}if(C instanceof Error)throw C;var ft={actual:w,expected:A,operator:z===void 0?"fail":z,stackStartFn:j||Y};C!==void 0&&(ft.message=C);var vt=new c(ft);throw K&&(vt.message=K,vt.generatedMessage=!0),vt}F.fail=Y,F.AssertionError=c;function Z(w,A,C,z){if(!C){var j=!1;if(A===0)j=!0,z="No value argument passed to `assert.ok()`";else if(z instanceof Error)throw z;var W=new c({actual:C,expected:!0,message:z,operator:"==",stackStartFn:w});throw W.generatedMessage=j,W}}function et(){for(var w=arguments.length,A=new Array(w),C=0;C<w;C++)A[C]=arguments[C];Z.apply(void 0,[et,A.length].concat(A))}F.ok=et,F.equal=function w(A,C,z){if(arguments.length<2)throw new d("actual","expected");A!=C&&L({actual:A,expected:C,message:z,operator:"==",stackStartFn:w})},F.notEqual=function w(A,C,z){if(arguments.length<2)throw new d("actual","expected");A==C&&L({actual:A,expected:C,message:z,operator:"!=",stackStartFn:w})},F.deepEqual=function w(A,C,z){if(arguments.length<2)throw new d("actual","expected");S===void 0&&O(),S(A,C)||L({actual:A,expected:C,message:z,operator:"deepEqual",stackStartFn:w})},F.notDeepEqual=function w(A,C,z){if(arguments.length<2)throw new d("actual","expected");S===void 0&&O(),S(A,C)&&L({actual:A,expected:C,message:z,operator:"notDeepEqual",stackStartFn:w})},F.deepStrictEqual=function w(A,C,z){if(arguments.length<2)throw new d("actual","expected");S===void 0&&O(),R(A,C)||L({actual:A,expected:C,message:z,operator:"deepStrictEqual",stackStartFn:w})},F.notDeepStrictEqual=st;function st(w,A,C){if(arguments.length<2)throw new d("actual","expected");S===void 0&&O(),R(w,A)&&L({actual:w,expected:A,message:C,operator:"notDeepStrictEqual",stackStartFn:st})}F.strictEqual=function w(A,C,z){if(arguments.length<2)throw new d("actual","expected");x(A,C)||L({actual:A,expected:C,message:z,operator:"strictEqual",stackStartFn:w})},F.notStrictEqual=function w(A,C,z){if(arguments.length<2)throw new d("actual","expected");x(A,C)&&L({actual:A,expected:C,message:z,operator:"notStrictEqual",stackStartFn:w})};var At=e(function w(A,C,z){var j=this;n(this,w),C.forEach(function(W){W in A&&(z!==void 0&&typeof z[W]=="string"&&b(A[W])&&v(A[W],z[W])?j[W]=z[W]:j[W]=A[W])})});function dt(w,A,C,z,j,W){if(!(C in w)||!R(w[C],A[C])){if(!z){var K=new At(w,j),rt=new At(A,j,w),ft=new c({actual:K,expected:rt,operator:"deepStrictEqual",stackStartFn:W});throw ft.actual=w,ft.expected=A,ft.operator=W.name,ft}L({actual:w,expected:A,message:z,operator:W.name,stackStartFn:W})}}function It(w,A,C,z){if(typeof A!="function"){if(b(A))return v(A,w);if(arguments.length===2)throw new s("expected",["Function","RegExp"],A);if(t(w)!=="object"||w===null){var j=new c({actual:w,expected:A,message:C,operator:"deepStrictEqual",stackStartFn:z});throw j.operator=z.name,j}var W=Object.keys(A);if(A instanceof Error)W.push("name","message");else if(W.length===0)throw new a("error",A,"may not be an empty object");return S===void 0&&O(),W.forEach(function(K){typeof w[K]=="string"&&b(A[K])&&v(A[K],w[K])||dt(w,A,K,C,W,z)}),!0}return A.prototype!==void 0&&w instanceof A?!0:Error.isPrototypeOf(A)?!1:A.call({},w)===!0}function at(w){if(typeof w!="function")throw new s("fn","Function",w);try{w()}catch(A){return A}return q}function ht(w){return _(w)||w!==null&&t(w)==="object"&&typeof w.then=="function"&&typeof w.catch=="function"}function U(w){return Promise.resolve().then(function(){var A;if(typeof w=="function"){if(A=w(),!ht(A))throw new l("instance of Promise","promiseFn",A)}else if(ht(w))A=w;else throw new s("promiseFn",["Function","Promise"],w);return Promise.resolve().then(function(){return A}).then(function(){return q}).catch(function(C){return C})})}function H(w,A,C,z){if(typeof C=="string"){if(arguments.length===4)throw new s("error",["Object","Error","Function","RegExp"],C);if(t(A)==="object"&&A!==null){if(A.message===C)throw new o("error/message",'The error message "'.concat(A.message,'" is identical to the message.'))}else if(A===C)throw new o("error/message",'The error "'.concat(A,'" is identical to the message.'));z=C,C=void 0}else if(C!=null&&t(C)!=="object"&&typeof C!="function")throw new s("error",["Object","Error","Function","RegExp"],C);if(A===q){var j="";C&&C.name&&(j+=" (".concat(C.name,")")),j+=z?": ".concat(z):".";var W=w.name==="rejects"?"rejection":"exception";L({actual:void 0,expected:C,operator:w.name,message:"Missing expected ".concat(W).concat(j),stackStartFn:w})}if(C&&!It(A,C,z,w))throw A}function G(w,A,C,z){if(A!==q){if(typeof C=="string"&&(z=C,C=void 0),!C||It(A,C)){var j=z?": ".concat(z):".",W=w.name==="doesNotReject"?"rejection":"exception";L({actual:A,expected:C,operator:w.name,message:"Got unwanted ".concat(W).concat(j,`
162
+ `)+'Actual message: "'.concat(A&&A.message,'"'),stackStartFn:w})}throw A}}F.throws=function w(A){for(var C=arguments.length,z=new Array(C>1?C-1:0),j=1;j<C;j++)z[j-1]=arguments[j];H.apply(void 0,[w,at(A)].concat(z))},F.rejects=function w(A){for(var C=arguments.length,z=new Array(C>1?C-1:0),j=1;j<C;j++)z[j-1]=arguments[j];return U(A).then(function(W){return H.apply(void 0,[w,W].concat(z))})},F.doesNotThrow=function w(A){for(var C=arguments.length,z=new Array(C>1?C-1:0),j=1;j<C;j++)z[j-1]=arguments[j];G.apply(void 0,[w,at(A)].concat(z))},F.doesNotReject=function w(A){for(var C=arguments.length,z=new Array(C>1?C-1:0),j=1;j<C;j++)z[j-1]=arguments[j];return U(A).then(function(W){return G.apply(void 0,[w,W].concat(z))})},F.ifError=function w(A){if(A!=null){var C="ifError got unwanted exception: ";t(A)==="object"&&typeof A.message=="string"?A.message.length===0&&A.constructor?C+=A.constructor.name:C+=A.message:C+=m(A);var z=new c({actual:A,expected:null,operator:"ifError",message:C,stackStartFn:w}),j=A.stack;if(typeof j=="string"){var W=j.split(`
163
+ `);W.shift();for(var K=z.stack.split(`
164
+ `),rt=0;rt<W.length;rt++){var ft=K.indexOf(W[rt]);if(ft!==-1){K=K.slice(0,ft);break}}z.stack="".concat(K.join(`
165
165
  `),`
166
- `).concat(q.join(`
167
- `))}throw z}};function E(b,A,C,z,j){if(!w(A))throw new s("regexp","RegExp",A);var q=j==="match";if(typeof b!="string"||v(A,b)!==q){if(C instanceof Error)throw C;var K=!C;C=C||(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:
166
+ `).concat(W.join(`
167
+ `))}throw z}};function E(w,A,C,z,j){if(!b(A))throw new s("regexp","RegExp",A);var W=j==="match";if(typeof w!="string"||v(A,w)!==W){if(C instanceof Error)throw C;var K=!C;C=C||(typeof w!="string"?'The "string" argument must be of type string. Received type '+"".concat(t(w)," (").concat(m(w),")"):(W?"The input did not match the regular expression ":"The input was expected to not match the regular expression ")+"".concat(m(A),`. Input:
168
168
 
169
- `).concat(m(b),`
170
- `));var rt=new c({actual:b,expected:A,message:C,operator:j,stackStartFn:z});throw rt.generatedMessage=K,rt}}L.match=function b(A,C,z){E(A,C,z,b,"match")},L.doesNotMatch=function b(A,C,z){E(A,C,z,b,"doesNotMatch")};function N(){for(var b=arguments.length,A=new Array(b),C=0;C<b;C++)A[C]=arguments[C];Z.apply(void 0,[N,A.length].concat(A))}return L.strict=k(N,L,{equal:L.strictEqual,deepEqual:L.deepStrictEqual,notEqual:L.notStrictEqual,notDeepEqual:L.notDeepStrictEqual}),L.strict.strict=L.strict,Ya.exports}var uc=sn,bE=lc();function rm(){return new Date().getTime()}var wE=Array.prototype.slice,ne,fc={};typeof fr<"u"&&fr.console?ne=fr.console:typeof window<"u"&&window.console?ne=window.console:ne={};for(var im=[[xE,"log"],[SE,"info"],[EE,"warn"],[AE,"error"],[TE,"time"],[PE,"timeEnd"],[kE,"trace"],[OE,"dir"],[CE,"assert"]],dc=0;dc<im.length;dc++){var om=im[dc],_E=om[0],sm=om[1];ne[sm]||(ne[sm]=_E)}var Wi=ne;function xE(){}function SE(){ne.log.apply(ne,arguments)}function EE(){ne.log.apply(ne,arguments)}function AE(){ne.warn.apply(ne,arguments)}function TE(t){fc[t]=rm()}function PE(t){var e=fc[t];if(!e)throw new Error("No such label: "+t);delete fc[t];var n=rm()-e;ne.log(t+": "+n+"ms")}function kE(){var t=new Error;t.name="Trace",t.message=uc.format.apply(null,arguments),ne.error(t.stack)}function OE(t){ne.log(uc.inspect(t)+`
171
- `)}function CE(t){if(!t){var e=wE.call(arguments,1);bE.ok(!1,uc.format.apply(null,e))}}function IE(t){Wi.log("✨ onNewSupportMessage",t),Ht.getState().addMessage(t.threadId,{support:!0,content:t.message.content,authorName:t.message.authorName,date:t.message.date,attachments:t.message.attachments,emojis:t.message.emojis})}function RE(...t){}function ME(t){const e=Ht.getState().setConversationOpen;e(t.threadId,!1)}function NE(t){const{setConversationCSMember:e,addMessage:n,tempConversationToThread:r}=Ht.getState();r(t.threadId),e(t.threadId,t.csMember),n(t.threadId,vw(t.csMember.displayName))}function DE(t){Wi.log("✨ onUpdatedSupportMessage",t),Ht.getState().updateMessage(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 BE(t){Wi.log("✨ onNewSupportMessage",t),Ht.getState().removeMessage(t.threadId,t.messageDate)}function LE(){return new Promise(t=>{const e=Ti(ye.api,{path:"/socket"});e.on("connect",async()=>(Wi.log("⚡ socket connected"),e.on("new-support-message",IE),e.on("updated-support-message",DE),e.on("deleted-support-message",BE),e.on("thread-closed",ME),e.on("thread-assigned",NE),t(e)))})}async function FE({name:t,email:e}){const n=JSON.stringify({guildId:ye.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(`${ye.api}/auth/token`,i)).json();return s.token&&s.token!=="undefined"&&(ti.set("discord-widget",s.token),Ht.getState().setToken(s.token)),s}async function jE(t){const e=new Headers;e.append("Content-Type","application/json"),e.append("Authorization",`Bearer ${t}`);try{const n=await fetch(`${ye.api}/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 VE(t){const e=new Headers;e.append("Content-Type","application/json"),e.append("Authorization",`Bearer ${t}`);try{const n=await fetch(`${ye.api}/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}}function am(t,e){const n=Array.from(new Map([...t.messages||[],...e.messages||[]].map(r=>[r.date,r])).values());return{...t,...e,messages:n}}async function $E(){const{conversations:t,setConversations:e,setConversationOpen:n,username:r,email:i}=Ht.getState(),o=await LE();let s=ti.get("discord-widget");if(!s)s=(await FE({name:r,email:i})).token;else{const a=await jE(s),l=await VE(s);RE(`ℹ️ returning user, ${a?"found an ongoing conversation":"no current conversation"}, ${l!=null&&l.length?`got ${l.length} past conversations`:"no past conversations"}.`);let d=[];if(a){const c=t.find(h=>h.threadId===a.threadId);c?d=[am(c,a)]:d=[{...a}]}else{const c=t.find(h=>h.status==="open");c&&n(c.threadId,!1)}l!=null&&l.length&&(d=[...d,...l.map(c=>{const h=t.find(m=>m.threadId===c.threadId);return h?am(h,c):c})]),e(d)}o.emit("identify",{jwt:s})}async function UE(){const{setGuildSettings:t,guildSettings:e}=Ht.getState();if(e.lastUpdate)return;const n=new Headers;n.append("Content-Type","application/json");try{const i=await(await fetch(`${ye.api}/guildSettings/${ye.app_id}`,{method:"GET",headers:n})).json();t(i)}catch{}}async function zE(){const t=new Headers;t.append("Content-Type","application/json");try{return(await(await fetch(`${ye.api}/guildSettings/status/${ye.app_id}`,{method:"GET",headers:t})).json()).active}catch{return!1}}function WE(){const{isChatOpen:t,setChatVisible:e,toggleChatOpen:n,isNetworkInitialized:r,setNetworkInitialized:i,username:o,email:s,addMessage:a,conversations:l,_REHYDRATED_:d}=Ht(),[c,h]=wt(!1);yt(()=>{(async()=>{const y=await zE();h(y)})()},[]);const m=kt(()=>(!o||!s)&&!l.filter(_=>_.messages.filter(w=>w.customRenderer===Pn.IntroduceYourself)).length?(a("TEMP",gw),!0):!1,[o,s,a,l]);return yt(()=>{!d||(UE(),m())||(o||s)&&!r&&($E(),i(!0))},[r,i,m,o,s,d]),yt(()=>{if(t)e(!0);else{const y=setTimeout(()=>e(!1),300);return()=>clearTimeout(y)}},[t,e]),c?M(Ot,{children:[M(bb,{onClick:()=>n(),isOpen:t}),M(e1,{}),M("div",{id:"deskcord-lightbox-portal",style:{zIndex:2147482e3}})]}):null}const qE=()=>{const[t,e]=wt(!1);return yt(()=>{const n=document.getElementsByTagName("body")[0],r=document.createElement("style");r.textContent=Rm,n.appendChild(r);const i=document.createElement("style");i.textContent=Mm,n.appendChild(i),e(!0)},[]),t&&M(WE,{})};let kr=document.getElementById("deskcord-root");kr||(kr=document.createElement("div"),kr.id="deskcord-root",document.body.appendChild(kr)),Nr.render(M(Nr.StrictMode,{children:M(qE,{})}),kr)})();
169
+ `).concat(m(w),`
170
+ `));var rt=new c({actual:w,expected:A,message:C,operator:j,stackStartFn:z});throw rt.generatedMessage=K,rt}}F.match=function w(A,C,z){E(A,C,z,w,"match")},F.doesNotMatch=function w(A,C,z){E(A,C,z,w,"doesNotMatch")};function N(){for(var w=arguments.length,A=new Array(w),C=0;C<w;C++)A[C]=arguments[C];Z.apply(void 0,[N,A.length].concat(A))}return F.strict=P(N,F,{equal:F.strictEqual,deepEqual:F.deepStrictEqual,notEqual:F.notStrictEqual,notDeepEqual:F.notDeepStrictEqual}),F.strict.strict=F.strict,Za.exports}var hc=sn,bE=dc();function um(){return new Date().getTime()}var wE=Array.prototype.slice,ne,pc={};typeof fr<"u"&&fr.console?ne=fr.console:typeof window<"u"&&window.console?ne=window.console:ne={};for(var fm=[[xE,"log"],[SE,"info"],[EE,"warn"],[AE,"error"],[TE,"time"],[PE,"timeEnd"],[kE,"trace"],[OE,"dir"],[CE,"assert"]],mc=0;mc<fm.length;mc++){var dm=fm[mc],_E=dm[0],hm=dm[1];ne[hm]||(ne[hm]=_E)}var qi=ne;function xE(){}function SE(){ne.log.apply(ne,arguments)}function EE(){ne.log.apply(ne,arguments)}function AE(){ne.warn.apply(ne,arguments)}function TE(t){pc[t]=um()}function PE(t){var e=pc[t];if(!e)throw new Error("No such label: "+t);delete pc[t];var n=um()-e;ne.log(t+": "+n+"ms")}function kE(){var t=new Error;t.name="Trace",t.message=hc.format.apply(null,arguments),ne.error(t.stack)}function OE(t){ne.log(hc.inspect(t)+`
171
+ `)}function CE(t){if(!t){var e=wE.call(arguments,1);bE.ok(!1,hc.format.apply(null,e))}}function IE(t){qi.log("✨ onNewSupportMessage",t),Ht.getState().addMessage(t.threadId,{support:!0,content:t.message.content,authorName:t.message.authorName,date:t.message.date,attachments:t.message.attachments,emojis:t.message.emojis})}function RE(...t){}function ME(t){const e=Ht.getState().setConversationOpen;e(t.threadId,!1)}function NE(t){const{setConversationCSMember:e,addMessage:n,tempConversationToThread:r}=Ht.getState();r(t.threadId),e(t.threadId,t.csMember),n(t.threadId,Aw(t.csMember.displayName))}function BE(t){qi.log("✨ onUpdatedSupportMessage",t),Ht.getState().updateMessage(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 DE(t){qi.log("✨ onNewSupportMessage",t),Ht.getState().removeMessage(t.threadId,t.messageDate)}function FE(){return new Promise(t=>{const e=Ti(ye.api,{path:"/socket"});e.on("connect",async()=>(qi.log("⚡ socket connected"),e.on("new-support-message",IE),e.on("updated-support-message",BE),e.on("deleted-support-message",DE),e.on("thread-closed",ME),e.on("thread-assigned",NE),t(e)))})}async function LE({name:t,email:e}){const n=JSON.stringify({guildId:ye.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(`${ye.api}/auth/token`,i)).json();return s.token&&s.token!=="undefined"&&(ti.set("discord-widget",s.token),Ht.getState().setToken(s.token)),s}async function jE(t){const e=new Headers;e.append("Content-Type","application/json"),e.append("Authorization",`Bearer ${t}`);try{const n=await fetch(`${ye.api}/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 VE(t){const e=new Headers;e.append("Content-Type","application/json"),e.append("Authorization",`Bearer ${t}`);try{const n=await fetch(`${ye.api}/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}}function pm(t,e){const n=Array.from(new Map([...t.messages||[],...e.messages||[]].map(r=>[r.date,r])).values());return{...t,...e,messages:n}}async function $E(){const{conversations:t,setConversations:e,setConversationOpen:n,username:r,email:i}=Ht.getState(),o=await FE();let s=ti.get("discord-widget");if(!s)s=(await LE({name:r,email:i})).token;else{const a=await jE(s),l=await VE(s);RE(`ℹ️ returning user, ${a?"found an ongoing conversation":"no current conversation"}, ${l!=null&&l.length?`got ${l.length} past conversations`:"no past conversations"}.`);let d=[];if(a){const c=t.find(h=>h.threadId===a.threadId);c?d=[pm(c,a)]:d=[{...a}]}else{const c=t.find(h=>h.status==="open");c&&n(c.threadId,!1)}l!=null&&l.length&&(d=[...d,...l.map(c=>{const h=t.find(m=>m.threadId===c.threadId);return h?pm(h,c):c})]),e(d)}o.emit("identify",{jwt:s})}async function UE(){const{setGuildSettings:t,guildSettings:e}=Ht.getState();if(e.lastUpdate)return;const n=new Headers;n.append("Content-Type","application/json");try{const i=await(await fetch(`${ye.api}/guildSettings/${ye.app_id}`,{method:"GET",headers:n})).json();t(i)}catch{}}async function zE(){const t=new Headers;t.append("Content-Type","application/json");try{return(await(await fetch(`${ye.api}/guildSettings/status/${ye.app_id}`,{method:"GET",headers:t})).json()).active}catch{return!1}}function qE(){const{isChatOpen:t,setChatVisible:e,toggleChatOpen:n,isNetworkInitialized:r,setNetworkInitialized:i,username:o,email:s,addMessage:a,conversations:l,_REHYDRATED_:d}=Ht(),[c,h]=wt(!1);yt(()=>{(async()=>{const y=await zE();h(y)})()},[]);const m=kt(()=>(!o||!s)&&!l.filter(_=>_.messages.filter(b=>b.customRenderer===Pn.IntroduceYourself)).length?(a("TEMP",Ew),!0):!1,[o,s,a,l]);return yt(()=>{!d||(UE(),m())||(o||s)&&!r&&($E(),i(!0))},[r,i,m,o,s,d]),yt(()=>{if(t)e(!0);else{const y=setTimeout(()=>e(!1),300);return()=>clearTimeout(y)}},[t,e]),c?M(Ot,{children:[M(Tb,{onClick:()=>n(),isOpen:t}),M(c1,{}),M("div",{id:"deskcord-lightbox-portal",style:{zIndex:2147482e3}})]}):null}const WE=()=>{const[t,e]=wt(!1);return yt(()=>{const n=document.getElementsByTagName("body")[0],r=document.createElement("style");r.textContent=jm,n.appendChild(r);const i=document.createElement("style");i.textContent=Vm,n.appendChild(i),e(!0)},[]),t&&M(qE,{})};let kr=document.getElementById("deskcord-root");kr||(kr=document.createElement("div"),kr.id="deskcord-root",document.body.appendChild(kr)),Nr.render(M(Nr.StrictMode,{children:M(WE,{})}),kr)})();