deskcord 0.1.1 → 0.1.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.
- package/dist/deskcord.min.js +25 -25
- package/package.json +1 -1
package/dist/deskcord.min.js
CHANGED
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
(function(){"use strict";var Kt,ae,Ci,gt,Bi,Mi,xn,$i,En,Sn,An,Fi,Xt={},ji=[],Dl=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Er=Array.isArray;function st(t,e){for(var r in e)t[r]=e[r];return t}function kn(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function te(t,e,r){var n,o,i,c={};for(i in e)i=="key"?n=e[i]:i=="ref"?o=e[i]:c[i]=e[i];if(arguments.length>2&&(c.children=arguments.length>3?Kt.call(arguments,2):r),typeof t=="function"&&t.defaultProps!=null)for(i in t.defaultProps)c[i]===void 0&&(c[i]=t.defaultProps[i]);return Zt(t,c,n,o,null)}function Zt(t,e,r,n,o){var i={type:t,props:e,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++Ci,__i:-1,__u:0};return o==null&&ae.vnode!=null&&ae.vnode(i),i}function Di(){return{current:null}}function Ce(t){return t.children}function Ze(t,e){this.props=t,this.context=e}function Tt(t,e){if(e==null)return t.__?Tt(t.__,t.__i+1):null;for(var r;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null)return r.__e;return typeof t.type=="function"?Tt(t):null}function Li(t){var e,r;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null){t.__e=t.__c.base=r.__e;break}return Li(t)}}function On(t){(!t.__d&&(t.__d=!0)&>.push(t)&&!Sr.__r++||Bi!==ae.debounceRendering)&&((Bi=ae.debounceRendering)||Mi)(Sr)}function Sr(){var t,e,r,n,o,i,c,l;for(gt.sort(xn);t=gt.shift();)t.__d&&(e=gt.length,n=void 0,i=(o=(r=t).__v).__e,c=[],l=[],r.__P&&((n=st({},o)).__v=o.__v+1,ae.vnode&&ae.vnode(n),In(r.__P,n,o,r.__n,r.__P.namespaceURI,32&o.__u?[i]:null,c,i??Tt(o),!!(32&o.__u),l),n.__v=o.__v,n.__.__k[n.__i]=n,Vi(c,n,l),n.__e!=i&&Li(n)),gt.length>e&>.sort(xn));Sr.__r=0}function Ui(t,e,r,n,o,i,c,l,d,p,f){var y,v,w,N,A,C,P=n&&n.__k||ji,_=e.length;for(d=Ll(r,e,P,d,_),y=0;y<_;y++)(w=r.__k[y])!=null&&(v=w.__i===-1?Xt:P[w.__i]||Xt,w.__i=y,C=In(t,w,v,o,i,c,l,d,p,f),N=w.__e,w.ref&&v.ref!=w.ref&&(v.ref&&Pn(v.ref,null,w),f.push(w.ref,w.__c||N,w)),A==null&&N!=null&&(A=N),4&w.__u||v.__k===w.__k?d=zi(w,d,t):typeof w.type=="function"&&C!==void 0?d=C:N&&(d=N.nextSibling),w.__u&=-7);return r.__e=A,d}function Ll(t,e,r,n,o){var i,c,l,d,p,f=r.length,y=f,v=0;for(t.__k=new Array(o),i=0;i<o;i++)(c=e[i])!=null&&typeof c!="boolean"&&typeof c!="function"?(d=i+v,(c=t.__k[i]=typeof c=="string"||typeof c=="number"||typeof c=="bigint"||c.constructor==String?Zt(null,c,null,null,null):Er(c)?Zt(Ce,{children:c},null,null,null):c.constructor===void 0&&c.__b>0?Zt(c.type,c.props,c.key,c.ref?c.ref:null,c.__v):c).__=t,c.__b=t.__b+1,l=null,(p=c.__i=Ul(c,r,d,y))!==-1&&(y--,(l=r[p])&&(l.__u|=2)),l==null||l.__v===null?(p==-1&&v--,typeof c.type!="function"&&(c.__u|=4)):p!=d&&(p==d-1?v--:p==d+1?v++:(p>d?v--:v++,c.__u|=4))):t.__k[i]=null;if(y)for(i=0;i<f;i++)(l=r[i])!=null&&!(2&l.__u)&&(l.__e==n&&(n=Tt(l)),Hi(l,l));return n}function zi(t,e,r){var n,o;if(typeof t.type=="function"){for(n=t.__k,o=0;n&&o<n.length;o++)n[o]&&(n[o].__=t,e=zi(n[o],e,r));return e}t.__e!=e&&(e&&t.type&&!r.contains(e)&&(e=Tt(t)),r.insertBefore(t.__e,e||null),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function ct(t,e){return e=e||[],t==null||typeof t=="boolean"||(Er(t)?t.some(function(r){ct(r,e)}):e.push(t)),e}function Ul(t,e,r,n){var o,i,c=t.key,l=t.type,d=e[r];if(d===null||d&&c==d.key&&l===d.type&&!(2&d.__u))return r;if(n>(d!=null&&!(2&d.__u)?1:0))for(o=r-1,i=r+1;o>=0||i<e.length;){if(o>=0){if((d=e[o])&&!(2&d.__u)&&c==d.key&&l===d.type)return o;o--}if(i<e.length){if((d=e[i])&&!(2&d.__u)&&c==d.key&&l===d.type)return i;i++}}return-1}function qi(t,e,r){e[0]=="-"?t.setProperty(e,r??""):t[e]=r==null?"":typeof r!="number"||Dl.test(e)?r:r+"px"}function Ar(t,e,r,n,o){var i;e:if(e=="style")if(typeof r=="string")t.style.cssText=r;else{if(typeof n=="string"&&(t.style.cssText=n=""),n)for(e in n)r&&e in r||qi(t.style,e,"");if(r)for(e in r)n&&r[e]===n[e]||qi(t.style,e,r[e])}else if(e[0]=="o"&&e[1]=="n")i=e!=(e=e.replace($i,"$1")),e=e.toLowerCase()in t||e=="onFocusOut"||e=="onFocusIn"?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+i]=r,r?n?r.u=n.u:(r.u=En,t.addEventListener(e,i?An:Sn,i)):t.removeEventListener(e,i?An:Sn,i);else{if(o=="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]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&r==1?"":r))}}function Wi(t){return function(e){if(this.l){var r=this.l[e.type+t];if(e.t==null)e.t=En++;else if(e.t<r.u)return;return r(ae.event?ae.event(e):e)}}}function In(t,e,r,n,o,i,c,l,d,p){var f,y,v,w,N,A,C,P,_,T,$,B,q,W,Z,U,K,Q=e.type;if(e.constructor!==void 0)return null;128&r.__u&&(d=!!(32&r.__u),i=[l=e.__e=r.__e]),(f=ae.__b)&&f(e);e:if(typeof Q=="function")try{if(P=e.props,_="prototype"in Q&&Q.prototype.render,T=(f=Q.contextType)&&n[f.__c],$=f?T?T.props.value:f.__:n,r.__c?C=(y=e.__c=r.__c).__=y.__E:(_?e.__c=y=new Q(P,$):(e.__c=y=new Ze(P,$),y.constructor=Q,y.render=ql),T&&T.sub(y),y.props=P,y.state||(y.state={}),y.context=$,y.__n=n,v=y.__d=!0,y.__h=[],y._sb=[]),_&&y.__s==null&&(y.__s=y.state),_&&Q.getDerivedStateFromProps!=null&&(y.__s==y.state&&(y.__s=st({},y.__s)),st(y.__s,Q.getDerivedStateFromProps(P,y.__s))),w=y.props,N=y.state,y.__v=e,v)_&&Q.getDerivedStateFromProps==null&&y.componentWillMount!=null&&y.componentWillMount(),_&&y.componentDidMount!=null&&y.__h.push(y.componentDidMount);else{if(_&&Q.getDerivedStateFromProps==null&&P!==w&&y.componentWillReceiveProps!=null&&y.componentWillReceiveProps(P,$),!y.__e&&(y.shouldComponentUpdate!=null&&y.shouldComponentUpdate(P,y.__s,$)===!1||e.__v==r.__v)){for(e.__v!=r.__v&&(y.props=P,y.state=y.__s,y.__d=!1),e.__e=r.__e,e.__k=r.__k,e.__k.some(function(re){re&&(re.__=e)}),B=0;B<y._sb.length;B++)y.__h.push(y._sb[B]);y._sb=[],y.__h.length&&c.push(y);break e}y.componentWillUpdate!=null&&y.componentWillUpdate(P,y.__s,$),_&&y.componentDidUpdate!=null&&y.__h.push(function(){y.componentDidUpdate(w,N,A)})}if(y.context=$,y.props=P,y.__P=t,y.__e=!1,q=ae.__r,W=0,_){for(y.state=y.__s,y.__d=!1,q&&q(e),f=y.render(y.props,y.state,y.context),Z=0;Z<y._sb.length;Z++)y.__h.push(y._sb[Z]);y._sb=[]}else do y.__d=!1,q&&q(e),f=y.render(y.props,y.state,y.context),y.state=y.__s;while(y.__d&&++W<25);y.state=y.__s,y.getChildContext!=null&&(n=st(st({},n),y.getChildContext())),_&&!v&&y.getSnapshotBeforeUpdate!=null&&(A=y.getSnapshotBeforeUpdate(w,N)),l=Ui(t,Er(U=f!=null&&f.type===Ce&&f.key==null?f.props.children:f)?U:[U],e,r,n,o,i,c,l,d,p),y.base=e.__e,e.__u&=-161,y.__h.length&&c.push(y),C&&(y.__E=y.__=null)}catch(re){if(e.__v=null,d||i!=null)if(re.then){for(e.__u|=d?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;i[i.indexOf(l)]=null,e.__e=l}else for(K=i.length;K--;)kn(i[K]);else e.__e=r.__e,e.__k=r.__k;ae.__e(re,e,r)}else i==null&&e.__v==r.__v?(e.__k=r.__k,e.__e=r.__e):l=e.__e=zl(r.__e,e,r,n,o,i,c,d,p);return(f=ae.diffed)&&f(e),128&e.__u?void 0:l}function Vi(t,e,r){for(var n=0;n<r.length;n++)Pn(r[n],r[++n],r[++n]);ae.__c&&ae.__c(e,t),t.some(function(o){try{t=o.__h,o.__h=[],t.some(function(i){i.call(o)})}catch(i){ae.__e(i,o.__v)}})}function zl(t,e,r,n,o,i,c,l,d){var p,f,y,v,w,N,A,C=r.props,P=e.props,_=e.type;if(_=="svg"?o="http://www.w3.org/2000/svg":_=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),i!=null){for(p=0;p<i.length;p++)if((w=i[p])&&"setAttribute"in w==!!_&&(_?w.localName==_:w.nodeType==3)){t=w,i[p]=null;break}}if(t==null){if(_==null)return document.createTextNode(P);t=document.createElementNS(o,_,P.is&&P),l&&(ae.__m&&ae.__m(e,i),l=!1),i=null}if(_===null)C===P||l&&t.data===P||(t.data=P);else{if(i=i&&Kt.call(t.childNodes),C=r.props||Xt,!l&&i!=null)for(C={},p=0;p<t.attributes.length;p++)C[(w=t.attributes[p]).name]=w.value;for(p in C)if(w=C[p],p!="children"){if(p=="dangerouslySetInnerHTML")y=w;else if(!(p in P)){if(p=="value"&&"defaultValue"in P||p=="checked"&&"defaultChecked"in P)continue;Ar(t,p,null,w,o)}}for(p in P)w=P[p],p=="children"?v=w:p=="dangerouslySetInnerHTML"?f=w:p=="value"?N=w:p=="checked"?A=w:l&&typeof w!="function"||C[p]===w||Ar(t,p,w,C[p],o);if(f)l||y&&(f.__html===y.__html||f.__html===t.innerHTML)||(t.innerHTML=f.__html),e.__k=[];else if(y&&(t.innerHTML=""),Ui(t,Er(v)?v:[v],e,r,n,_=="foreignObject"?"http://www.w3.org/1999/xhtml":o,i,c,i?i[0]:r.__k&&Tt(r,0),l,d),i!=null)for(p=i.length;p--;)kn(i[p]);l||(p="value",_=="progress"&&N==null?t.removeAttribute("value"):N!==void 0&&(N!==t[p]||_=="progress"&&!N||_=="option"&&N!==C[p])&&Ar(t,p,N,C[p],o),p="checked",A!==void 0&&A!==t[p]&&Ar(t,p,A,C[p],o))}return t}function Pn(t,e,r){try{if(typeof t=="function"){var n=typeof t.__u=="function";n&&t.__u(),n&&e==null||(t.__u=t(e))}else t.current=e}catch(o){ae.__e(o,r)}}function Hi(t,e,r){var n,o;if(ae.unmount&&ae.unmount(t),(n=t.ref)&&(n.current&&n.current!==t.__e||Pn(n,null,e)),(n=t.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(i){ae.__e(i,e)}n.base=n.__P=null}if(n=t.__k)for(o=0;o<n.length;o++)n[o]&&Hi(n[o],e,r||typeof t.type!="function");r||kn(t.__e),t.__c=t.__=t.__e=void 0}function ql(t,e,r){return this.constructor(t,r)}function Qt(t,e,r){var n,o,i,c;e==document&&(e=document.documentElement),ae.__&&ae.__(t,e),o=(n=typeof r=="function")?null:r&&r.__k||e.__k,i=[],c=[],In(e,t=(!n&&r||e).__k=te(Ce,null,[t]),o||Xt,Xt,e.namespaceURI,!n&&r?[r]:o?null:e.firstChild?Kt.call(e.childNodes):null,i,!n&&r?r:o?o.__e:e.firstChild,n,c),Vi(i,t,c)}function Gi(t,e){Qt(t,e,Gi)}function Wl(t,e,r){var n,o,i,c,l=st({},t.props);for(i in t.type&&t.type.defaultProps&&(c=t.type.defaultProps),e)i=="key"?n=e[i]:i=="ref"?o=e[i]:l[i]=e[i]===void 0&&c!==void 0?c[i]:e[i];return arguments.length>2&&(l.children=arguments.length>3?Kt.call(arguments,2):r),Zt(t.type,l,n||t.key,o||t.ref,null)}function lt(t,e){var r={__c:e="__cC"+Fi++,__:t,Consumer:function(n,o){return n.children(o)},Provider:function(n){var o,i;return this.getChildContext||(o=new Set,(i={})[e]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){o=null},this.shouldComponentUpdate=function(c){this.props.value!==c.value&&o.forEach(function(l){l.__e=!0,On(l)})},this.sub=function(c){o.add(c);var l=c.componentWillUnmount;c.componentWillUnmount=function(){o&&o.delete(c),l&&l.call(c)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r}Kt=ji.slice,ae={__e:function(t,e,r,n){for(var o,i,c;e=e.__;)if((o=e.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(t)),c=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(t,n||{}),c=o.__d),c)return o.__E=o}catch(l){t=l}throw t}},Ci=0,Ze.prototype.setState=function(t,e){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=st({},this.state),typeof t=="function"&&(t=t(st({},r),this.props)),t&&st(r,t),t!=null&&this.__v&&(e&&this._sb.push(e),On(this))},Ze.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),On(this))},Ze.prototype.render=Ce,gt=[],Mi=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,xn=function(t,e){return t.__v.__b-e.__v.__b},Sr.__r=0,$i=/(PointerCapture)$|Capture$/i,En=0,Sn=Wi(!1),An=Wi(!0),Fi=0;var Vl=0;function I(t,e,r,n,o,i){e||(e={});var c,l,d=e;if("ref"in d)for(l in d={},e)l=="ref"?c=e[l]:d[l]=e[l];var p={type:t,props:d,key:r,ref:c,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Vl,__i:-1,__u:0,__source:o,__self:i};if(typeof t=="function"&&(c=t.defaultProps))for(l in c)d[l]===void 0&&(d[l]=c[l]);return ae.vnode&&ae.vnode(p),p}var ut,be,Nn,Yi,Rt=0,Ji=[],Oe=ae,Ki=Oe.__b,Xi=Oe.__r,Zi=Oe.diffed,Qi=Oe.__c,ea=Oe.unmount,ta=Oe.__;function mt(t,e){Oe.__h&&Oe.__h(be,t,Rt||e),Rt=0;var r=be.__H||(be.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({}),r.__[t]}function we(t){return Rt=1,er(na,t)}function er(t,e,r){var n=mt(ut++,2);if(n.t=t,!n.__c&&(n.__=[r?r(e):na(void 0,e),function(l){var d=n.__N?n.__N[0]:n.__[0],p=n.t(d,l);d!==p&&(n.__N=[p,n.__[1]],n.__c.setState({}))}],n.__c=be,!be.u)){var o=function(l,d,p){if(!n.__c.__H)return!0;var f=n.__c.__H.__.filter(function(v){return!!v.__c});if(f.every(function(v){return!v.__N}))return!i||i.call(this,l,d,p);var y=n.__c.props!==l;return f.forEach(function(v){if(v.__N){var w=v.__[0];v.__=v.__N,v.__N=void 0,w!==v.__[0]&&(y=!0)}}),i&&i.call(this,l,d,p)||y};be.u=!0;var i=be.shouldComponentUpdate,c=be.componentWillUpdate;be.componentWillUpdate=function(l,d,p){if(this.__e){var f=i;i=void 0,o(l,d,p),i=f}c&&c.call(this,l,d,p)},be.shouldComponentUpdate=o}return n.__N||n.__}function me(t,e){var r=mt(ut++,3);!Oe.__s&&Bn(r.__H,e)&&(r.__=t,r.i=e,be.__H.__h.push(r))}function yt(t,e){var r=mt(ut++,4);!Oe.__s&&Bn(r.__H,e)&&(r.__=t,r.i=e,be.__h.push(r))}function ce(t){return Rt=5,Ye(function(){return{current:t}},[])}function tr(t,e,r){Rt=6,yt(function(){return typeof t=="function"?(t(e()),function(){return t(null)}):t?(t.current=e(),function(){return t.current=null}):void 0},r==null?r:r.concat(t))}function Ye(t,e){var r=mt(ut++,7);return Bn(r.__H,e)&&(r.__=t(),r.__H=e,r.__h=t),r.__}function Ie(t,e){return Rt=8,Ye(function(){return t},e)}function kr(t){var e=be.context[t.__c],r=mt(ut++,9);return r.c=t,e?(r.__==null&&(r.__=!0,e.sub(be)),e.props.value):t.__}function Tn(t,e){Oe.useDebugValue&&Oe.useDebugValue(e?e(t):t)}function Hl(t){var e=mt(ut++,10),r=we();return e.__=t,be.componentDidCatch||(be.componentDidCatch=function(n,o){e.__&&e.__(n,o),r[1](n)}),[r[0],function(){r[1](void 0)}]}function Rn(){var t=mt(ut++,11);if(!t.__){for(var e=be.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var r=e.__m||(e.__m=[0,0]);t.__="P"+r[0]+"-"+r[1]++}return t.__}function Gl(){for(var t;t=Ji.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Or),t.__H.__h.forEach(Cn),t.__H.__h=[]}catch(e){t.__H.__h=[],Oe.__e(e,t.__v)}}Oe.__b=function(t){be=null,Ki&&Ki(t)},Oe.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),ta&&ta(t,e)},Oe.__r=function(t){Xi&&Xi(t),ut=0;var e=(be=t.__c).__H;e&&(Nn===be?(e.__h=[],be.__h=[],e.__.forEach(function(r){r.__N&&(r.__=r.__N),r.i=r.__N=void 0})):(e.__h.forEach(Or),e.__h.forEach(Cn),e.__h=[],ut=0)),Nn=be},Oe.diffed=function(t){Zi&&Zi(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Ji.push(e)!==1&&Yi===Oe.requestAnimationFrame||((Yi=Oe.requestAnimationFrame)||Yl)(Gl)),e.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.i=void 0})),Nn=be=null},Oe.__c=function(t,e){e.some(function(r){try{r.__h.forEach(Or),r.__h=r.__h.filter(function(n){return!n.__||Cn(n)})}catch(n){e.some(function(o){o.__h&&(o.__h=[])}),e=[],Oe.__e(n,r.__v)}}),Qi&&Qi(t,e)},Oe.unmount=function(t){ea&&ea(t);var e,r=t.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{Or(n)}catch(o){e=o}}),r.__H=void 0,e&&Oe.__e(e,r.__v))};var ra=typeof requestAnimationFrame=="function";function Yl(t){var e,r=function(){clearTimeout(n),ra&&cancelAnimationFrame(e),setTimeout(t)},n=setTimeout(r,100);ra&&(e=requestAnimationFrame(r))}function Or(t){var e=be,r=t.__c;typeof r=="function"&&(t.__c=void 0,r()),be=e}function Cn(t){var e=be;t.__c=t.__(),be=e}function Bn(t,e){return!t||t.length!==e.length||e.some(function(r,n){return r!==t[n]})}function na(t,e){return typeof e=="function"?e(t):e}function oa(t,e){for(var r in e)t[r]=e[r];return t}function Mn(t,e){for(var r in t)if(r!=="__source"&&!(r in e))return!0;for(var n in e)if(n!=="__source"&&t[n]!==e[n])return!0;return!1}function $n(t,e){var r=e(),n=we({t:{__:r,u:e}}),o=n[0].t,i=n[1];return yt(function(){o.__=r,o.u=e,Fn(o)&&i({t:o})},[t,r,e]),me(function(){return Fn(o)&&i({t:o}),t(function(){Fn(o)&&i({t:o})})},[t]),r}function Fn(t){var e,r,n=t.u,o=t.__;try{var i=n();return!((e=o)===(r=i)&&(e!==0||1/e==1/r)||e!=e&&r!=r)}catch{return!0}}function jn(t){t()}function Dn(t){return t}function Ln(){return[!1,jn]}var Un=yt;function Ir(t,e){this.props=t,this.context=e}function ia(t,e){function r(o){var i=this.props.ref,c=i==o.ref;return!c&&i&&(i.call?i(null):i.current=null),e?!e(this.props,o)||!c:Mn(this.props,o)}function n(o){return this.shouldComponentUpdate=r,te(t,o)}return n.displayName="Memo("+(t.displayName||t.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(Ir.prototype=new Ze).isPureReactComponent=!0,Ir.prototype.shouldComponentUpdate=function(t,e){return Mn(this.props,t)||Mn(this.state,e)};var aa=ae.__b;ae.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),aa&&aa(t)};var Jl=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function _t(t){function e(r){var n=oa({},r);return delete n.ref,t(n,r.ref||null)}return e.$$typeof=Jl,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var sa=function(t,e){return t==null?null:ct(ct(t).map(e))},ca={map:sa,forEach:sa,count:function(t){return t?ct(t).length:0},only:function(t){var e=ct(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:ct},Kl=ae.__e;ae.__e=function(t,e,r,n){if(t.then){for(var o,i=e;i=i.__;)if((o=i.__c)&&o.__c)return e.__e==null&&(e.__e=r.__e,e.__k=r.__k),o.__c(t,e)}Kl(t,e,r,n)};var la=ae.unmount;function ua(t,e,r){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(n){typeof n.__c=="function"&&n.__c()}),t.__c.__H=null),(t=oa({},t)).__c!=null&&(t.__c.__P===r&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map(function(n){return ua(n,e,r)})),t}function fa(t,e,r){return t&&r&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(n){return fa(n,e,r)}),t.__c&&t.__c.__P===e&&(t.__e&&r.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=r)),t}function rr(){this.__u=0,this.o=null,this.__b=null}function da(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function pa(t){var e,r,n;function o(i){if(e||(e=t()).then(function(c){r=c.default||c},function(c){n=c}),n)throw n;if(!r)throw e;return te(r,i)}return o.displayName="Lazy",o.__f=!0,o}function Ct(){this.i=null,this.l=null}ae.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),la&&la(t)},(rr.prototype=new Ze).__c=function(t,e){var r=e.__c,n=this;n.o==null&&(n.o=[]),n.o.push(r);var o=da(n.__v),i=!1,c=function(){i||(i=!0,r.__R=null,o?o(l):l())};r.__R=c;var l=function(){if(!--n.__u){if(n.state.__a){var d=n.state.__a;n.__v.__k[0]=fa(d,d.__c.__P,d.__c.__O)}var p;for(n.setState({__a:n.__b=null});p=n.o.pop();)p.forceUpdate()}};n.__u++||32&e.__u||n.setState({__a:n.__b=n.__v.__k[0]}),t.then(c,c)},rr.prototype.componentWillUnmount=function(){this.o=[]},rr.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=ua(this.__b,r,n.__O=n.__P)}this.__b=null}var o=e.__a&&te(Ce,null,t.fallback);return o&&(o.__u&=-33),[te(Ce,null,e.__a?null:t.children),o]};var ha=function(t,e,r){if(++r[1]===r[0]&&t.l.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.l.size))for(r=t.i;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;t.i=r=r[2]}};function Xl(t){return this.getChildContext=function(){return t.context},t.children}function Zl(t){var e=this,r=t.h;e.componentWillUnmount=function(){Qt(null,e.v),e.v=null,e.h=null},e.h&&e.h!==r&&e.componentWillUnmount(),e.v||(e.h=r,e.v={nodeType:1,parentNode:r,childNodes:[],contains:function(){return!0},appendChild:function(n){this.childNodes.push(n),e.h.appendChild(n)},insertBefore:function(n,o){this.childNodes.push(n),e.h.insertBefore(n,o)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),e.h.removeChild(n)}}),Qt(te(Xl,{context:e.context},t.__v),e.v)}function zn(t,e){var r=te(Zl,{__v:t,h:e});return r.containerInfo=e,r}(Ct.prototype=new Ze).__a=function(t){var e=this,r=da(e.__v),n=e.l.get(t);return n[0]++,function(o){var i=function(){e.props.revealOrder?(n.push(o),ha(e,t,n)):o()};r?r(i):i()}},Ct.prototype.render=function(t){this.i=null,this.l=new Map;var e=ct(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var r=e.length;r--;)this.l.set(e[r],this.i=[1,0,this.i]);return t.children},Ct.prototype.componentDidUpdate=Ct.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,r){ha(t,r,e)})};var ya=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Ql=/^(?: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]/,eu=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,tu=/[A-Z0-9]/g,ru=typeof document<"u",nu=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function ga(t,e,r){return e.__k==null&&(e.textContent=""),Qt(t,e),typeof r=="function"&&r(),t?t.__c:null}function ma(t,e,r){return Gi(t,e),typeof r=="function"&&r(),t?t.__c:null}Ze.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(Ze.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var _a=ae.event;function ou(){}function iu(){return this.cancelBubble}function au(){return this.defaultPrevented}ae.event=function(t){return _a&&(t=_a(t)),t.persist=ou,t.isPropagationStopped=iu,t.isDefaultPrevented=au,t.nativeEvent=t};var qn,su={enumerable:!1,configurable:!0,get:function(){return this.class}},va=ae.vnode;ae.vnode=function(t){typeof t.type=="string"&&function(e){var r=e.props,n=e.type,o={},i=n.indexOf("-")===-1;for(var c in r){var l=r[c];if(!(c==="value"&&"defaultValue"in r&&l==null||ru&&c==="children"&&n==="noscript"||c==="class"||c==="className")){var d=c.toLowerCase();c==="defaultValue"&&"value"in r&&r.value==null?c="value":c==="download"&&l===!0?l="":d==="translate"&&l==="no"?l=!1:d[0]==="o"&&d[1]==="n"?d==="ondoubleclick"?c="ondblclick":d!=="onchange"||n!=="input"&&n!=="textarea"||nu(r.type)?d==="onfocus"?c="onfocusin":d==="onblur"?c="onfocusout":eu.test(c)&&(c=d):d=c="oninput":i&&Ql.test(c)?c=c.replace(tu,"-$&").toLowerCase():l===null&&(l=void 0),d==="oninput"&&o[c=d]&&(c="oninputCapture"),o[c]=l}}n=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=ct(r.children).forEach(function(p){p.props.selected=o.value.indexOf(p.props.value)!=-1})),n=="select"&&o.defaultValue!=null&&(o.value=ct(r.children).forEach(function(p){p.props.selected=o.multiple?o.defaultValue.indexOf(p.props.value)!=-1:o.defaultValue==p.props.value})),r.class&&!r.className?(o.class=r.class,Object.defineProperty(o,"className",su)):(r.className&&!r.class||r.class&&r.className)&&(o.class=o.className=r.className),e.props=o}(t),t.$$typeof=ya,va&&va(t)};var ba=ae.__r;ae.__r=function(t){ba&&ba(t),qn=t.__c};var wa=ae.diffed;ae.diffed=function(t){wa&&wa(t);var e=t.props,r=t.__e;r!=null&&t.type==="textarea"&&"value"in e&&e.value!==r.value&&(r.value=e.value==null?"":e.value),qn=null};var xa={ReactCurrentDispatcher:{current:{readContext:function(t){return qn.__n[t.__c].props.value},useCallback:Ie,useContext:kr,useDebugValue:Tn,useDeferredValue:Dn,useEffect:me,useId:Rn,useImperativeHandle:tr,useInsertionEffect:Un,useLayoutEffect:yt,useMemo:Ye,useReducer:er,useRef:ce,useState:we,useSyncExternalStore:$n,useTransition:Ln}}},Ea="18.3.1";function Sa(t){return te.bind(null,t)}function nr(t){return!!t&&t.$$typeof===ya}function Aa(t){return nr(t)&&t.type===Ce}function ka(t){return!!t&&!!t.displayName&&(typeof t.displayName=="string"||t.displayName instanceof String)&&t.displayName.startsWith("Memo(")}function Oa(t){return nr(t)?Wl.apply(null,arguments):t}function Ia(t){return!!t.__k&&(Qt(null,t),!0)}function Pa(t){return t&&(t.base||t.nodeType===1&&t)||null}var Na=function(t,e){return t(e)},Ta=function(t,e){return t(e)},Ra=Ce,Ca=nr,or={useState:we,useId:Rn,useReducer:er,useEffect:me,useLayoutEffect:yt,useInsertionEffect:Un,useTransition:Ln,useDeferredValue:Dn,useSyncExternalStore:$n,startTransition:jn,useRef:ce,useImperativeHandle:tr,useMemo:Ye,useCallback:Ie,useContext:kr,useDebugValue:Tn,version:"18.3.1",Children:ca,render:ga,hydrate:ma,unmountComponentAtNode:Ia,createPortal:zn,createElement:te,createContext:lt,createFactory:Sa,cloneElement:Oa,createRef:Di,Fragment:Ce,isValidElement:nr,isElement:Ca,isFragment:Aa,isMemo:ka,findDOMNode:Pa,Component:Ze,PureComponent:Ir,memo:ia,forwardRef:_t,flushSync:Ta,unstable_batchedUpdates:Na,StrictMode:Ra,Suspense:rr,SuspenseList:Ct,lazy:pa,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:xa};const cu=Object.freeze(Object.defineProperty({__proto__:null,Children:ca,Component:Ze,Fragment:Ce,PureComponent:Ir,StrictMode:Ra,Suspense:rr,SuspenseList:Ct,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:xa,cloneElement:Oa,createContext:lt,createElement:te,createFactory:Sa,createPortal:zn,createRef:Di,default:or,findDOMNode:Pa,flushSync:Ta,forwardRef:_t,hydrate:ma,isElement:Ca,isFragment:Aa,isMemo:ka,isValidElement:nr,lazy:pa,memo:ia,render:ga,startTransition:jn,unmountComponentAtNode:Ia,unstable_batchedUpdates:Na,useCallback:Ie,useContext:kr,useDebugValue:Tn,useDeferredValue:Dn,useEffect:me,useErrorBoundary:Hl,useId:Rn,useImperativeHandle:tr,useInsertionEffect:Un,useLayoutEffect:yt,useMemo:Ye,useReducer:er,useRef:ce,useState:we,useSyncExternalStore:$n,useTransition:Ln,version:Ea},Symbol.toStringTag,{value:"Module"})),lu='*,: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}: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%}.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%}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));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-4{bottom:1rem}.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}.right-4{right:1rem}.start-0{inset-inline-start:0px}.top-0{top:0}.top-1{top:.25rem}.top-\\[50\\%\\]{top:50%}.top-full{top:100%}.z-20{z-index:20}.z-50{z-index:50}.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}.max-h-\\[calc\\(100\\%-200px\\)\\]{max-height:calc(100% - 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-\\[385px\\]{max-width:385px}.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}.-translate-y-1\\/2{--tw-translate-y: -50%;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))}.translate-x-0{--tw-translate-x: 0px;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))}.translate-x-full{--tw-translate-x: 100%;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))}.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-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}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@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-300{animation-duration:.3s}.duration-500{animation-duration:.5s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.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}}',uu=".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}}";function fu(){const[t,e]=we({width:null,height:null});return yt(()=>{const r=()=>{e({width:window.innerWidth,height:window.innerHeight})};return r(),window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r)}},[]),t}const du=460,vt="https://apidiscord-support-production.up.railway.app",Wn=()=>{const t=fu();return!!(t.width&&t.width>du)};/**
|
|
1
|
+
(function(){"use strict";var Kt,ae,Bi,mt,Mi,$i,En,Fi,Sn,An,kn,ji,Xt={},Di=[],Dl=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Sr=Array.isArray;function st(t,e){for(var r in e)t[r]=e[r];return t}function On(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function te(t,e,r){var n,o,i,c={};for(i in e)i=="key"?n=e[i]:i=="ref"?o=e[i]:c[i]=e[i];if(arguments.length>2&&(c.children=arguments.length>3?Kt.call(arguments,2):r),typeof t=="function"&&t.defaultProps!=null)for(i in t.defaultProps)c[i]===void 0&&(c[i]=t.defaultProps[i]);return Zt(t,c,n,o,null)}function Zt(t,e,r,n,o){var i={type:t,props:e,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++Bi,__i:-1,__u:0};return o==null&&ae.vnode!=null&&ae.vnode(i),i}function Li(){return{current:null}}function Ce(t){return t.children}function Ze(t,e){this.props=t,this.context=e}function Tt(t,e){if(e==null)return t.__?Tt(t.__,t.__i+1):null;for(var r;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null)return r.__e;return typeof t.type=="function"?Tt(t):null}function Ui(t){var e,r;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null){t.__e=t.__c.base=r.__e;break}return Ui(t)}}function In(t){(!t.__d&&(t.__d=!0)&&mt.push(t)&&!Ar.__r++||Mi!==ae.debounceRendering)&&((Mi=ae.debounceRendering)||$i)(Ar)}function Ar(){var t,e,r,n,o,i,c,l;for(mt.sort(En);t=mt.shift();)t.__d&&(e=mt.length,n=void 0,i=(o=(r=t).__v).__e,c=[],l=[],r.__P&&((n=st({},o)).__v=o.__v+1,ae.vnode&&ae.vnode(n),Pn(r.__P,n,o,r.__n,r.__P.namespaceURI,32&o.__u?[i]:null,c,i??Tt(o),!!(32&o.__u),l),n.__v=o.__v,n.__.__k[n.__i]=n,Hi(c,n,l),n.__e!=i&&Ui(n)),mt.length>e&&mt.sort(En));Ar.__r=0}function zi(t,e,r,n,o,i,c,l,d,p,f){var y,v,w,N,A,C,P=n&&n.__k||Di,_=e.length;for(d=Ll(r,e,P,d,_),y=0;y<_;y++)(w=r.__k[y])!=null&&(v=w.__i===-1?Xt:P[w.__i]||Xt,w.__i=y,C=Pn(t,w,v,o,i,c,l,d,p,f),N=w.__e,w.ref&&v.ref!=w.ref&&(v.ref&&Nn(v.ref,null,w),f.push(w.ref,w.__c||N,w)),A==null&&N!=null&&(A=N),4&w.__u||v.__k===w.__k?d=qi(w,d,t):typeof w.type=="function"&&C!==void 0?d=C:N&&(d=N.nextSibling),w.__u&=-7);return r.__e=A,d}function Ll(t,e,r,n,o){var i,c,l,d,p,f=r.length,y=f,v=0;for(t.__k=new Array(o),i=0;i<o;i++)(c=e[i])!=null&&typeof c!="boolean"&&typeof c!="function"?(d=i+v,(c=t.__k[i]=typeof c=="string"||typeof c=="number"||typeof c=="bigint"||c.constructor==String?Zt(null,c,null,null,null):Sr(c)?Zt(Ce,{children:c},null,null,null):c.constructor===void 0&&c.__b>0?Zt(c.type,c.props,c.key,c.ref?c.ref:null,c.__v):c).__=t,c.__b=t.__b+1,l=null,(p=c.__i=Ul(c,r,d,y))!==-1&&(y--,(l=r[p])&&(l.__u|=2)),l==null||l.__v===null?(p==-1&&v--,typeof c.type!="function"&&(c.__u|=4)):p!=d&&(p==d-1?v--:p==d+1?v++:(p>d?v--:v++,c.__u|=4))):t.__k[i]=null;if(y)for(i=0;i<f;i++)(l=r[i])!=null&&!(2&l.__u)&&(l.__e==n&&(n=Tt(l)),Gi(l,l));return n}function qi(t,e,r){var n,o;if(typeof t.type=="function"){for(n=t.__k,o=0;n&&o<n.length;o++)n[o]&&(n[o].__=t,e=qi(n[o],e,r));return e}t.__e!=e&&(e&&t.type&&!r.contains(e)&&(e=Tt(t)),r.insertBefore(t.__e,e||null),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function ct(t,e){return e=e||[],t==null||typeof t=="boolean"||(Sr(t)?t.some(function(r){ct(r,e)}):e.push(t)),e}function Ul(t,e,r,n){var o,i,c=t.key,l=t.type,d=e[r];if(d===null||d&&c==d.key&&l===d.type&&!(2&d.__u))return r;if(n>(d!=null&&!(2&d.__u)?1:0))for(o=r-1,i=r+1;o>=0||i<e.length;){if(o>=0){if((d=e[o])&&!(2&d.__u)&&c==d.key&&l===d.type)return o;o--}if(i<e.length){if((d=e[i])&&!(2&d.__u)&&c==d.key&&l===d.type)return i;i++}}return-1}function Wi(t,e,r){e[0]=="-"?t.setProperty(e,r??""):t[e]=r==null?"":typeof r!="number"||Dl.test(e)?r:r+"px"}function kr(t,e,r,n,o){var i;e:if(e=="style")if(typeof r=="string")t.style.cssText=r;else{if(typeof n=="string"&&(t.style.cssText=n=""),n)for(e in n)r&&e in r||Wi(t.style,e,"");if(r)for(e in r)n&&r[e]===n[e]||Wi(t.style,e,r[e])}else if(e[0]=="o"&&e[1]=="n")i=e!=(e=e.replace(Fi,"$1")),e=e.toLowerCase()in t||e=="onFocusOut"||e=="onFocusIn"?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+i]=r,r?n?r.u=n.u:(r.u=Sn,t.addEventListener(e,i?kn:An,i)):t.removeEventListener(e,i?kn:An,i);else{if(o=="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]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&r==1?"":r))}}function Vi(t){return function(e){if(this.l){var r=this.l[e.type+t];if(e.t==null)e.t=Sn++;else if(e.t<r.u)return;return r(ae.event?ae.event(e):e)}}}function Pn(t,e,r,n,o,i,c,l,d,p){var f,y,v,w,N,A,C,P,_,T,$,B,q,W,Z,U,K,Q=e.type;if(e.constructor!==void 0)return null;128&r.__u&&(d=!!(32&r.__u),i=[l=e.__e=r.__e]),(f=ae.__b)&&f(e);e:if(typeof Q=="function")try{if(P=e.props,_="prototype"in Q&&Q.prototype.render,T=(f=Q.contextType)&&n[f.__c],$=f?T?T.props.value:f.__:n,r.__c?C=(y=e.__c=r.__c).__=y.__E:(_?e.__c=y=new Q(P,$):(e.__c=y=new Ze(P,$),y.constructor=Q,y.render=ql),T&&T.sub(y),y.props=P,y.state||(y.state={}),y.context=$,y.__n=n,v=y.__d=!0,y.__h=[],y._sb=[]),_&&y.__s==null&&(y.__s=y.state),_&&Q.getDerivedStateFromProps!=null&&(y.__s==y.state&&(y.__s=st({},y.__s)),st(y.__s,Q.getDerivedStateFromProps(P,y.__s))),w=y.props,N=y.state,y.__v=e,v)_&&Q.getDerivedStateFromProps==null&&y.componentWillMount!=null&&y.componentWillMount(),_&&y.componentDidMount!=null&&y.__h.push(y.componentDidMount);else{if(_&&Q.getDerivedStateFromProps==null&&P!==w&&y.componentWillReceiveProps!=null&&y.componentWillReceiveProps(P,$),!y.__e&&(y.shouldComponentUpdate!=null&&y.shouldComponentUpdate(P,y.__s,$)===!1||e.__v==r.__v)){for(e.__v!=r.__v&&(y.props=P,y.state=y.__s,y.__d=!1),e.__e=r.__e,e.__k=r.__k,e.__k.some(function(re){re&&(re.__=e)}),B=0;B<y._sb.length;B++)y.__h.push(y._sb[B]);y._sb=[],y.__h.length&&c.push(y);break e}y.componentWillUpdate!=null&&y.componentWillUpdate(P,y.__s,$),_&&y.componentDidUpdate!=null&&y.__h.push(function(){y.componentDidUpdate(w,N,A)})}if(y.context=$,y.props=P,y.__P=t,y.__e=!1,q=ae.__r,W=0,_){for(y.state=y.__s,y.__d=!1,q&&q(e),f=y.render(y.props,y.state,y.context),Z=0;Z<y._sb.length;Z++)y.__h.push(y._sb[Z]);y._sb=[]}else do y.__d=!1,q&&q(e),f=y.render(y.props,y.state,y.context),y.state=y.__s;while(y.__d&&++W<25);y.state=y.__s,y.getChildContext!=null&&(n=st(st({},n),y.getChildContext())),_&&!v&&y.getSnapshotBeforeUpdate!=null&&(A=y.getSnapshotBeforeUpdate(w,N)),l=zi(t,Sr(U=f!=null&&f.type===Ce&&f.key==null?f.props.children:f)?U:[U],e,r,n,o,i,c,l,d,p),y.base=e.__e,e.__u&=-161,y.__h.length&&c.push(y),C&&(y.__E=y.__=null)}catch(re){if(e.__v=null,d||i!=null)if(re.then){for(e.__u|=d?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;i[i.indexOf(l)]=null,e.__e=l}else for(K=i.length;K--;)On(i[K]);else e.__e=r.__e,e.__k=r.__k;ae.__e(re,e,r)}else i==null&&e.__v==r.__v?(e.__k=r.__k,e.__e=r.__e):l=e.__e=zl(r.__e,e,r,n,o,i,c,d,p);return(f=ae.diffed)&&f(e),128&e.__u?void 0:l}function Hi(t,e,r){for(var n=0;n<r.length;n++)Nn(r[n],r[++n],r[++n]);ae.__c&&ae.__c(e,t),t.some(function(o){try{t=o.__h,o.__h=[],t.some(function(i){i.call(o)})}catch(i){ae.__e(i,o.__v)}})}function zl(t,e,r,n,o,i,c,l,d){var p,f,y,v,w,N,A,C=r.props,P=e.props,_=e.type;if(_=="svg"?o="http://www.w3.org/2000/svg":_=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),i!=null){for(p=0;p<i.length;p++)if((w=i[p])&&"setAttribute"in w==!!_&&(_?w.localName==_:w.nodeType==3)){t=w,i[p]=null;break}}if(t==null){if(_==null)return document.createTextNode(P);t=document.createElementNS(o,_,P.is&&P),l&&(ae.__m&&ae.__m(e,i),l=!1),i=null}if(_===null)C===P||l&&t.data===P||(t.data=P);else{if(i=i&&Kt.call(t.childNodes),C=r.props||Xt,!l&&i!=null)for(C={},p=0;p<t.attributes.length;p++)C[(w=t.attributes[p]).name]=w.value;for(p in C)if(w=C[p],p!="children"){if(p=="dangerouslySetInnerHTML")y=w;else if(!(p in P)){if(p=="value"&&"defaultValue"in P||p=="checked"&&"defaultChecked"in P)continue;kr(t,p,null,w,o)}}for(p in P)w=P[p],p=="children"?v=w:p=="dangerouslySetInnerHTML"?f=w:p=="value"?N=w:p=="checked"?A=w:l&&typeof w!="function"||C[p]===w||kr(t,p,w,C[p],o);if(f)l||y&&(f.__html===y.__html||f.__html===t.innerHTML)||(t.innerHTML=f.__html),e.__k=[];else if(y&&(t.innerHTML=""),zi(t,Sr(v)?v:[v],e,r,n,_=="foreignObject"?"http://www.w3.org/1999/xhtml":o,i,c,i?i[0]:r.__k&&Tt(r,0),l,d),i!=null)for(p=i.length;p--;)On(i[p]);l||(p="value",_=="progress"&&N==null?t.removeAttribute("value"):N!==void 0&&(N!==t[p]||_=="progress"&&!N||_=="option"&&N!==C[p])&&kr(t,p,N,C[p],o),p="checked",A!==void 0&&A!==t[p]&&kr(t,p,A,C[p],o))}return t}function Nn(t,e,r){try{if(typeof t=="function"){var n=typeof t.__u=="function";n&&t.__u(),n&&e==null||(t.__u=t(e))}else t.current=e}catch(o){ae.__e(o,r)}}function Gi(t,e,r){var n,o;if(ae.unmount&&ae.unmount(t),(n=t.ref)&&(n.current&&n.current!==t.__e||Nn(n,null,e)),(n=t.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(i){ae.__e(i,e)}n.base=n.__P=null}if(n=t.__k)for(o=0;o<n.length;o++)n[o]&&Gi(n[o],e,r||typeof t.type!="function");r||On(t.__e),t.__c=t.__=t.__e=void 0}function ql(t,e,r){return this.constructor(t,r)}function Qt(t,e,r){var n,o,i,c;e==document&&(e=document.documentElement),ae.__&&ae.__(t,e),o=(n=typeof r=="function")?null:r&&r.__k||e.__k,i=[],c=[],Pn(e,t=(!n&&r||e).__k=te(Ce,null,[t]),o||Xt,Xt,e.namespaceURI,!n&&r?[r]:o?null:e.firstChild?Kt.call(e.childNodes):null,i,!n&&r?r:o?o.__e:e.firstChild,n,c),Hi(i,t,c)}function Yi(t,e){Qt(t,e,Yi)}function Wl(t,e,r){var n,o,i,c,l=st({},t.props);for(i in t.type&&t.type.defaultProps&&(c=t.type.defaultProps),e)i=="key"?n=e[i]:i=="ref"?o=e[i]:l[i]=e[i]===void 0&&c!==void 0?c[i]:e[i];return arguments.length>2&&(l.children=arguments.length>3?Kt.call(arguments,2):r),Zt(t.type,l,n||t.key,o||t.ref,null)}function lt(t,e){var r={__c:e="__cC"+ji++,__:t,Consumer:function(n,o){return n.children(o)},Provider:function(n){var o,i;return this.getChildContext||(o=new Set,(i={})[e]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){o=null},this.shouldComponentUpdate=function(c){this.props.value!==c.value&&o.forEach(function(l){l.__e=!0,In(l)})},this.sub=function(c){o.add(c);var l=c.componentWillUnmount;c.componentWillUnmount=function(){o&&o.delete(c),l&&l.call(c)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r}Kt=Di.slice,ae={__e:function(t,e,r,n){for(var o,i,c;e=e.__;)if((o=e.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(t)),c=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(t,n||{}),c=o.__d),c)return o.__E=o}catch(l){t=l}throw t}},Bi=0,Ze.prototype.setState=function(t,e){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=st({},this.state),typeof t=="function"&&(t=t(st({},r),this.props)),t&&st(r,t),t!=null&&this.__v&&(e&&this._sb.push(e),In(this))},Ze.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),In(this))},Ze.prototype.render=Ce,mt=[],$i=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,En=function(t,e){return t.__v.__b-e.__v.__b},Ar.__r=0,Fi=/(PointerCapture)$|Capture$/i,Sn=0,An=Vi(!1),kn=Vi(!0),ji=0;var Vl=0;function I(t,e,r,n,o,i){e||(e={});var c,l,d=e;if("ref"in d)for(l in d={},e)l=="ref"?c=e[l]:d[l]=e[l];var p={type:t,props:d,key:r,ref:c,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Vl,__i:-1,__u:0,__source:o,__self:i};if(typeof t=="function"&&(c=t.defaultProps))for(l in c)d[l]===void 0&&(d[l]=c[l]);return ae.vnode&&ae.vnode(p),p}var ut,be,Tn,Ji,Rt=0,Ki=[],Oe=ae,Xi=Oe.__b,Zi=Oe.__r,Qi=Oe.diffed,ea=Oe.__c,ta=Oe.unmount,ra=Oe.__;function _t(t,e){Oe.__h&&Oe.__h(be,t,Rt||e),Rt=0;var r=be.__H||(be.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({}),r.__[t]}function we(t){return Rt=1,er(oa,t)}function er(t,e,r){var n=_t(ut++,2);if(n.t=t,!n.__c&&(n.__=[r?r(e):oa(void 0,e),function(l){var d=n.__N?n.__N[0]:n.__[0],p=n.t(d,l);d!==p&&(n.__N=[p,n.__[1]],n.__c.setState({}))}],n.__c=be,!be.u)){var o=function(l,d,p){if(!n.__c.__H)return!0;var f=n.__c.__H.__.filter(function(v){return!!v.__c});if(f.every(function(v){return!v.__N}))return!i||i.call(this,l,d,p);var y=n.__c.props!==l;return f.forEach(function(v){if(v.__N){var w=v.__[0];v.__=v.__N,v.__N=void 0,w!==v.__[0]&&(y=!0)}}),i&&i.call(this,l,d,p)||y};be.u=!0;var i=be.shouldComponentUpdate,c=be.componentWillUpdate;be.componentWillUpdate=function(l,d,p){if(this.__e){var f=i;i=void 0,o(l,d,p),i=f}c&&c.call(this,l,d,p)},be.shouldComponentUpdate=o}return n.__N||n.__}function me(t,e){var r=_t(ut++,3);!Oe.__s&&Mn(r.__H,e)&&(r.__=t,r.i=e,be.__H.__h.push(r))}function gt(t,e){var r=_t(ut++,4);!Oe.__s&&Mn(r.__H,e)&&(r.__=t,r.i=e,be.__h.push(r))}function ce(t){return Rt=5,Ye(function(){return{current:t}},[])}function tr(t,e,r){Rt=6,gt(function(){return typeof t=="function"?(t(e()),function(){return t(null)}):t?(t.current=e(),function(){return t.current=null}):void 0},r==null?r:r.concat(t))}function Ye(t,e){var r=_t(ut++,7);return Mn(r.__H,e)&&(r.__=t(),r.__H=e,r.__h=t),r.__}function Ie(t,e){return Rt=8,Ye(function(){return t},e)}function Or(t){var e=be.context[t.__c],r=_t(ut++,9);return r.c=t,e?(r.__==null&&(r.__=!0,e.sub(be)),e.props.value):t.__}function Rn(t,e){Oe.useDebugValue&&Oe.useDebugValue(e?e(t):t)}function Hl(t){var e=_t(ut++,10),r=we();return e.__=t,be.componentDidCatch||(be.componentDidCatch=function(n,o){e.__&&e.__(n,o),r[1](n)}),[r[0],function(){r[1](void 0)}]}function Cn(){var t=_t(ut++,11);if(!t.__){for(var e=be.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var r=e.__m||(e.__m=[0,0]);t.__="P"+r[0]+"-"+r[1]++}return t.__}function Gl(){for(var t;t=Ki.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Ir),t.__H.__h.forEach(Bn),t.__H.__h=[]}catch(e){t.__H.__h=[],Oe.__e(e,t.__v)}}Oe.__b=function(t){be=null,Xi&&Xi(t)},Oe.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),ra&&ra(t,e)},Oe.__r=function(t){Zi&&Zi(t),ut=0;var e=(be=t.__c).__H;e&&(Tn===be?(e.__h=[],be.__h=[],e.__.forEach(function(r){r.__N&&(r.__=r.__N),r.i=r.__N=void 0})):(e.__h.forEach(Ir),e.__h.forEach(Bn),e.__h=[],ut=0)),Tn=be},Oe.diffed=function(t){Qi&&Qi(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Ki.push(e)!==1&&Ji===Oe.requestAnimationFrame||((Ji=Oe.requestAnimationFrame)||Yl)(Gl)),e.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.i=void 0})),Tn=be=null},Oe.__c=function(t,e){e.some(function(r){try{r.__h.forEach(Ir),r.__h=r.__h.filter(function(n){return!n.__||Bn(n)})}catch(n){e.some(function(o){o.__h&&(o.__h=[])}),e=[],Oe.__e(n,r.__v)}}),ea&&ea(t,e)},Oe.unmount=function(t){ta&&ta(t);var e,r=t.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{Ir(n)}catch(o){e=o}}),r.__H=void 0,e&&Oe.__e(e,r.__v))};var na=typeof requestAnimationFrame=="function";function Yl(t){var e,r=function(){clearTimeout(n),na&&cancelAnimationFrame(e),setTimeout(t)},n=setTimeout(r,100);na&&(e=requestAnimationFrame(r))}function Ir(t){var e=be,r=t.__c;typeof r=="function"&&(t.__c=void 0,r()),be=e}function Bn(t){var e=be;t.__c=t.__(),be=e}function Mn(t,e){return!t||t.length!==e.length||e.some(function(r,n){return r!==t[n]})}function oa(t,e){return typeof e=="function"?e(t):e}function ia(t,e){for(var r in e)t[r]=e[r];return t}function $n(t,e){for(var r in t)if(r!=="__source"&&!(r in e))return!0;for(var n in e)if(n!=="__source"&&t[n]!==e[n])return!0;return!1}function Fn(t,e){var r=e(),n=we({t:{__:r,u:e}}),o=n[0].t,i=n[1];return gt(function(){o.__=r,o.u=e,jn(o)&&i({t:o})},[t,r,e]),me(function(){return jn(o)&&i({t:o}),t(function(){jn(o)&&i({t:o})})},[t]),r}function jn(t){var e,r,n=t.u,o=t.__;try{var i=n();return!((e=o)===(r=i)&&(e!==0||1/e==1/r)||e!=e&&r!=r)}catch{return!0}}function Dn(t){t()}function Ln(t){return t}function Un(){return[!1,Dn]}var zn=gt;function Pr(t,e){this.props=t,this.context=e}function aa(t,e){function r(o){var i=this.props.ref,c=i==o.ref;return!c&&i&&(i.call?i(null):i.current=null),e?!e(this.props,o)||!c:$n(this.props,o)}function n(o){return this.shouldComponentUpdate=r,te(t,o)}return n.displayName="Memo("+(t.displayName||t.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(Pr.prototype=new Ze).isPureReactComponent=!0,Pr.prototype.shouldComponentUpdate=function(t,e){return $n(this.props,t)||$n(this.state,e)};var sa=ae.__b;ae.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),sa&&sa(t)};var Jl=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function vt(t){function e(r){var n=ia({},r);return delete n.ref,t(n,r.ref||null)}return e.$$typeof=Jl,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var ca=function(t,e){return t==null?null:ct(ct(t).map(e))},la={map:ca,forEach:ca,count:function(t){return t?ct(t).length:0},only:function(t){var e=ct(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:ct},Kl=ae.__e;ae.__e=function(t,e,r,n){if(t.then){for(var o,i=e;i=i.__;)if((o=i.__c)&&o.__c)return e.__e==null&&(e.__e=r.__e,e.__k=r.__k),o.__c(t,e)}Kl(t,e,r,n)};var ua=ae.unmount;function fa(t,e,r){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(n){typeof n.__c=="function"&&n.__c()}),t.__c.__H=null),(t=ia({},t)).__c!=null&&(t.__c.__P===r&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map(function(n){return fa(n,e,r)})),t}function da(t,e,r){return t&&r&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(n){return da(n,e,r)}),t.__c&&t.__c.__P===e&&(t.__e&&r.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=r)),t}function rr(){this.__u=0,this.o=null,this.__b=null}function pa(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function ha(t){var e,r,n;function o(i){if(e||(e=t()).then(function(c){r=c.default||c},function(c){n=c}),n)throw n;if(!r)throw e;return te(r,i)}return o.displayName="Lazy",o.__f=!0,o}function Ct(){this.i=null,this.l=null}ae.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),ua&&ua(t)},(rr.prototype=new Ze).__c=function(t,e){var r=e.__c,n=this;n.o==null&&(n.o=[]),n.o.push(r);var o=pa(n.__v),i=!1,c=function(){i||(i=!0,r.__R=null,o?o(l):l())};r.__R=c;var l=function(){if(!--n.__u){if(n.state.__a){var d=n.state.__a;n.__v.__k[0]=da(d,d.__c.__P,d.__c.__O)}var p;for(n.setState({__a:n.__b=null});p=n.o.pop();)p.forceUpdate()}};n.__u++||32&e.__u||n.setState({__a:n.__b=n.__v.__k[0]}),t.then(c,c)},rr.prototype.componentWillUnmount=function(){this.o=[]},rr.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=fa(this.__b,r,n.__O=n.__P)}this.__b=null}var o=e.__a&&te(Ce,null,t.fallback);return o&&(o.__u&=-33),[te(Ce,null,e.__a?null:t.children),o]};var ya=function(t,e,r){if(++r[1]===r[0]&&t.l.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.l.size))for(r=t.i;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;t.i=r=r[2]}};function Xl(t){return this.getChildContext=function(){return t.context},t.children}function Zl(t){var e=this,r=t.h;e.componentWillUnmount=function(){Qt(null,e.v),e.v=null,e.h=null},e.h&&e.h!==r&&e.componentWillUnmount(),e.v||(e.h=r,e.v={nodeType:1,parentNode:r,childNodes:[],contains:function(){return!0},appendChild:function(n){this.childNodes.push(n),e.h.appendChild(n)},insertBefore:function(n,o){this.childNodes.push(n),e.h.insertBefore(n,o)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),e.h.removeChild(n)}}),Qt(te(Xl,{context:e.context},t.__v),e.v)}function qn(t,e){var r=te(Zl,{__v:t,h:e});return r.containerInfo=e,r}(Ct.prototype=new Ze).__a=function(t){var e=this,r=pa(e.__v),n=e.l.get(t);return n[0]++,function(o){var i=function(){e.props.revealOrder?(n.push(o),ya(e,t,n)):o()};r?r(i):i()}},Ct.prototype.render=function(t){this.i=null,this.l=new Map;var e=ct(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var r=e.length;r--;)this.l.set(e[r],this.i=[1,0,this.i]);return t.children},Ct.prototype.componentDidUpdate=Ct.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,r){ya(t,r,e)})};var ga=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Ql=/^(?: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]/,eu=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,tu=/[A-Z0-9]/g,ru=typeof document<"u",nu=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function ma(t,e,r){return e.__k==null&&(e.textContent=""),Qt(t,e),typeof r=="function"&&r(),t?t.__c:null}function _a(t,e,r){return Yi(t,e),typeof r=="function"&&r(),t?t.__c:null}Ze.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(Ze.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var va=ae.event;function ou(){}function iu(){return this.cancelBubble}function au(){return this.defaultPrevented}ae.event=function(t){return va&&(t=va(t)),t.persist=ou,t.isPropagationStopped=iu,t.isDefaultPrevented=au,t.nativeEvent=t};var Wn,su={enumerable:!1,configurable:!0,get:function(){return this.class}},ba=ae.vnode;ae.vnode=function(t){typeof t.type=="string"&&function(e){var r=e.props,n=e.type,o={},i=n.indexOf("-")===-1;for(var c in r){var l=r[c];if(!(c==="value"&&"defaultValue"in r&&l==null||ru&&c==="children"&&n==="noscript"||c==="class"||c==="className")){var d=c.toLowerCase();c==="defaultValue"&&"value"in r&&r.value==null?c="value":c==="download"&&l===!0?l="":d==="translate"&&l==="no"?l=!1:d[0]==="o"&&d[1]==="n"?d==="ondoubleclick"?c="ondblclick":d!=="onchange"||n!=="input"&&n!=="textarea"||nu(r.type)?d==="onfocus"?c="onfocusin":d==="onblur"?c="onfocusout":eu.test(c)&&(c=d):d=c="oninput":i&&Ql.test(c)?c=c.replace(tu,"-$&").toLowerCase():l===null&&(l=void 0),d==="oninput"&&o[c=d]&&(c="oninputCapture"),o[c]=l}}n=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=ct(r.children).forEach(function(p){p.props.selected=o.value.indexOf(p.props.value)!=-1})),n=="select"&&o.defaultValue!=null&&(o.value=ct(r.children).forEach(function(p){p.props.selected=o.multiple?o.defaultValue.indexOf(p.props.value)!=-1:o.defaultValue==p.props.value})),r.class&&!r.className?(o.class=r.class,Object.defineProperty(o,"className",su)):(r.className&&!r.class||r.class&&r.className)&&(o.class=o.className=r.className),e.props=o}(t),t.$$typeof=ga,ba&&ba(t)};var wa=ae.__r;ae.__r=function(t){wa&&wa(t),Wn=t.__c};var xa=ae.diffed;ae.diffed=function(t){xa&&xa(t);var e=t.props,r=t.__e;r!=null&&t.type==="textarea"&&"value"in e&&e.value!==r.value&&(r.value=e.value==null?"":e.value),Wn=null};var Ea={ReactCurrentDispatcher:{current:{readContext:function(t){return Wn.__n[t.__c].props.value},useCallback:Ie,useContext:Or,useDebugValue:Rn,useDeferredValue:Ln,useEffect:me,useId:Cn,useImperativeHandle:tr,useInsertionEffect:zn,useLayoutEffect:gt,useMemo:Ye,useReducer:er,useRef:ce,useState:we,useSyncExternalStore:Fn,useTransition:Un}}},Sa="18.3.1";function Aa(t){return te.bind(null,t)}function nr(t){return!!t&&t.$$typeof===ga}function ka(t){return nr(t)&&t.type===Ce}function Oa(t){return!!t&&!!t.displayName&&(typeof t.displayName=="string"||t.displayName instanceof String)&&t.displayName.startsWith("Memo(")}function Ia(t){return nr(t)?Wl.apply(null,arguments):t}function Pa(t){return!!t.__k&&(Qt(null,t),!0)}function Na(t){return t&&(t.base||t.nodeType===1&&t)||null}var Ta=function(t,e){return t(e)},Ra=function(t,e){return t(e)},Ca=Ce,Ba=nr,or={useState:we,useId:Cn,useReducer:er,useEffect:me,useLayoutEffect:gt,useInsertionEffect:zn,useTransition:Un,useDeferredValue:Ln,useSyncExternalStore:Fn,startTransition:Dn,useRef:ce,useImperativeHandle:tr,useMemo:Ye,useCallback:Ie,useContext:Or,useDebugValue:Rn,version:"18.3.1",Children:la,render:ma,hydrate:_a,unmountComponentAtNode:Pa,createPortal:qn,createElement:te,createContext:lt,createFactory:Aa,cloneElement:Ia,createRef:Li,Fragment:Ce,isValidElement:nr,isElement:Ba,isFragment:ka,isMemo:Oa,findDOMNode:Na,Component:Ze,PureComponent:Pr,memo:aa,forwardRef:vt,flushSync:Ra,unstable_batchedUpdates:Ta,StrictMode:Ca,Suspense:rr,SuspenseList:Ct,lazy:ha,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Ea};const cu=Object.freeze(Object.defineProperty({__proto__:null,Children:la,Component:Ze,Fragment:Ce,PureComponent:Pr,StrictMode:Ca,Suspense:rr,SuspenseList:Ct,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Ea,cloneElement:Ia,createContext:lt,createElement:te,createFactory:Aa,createPortal:qn,createRef:Li,default:or,findDOMNode:Na,flushSync:Ra,forwardRef:vt,hydrate:_a,isElement:Ba,isFragment:ka,isMemo:Oa,isValidElement:nr,lazy:ha,memo:aa,render:ma,startTransition:Dn,unmountComponentAtNode:Pa,unstable_batchedUpdates:Ta,useCallback:Ie,useContext:Or,useDebugValue:Rn,useDeferredValue:Ln,useEffect:me,useErrorBoundary:Hl,useId:Cn,useImperativeHandle:tr,useInsertionEffect:zn,useLayoutEffect:gt,useMemo:Ye,useReducer:er,useRef:ce,useState:we,useSyncExternalStore:Fn,useTransition:Un,version:Sa},Symbol.toStringTag,{value:"Module"})),lu='*,: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}: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%}.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%}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));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-4{bottom:1rem}.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}.right-4{right:1rem}.start-0{inset-inline-start:0px}.top-0{top:0}.top-1{top:.25rem}.top-\\[50\\%\\]{top:50%}.top-full{top:100%}.z-20{z-index:20}.z-50{z-index:50}.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}.max-h-\\[calc\\(100\\%-200px\\)\\]{max-height:calc(100% - 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-\\[385px\\]{max-width:385px}.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}.-translate-y-1\\/2{--tw-translate-y: -50%;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))}.translate-x-0{--tw-translate-x: 0px;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))}.translate-x-full{--tw-translate-x: 100%;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))}.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-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}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@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-300{animation-duration:.3s}.duration-500{animation-duration:.5s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.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}}',uu=".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}}";function fu(){const[t,e]=we({width:null,height:null});return gt(()=>{const r=()=>{e({width:window.innerWidth,height:window.innerHeight})};return r(),window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r)}},[]),t}const du=460,pu="https://api.staging.deskcord.chat",Vn=()=>{const t=fu();return!!(t.width&&t.width>du)};/**
|
|
2
2
|
* @license lucide-react v0.435.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
5
5
|
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const
|
|
6
|
+
*/const hu=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ma=(...t)=>t.filter((e,r,n)=>!!e&&n.indexOf(e)===r).join(" ");/**
|
|
7
7
|
* @license lucide-react v0.435.0 - ISC
|
|
8
8
|
*
|
|
9
9
|
* This source code is licensed under the ISC license.
|
|
10
10
|
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/var
|
|
11
|
+
*/var yu={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"};/**
|
|
12
12
|
* @license lucide-react v0.435.0 - ISC
|
|
13
13
|
*
|
|
14
14
|
* This source code is licensed under the ISC license.
|
|
15
15
|
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const
|
|
16
|
+
*/const gu=vt(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:i,iconNode:c,...l},d)=>te("svg",{ref:d,...yu,width:e,height:e,stroke:t,strokeWidth:n?Number(r)*24/Number(e):r,className:Ma("lucide",o),...l},[...c.map(([p,f])=>te(p,f)),...Array.isArray(i)?i:[i]]));/**
|
|
17
17
|
* @license lucide-react v0.435.0 - ISC
|
|
18
18
|
*
|
|
19
19
|
* This source code is licensed under the ISC license.
|
|
20
20
|
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/const ft=(t,e)=>{const r=
|
|
21
|
+
*/const ft=(t,e)=>{const r=vt(({className:n,...o},i)=>te(gu,{ref:i,iconNode:e,className:Ma(`lucide-${hu(t)}`,n),...o}));return r.displayName=`${t}`,r};/**
|
|
22
22
|
* @license lucide-react v0.435.0 - ISC
|
|
23
23
|
*
|
|
24
24
|
* This source code is licensed under the ISC license.
|
|
25
25
|
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/const
|
|
26
|
+
*/const mu=ft("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
27
27
|
* @license lucide-react v0.435.0 - ISC
|
|
28
28
|
*
|
|
29
29
|
* This source code is licensed under the ISC license.
|
|
30
30
|
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/const
|
|
31
|
+
*/const _u=ft("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"}]]);/**
|
|
32
32
|
* @license lucide-react v0.435.0 - ISC
|
|
33
33
|
*
|
|
34
34
|
* This source code is licensed under the ISC license.
|
|
35
35
|
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/const
|
|
36
|
+
*/const vu=ft("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"}]]);/**
|
|
37
37
|
* @license lucide-react v0.435.0 - ISC
|
|
38
38
|
*
|
|
39
39
|
* This source code is licensed under the ISC license.
|
|
40
40
|
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/const
|
|
41
|
+
*/const bu=ft("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"}]]);/**
|
|
42
42
|
* @license lucide-react v0.435.0 - ISC
|
|
43
43
|
*
|
|
44
44
|
* This source code is licensed under the ISC license.
|
|
45
45
|
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/const
|
|
46
|
+
*/const wu=ft("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"}]]);/**
|
|
47
47
|
* @license lucide-react v0.435.0 - ISC
|
|
48
48
|
*
|
|
49
49
|
* This source code is licensed under the ISC license.
|
|
50
50
|
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
-
*/const
|
|
51
|
+
*/const xu=ft("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"}]]);/**
|
|
52
52
|
* @license lucide-react v0.435.0 - ISC
|
|
53
53
|
*
|
|
54
54
|
* This source code is licensed under the ISC license.
|
|
55
55
|
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/const
|
|
56
|
+
*/const Eu=ft("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"}]]);/**
|
|
57
57
|
* @license lucide-react v0.435.0 - ISC
|
|
58
58
|
*
|
|
59
59
|
* This source code is licensed under the ISC license.
|
|
60
60
|
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
-
*/const
|
|
61
|
+
*/const Su=ft("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"}]]);/**
|
|
62
62
|
* @license lucide-react v0.435.0 - ISC
|
|
63
63
|
*
|
|
64
64
|
* This source code is licensed under the ISC license.
|
|
65
65
|
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
-
*/const
|
|
66
|
+
*/const Au=ft("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"}]]),ku=({onClick:t,isOpen:e})=>{const r=Vn();return I("button",{onClick:t,className:`${!r&&e?"hidden":"fixed"} bottom-4 right-4 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 z-50`,"aria-label":e?"Close chat":"Open chat",children:e?I(mu,{size:24}):I(wu,{size:24})})};/*! js-cookie v3.0.5 | MIT */function Nr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)t[n]=r[n]}return t}var Ou={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 Hn(t,e){function r(o,i,c){if(!(typeof document>"u")){c=Nr({},e,c),typeof c.expires=="number"&&(c.expires=new Date(Date.now()+c.expires*864e5)),c.expires&&(c.expires=c.expires.toUTCString()),o=encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var l="";for(var d in c)c[d]&&(l+="; "+d,c[d]!==!0&&(l+="="+c[d].split(";")[0]));return document.cookie=o+"="+t.write(i,o)+l}}function n(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var i=document.cookie?document.cookie.split("; "):[],c={},l=0;l<i.length;l++){var d=i[l].split("="),p=d.slice(1).join("=");try{var f=decodeURIComponent(d[0]);if(c[f]=t.read(p,f),o===f)break}catch{}}return o?c[o]:c}}return Object.create({set:r,get:n,remove:function(o,i){r(o,"",Nr({},i,{expires:-1}))},withAttributes:function(o){return Hn(this.converter,Nr({},this.attributes,o))},withConverter:function(o){return Hn(Nr({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var Tr=Hn(Ou,{path:"/"});const Iu={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},$a=t=>{let e;const r=new Set,n=(f,y)=>{const v=typeof f=="function"?f(e):f;if(!Object.is(v,e)){const w=e;e=y??(typeof v!="object"||v===null)?v:Object.assign({},e,v),r.forEach(N=>N(e,w))}},o=()=>e,d={setState:n,getState:o,getInitialState:()=>p,subscribe:f=>(r.add(f),()=>r.delete(f)),destroy:()=>{(Iu?"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."),r.clear()}},p=e=t(n,o,d);return d},Pu=t=>t?$a(t):$a;var ir=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Nu(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Tu(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:function(){return t[n]}})}),r}var Fa={exports:{}},ja={};const Da=Tu(cu);var La={exports:{}},Ua={};/**
|
|
67
67
|
* @license React
|
|
68
68
|
* use-sync-external-store-shim.production.min.js
|
|
69
69
|
*
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
*
|
|
72
72
|
* This source code is licensed under the MIT license found in the
|
|
73
73
|
* LICENSE file in the root directory of this source tree.
|
|
74
|
-
*/var Bt=
|
|
74
|
+
*/var Bt=Da;function Ru(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Cu=typeof Object.is=="function"?Object.is:Ru,Bu=Bt.useState,Mu=Bt.useEffect,$u=Bt.useLayoutEffect,Fu=Bt.useDebugValue;function ju(t,e){var r=e(),n=Bu({inst:{value:r,getSnapshot:e}}),o=n[0].inst,i=n[1];return $u(function(){o.value=r,o.getSnapshot=e,Gn(o)&&i({inst:o})},[t,r,e]),Mu(function(){return Gn(o)&&i({inst:o}),t(function(){Gn(o)&&i({inst:o})})},[t]),Fu(r),r}function Gn(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!Cu(t,r)}catch{return!0}}function Du(t,e){return e()}var Lu=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Du:ju;Ua.useSyncExternalStore=Bt.useSyncExternalStore!==void 0?Bt.useSyncExternalStore:Lu,La.exports=Ua;var Uu=La.exports;/**
|
|
75
75
|
* @license React
|
|
76
76
|
* use-sync-external-store-shim/with-selector.production.min.js
|
|
77
77
|
*
|
|
@@ -79,17 +79,17 @@
|
|
|
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 Tr=ja,Uu=Lu;function zu(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var qu=typeof Object.is=="function"?Object.is:zu,Wu=Uu.useSyncExternalStore,Vu=Tr.useRef,Hu=Tr.useEffect,Gu=Tr.useMemo,Yu=Tr.useDebugValue;Fa.useSyncExternalStoreWithSelector=function(t,e,r,n,o){var i=Vu(null);if(i.current===null){var c={hasValue:!1,value:null};i.current=c}else c=i.current;i=Gu(function(){function d(w){if(!p){if(p=!0,f=w,w=n(w),o!==void 0&&c.hasValue){var N=c.value;if(o(N,w))return y=N}return y=w}if(N=y,qu(f,w))return N;var A=n(w);return o!==void 0&&o(N,A)?N:(f=w,y=A)}var p=!1,f,y,v=r===void 0?null:r;return[function(){return d(e())},v===null?void 0:function(){return d(v())}]},[e,r,n,o]);var l=Wu(t,i[0],i[1]);return Hu(function(){c.hasValue=!0,c.value=l},[l]),Yu(l),l},$a.exports=Fa;var Ju=$a.exports;const Ku=Pu(Ju),Ua={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:Xu}=or,{useSyncExternalStoreWithSelector:Zu}=Ku;let za=!1;const Qu=t=>t;function ef(t,e=Qu,r){(Ua?"production":void 0)!=="production"&&r&&!za&&(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"),za=!0);const n=Zu(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,r);return Xu(n),n}const qa=t=>{(Ua?"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"?Iu(t):t,r=(n,o)=>ef(e,n,o);return Object.assign(r,e),r},tf=t=>t?qa(t):qa;var Wa=Symbol.for("immer-nothing"),Va=Symbol.for("immer-draftable"),He=Symbol.for("immer-state");function Qe(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var Mt=Object.getPrototypeOf;function $t(t){return!!t&&!!t[He]}function bt(t){var e;return t?Ha(t)||Array.isArray(t)||!!t[Va]||!!((e=t.constructor)!=null&&e[Va])||Br(t)||Mr(t):!1}var rf=Object.prototype.constructor.toString();function Ha(t){if(!t||typeof t!="object")return!1;const e=Mt(t);if(e===null)return!0;const r=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===rf}function Rr(t,e){Cr(t)===0?Reflect.ownKeys(t).forEach(r=>{e(r,t[r],t)}):t.forEach((r,n)=>e(n,r,t))}function Cr(t){const e=t[He];return e?e.type_:Array.isArray(t)?1:Br(t)?2:Mr(t)?3:0}function Gn(t,e){return Cr(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Ga(t,e,r){const n=Cr(t);n===2?t.set(e,r):n===3?t.add(r):t[e]=r}function nf(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}function Br(t){return t instanceof Map}function Mr(t){return t instanceof Set}function wt(t){return t.copy_||t.base_}function Yn(t,e){if(Br(t))return new Map(t);if(Mr(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);const r=Ha(t);if(e===!0||e==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(t);delete n[He];let o=Reflect.ownKeys(n);for(let i=0;i<o.length;i++){const c=o[i],l=n[c];l.writable===!1&&(l.writable=!0,l.configurable=!0),(l.get||l.set)&&(n[c]={configurable:!0,writable:!0,enumerable:l.enumerable,value:t[c]})}return Object.create(Mt(t),n)}else{const n=Mt(t);if(n!==null&&r)return{...t};const o=Object.create(n);return Object.assign(o,t)}}function Jn(t,e=!1){return $r(t)||$t(t)||!bt(t)||(Cr(t)>1&&(t.set=t.add=t.clear=t.delete=of),Object.freeze(t),e&&Object.entries(t).forEach(([r,n])=>Jn(n,!0))),t}function of(){Qe(2)}function $r(t){return Object.isFrozen(t)}var af={};function xt(t){const e=af[t];return e||Qe(0,t),e}var ar;function Ya(){return ar}function sf(t,e){return{drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Ja(t,e){e&&(xt("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function Kn(t){Xn(t),t.drafts_.forEach(cf),t.drafts_=null}function Xn(t){t===ar&&(ar=t.parent_)}function Ka(t){return ar=sf(ar,t)}function cf(t){const e=t[He];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function Xa(t,e){e.unfinalizedDrafts_=e.drafts_.length;const r=e.drafts_[0];return t!==void 0&&t!==r?(r[He].modified_&&(Kn(e),Qe(4)),bt(t)&&(t=Fr(e,t),e.parent_||jr(e,t)),e.patches_&&xt("Patches").generateReplacementPatches_(r[He].base_,t,e.patches_,e.inversePatches_)):t=Fr(e,r,[]),Kn(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==Wa?t:void 0}function Fr(t,e,r){if($r(e))return e;const n=e[He];if(!n)return Rr(e,(o,i)=>Za(t,n,e,o,i,r)),e;if(n.scope_!==t)return e;if(!n.modified_)return jr(t,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const o=n.copy_;let i=o,c=!1;n.type_===3&&(i=new Set(o),o.clear(),c=!0),Rr(i,(l,d)=>Za(t,n,o,l,d,r,c)),jr(t,o,!1),r&&t.patches_&&xt("Patches").generatePatches_(n,r,t.patches_,t.inversePatches_)}return n.copy_}function Za(t,e,r,n,o,i,c){if($t(o)){const l=i&&e&&e.type_!==3&&!Gn(e.assigned_,n)?i.concat(n):void 0,d=Fr(t,o,l);if(Ga(r,n,d),$t(d))t.canAutoFreeze_=!1;else return}else c&&r.add(o);if(bt(o)&&!$r(o)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;Fr(t,o),(!e||!e.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&jr(t,o)}}function jr(t,e,r=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&Jn(e,r)}function lf(t,e){const r=Array.isArray(t),n={type_:r?1:0,scope_:e?e.scope_:Ya(),modified_:!1,finalized_:!1,assigned_:{},parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=n,i=Zn;r&&(o=[n],i=sr);const{revoke:c,proxy:l}=Proxy.revocable(o,i);return n.draft_=l,n.revoke_=c,l}var Zn={get(t,e){if(e===He)return t;const r=wt(t);if(!Gn(r,e))return uf(t,r,e);const n=r[e];return t.finalized_||!bt(n)?n:n===Qn(t.base_,e)?(to(t),t.copy_[e]=ro(n,t)):n},has(t,e){return e in wt(t)},ownKeys(t){return Reflect.ownKeys(wt(t))},set(t,e,r){const n=Qa(wt(t),e);if(n!=null&&n.set)return n.set.call(t.draft_,r),!0;if(!t.modified_){const o=Qn(wt(t),e),i=o==null?void 0:o[He];if(i&&i.base_===r)return t.copy_[e]=r,t.assigned_[e]=!1,!0;if(nf(r,o)&&(r!==void 0||Gn(t.base_,e)))return!0;to(t),eo(t)}return t.copy_[e]===r&&(r!==void 0||e in t.copy_)||Number.isNaN(r)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=r,t.assigned_[e]=!0),!0},deleteProperty(t,e){return Qn(t.base_,e)!==void 0||e in t.base_?(t.assigned_[e]=!1,to(t),eo(t)):delete t.assigned_[e],t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){const r=wt(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:t.type_!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty(){Qe(11)},getPrototypeOf(t){return Mt(t.base_)},setPrototypeOf(){Qe(12)}},sr={};Rr(Zn,(t,e)=>{sr[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),sr.deleteProperty=function(t,e){return sr.set.call(this,t,e,void 0)},sr.set=function(t,e,r){return Zn.set.call(this,t[0],e,r,t[0])};function Qn(t,e){const r=t[He];return(r?wt(r):t)[e]}function uf(t,e,r){var o;const n=Qa(e,r);return n?"value"in n?n.value:(o=n.get)==null?void 0:o.call(t.draft_):void 0}function Qa(t,e){if(!(e in t))return;let r=Mt(t);for(;r;){const n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Mt(r)}}function eo(t){t.modified_||(t.modified_=!0,t.parent_&&eo(t.parent_))}function to(t){t.copy_||(t.copy_=Yn(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var ff=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,r,n)=>{if(typeof e=="function"&&typeof r!="function"){const i=r;r=e;const c=this;return function(d=i,...p){return c.produce(d,f=>r.call(this,f,...p))}}typeof r!="function"&&Qe(6),n!==void 0&&typeof n!="function"&&Qe(7);let o;if(bt(e)){const i=Ka(this),c=ro(e,void 0);let l=!0;try{o=r(c),l=!1}finally{l?Kn(i):Xn(i)}return Ja(i,n),Xa(o,i)}else if(!e||typeof e!="object"){if(o=r(e),o===void 0&&(o=e),o===Wa&&(o=void 0),this.autoFreeze_&&Jn(o,!0),n){const i=[],c=[];xt("Patches").generateReplacementPatches_(e,o,i,c),n(i,c)}return o}else Qe(1,e)},this.produceWithPatches=(e,r)=>{if(typeof e=="function")return(c,...l)=>this.produceWithPatches(c,d=>e(d,...l));let n,o;return[this.produce(e,r,(c,l)=>{n=c,o=l}),n,o]},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){bt(t)||Qe(8),$t(t)&&(t=df(t));const e=Ka(this),r=ro(t,void 0);return r[He].isManual_=!0,Xn(e),r}finishDraft(t,e){const r=t&&t[He];(!r||!r.isManual_)&&Qe(9);const{scope_:n}=r;return Ja(n,e),Xa(void 0,n)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}applyPatches(t,e){let r;for(r=e.length-1;r>=0;r--){const o=e[r];if(o.path.length===0&&o.op==="replace"){t=o.value;break}}r>-1&&(e=e.slice(r+1));const n=xt("Patches").applyPatches_;return $t(t)?n(t,e):this.produce(t,o=>n(o,e))}};function ro(t,e){const r=Br(t)?xt("MapSet").proxyMap_(t,e):Mr(t)?xt("MapSet").proxySet_(t,e):lf(t,e);return(e?e.scope_:Ya()).drafts_.push(r),r}function df(t){return $t(t)||Qe(10,t),es(t)}function es(t){if(!bt(t)||$r(t))return t;const e=t[He];let r;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,r=Yn(t,e.scope_.immer_.useStrictShallowCopy_)}else r=Yn(t,!0);return Rr(r,(n,o)=>{Ga(r,n,es(o))}),e&&(e.finalized_=!1),r}var Ge=new ff,Dr=Ge.produce;Ge.produceWithPatches.bind(Ge),Ge.setAutoFreeze.bind(Ge),Ge.setUseStrictShallowCopy.bind(Ge),Ge.applyPatches.bind(Ge),Ge.createDraft.bind(Ge),Ge.finishDraft.bind(Ge);const Lr={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},no=new Map,Ur=t=>{const e=no.get(t);return e?Object.fromEntries(Object.entries(e.stores).map(([r,n])=>[r,n.getState()])):{}},pf=(t,e,r)=>{if(t===void 0)return{type:"untracked",connection:e.connect(r)};const n=no.get(r.name);if(n)return{type:"tracked",store:t,...n};const o={connection:e.connect(r),stores:{}};return no.set(r.name,o),{type:"tracked",store:t,...o}},hf=(t,e={})=>(r,n,o)=>{const{enabled:i,anonymousActionType:c,store:l,...d}=e;let p;try{p=(i??(Lr?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!p)return(Lr?"production":void 0)!=="production"&&i&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),t(r,n,o);const{connection:f,...y}=pf(l,p,d);let v=!0;o.setState=(A,C,P)=>{const _=r(A,C);if(!v)return _;const T=P===void 0?{type:c||"anonymous"}:typeof P=="string"?{type:P}:P;return l===void 0?(f==null||f.send(T,n()),_):(f==null||f.send({...T,type:`${l}/${T.type}`},{...Ur(d.name),[l]:o.getState()}),_)};const w=(...A)=>{const C=v;v=!1,r(...A),v=C},N=t(o.setState,n,o);if(y.type==="untracked"?f==null||f.init(N):(y.stores[y.store]=o,f==null||f.init(Object.fromEntries(Object.entries(y.stores).map(([A,C])=>[A,A===y.store?N:C.getState()])))),o.dispatchFromDevtools&&typeof o.dispatch=="function"){let A=!1;const C=o.dispatch;o.dispatch=(...P)=>{(Lr?"production":void 0)!=="production"&&P[0].type==="__setState"&&!A&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),A=!0),C(...P)}}return f.subscribe(A=>{var C;switch(A.type){case"ACTION":if(typeof A.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return oo(A.payload,P=>{if(P.type==="__setState"){if(l===void 0){w(P.state);return}Object.keys(P.state).length!==1&&console.error(`
|
|
82
|
+
*/var Rr=Da,zu=Uu;function qu(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Wu=typeof Object.is=="function"?Object.is:qu,Vu=zu.useSyncExternalStore,Hu=Rr.useRef,Gu=Rr.useEffect,Yu=Rr.useMemo,Ju=Rr.useDebugValue;ja.useSyncExternalStoreWithSelector=function(t,e,r,n,o){var i=Hu(null);if(i.current===null){var c={hasValue:!1,value:null};i.current=c}else c=i.current;i=Yu(function(){function d(w){if(!p){if(p=!0,f=w,w=n(w),o!==void 0&&c.hasValue){var N=c.value;if(o(N,w))return y=N}return y=w}if(N=y,Wu(f,w))return N;var A=n(w);return o!==void 0&&o(N,A)?N:(f=w,y=A)}var p=!1,f,y,v=r===void 0?null:r;return[function(){return d(e())},v===null?void 0:function(){return d(v())}]},[e,r,n,o]);var l=Vu(t,i[0],i[1]);return Gu(function(){c.hasValue=!0,c.value=l},[l]),Ju(l),l},Fa.exports=ja;var Ku=Fa.exports;const Xu=Nu(Ku),za={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:Zu}=or,{useSyncExternalStoreWithSelector:Qu}=Xu;let qa=!1;const ef=t=>t;function tf(t,e=ef,r){(za?"production":void 0)!=="production"&&r&&!qa&&(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"),qa=!0);const n=Qu(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,r);return Zu(n),n}const Wa=t=>{(za?"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"?Pu(t):t,r=(n,o)=>tf(e,n,o);return Object.assign(r,e),r},rf=t=>t?Wa(t):Wa;var Va=Symbol.for("immer-nothing"),Ha=Symbol.for("immer-draftable"),He=Symbol.for("immer-state");function Qe(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var Mt=Object.getPrototypeOf;function $t(t){return!!t&&!!t[He]}function bt(t){var e;return t?Ga(t)||Array.isArray(t)||!!t[Ha]||!!((e=t.constructor)!=null&&e[Ha])||Mr(t)||$r(t):!1}var nf=Object.prototype.constructor.toString();function Ga(t){if(!t||typeof t!="object")return!1;const e=Mt(t);if(e===null)return!0;const r=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===nf}function Cr(t,e){Br(t)===0?Reflect.ownKeys(t).forEach(r=>{e(r,t[r],t)}):t.forEach((r,n)=>e(n,r,t))}function Br(t){const e=t[He];return e?e.type_:Array.isArray(t)?1:Mr(t)?2:$r(t)?3:0}function Yn(t,e){return Br(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Ya(t,e,r){const n=Br(t);n===2?t.set(e,r):n===3?t.add(r):t[e]=r}function of(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}function Mr(t){return t instanceof Map}function $r(t){return t instanceof Set}function wt(t){return t.copy_||t.base_}function Jn(t,e){if(Mr(t))return new Map(t);if($r(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);const r=Ga(t);if(e===!0||e==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(t);delete n[He];let o=Reflect.ownKeys(n);for(let i=0;i<o.length;i++){const c=o[i],l=n[c];l.writable===!1&&(l.writable=!0,l.configurable=!0),(l.get||l.set)&&(n[c]={configurable:!0,writable:!0,enumerable:l.enumerable,value:t[c]})}return Object.create(Mt(t),n)}else{const n=Mt(t);if(n!==null&&r)return{...t};const o=Object.create(n);return Object.assign(o,t)}}function Kn(t,e=!1){return Fr(t)||$t(t)||!bt(t)||(Br(t)>1&&(t.set=t.add=t.clear=t.delete=af),Object.freeze(t),e&&Object.entries(t).forEach(([r,n])=>Kn(n,!0))),t}function af(){Qe(2)}function Fr(t){return Object.isFrozen(t)}var sf={};function xt(t){const e=sf[t];return e||Qe(0,t),e}var ar;function Ja(){return ar}function cf(t,e){return{drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Ka(t,e){e&&(xt("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function Xn(t){Zn(t),t.drafts_.forEach(lf),t.drafts_=null}function Zn(t){t===ar&&(ar=t.parent_)}function Xa(t){return ar=cf(ar,t)}function lf(t){const e=t[He];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function Za(t,e){e.unfinalizedDrafts_=e.drafts_.length;const r=e.drafts_[0];return t!==void 0&&t!==r?(r[He].modified_&&(Xn(e),Qe(4)),bt(t)&&(t=jr(e,t),e.parent_||Dr(e,t)),e.patches_&&xt("Patches").generateReplacementPatches_(r[He].base_,t,e.patches_,e.inversePatches_)):t=jr(e,r,[]),Xn(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==Va?t:void 0}function jr(t,e,r){if(Fr(e))return e;const n=e[He];if(!n)return Cr(e,(o,i)=>Qa(t,n,e,o,i,r)),e;if(n.scope_!==t)return e;if(!n.modified_)return Dr(t,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const o=n.copy_;let i=o,c=!1;n.type_===3&&(i=new Set(o),o.clear(),c=!0),Cr(i,(l,d)=>Qa(t,n,o,l,d,r,c)),Dr(t,o,!1),r&&t.patches_&&xt("Patches").generatePatches_(n,r,t.patches_,t.inversePatches_)}return n.copy_}function Qa(t,e,r,n,o,i,c){if($t(o)){const l=i&&e&&e.type_!==3&&!Yn(e.assigned_,n)?i.concat(n):void 0,d=jr(t,o,l);if(Ya(r,n,d),$t(d))t.canAutoFreeze_=!1;else return}else c&&r.add(o);if(bt(o)&&!Fr(o)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;jr(t,o),(!e||!e.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&Dr(t,o)}}function Dr(t,e,r=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&Kn(e,r)}function uf(t,e){const r=Array.isArray(t),n={type_:r?1:0,scope_:e?e.scope_:Ja(),modified_:!1,finalized_:!1,assigned_:{},parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=n,i=Qn;r&&(o=[n],i=sr);const{revoke:c,proxy:l}=Proxy.revocable(o,i);return n.draft_=l,n.revoke_=c,l}var Qn={get(t,e){if(e===He)return t;const r=wt(t);if(!Yn(r,e))return ff(t,r,e);const n=r[e];return t.finalized_||!bt(n)?n:n===eo(t.base_,e)?(ro(t),t.copy_[e]=no(n,t)):n},has(t,e){return e in wt(t)},ownKeys(t){return Reflect.ownKeys(wt(t))},set(t,e,r){const n=es(wt(t),e);if(n!=null&&n.set)return n.set.call(t.draft_,r),!0;if(!t.modified_){const o=eo(wt(t),e),i=o==null?void 0:o[He];if(i&&i.base_===r)return t.copy_[e]=r,t.assigned_[e]=!1,!0;if(of(r,o)&&(r!==void 0||Yn(t.base_,e)))return!0;ro(t),to(t)}return t.copy_[e]===r&&(r!==void 0||e in t.copy_)||Number.isNaN(r)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=r,t.assigned_[e]=!0),!0},deleteProperty(t,e){return eo(t.base_,e)!==void 0||e in t.base_?(t.assigned_[e]=!1,ro(t),to(t)):delete t.assigned_[e],t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){const r=wt(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:t.type_!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty(){Qe(11)},getPrototypeOf(t){return Mt(t.base_)},setPrototypeOf(){Qe(12)}},sr={};Cr(Qn,(t,e)=>{sr[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),sr.deleteProperty=function(t,e){return sr.set.call(this,t,e,void 0)},sr.set=function(t,e,r){return Qn.set.call(this,t[0],e,r,t[0])};function eo(t,e){const r=t[He];return(r?wt(r):t)[e]}function ff(t,e,r){var o;const n=es(e,r);return n?"value"in n?n.value:(o=n.get)==null?void 0:o.call(t.draft_):void 0}function es(t,e){if(!(e in t))return;let r=Mt(t);for(;r;){const n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Mt(r)}}function to(t){t.modified_||(t.modified_=!0,t.parent_&&to(t.parent_))}function ro(t){t.copy_||(t.copy_=Jn(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var df=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,r,n)=>{if(typeof e=="function"&&typeof r!="function"){const i=r;r=e;const c=this;return function(d=i,...p){return c.produce(d,f=>r.call(this,f,...p))}}typeof r!="function"&&Qe(6),n!==void 0&&typeof n!="function"&&Qe(7);let o;if(bt(e)){const i=Xa(this),c=no(e,void 0);let l=!0;try{o=r(c),l=!1}finally{l?Xn(i):Zn(i)}return Ka(i,n),Za(o,i)}else if(!e||typeof e!="object"){if(o=r(e),o===void 0&&(o=e),o===Va&&(o=void 0),this.autoFreeze_&&Kn(o,!0),n){const i=[],c=[];xt("Patches").generateReplacementPatches_(e,o,i,c),n(i,c)}return o}else Qe(1,e)},this.produceWithPatches=(e,r)=>{if(typeof e=="function")return(c,...l)=>this.produceWithPatches(c,d=>e(d,...l));let n,o;return[this.produce(e,r,(c,l)=>{n=c,o=l}),n,o]},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){bt(t)||Qe(8),$t(t)&&(t=pf(t));const e=Xa(this),r=no(t,void 0);return r[He].isManual_=!0,Zn(e),r}finishDraft(t,e){const r=t&&t[He];(!r||!r.isManual_)&&Qe(9);const{scope_:n}=r;return Ka(n,e),Za(void 0,n)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}applyPatches(t,e){let r;for(r=e.length-1;r>=0;r--){const o=e[r];if(o.path.length===0&&o.op==="replace"){t=o.value;break}}r>-1&&(e=e.slice(r+1));const n=xt("Patches").applyPatches_;return $t(t)?n(t,e):this.produce(t,o=>n(o,e))}};function no(t,e){const r=Mr(t)?xt("MapSet").proxyMap_(t,e):$r(t)?xt("MapSet").proxySet_(t,e):uf(t,e);return(e?e.scope_:Ja()).drafts_.push(r),r}function pf(t){return $t(t)||Qe(10,t),ts(t)}function ts(t){if(!bt(t)||Fr(t))return t;const e=t[He];let r;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,r=Jn(t,e.scope_.immer_.useStrictShallowCopy_)}else r=Jn(t,!0);return Cr(r,(n,o)=>{Ya(r,n,ts(o))}),e&&(e.finalized_=!1),r}var Ge=new df,Lr=Ge.produce;Ge.produceWithPatches.bind(Ge),Ge.setAutoFreeze.bind(Ge),Ge.setUseStrictShallowCopy.bind(Ge),Ge.applyPatches.bind(Ge),Ge.createDraft.bind(Ge),Ge.finishDraft.bind(Ge);const Ur={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},oo=new Map,zr=t=>{const e=oo.get(t);return e?Object.fromEntries(Object.entries(e.stores).map(([r,n])=>[r,n.getState()])):{}},hf=(t,e,r)=>{if(t===void 0)return{type:"untracked",connection:e.connect(r)};const n=oo.get(r.name);if(n)return{type:"tracked",store:t,...n};const o={connection:e.connect(r),stores:{}};return oo.set(r.name,o),{type:"tracked",store:t,...o}},yf=(t,e={})=>(r,n,o)=>{const{enabled:i,anonymousActionType:c,store:l,...d}=e;let p;try{p=(i??(Ur?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!p)return(Ur?"production":void 0)!=="production"&&i&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),t(r,n,o);const{connection:f,...y}=hf(l,p,d);let v=!0;o.setState=(A,C,P)=>{const _=r(A,C);if(!v)return _;const T=P===void 0?{type:c||"anonymous"}:typeof P=="string"?{type:P}:P;return l===void 0?(f==null||f.send(T,n()),_):(f==null||f.send({...T,type:`${l}/${T.type}`},{...zr(d.name),[l]:o.getState()}),_)};const w=(...A)=>{const C=v;v=!1,r(...A),v=C},N=t(o.setState,n,o);if(y.type==="untracked"?f==null||f.init(N):(y.stores[y.store]=o,f==null||f.init(Object.fromEntries(Object.entries(y.stores).map(([A,C])=>[A,A===y.store?N:C.getState()])))),o.dispatchFromDevtools&&typeof o.dispatch=="function"){let A=!1;const C=o.dispatch;o.dispatch=(...P)=>{(Ur?"production":void 0)!=="production"&&P[0].type==="__setState"&&!A&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),A=!0),C(...P)}}return f.subscribe(A=>{var C;switch(A.type){case"ACTION":if(typeof A.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return io(A.payload,P=>{if(P.type==="__setState"){if(l===void 0){w(P.state);return}Object.keys(P.state).length!==1&&console.error(`
|
|
83
83
|
[zustand devtools middleware] Unsupported __setState action format.
|
|
84
84
|
When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
|
|
85
85
|
and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
|
|
86
|
-
`);const _=P.state[l];if(_==null)return;JSON.stringify(o.getState())!==JSON.stringify(_)&&w(_);return}o.dispatchFromDevtools&&typeof o.dispatch=="function"&&o.dispatch(P)});case"DISPATCH":switch(A.payload.type){case"RESET":return w(N),l===void 0?f==null?void 0:f.init(o.getState()):f==null?void 0:f.init(Ur(d.name));case"COMMIT":if(l===void 0){f==null||f.init(o.getState());return}return f==null?void 0:f.init(Ur(d.name));case"ROLLBACK":return oo(A.state,P=>{if(l===void 0){w(P),f==null||f.init(o.getState());return}w(P[l]),f==null||f.init(Ur(d.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return oo(A.state,P=>{if(l===void 0){w(P);return}JSON.stringify(o.getState())!==JSON.stringify(P[l])&&w(P[l])});case"IMPORT_STATE":{const{nextLiftedState:P}=A.payload,_=(C=P.computedStates.slice(-1)[0])==null?void 0:C.state;if(!_)return;w(l===void 0?_:_[l]),f==null||f.send(null,P);return}case"PAUSE_RECORDING":return v=!v}return}}),N},oo=(t,e)=>{let r;try{r=JSON.parse(t)}catch(n){console.error("[zustand devtools middleware] Could not parse the received json",n)}r!==void 0&&e(r)};function yf(t,e){let r;try{r=t()}catch{return}return{getItem:o=>{var i;const c=d=>d===null?null:JSON.parse(d,void 0),l=(i=r.getItem(o))!=null?i:null;return l instanceof Promise?l.then(c):c(l)},setItem:(o,i)=>r.setItem(o,JSON.stringify(i,void 0)),removeItem:o=>r.removeItem(o)}}const cr=t=>e=>{try{const r=t(e);return r instanceof Promise?r:{then(n){return cr(n)(r)},catch(n){return this}}}catch(r){return{then(n){return this},catch(n){return cr(n)(r)}}}},gf=(t,e)=>(r,n,o)=>{let i={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:C=>C,version:0,merge:(C,P)=>({...P,...C}),...e},c=!1;const l=new Set,d=new Set;let p;try{p=i.getStorage()}catch{}if(!p)return t((...C)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),r(...C)},n,o);const f=cr(i.serialize),y=()=>{const C=i.partialize({...n()});let P;const _=f({state:C,version:i.version}).then(T=>p.setItem(i.name,T)).catch(T=>{P=T});if(P)throw P;return _},v=o.setState;o.setState=(C,P)=>{v(C,P),y()};const w=t((...C)=>{r(...C),y()},n,o);let N;const A=()=>{var C;if(!p)return;c=!1,l.forEach(_=>_(n()));const P=((C=i.onRehydrateStorage)==null?void 0:C.call(i,n()))||void 0;return cr(p.getItem.bind(p))(i.name).then(_=>{if(_)return i.deserialize(_)}).then(_=>{if(_)if(typeof _.version=="number"&&_.version!==i.version){if(i.migrate)return i.migrate(_.state,_.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return _.state}).then(_=>{var T;return N=i.merge(_,(T=n())!=null?T:w),r(N,!0),y()}).then(()=>{P==null||P(N,void 0),c=!0,d.forEach(_=>_(N))}).catch(_=>{P==null||P(void 0,_)})};return o.persist={setOptions:C=>{i={...i,...C},C.getStorage&&(p=C.getStorage())},clearStorage:()=>{p==null||p.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>A(),hasHydrated:()=>c,onHydrate:C=>(l.add(C),()=>{l.delete(C)}),onFinishHydration:C=>(d.add(C),()=>{d.delete(C)})},A(),N||w},mf=(t,e)=>(r,n,o)=>{let i={storage:yf(()=>localStorage),partialize:A=>A,version:0,merge:(A,C)=>({...C,...A}),...e},c=!1;const l=new Set,d=new Set;let p=i.storage;if(!p)return t((...A)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),r(...A)},n,o);const f=()=>{const A=i.partialize({...n()});return p.setItem(i.name,{state:A,version:i.version})},y=o.setState;o.setState=(A,C)=>{y(A,C),f()};const v=t((...A)=>{r(...A),f()},n,o);o.getInitialState=()=>v;let w;const N=()=>{var A,C;if(!p)return;c=!1,l.forEach(_=>{var T;return _((T=n())!=null?T:v)});const P=((C=i.onRehydrateStorage)==null?void 0:C.call(i,(A=n())!=null?A:v))||void 0;return cr(p.getItem.bind(p))(i.name).then(_=>{if(_)if(typeof _.version=="number"&&_.version!==i.version){if(i.migrate)return[!0,i.migrate(_.state,_.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,_.state];return[!1,void 0]}).then(_=>{var T;const[$,B]=_;if(w=i.merge(B,(T=n())!=null?T:v),r(w,!0),$)return f()}).then(()=>{P==null||P(w,void 0),w=n(),c=!0,d.forEach(_=>_(w))}).catch(_=>{P==null||P(void 0,_)})};return o.persist={setOptions:A=>{i={...i,...A},A.storage&&(p=A.storage)},clearStorage:()=>{p==null||p.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>N(),hasHydrated:()=>c,onHydrate:A=>(l.add(A),()=>{l.delete(A)}),onFinishHydration:A=>(d.add(A),()=>{d.delete(A)})},i.skipHydration||N(),w||v},je=tf(hf(((t,e)=>"getStorage"in e||"serialize"in e||"deserialize"in e?((Lr?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),gf(t,e)):mf(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:r=>t(()=>({_REHYDRATED_:r})),setFullScreen:r=>t(()=>({fullScreen:r})),setToken:r=>t(()=>({token:r})),toggleChatOpen:()=>t(r=>({isChatOpen:!r.isChatOpen})),setNetworkInitialized:r=>t(()=>({isNetworkInitialized:r})),setChatVisible:r=>t(()=>({isChatVisible:r})),setChatOpen:r=>t(()=>({isChatOpen:r})),setOpenConversationId:r=>t(()=>({openConversationId:r})),setConversations:r=>t(()=>({conversations:r})),setGuildSettings:r=>t(n=>({guildSettings:{...n.guildSettings,...r}})),setConversationOpen:(r,n)=>t(o=>({conversations:o.conversations.map(i=>i.threadId===r?{...i,status:n?"open":"closed"}:i)})),setConversationCSMember:(r,n)=>t(Dr(o=>{const i=o.conversations.find(c=>c.threadId===r);i&&(i.csMember=n)})),addMessage:(r,n)=>t(Dr(o=>{const i=o.conversations.find(c=>c.threadId===r);i?i.messages.push(n):(o.conversations.push({threadId:r,lastMessageDate:Date.now(),firstMessageDate:Date.now(),status:"open",messages:[n]}),o.openConversationId=r)})),updateMessage:(r,n,o)=>t(Dr(i=>{const c=i.conversations.findIndex(l=>l.threadId===r);if(c!==-1){const l=i.conversations[c].messages.findIndex(d=>d.date===n);i.conversations[c].messages[l]=o}})),removeMessage:(r,n)=>t(Dr(o=>{const i=o.conversations.findIndex(c=>c.threadId===r);i!==-1&&(o.conversations[i].messages=o.conversations[i].messages.filter(c=>c.date!==n))})),tempConversationToThread:r=>t(n=>({...n,openConversationId:r,conversations:n.conversations.map(o=>o.threadId==="TEMP"?{...o,threadId:r}:o)})),setEmail:r=>t(()=>({email:r})),setUsername:r=>t(()=>({username:r})),getConversation:()=>{const{conversations:r,openConversationId:n}=e();return n?r.find(o=>o.threadId===n)??null:null}}),{name:"discord-widget-storage",partialize:t=>({token:t.token,username:t.username,email:t.email,openConversationId:t.openConversationId,conversations:_f(t.conversations),guildSettings:t.guildSettings}),onRehydrateStorage:t=>()=>t.setRehydrated(!0)}),{enabled:!1}));function _f(t){return t.map(e=>({...e,messages:e.messages.filter(r=>!r.ephemeral&&!r.pending)}))}async function vf({content:t}){const e=je.getState().username,r=Nr.get("discord-widget"),n=JSON.stringify({name:e,content:t}),o=new Headers;o.append("Content-Type","application/json"),o.append("Authorization",`Bearer ${r}`);const i={method:"POST",headers:o,body:n};return await(await fetch(`${vt}/conversations/sendMessage`,i)).json()}var Ft=(t=>(t[t.IntroduceYourself=0]="IntroduceYourself",t[t.UploadFile=1]="UploadFile",t))(Ft||{});const lr="System",bf={content:"This conversation has been closed by the support.",support:!0,authorName:lr,date:Date.now()},wf={content:"",support:!0,authorName:lr,date:Date.now(),customRenderer:Ft.IntroduceYourself};function xf(t){return{content:`You are now chatting with ${t}.`,support:!0,authorName:lr,date:Date.now(),ephemeral:!0}}function Ef(t){return{content:"",support:!0,authorName:lr,date:Date.now(),customRenderer:Ft.UploadFile,customRendererProps:{file:t},ephemeral:!0}}function Sf(t){return{content:"",support:!1,authorName:"",date:Date.now(),ephemeral:!0,attachments:t}}const Af=_t(({accept:t,maxSize:e,uploadConfig:r,onFileSelect:n,onUploadComplete:o,onUploadStart:i,onError:c},l)=>{const d=ce(null),p=ce(null),{addMessage:f,getConversation:y,removeMessage:v,updateMessage:w}=je(),N=y();tr(l,()=>({upload:async()=>{if(p.current)try{const $=new FormData;$.append("file",p.current),i==null||i(p.current),C(p.current);const B=await fetch(r.url,{method:r.method,headers:r.headers,body:$}),q=await B.json();o==null||o(B),P(p.current),A(q)}catch($){c==null||c($),_(p.current)}},clear:()=>{p.current=null,d.current&&(d.current.value=""),n==null||n(null)}}));function A($){N&&f(N.threadId,Sf($.attachments))}function C($){N&&f(N.threadId,Ef({fileName:$.name,status:"uploading",size:$.size}))}function P($){var q;if(!N)return;const B=(q=y())==null?void 0:q.messages.find(W=>{var Z,U;return((U=(Z=W.customRendererProps)==null?void 0:Z.file)==null?void 0:U.fileName)===$.name});B&&v(N.threadId,B.date)}function _($){var q,W;if(!N)return;const B=(q=y())==null?void 0:q.messages.find(Z=>{var U,K;return((K=(U=Z.customRendererProps)==null?void 0:U.file)==null?void 0:K.fileName)===$.name});(W=B==null?void 0:B.customRendererProps)!=null&&W.file&&w(N.threadId,B.date,{...B,customRendererProps:{...B.customRendererProps,file:{...B.customRendererProps.file,status:"error"}}})}return I(Ce,{children:[I("button",{className:"text-gray-500 hover:text-blue-500","aria-label":"Upload file",onClick:()=>{var $;return($=d.current)==null?void 0:$.click()},children:I(wu,{size:16})}),I("input",{type:"file",accept:t,ref:d,style:{display:"none"},onChange:$=>{var q;const B=(q=$.target.files)==null?void 0:q[0];B&&B.size<=e?(p.current=B,n==null||n(B)):(p.current=null,n==null||n(null))}})]})}),kf=({size:t})=>I("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:I("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"})}),Of=({onPickEmoji:t})=>I("div",{className:"mb-2 p-2 bg-white max-h-40 overflow-y-auto",children:I("div",{className:"grid grid-cols-8 gap-2",children:If.map((e,r)=>I("button",{className:"text-2xl hover:bg-gray-100 rounded",onClick:()=>t(e),children:e},r))})}),If=["😀","😃","😄","😁","😆","😅","😂","🤣","😊","😇","🙂","🙃","😉","😌","😍","🥰","😘","😗","😙","😚","😋","😛","😝","😜","🤪","🤨","🧐","🤓","😎","🤩","🥳","😏","😒","😞","😔","😟","😕","🙁","☹️","😣","😖","😫","😩","🥺","😢","😭","😤","😠","😡","🤬","🤯","😳","🥵","🥶","😱","😨","😰","😥","😓","🤗","🤔","🤭","🤫","🤥","😶","😐","😑","😬","🙄","😯","😦","😧","😮","😲","🥱","😴","🤤","😪","😵","🤐","🥴","🤢","🤮","🤧","😷","🤒","🤕"],Pf=({imageUrl:t,fileName:e,onDelete:r,width:n,height:o})=>I("div",{className:"relative w-32 h-32 rounded-lg overflow-hidden bg-gray-100 border border-gray-200",children:[I("div",{className:"flex justify-center absolute inset-0",children:I("img",{src:t,alt:"Preview",className:`w-[${n}px] h-[${o}px] max-w-[100px] max-h-[100px] aspect-auto`})}),I("button",{onClick:r,className:"absolute top-1 right-1 bg-gray-600 p-1 rounded-lg text-red-400 hover:text-white transition",children:I(Eu,{size:20})}),I("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})]}),Nf=t=>{const{inputMessage:e,setInputMessage:r,sendMessage:n,setFiles:o,files:i,showEmojiPicker:c,addEmoji:l,setShowEmojiPicker:d,attachmentPreviews:p}=t,{getConversation:f}=je(),y=f(),v=Nr.get("discord-widget"),w=ce(null),N=(y==null?void 0:y.status)==="closed",A=()=>{},C=q=>{o(i.filter(W=>(q==null?void 0:q.name)!==W.name))},P=q=>{q&&o([...i,q])},_=()=>{var q;(q=w.current)==null||q.upload()},T=()=>{i.length&&_(),n()},$=q=>{q.key==="Enter"&&(q.shiftKey?(q.preventDefault(),r(`${e}
|
|
87
|
-
`)):(q.preventDefault(),T()))};return I("div",{className:"relative border-t border-t-gray-200",children:[c&&I(Of,{onPickEmoji:l}),(()=>{if(!(i!=null&&i.length))return null;const q=i.map((W,Z)=>{if(!p[W.name])return null;const{url:U,width:K,height:Q}=p[W.name];return I(Pf,{onDelete:()=>{var re;o(i.filter(se=>se.name!==W.name)),(re=w.current)==null||re.clear()},fileName:W.name,width:K,height:Q,imageUrl:U},`attachment-preview-${Z}`)});return I("div",{className:"m-2",children:q})})(),I("textarea",{id:"hs-textarea-ex-1",disabled:N,value:e,onChange:q=>r(q.target.value),onKeyDown:$,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":""}),I("div",{className:"absolute bottom-px inset-x-px p-2 rounded-b-md bg-white dark:bg-neutral-900",children:I("div",{className:"flex justify-between items-center",children:[I("div",{className:"flex items-center",children:I("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:I(Af,{ref:w,accept:"image/*",maxSize:10*1024*1024,uploadConfig:{url:`${vt}/conversations/uploadAttachment`,method:"POST",headers:{Authorization:`Bearer ${v}`}},onUploadComplete:A,onUploadStart:C,onFileSelect:P})})}),I("div",{className:"flex items-center gap-x-1",children:[I("button",{type:"button",onClick:N?void 0:()=>d(!c),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:I(xu,{size:16})}),I("button",{type:"button",onClick:()=>T(),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:I(kf,{size:16})})]})]})})]})},ts=t=>{const e=Date.now(),r=Math.floor((e-t)/1e3);return r<60?"Just now":r<3600?`${Math.floor(r/60)}m ago`:r<86400?`${Math.floor(r/3600)}h ago`:`${Math.floor(r/86400)}d ago`},rs="carousel",ns="controller",Tf="navigation",Rf="no-scroll",io="portal",Cf="root",os="toolbar",ao="loading",so="error",co="complete",Bf="placeholder",Mf=t=>`active-slide-${t}`,is="flex_center",$f="no_scroll",as="no_scroll_padding",Ff="slide_wrapper",Et="prev",St="next",ss="swipe",jt="close",cs="onPointerDown",ls="onPointerMove",us="onPointerUp",fs="onPointerLeave",ds="onPointerCancel",ps="onKeyDown",jf="onKeyUp",hs="onWheel",Df="Escape",Lf="ArrowLeft",Uf="ArrowRight",zf="button",lo="icon",ys="contain",gs="cover",qf="Unknown action type",ms="yarl__";function dt(...t){return[...t].filter(Boolean).join(" ")}function _e(t){return`${ms}${t}`}function Ve(t){return`--${ms}${t}`}function ur(t,e){return`${t}${e?`_${e}`:""}`}function uo(t){return e=>ur(t,e)}function Wf(t,e){var r;return(r=t==null?void 0:t[e])!==null&&r!==void 0?r:e}function _s(...t){return()=>{t.forEach(e=>{e()})}}function At(t,e,r){return()=>{const n=kr(r);if(!n)throw new Error(`${t} must be used within a ${e}.Provider`);return n}}function vs(){return typeof window<"u"}function Vf(t,e=0){const r=10**e;return Math.round((t+Number.EPSILON)*r)/r}function bs(t){return t.type===void 0||t.type==="image"}function Hf(t,e){return t.imageFit===gs||t.imageFit!==ys&&e===gs}function zr(t){return typeof t=="string"?Number.parseInt(t,10):t}function qr(t){if(typeof t=="number")return{pixel:t};if(typeof t=="string"){const e=zr(t);return t.endsWith("%")?{percent:e}:{pixel:e}}return{pixel:0}}function Gf(t,e){const r=qr(e),n=r.percent!==void 0?t.width/100*r.percent:r.pixel;return{width:Math.max(t.width-2*n,0),height:Math.max(t.height-2*n,0)}}function ws(t,e){return e>0?(t%e+e)%e:0}function xs(t){return t.length>0}function Es(t,e){return t[ws(e,t.length)]}function fo(t,e){return xs(t)?Es(t,e):void 0}function Yf(t){return bs(t)?t.src:void 0}function Jf(t,e,r=0){return Math.min(t.preload,Math.max(t.finite?e.length-1:Math.floor(e.length/2),r))}const Kf=Number(Ea.split(".")[0])>=19;function Xf(t){return{inert:Kf?t:t?"":void 0}}const po={open:!1,close:()=>{},index:0,slides:[],render:{},plugins:[],toolbar:{buttons:[jt]},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:ys,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 kt(t,e){return{name:t,component:e}}function De(t,e){return{module:t,children:e}}function Ss(t,e,r){return t.module.name===e?r(t):t.children?[De(t.module,t.children.flatMap(n=>{var o;return(o=Ss(n,e,r))!==null&&o!==void 0?o:[]}))]:[t]}function Dt(t,e,r){return t.flatMap(n=>{var o;return(o=Ss(n,e,r))!==null&&o!==void 0?o:[]})}function Zf(t,e=[],r=[]){let n=t;const o=w=>{const N=[...n];for(;N.length>0;){const A=N.pop();if((A==null?void 0:A.module.name)===w)return!0;A!=null&&A.children&&N.push(...A.children)}return!1},i=(w,N)=>{if(w===""){n=[De(N,n)];return}n=Dt(n,w,A=>[De(N,[A])])},c=(w,N)=>{n=Dt(n,w,A=>[De(A.module,[De(N,A.children)])])},l=(w,N,A)=>{n=Dt(n,w,C=>{var P;return[De(C.module,[...A?[De(N)]:[],...(P=C.children)!==null&&P!==void 0?P:[],...A?[]:[De(N)]])]})},d=(w,N,A)=>{n=Dt(n,w,C=>[...A?[De(N)]:[],C,...A?[]:[De(N)]])},p=w=>{c(ns,w)},f=(w,N)=>{n=Dt(n,w,A=>[De(N,A.children)])},y=w=>{n=Dt(n,w,N=>N.children)},v=w=>{r.push(w)};return e.forEach(w=>{w({contains:o,addParent:i,append:c,addChild:l,addSibling:d,addModule:p,replace:f,remove:y,augment:v})}),{config:n,augmentation:w=>r.reduce((N,A)=>A(N),w)}}const As=lt(null),ho=At("useDocument","DocumentContext",As);function Qf({nodeRef:t,children:e}){const r=Ye(()=>{const n=i=>{var c;return((c=i||t.current)===null||c===void 0?void 0:c.ownerDocument)||document};return{getOwnerDocument:n,getOwnerWindow:i=>{var c;return((c=n(i))===null||c===void 0?void 0:c.defaultView)||window}}},[t]);return te(As.Provider,{value:r},e)}const ks=lt(null),Wr=At("useEvents","EventsContext",ks);function ed({children:t}){const[e]=we({});me(()=>()=>{Object.keys(e).forEach(n=>delete e[n])},[e]);const r=Ye(()=>{const n=(c,l)=>{var d;(d=e[c])===null||d===void 0||d.splice(0,e[c].length,...e[c].filter(p=>p!==l))};return{publish:(...[c,l])=>{var d;(d=e[c])===null||d===void 0||d.forEach(p=>p(l))},subscribe:(c,l)=>(e[c]||(e[c]=[]),e[c].push(l),()=>n(c,l)),unsubscribe:n}},[e]);return te(ks.Provider,{value:r},t)}const Os=lt(null),fr=At("useLightboxProps","LightboxPropsContext",Os);function td({children:t,...e}){return te(Os.Provider,{value:e},t)}const Is=lt(null),Vr=At("useLightboxState","LightboxStateContext",Is),Ps=lt(null),rd=At("useLightboxDispatch","LightboxDispatchContext",Ps);function nd(t,e){switch(e.type){case"swipe":{const{slides:r}=t,n=(e==null?void 0:e.increment)||0,o=t.globalIndex+n,i=ws(o,r.length),c=fo(r,i),l=n||e.duration?{increment:n,duration:e.duration,easing:e.easing}:void 0;return{slides:r,currentIndex:i,globalIndex:o,currentSlide:c,animation:l}}case"update":return e.slides!==t.slides||e.index!==t.currentIndex?{slides:e.slides,currentIndex:e.index,globalIndex:e.index,currentSlide:fo(e.slides,e.index)}:t;default:throw new Error(qf)}}function od({slides:t,index:e,children:r}){const[n,o]=er(nd,{slides:t,currentIndex:e,globalIndex:e,currentSlide:fo(t,e)});me(()=>{o({type:"update",slides:t,index:e})},[t,e]);const i=Ye(()=>({...n,state:n,dispatch:o}),[n,o]);return te(Ps.Provider,{value:o},te(Is.Provider,{value:i},r))}const Ns=lt(null),Hr=At("useTimeouts","TimeoutsContext",Ns);function id({children:t}){const[e]=we([]);me(()=>()=>{e.forEach(n=>window.clearTimeout(n)),e.splice(0,e.length)},[e]);const r=Ye(()=>{const n=c=>{e.splice(0,e.length,...e.filter(l=>l!==c))};return{setTimeout:(c,l)=>{const d=window.setTimeout(()=>{n(d),c()},l);return e.push(d),d},clearTimeout:c=>{c!==void 0&&(n(c),window.clearTimeout(c))}}},[e]);return te(Ns.Provider,{value:r},t)}const Ts=_t(function({label:e,className:r,icon:n,renderIcon:o,onClick:i,style:c,...l},d){const{styles:p,labels:f}=fr(),y=Wf(f,e);return te("button",{ref:d,type:"button",title:y,"aria-label":y,className:dt(_e(zf),r),onClick:i,style:{...c,...p.button},...l},o?o():te(n,{className:_e(lo),style:p.icon}))});function ad(t,e){const r=n=>te("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false",...n},e);return r.displayName=t,r}function dr(t,e){return ad(t,te("g",{fill:"currentColor"},te("path",{d:"M0 0h24v24H0z",fill:"none"}),e))}const sd=dr("Close",te("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"})),cd=dr("Previous",te("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})),ld=dr("Next",te("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),ud=dr("Loading",te(Ce,null,Array.from({length:8}).map((t,e,r)=>te("line",{key:e,x1:"12",y1:"6.5",x2:"12",y2:"1.8",strokeLinecap:"round",strokeWidth:"2.6",stroke:"currentColor",strokeOpacity:1/r.length*(e+1),transform:`rotate(${360/r.length*e}, 12, 12)`})))),fd=dr("Error",te("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"})),pr=vs()?yt:me;function Rs(){const[t,e]=we(!1);return me(()=>{var r,n;const o=(r=window.matchMedia)===null||r===void 0?void 0:r.call(window,"(prefers-reduced-motion: reduce)");e(o==null?void 0:o.matches);const i=c=>e(c.matches);return(n=o==null?void 0:o.addEventListener)===null||n===void 0||n.call(o,"change",i),()=>{var c;return(c=o==null?void 0:o.removeEventListener)===null||c===void 0?void 0:c.call(o,"change",i)}},[]),t}function dd(t){let e=0,r=0,n=0;const i=window.getComputedStyle(t).transform.match(/matrix.*\((.+)\)/);if(i){const c=i[1].split(",").map(zr);c.length===6?(e=c[4],r=c[5]):c.length===16&&(e=c[12],r=c[13],n=c[14])}return{x:e,y:r,z:n}}function Cs(t,e){const r=ce(),n=ce(),o=Rs();return pr(()=>{var i,c,l;if(t.current&&r.current!==void 0&&!o){const{keyframes:d,duration:p,easing:f,onfinish:y}=e(r.current,t.current.getBoundingClientRect(),dd(t.current))||{};if(d&&p){(i=n.current)===null||i===void 0||i.cancel(),n.current=void 0;try{n.current=(l=(c=t.current).animate)===null||l===void 0?void 0:l.call(c,d,{duration:p,easing:f})}catch(v){console.error(v)}n.current&&(n.current.onfinish=()=>{n.current=void 0,y==null||y()})}}r.current=void 0}),{prepareAnimation:i=>{r.current=i},isAnimationPlaying:()=>{var i;return((i=n.current)===null||i===void 0?void 0:i.playState)==="running"}}}function Bs(){const t=ce(null),e=ce(),[r,n]=we();return{setContainerRef:Ie(i=>{t.current=i,e.current&&(e.current.disconnect(),e.current=void 0);const c=()=>{if(i){const l=window.getComputedStyle(i),d=p=>parseFloat(p)||0;n({width:Math.round(i.clientWidth-d(l.paddingLeft)-d(l.paddingRight)),height:Math.round(i.clientHeight-d(l.paddingTop)-d(l.paddingBottom))})}else n(void 0)};c(),i&&typeof ResizeObserver<"u"&&(e.current=new ResizeObserver(c),e.current.observe(i))},[]),containerRef:t,containerRect:r}}function Gr(){const t=ce(),{setTimeout:e,clearTimeout:r}=Hr();return Ie((n,o)=>{r(t.current),t.current=e(n,o>0?o:0)},[e,r])}function Be(t){const e=ce(t);return pr(()=>{e.current=t}),Ie((...r)=>{var n;return(n=e.current)===null||n===void 0?void 0:n.call(e,...r)},[])}function Ms(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function yo(t,e){return Ye(()=>t==null&&e==null?null:r=>{Ms(t,r),Ms(e,r)},[t,e])}function pd(t,e=!1){const r=ce();pr(()=>{e&&r.current&&(r.current=!1,t())},[e,t]);const n=Ie(()=>{r.current=!0},[]),o=Ie(()=>{r.current=!1},[]);return{onFocus:n,onBlur:o}}function go(){const[t,e]=we(!1);return pr(()=>{e(window.getComputedStyle(window.document.documentElement).direction==="rtl")},[]),t}function hd(){const[t]=we({}),e=Ie((o,i)=>{var c;(c=t[o])===null||c===void 0||c.forEach(l=>{i.isPropagationStopped()||l(i)})},[t]),r=Ye(()=>({onPointerDown:o=>e(cs,o),onPointerMove:o=>e(ls,o),onPointerUp:o=>e(us,o),onPointerLeave:o=>e(fs,o),onPointerCancel:o=>e(ds,o),onKeyDown:o=>e(ps,o),onKeyUp:o=>e(jf,o),onWheel:o=>e(hs,o)}),[e]),n=Ie((o,i)=>(t[o]||(t[o]=[]),t[o].unshift(i),()=>{const c=t[o];c&&c.splice(0,c.length,...c.filter(l=>l!==i))}),[t]);return{registerSensors:r,subscribeSensors:n}}function $s(t,e){const r=ce(0),n=Gr(),o=Be((...i)=>{r.current=Date.now(),t(i)});return Ie((...i)=>{n(()=>{o(i)},e-(Date.now()-r.current))},[e,o,n])}const mo=uo("slide"),_o=uo("slide_image");function yd({slide:t,offset:e,render:r,rect:n,imageFit:o,imageProps:i,onClick:c,onLoad:l,onError:d,style:p}){var f,y,v,w,N,A,C;const[P,_]=we(ao),{publish:T}=Wr(),{setTimeout:$}=Hr(),B=ce(null);me(()=>{e===0&&T(Mf(P))},[e,P,T]);const q=Be(H=>{("decode"in H?H.decode():Promise.resolve()).catch(()=>{}).then(()=>{H.parentNode&&(_(co),$(()=>{l==null||l(H)},0))})}),W=Ie(H=>{B.current=H,H!=null&&H.complete&&q(H)},[q]),Z=Ie(H=>{q(H.currentTarget)},[q]),U=Be(()=>{_(so),d==null||d()}),K=Hf(t,o),Q=(H,m)=>Number.isFinite(H)?H:m,re=Q(Math.max(...((y=(f=t.srcSet)===null||f===void 0?void 0:f.map(H=>H.width))!==null&&y!==void 0?y:[]).concat(t.width?[t.width]:[]).filter(Boolean)),((v=B.current)===null||v===void 0?void 0:v.naturalWidth)||0),se=Q(Math.max(...((N=(w=t.srcSet)===null||w===void 0?void 0:w.map(H=>H.height))!==null&&N!==void 0?N:[]).concat(t.height?[t.height]:[]).filter(Boolean)),((A=B.current)===null||A===void 0?void 0:A.naturalHeight)||0),Ae=re&&se?{maxWidth:`min(${re}px, 100%)`,maxHeight:`min(${se}px, 100%)`}:{maxWidth:"100%",maxHeight:"100%"},de=(C=t.srcSet)===null||C===void 0?void 0:C.sort((H,m)=>H.width-m.width).map(H=>`${H.src} ${H.width}w`).join(", "),Pe=()=>n&&!K&&t.width&&t.height?n.height/t.height*t.width:Number.MAX_VALUE,Se=de&&n&&vs()?`${Math.round(Math.min(Pe(),n.width))}px`:void 0,{style:ke,className:z,...V}=i||{};return te(Ce,null,te("img",{ref:W,onLoad:Z,onError:U,onClick:c,draggable:!1,className:dt(_e(_o()),K&&_e(_o("cover")),P!==co&&_e(_o("loading")),z),style:{...Ae,...p,...ke},...V,alt:t.alt,sizes:Se,srcSet:de,src:t.src}),P!==co&&te("div",{className:_e(mo(Bf))},P===ao&&(r!=null&&r.iconLoading?r.iconLoading():te(ud,{className:dt(_e(lo),_e(mo(ao)))})),P===so&&(r!=null&&r.iconError?r.iconError():te(fd,{className:dt(_e(lo),_e(mo(so)))}))))}const gd=_t(function({className:e,children:r,...n},o){const i=ce(null);return te(Qf,{nodeRef:i},te("div",{ref:yo(o,i),className:dt(_e("root"),e),...n},r))});var qe;(function(t){t[t.NONE=0]="NONE",t[t.SWIPE=1]="SWIPE",t[t.PULL=2]="PULL",t[t.ANIMATION=3]="ANIMATION"})(qe||(qe={}));function md(t,e,r,n,o){me(()=>_s(t(cs,e),t(ls,r),t(us,n),t(fs,n),t(ds,n)),[t,e,r,n,o])}var et;(function(t){t[t.NONE=0]="NONE",t[t.SWIPE=1]="SWIPE",t[t.PULL=2]="PULL"})(et||(et={}));const vo=30;function _d(t,e,r,n,o,i,c,l,d,p,f,y,v,w){const N=ce(0),A=ce([]),C=ce(),P=ce(0),_=ce(et.NONE),T=Ie(U=>{C.current===U.pointerId&&(C.current=void 0,_.current=et.NONE);const K=A.current;K.splice(0,K.length,...K.filter(Q=>Q.pointerId!==U.pointerId))},[]),$=Ie(U=>{T(U),U.persist(),A.current.push(U)},[T]),B=Be(U=>{$(U)}),q=(U,K)=>p&&U>K||d&&U<-K,W=Be(U=>{if(A.current.find(K=>K.pointerId===U.pointerId)&&C.current===U.pointerId){const K=Date.now()-P.current,Q=N.current;_.current===et.SWIPE?Math.abs(Q)>.3*r||Math.abs(Q)>5&&K<n?c(Q,K):l(Q):_.current===et.PULL&&(q(Q,2*vo)?v(Q,K):w(Q)),N.current=0,_.current=et.NONE}T(U)}),Z=Be(U=>{const K=A.current.find(Q=>Q.pointerId===U.pointerId);if(K){const Q=C.current===U.pointerId;if(U.buttons===0){Q&&N.current!==0?W(U):T(K);return}const re=U.clientX-K.clientX,se=U.clientY-K.clientY;if(C.current===void 0){const Ae=de=>{$(U),C.current=U.pointerId,P.current=Date.now(),_.current=de};Math.abs(re)>Math.abs(se)&&Math.abs(re)>vo&&e(re)?(Ae(et.SWIPE),o()):Math.abs(se)>Math.abs(re)&&q(se,vo)&&(Ae(et.PULL),f())}else Q&&(_.current===et.SWIPE?(N.current=re,i(re)):_.current===et.PULL&&(N.current=se,y(se)))}});md(t,B,Z,W)}function vd({preventDefaultWheelX:t,preventDefaultWheelY:e}){const r=ce(null),n=Be(o=>{const i=Math.abs(o.deltaX)>Math.abs(o.deltaY);(i&&t||!i&&e||o.ctrlKey)&&o.preventDefault()});return Ie(o=>{var i;o?o.addEventListener("wheel",n,{passive:!1}):(i=r.current)===null||i===void 0||i.removeEventListener("wheel",n),r.current=o},[n])}function bd(t,e,r,n,o,i,c,l,d){const p=ce(0),f=ce(0),y=ce(),v=ce(),w=ce(0),N=ce(),A=ce(0),{setTimeout:C,clearTimeout:P}=Hr(),_=Ie(()=>{y.current&&(P(y.current),y.current=void 0)},[P]),T=Ie(()=>{v.current&&(P(v.current),v.current=void 0)},[P]),$=Be(()=>{t!==qe.SWIPE&&(p.current=0,A.current=0,_(),T())});me($,[t,$]);const B=Be(W=>{v.current=void 0,p.current===W&&d(p.current)}),q=Be(W=>{if(W.ctrlKey||Math.abs(W.deltaY)>Math.abs(W.deltaX))return;const Z=U=>{w.current=U,P(N.current),N.current=U>0?C(()=>{w.current=0,N.current=void 0},300):void 0};if(t===qe.NONE){if(Math.abs(W.deltaX)<=1.2*Math.abs(w.current)){Z(W.deltaX);return}if(!r(-W.deltaX))return;if(f.current+=W.deltaX,_(),Math.abs(f.current)>30)f.current=0,Z(0),A.current=Date.now(),i();else{const U=f.current;y.current=C(()=>{y.current=void 0,U===f.current&&(f.current=0)},o)}}else if(t===qe.SWIPE){let U=p.current-W.deltaX;if(U=Math.min(Math.abs(U),n)*Math.sign(U),p.current=U,c(U),T(),Math.abs(U)>.2*n){Z(W.deltaX),l(U,Date.now()-A.current);return}v.current=C(()=>B(U),2*o)}else Z(W.deltaX)});me(()=>e(hs,q),[e,q])}const Fs=uo("container"),js=lt(null),hr=At("useController","ControllerContext",js);function wd({children:t,...e}){var r;const{carousel:n,animation:o,controller:i,on:c,styles:l,render:d}=e,{closeOnPullUp:p,closeOnPullDown:f,preventDefaultWheelX:y,preventDefaultWheelY:v}=i,[w,N]=we(),A=Vr(),C=rd(),[P,_]=we(qe.NONE),T=ce(0),$=ce(0),B=ce(1),{registerSensors:q,subscribeSensors:W}=hd(),{subscribe:Z,publish:U}=Wr(),K=Gr(),Q=Gr(),re=Gr(),{containerRef:se,setContainerRef:Ae,containerRect:de}=Bs(),Pe=yo(vd({preventDefaultWheelX:y,preventDefaultWheelY:v}),Ae),Se=ce(null),ke=yo(Se,void 0),{getOwnerDocument:z}=ho(),V=go(),H=J=>(V?-1:1)*(typeof J=="number"?J:1),m=Be(()=>{var J;return(J=se.current)===null||J===void 0?void 0:J.focus()}),O=Be(()=>e),g=Be(()=>A),b=Ie(J=>U(Et,J),[U]),S=Ie(J=>U(St,J),[U]),D=Ie(()=>U(jt),[U]),M=J=>!(n.finite&&(H(J)>0&&A.currentIndex===0||H(J)<0&&A.currentIndex===A.slides.length-1)),L=J=>{var pe;T.current=J,(pe=se.current)===null||pe===void 0||pe.style.setProperty(Ve("swipe_offset"),`${Math.round(J)}px`)},G=J=>{var pe,ve;$.current=J,B.current=(()=>{const Y=f&&J>0?J:p&&J<0?-J:0;return Math.min(Math.max(Vf(1-Y/60*(1-.5),2),.5),1)})(),(pe=se.current)===null||pe===void 0||pe.style.setProperty(Ve("pull_offset"),`${Math.round(J)}px`),(ve=se.current)===null||ve===void 0||ve.style.setProperty(Ve("pull_opacity"),`${B.current}`)},{prepareAnimation:ne}=Cs(Se,(J,pe,ve)=>{if(Se.current&&de)return{keyframes:[{transform:`translate(0, ${J.rect.y-pe.y+ve.y}px)`,opacity:J.opacity},{transform:"translate(0, 0)",opacity:1}],duration:J.duration,easing:o.easing.fade}}),le=(J,pe)=>{if(p||f){G(J);let ve=0;Se.current&&(ve=o.fade*(pe?2:1),ne({rect:Se.current.getBoundingClientRect(),opacity:B.current,duration:ve})),re(()=>{G(0),_(qe.NONE)},ve),_(qe.ANIMATION),pe||D()}},{prepareAnimation:he,isAnimationPlaying:Ee}=Cs(Se,(J,pe,ve)=>{var E;if(Se.current&&de&&(!((E=A.animation)===null||E===void 0)&&E.duration)){const k=qr(n.spacing),Y=(k.percent?k.percent*de.width/100:k.pixel)||0;return{keyframes:[{transform:`translate(${H(A.globalIndex-J.index)*(de.width+Y)+J.rect.x-pe.x+ve.x}px, 0)`},{transform:"translate(0, 0)"}],duration:A.animation.duration,easing:A.animation.easing}}}),Re=Be(J=>{var pe,ve;const E=J.offset||0,k=E?o.swipe:(pe=o.navigation)!==null&&pe!==void 0?pe:o.swipe,Y=!E&&!Ee()?o.easing.navigation:o.easing.swipe;let{direction:ee}=J;const X=(ve=J.count)!==null&&ve!==void 0?ve:1;let oe=qe.ANIMATION,u=k*X;if(!ee){const s=de==null?void 0:de.width,h=J.duration||0,x=s?k/s*Math.abs(E):k;X!==0?(h<x?u=u/x*Math.max(h,x/5):s&&(u=k/s*(s-Math.abs(E))),ee=H(E)>0?Et:St):u=k/2}let a=0;ee===Et?M(H(1))?a=-X:(oe=qe.NONE,u=k):ee===St&&(M(H(-1))?a=X:(oe=qe.NONE,u=k)),u=Math.round(u),Q(()=>{L(0),_(qe.NONE)},u),Se.current&&he({rect:Se.current.getBoundingClientRect(),index:A.globalIndex}),_(oe),U(ss,{type:"swipe",increment:a,duration:u,easing:Y})});me(()=>{var J,pe;!((J=A.animation)===null||J===void 0)&&J.increment&&(!((pe=A.animation)===null||pe===void 0)&&pe.duration)&&K(()=>C({type:"swipe",increment:0}),A.animation.duration)},[A.animation,C,K]);const Ue=[W,M,(de==null?void 0:de.width)||0,o.swipe,()=>_(qe.SWIPE),J=>L(J),(J,pe)=>Re({offset:J,duration:pe,count:1}),J=>Re({offset:J,count:0})],ze=[()=>{f&&_(qe.PULL)},J=>G(J),J=>le(J),J=>le(J,!0)];_d(...Ue,p,f,...ze),bd(P,...Ue);const Fe=Be(()=>{i.focus&&z().querySelector(`.${_e(io)} .${_e(Fs())}`)&&m()});me(Fe,[Fe]);const j=Be(()=>{var J;(J=c.view)===null||J===void 0||J.call(c,{index:A.currentIndex})});me(j,[A.globalIndex,j]),me(()=>_s(Z(Et,J=>Re({direction:Et,...J})),Z(St,J=>Re({direction:St,...J})),Z(ss,J=>C(J))),[Z,Re,C]);const Xe=Ye(()=>({prev:b,next:S,close:D,focus:m,slideRect:de?Gf(de,n.padding):{width:0,height:0},containerRect:de||{width:0,height:0},subscribeSensors:W,containerRef:se,setCarouselRef:ke,toolbarWidth:w,setToolbarWidth:N}),[b,S,D,m,W,de,se,ke,w,N,n.padding]);return tr(i.ref,()=>({prev:b,next:S,close:D,focus:m,getLightboxProps:O,getLightboxState:g}),[b,S,D,m,O,g]),te("div",{ref:Pe,className:dt(_e(Fs()),_e(is)),style:{...P===qe.SWIPE?{[Ve("swipe_offset")]:`${Math.round(T.current)}px`}:null,...P===qe.PULL?{[Ve("pull_offset")]:`${Math.round($.current)}px`,[Ve("pull_opacity")]:`${B.current}`}:null,...i.touchAction!=="none"?{[Ve("controller_touch_action")]:i.touchAction}:null,...l.container},...i.aria?{role:"presentation","aria-live":"polite"}:null,tabIndex:-1,...q},de&&te(js.Provider,{value:Xe},t,(r=d.controls)===null||r===void 0?void 0:r.call(d)))}const xd=kt(ns,wd);function Ot(t){return ur(rs,t)}function Ds(t){return ur("slide",t)}function Ed({slide:t,offset:e}){const r=ce(null),{currentIndex:n}=Vr(),{slideRect:o,close:i,focus:c}=hr(),{render:l,carousel:{imageFit:d,imageProps:p},on:{click:f},controller:{closeOnBackdropClick:y},styles:{slide:v}}=fr(),{getOwnerDocument:w}=ho(),N=e!==0;me(()=>{var P;N&&(!((P=r.current)===null||P===void 0)&&P.contains(w().activeElement))&&c()},[N,c,w]);const A=()=>{var P,_,T,$;let B=(P=l.slide)===null||P===void 0?void 0:P.call(l,{slide:t,offset:e,rect:o});return!B&&bs(t)&&(B=te(yd,{slide:t,offset:e,render:l,rect:o,imageFit:d,imageProps:p,onClick:N?void 0:()=>f==null?void 0:f({index:n})})),B?te(Ce,null,(_=l.slideHeader)===null||_===void 0?void 0:_.call(l,{slide:t}),((T=l.slideContainer)!==null&&T!==void 0?T:({children:q})=>q)({slide:t,children:B}),($=l.slideFooter)===null||$===void 0?void 0:$.call(l,{slide:t})):null},C=P=>{const _=r.current,T=P.target instanceof HTMLElement?P.target:void 0;y&&T&&_&&(T===_||Array.from(_.children).find($=>$===T)&&T.classList.contains(_e(Ff)))&&i()};return te("div",{ref:r,className:dt(_e(Ds()),!N&&_e(Ds("current")),_e(is)),...Xf(N),onClick:C,style:v},A())}function Sd(){const t=fr().styles.slide;return te("div",{className:_e("slide"),style:t})}function Ad({carousel:t}){const{slides:e,currentIndex:r,globalIndex:n}=Vr(),{setCarouselRef:o}=hr(),i=qr(t.spacing),c=qr(t.padding),l=Jf(t,e,1),d=[];if(xs(e))for(let p=r-l;p<=r+l;p+=1){const f=Es(e,p),y=n-r+p,v=t.finite&&(p<0||p>e.length-1);d.push(v?{key:y}:{key:[`${y}`,Yf(f)].filter(Boolean).join("|"),offset:p-r,slide:f})}return te("div",{ref:o,className:dt(_e(Ot()),d.length>0&&_e(Ot("with_slides"))),style:{[`${Ve(Ot("slides_count"))}`]:d.length,[`${Ve(Ot("spacing_px"))}`]:i.pixel||0,[`${Ve(Ot("spacing_percent"))}`]:i.percent||0,[`${Ve(Ot("padding_px"))}`]:c.pixel||0,[`${Ve(Ot("padding_percent"))}`]:c.percent||0}},d.map(({key:p,slide:f,offset:y})=>f?te(Ed,{key:p,slide:f,offset:y}):te(Sd,{key:p})))}const kd=kt(rs,Ad);function Ls(){const{carousel:t}=fr(),{slides:e,currentIndex:r}=Vr(),n=e.length===0||t.finite&&r===0,o=e.length===0||t.finite&&r===e.length-1;return{prevDisabled:n,nextDisabled:o}}function Od(t){var e;const r=go(),{publish:n}=Wr(),{animation:o}=fr(),{prevDisabled:i,nextDisabled:c}=Ls(),l=((e=o.navigation)!==null&&e!==void 0?e:o.swipe)/2,d=$s(()=>n(Et),l),p=$s(()=>n(St),l),f=Be(y=>{switch(y.key){case Df:n(jt);break;case Lf:(r?c:i)||(r?p:d)();break;case Uf:(r?i:c)||(r?d:p)();break}});me(()=>t(ps,f),[t,f])}function Us({label:t,icon:e,renderIcon:r,action:n,onClick:o,disabled:i,style:c}){return te(Ts,{label:t,icon:e,renderIcon:r,className:_e(`navigation_${n}`),disabled:i,onClick:o,style:c,...pd(hr().focus,i)})}function Id({render:{buttonPrev:t,buttonNext:e,iconPrev:r,iconNext:n},styles:o}){const{prev:i,next:c,subscribeSensors:l}=hr(),{prevDisabled:d,nextDisabled:p}=Ls();return Od(l),te(Ce,null,t?t():te(Us,{label:"Previous",action:Et,icon:cd,renderIcon:r,style:o.navigationPrev,disabled:d,onClick:i}),e?e():te(Us,{label:"Next",action:St,icon:ld,renderIcon:n,style:o.navigationNext,disabled:p,onClick:c}))}const Pd=kt(Tf,Id),zs=_e($f),Nd=_e(as);function Td(t){return"style"in t}function qs(t,e,r){const n=window.getComputedStyle(t),o=r?"padding-left":"padding-right",i=r?n.paddingLeft:n.paddingRight,c=t.style.getPropertyValue(o);return t.style.setProperty(o,`${(zr(i)||0)+e}px`),()=>{c?t.style.setProperty(o,c):t.style.removeProperty(o)}}function Rd({noScroll:{disabled:t},children:e}){const r=go(),{getOwnerDocument:n,getOwnerWindow:o}=ho();return me(()=>{if(t)return()=>{};const i=[],c=o(),{body:l,documentElement:d}=n(),p=Math.round(c.innerWidth-d.clientWidth);if(p>0){i.push(qs(l,p,r));const f=l.getElementsByTagName("*");for(let y=0;y<f.length;y+=1){const v=f[y];Td(v)&&c.getComputedStyle(v).getPropertyValue("position")==="fixed"&&!v.classList.contains(Nd)&&i.push(qs(v,p,r))}}return l.classList.add(zs),()=>{l.classList.remove(zs),i.forEach(f=>f())}},[r,t,n,o]),te(Ce,null,e)}const Cd=kt(Rf,Rd);function Ws(t){return ur(io,t)}function Vs(t,e,r){const n=t.getAttribute(e);return t.setAttribute(e,r),()=>{n?t.setAttribute(e,n):t.removeAttribute(e)}}function Bd({children:t,animation:e,styles:r,className:n,on:o,portal:i,close:c}){const[l,d]=we(!1),[p,f]=we(!1),y=ce([]),v=ce(null),{setTimeout:w}=Hr(),{subscribe:N}=Wr(),C=Rs()?0:e.fade;me(()=>(d(!0),()=>{d(!1),f(!1)}),[]);const P=Be(()=>{y.current.forEach(B=>B()),y.current=[]}),_=Be(()=>{var B;f(!1),P(),(B=o.exiting)===null||B===void 0||B.call(o),w(()=>{var q;(q=o.exited)===null||q===void 0||q.call(o),c()},C)});me(()=>N(jt,_),[N,_]);const T=Be(B=>{var q,W,Z;B.scrollTop,f(!0),(q=o.entering)===null||q===void 0||q.call(o);const U=(Z=(W=B.parentNode)===null||W===void 0?void 0:W.children)!==null&&Z!==void 0?Z:[];for(let K=0;K<U.length;K+=1){const Q=U[K];["TEMPLATE","SCRIPT","STYLE"].indexOf(Q.tagName)===-1&&Q!==B&&(y.current.push(Vs(Q,"inert","")),y.current.push(Vs(Q,"aria-hidden","true")))}y.current.push(()=>{var K,Q;(Q=(K=v.current)===null||K===void 0?void 0:K.focus)===null||Q===void 0||Q.call(K)}),w(()=>{var K;(K=o.entered)===null||K===void 0||K.call(o)},C)}),$=Ie(B=>{B?T(B):P()},[T,P]);return l?zn(te(gd,{ref:$,className:dt(n,_e(Ws()),_e(as),p&&_e(Ws("open"))),role:"presentation","aria-live":"polite",style:{...e.fade!==po.animation.fade?{[Ve("fade_animation_duration")]:`${C}ms`}:null,...e.easing.fade!==po.animation.easing.fade?{[Ve("fade_animation_timing_function")]:e.easing.fade}:null,...r.root},onFocus:B=>{v.current||(v.current=B.relatedTarget)}},t),i.root||document.body):null}const Md=kt(io,Bd);function $d({children:t}){return te(Ce,null,t)}const Fd=kt(Cf,$d);function jd(t){return ur(os,t)}function Dd({toolbar:{buttons:t},render:{buttonClose:e,iconClose:r},styles:n}){const{close:o,setToolbarWidth:i}=hr(),{setContainerRef:c,containerRect:l}=Bs();pr(()=>{i(l==null?void 0:l.width)},[i,l==null?void 0:l.width]);const d=()=>e?e():te(Ts,{key:jt,label:"Close",icon:sd,renderIcon:r,onClick:o});return te("div",{ref:c,style:n.toolbar,className:_e(jd())},t==null?void 0:t.map(p=>p===jt?d():p))}const Ld=kt(os,Dd);function Hs(t,e){var r;return te(t.module.component,{key:t.module.name,...e},(r=t.children)===null||r===void 0?void 0:r.map(n=>Hs(n,e)))}function Ud(t,e={}){const{easing:r,...n}=t,{easing:o,...i}=e;return{easing:{...r,...o},...n,...i}}function zd({carousel:t,animation:e,render:r,toolbar:n,controller:o,noScroll:i,on:c,plugins:l,slides:d,index:p,...f}){const{animation:y,carousel:v,render:w,toolbar:N,controller:A,noScroll:C,on:P,slides:_,index:T,plugins:$,...B}=po,{config:q,augmentation:W}=Zf([De(Md,[De(Cd,[De(xd,[De(kd),De(Ld),De(Pd)])])])],l||$),Z=W({animation:Ud(y,e),carousel:{...v,...t},render:{...w,...r},toolbar:{...N,...n},controller:{...A,...o},noScroll:{...C,...i},on:{...P,...c},...B,...f});return Z.open?te(td,{...Z},te(od,{slides:d||_,index:zr(p||T)},te(id,null,te(ed,null,Hs(De(Fd,q),Z))))):null}const Gs=({messageIndexKey:t,attachments:e})=>{const{setFullScreen:r}=je(),[n,o]=we(!1);function i(){var l,d,p;return(p=(d=(l=document==null?void 0:document.getElementById("discord-chat"))==null?void 0:l.contentWindow)==null?void 0:d.document)==null?void 0:p.getElementById("root")}function c(){return e!=null&&e.length?I(zd,{open:n,portal:{root:i()},close:()=>{o(!1),r(!1)},slides:e.map(l=>({src:l.proxyURL}))}):null}return e!=null&&e.length?I("div",{children:[e.map((l,d)=>{const{proxyURL:p,width:f,height:y}=l;return I("div",{onClick:()=>{r(!0),o(!0)},children:I("img",{src:p,alt:"Preview",className:`rounded-lg w-[${f}px] h-[${y}px] max-w-[200px] max-h-[200px] aspect-auto`})},`conv-cus-attachment-${t}-${d}`)}),c()]},`conv-cus-attachment-${t}`):null},qd=({renderTimestamp:t,message:e,indexKey:r})=>{function n(o,i){const c=/<\w?:\w+:\d+>/g,l=o.split(c),d=o.match(c)??[],p=[];for(let f=0;f<l.length;f++)if(p.push(l[f]),d[f]){const y=i[d[f]];y&&p.push(I("img",{src:y.imageURL,alt:"",style:{display:"inline-block",width:"20px",height:"20px"}},f))}return p}return I("li",{className:"flex flex-col items-start max-w-lg gap-x-2 sm:gap-x-4 me-11",children:[e.content&&I("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:n(e.content,e.emojis??{})}),I("div",{className:"flex flex-1",children:I(Gs,{attachments:e.attachments,messageIndexKey:r})}),t&&I("div",{children:I("span",{className:"mt-1.5 flex items-center gap-x-1 text-xs text-gray-500",children:[e.authorName," · ",ts(e.date)," ",e.edited?"(edited)":""]})})]},`conv-cs-${r}`)},Wd=({message:t,indexKey:e})=>I("li",{className:`flex ms-auto gap-x-2 sm:gap-x-4 ${t.pending?"opacity-80":""}`,children:[t.content&&I("div",{className:"grow text-end space-y-1",children:I("div",{className:"min-w-10 inline-block bg-blue-600 rounded-2xl p-2 shadow-sm",children:I("p",{className:"text-center text-sm text-white",children:t.content})})}),t.attachments&&I("div",{className:"flex flex-1 justify-end",children:I(Gs,{attachments:t.attachments,messageIndexKey:e})},`conv-cus-${e}-attachments`)]},`conv-cus-${e}`),Vd=({message:t,indexKey:e})=>I("li",{className:"max-w-lg flex gap-x-2 sm:gap-x-4 me-11",children:I("div",{className:"bg-white border border-gray-200 rounded-2xl p-4 space-y-3 dark:bg-neutral-900 dark:border-neutral-700",children:I("p",{className:"mb-1.5 text-sm text-gray-800 dark:text-white",children:t.content})})},`conv-system-${e}`),Hd=()=>{const{setEmail:t,setUsername:e,username:r,email:n,token:o}=je(),[i,c]=we(n),[l,d]=we(r),[p,f]=we(""),y=A=>/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(A),v=!!r&&!!n,w=()=>{y(i)?(f(""),t(i)):f("Please enter a valid email address"),e(l)};function N(){return I("div",{className:"max-w-sm space-y-3",children:[I("div",{children:[I("label",{htmlFor:"hs-leading-icon",className:"block text-sm font-medium mb-2 dark:text-white",children:"Name"}),I("div",{className:"relative",children:[I("input",{type:"text",id:"name",value:l,onChange:A=>d(A.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:v,required:!0}),I("div",{className:"absolute inset-y-0 start-0 flex items-center pointer-events-none z-20 ps-4 text-gray-400",children:I(Su,{size:16})})]})]}),I("div",{children:[I("label",{htmlFor:"hs-leading-icon",className:"block text-sm font-medium mb-2 dark:text-white",children:"Email address"}),I("div",{className:"relative",children:[I("input",{type:"email",id:"email",value:i,onChange:A=>c(A.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:v,required:!0}),I("div",{className:"absolute inset-y-0 start-0 flex items-center pointer-events-none z-20 ps-4 text-gray-400",children:I(_u,{size:16})})]}),p&&I("p",{className:"text-red-500 text-sm mt-2",children:p})]}),!r||!n?I("button",{type:"submit",onClick:w,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 I(Ce,{children:[I("li",{className:"max-w-lg flex gap-x-2 sm:gap-x-4 me-11",children:I("div",{className:"border border-gray-200 rounded-2xl p-4 space-y-3 bg-blue-200",children:I("p",{className:"mb-1.5 text-sm text-gray-800 dark:text-white",children:"Hello! Please introduce yourself."})})}),I("li",{className:"max-w-lg flex gap-x-2 sm:gap-x-4 me-11",children:I("div",{className:"border border-gray-200 rounded-2xl p-4 space-y-3 bg-blue-200",children:N()})}),r&&n&&!o&&I("li",{className:"max-w-lg flex gap-x-2 sm:gap-x-4 me-11",children:I("div",{className:"border border-gray-200 rounded-2xl p-4 space-y-3 bg-blue-200",children:I("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:I("span",{className:"sr-only",children:"Loading..."})})})}),r&&n&&I("li",{className:"max-w-lg flex gap-x-2 sm:gap-x-4 me-11",children:I("div",{className:"border border-gray-200 rounded-2xl p-4 space-y-3 bg-blue-200",children:I("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 Gd(t,e){const r=ce();me(()=>{r.current=t},[t]),me(()=>{function n(){var o;(o=r==null?void 0:r.current)==null||o.call(r)}if(e!==null){const o=setInterval(n,e);return()=>clearInterval(o)}},[e])}function Yd(t,e=!1,r=1){const n=e?1e3:1024;if(Math.abs(t)<n)return t+" B";const o=e?["kB","MB","GB","TB","PB","EB","ZB","YB"]:["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];let i=-1;const c=10**r;do t/=n,++i;while(Math.round(Math.abs(t)*c)/c>=n&&i<o.length-1);return t.toFixed(r)+" "+o[i]}const Jd=({indexKey:t,message:e})=>{const r=e.customRendererProps.file,n=r.status==="error",[o,i]=we(!0),[c,l]=we(0);return Gd(()=>{c<88?l(c+2.5):i(!1)},o&&!n?250:null),I("li",{className:"max-w-lg flex gap-x-2 sm:gap-x-4",style:{marginTop:"20px",marginBottom:"20px"},children:I("div",{className:"w-full bg-white border border-gray-200 rounded-2xl p-4 space-y-4",children:I("div",{children:[I("div",{className:"mb-2 flex justify-between items-center",children:[I("div",{className:"flex items-center gap-x-3",children:[I("span",{className:`size-8 flex ${n?"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:I(mu,{})}),I("div",{children:[I("p",{className:`text-sm ${n?"font-semibold text-red-500":"font-medium text-gray-800"}`,children:r.fileName}),I("p",{className:"text-xs text-gray-500 dark:text-neutral-500",children:Yd(r.size)})]})]}),n&&I("div",{className:"inline-flex items-center gap-x-2",children:I("span",{className:"relative",children:[I("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:I("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"})}),I("span",{className:"sr-only",children:"Danger"})]})})]}),I("div",{className:"flex items-center gap-x-3 whitespace-nowrap",children:[I("div",{className:"flex w-full h-2 bg-gray-200 rounded-full overflow-hidden dark:bg-neutral-700",role:"progressbar",children:I("div",{className:`flex flex-col justify-center rounded-full overflow-hidden ${n?"bg-red-500":"bg-blue-600"} text-xs text-white text-center whitespace-nowrap transition duration-500 dark:bg-blue-500`,style:{width:`${c}%`}})}),I("div",{className:"w-6 text-end",children:I("span",{className:"text-sm text-gray-800 dark:text-white",children:[Math.round(c),"%"]})})]})]})})},`conv-fileupload-${t}`)},Kd=({conversation:t,open:e})=>{function r(c,l){const d=`${c.date}-${l}`;if(typeof c.customRenderer<"u")switch(c.customRenderer){case Ft.IntroduceYourself:return I(Hd,{});case Ft.UploadFile:return I(Jd,{message:c,indexKey:d});default:return i(c,d)}else return c.authorName===lr?i(c,d):c.support?n(c,d):o(c,d)}function n(c,l){var y;const d=(y=t==null?void 0:t.messages)==null?void 0:y.filter(v=>v.support),p=d==null?void 0:d[d.length-1],f=c.date===(p==null?void 0:p.date);return I(qd,{renderTimestamp:f,message:c,indexKey:l})}function o(c,l){return I(Wd,{message:c,indexKey:l})}function i(c,l){return I(Vd,{message:c,indexKey:l})}return I("ul",{className:"space-y-2",children:[[...(t==null?void 0:t.messages)??[]].sort((c,l)=>c.date-l.date).map(r),t&&!e&&r(bf,1)]})},Xd=()=>{var _;const{getConversation:t,addMessage:e,tempConversationToThread:r,username:n,updateMessage:o}=je(),[i,c]=we(!1),[l,d]=we([]),[p,f]=we({}),y=ce(null),v=t(),w=(v==null?void 0:v.status)==="open",[N,A]=we("");return me(()=>{y.current&&y.current.scrollTo({top:y.current.scrollHeight,behavior:"smooth"})},[(_=v==null?void 0:v.messages)==null?void 0:_.length]),me(()=>{const T={};l.forEach($=>{const B=new FileReader;B.addEventListener("load",function(){const q=new Image;q.onload=()=>{T[$.name]={url:B.result,width:q.width,height:q.height,size:$.size},f(T)},q.src=B.result},!1),B.readAsDataURL($)})},[l]),I(Ce,{children:[I("div",{ref:y,className:"flex-1 overflow-y-auto p-4 space-y-4",children:I(Kd,{conversation:v,open:w})}),I(Nf,{attachmentPreviews:p,files:l,setFiles:d,inputMessage:N,setInputMessage:A,showEmojiPicker:i,setShowEmojiPicker:c,addEmoji:T=>{A(N+T)},sendMessage:async()=>{const T=Date.now(),$={support:!1,content:N,date:T,authorName:n,pending:!0};if(N.trim()!==""){A(""),e(v?v.threadId:"TEMP",$);const B=await vf({content:N});B&&(v||r(B.threadId),o(B.threadId,T,{...$,pending:!1,date:B.date}))}}})]})};function bo(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 Zd(t){switch(t){case"online":return"Online";case"idle":case"offline":case"invisible":return"Away";case"dnd":return"Unavailable";default:return"Away"}}const Qd=()=>{const{conversations:t,setOpenConversationId:e}=je(),r=t.filter(c=>c.status==="open").length;function n(){return r!==0?null:I("div",{className:"flex justify-center my-2",children:[I("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",I(vu,{})]}),I("div",{})]})}function o(c,l){var f,y,v;const d=c.messages[c.messages.length-1],p=c.status==="open";return I("div",{className:"flex flex-row items-center px-3 py-4 border-b border-gray-200 hover:bg-gray-200 cursor-pointer",onClick:()=>e(c.threadId),children:[I("div",{className:"relative inline-block mr-3",children:[I("img",{className:"inline-block size-[32px] rounded-full",src:((f=c==null?void 0:c.csMember)==null?void 0:f.displayAvatarURL)??"http://placehold.co/250x250"}),((y=c==null?void 0:c.csMember)==null?void 0:y.status)&&I("span",{className:`absolute top-0 end-0 block size-3 rounded-full ring-2 ring-white dark:ring-neutral-900 ${bo(c.csMember.status,"bg")}`})]}),I("div",{className:"flex flex-1 flex-col",children:[I("p",{className:`text-sm/3 ${p?"font-semibold":""}`,children:(v=c==null?void 0:c.csMember)==null?void 0:v.displayName}),I("p",{className:"text-xs text-gray-500 line-clamp-1",children:d.content})]}),I("div",{className:"ml-2",children:I("p",{className:"text-xs text-gray-500",children:ts(d.date)})})]},`conversation-${l}`)}function i(){return[...t].sort((c,l)=>l.lastMessageDate-c.lastMessageDate).map((c,l)=>c.messages.length?o(c,l):null)}return I("div",{children:[n(),I("div",{children:i()})]})},Ys=({IconComponent:t,onClick:e})=>I("button",{className:"flex mr-2 items-center justify-center w-8 h-8 rounded-full hover:bg-gray-100",onClick:e,children:I(t,{})}),ep=({size:t})=>I("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:[I("path",{d:"M18 6 6 18"}),I("path",{d:"m6 6 12 12"})]}),tp=({size:t})=>I("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:I("path",{d:"m15 18-6-6 6-6"})}),Js={title:"Hi there 👋",subtitle:"We typically reply within a few minutes"},rp=()=>{var l,d,p,f,y,v;const{setChatOpen:t,setOpenConversationId:e,guildSettings:r,conversations:n,openConversationId:o}=je(),i=n.find(w=>w.status==="open"),c=o&&(i!=null&&i.csMember)&&((l=i==null?void 0:i.csMember)==null?void 0:l.displayName)!=="Customer support"?{title:(d=i==null?void 0:i.csMember)==null?void 0:d.displayName,subtitle:(p=i==null?void 0:i.csMember)!=null&&p.status?Zd((f=i==null?void 0:i.csMember)==null?void 0:f.status):null,avatar:(y=i==null?void 0:i.csMember)==null?void 0:y.displayAvatarURL,status:(v=i==null?void 0:i.csMember)==null?void 0:v.status}:{title:(r==null?void 0:r.header_title)??Js.title,subtitle:(r==null?void 0:r.header_subtitle)??Js.subtitle,avatar:(r==null?void 0:r.iconURL)||"https://placehold.co/250x250"};return I("div",{className:"flex flex-row items-center bg-white py-2 px-4 border-b border-grey-200",children:[n.length>0&&o&&I(Ys,{onClick:()=>e(null),IconComponent:tp}),I("div",{className:"relative inline-block mr-3",children:[I("img",{className:"inline-block size-[40px] rounded-full",src:c.avatar}),c.status&&I("span",{className:`absolute top-0 end-0 block size-3.5 rounded-full ring-2 ring-white dark:ring-neutral-900 ${bo(c.status,"bg")}`})]}),I("div",{className:"flex-1 flex-col",children:[I("p",{className:"text-lg/5 font-semibold",children:c.title}),c.subtitle&&I("p",{className:`flex-1 text-xs/4 line-clamp-2 ${c.status?bo(c.status,"text"):""}`,children:c.subtitle})]}),I(Ys,{onClick:()=>t(!1),IconComponent:ep})]})},np=()=>{const{openConversationId:t,conversations:e}=je(),r=!t&&e.length;return I("div",{className:"flex flex-col h-full bg-white rounded-lg overflow-hidden",children:[I(rp,{}),r?I(Qd,{}):I(Xd,{})]})},rt=Object.create(null);rt.open="0",rt.close="1",rt.ping="2",rt.pong="3",rt.message="4",rt.upgrade="5",rt.noop="6";const Yr=Object.create(null);Object.keys(rt).forEach(t=>{Yr[rt[t]]=t});const wo={type:"error",data:"parser error"},Ks=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Xs=typeof ArrayBuffer=="function",Zs=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,xo=({type:t,data:e},r,n)=>Ks&&e instanceof Blob?r?n(e):Qs(e,n):Xs&&(e instanceof ArrayBuffer||Zs(e))?r?n(e):Qs(new Blob([e]),n):n(rt[t]+(e||"")),Qs=(t,e)=>{const r=new FileReader;return r.onload=function(){const n=r.result.split(",")[1];e("b"+(n||""))},r.readAsDataURL(t)};function ec(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let Eo;function op(t,e){if(Ks&&t.data instanceof Blob)return t.data.arrayBuffer().then(ec).then(e);if(Xs&&(t.data instanceof ArrayBuffer||Zs(t.data)))return e(ec(t.data));xo(t,!1,r=>{Eo||(Eo=new TextEncoder),e(Eo.encode(r))})}const tc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",yr=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<tc.length;t++)yr[tc.charCodeAt(t)]=t;const ip=t=>{let e=t.length*.75,r=t.length,n,o=0,i,c,l,d;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const p=new ArrayBuffer(e),f=new Uint8Array(p);for(n=0;n<r;n+=4)i=yr[t.charCodeAt(n)],c=yr[t.charCodeAt(n+1)],l=yr[t.charCodeAt(n+2)],d=yr[t.charCodeAt(n+3)],f[o++]=i<<2|c>>4,f[o++]=(c&15)<<4|l>>2,f[o++]=(l&3)<<6|d&63;return p},ap=typeof ArrayBuffer=="function",So=(t,e)=>{if(typeof t!="string")return{type:"message",data:rc(t,e)};const r=t.charAt(0);return r==="b"?{type:"message",data:sp(t.substring(1),e)}:Yr[r]?t.length>1?{type:Yr[r],data:t.substring(1)}:{type:Yr[r]}:wo},sp=(t,e)=>{if(ap){const r=ip(t);return rc(r,e)}else return{base64:!0,data:t}},rc=(t,e)=>{switch(e){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},nc="",cp=(t,e)=>{const r=t.length,n=new Array(r);let o=0;t.forEach((i,c)=>{xo(i,!1,l=>{n[c]=l,++o===r&&e(n.join(nc))})})},lp=(t,e)=>{const r=t.split(nc),n=[];for(let o=0;o<r.length;o++){const i=So(r[o],e);if(n.push(i),i.type==="error")break}return n};function up(){return new TransformStream({transform(t,e){op(t,r=>{const n=r.length;let o;if(n<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,n);else if(n<65536){o=new Uint8Array(3);const i=new DataView(o.buffer);i.setUint8(0,126),i.setUint16(1,n)}else{o=new Uint8Array(9);const i=new DataView(o.buffer);i.setUint8(0,127),i.setBigUint64(1,BigInt(n))}t.data&&typeof t.data!="string"&&(o[0]|=128),e.enqueue(o),e.enqueue(r)})}})}let Ao;function Jr(t){return t.reduce((e,r)=>e+r.length,0)}function Kr(t,e){if(t[0].length===e)return t.shift();const r=new Uint8Array(e);let n=0;for(let o=0;o<e;o++)r[o]=t[0][n++],n===t[0].length&&(t.shift(),n=0);return t.length&&n<t[0].length&&(t[0]=t[0].slice(n)),r}function fp(t,e){Ao||(Ao=new TextDecoder);const r=[];let n=0,o=-1,i=!1;return new TransformStream({transform(c,l){for(r.push(c);;){if(n===0){if(Jr(r)<1)break;const d=Kr(r,1);i=(d[0]&128)===128,o=d[0]&127,o<126?n=3:o===126?n=1:n=2}else if(n===1){if(Jr(r)<2)break;const d=Kr(r,2);o=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),n=3}else if(n===2){if(Jr(r)<8)break;const d=Kr(r,8),p=new DataView(d.buffer,d.byteOffset,d.length),f=p.getUint32(0);if(f>Math.pow(2,21)-1){l.enqueue(wo);break}o=f*Math.pow(2,32)+p.getUint32(4),n=3}else{if(Jr(r)<o)break;const d=Kr(r,o);l.enqueue(So(i?d:Ao.decode(d),e)),n=0}if(o===0||o>t){l.enqueue(wo);break}}}})}const oc=4;function Me(t){if(t)return dp(t)}function dp(t){for(var e in Me.prototype)t[e]=Me.prototype[e];return t}Me.prototype.on=Me.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},Me.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this},Me.prototype.off=Me.prototype.removeListener=Me.prototype.removeAllListeners=Me.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+t];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var n,o=0;o<r.length;o++)if(n=r[o],n===e||n.fn===e){r.splice(o,1);break}return r.length===0&&delete this._callbacks["$"+t],this},Me.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),r=this._callbacks["$"+t],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(r){r=r.slice(0);for(var n=0,o=r.length;n<o;++n)r[n].apply(this,e)}return this},Me.prototype.emitReserved=Me.prototype.emit,Me.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},Me.prototype.hasListeners=function(t){return!!this.listeners(t).length};const Je=typeof self<"u"?self:typeof window<"u"?window:Function("return this")();function ic(t,...e){return e.reduce((r,n)=>(t.hasOwnProperty(n)&&(r[n]=t[n]),r),{})}const pp=Je.setTimeout,hp=Je.clearTimeout;function Xr(t,e){e.useNativeTimers?(t.setTimeoutFn=pp.bind(Je),t.clearTimeoutFn=hp.bind(Je)):(t.setTimeoutFn=Je.setTimeout.bind(Je),t.clearTimeoutFn=Je.clearTimeout.bind(Je))}const yp=1.33;function gp(t){return typeof t=="string"?mp(t):Math.ceil((t.byteLength||t.size)*yp)}function mp(t){let e=0,r=0;for(let n=0,o=t.length;n<o;n++)e=t.charCodeAt(n),e<128?r+=1:e<2048?r+=2:e<55296||e>=57344?r+=3:(n++,r+=4);return r}function _p(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}function vp(t){let e={},r=t.split("&");for(let n=0,o=r.length;n<o;n++){let i=r[n].split("=");e[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return e}class bp extends Error{constructor(e,r,n){super(e),this.description=r,this.context=n,this.type="TransportError"}}class ko extends Me{constructor(e){super(),this.writable=!1,Xr(this,e),this.opts=e,this.query=e.query,this.socket=e.socket}onError(e,r,n){return super.emitReserved("error",new bp(e,r,n)),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 r=So(e,this.socket.binaryType);this.onPacket(r)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,r={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(r)}_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 r=_p(e);return r.length?"?"+r:""}}const ac="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),Oo=64,wp={};let sc=0,Zr=0,cc;function lc(t){let e="";do e=ac[t%Oo]+e,t=Math.floor(t/Oo);while(t>0);return e}function uc(){const t=lc(+new Date);return t!==cc?(sc=0,cc=t):t+"."+lc(sc++)}for(;Zr<Oo;Zr++)wp[ac[Zr]]=Zr;let fc=!1;try{fc=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const xp=fc;function dc(t){const e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||xp))return new XMLHttpRequest}catch{}if(!e)try{return new Je[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function zg(){}function Ep(){}const Sp=function(){return new dc({xdomain:!1}).responseType!=null}();class Ap extends ko{constructor(e){if(super(e),this.polling=!1,typeof location<"u"){const n=location.protocol==="https:";let o=location.port;o||(o=n?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||o!==e.port}const r=e&&e.forceBase64;this.supportsBinary=Sp&&!r,this.opts.withCredentials&&(this.cookieJar=void 0)}get name(){return"polling"}doOpen(){this.poll()}pause(e){this.readyState="pausing";const r=()=>{this.readyState="paused",e()};if(this.polling||!this.writable){let n=0;this.polling&&(n++,this.once("pollComplete",function(){--n||r()})),this.writable||(n++,this.once("drain",function(){--n||r()}))}else r()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const r=n=>{if(this.readyState==="opening"&&n.type==="open"&&this.onOpen(),n.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(n)};lp(e,this.socket.binaryType).forEach(r),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,cp(e,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=uc()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(e,r)}request(e={}){return Object.assign(e,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new nt(this.uri(),e)}doWrite(e,r){const n=this.request({method:"POST",data:e});n.on("success",r),n.on("error",(o,i)=>{this.onError("xhr post error",o,i)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(r,n)=>{this.onError("xhr poll error",r,n)}),this.pollXhr=e}}class nt extends Me{constructor(e,r){super(),Xr(this,r),this.opts=r,this.method=r.method||"GET",this.uri=e,this.data=r.data!==void 0?r.data:null,this.create()}create(){var e;const r=ic(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this.opts.xd;const n=this.xhr=new dc(r);try{n.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let o in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(o)&&n.setRequestHeader(o,this.opts.extraHeaders[o])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}(e=this.opts.cookieJar)===null||e===void 0||e.addCookies(n),"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{var o;n.readyState===3&&((o=this.opts.cookieJar)===null||o===void 0||o.parseCookies(n)),n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(o){this.setTimeoutFn(()=>{this.onError(o)},0);return}typeof document<"u"&&(this.index=nt.requestsCount++,nt.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=Ep,e)try{this.xhr.abort()}catch{}typeof document<"u"&&delete nt.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(nt.requestsCount=0,nt.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",pc);else if(typeof addEventListener=="function"){const t="onpagehide"in Je?"pagehide":"unload";addEventListener(t,pc,!1)}}function pc(){for(let t in nt.requests)nt.requests.hasOwnProperty(t)&&nt.requests[t].abort()}var kp={},Qr={};Qr.byteLength=Pp,Qr.toByteArray=Tp,Qr.fromByteArray=Bp;for(var ot=[],Ke=[],Op=typeof Uint8Array<"u"?Uint8Array:Array,Io="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Lt=0,Ip=Io.length;Lt<Ip;++Lt)ot[Lt]=Io[Lt],Ke[Io.charCodeAt(Lt)]=Lt;Ke[45]=62,Ke[95]=63;function hc(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var n=r===e?0:4-r%4;return[r,n]}function Pp(t){var e=hc(t),r=e[0],n=e[1];return(r+n)*3/4-n}function Np(t,e,r){return(e+r)*3/4-r}function Tp(t){var e,r=hc(t),n=r[0],o=r[1],i=new Op(Np(t,n,o)),c=0,l=o>0?n-4:n,d;for(d=0;d<l;d+=4)e=Ke[t.charCodeAt(d)]<<18|Ke[t.charCodeAt(d+1)]<<12|Ke[t.charCodeAt(d+2)]<<6|Ke[t.charCodeAt(d+3)],i[c++]=e>>16&255,i[c++]=e>>8&255,i[c++]=e&255;return o===2&&(e=Ke[t.charCodeAt(d)]<<2|Ke[t.charCodeAt(d+1)]>>4,i[c++]=e&255),o===1&&(e=Ke[t.charCodeAt(d)]<<10|Ke[t.charCodeAt(d+1)]<<4|Ke[t.charCodeAt(d+2)]>>2,i[c++]=e>>8&255,i[c++]=e&255),i}function Rp(t){return ot[t>>18&63]+ot[t>>12&63]+ot[t>>6&63]+ot[t&63]}function Cp(t,e,r){for(var n,o=[],i=e;i<r;i+=3)n=(t[i]<<16&16711680)+(t[i+1]<<8&65280)+(t[i+2]&255),o.push(Rp(n));return o.join("")}function Bp(t){for(var e,r=t.length,n=r%3,o=[],i=16383,c=0,l=r-n;c<l;c+=i)o.push(Cp(t,c,c+i>l?l:c+i));return n===1?(e=t[r-1],o.push(ot[e>>2]+ot[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],o.push(ot[e>>10]+ot[e>>4&63]+ot[e<<2&63]+"=")),o.join("")}var Po={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Po.read=function(t,e,r,n,o){var i,c,l=o*8-n-1,d=(1<<l)-1,p=d>>1,f=-7,y=r?o-1:0,v=r?-1:1,w=t[e+y];for(y+=v,i=w&(1<<-f)-1,w>>=-f,f+=l;f>0;i=i*256+t[e+y],y+=v,f-=8);for(c=i&(1<<-f)-1,i>>=-f,f+=n;f>0;c=c*256+t[e+y],y+=v,f-=8);if(i===0)i=1-p;else{if(i===d)return c?NaN:(w?-1:1)*(1/0);c=c+Math.pow(2,n),i=i-p}return(w?-1:1)*c*Math.pow(2,i-n)},Po.write=function(t,e,r,n,o,i){var c,l,d,p=i*8-o-1,f=(1<<p)-1,y=f>>1,v=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,w=n?0:i-1,N=n?1:-1,A=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(l=isNaN(e)?1:0,c=f):(c=Math.floor(Math.log(e)/Math.LN2),e*(d=Math.pow(2,-c))<1&&(c--,d*=2),c+y>=1?e+=v/d:e+=v*Math.pow(2,1-y),e*d>=2&&(c++,d/=2),c+y>=f?(l=0,c=f):c+y>=1?(l=(e*d-1)*Math.pow(2,o),c=c+y):(l=e*Math.pow(2,y-1)*Math.pow(2,o),c=0));o>=8;t[r+w]=l&255,w+=N,l/=256,o-=8);for(c=c<<o|l,p+=o;p>0;t[r+w]=c&255,w+=N,c/=256,p-=8);t[r+w-N]|=A*128};/*!
|
|
86
|
+
`);const _=P.state[l];if(_==null)return;JSON.stringify(o.getState())!==JSON.stringify(_)&&w(_);return}o.dispatchFromDevtools&&typeof o.dispatch=="function"&&o.dispatch(P)});case"DISPATCH":switch(A.payload.type){case"RESET":return w(N),l===void 0?f==null?void 0:f.init(o.getState()):f==null?void 0:f.init(zr(d.name));case"COMMIT":if(l===void 0){f==null||f.init(o.getState());return}return f==null?void 0:f.init(zr(d.name));case"ROLLBACK":return io(A.state,P=>{if(l===void 0){w(P),f==null||f.init(o.getState());return}w(P[l]),f==null||f.init(zr(d.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return io(A.state,P=>{if(l===void 0){w(P);return}JSON.stringify(o.getState())!==JSON.stringify(P[l])&&w(P[l])});case"IMPORT_STATE":{const{nextLiftedState:P}=A.payload,_=(C=P.computedStates.slice(-1)[0])==null?void 0:C.state;if(!_)return;w(l===void 0?_:_[l]),f==null||f.send(null,P);return}case"PAUSE_RECORDING":return v=!v}return}}),N},io=(t,e)=>{let r;try{r=JSON.parse(t)}catch(n){console.error("[zustand devtools middleware] Could not parse the received json",n)}r!==void 0&&e(r)};function gf(t,e){let r;try{r=t()}catch{return}return{getItem:o=>{var i;const c=d=>d===null?null:JSON.parse(d,void 0),l=(i=r.getItem(o))!=null?i:null;return l instanceof Promise?l.then(c):c(l)},setItem:(o,i)=>r.setItem(o,JSON.stringify(i,void 0)),removeItem:o=>r.removeItem(o)}}const cr=t=>e=>{try{const r=t(e);return r instanceof Promise?r:{then(n){return cr(n)(r)},catch(n){return this}}}catch(r){return{then(n){return this},catch(n){return cr(n)(r)}}}},mf=(t,e)=>(r,n,o)=>{let i={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:C=>C,version:0,merge:(C,P)=>({...P,...C}),...e},c=!1;const l=new Set,d=new Set;let p;try{p=i.getStorage()}catch{}if(!p)return t((...C)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),r(...C)},n,o);const f=cr(i.serialize),y=()=>{const C=i.partialize({...n()});let P;const _=f({state:C,version:i.version}).then(T=>p.setItem(i.name,T)).catch(T=>{P=T});if(P)throw P;return _},v=o.setState;o.setState=(C,P)=>{v(C,P),y()};const w=t((...C)=>{r(...C),y()},n,o);let N;const A=()=>{var C;if(!p)return;c=!1,l.forEach(_=>_(n()));const P=((C=i.onRehydrateStorage)==null?void 0:C.call(i,n()))||void 0;return cr(p.getItem.bind(p))(i.name).then(_=>{if(_)return i.deserialize(_)}).then(_=>{if(_)if(typeof _.version=="number"&&_.version!==i.version){if(i.migrate)return i.migrate(_.state,_.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return _.state}).then(_=>{var T;return N=i.merge(_,(T=n())!=null?T:w),r(N,!0),y()}).then(()=>{P==null||P(N,void 0),c=!0,d.forEach(_=>_(N))}).catch(_=>{P==null||P(void 0,_)})};return o.persist={setOptions:C=>{i={...i,...C},C.getStorage&&(p=C.getStorage())},clearStorage:()=>{p==null||p.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>A(),hasHydrated:()=>c,onHydrate:C=>(l.add(C),()=>{l.delete(C)}),onFinishHydration:C=>(d.add(C),()=>{d.delete(C)})},A(),N||w},_f=(t,e)=>(r,n,o)=>{let i={storage:gf(()=>localStorage),partialize:A=>A,version:0,merge:(A,C)=>({...C,...A}),...e},c=!1;const l=new Set,d=new Set;let p=i.storage;if(!p)return t((...A)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),r(...A)},n,o);const f=()=>{const A=i.partialize({...n()});return p.setItem(i.name,{state:A,version:i.version})},y=o.setState;o.setState=(A,C)=>{y(A,C),f()};const v=t((...A)=>{r(...A),f()},n,o);o.getInitialState=()=>v;let w;const N=()=>{var A,C;if(!p)return;c=!1,l.forEach(_=>{var T;return _((T=n())!=null?T:v)});const P=((C=i.onRehydrateStorage)==null?void 0:C.call(i,(A=n())!=null?A:v))||void 0;return cr(p.getItem.bind(p))(i.name).then(_=>{if(_)if(typeof _.version=="number"&&_.version!==i.version){if(i.migrate)return[!0,i.migrate(_.state,_.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,_.state];return[!1,void 0]}).then(_=>{var T;const[$,B]=_;if(w=i.merge(B,(T=n())!=null?T:v),r(w,!0),$)return f()}).then(()=>{P==null||P(w,void 0),w=n(),c=!0,d.forEach(_=>_(w))}).catch(_=>{P==null||P(void 0,_)})};return o.persist={setOptions:A=>{i={...i,...A},A.storage&&(p=A.storage)},clearStorage:()=>{p==null||p.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>N(),hasHydrated:()=>c,onHydrate:A=>(l.add(A),()=>{l.delete(A)}),onFinishHydration:A=>(d.add(A),()=>{d.delete(A)})},i.skipHydration||N(),w||v},je=rf(yf(((t,e)=>"getStorage"in e||"serialize"in e||"deserialize"in e?((Ur?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),mf(t,e)):_f(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:r=>t(()=>({_REHYDRATED_:r})),setFullScreen:r=>t(()=>({fullScreen:r})),setToken:r=>t(()=>({token:r})),toggleChatOpen:()=>t(r=>({isChatOpen:!r.isChatOpen})),setNetworkInitialized:r=>t(()=>({isNetworkInitialized:r})),setChatVisible:r=>t(()=>({isChatVisible:r})),setChatOpen:r=>t(()=>({isChatOpen:r})),setOpenConversationId:r=>t(()=>({openConversationId:r})),setConversations:r=>t(()=>({conversations:r})),setGuildSettings:r=>t(n=>({guildSettings:{...n.guildSettings,...r}})),setConversationOpen:(r,n)=>t(o=>({conversations:o.conversations.map(i=>i.threadId===r?{...i,status:n?"open":"closed"}:i)})),setConversationCSMember:(r,n)=>t(Lr(o=>{const i=o.conversations.find(c=>c.threadId===r);i&&(i.csMember=n)})),addMessage:(r,n)=>t(Lr(o=>{const i=o.conversations.find(c=>c.threadId===r);i?i.messages.push(n):(o.conversations.push({threadId:r,lastMessageDate:Date.now(),firstMessageDate:Date.now(),status:"open",messages:[n]}),o.openConversationId=r)})),updateMessage:(r,n,o)=>t(Lr(i=>{const c=i.conversations.findIndex(l=>l.threadId===r);if(c!==-1){const l=i.conversations[c].messages.findIndex(d=>d.date===n);i.conversations[c].messages[l]=o}})),removeMessage:(r,n)=>t(Lr(o=>{const i=o.conversations.findIndex(c=>c.threadId===r);i!==-1&&(o.conversations[i].messages=o.conversations[i].messages.filter(c=>c.date!==n))})),tempConversationToThread:r=>t(n=>({...n,openConversationId:r,conversations:n.conversations.map(o=>o.threadId==="TEMP"?{...o,threadId:r}:o)})),setEmail:r=>t(()=>({email:r})),setUsername:r=>t(()=>({username:r})),getConversation:()=>{const{conversations:r,openConversationId:n}=e();return n?r.find(o=>o.threadId===n)??null:null}}),{name:"discord-widget-storage",partialize:t=>({token:t.token,username:t.username,email:t.email,openConversationId:t.openConversationId,conversations:vf(t.conversations),guildSettings:t.guildSettings}),onRehydrateStorage:t=>()=>t.setRehydrated(!0)}),{enabled:!1}));function vf(t){return t.map(e=>({...e,messages:e.messages.filter(r=>!r.ephemeral&&!r.pending)}))}function bf(){var e,r;const t={app_id:(e=window==null?void 0:window.deskcordSettings)==null?void 0:e.app_id,api:((r=window==null?void 0:window.deskcordSettings)==null?void 0:r.api)??pu};if(!t.app_id)throw new Error("Cannot initialize discord chat. Please check your installation and embed.");return t}const dt=bf();async function wf({content:t}){const e=je.getState().username,r=Tr.get("discord-widget"),n=JSON.stringify({name:e,content:t}),o=new Headers;o.append("Content-Type","application/json"),o.append("Authorization",`Bearer ${r}`);const i={method:"POST",headers:o,body:n};return await(await fetch(`${dt.api}/conversations/sendMessage`,i)).json()}var Ft=(t=>(t[t.IntroduceYourself=0]="IntroduceYourself",t[t.UploadFile=1]="UploadFile",t))(Ft||{});const lr="System",xf={content:"This conversation has been closed by the support.",support:!0,authorName:lr,date:Date.now()},Ef={content:"",support:!0,authorName:lr,date:Date.now(),customRenderer:Ft.IntroduceYourself};function Sf(t){return{content:`You are now chatting with ${t}.`,support:!0,authorName:lr,date:Date.now(),ephemeral:!0}}function Af(t){return{content:"",support:!0,authorName:lr,date:Date.now(),customRenderer:Ft.UploadFile,customRendererProps:{file:t},ephemeral:!0}}function kf(t){return{content:"",support:!1,authorName:"",date:Date.now(),ephemeral:!0,attachments:t}}const Of=vt(({accept:t,maxSize:e,uploadConfig:r,onFileSelect:n,onUploadComplete:o,onUploadStart:i,onError:c},l)=>{const d=ce(null),p=ce(null),{addMessage:f,getConversation:y,removeMessage:v,updateMessage:w}=je(),N=y();tr(l,()=>({upload:async()=>{if(p.current)try{const $=new FormData;$.append("file",p.current),i==null||i(p.current),C(p.current);const B=await fetch(r.url,{method:r.method,headers:r.headers,body:$}),q=await B.json();o==null||o(B),P(p.current),A(q)}catch($){c==null||c($),_(p.current)}},clear:()=>{p.current=null,d.current&&(d.current.value=""),n==null||n(null)}}));function A($){N&&f(N.threadId,kf($.attachments))}function C($){N&&f(N.threadId,Af({fileName:$.name,status:"uploading",size:$.size}))}function P($){var q;if(!N)return;const B=(q=y())==null?void 0:q.messages.find(W=>{var Z,U;return((U=(Z=W.customRendererProps)==null?void 0:Z.file)==null?void 0:U.fileName)===$.name});B&&v(N.threadId,B.date)}function _($){var q,W;if(!N)return;const B=(q=y())==null?void 0:q.messages.find(Z=>{var U,K;return((K=(U=Z.customRendererProps)==null?void 0:U.file)==null?void 0:K.fileName)===$.name});(W=B==null?void 0:B.customRendererProps)!=null&&W.file&&w(N.threadId,B.date,{...B,customRendererProps:{...B.customRendererProps,file:{...B.customRendererProps.file,status:"error"}}})}return I(Ce,{children:[I("button",{className:"text-gray-500 hover:text-blue-500","aria-label":"Upload file",onClick:()=>{var $;return($=d.current)==null?void 0:$.click()},children:I(xu,{size:16})}),I("input",{type:"file",accept:t,ref:d,style:{display:"none"},onChange:$=>{var q;const B=(q=$.target.files)==null?void 0:q[0];B&&B.size<=e?(p.current=B,n==null||n(B)):(p.current=null,n==null||n(null))}})]})}),If=({size:t})=>I("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:I("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"})}),Pf=({onPickEmoji:t})=>I("div",{className:"mb-2 p-2 bg-white max-h-40 overflow-y-auto",children:I("div",{className:"grid grid-cols-8 gap-2",children:Nf.map((e,r)=>I("button",{className:"text-2xl hover:bg-gray-100 rounded",onClick:()=>t(e),children:e},r))})}),Nf=["😀","😃","😄","😁","😆","😅","😂","🤣","😊","😇","🙂","🙃","😉","😌","😍","🥰","😘","😗","😙","😚","😋","😛","😝","😜","🤪","🤨","🧐","🤓","😎","🤩","🥳","😏","😒","😞","😔","😟","😕","🙁","☹️","😣","😖","😫","😩","🥺","😢","😭","😤","😠","😡","🤬","🤯","😳","🥵","🥶","😱","😨","😰","😥","😓","🤗","🤔","🤭","🤫","🤥","😶","😐","😑","😬","🙄","😯","😦","😧","😮","😲","🥱","😴","🤤","😪","😵","🤐","🥴","🤢","🤮","🤧","😷","🤒","🤕"],Tf=({imageUrl:t,fileName:e,onDelete:r,width:n,height:o})=>I("div",{className:"relative w-32 h-32 rounded-lg overflow-hidden bg-gray-100 border border-gray-200",children:[I("div",{className:"flex justify-center absolute inset-0",children:I("img",{src:t,alt:"Preview",className:`w-[${n}px] h-[${o}px] max-w-[100px] max-h-[100px] aspect-auto`})}),I("button",{onClick:r,className:"absolute top-1 right-1 bg-gray-600 p-1 rounded-lg text-red-400 hover:text-white transition",children:I(Su,{size:20})}),I("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})]}),Rf=t=>{const{inputMessage:e,setInputMessage:r,sendMessage:n,setFiles:o,files:i,showEmojiPicker:c,addEmoji:l,setShowEmojiPicker:d,attachmentPreviews:p}=t,{getConversation:f}=je(),y=f(),v=Tr.get("discord-widget"),w=ce(null),N=(y==null?void 0:y.status)==="closed",A=()=>{},C=q=>{o(i.filter(W=>(q==null?void 0:q.name)!==W.name))},P=q=>{q&&o([...i,q])},_=()=>{var q;(q=w.current)==null||q.upload()},T=()=>{i.length&&_(),n()},$=q=>{q.key==="Enter"&&(q.shiftKey?(q.preventDefault(),r(`${e}
|
|
87
|
+
`)):(q.preventDefault(),T()))};return I("div",{className:"relative border-t border-t-gray-200",children:[c&&I(Pf,{onPickEmoji:l}),(()=>{if(!(i!=null&&i.length))return null;const q=i.map((W,Z)=>{if(!p[W.name])return null;const{url:U,width:K,height:Q}=p[W.name];return I(Tf,{onDelete:()=>{var re;o(i.filter(se=>se.name!==W.name)),(re=w.current)==null||re.clear()},fileName:W.name,width:K,height:Q,imageUrl:U},`attachment-preview-${Z}`)});return I("div",{className:"m-2",children:q})})(),I("textarea",{id:"hs-textarea-ex-1",disabled:N,value:e,onChange:q=>r(q.target.value),onKeyDown:$,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":""}),I("div",{className:"absolute bottom-px inset-x-px p-2 rounded-b-md bg-white dark:bg-neutral-900",children:I("div",{className:"flex justify-between items-center",children:[I("div",{className:"flex items-center",children:I("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:I(Of,{ref:w,accept:"image/*",maxSize:10*1024*1024,uploadConfig:{url:`${dt.api}/conversations/uploadAttachment`,method:"POST",headers:{Authorization:`Bearer ${v}`}},onUploadComplete:A,onUploadStart:C,onFileSelect:P})})}),I("div",{className:"flex items-center gap-x-1",children:[I("button",{type:"button",onClick:N?void 0:()=>d(!c),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:I(Eu,{size:16})}),I("button",{type:"button",onClick:()=>T(),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:I(If,{size:16})})]})]})})]})},rs=t=>{const e=Date.now(),r=Math.floor((e-t)/1e3);return r<60?"Just now":r<3600?`${Math.floor(r/60)}m ago`:r<86400?`${Math.floor(r/3600)}h ago`:`${Math.floor(r/86400)}d ago`},ns="carousel",os="controller",Cf="navigation",Bf="no-scroll",ao="portal",Mf="root",is="toolbar",so="loading",co="error",lo="complete",$f="placeholder",Ff=t=>`active-slide-${t}`,as="flex_center",jf="no_scroll",ss="no_scroll_padding",Df="slide_wrapper",Et="prev",St="next",cs="swipe",jt="close",ls="onPointerDown",us="onPointerMove",fs="onPointerUp",ds="onPointerLeave",ps="onPointerCancel",hs="onKeyDown",Lf="onKeyUp",ys="onWheel",Uf="Escape",zf="ArrowLeft",qf="ArrowRight",Wf="button",uo="icon",gs="contain",ms="cover",Vf="Unknown action type",_s="yarl__";function pt(...t){return[...t].filter(Boolean).join(" ")}function _e(t){return`${_s}${t}`}function Ve(t){return`--${_s}${t}`}function ur(t,e){return`${t}${e?`_${e}`:""}`}function fo(t){return e=>ur(t,e)}function Hf(t,e){var r;return(r=t==null?void 0:t[e])!==null&&r!==void 0?r:e}function vs(...t){return()=>{t.forEach(e=>{e()})}}function At(t,e,r){return()=>{const n=Or(r);if(!n)throw new Error(`${t} must be used within a ${e}.Provider`);return n}}function bs(){return typeof window<"u"}function Gf(t,e=0){const r=10**e;return Math.round((t+Number.EPSILON)*r)/r}function ws(t){return t.type===void 0||t.type==="image"}function Yf(t,e){return t.imageFit===ms||t.imageFit!==gs&&e===ms}function qr(t){return typeof t=="string"?Number.parseInt(t,10):t}function Wr(t){if(typeof t=="number")return{pixel:t};if(typeof t=="string"){const e=qr(t);return t.endsWith("%")?{percent:e}:{pixel:e}}return{pixel:0}}function Jf(t,e){const r=Wr(e),n=r.percent!==void 0?t.width/100*r.percent:r.pixel;return{width:Math.max(t.width-2*n,0),height:Math.max(t.height-2*n,0)}}function xs(t,e){return e>0?(t%e+e)%e:0}function Es(t){return t.length>0}function Ss(t,e){return t[xs(e,t.length)]}function po(t,e){return Es(t)?Ss(t,e):void 0}function Kf(t){return ws(t)?t.src:void 0}function Xf(t,e,r=0){return Math.min(t.preload,Math.max(t.finite?e.length-1:Math.floor(e.length/2),r))}const Zf=Number(Sa.split(".")[0])>=19;function Qf(t){return{inert:Zf?t:t?"":void 0}}const ho={open:!1,close:()=>{},index:0,slides:[],render:{},plugins:[],toolbar:{buttons:[jt]},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:gs,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 kt(t,e){return{name:t,component:e}}function De(t,e){return{module:t,children:e}}function As(t,e,r){return t.module.name===e?r(t):t.children?[De(t.module,t.children.flatMap(n=>{var o;return(o=As(n,e,r))!==null&&o!==void 0?o:[]}))]:[t]}function Dt(t,e,r){return t.flatMap(n=>{var o;return(o=As(n,e,r))!==null&&o!==void 0?o:[]})}function ed(t,e=[],r=[]){let n=t;const o=w=>{const N=[...n];for(;N.length>0;){const A=N.pop();if((A==null?void 0:A.module.name)===w)return!0;A!=null&&A.children&&N.push(...A.children)}return!1},i=(w,N)=>{if(w===""){n=[De(N,n)];return}n=Dt(n,w,A=>[De(N,[A])])},c=(w,N)=>{n=Dt(n,w,A=>[De(A.module,[De(N,A.children)])])},l=(w,N,A)=>{n=Dt(n,w,C=>{var P;return[De(C.module,[...A?[De(N)]:[],...(P=C.children)!==null&&P!==void 0?P:[],...A?[]:[De(N)]])]})},d=(w,N,A)=>{n=Dt(n,w,C=>[...A?[De(N)]:[],C,...A?[]:[De(N)]])},p=w=>{c(os,w)},f=(w,N)=>{n=Dt(n,w,A=>[De(N,A.children)])},y=w=>{n=Dt(n,w,N=>N.children)},v=w=>{r.push(w)};return e.forEach(w=>{w({contains:o,addParent:i,append:c,addChild:l,addSibling:d,addModule:p,replace:f,remove:y,augment:v})}),{config:n,augmentation:w=>r.reduce((N,A)=>A(N),w)}}const ks=lt(null),yo=At("useDocument","DocumentContext",ks);function td({nodeRef:t,children:e}){const r=Ye(()=>{const n=i=>{var c;return((c=i||t.current)===null||c===void 0?void 0:c.ownerDocument)||document};return{getOwnerDocument:n,getOwnerWindow:i=>{var c;return((c=n(i))===null||c===void 0?void 0:c.defaultView)||window}}},[t]);return te(ks.Provider,{value:r},e)}const Os=lt(null),Vr=At("useEvents","EventsContext",Os);function rd({children:t}){const[e]=we({});me(()=>()=>{Object.keys(e).forEach(n=>delete e[n])},[e]);const r=Ye(()=>{const n=(c,l)=>{var d;(d=e[c])===null||d===void 0||d.splice(0,e[c].length,...e[c].filter(p=>p!==l))};return{publish:(...[c,l])=>{var d;(d=e[c])===null||d===void 0||d.forEach(p=>p(l))},subscribe:(c,l)=>(e[c]||(e[c]=[]),e[c].push(l),()=>n(c,l)),unsubscribe:n}},[e]);return te(Os.Provider,{value:r},t)}const Is=lt(null),fr=At("useLightboxProps","LightboxPropsContext",Is);function nd({children:t,...e}){return te(Is.Provider,{value:e},t)}const Ps=lt(null),Hr=At("useLightboxState","LightboxStateContext",Ps),Ns=lt(null),od=At("useLightboxDispatch","LightboxDispatchContext",Ns);function id(t,e){switch(e.type){case"swipe":{const{slides:r}=t,n=(e==null?void 0:e.increment)||0,o=t.globalIndex+n,i=xs(o,r.length),c=po(r,i),l=n||e.duration?{increment:n,duration:e.duration,easing:e.easing}:void 0;return{slides:r,currentIndex:i,globalIndex:o,currentSlide:c,animation:l}}case"update":return e.slides!==t.slides||e.index!==t.currentIndex?{slides:e.slides,currentIndex:e.index,globalIndex:e.index,currentSlide:po(e.slides,e.index)}:t;default:throw new Error(Vf)}}function ad({slides:t,index:e,children:r}){const[n,o]=er(id,{slides:t,currentIndex:e,globalIndex:e,currentSlide:po(t,e)});me(()=>{o({type:"update",slides:t,index:e})},[t,e]);const i=Ye(()=>({...n,state:n,dispatch:o}),[n,o]);return te(Ns.Provider,{value:o},te(Ps.Provider,{value:i},r))}const Ts=lt(null),Gr=At("useTimeouts","TimeoutsContext",Ts);function sd({children:t}){const[e]=we([]);me(()=>()=>{e.forEach(n=>window.clearTimeout(n)),e.splice(0,e.length)},[e]);const r=Ye(()=>{const n=c=>{e.splice(0,e.length,...e.filter(l=>l!==c))};return{setTimeout:(c,l)=>{const d=window.setTimeout(()=>{n(d),c()},l);return e.push(d),d},clearTimeout:c=>{c!==void 0&&(n(c),window.clearTimeout(c))}}},[e]);return te(Ts.Provider,{value:r},t)}const Rs=vt(function({label:e,className:r,icon:n,renderIcon:o,onClick:i,style:c,...l},d){const{styles:p,labels:f}=fr(),y=Hf(f,e);return te("button",{ref:d,type:"button",title:y,"aria-label":y,className:pt(_e(Wf),r),onClick:i,style:{...c,...p.button},...l},o?o():te(n,{className:_e(uo),style:p.icon}))});function cd(t,e){const r=n=>te("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false",...n},e);return r.displayName=t,r}function dr(t,e){return cd(t,te("g",{fill:"currentColor"},te("path",{d:"M0 0h24v24H0z",fill:"none"}),e))}const ld=dr("Close",te("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"})),ud=dr("Previous",te("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})),fd=dr("Next",te("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),dd=dr("Loading",te(Ce,null,Array.from({length:8}).map((t,e,r)=>te("line",{key:e,x1:"12",y1:"6.5",x2:"12",y2:"1.8",strokeLinecap:"round",strokeWidth:"2.6",stroke:"currentColor",strokeOpacity:1/r.length*(e+1),transform:`rotate(${360/r.length*e}, 12, 12)`})))),pd=dr("Error",te("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"})),pr=bs()?gt:me;function Cs(){const[t,e]=we(!1);return me(()=>{var r,n;const o=(r=window.matchMedia)===null||r===void 0?void 0:r.call(window,"(prefers-reduced-motion: reduce)");e(o==null?void 0:o.matches);const i=c=>e(c.matches);return(n=o==null?void 0:o.addEventListener)===null||n===void 0||n.call(o,"change",i),()=>{var c;return(c=o==null?void 0:o.removeEventListener)===null||c===void 0?void 0:c.call(o,"change",i)}},[]),t}function hd(t){let e=0,r=0,n=0;const i=window.getComputedStyle(t).transform.match(/matrix.*\((.+)\)/);if(i){const c=i[1].split(",").map(qr);c.length===6?(e=c[4],r=c[5]):c.length===16&&(e=c[12],r=c[13],n=c[14])}return{x:e,y:r,z:n}}function Bs(t,e){const r=ce(),n=ce(),o=Cs();return pr(()=>{var i,c,l;if(t.current&&r.current!==void 0&&!o){const{keyframes:d,duration:p,easing:f,onfinish:y}=e(r.current,t.current.getBoundingClientRect(),hd(t.current))||{};if(d&&p){(i=n.current)===null||i===void 0||i.cancel(),n.current=void 0;try{n.current=(l=(c=t.current).animate)===null||l===void 0?void 0:l.call(c,d,{duration:p,easing:f})}catch(v){console.error(v)}n.current&&(n.current.onfinish=()=>{n.current=void 0,y==null||y()})}}r.current=void 0}),{prepareAnimation:i=>{r.current=i},isAnimationPlaying:()=>{var i;return((i=n.current)===null||i===void 0?void 0:i.playState)==="running"}}}function Ms(){const t=ce(null),e=ce(),[r,n]=we();return{setContainerRef:Ie(i=>{t.current=i,e.current&&(e.current.disconnect(),e.current=void 0);const c=()=>{if(i){const l=window.getComputedStyle(i),d=p=>parseFloat(p)||0;n({width:Math.round(i.clientWidth-d(l.paddingLeft)-d(l.paddingRight)),height:Math.round(i.clientHeight-d(l.paddingTop)-d(l.paddingBottom))})}else n(void 0)};c(),i&&typeof ResizeObserver<"u"&&(e.current=new ResizeObserver(c),e.current.observe(i))},[]),containerRef:t,containerRect:r}}function Yr(){const t=ce(),{setTimeout:e,clearTimeout:r}=Gr();return Ie((n,o)=>{r(t.current),t.current=e(n,o>0?o:0)},[e,r])}function Be(t){const e=ce(t);return pr(()=>{e.current=t}),Ie((...r)=>{var n;return(n=e.current)===null||n===void 0?void 0:n.call(e,...r)},[])}function $s(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function go(t,e){return Ye(()=>t==null&&e==null?null:r=>{$s(t,r),$s(e,r)},[t,e])}function yd(t,e=!1){const r=ce();pr(()=>{e&&r.current&&(r.current=!1,t())},[e,t]);const n=Ie(()=>{r.current=!0},[]),o=Ie(()=>{r.current=!1},[]);return{onFocus:n,onBlur:o}}function mo(){const[t,e]=we(!1);return pr(()=>{e(window.getComputedStyle(window.document.documentElement).direction==="rtl")},[]),t}function gd(){const[t]=we({}),e=Ie((o,i)=>{var c;(c=t[o])===null||c===void 0||c.forEach(l=>{i.isPropagationStopped()||l(i)})},[t]),r=Ye(()=>({onPointerDown:o=>e(ls,o),onPointerMove:o=>e(us,o),onPointerUp:o=>e(fs,o),onPointerLeave:o=>e(ds,o),onPointerCancel:o=>e(ps,o),onKeyDown:o=>e(hs,o),onKeyUp:o=>e(Lf,o),onWheel:o=>e(ys,o)}),[e]),n=Ie((o,i)=>(t[o]||(t[o]=[]),t[o].unshift(i),()=>{const c=t[o];c&&c.splice(0,c.length,...c.filter(l=>l!==i))}),[t]);return{registerSensors:r,subscribeSensors:n}}function Fs(t,e){const r=ce(0),n=Yr(),o=Be((...i)=>{r.current=Date.now(),t(i)});return Ie((...i)=>{n(()=>{o(i)},e-(Date.now()-r.current))},[e,o,n])}const _o=fo("slide"),vo=fo("slide_image");function md({slide:t,offset:e,render:r,rect:n,imageFit:o,imageProps:i,onClick:c,onLoad:l,onError:d,style:p}){var f,y,v,w,N,A,C;const[P,_]=we(so),{publish:T}=Vr(),{setTimeout:$}=Gr(),B=ce(null);me(()=>{e===0&&T(Ff(P))},[e,P,T]);const q=Be(H=>{("decode"in H?H.decode():Promise.resolve()).catch(()=>{}).then(()=>{H.parentNode&&(_(lo),$(()=>{l==null||l(H)},0))})}),W=Ie(H=>{B.current=H,H!=null&&H.complete&&q(H)},[q]),Z=Ie(H=>{q(H.currentTarget)},[q]),U=Be(()=>{_(co),d==null||d()}),K=Yf(t,o),Q=(H,m)=>Number.isFinite(H)?H:m,re=Q(Math.max(...((y=(f=t.srcSet)===null||f===void 0?void 0:f.map(H=>H.width))!==null&&y!==void 0?y:[]).concat(t.width?[t.width]:[]).filter(Boolean)),((v=B.current)===null||v===void 0?void 0:v.naturalWidth)||0),se=Q(Math.max(...((N=(w=t.srcSet)===null||w===void 0?void 0:w.map(H=>H.height))!==null&&N!==void 0?N:[]).concat(t.height?[t.height]:[]).filter(Boolean)),((A=B.current)===null||A===void 0?void 0:A.naturalHeight)||0),Ae=re&&se?{maxWidth:`min(${re}px, 100%)`,maxHeight:`min(${se}px, 100%)`}:{maxWidth:"100%",maxHeight:"100%"},de=(C=t.srcSet)===null||C===void 0?void 0:C.sort((H,m)=>H.width-m.width).map(H=>`${H.src} ${H.width}w`).join(", "),Pe=()=>n&&!K&&t.width&&t.height?n.height/t.height*t.width:Number.MAX_VALUE,Se=de&&n&&bs()?`${Math.round(Math.min(Pe(),n.width))}px`:void 0,{style:ke,className:z,...V}=i||{};return te(Ce,null,te("img",{ref:W,onLoad:Z,onError:U,onClick:c,draggable:!1,className:pt(_e(vo()),K&&_e(vo("cover")),P!==lo&&_e(vo("loading")),z),style:{...Ae,...p,...ke},...V,alt:t.alt,sizes:Se,srcSet:de,src:t.src}),P!==lo&&te("div",{className:_e(_o($f))},P===so&&(r!=null&&r.iconLoading?r.iconLoading():te(dd,{className:pt(_e(uo),_e(_o(so)))})),P===co&&(r!=null&&r.iconError?r.iconError():te(pd,{className:pt(_e(uo),_e(_o(co)))}))))}const _d=vt(function({className:e,children:r,...n},o){const i=ce(null);return te(td,{nodeRef:i},te("div",{ref:go(o,i),className:pt(_e("root"),e),...n},r))});var qe;(function(t){t[t.NONE=0]="NONE",t[t.SWIPE=1]="SWIPE",t[t.PULL=2]="PULL",t[t.ANIMATION=3]="ANIMATION"})(qe||(qe={}));function vd(t,e,r,n,o){me(()=>vs(t(ls,e),t(us,r),t(fs,n),t(ds,n),t(ps,n)),[t,e,r,n,o])}var et;(function(t){t[t.NONE=0]="NONE",t[t.SWIPE=1]="SWIPE",t[t.PULL=2]="PULL"})(et||(et={}));const bo=30;function bd(t,e,r,n,o,i,c,l,d,p,f,y,v,w){const N=ce(0),A=ce([]),C=ce(),P=ce(0),_=ce(et.NONE),T=Ie(U=>{C.current===U.pointerId&&(C.current=void 0,_.current=et.NONE);const K=A.current;K.splice(0,K.length,...K.filter(Q=>Q.pointerId!==U.pointerId))},[]),$=Ie(U=>{T(U),U.persist(),A.current.push(U)},[T]),B=Be(U=>{$(U)}),q=(U,K)=>p&&U>K||d&&U<-K,W=Be(U=>{if(A.current.find(K=>K.pointerId===U.pointerId)&&C.current===U.pointerId){const K=Date.now()-P.current,Q=N.current;_.current===et.SWIPE?Math.abs(Q)>.3*r||Math.abs(Q)>5&&K<n?c(Q,K):l(Q):_.current===et.PULL&&(q(Q,2*bo)?v(Q,K):w(Q)),N.current=0,_.current=et.NONE}T(U)}),Z=Be(U=>{const K=A.current.find(Q=>Q.pointerId===U.pointerId);if(K){const Q=C.current===U.pointerId;if(U.buttons===0){Q&&N.current!==0?W(U):T(K);return}const re=U.clientX-K.clientX,se=U.clientY-K.clientY;if(C.current===void 0){const Ae=de=>{$(U),C.current=U.pointerId,P.current=Date.now(),_.current=de};Math.abs(re)>Math.abs(se)&&Math.abs(re)>bo&&e(re)?(Ae(et.SWIPE),o()):Math.abs(se)>Math.abs(re)&&q(se,bo)&&(Ae(et.PULL),f())}else Q&&(_.current===et.SWIPE?(N.current=re,i(re)):_.current===et.PULL&&(N.current=se,y(se)))}});vd(t,B,Z,W)}function wd({preventDefaultWheelX:t,preventDefaultWheelY:e}){const r=ce(null),n=Be(o=>{const i=Math.abs(o.deltaX)>Math.abs(o.deltaY);(i&&t||!i&&e||o.ctrlKey)&&o.preventDefault()});return Ie(o=>{var i;o?o.addEventListener("wheel",n,{passive:!1}):(i=r.current)===null||i===void 0||i.removeEventListener("wheel",n),r.current=o},[n])}function xd(t,e,r,n,o,i,c,l,d){const p=ce(0),f=ce(0),y=ce(),v=ce(),w=ce(0),N=ce(),A=ce(0),{setTimeout:C,clearTimeout:P}=Gr(),_=Ie(()=>{y.current&&(P(y.current),y.current=void 0)},[P]),T=Ie(()=>{v.current&&(P(v.current),v.current=void 0)},[P]),$=Be(()=>{t!==qe.SWIPE&&(p.current=0,A.current=0,_(),T())});me($,[t,$]);const B=Be(W=>{v.current=void 0,p.current===W&&d(p.current)}),q=Be(W=>{if(W.ctrlKey||Math.abs(W.deltaY)>Math.abs(W.deltaX))return;const Z=U=>{w.current=U,P(N.current),N.current=U>0?C(()=>{w.current=0,N.current=void 0},300):void 0};if(t===qe.NONE){if(Math.abs(W.deltaX)<=1.2*Math.abs(w.current)){Z(W.deltaX);return}if(!r(-W.deltaX))return;if(f.current+=W.deltaX,_(),Math.abs(f.current)>30)f.current=0,Z(0),A.current=Date.now(),i();else{const U=f.current;y.current=C(()=>{y.current=void 0,U===f.current&&(f.current=0)},o)}}else if(t===qe.SWIPE){let U=p.current-W.deltaX;if(U=Math.min(Math.abs(U),n)*Math.sign(U),p.current=U,c(U),T(),Math.abs(U)>.2*n){Z(W.deltaX),l(U,Date.now()-A.current);return}v.current=C(()=>B(U),2*o)}else Z(W.deltaX)});me(()=>e(ys,q),[e,q])}const js=fo("container"),Ds=lt(null),hr=At("useController","ControllerContext",Ds);function Ed({children:t,...e}){var r;const{carousel:n,animation:o,controller:i,on:c,styles:l,render:d}=e,{closeOnPullUp:p,closeOnPullDown:f,preventDefaultWheelX:y,preventDefaultWheelY:v}=i,[w,N]=we(),A=Hr(),C=od(),[P,_]=we(qe.NONE),T=ce(0),$=ce(0),B=ce(1),{registerSensors:q,subscribeSensors:W}=gd(),{subscribe:Z,publish:U}=Vr(),K=Yr(),Q=Yr(),re=Yr(),{containerRef:se,setContainerRef:Ae,containerRect:de}=Ms(),Pe=go(wd({preventDefaultWheelX:y,preventDefaultWheelY:v}),Ae),Se=ce(null),ke=go(Se,void 0),{getOwnerDocument:z}=yo(),V=mo(),H=J=>(V?-1:1)*(typeof J=="number"?J:1),m=Be(()=>{var J;return(J=se.current)===null||J===void 0?void 0:J.focus()}),O=Be(()=>e),g=Be(()=>A),b=Ie(J=>U(Et,J),[U]),S=Ie(J=>U(St,J),[U]),D=Ie(()=>U(jt),[U]),M=J=>!(n.finite&&(H(J)>0&&A.currentIndex===0||H(J)<0&&A.currentIndex===A.slides.length-1)),L=J=>{var pe;T.current=J,(pe=se.current)===null||pe===void 0||pe.style.setProperty(Ve("swipe_offset"),`${Math.round(J)}px`)},G=J=>{var pe,ve;$.current=J,B.current=(()=>{const Y=f&&J>0?J:p&&J<0?-J:0;return Math.min(Math.max(Gf(1-Y/60*(1-.5),2),.5),1)})(),(pe=se.current)===null||pe===void 0||pe.style.setProperty(Ve("pull_offset"),`${Math.round(J)}px`),(ve=se.current)===null||ve===void 0||ve.style.setProperty(Ve("pull_opacity"),`${B.current}`)},{prepareAnimation:ne}=Bs(Se,(J,pe,ve)=>{if(Se.current&&de)return{keyframes:[{transform:`translate(0, ${J.rect.y-pe.y+ve.y}px)`,opacity:J.opacity},{transform:"translate(0, 0)",opacity:1}],duration:J.duration,easing:o.easing.fade}}),le=(J,pe)=>{if(p||f){G(J);let ve=0;Se.current&&(ve=o.fade*(pe?2:1),ne({rect:Se.current.getBoundingClientRect(),opacity:B.current,duration:ve})),re(()=>{G(0),_(qe.NONE)},ve),_(qe.ANIMATION),pe||D()}},{prepareAnimation:he,isAnimationPlaying:Ee}=Bs(Se,(J,pe,ve)=>{var E;if(Se.current&&de&&(!((E=A.animation)===null||E===void 0)&&E.duration)){const k=Wr(n.spacing),Y=(k.percent?k.percent*de.width/100:k.pixel)||0;return{keyframes:[{transform:`translate(${H(A.globalIndex-J.index)*(de.width+Y)+J.rect.x-pe.x+ve.x}px, 0)`},{transform:"translate(0, 0)"}],duration:A.animation.duration,easing:A.animation.easing}}}),Re=Be(J=>{var pe,ve;const E=J.offset||0,k=E?o.swipe:(pe=o.navigation)!==null&&pe!==void 0?pe:o.swipe,Y=!E&&!Ee()?o.easing.navigation:o.easing.swipe;let{direction:ee}=J;const X=(ve=J.count)!==null&&ve!==void 0?ve:1;let oe=qe.ANIMATION,u=k*X;if(!ee){const s=de==null?void 0:de.width,h=J.duration||0,x=s?k/s*Math.abs(E):k;X!==0?(h<x?u=u/x*Math.max(h,x/5):s&&(u=k/s*(s-Math.abs(E))),ee=H(E)>0?Et:St):u=k/2}let a=0;ee===Et?M(H(1))?a=-X:(oe=qe.NONE,u=k):ee===St&&(M(H(-1))?a=X:(oe=qe.NONE,u=k)),u=Math.round(u),Q(()=>{L(0),_(qe.NONE)},u),Se.current&&he({rect:Se.current.getBoundingClientRect(),index:A.globalIndex}),_(oe),U(cs,{type:"swipe",increment:a,duration:u,easing:Y})});me(()=>{var J,pe;!((J=A.animation)===null||J===void 0)&&J.increment&&(!((pe=A.animation)===null||pe===void 0)&&pe.duration)&&K(()=>C({type:"swipe",increment:0}),A.animation.duration)},[A.animation,C,K]);const Ue=[W,M,(de==null?void 0:de.width)||0,o.swipe,()=>_(qe.SWIPE),J=>L(J),(J,pe)=>Re({offset:J,duration:pe,count:1}),J=>Re({offset:J,count:0})],ze=[()=>{f&&_(qe.PULL)},J=>G(J),J=>le(J),J=>le(J,!0)];bd(...Ue,p,f,...ze),xd(P,...Ue);const Fe=Be(()=>{i.focus&&z().querySelector(`.${_e(ao)} .${_e(js())}`)&&m()});me(Fe,[Fe]);const j=Be(()=>{var J;(J=c.view)===null||J===void 0||J.call(c,{index:A.currentIndex})});me(j,[A.globalIndex,j]),me(()=>vs(Z(Et,J=>Re({direction:Et,...J})),Z(St,J=>Re({direction:St,...J})),Z(cs,J=>C(J))),[Z,Re,C]);const Xe=Ye(()=>({prev:b,next:S,close:D,focus:m,slideRect:de?Jf(de,n.padding):{width:0,height:0},containerRect:de||{width:0,height:0},subscribeSensors:W,containerRef:se,setCarouselRef:ke,toolbarWidth:w,setToolbarWidth:N}),[b,S,D,m,W,de,se,ke,w,N,n.padding]);return tr(i.ref,()=>({prev:b,next:S,close:D,focus:m,getLightboxProps:O,getLightboxState:g}),[b,S,D,m,O,g]),te("div",{ref:Pe,className:pt(_e(js()),_e(as)),style:{...P===qe.SWIPE?{[Ve("swipe_offset")]:`${Math.round(T.current)}px`}:null,...P===qe.PULL?{[Ve("pull_offset")]:`${Math.round($.current)}px`,[Ve("pull_opacity")]:`${B.current}`}:null,...i.touchAction!=="none"?{[Ve("controller_touch_action")]:i.touchAction}:null,...l.container},...i.aria?{role:"presentation","aria-live":"polite"}:null,tabIndex:-1,...q},de&&te(Ds.Provider,{value:Xe},t,(r=d.controls)===null||r===void 0?void 0:r.call(d)))}const Sd=kt(os,Ed);function Ot(t){return ur(ns,t)}function Ls(t){return ur("slide",t)}function Ad({slide:t,offset:e}){const r=ce(null),{currentIndex:n}=Hr(),{slideRect:o,close:i,focus:c}=hr(),{render:l,carousel:{imageFit:d,imageProps:p},on:{click:f},controller:{closeOnBackdropClick:y},styles:{slide:v}}=fr(),{getOwnerDocument:w}=yo(),N=e!==0;me(()=>{var P;N&&(!((P=r.current)===null||P===void 0)&&P.contains(w().activeElement))&&c()},[N,c,w]);const A=()=>{var P,_,T,$;let B=(P=l.slide)===null||P===void 0?void 0:P.call(l,{slide:t,offset:e,rect:o});return!B&&ws(t)&&(B=te(md,{slide:t,offset:e,render:l,rect:o,imageFit:d,imageProps:p,onClick:N?void 0:()=>f==null?void 0:f({index:n})})),B?te(Ce,null,(_=l.slideHeader)===null||_===void 0?void 0:_.call(l,{slide:t}),((T=l.slideContainer)!==null&&T!==void 0?T:({children:q})=>q)({slide:t,children:B}),($=l.slideFooter)===null||$===void 0?void 0:$.call(l,{slide:t})):null},C=P=>{const _=r.current,T=P.target instanceof HTMLElement?P.target:void 0;y&&T&&_&&(T===_||Array.from(_.children).find($=>$===T)&&T.classList.contains(_e(Df)))&&i()};return te("div",{ref:r,className:pt(_e(Ls()),!N&&_e(Ls("current")),_e(as)),...Qf(N),onClick:C,style:v},A())}function kd(){const t=fr().styles.slide;return te("div",{className:_e("slide"),style:t})}function Od({carousel:t}){const{slides:e,currentIndex:r,globalIndex:n}=Hr(),{setCarouselRef:o}=hr(),i=Wr(t.spacing),c=Wr(t.padding),l=Xf(t,e,1),d=[];if(Es(e))for(let p=r-l;p<=r+l;p+=1){const f=Ss(e,p),y=n-r+p,v=t.finite&&(p<0||p>e.length-1);d.push(v?{key:y}:{key:[`${y}`,Kf(f)].filter(Boolean).join("|"),offset:p-r,slide:f})}return te("div",{ref:o,className:pt(_e(Ot()),d.length>0&&_e(Ot("with_slides"))),style:{[`${Ve(Ot("slides_count"))}`]:d.length,[`${Ve(Ot("spacing_px"))}`]:i.pixel||0,[`${Ve(Ot("spacing_percent"))}`]:i.percent||0,[`${Ve(Ot("padding_px"))}`]:c.pixel||0,[`${Ve(Ot("padding_percent"))}`]:c.percent||0}},d.map(({key:p,slide:f,offset:y})=>f?te(Ad,{key:p,slide:f,offset:y}):te(kd,{key:p})))}const Id=kt(ns,Od);function Us(){const{carousel:t}=fr(),{slides:e,currentIndex:r}=Hr(),n=e.length===0||t.finite&&r===0,o=e.length===0||t.finite&&r===e.length-1;return{prevDisabled:n,nextDisabled:o}}function Pd(t){var e;const r=mo(),{publish:n}=Vr(),{animation:o}=fr(),{prevDisabled:i,nextDisabled:c}=Us(),l=((e=o.navigation)!==null&&e!==void 0?e:o.swipe)/2,d=Fs(()=>n(Et),l),p=Fs(()=>n(St),l),f=Be(y=>{switch(y.key){case Uf:n(jt);break;case zf:(r?c:i)||(r?p:d)();break;case qf:(r?i:c)||(r?d:p)();break}});me(()=>t(hs,f),[t,f])}function zs({label:t,icon:e,renderIcon:r,action:n,onClick:o,disabled:i,style:c}){return te(Rs,{label:t,icon:e,renderIcon:r,className:_e(`navigation_${n}`),disabled:i,onClick:o,style:c,...yd(hr().focus,i)})}function Nd({render:{buttonPrev:t,buttonNext:e,iconPrev:r,iconNext:n},styles:o}){const{prev:i,next:c,subscribeSensors:l}=hr(),{prevDisabled:d,nextDisabled:p}=Us();return Pd(l),te(Ce,null,t?t():te(zs,{label:"Previous",action:Et,icon:ud,renderIcon:r,style:o.navigationPrev,disabled:d,onClick:i}),e?e():te(zs,{label:"Next",action:St,icon:fd,renderIcon:n,style:o.navigationNext,disabled:p,onClick:c}))}const Td=kt(Cf,Nd),qs=_e(jf),Rd=_e(ss);function Cd(t){return"style"in t}function Ws(t,e,r){const n=window.getComputedStyle(t),o=r?"padding-left":"padding-right",i=r?n.paddingLeft:n.paddingRight,c=t.style.getPropertyValue(o);return t.style.setProperty(o,`${(qr(i)||0)+e}px`),()=>{c?t.style.setProperty(o,c):t.style.removeProperty(o)}}function Bd({noScroll:{disabled:t},children:e}){const r=mo(),{getOwnerDocument:n,getOwnerWindow:o}=yo();return me(()=>{if(t)return()=>{};const i=[],c=o(),{body:l,documentElement:d}=n(),p=Math.round(c.innerWidth-d.clientWidth);if(p>0){i.push(Ws(l,p,r));const f=l.getElementsByTagName("*");for(let y=0;y<f.length;y+=1){const v=f[y];Cd(v)&&c.getComputedStyle(v).getPropertyValue("position")==="fixed"&&!v.classList.contains(Rd)&&i.push(Ws(v,p,r))}}return l.classList.add(qs),()=>{l.classList.remove(qs),i.forEach(f=>f())}},[r,t,n,o]),te(Ce,null,e)}const Md=kt(Bf,Bd);function Vs(t){return ur(ao,t)}function Hs(t,e,r){const n=t.getAttribute(e);return t.setAttribute(e,r),()=>{n?t.setAttribute(e,n):t.removeAttribute(e)}}function $d({children:t,animation:e,styles:r,className:n,on:o,portal:i,close:c}){const[l,d]=we(!1),[p,f]=we(!1),y=ce([]),v=ce(null),{setTimeout:w}=Gr(),{subscribe:N}=Vr(),C=Cs()?0:e.fade;me(()=>(d(!0),()=>{d(!1),f(!1)}),[]);const P=Be(()=>{y.current.forEach(B=>B()),y.current=[]}),_=Be(()=>{var B;f(!1),P(),(B=o.exiting)===null||B===void 0||B.call(o),w(()=>{var q;(q=o.exited)===null||q===void 0||q.call(o),c()},C)});me(()=>N(jt,_),[N,_]);const T=Be(B=>{var q,W,Z;B.scrollTop,f(!0),(q=o.entering)===null||q===void 0||q.call(o);const U=(Z=(W=B.parentNode)===null||W===void 0?void 0:W.children)!==null&&Z!==void 0?Z:[];for(let K=0;K<U.length;K+=1){const Q=U[K];["TEMPLATE","SCRIPT","STYLE"].indexOf(Q.tagName)===-1&&Q!==B&&(y.current.push(Hs(Q,"inert","")),y.current.push(Hs(Q,"aria-hidden","true")))}y.current.push(()=>{var K,Q;(Q=(K=v.current)===null||K===void 0?void 0:K.focus)===null||Q===void 0||Q.call(K)}),w(()=>{var K;(K=o.entered)===null||K===void 0||K.call(o)},C)}),$=Ie(B=>{B?T(B):P()},[T,P]);return l?qn(te(_d,{ref:$,className:pt(n,_e(Vs()),_e(ss),p&&_e(Vs("open"))),role:"presentation","aria-live":"polite",style:{...e.fade!==ho.animation.fade?{[Ve("fade_animation_duration")]:`${C}ms`}:null,...e.easing.fade!==ho.animation.easing.fade?{[Ve("fade_animation_timing_function")]:e.easing.fade}:null,...r.root},onFocus:B=>{v.current||(v.current=B.relatedTarget)}},t),i.root||document.body):null}const Fd=kt(ao,$d);function jd({children:t}){return te(Ce,null,t)}const Dd=kt(Mf,jd);function Ld(t){return ur(is,t)}function Ud({toolbar:{buttons:t},render:{buttonClose:e,iconClose:r},styles:n}){const{close:o,setToolbarWidth:i}=hr(),{setContainerRef:c,containerRect:l}=Ms();pr(()=>{i(l==null?void 0:l.width)},[i,l==null?void 0:l.width]);const d=()=>e?e():te(Rs,{key:jt,label:"Close",icon:ld,renderIcon:r,onClick:o});return te("div",{ref:c,style:n.toolbar,className:_e(Ld())},t==null?void 0:t.map(p=>p===jt?d():p))}const zd=kt(is,Ud);function Gs(t,e){var r;return te(t.module.component,{key:t.module.name,...e},(r=t.children)===null||r===void 0?void 0:r.map(n=>Gs(n,e)))}function qd(t,e={}){const{easing:r,...n}=t,{easing:o,...i}=e;return{easing:{...r,...o},...n,...i}}function Wd({carousel:t,animation:e,render:r,toolbar:n,controller:o,noScroll:i,on:c,plugins:l,slides:d,index:p,...f}){const{animation:y,carousel:v,render:w,toolbar:N,controller:A,noScroll:C,on:P,slides:_,index:T,plugins:$,...B}=ho,{config:q,augmentation:W}=ed([De(Fd,[De(Md,[De(Sd,[De(Id),De(zd),De(Td)])])])],l||$),Z=W({animation:qd(y,e),carousel:{...v,...t},render:{...w,...r},toolbar:{...N,...n},controller:{...A,...o},noScroll:{...C,...i},on:{...P,...c},...B,...f});return Z.open?te(nd,{...Z},te(ad,{slides:d||_,index:qr(p||T)},te(sd,null,te(rd,null,Gs(De(Dd,q),Z))))):null}const Ys=({messageIndexKey:t,attachments:e})=>{const{setFullScreen:r}=je(),[n,o]=we(!1);function i(){var l,d,p;return(p=(d=(l=document==null?void 0:document.getElementById("discord-chat"))==null?void 0:l.contentWindow)==null?void 0:d.document)==null?void 0:p.getElementById("root")}function c(){return e!=null&&e.length?I(Wd,{open:n,portal:{root:i()},close:()=>{o(!1),r(!1)},slides:e.map(l=>({src:l.proxyURL}))}):null}return e!=null&&e.length?I("div",{children:[e.map((l,d)=>{const{proxyURL:p,width:f,height:y}=l;return I("div",{onClick:()=>{r(!0),o(!0)},children:I("img",{src:p,alt:"Preview",className:`rounded-lg w-[${f}px] h-[${y}px] max-w-[200px] max-h-[200px] aspect-auto`})},`conv-cus-attachment-${t}-${d}`)}),c()]},`conv-cus-attachment-${t}`):null},Vd=({renderTimestamp:t,message:e,indexKey:r})=>{function n(o,i){const c=/<\w?:\w+:\d+>/g,l=o.split(c),d=o.match(c)??[],p=[];for(let f=0;f<l.length;f++)if(p.push(l[f]),d[f]){const y=i[d[f]];y&&p.push(I("img",{src:y.imageURL,alt:"",style:{display:"inline-block",width:"20px",height:"20px"}},f))}return p}return I("li",{className:"flex flex-col items-start max-w-lg gap-x-2 sm:gap-x-4 me-11",children:[e.content&&I("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:n(e.content,e.emojis??{})}),I("div",{className:"flex flex-1",children:I(Ys,{attachments:e.attachments,messageIndexKey:r})}),t&&I("div",{children:I("span",{className:"mt-1.5 flex items-center gap-x-1 text-xs text-gray-500",children:[e.authorName," · ",rs(e.date)," ",e.edited?"(edited)":""]})})]},`conv-cs-${r}`)},Hd=({message:t,indexKey:e})=>I("li",{className:`flex ms-auto gap-x-2 sm:gap-x-4 ${t.pending?"opacity-80":""}`,children:[t.content&&I("div",{className:"grow text-end space-y-1",children:I("div",{className:"min-w-10 inline-block bg-blue-600 rounded-2xl p-2 shadow-sm",children:I("p",{className:"text-center text-sm text-white",children:t.content})})}),t.attachments&&I("div",{className:"flex flex-1 justify-end",children:I(Ys,{attachments:t.attachments,messageIndexKey:e})},`conv-cus-${e}-attachments`)]},`conv-cus-${e}`),Gd=({message:t,indexKey:e})=>I("li",{className:"max-w-lg flex gap-x-2 sm:gap-x-4 me-11",children:I("div",{className:"bg-white border border-gray-200 rounded-2xl p-4 space-y-3 dark:bg-neutral-900 dark:border-neutral-700",children:I("p",{className:"mb-1.5 text-sm text-gray-800 dark:text-white",children:t.content})})},`conv-system-${e}`),Yd=()=>{const{setEmail:t,setUsername:e,username:r,email:n,token:o}=je(),[i,c]=we(n),[l,d]=we(r),[p,f]=we(""),y=A=>/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(A),v=!!r&&!!n,w=()=>{y(i)?(f(""),t(i)):f("Please enter a valid email address"),e(l)};function N(){return I("div",{className:"max-w-sm space-y-3",children:[I("div",{children:[I("label",{htmlFor:"hs-leading-icon",className:"block text-sm font-medium mb-2 dark:text-white",children:"Name"}),I("div",{className:"relative",children:[I("input",{type:"text",id:"name",value:l,onChange:A=>d(A.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:v,required:!0}),I("div",{className:"absolute inset-y-0 start-0 flex items-center pointer-events-none z-20 ps-4 text-gray-400",children:I(Au,{size:16})})]})]}),I("div",{children:[I("label",{htmlFor:"hs-leading-icon",className:"block text-sm font-medium mb-2 dark:text-white",children:"Email address"}),I("div",{className:"relative",children:[I("input",{type:"email",id:"email",value:i,onChange:A=>c(A.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:v,required:!0}),I("div",{className:"absolute inset-y-0 start-0 flex items-center pointer-events-none z-20 ps-4 text-gray-400",children:I(vu,{size:16})})]}),p&&I("p",{className:"text-red-500 text-sm mt-2",children:p})]}),!r||!n?I("button",{type:"submit",onClick:w,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 I(Ce,{children:[I("li",{className:"max-w-lg flex gap-x-2 sm:gap-x-4 me-11",children:I("div",{className:"border border-gray-200 rounded-2xl p-4 space-y-3 bg-blue-200",children:I("p",{className:"mb-1.5 text-sm text-gray-800 dark:text-white",children:"Hello! Please introduce yourself."})})}),I("li",{className:"max-w-lg flex gap-x-2 sm:gap-x-4 me-11",children:I("div",{className:"border border-gray-200 rounded-2xl p-4 space-y-3 bg-blue-200",children:N()})}),r&&n&&!o&&I("li",{className:"max-w-lg flex gap-x-2 sm:gap-x-4 me-11",children:I("div",{className:"border border-gray-200 rounded-2xl p-4 space-y-3 bg-blue-200",children:I("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:I("span",{className:"sr-only",children:"Loading..."})})})}),r&&n&&I("li",{className:"max-w-lg flex gap-x-2 sm:gap-x-4 me-11",children:I("div",{className:"border border-gray-200 rounded-2xl p-4 space-y-3 bg-blue-200",children:I("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 Jd(t,e){const r=ce();me(()=>{r.current=t},[t]),me(()=>{function n(){var o;(o=r==null?void 0:r.current)==null||o.call(r)}if(e!==null){const o=setInterval(n,e);return()=>clearInterval(o)}},[e])}function Kd(t,e=!1,r=1){const n=e?1e3:1024;if(Math.abs(t)<n)return t+" B";const o=e?["kB","MB","GB","TB","PB","EB","ZB","YB"]:["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];let i=-1;const c=10**r;do t/=n,++i;while(Math.round(Math.abs(t)*c)/c>=n&&i<o.length-1);return t.toFixed(r)+" "+o[i]}const Xd=({indexKey:t,message:e})=>{const r=e.customRendererProps.file,n=r.status==="error",[o,i]=we(!0),[c,l]=we(0);return Jd(()=>{c<88?l(c+2.5):i(!1)},o&&!n?250:null),I("li",{className:"max-w-lg flex gap-x-2 sm:gap-x-4",style:{marginTop:"20px",marginBottom:"20px"},children:I("div",{className:"w-full bg-white border border-gray-200 rounded-2xl p-4 space-y-4",children:I("div",{children:[I("div",{className:"mb-2 flex justify-between items-center",children:[I("div",{className:"flex items-center gap-x-3",children:[I("span",{className:`size-8 flex ${n?"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:I(_u,{})}),I("div",{children:[I("p",{className:`text-sm ${n?"font-semibold text-red-500":"font-medium text-gray-800"}`,children:r.fileName}),I("p",{className:"text-xs text-gray-500 dark:text-neutral-500",children:Kd(r.size)})]})]}),n&&I("div",{className:"inline-flex items-center gap-x-2",children:I("span",{className:"relative",children:[I("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:I("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"})}),I("span",{className:"sr-only",children:"Danger"})]})})]}),I("div",{className:"flex items-center gap-x-3 whitespace-nowrap",children:[I("div",{className:"flex w-full h-2 bg-gray-200 rounded-full overflow-hidden dark:bg-neutral-700",role:"progressbar",children:I("div",{className:`flex flex-col justify-center rounded-full overflow-hidden ${n?"bg-red-500":"bg-blue-600"} text-xs text-white text-center whitespace-nowrap transition duration-500 dark:bg-blue-500`,style:{width:`${c}%`}})}),I("div",{className:"w-6 text-end",children:I("span",{className:"text-sm text-gray-800 dark:text-white",children:[Math.round(c),"%"]})})]})]})})},`conv-fileupload-${t}`)},Zd=({conversation:t,open:e})=>{function r(c,l){const d=`${c.date}-${l}`;if(typeof c.customRenderer<"u")switch(c.customRenderer){case Ft.IntroduceYourself:return I(Yd,{});case Ft.UploadFile:return I(Xd,{message:c,indexKey:d});default:return i(c,d)}else return c.authorName===lr?i(c,d):c.support?n(c,d):o(c,d)}function n(c,l){var y;const d=(y=t==null?void 0:t.messages)==null?void 0:y.filter(v=>v.support),p=d==null?void 0:d[d.length-1],f=c.date===(p==null?void 0:p.date);return I(Vd,{renderTimestamp:f,message:c,indexKey:l})}function o(c,l){return I(Hd,{message:c,indexKey:l})}function i(c,l){return I(Gd,{message:c,indexKey:l})}return I("ul",{className:"space-y-2",children:[[...(t==null?void 0:t.messages)??[]].sort((c,l)=>c.date-l.date).map(r),t&&!e&&r(xf,1)]})},Qd=()=>{var _;const{getConversation:t,addMessage:e,tempConversationToThread:r,username:n,updateMessage:o}=je(),[i,c]=we(!1),[l,d]=we([]),[p,f]=we({}),y=ce(null),v=t(),w=(v==null?void 0:v.status)==="open",[N,A]=we("");return me(()=>{y.current&&y.current.scrollTo({top:y.current.scrollHeight,behavior:"smooth"})},[(_=v==null?void 0:v.messages)==null?void 0:_.length]),me(()=>{const T={};l.forEach($=>{const B=new FileReader;B.addEventListener("load",function(){const q=new Image;q.onload=()=>{T[$.name]={url:B.result,width:q.width,height:q.height,size:$.size},f(T)},q.src=B.result},!1),B.readAsDataURL($)})},[l]),I(Ce,{children:[I("div",{ref:y,className:"flex-1 overflow-y-auto p-4 space-y-4",children:I(Zd,{conversation:v,open:w})}),I(Rf,{attachmentPreviews:p,files:l,setFiles:d,inputMessage:N,setInputMessage:A,showEmojiPicker:i,setShowEmojiPicker:c,addEmoji:T=>{A(N+T)},sendMessage:async()=>{const T=Date.now(),$={support:!1,content:N,date:T,authorName:n,pending:!0};if(N.trim()!==""){A(""),e(v?v.threadId:"TEMP",$);const B=await wf({content:N});B&&(v||r(B.threadId),o(B.threadId,T,{...$,pending:!1,date:B.date}))}}})]})};function wo(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 ep(t){switch(t){case"online":return"Online";case"idle":case"offline":case"invisible":return"Away";case"dnd":return"Unavailable";default:return"Away"}}const tp=()=>{const{conversations:t,setOpenConversationId:e}=je(),r=t.filter(c=>c.status==="open").length;function n(){return r!==0?null:I("div",{className:"flex justify-center my-2",children:[I("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",I(bu,{})]}),I("div",{})]})}function o(c,l){var f,y,v;const d=c.messages[c.messages.length-1],p=c.status==="open";return I("div",{className:"flex flex-row items-center px-3 py-4 border-b border-gray-200 hover:bg-gray-200 cursor-pointer",onClick:()=>e(c.threadId),children:[I("div",{className:"relative inline-block mr-3",children:[I("img",{className:"inline-block size-[32px] rounded-full",src:((f=c==null?void 0:c.csMember)==null?void 0:f.displayAvatarURL)??"http://placehold.co/250x250"}),((y=c==null?void 0:c.csMember)==null?void 0:y.status)&&I("span",{className:`absolute top-0 end-0 block size-3 rounded-full ring-2 ring-white dark:ring-neutral-900 ${wo(c.csMember.status,"bg")}`})]}),I("div",{className:"flex flex-1 flex-col",children:[I("p",{className:`text-sm/3 ${p?"font-semibold":""}`,children:(v=c==null?void 0:c.csMember)==null?void 0:v.displayName}),I("p",{className:"text-xs text-gray-500 line-clamp-1",children:d.content})]}),I("div",{className:"ml-2",children:I("p",{className:"text-xs text-gray-500",children:rs(d.date)})})]},`conversation-${l}`)}function i(){return[...t].sort((c,l)=>l.lastMessageDate-c.lastMessageDate).map((c,l)=>c.messages.length?o(c,l):null)}return I("div",{children:[n(),I("div",{children:i()})]})},Js=({IconComponent:t,onClick:e})=>I("button",{className:"flex mr-2 items-center justify-center w-8 h-8 rounded-full hover:bg-gray-100",onClick:e,children:I(t,{})}),rp=({size:t})=>I("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:[I("path",{d:"M18 6 6 18"}),I("path",{d:"m6 6 12 12"})]}),np=({size:t})=>I("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:I("path",{d:"m15 18-6-6 6-6"})}),Ks={title:"Hi there 👋",subtitle:"We typically reply within a few minutes"},op=()=>{var l,d,p,f,y,v;const{setChatOpen:t,setOpenConversationId:e,guildSettings:r,conversations:n,openConversationId:o}=je(),i=n.find(w=>w.status==="open"),c=o&&(i!=null&&i.csMember)&&((l=i==null?void 0:i.csMember)==null?void 0:l.displayName)!=="Customer support"?{title:(d=i==null?void 0:i.csMember)==null?void 0:d.displayName,subtitle:(p=i==null?void 0:i.csMember)!=null&&p.status?ep((f=i==null?void 0:i.csMember)==null?void 0:f.status):null,avatar:(y=i==null?void 0:i.csMember)==null?void 0:y.displayAvatarURL,status:(v=i==null?void 0:i.csMember)==null?void 0:v.status}:{title:(r==null?void 0:r.header_title)??Ks.title,subtitle:(r==null?void 0:r.header_subtitle)??Ks.subtitle,avatar:(r==null?void 0:r.iconURL)||"https://placehold.co/250x250"};return I("div",{className:"flex flex-row items-center bg-white py-2 px-4 border-b border-grey-200",children:[n.length>0&&o&&I(Js,{onClick:()=>e(null),IconComponent:np}),I("div",{className:"relative inline-block mr-3",children:[I("img",{className:"inline-block size-[40px] rounded-full",src:c.avatar}),c.status&&I("span",{className:`absolute top-0 end-0 block size-3.5 rounded-full ring-2 ring-white dark:ring-neutral-900 ${wo(c.status,"bg")}`})]}),I("div",{className:"flex-1 flex-col",children:[I("p",{className:"text-lg/5 font-semibold",children:c.title}),c.subtitle&&I("p",{className:`flex-1 text-xs/4 line-clamp-2 ${c.status?wo(c.status,"text"):""}`,children:c.subtitle})]}),I(Js,{onClick:()=>t(!1),IconComponent:rp})]})},ip=()=>{const{openConversationId:t,conversations:e}=je(),r=!t&&e.length;return I("div",{className:"flex flex-col h-full bg-white rounded-lg overflow-hidden",children:[I(op,{}),r?I(tp,{}):I(Qd,{})]})},rt=Object.create(null);rt.open="0",rt.close="1",rt.ping="2",rt.pong="3",rt.message="4",rt.upgrade="5",rt.noop="6";const Jr=Object.create(null);Object.keys(rt).forEach(t=>{Jr[rt[t]]=t});const xo={type:"error",data:"parser error"},Xs=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Zs=typeof ArrayBuffer=="function",Qs=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,Eo=({type:t,data:e},r,n)=>Xs&&e instanceof Blob?r?n(e):ec(e,n):Zs&&(e instanceof ArrayBuffer||Qs(e))?r?n(e):ec(new Blob([e]),n):n(rt[t]+(e||"")),ec=(t,e)=>{const r=new FileReader;return r.onload=function(){const n=r.result.split(",")[1];e("b"+(n||""))},r.readAsDataURL(t)};function tc(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let So;function ap(t,e){if(Xs&&t.data instanceof Blob)return t.data.arrayBuffer().then(tc).then(e);if(Zs&&(t.data instanceof ArrayBuffer||Qs(t.data)))return e(tc(t.data));Eo(t,!1,r=>{So||(So=new TextEncoder),e(So.encode(r))})}const rc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",yr=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<rc.length;t++)yr[rc.charCodeAt(t)]=t;const sp=t=>{let e=t.length*.75,r=t.length,n,o=0,i,c,l,d;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const p=new ArrayBuffer(e),f=new Uint8Array(p);for(n=0;n<r;n+=4)i=yr[t.charCodeAt(n)],c=yr[t.charCodeAt(n+1)],l=yr[t.charCodeAt(n+2)],d=yr[t.charCodeAt(n+3)],f[o++]=i<<2|c>>4,f[o++]=(c&15)<<4|l>>2,f[o++]=(l&3)<<6|d&63;return p},cp=typeof ArrayBuffer=="function",Ao=(t,e)=>{if(typeof t!="string")return{type:"message",data:nc(t,e)};const r=t.charAt(0);return r==="b"?{type:"message",data:lp(t.substring(1),e)}:Jr[r]?t.length>1?{type:Jr[r],data:t.substring(1)}:{type:Jr[r]}:xo},lp=(t,e)=>{if(cp){const r=sp(t);return nc(r,e)}else return{base64:!0,data:t}},nc=(t,e)=>{switch(e){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},oc="",up=(t,e)=>{const r=t.length,n=new Array(r);let o=0;t.forEach((i,c)=>{Eo(i,!1,l=>{n[c]=l,++o===r&&e(n.join(oc))})})},fp=(t,e)=>{const r=t.split(oc),n=[];for(let o=0;o<r.length;o++){const i=Ao(r[o],e);if(n.push(i),i.type==="error")break}return n};function dp(){return new TransformStream({transform(t,e){ap(t,r=>{const n=r.length;let o;if(n<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,n);else if(n<65536){o=new Uint8Array(3);const i=new DataView(o.buffer);i.setUint8(0,126),i.setUint16(1,n)}else{o=new Uint8Array(9);const i=new DataView(o.buffer);i.setUint8(0,127),i.setBigUint64(1,BigInt(n))}t.data&&typeof t.data!="string"&&(o[0]|=128),e.enqueue(o),e.enqueue(r)})}})}let ko;function Kr(t){return t.reduce((e,r)=>e+r.length,0)}function Xr(t,e){if(t[0].length===e)return t.shift();const r=new Uint8Array(e);let n=0;for(let o=0;o<e;o++)r[o]=t[0][n++],n===t[0].length&&(t.shift(),n=0);return t.length&&n<t[0].length&&(t[0]=t[0].slice(n)),r}function pp(t,e){ko||(ko=new TextDecoder);const r=[];let n=0,o=-1,i=!1;return new TransformStream({transform(c,l){for(r.push(c);;){if(n===0){if(Kr(r)<1)break;const d=Xr(r,1);i=(d[0]&128)===128,o=d[0]&127,o<126?n=3:o===126?n=1:n=2}else if(n===1){if(Kr(r)<2)break;const d=Xr(r,2);o=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),n=3}else if(n===2){if(Kr(r)<8)break;const d=Xr(r,8),p=new DataView(d.buffer,d.byteOffset,d.length),f=p.getUint32(0);if(f>Math.pow(2,21)-1){l.enqueue(xo);break}o=f*Math.pow(2,32)+p.getUint32(4),n=3}else{if(Kr(r)<o)break;const d=Xr(r,o);l.enqueue(Ao(i?d:ko.decode(d),e)),n=0}if(o===0||o>t){l.enqueue(xo);break}}}})}const ic=4;function Me(t){if(t)return hp(t)}function hp(t){for(var e in Me.prototype)t[e]=Me.prototype[e];return t}Me.prototype.on=Me.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},Me.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this},Me.prototype.off=Me.prototype.removeListener=Me.prototype.removeAllListeners=Me.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+t];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var n,o=0;o<r.length;o++)if(n=r[o],n===e||n.fn===e){r.splice(o,1);break}return r.length===0&&delete this._callbacks["$"+t],this},Me.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),r=this._callbacks["$"+t],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(r){r=r.slice(0);for(var n=0,o=r.length;n<o;++n)r[n].apply(this,e)}return this},Me.prototype.emitReserved=Me.prototype.emit,Me.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},Me.prototype.hasListeners=function(t){return!!this.listeners(t).length};const Je=typeof self<"u"?self:typeof window<"u"?window:Function("return this")();function ac(t,...e){return e.reduce((r,n)=>(t.hasOwnProperty(n)&&(r[n]=t[n]),r),{})}const yp=Je.setTimeout,gp=Je.clearTimeout;function Zr(t,e){e.useNativeTimers?(t.setTimeoutFn=yp.bind(Je),t.clearTimeoutFn=gp.bind(Je)):(t.setTimeoutFn=Je.setTimeout.bind(Je),t.clearTimeoutFn=Je.clearTimeout.bind(Je))}const mp=1.33;function _p(t){return typeof t=="string"?vp(t):Math.ceil((t.byteLength||t.size)*mp)}function vp(t){let e=0,r=0;for(let n=0,o=t.length;n<o;n++)e=t.charCodeAt(n),e<128?r+=1:e<2048?r+=2:e<55296||e>=57344?r+=3:(n++,r+=4);return r}function bp(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}function wp(t){let e={},r=t.split("&");for(let n=0,o=r.length;n<o;n++){let i=r[n].split("=");e[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return e}class xp extends Error{constructor(e,r,n){super(e),this.description=r,this.context=n,this.type="TransportError"}}class Oo extends Me{constructor(e){super(),this.writable=!1,Zr(this,e),this.opts=e,this.query=e.query,this.socket=e.socket}onError(e,r,n){return super.emitReserved("error",new xp(e,r,n)),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 r=Ao(e,this.socket.binaryType);this.onPacket(r)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,r={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(r)}_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 r=bp(e);return r.length?"?"+r:""}}const sc="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),Io=64,Ep={};let cc=0,Qr=0,lc;function uc(t){let e="";do e=sc[t%Io]+e,t=Math.floor(t/Io);while(t>0);return e}function fc(){const t=uc(+new Date);return t!==lc?(cc=0,lc=t):t+"."+uc(cc++)}for(;Qr<Io;Qr++)Ep[sc[Qr]]=Qr;let dc=!1;try{dc=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Sp=dc;function pc(t){const e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||Sp))return new XMLHttpRequest}catch{}if(!e)try{return new Je[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function Wg(){}function Ap(){}const kp=function(){return new pc({xdomain:!1}).responseType!=null}();class Op extends Oo{constructor(e){if(super(e),this.polling=!1,typeof location<"u"){const n=location.protocol==="https:";let o=location.port;o||(o=n?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||o!==e.port}const r=e&&e.forceBase64;this.supportsBinary=kp&&!r,this.opts.withCredentials&&(this.cookieJar=void 0)}get name(){return"polling"}doOpen(){this.poll()}pause(e){this.readyState="pausing";const r=()=>{this.readyState="paused",e()};if(this.polling||!this.writable){let n=0;this.polling&&(n++,this.once("pollComplete",function(){--n||r()})),this.writable||(n++,this.once("drain",function(){--n||r()}))}else r()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const r=n=>{if(this.readyState==="opening"&&n.type==="open"&&this.onOpen(),n.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(n)};fp(e,this.socket.binaryType).forEach(r),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,up(e,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=fc()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(e,r)}request(e={}){return Object.assign(e,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new nt(this.uri(),e)}doWrite(e,r){const n=this.request({method:"POST",data:e});n.on("success",r),n.on("error",(o,i)=>{this.onError("xhr post error",o,i)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(r,n)=>{this.onError("xhr poll error",r,n)}),this.pollXhr=e}}class nt extends Me{constructor(e,r){super(),Zr(this,r),this.opts=r,this.method=r.method||"GET",this.uri=e,this.data=r.data!==void 0?r.data:null,this.create()}create(){var e;const r=ac(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this.opts.xd;const n=this.xhr=new pc(r);try{n.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let o in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(o)&&n.setRequestHeader(o,this.opts.extraHeaders[o])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}(e=this.opts.cookieJar)===null||e===void 0||e.addCookies(n),"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{var o;n.readyState===3&&((o=this.opts.cookieJar)===null||o===void 0||o.parseCookies(n)),n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(o){this.setTimeoutFn(()=>{this.onError(o)},0);return}typeof document<"u"&&(this.index=nt.requestsCount++,nt.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=Ap,e)try{this.xhr.abort()}catch{}typeof document<"u"&&delete nt.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(nt.requestsCount=0,nt.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",hc);else if(typeof addEventListener=="function"){const t="onpagehide"in Je?"pagehide":"unload";addEventListener(t,hc,!1)}}function hc(){for(let t in nt.requests)nt.requests.hasOwnProperty(t)&&nt.requests[t].abort()}var Ip={},en={};en.byteLength=Tp,en.toByteArray=Cp,en.fromByteArray=$p;for(var ot=[],Ke=[],Pp=typeof Uint8Array<"u"?Uint8Array:Array,Po="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Lt=0,Np=Po.length;Lt<Np;++Lt)ot[Lt]=Po[Lt],Ke[Po.charCodeAt(Lt)]=Lt;Ke[45]=62,Ke[95]=63;function yc(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var n=r===e?0:4-r%4;return[r,n]}function Tp(t){var e=yc(t),r=e[0],n=e[1];return(r+n)*3/4-n}function Rp(t,e,r){return(e+r)*3/4-r}function Cp(t){var e,r=yc(t),n=r[0],o=r[1],i=new Pp(Rp(t,n,o)),c=0,l=o>0?n-4:n,d;for(d=0;d<l;d+=4)e=Ke[t.charCodeAt(d)]<<18|Ke[t.charCodeAt(d+1)]<<12|Ke[t.charCodeAt(d+2)]<<6|Ke[t.charCodeAt(d+3)],i[c++]=e>>16&255,i[c++]=e>>8&255,i[c++]=e&255;return o===2&&(e=Ke[t.charCodeAt(d)]<<2|Ke[t.charCodeAt(d+1)]>>4,i[c++]=e&255),o===1&&(e=Ke[t.charCodeAt(d)]<<10|Ke[t.charCodeAt(d+1)]<<4|Ke[t.charCodeAt(d+2)]>>2,i[c++]=e>>8&255,i[c++]=e&255),i}function Bp(t){return ot[t>>18&63]+ot[t>>12&63]+ot[t>>6&63]+ot[t&63]}function Mp(t,e,r){for(var n,o=[],i=e;i<r;i+=3)n=(t[i]<<16&16711680)+(t[i+1]<<8&65280)+(t[i+2]&255),o.push(Bp(n));return o.join("")}function $p(t){for(var e,r=t.length,n=r%3,o=[],i=16383,c=0,l=r-n;c<l;c+=i)o.push(Mp(t,c,c+i>l?l:c+i));return n===1?(e=t[r-1],o.push(ot[e>>2]+ot[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],o.push(ot[e>>10]+ot[e>>4&63]+ot[e<<2&63]+"=")),o.join("")}var No={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */No.read=function(t,e,r,n,o){var i,c,l=o*8-n-1,d=(1<<l)-1,p=d>>1,f=-7,y=r?o-1:0,v=r?-1:1,w=t[e+y];for(y+=v,i=w&(1<<-f)-1,w>>=-f,f+=l;f>0;i=i*256+t[e+y],y+=v,f-=8);for(c=i&(1<<-f)-1,i>>=-f,f+=n;f>0;c=c*256+t[e+y],y+=v,f-=8);if(i===0)i=1-p;else{if(i===d)return c?NaN:(w?-1:1)*(1/0);c=c+Math.pow(2,n),i=i-p}return(w?-1:1)*c*Math.pow(2,i-n)},No.write=function(t,e,r,n,o,i){var c,l,d,p=i*8-o-1,f=(1<<p)-1,y=f>>1,v=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,w=n?0:i-1,N=n?1:-1,A=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(l=isNaN(e)?1:0,c=f):(c=Math.floor(Math.log(e)/Math.LN2),e*(d=Math.pow(2,-c))<1&&(c--,d*=2),c+y>=1?e+=v/d:e+=v*Math.pow(2,1-y),e*d>=2&&(c++,d/=2),c+y>=f?(l=0,c=f):c+y>=1?(l=(e*d-1)*Math.pow(2,o),c=c+y):(l=e*Math.pow(2,y-1)*Math.pow(2,o),c=0));o>=8;t[r+w]=l&255,w+=N,l/=256,o-=8);for(c=c<<o|l,p+=o;p>0;t[r+w]=c&255,w+=N,c/=256,p-=8);t[r+w-N]|=A*128};/*!
|
|
88
88
|
* The buffer module from node.js, for the browser.
|
|
89
89
|
*
|
|
90
90
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
91
91
|
* @license MIT
|
|
92
|
-
*/(function(t){const e=Qr,r=Po,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=f,t.SlowBuffer=B,t.INSPECT_MAX_BYTES=50;const o=2147483647;t.kMaxLength=o;const{Uint8Array:i,ArrayBuffer:c,SharedArrayBuffer:l}=globalThis;f.TYPED_ARRAY_SUPPORT=d(),!f.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 d(){try{const u=new i(1),a={foo:function(){return 42}};return Object.setPrototypeOf(a,i.prototype),Object.setPrototypeOf(u,a),u.foo()===42}catch{return!1}}Object.defineProperty(f.prototype,"parent",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.buffer}}),Object.defineProperty(f.prototype,"offset",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.byteOffset}});function p(u){if(u>o)throw new RangeError('The value "'+u+'" is invalid for option "size"');const a=new i(u);return Object.setPrototypeOf(a,f.prototype),a}function f(u,a,s){if(typeof u=="number"){if(typeof a=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return N(u)}return y(u,a,s)}f.poolSize=8192;function y(u,a,s){if(typeof u=="string")return A(u,a);if(c.isView(u))return P(u);if(u==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof u);if(k(u,c)||u&&k(u.buffer,c)||typeof l<"u"&&(k(u,l)||u&&k(u.buffer,l)))return _(u,a,s);if(typeof u=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const h=u.valueOf&&u.valueOf();if(h!=null&&h!==u)return f.from(h,a,s);const x=T(u);if(x)return x;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof u[Symbol.toPrimitive]=="function")return f.from(u[Symbol.toPrimitive]("string"),a,s);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof u)}f.from=function(u,a,s){return y(u,a,s)},Object.setPrototypeOf(f.prototype,i.prototype),Object.setPrototypeOf(f,i);function v(u){if(typeof u!="number")throw new TypeError('"size" argument must be of type number');if(u<0)throw new RangeError('The value "'+u+'" is invalid for option "size"')}function w(u,a,s){return v(u),u<=0?p(u):a!==void 0?typeof s=="string"?p(u).fill(a,s):p(u).fill(a):p(u)}f.alloc=function(u,a,s){return w(u,a,s)};function N(u){return v(u),p(u<0?0:$(u)|0)}f.allocUnsafe=function(u){return N(u)},f.allocUnsafeSlow=function(u){return N(u)};function A(u,a){if((typeof a!="string"||a==="")&&(a="utf8"),!f.isEncoding(a))throw new TypeError("Unknown encoding: "+a);const s=q(u,a)|0;let h=p(s);const x=h.write(u,a);return x!==s&&(h=h.slice(0,x)),h}function C(u){const a=u.length<0?0:$(u.length)|0,s=p(a);for(let h=0;h<a;h+=1)s[h]=u[h]&255;return s}function P(u){if(k(u,i)){const a=new i(u);return _(a.buffer,a.byteOffset,a.byteLength)}return C(u)}function _(u,a,s){if(a<0||u.byteLength<a)throw new RangeError('"offset" is outside of buffer bounds');if(u.byteLength<a+(s||0))throw new RangeError('"length" is outside of buffer bounds');let h;return a===void 0&&s===void 0?h=new i(u):s===void 0?h=new i(u,a):h=new i(u,a,s),Object.setPrototypeOf(h,f.prototype),h}function T(u){if(f.isBuffer(u)){const a=$(u.length)|0,s=p(a);return s.length===0||u.copy(s,0,0,a),s}if(u.length!==void 0)return typeof u.length!="number"||Y(u.length)?p(0):C(u);if(u.type==="Buffer"&&Array.isArray(u.data))return C(u.data)}function $(u){if(u>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return u|0}function B(u){return+u!=u&&(u=0),f.alloc(+u)}f.isBuffer=function(a){return a!=null&&a._isBuffer===!0&&a!==f.prototype},f.compare=function(a,s){if(k(a,i)&&(a=f.from(a,a.offset,a.byteLength)),k(s,i)&&(s=f.from(s,s.offset,s.byteLength)),!f.isBuffer(a)||!f.isBuffer(s))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(a===s)return 0;let h=a.length,x=s.length;for(let R=0,F=Math.min(h,x);R<F;++R)if(a[R]!==s[R]){h=a[R],x=s[R];break}return h<x?-1:x<h?1:0},f.isEncoding=function(a){switch(String(a).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}},f.concat=function(a,s){if(!Array.isArray(a))throw new TypeError('"list" argument must be an Array of Buffers');if(a.length===0)return f.alloc(0);let h;if(s===void 0)for(s=0,h=0;h<a.length;++h)s+=a[h].length;const x=f.allocUnsafe(s);let R=0;for(h=0;h<a.length;++h){let F=a[h];if(k(F,i))R+F.length>x.length?(f.isBuffer(F)||(F=f.from(F)),F.copy(x,R)):i.prototype.set.call(x,F,R);else if(f.isBuffer(F))F.copy(x,R);else throw new TypeError('"list" argument must be an Array of Buffers');R+=F.length}return x};function q(u,a){if(f.isBuffer(u))return u.length;if(c.isView(u)||k(u,c))return u.byteLength;if(typeof u!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof u);const s=u.length,h=arguments.length>2&&arguments[2]===!0;if(!h&&s===0)return 0;let x=!1;for(;;)switch(a){case"ascii":case"latin1":case"binary":return s;case"utf8":case"utf-8":return Xe(u).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return s*2;case"hex":return s>>>1;case"base64":return ve(u).length;default:if(x)return h?-1:Xe(u).length;a=(""+a).toLowerCase(),x=!0}}f.byteLength=q;function W(u,a,s){let h=!1;if((a===void 0||a<0)&&(a=0),a>this.length||((s===void 0||s>this.length)&&(s=this.length),s<=0)||(s>>>=0,a>>>=0,s<=a))return"";for(u||(u="utf8");;)switch(u){case"hex":return m(this,a,s);case"utf8":case"utf-8":return Se(this,a,s);case"ascii":return V(this,a,s);case"latin1":case"binary":return H(this,a,s);case"base64":return Pe(this,a,s);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,a,s);default:if(h)throw new TypeError("Unknown encoding: "+u);u=(u+"").toLowerCase(),h=!0}}f.prototype._isBuffer=!0;function Z(u,a,s){const h=u[a];u[a]=u[s],u[s]=h}f.prototype.swap16=function(){const a=this.length;if(a%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let s=0;s<a;s+=2)Z(this,s,s+1);return this},f.prototype.swap32=function(){const a=this.length;if(a%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let s=0;s<a;s+=4)Z(this,s,s+3),Z(this,s+1,s+2);return this},f.prototype.swap64=function(){const a=this.length;if(a%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let s=0;s<a;s+=8)Z(this,s,s+7),Z(this,s+1,s+6),Z(this,s+2,s+5),Z(this,s+3,s+4);return this},f.prototype.toString=function(){const a=this.length;return a===0?"":arguments.length===0?Se(this,0,a):W.apply(this,arguments)},f.prototype.toLocaleString=f.prototype.toString,f.prototype.equals=function(a){if(!f.isBuffer(a))throw new TypeError("Argument must be a Buffer");return this===a?!0:f.compare(this,a)===0},f.prototype.inspect=function(){let a="";const s=t.INSPECT_MAX_BYTES;return a=this.toString("hex",0,s).replace(/(.{2})/g,"$1 ").trim(),this.length>s&&(a+=" ... "),"<Buffer "+a+">"},n&&(f.prototype[n]=f.prototype.inspect),f.prototype.compare=function(a,s,h,x,R){if(k(a,i)&&(a=f.from(a,a.offset,a.byteLength)),!f.isBuffer(a))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof a);if(s===void 0&&(s=0),h===void 0&&(h=a?a.length:0),x===void 0&&(x=0),R===void 0&&(R=this.length),s<0||h>a.length||x<0||R>this.length)throw new RangeError("out of range index");if(x>=R&&s>=h)return 0;if(x>=R)return-1;if(s>=h)return 1;if(s>>>=0,h>>>=0,x>>>=0,R>>>=0,this===a)return 0;let F=R-x,ie=h-s;const ye=Math.min(F,ie),ge=this.slice(x,R),Ne=a.slice(s,h);for(let xe=0;xe<ye;++xe)if(ge[xe]!==Ne[xe]){F=ge[xe],ie=Ne[xe];break}return F<ie?-1:ie<F?1:0};function U(u,a,s,h,x){if(u.length===0)return-1;if(typeof s=="string"?(h=s,s=0):s>2147483647?s=2147483647:s<-2147483648&&(s=-2147483648),s=+s,Y(s)&&(s=x?0:u.length-1),s<0&&(s=u.length+s),s>=u.length){if(x)return-1;s=u.length-1}else if(s<0)if(x)s=0;else return-1;if(typeof a=="string"&&(a=f.from(a,h)),f.isBuffer(a))return a.length===0?-1:K(u,a,s,h,x);if(typeof a=="number")return a=a&255,typeof i.prototype.indexOf=="function"?x?i.prototype.indexOf.call(u,a,s):i.prototype.lastIndexOf.call(u,a,s):K(u,[a],s,h,x);throw new TypeError("val must be string, number or Buffer")}function K(u,a,s,h,x){let R=1,F=u.length,ie=a.length;if(h!==void 0&&(h=String(h).toLowerCase(),h==="ucs2"||h==="ucs-2"||h==="utf16le"||h==="utf-16le")){if(u.length<2||a.length<2)return-1;R=2,F/=2,ie/=2,s/=2}function ye(Ne,xe){return R===1?Ne[xe]:Ne.readUInt16BE(xe*R)}let ge;if(x){let Ne=-1;for(ge=s;ge<F;ge++)if(ye(u,ge)===ye(a,Ne===-1?0:ge-Ne)){if(Ne===-1&&(Ne=ge),ge-Ne+1===ie)return Ne*R}else Ne!==-1&&(ge-=ge-Ne),Ne=-1}else for(s+ie>F&&(s=F-ie),ge=s;ge>=0;ge--){let Ne=!0;for(let xe=0;xe<ie;xe++)if(ye(u,ge+xe)!==ye(a,xe)){Ne=!1;break}if(Ne)return ge}return-1}f.prototype.includes=function(a,s,h){return this.indexOf(a,s,h)!==-1},f.prototype.indexOf=function(a,s,h){return U(this,a,s,h,!0)},f.prototype.lastIndexOf=function(a,s,h){return U(this,a,s,h,!1)};function Q(u,a,s,h){s=Number(s)||0;const x=u.length-s;h?(h=Number(h),h>x&&(h=x)):h=x;const R=a.length;h>R/2&&(h=R/2);let F;for(F=0;F<h;++F){const ie=parseInt(a.substr(F*2,2),16);if(Y(ie))return F;u[s+F]=ie}return F}function re(u,a,s,h){return E(Xe(a,u.length-s),u,s,h)}function se(u,a,s,h){return E(J(a),u,s,h)}function Ae(u,a,s,h){return E(ve(a),u,s,h)}function de(u,a,s,h){return E(pe(a,u.length-s),u,s,h)}f.prototype.write=function(a,s,h,x){if(s===void 0)x="utf8",h=this.length,s=0;else if(h===void 0&&typeof s=="string")x=s,h=this.length,s=0;else if(isFinite(s))s=s>>>0,isFinite(h)?(h=h>>>0,x===void 0&&(x="utf8")):(x=h,h=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const R=this.length-s;if((h===void 0||h>R)&&(h=R),a.length>0&&(h<0||s<0)||s>this.length)throw new RangeError("Attempt to write outside buffer bounds");x||(x="utf8");let F=!1;for(;;)switch(x){case"hex":return Q(this,a,s,h);case"utf8":case"utf-8":return re(this,a,s,h);case"ascii":case"latin1":case"binary":return se(this,a,s,h);case"base64":return Ae(this,a,s,h);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return de(this,a,s,h);default:if(F)throw new TypeError("Unknown encoding: "+x);x=(""+x).toLowerCase(),F=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Pe(u,a,s){return a===0&&s===u.length?e.fromByteArray(u):e.fromByteArray(u.slice(a,s))}function Se(u,a,s){s=Math.min(u.length,s);const h=[];let x=a;for(;x<s;){const R=u[x];let F=null,ie=R>239?4:R>223?3:R>191?2:1;if(x+ie<=s){let ye,ge,Ne,xe;switch(ie){case 1:R<128&&(F=R);break;case 2:ye=u[x+1],(ye&192)===128&&(xe=(R&31)<<6|ye&63,xe>127&&(F=xe));break;case 3:ye=u[x+1],ge=u[x+2],(ye&192)===128&&(ge&192)===128&&(xe=(R&15)<<12|(ye&63)<<6|ge&63,xe>2047&&(xe<55296||xe>57343)&&(F=xe));break;case 4:ye=u[x+1],ge=u[x+2],Ne=u[x+3],(ye&192)===128&&(ge&192)===128&&(Ne&192)===128&&(xe=(R&15)<<18|(ye&63)<<12|(ge&63)<<6|Ne&63,xe>65535&&xe<1114112&&(F=xe))}}F===null?(F=65533,ie=1):F>65535&&(F-=65536,h.push(F>>>10&1023|55296),F=56320|F&1023),h.push(F),x+=ie}return z(h)}const ke=4096;function z(u){const a=u.length;if(a<=ke)return String.fromCharCode.apply(String,u);let s="",h=0;for(;h<a;)s+=String.fromCharCode.apply(String,u.slice(h,h+=ke));return s}function V(u,a,s){let h="";s=Math.min(u.length,s);for(let x=a;x<s;++x)h+=String.fromCharCode(u[x]&127);return h}function H(u,a,s){let h="";s=Math.min(u.length,s);for(let x=a;x<s;++x)h+=String.fromCharCode(u[x]);return h}function m(u,a,s){const h=u.length;(!a||a<0)&&(a=0),(!s||s<0||s>h)&&(s=h);let x="";for(let R=a;R<s;++R)x+=ee[u[R]];return x}function O(u,a,s){const h=u.slice(a,s);let x="";for(let R=0;R<h.length-1;R+=2)x+=String.fromCharCode(h[R]+h[R+1]*256);return x}f.prototype.slice=function(a,s){const h=this.length;a=~~a,s=s===void 0?h:~~s,a<0?(a+=h,a<0&&(a=0)):a>h&&(a=h),s<0?(s+=h,s<0&&(s=0)):s>h&&(s=h),s<a&&(s=a);const x=this.subarray(a,s);return Object.setPrototypeOf(x,f.prototype),x};function g(u,a,s){if(u%1!==0||u<0)throw new RangeError("offset is not uint");if(u+a>s)throw new RangeError("Trying to access beyond buffer length")}f.prototype.readUintLE=f.prototype.readUIntLE=function(a,s,h){a=a>>>0,s=s>>>0,h||g(a,s,this.length);let x=this[a],R=1,F=0;for(;++F<s&&(R*=256);)x+=this[a+F]*R;return x},f.prototype.readUintBE=f.prototype.readUIntBE=function(a,s,h){a=a>>>0,s=s>>>0,h||g(a,s,this.length);let x=this[a+--s],R=1;for(;s>0&&(R*=256);)x+=this[a+--s]*R;return x},f.prototype.readUint8=f.prototype.readUInt8=function(a,s){return a=a>>>0,s||g(a,1,this.length),this[a]},f.prototype.readUint16LE=f.prototype.readUInt16LE=function(a,s){return a=a>>>0,s||g(a,2,this.length),this[a]|this[a+1]<<8},f.prototype.readUint16BE=f.prototype.readUInt16BE=function(a,s){return a=a>>>0,s||g(a,2,this.length),this[a]<<8|this[a+1]},f.prototype.readUint32LE=f.prototype.readUInt32LE=function(a,s){return a=a>>>0,s||g(a,4,this.length),(this[a]|this[a+1]<<8|this[a+2]<<16)+this[a+3]*16777216},f.prototype.readUint32BE=f.prototype.readUInt32BE=function(a,s){return a=a>>>0,s||g(a,4,this.length),this[a]*16777216+(this[a+1]<<16|this[a+2]<<8|this[a+3])},f.prototype.readBigUInt64LE=X(function(a){a=a>>>0,Ue(a,"offset");const s=this[a],h=this[a+7];(s===void 0||h===void 0)&&ze(a,this.length-8);const x=s+this[++a]*2**8+this[++a]*2**16+this[++a]*2**24,R=this[++a]+this[++a]*2**8+this[++a]*2**16+h*2**24;return BigInt(x)+(BigInt(R)<<BigInt(32))}),f.prototype.readBigUInt64BE=X(function(a){a=a>>>0,Ue(a,"offset");const s=this[a],h=this[a+7];(s===void 0||h===void 0)&&ze(a,this.length-8);const x=s*2**24+this[++a]*2**16+this[++a]*2**8+this[++a],R=this[++a]*2**24+this[++a]*2**16+this[++a]*2**8+h;return(BigInt(x)<<BigInt(32))+BigInt(R)}),f.prototype.readIntLE=function(a,s,h){a=a>>>0,s=s>>>0,h||g(a,s,this.length);let x=this[a],R=1,F=0;for(;++F<s&&(R*=256);)x+=this[a+F]*R;return R*=128,x>=R&&(x-=Math.pow(2,8*s)),x},f.prototype.readIntBE=function(a,s,h){a=a>>>0,s=s>>>0,h||g(a,s,this.length);let x=s,R=1,F=this[a+--x];for(;x>0&&(R*=256);)F+=this[a+--x]*R;return R*=128,F>=R&&(F-=Math.pow(2,8*s)),F},f.prototype.readInt8=function(a,s){return a=a>>>0,s||g(a,1,this.length),this[a]&128?(255-this[a]+1)*-1:this[a]},f.prototype.readInt16LE=function(a,s){a=a>>>0,s||g(a,2,this.length);const h=this[a]|this[a+1]<<8;return h&32768?h|4294901760:h},f.prototype.readInt16BE=function(a,s){a=a>>>0,s||g(a,2,this.length);const h=this[a+1]|this[a]<<8;return h&32768?h|4294901760:h},f.prototype.readInt32LE=function(a,s){return a=a>>>0,s||g(a,4,this.length),this[a]|this[a+1]<<8|this[a+2]<<16|this[a+3]<<24},f.prototype.readInt32BE=function(a,s){return a=a>>>0,s||g(a,4,this.length),this[a]<<24|this[a+1]<<16|this[a+2]<<8|this[a+3]},f.prototype.readBigInt64LE=X(function(a){a=a>>>0,Ue(a,"offset");const s=this[a],h=this[a+7];(s===void 0||h===void 0)&&ze(a,this.length-8);const x=this[a+4]+this[a+5]*2**8+this[a+6]*2**16+(h<<24);return(BigInt(x)<<BigInt(32))+BigInt(s+this[++a]*2**8+this[++a]*2**16+this[++a]*2**24)}),f.prototype.readBigInt64BE=X(function(a){a=a>>>0,Ue(a,"offset");const s=this[a],h=this[a+7];(s===void 0||h===void 0)&&ze(a,this.length-8);const x=(s<<24)+this[++a]*2**16+this[++a]*2**8+this[++a];return(BigInt(x)<<BigInt(32))+BigInt(this[++a]*2**24+this[++a]*2**16+this[++a]*2**8+h)}),f.prototype.readFloatLE=function(a,s){return a=a>>>0,s||g(a,4,this.length),r.read(this,a,!0,23,4)},f.prototype.readFloatBE=function(a,s){return a=a>>>0,s||g(a,4,this.length),r.read(this,a,!1,23,4)},f.prototype.readDoubleLE=function(a,s){return a=a>>>0,s||g(a,8,this.length),r.read(this,a,!0,52,8)},f.prototype.readDoubleBE=function(a,s){return a=a>>>0,s||g(a,8,this.length),r.read(this,a,!1,52,8)};function b(u,a,s,h,x,R){if(!f.isBuffer(u))throw new TypeError('"buffer" argument must be a Buffer instance');if(a>x||a<R)throw new RangeError('"value" argument is out of bounds');if(s+h>u.length)throw new RangeError("Index out of range")}f.prototype.writeUintLE=f.prototype.writeUIntLE=function(a,s,h,x){if(a=+a,s=s>>>0,h=h>>>0,!x){const ie=Math.pow(2,8*h)-1;b(this,a,s,h,ie,0)}let R=1,F=0;for(this[s]=a&255;++F<h&&(R*=256);)this[s+F]=a/R&255;return s+h},f.prototype.writeUintBE=f.prototype.writeUIntBE=function(a,s,h,x){if(a=+a,s=s>>>0,h=h>>>0,!x){const ie=Math.pow(2,8*h)-1;b(this,a,s,h,ie,0)}let R=h-1,F=1;for(this[s+R]=a&255;--R>=0&&(F*=256);)this[s+R]=a/F&255;return s+h},f.prototype.writeUint8=f.prototype.writeUInt8=function(a,s,h){return a=+a,s=s>>>0,h||b(this,a,s,1,255,0),this[s]=a&255,s+1},f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(a,s,h){return a=+a,s=s>>>0,h||b(this,a,s,2,65535,0),this[s]=a&255,this[s+1]=a>>>8,s+2},f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(a,s,h){return a=+a,s=s>>>0,h||b(this,a,s,2,65535,0),this[s]=a>>>8,this[s+1]=a&255,s+2},f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(a,s,h){return a=+a,s=s>>>0,h||b(this,a,s,4,4294967295,0),this[s+3]=a>>>24,this[s+2]=a>>>16,this[s+1]=a>>>8,this[s]=a&255,s+4},f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(a,s,h){return a=+a,s=s>>>0,h||b(this,a,s,4,4294967295,0),this[s]=a>>>24,this[s+1]=a>>>16,this[s+2]=a>>>8,this[s+3]=a&255,s+4};function S(u,a,s,h,x){Re(a,h,x,u,s,7);let R=Number(a&BigInt(4294967295));u[s++]=R,R=R>>8,u[s++]=R,R=R>>8,u[s++]=R,R=R>>8,u[s++]=R;let F=Number(a>>BigInt(32)&BigInt(4294967295));return u[s++]=F,F=F>>8,u[s++]=F,F=F>>8,u[s++]=F,F=F>>8,u[s++]=F,s}function D(u,a,s,h,x){Re(a,h,x,u,s,7);let R=Number(a&BigInt(4294967295));u[s+7]=R,R=R>>8,u[s+6]=R,R=R>>8,u[s+5]=R,R=R>>8,u[s+4]=R;let F=Number(a>>BigInt(32)&BigInt(4294967295));return u[s+3]=F,F=F>>8,u[s+2]=F,F=F>>8,u[s+1]=F,F=F>>8,u[s]=F,s+8}f.prototype.writeBigUInt64LE=X(function(a,s=0){return S(this,a,s,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeBigUInt64BE=X(function(a,s=0){return D(this,a,s,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeIntLE=function(a,s,h,x){if(a=+a,s=s>>>0,!x){const ye=Math.pow(2,8*h-1);b(this,a,s,h,ye-1,-ye)}let R=0,F=1,ie=0;for(this[s]=a&255;++R<h&&(F*=256);)a<0&&ie===0&&this[s+R-1]!==0&&(ie=1),this[s+R]=(a/F>>0)-ie&255;return s+h},f.prototype.writeIntBE=function(a,s,h,x){if(a=+a,s=s>>>0,!x){const ye=Math.pow(2,8*h-1);b(this,a,s,h,ye-1,-ye)}let R=h-1,F=1,ie=0;for(this[s+R]=a&255;--R>=0&&(F*=256);)a<0&&ie===0&&this[s+R+1]!==0&&(ie=1),this[s+R]=(a/F>>0)-ie&255;return s+h},f.prototype.writeInt8=function(a,s,h){return a=+a,s=s>>>0,h||b(this,a,s,1,127,-128),a<0&&(a=255+a+1),this[s]=a&255,s+1},f.prototype.writeInt16LE=function(a,s,h){return a=+a,s=s>>>0,h||b(this,a,s,2,32767,-32768),this[s]=a&255,this[s+1]=a>>>8,s+2},f.prototype.writeInt16BE=function(a,s,h){return a=+a,s=s>>>0,h||b(this,a,s,2,32767,-32768),this[s]=a>>>8,this[s+1]=a&255,s+2},f.prototype.writeInt32LE=function(a,s,h){return a=+a,s=s>>>0,h||b(this,a,s,4,2147483647,-2147483648),this[s]=a&255,this[s+1]=a>>>8,this[s+2]=a>>>16,this[s+3]=a>>>24,s+4},f.prototype.writeInt32BE=function(a,s,h){return a=+a,s=s>>>0,h||b(this,a,s,4,2147483647,-2147483648),a<0&&(a=4294967295+a+1),this[s]=a>>>24,this[s+1]=a>>>16,this[s+2]=a>>>8,this[s+3]=a&255,s+4},f.prototype.writeBigInt64LE=X(function(a,s=0){return S(this,a,s,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),f.prototype.writeBigInt64BE=X(function(a,s=0){return D(this,a,s,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function M(u,a,s,h,x,R){if(s+h>u.length)throw new RangeError("Index out of range");if(s<0)throw new RangeError("Index out of range")}function L(u,a,s,h,x){return a=+a,s=s>>>0,x||M(u,a,s,4),r.write(u,a,s,h,23,4),s+4}f.prototype.writeFloatLE=function(a,s,h){return L(this,a,s,!0,h)},f.prototype.writeFloatBE=function(a,s,h){return L(this,a,s,!1,h)};function G(u,a,s,h,x){return a=+a,s=s>>>0,x||M(u,a,s,8),r.write(u,a,s,h,52,8),s+8}f.prototype.writeDoubleLE=function(a,s,h){return G(this,a,s,!0,h)},f.prototype.writeDoubleBE=function(a,s,h){return G(this,a,s,!1,h)},f.prototype.copy=function(a,s,h,x){if(!f.isBuffer(a))throw new TypeError("argument should be a Buffer");if(h||(h=0),!x&&x!==0&&(x=this.length),s>=a.length&&(s=a.length),s||(s=0),x>0&&x<h&&(x=h),x===h||a.length===0||this.length===0)return 0;if(s<0)throw new RangeError("targetStart out of bounds");if(h<0||h>=this.length)throw new RangeError("Index out of range");if(x<0)throw new RangeError("sourceEnd out of bounds");x>this.length&&(x=this.length),a.length-s<x-h&&(x=a.length-s+h);const R=x-h;return this===a&&typeof i.prototype.copyWithin=="function"?this.copyWithin(s,h,x):i.prototype.set.call(a,this.subarray(h,x),s),R},f.prototype.fill=function(a,s,h,x){if(typeof a=="string"){if(typeof s=="string"?(x=s,s=0,h=this.length):typeof h=="string"&&(x=h,h=this.length),x!==void 0&&typeof x!="string")throw new TypeError("encoding must be a string");if(typeof x=="string"&&!f.isEncoding(x))throw new TypeError("Unknown encoding: "+x);if(a.length===1){const F=a.charCodeAt(0);(x==="utf8"&&F<128||x==="latin1")&&(a=F)}}else typeof a=="number"?a=a&255:typeof a=="boolean"&&(a=Number(a));if(s<0||this.length<s||this.length<h)throw new RangeError("Out of range index");if(h<=s)return this;s=s>>>0,h=h===void 0?this.length:h>>>0,a||(a=0);let R;if(typeof a=="number")for(R=s;R<h;++R)this[R]=a;else{const F=f.isBuffer(a)?a:f.from(a,x),ie=F.length;if(ie===0)throw new TypeError('The value "'+a+'" is invalid for argument "value"');for(R=0;R<h-s;++R)this[R+s]=F[R%ie]}return this};const ne={};function le(u,a,s){ne[u]=class extends s{constructor(){super(),Object.defineProperty(this,"message",{value:a.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${u}]`,this.stack,delete this.name}get code(){return u}set code(x){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:x,writable:!0})}toString(){return`${this.name} [${u}]: ${this.message}`}}}le("ERR_BUFFER_OUT_OF_BOUNDS",function(u){return u?`${u} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),le("ERR_INVALID_ARG_TYPE",function(u,a){return`The "${u}" argument must be of type number. Received type ${typeof a}`},TypeError),le("ERR_OUT_OF_RANGE",function(u,a,s){let h=`The value of "${u}" is out of range.`,x=s;return Number.isInteger(s)&&Math.abs(s)>2**32?x=he(String(s)):typeof s=="bigint"&&(x=String(s),(s>BigInt(2)**BigInt(32)||s<-(BigInt(2)**BigInt(32)))&&(x=he(x)),x+="n"),h+=` It must be ${a}. Received ${x}`,h},RangeError);function he(u){let a="",s=u.length;const h=u[0]==="-"?1:0;for(;s>=h+4;s-=3)a=`_${u.slice(s-3,s)}${a}`;return`${u.slice(0,s)}${a}`}function Ee(u,a,s){Ue(a,"offset"),(u[a]===void 0||u[a+s]===void 0)&&ze(a,u.length-(s+1))}function Re(u,a,s,h,x,R){if(u>s||u<a){const F=typeof a=="bigint"?"n":"";let ie;throw a===0||a===BigInt(0)?ie=`>= 0${F} and < 2${F} ** ${(R+1)*8}${F}`:ie=`>= -(2${F} ** ${(R+1)*8-1}${F}) and < 2 ** ${(R+1)*8-1}${F}`,new ne.ERR_OUT_OF_RANGE("value",ie,u)}Ee(h,x,R)}function Ue(u,a){if(typeof u!="number")throw new ne.ERR_INVALID_ARG_TYPE(a,"number",u)}function ze(u,a,s){throw Math.floor(u)!==u?(Ue(u,s),new ne.ERR_OUT_OF_RANGE("offset","an integer",u)):a<0?new ne.ERR_BUFFER_OUT_OF_BOUNDS:new ne.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${a}`,u)}const Fe=/[^+/0-9A-Za-z-_]/g;function j(u){if(u=u.split("=")[0],u=u.trim().replace(Fe,""),u.length<2)return"";for(;u.length%4!==0;)u=u+"=";return u}function Xe(u,a){a=a||1/0;let s;const h=u.length;let x=null;const R=[];for(let F=0;F<h;++F){if(s=u.charCodeAt(F),s>55295&&s<57344){if(!x){if(s>56319){(a-=3)>-1&&R.push(239,191,189);continue}else if(F+1===h){(a-=3)>-1&&R.push(239,191,189);continue}x=s;continue}if(s<56320){(a-=3)>-1&&R.push(239,191,189),x=s;continue}s=(x-55296<<10|s-56320)+65536}else x&&(a-=3)>-1&&R.push(239,191,189);if(x=null,s<128){if((a-=1)<0)break;R.push(s)}else if(s<2048){if((a-=2)<0)break;R.push(s>>6|192,s&63|128)}else if(s<65536){if((a-=3)<0)break;R.push(s>>12|224,s>>6&63|128,s&63|128)}else if(s<1114112){if((a-=4)<0)break;R.push(s>>18|240,s>>12&63|128,s>>6&63|128,s&63|128)}else throw new Error("Invalid code point")}return R}function J(u){const a=[];for(let s=0;s<u.length;++s)a.push(u.charCodeAt(s)&255);return a}function pe(u,a){let s,h,x;const R=[];for(let F=0;F<u.length&&!((a-=2)<0);++F)s=u.charCodeAt(F),h=s>>8,x=s%256,R.push(x),R.push(h);return R}function ve(u){return e.toByteArray(j(u))}function E(u,a,s,h){let x;for(x=0;x<h&&!(x+s>=a.length||x>=u.length);++x)a[x+s]=u[x];return x}function k(u,a){return u instanceof a||u!=null&&u.constructor!=null&&u.constructor.name!=null&&u.constructor.name===a.name}function Y(u){return u!==u}const ee=function(){const u="0123456789abcdef",a=new Array(256);for(let s=0;s<16;++s){const h=s*16;for(let x=0;x<16;++x)a[h+x]=u[s]+u[x]}return a}();function X(u){return typeof BigInt>"u"?oe:u}function oe(){throw new Error("BigInt not supported")}})(kp);const No=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,r)=>r(e,0),en=Je.WebSocket||Je.MozWebSocket,yc=!0,Mp="arraybuffer",gc=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class $p extends ko{constructor(e){super(e),this.supportsBinary=!e.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const e=this.uri(),r=this.opts.protocols,n=gc?{}:ic(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=yc&&!gc?r?new en(e,r):new en(e):new en(e,r,n)}catch(o){return this.emitReserved("error",o)}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 r=0;r<e.length;r++){const n=e[r],o=r===e.length-1;xo(n,this.supportsBinary,i=>{const c={};try{yc&&this.ws.send(i)}catch{}o&&No(()=>{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",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=uc()),this.supportsBinary||(r.b64=1),this.createUri(e,r)}check(){return!!en}}class Fp extends ko{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 r=fp(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=e.readable.pipeThrough(r).getReader(),o=up();o.readable.pipeTo(e.writable),this.writer=o.writable.getWriter();const i=()=>{n.read().then(({done:l,value:d})=>{l||(this.onPacket(d),i())}).catch(l=>{})};i();const c={type:"open"};this.query.sid&&(c.data=`{"sid":"${this.query.sid}"}`),this.writer.write(c).then(()=>this.onOpen())})}))}write(e){this.writable=!1;for(let r=0;r<e.length;r++){const n=e[r],o=r===e.length-1;this.writer.write(n).then(()=>{o&&No(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this.transport)===null||e===void 0||e.close()}}const jp={websocket:$p,webtransport:Fp,polling:Ap},Dp=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Lp=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function To(t){if(t.length>2e3)throw"URI too long";const e=t,r=t.indexOf("["),n=t.indexOf("]");r!=-1&&n!=-1&&(t=t.substring(0,r)+t.substring(r,n).replace(/:/g,";")+t.substring(n,t.length));let o=Dp.exec(t||""),i={},c=14;for(;c--;)i[Lp[c]]=o[c]||"";return r!=-1&&n!=-1&&(i.source=e,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=Up(i,i.path),i.queryKey=zp(i,i.query),i}function Up(t,e){const r=/\/{2,9}/g,n=e.replace(r,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&n.splice(0,1),e.slice(-1)=="/"&&n.splice(n.length-1,1),n}function zp(t,e){const r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,o,i){o&&(r[o]=i)}),r}let mc=class Jt extends Me{constructor(e,r={}){super(),this.binaryType=Mp,this.writeBuffer=[],e&&typeof e=="object"&&(r=e,e=null),e?(e=To(e),r.hostname=e.host,r.secure=e.protocol==="https"||e.protocol==="wss",r.port=e.port,e.query&&(r.query=e.query)):r.host&&(r.hostname=To(r.host).host),Xr(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=r.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},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=vp(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 r=Object.assign({},this.opts.query);r.EIO=oc,r.transport=e,this.id&&(r.sid=this.id);const n=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new jp[e](n)}open(){let e;if(this.opts.rememberUpgrade&&Jt.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",r=>this.onClose("transport close",r))}probe(e){let r=this.createTransport(e),n=!1;Jt.priorWebsocketSuccess=!1;const o=()=>{n||(r.send([{type:"ping",data:"probe"}]),r.once("packet",y=>{if(!n)if(y.type==="pong"&&y.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;Jt.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{n||this.readyState!=="closed"&&(f(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{const v=new Error("probe error");v.transport=r.name,this.emitReserved("upgradeError",v)}}))};function i(){n||(n=!0,f(),r.close(),r=null)}const c=y=>{const v=new Error("probe error: "+y);v.transport=r.name,i(),this.emitReserved("upgradeError",v)};function l(){c("transport closed")}function d(){c("socket closed")}function p(y){r&&y.name!==r.name&&i()}const f=()=>{r.removeListener("open",o),r.removeListener("error",c),r.removeListener("close",l),this.off("close",d),this.off("upgrading",p)};r.once("open",o),r.once("error",c),r.once("close",l),this.once("close",d),this.once("upgrading",p),this.upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{n||r.open()},200):r.open()}onOpen(){if(this.readyState="open",Jt.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let e=0;const r=this.upgrades.length;for(;e<r;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 r=new Error("server error");r.code=e.data,this.onError(r);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 r=1;for(let n=0;n<this.writeBuffer.length;n++){const o=this.writeBuffer[n].data;if(o&&(r+=gp(o)),n>0&&r>this.maxPayload)return this.writeBuffer.slice(0,n);r+=2}return this.writeBuffer}write(e,r,n){return this.sendPacket("message",e,r,n),this}send(e,r,n){return this.sendPacket("message",e,r,n),this}sendPacket(e,r,n,o){if(typeof r=="function"&&(o=r,r=void 0),typeof n=="function"&&(o=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;const i={type:e,data:r,options:n};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),o&&this.once("flush",o),this.flush()}close(){const e=()=>{this.onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),e()},n=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():e()}):this.upgrading?n():e()),this}onError(e){Jt.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}onClose(e,r){(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,r),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(e){const r=[];let n=0;const o=e.length;for(;n<o;n++)~this.transports.indexOf(e[n])&&r.push(e[n]);return r}};mc.protocol=oc;function qp(t,e="",r){let n=t;r=r||typeof location<"u"&&location,t==null&&(t=r.protocol+"//"+r.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=r.protocol+t:t=r.host+t),/^(https?|wss?):\/\//.test(t)||(typeof r<"u"?t=r.protocol+"//"+t:t="https://"+t),n=To(t)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const i=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+i+":"+n.port+e,n.href=n.protocol+"://"+i+(r&&r.port===n.port?"":":"+n.port),n}const Wp=typeof ArrayBuffer=="function",Vp=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,_c=Object.prototype.toString,Hp=typeof Blob=="function"||typeof Blob<"u"&&_c.call(Blob)==="[object BlobConstructor]",Gp=typeof File=="function"||typeof File<"u"&&_c.call(File)==="[object FileConstructor]";function Ro(t){return Wp&&(t instanceof ArrayBuffer||Vp(t))||Hp&&t instanceof Blob||Gp&&t instanceof File}function tn(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let r=0,n=t.length;r<n;r++)if(tn(t[r]))return!0;return!1}if(Ro(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return tn(t.toJSON(),!0);for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&tn(t[r]))return!0;return!1}function Yp(t){const e=[],r=t.data,n=t;return n.data=Co(r,e),n.attachments=e.length,{packet:n,buffers:e}}function Co(t,e){if(!t)return t;if(Ro(t)){const r={_placeholder:!0,num:e.length};return e.push(t),r}else if(Array.isArray(t)){const r=new Array(t.length);for(let n=0;n<t.length;n++)r[n]=Co(t[n],e);return r}else if(typeof t=="object"&&!(t instanceof Date)){const r={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=Co(t[n],e));return r}return t}function Jp(t,e){return t.data=Bo(t.data,e),delete t.attachments,t}function Bo(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 r=0;r<t.length;r++)t[r]=Bo(t[r],e);else if(typeof t=="object")for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=Bo(t[r],e));return t}const Kp=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Xp=5;var fe;(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"})(fe||(fe={}));class Zp{constructor(e){this.replacer=e}encode(e){return(e.type===fe.EVENT||e.type===fe.ACK)&&tn(e)?this.encodeAsBinary({type:e.type===fe.EVENT?fe.BINARY_EVENT:fe.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let r=""+e.type;return(e.type===fe.BINARY_EVENT||e.type===fe.BINARY_ACK)&&(r+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(r+=e.nsp+","),e.id!=null&&(r+=e.id),e.data!=null&&(r+=JSON.stringify(e.data,this.replacer)),r}encodeAsBinary(e){const r=Yp(e),n=this.encodeAsString(r.packet),o=r.buffers;return o.unshift(n),o}}function vc(t){return Object.prototype.toString.call(t)==="[object Object]"}class Mo extends Me{constructor(e){super(),this.reviver=e}add(e){let r;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(e);const n=r.type===fe.BINARY_EVENT;n||r.type===fe.BINARY_ACK?(r.type=n?fe.EVENT:fe.ACK,this.reconstructor=new Qp(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(Ro(e)||e.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(e),r&&(this.reconstructor=null,super.emitReserved("decoded",r));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let r=0;const n={type:Number(e.charAt(0))};if(fe[n.type]===void 0)throw new Error("unknown packet type "+n.type);if(n.type===fe.BINARY_EVENT||n.type===fe.BINARY_ACK){const i=r+1;for(;e.charAt(++r)!=="-"&&r!=e.length;);const c=e.substring(i,r);if(c!=Number(c)||e.charAt(r)!=="-")throw new Error("Illegal attachments");n.attachments=Number(c)}if(e.charAt(r+1)==="/"){const i=r+1;for(;++r&&!(e.charAt(r)===","||r===e.length););n.nsp=e.substring(i,r)}else n.nsp="/";const o=e.charAt(r+1);if(o!==""&&Number(o)==o){const i=r+1;for(;++r;){const c=e.charAt(r);if(c==null||Number(c)!=c){--r;break}if(r===e.length)break}n.id=Number(e.substring(i,r+1))}if(e.charAt(++r)){const i=this.tryParse(e.substr(r));if(Mo.isPayloadValid(n.type,i))n.data=i;else throw new Error("invalid payload")}return n}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,r){switch(e){case fe.CONNECT:return vc(r);case fe.DISCONNECT:return r===void 0;case fe.CONNECT_ERROR:return typeof r=="string"||vc(r);case fe.EVENT:case fe.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&Kp.indexOf(r[0])===-1);case fe.ACK:case fe.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Qp{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const r=Jp(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const eh=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Mo,Encoder:Zp,get PacketType(){return fe},protocol:Xp},Symbol.toStringTag,{value:"Module"}));function tt(t,e,r){return t.on(e,r),function(){t.off(e,r)}}const th=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class bc extends Me{constructor(e,r,n){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=r,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[tt(e,"open",this.onopen.bind(this)),tt(e,"packet",this.onpacket.bind(this)),tt(e,"error",this.onerror.bind(this)),tt(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,...r){if(th.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(r.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(r),this;const n={type:fe.EVENT,data:r};if(n.options={},n.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){const c=this.ids++,l=r.pop();this._registerAckCallback(c,l),n.id=c}const o=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!o||!this.connected)||(this.connected?(this.notifyOutgoingListeners(n),this.packet(n)):this.sendBuffer.push(n)),this.flags={},this}_registerAckCallback(e,r){var n;const o=(n=this.flags.timeout)!==null&&n!==void 0?n:this._opts.ackTimeout;if(o===void 0){this.acks[e]=r;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let l=0;l<this.sendBuffer.length;l++)this.sendBuffer[l].id===e&&this.sendBuffer.splice(l,1);r.call(this,new Error("operation has timed out"))},o),c=(...l)=>{this.io.clearTimeoutFn(i),r.apply(this,l)};c.withError=!0,this.acks[e]=c}emitWithAck(e,...r){return new Promise((n,o)=>{const i=(c,l)=>c?o(c):n(l);i.withError=!0,r.push(i),this.emit(e,...r)})}_addToQueue(e){let r;typeof e[e.length-1]=="function"&&(r=e.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((o,...i)=>n!==this._queue[0]?void 0:(o!==null?n.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(o)):(this._queue.shift(),r&&r(null,...i)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const r=this._queue[0];r.pending&&!e||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.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:fe.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,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(n=>String(n.id)===e)){const n=this.acks[e];delete this.acks[e],n.withError&&n.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case fe.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 fe.EVENT:case fe.BINARY_EVENT:this.onevent(e);break;case fe.ACK:case fe.BINARY_ACK:this.onack(e);break;case fe.DISCONNECT:this.ondisconnect();break;case fe.CONNECT_ERROR:this.destroy();const n=new Error(e.data.message);n.data=e.data.data,this.emitReserved("connect_error",n);break}}onevent(e){const r=e.data||[];e.id!=null&&r.push(this.ack(e.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const r=this._anyListeners.slice();for(const n of r)n.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 r=this;let n=!1;return function(...o){n||(n=!0,r.packet({type:fe.ACK,id:e,data:o}))}}onack(e){const r=this.acks[e.id];typeof r=="function"&&(delete this.acks[e.id],r.withError&&e.data.unshift(null),r.apply(this,e.data))}onconnect(e,r){this.id=e,this.recovered=r&&this._pid===r,this._pid=r,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:fe.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 r=this._anyListeners;for(let n=0;n<r.length;n++)if(e===r[n])return r.splice(n,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 r=this._anyOutgoingListeners;for(let n=0;n<r.length;n++)if(e===r[n])return r.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const r=this._anyOutgoingListeners.slice();for(const n of r)n.apply(this,e.data)}}}function Ut(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}Ut.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),r=Math.floor(e*this.jitter*t);t=Math.floor(e*10)&1?t+r:t-r}return Math.min(t,this.max)|0},Ut.prototype.reset=function(){this.attempts=0},Ut.prototype.setMin=function(t){this.ms=t},Ut.prototype.setMax=function(t){this.max=t},Ut.prototype.setJitter=function(t){this.jitter=t};class $o extends Me{constructor(e,r){var n;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(r=e,e=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,Xr(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((n=r.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new Ut({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=e;const o=r.parser||eh;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=r.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 r;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(r=this.backoff)===null||r===void 0||r.setMin(e),this)}randomizationFactor(e){var r;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(r=this.backoff)===null||r===void 0||r.setJitter(e),this)}reconnectionDelayMax(e){var r;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(r=this.backoff)===null||r===void 0||r.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 mc(this.uri,this.opts);const r=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const o=tt(r,"open",function(){n.onopen(),e&&e()}),i=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),e?e(l):this.maybeReconnectOnOpen()},c=tt(r,"error",i);if(this._timeout!==!1){const l=this._timeout,d=this.setTimeoutFn(()=>{o(),i(new Error("timeout")),r.close()},l);this.opts.autoUnref&&d.unref(),this.subs.push(()=>{this.clearTimeoutFn(d)})}return this.subs.push(o),this.subs.push(c),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(tt(e,"ping",this.onping.bind(this)),tt(e,"data",this.ondata.bind(this)),tt(e,"error",this.onerror.bind(this)),tt(e,"close",this.onclose.bind(this)),tt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(r){this.onclose("parse error",r)}}ondecoded(e){No(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,r){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new bc(this,e,r),this.nsps[e]=n),n}_destroy(e){const r=Object.keys(this.nsps);for(const n of r)if(this.nsps[n].active)return;this._close()}_packet(e){const r=this.encoder.encode(e);for(let n=0;n<r.length;n++)this.engine.write(r[n],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,r){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,r),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 r=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(o=>{o?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",o)):e.onreconnect()}))},r);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const gr={};function rn(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const r=qp(t,e.path||"/socket.io"),n=r.source,o=r.id,i=r.path,c=gr[o]&&i in gr[o].nsps,l=e.forceNew||e["force new connection"]||e.multiplex===!1||c;let d;return l?d=new $o(n,e):(gr[o]||(gr[o]=new $o(n,e)),d=gr[o]),r.query&&!e.query&&(e.query=r.queryKey),d.socket(r.path,e)}Object.assign(rn,{Manager:$o,Socket:bc,io:rn,connect:rn});function rh(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var wc={exports:{}},Te=wc.exports={},it,at;function Fo(){throw new Error("setTimeout has not been defined")}function jo(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?it=setTimeout:it=Fo}catch{it=Fo}try{typeof clearTimeout=="function"?at=clearTimeout:at=jo}catch{at=jo}})();function xc(t){if(it===setTimeout)return setTimeout(t,0);if((it===Fo||!it)&&setTimeout)return it=setTimeout,setTimeout(t,0);try{return it(t,0)}catch{try{return it.call(null,t,0)}catch{return it.call(this,t,0)}}}function nh(t){if(at===clearTimeout)return clearTimeout(t);if((at===jo||!at)&&clearTimeout)return at=clearTimeout,clearTimeout(t);try{return at(t)}catch{try{return at.call(null,t)}catch{return at.call(this,t)}}}var pt=[],zt=!1,It,nn=-1;function oh(){!zt||!It||(zt=!1,It.length?pt=It.concat(pt):nn=-1,pt.length&&Ec())}function Ec(){if(!zt){var t=xc(oh);zt=!0;for(var e=pt.length;e;){for(It=pt,pt=[];++nn<e;)It&&It[nn].run();nn=-1,e=pt.length}It=null,zt=!1,nh(t)}}Te.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];pt.push(new Sc(t,e)),pt.length===1&&!zt&&xc(Ec)};function Sc(t,e){this.fun=t,this.array=e}Sc.prototype.run=function(){this.fun.apply(null,this.array)},Te.title="browser",Te.browser=!0,Te.env={},Te.argv=[],Te.version="",Te.versions={};function ht(){}Te.on=ht,Te.addListener=ht,Te.once=ht,Te.off=ht,Te.removeListener=ht,Te.removeAllListeners=ht,Te.emit=ht,Te.prependListener=ht,Te.prependOnceListener=ht,Te.listeners=function(t){return[]},Te.binding=function(t){throw new Error("process.binding is not supported")},Te.cwd=function(){return"/"},Te.chdir=function(t){throw new Error("process.chdir is not supported")},Te.umask=function(){return 0};var ih=wc.exports;const $e=rh(ih);var Pt={},Ac={},Do=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;e[r]=o;for(var i 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 c=Object.getOwnPropertySymbols(e);if(c.length!==1||c[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(e,r);if(l.value!==o||l.enumerable!==!0)return!1}return!0},ah=Do,Lo=function(){return ah()&&!!Symbol.toStringTag},kc=Object,sh=Error,ch=EvalError,lh=RangeError,uh=ReferenceError,Oc=SyntaxError,on=TypeError,fh=URIError,dh=Math.abs,ph=Math.floor,hh=Math.max,yh=Math.min,gh=Math.pow,mh=Object.getOwnPropertyDescriptor,an=mh;if(an)try{an([],"length")}catch{an=null}var mr=an,sn=Object.defineProperty||!1;if(sn)try{sn({},"a",{value:1})}catch{sn=!1}var cn=sn,Uo,Ic;function _h(){if(Ic)return Uo;Ic=1;var t=typeof Symbol<"u"&&Symbol,e=Do;return Uo=function(){return typeof t!="function"||typeof Symbol!="function"||typeof t("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},Uo}var zo,Pc;function vh(){if(Pc)return zo;Pc=1;var t="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,r=Math.max,n="[object Function]",o=function(d,p){for(var f=[],y=0;y<d.length;y+=1)f[y]=d[y];for(var v=0;v<p.length;v+=1)f[v+d.length]=p[v];return f},i=function(d,p){for(var f=[],y=p,v=0;y<d.length;y+=1,v+=1)f[v]=d[y];return f},c=function(l,d){for(var p="",f=0;f<l.length;f+=1)p+=l[f],f+1<l.length&&(p+=d);return p};return zo=function(d){var p=this;if(typeof p!="function"||e.apply(p)!==n)throw new TypeError(t+p);for(var f=i(arguments,1),y,v=function(){if(this instanceof y){var P=p.apply(this,o(f,arguments));return Object(P)===P?P:this}return p.apply(d,o(f,arguments))},w=r(0,p.length-f.length),N=[],A=0;A<w;A++)N[A]="$"+A;if(y=Function("binder","return function ("+c(N,",")+"){ return binder.apply(this,arguments); }")(v),p.prototype){var C=function(){};C.prototype=p.prototype,y.prototype=new C,C.prototype=null}return y},zo}var qo,Nc;function _r(){if(Nc)return qo;Nc=1;var t=vh();return qo=Function.prototype.bind||t,qo}var Wo,Tc;function Vo(){return Tc||(Tc=1,Wo=Function.prototype.call),Wo}var Ho,Rc;function Go(){return Rc||(Rc=1,Ho=Function.prototype.apply),Ho}var bh=typeof Reflect<"u"&&Reflect&&Reflect.apply,wh=_r(),xh=Go(),Eh=Vo(),Sh=bh,Cc=Sh||wh.call(Eh,xh),Ah=_r(),kh=on,Oh=Vo(),Ih=Cc,Yo=function(e){if(e.length<1||typeof e[0]!="function")throw new kh("a function is required");return Ih(Ah,Oh,e)},Jo,Bc;function Ph(){if(Bc)return Jo;Bc=1;var t=Yo,e=mr,r;try{r=[].__proto__===Array.prototype}catch(c){if(!c||typeof c!="object"||!("code"in c)||c.code!=="ERR_PROTO_ACCESS")throw c}var n=!!r&&e&&e(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return Jo=n&&typeof n.get=="function"?t([n.get]):typeof i=="function"?function(l){return i(l==null?l:o(l))}:!1,Jo}var Ko,Mc;function Nh(){if(Mc)return Ko;Mc=1;var t=Function.prototype.call,e=Object.prototype.hasOwnProperty,r=_r();return Ko=r.call(t,e),Ko}var ue,$c=kc,Th=sh,Rh=ch,Ch=lh,Bh=uh,qt=Oc,Wt=on,Mh=fh,$h=dh,Fh=ph,jh=hh,Dh=yh,Lh=gh,Fc=Function,Xo=function(t){try{return Fc('"use strict"; return ('+t+").constructor;")()}catch{}},vr=mr,Uh=cn,Zo=function(){throw new Wt},zh=vr?function(){try{return arguments.callee,Zo}catch{try{return vr(arguments,"callee").get}catch{return Zo}}}():Zo,Vt=_h()(),qh=Ph(),Le=typeof Reflect=="function"&&Reflect.getPrototypeOf||$c.getPrototypeOf||qh,jc=Go(),br=Vo(),Ht={},Wh=typeof Uint8Array>"u"||!Le?ue:Le(Uint8Array),Nt={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?ue:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?ue:ArrayBuffer,"%ArrayIteratorPrototype%":Vt&&Le?Le([][Symbol.iterator]()):ue,"%AsyncFromSyncIteratorPrototype%":ue,"%AsyncFunction%":Ht,"%AsyncGenerator%":Ht,"%AsyncGeneratorFunction%":Ht,"%AsyncIteratorPrototype%":Ht,"%Atomics%":typeof Atomics>"u"?ue:Atomics,"%BigInt%":typeof BigInt>"u"?ue:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?ue:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?ue:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?ue:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Th,"%eval%":eval,"%EvalError%":Rh,"%Float32Array%":typeof Float32Array>"u"?ue:Float32Array,"%Float64Array%":typeof Float64Array>"u"?ue:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?ue:FinalizationRegistry,"%Function%":Fc,"%GeneratorFunction%":Ht,"%Int8Array%":typeof Int8Array>"u"?ue:Int8Array,"%Int16Array%":typeof Int16Array>"u"?ue:Int16Array,"%Int32Array%":typeof Int32Array>"u"?ue:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Vt&&Le?Le(Le([][Symbol.iterator]())):ue,"%JSON%":typeof JSON=="object"?JSON:ue,"%Map%":typeof Map>"u"?ue:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Vt||!Le?ue:Le(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":$c,"%Object.getOwnPropertyDescriptor%":vr,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?ue:Promise,"%Proxy%":typeof Proxy>"u"?ue:Proxy,"%RangeError%":Ch,"%ReferenceError%":Bh,"%Reflect%":typeof Reflect>"u"?ue:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?ue:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Vt||!Le?ue:Le(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?ue:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Vt&&Le?Le(""[Symbol.iterator]()):ue,"%Symbol%":Vt?Symbol:ue,"%SyntaxError%":qt,"%ThrowTypeError%":zh,"%TypedArray%":Wh,"%TypeError%":Wt,"%Uint8Array%":typeof Uint8Array>"u"?ue:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?ue:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?ue:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?ue:Uint32Array,"%URIError%":Mh,"%WeakMap%":typeof WeakMap>"u"?ue:WeakMap,"%WeakRef%":typeof WeakRef>"u"?ue:WeakRef,"%WeakSet%":typeof WeakSet>"u"?ue:WeakSet,"%Function.prototype.call%":br,"%Function.prototype.apply%":jc,"%Object.defineProperty%":Uh,"%Math.abs%":$h,"%Math.floor%":Fh,"%Math.max%":jh,"%Math.min%":Dh,"%Math.pow%":Lh};if(Le)try{null.error}catch(t){var Vh=Le(Le(t));Nt["%Error.prototype%"]=Vh}var Hh=function t(e){var r;if(e==="%AsyncFunction%")r=Xo("async function () {}");else if(e==="%GeneratorFunction%")r=Xo("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=Xo("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=t("%AsyncGenerator%");o&&Le&&(r=Le(o.prototype))}return Nt[e]=r,r},Dc={__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"]},wr=_r(),ln=Nh(),Gh=wr.call(br,Array.prototype.concat),Yh=wr.call(jc,Array.prototype.splice),Lc=wr.call(br,String.prototype.replace),un=wr.call(br,String.prototype.slice),Jh=wr.call(br,RegExp.prototype.exec),Kh=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Xh=/\\(\\)?/g,Zh=function(e){var r=un(e,0,1),n=un(e,-1);if(r==="%"&&n!=="%")throw new qt("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new qt("invalid intrinsic syntax, expected opening `%`");var o=[];return Lc(e,Kh,function(i,c,l,d){o[o.length]=l?Lc(d,Xh,"$1"):c||i}),o},Qh=function(e,r){var n=e,o;if(ln(Dc,n)&&(o=Dc[n],n="%"+o[0]+"%"),ln(Nt,n)){var i=Nt[n];if(i===Ht&&(i=Hh(n)),typeof i>"u"&&!r)throw new Wt("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:i}}throw new qt("intrinsic "+e+" does not exist!")},Qo=function(e,r){if(typeof e!="string"||e.length===0)throw new Wt("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Wt('"allowMissing" argument must be a boolean');if(Jh(/^%?[^%]*%?$/,e)===null)throw new qt("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Zh(e),o=n.length>0?n[0]:"",i=Qh("%"+o+"%",r),c=i.name,l=i.value,d=!1,p=i.alias;p&&(o=p[0],Yh(n,Gh([0,1],p)));for(var f=1,y=!0;f<n.length;f+=1){var v=n[f],w=un(v,0,1),N=un(v,-1);if((w==='"'||w==="'"||w==="`"||N==='"'||N==="'"||N==="`")&&w!==N)throw new qt("property names with quotes must have matching quotes");if((v==="constructor"||!y)&&(d=!0),o+="."+v,c="%"+o+"%",ln(Nt,c))l=Nt[c];else if(l!=null){if(!(v in l)){if(!r)throw new Wt("base intrinsic for "+e+" exists, but the property is not available.");return}if(vr&&f+1>=n.length){var A=vr(l,v);y=!!A,y&&"get"in A&&!("originalValue"in A.get)?l=A.get:l=l[v]}else y=ln(l,v),l=l[v];y&&!d&&(Nt[c]=l)}}return l},Uc=Qo,zc=Yo,ey=zc([Uc("%String.prototype.indexOf%")]),ei=function(e,r){var n=Uc(e,!!r);return typeof n=="function"&&ey(e,".prototype.")>-1?zc([n]):n},ty=Lo(),ry=ei,ti=ry("Object.prototype.toString"),fn=function(e){return ty&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:ti(e)==="[object Arguments]"},qc=function(e){return fn(e)?!0:e!==null&&typeof e=="object"&&"length"in e&&typeof e.length=="number"&&e.length>=0&&ti(e)!=="[object Array]"&&"callee"in e&&ti(e.callee)==="[object Function]"},ny=function(){return fn(arguments)}();fn.isLegacyArguments=qc;var oy=ny?fn:qc,iy=Object.prototype.toString,ay=Function.prototype.toString,sy=/^\s*(?:function)?\*/,Wc=Lo(),ri=Object.getPrototypeOf,cy=function(){if(!Wc)return!1;try{return Function("return function*() {}")()}catch{}},ni,ly=function(e){if(typeof e!="function")return!1;if(sy.test(ay.call(e)))return!0;if(!Wc){var r=iy.call(e);return r==="[object GeneratorFunction]"}if(!ri)return!1;if(typeof ni>"u"){var n=cy();ni=n?ri(n):!1}return ri(e)===ni},Vc=Function.prototype.toString,Gt=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,oi,dn;if(typeof Gt=="function"&&typeof Object.defineProperty=="function")try{oi=Object.defineProperty({},"length",{get:function(){throw dn}}),dn={},Gt(function(){throw 42},null,oi)}catch(t){t!==dn&&(Gt=null)}else Gt=null;var uy=/^\s*class\b/,ii=function(e){try{var r=Vc.call(e);return uy.test(r)}catch{return!1}},ai=function(e){try{return ii(e)?!1:(Vc.call(e),!0)}catch{return!1}},pn=Object.prototype.toString,fy="[object Object]",dy="[object Function]",py="[object GeneratorFunction]",hy="[object HTMLAllCollection]",yy="[object HTML document.all class]",gy="[object HTMLCollection]",my=typeof Symbol=="function"&&!!Symbol.toStringTag,_y=!(0 in[,]),si=function(){return!1};if(typeof document=="object"){var vy=document.all;pn.call(vy)===pn.call(document.all)&&(si=function(e){if((_y||!e)&&(typeof e>"u"||typeof e=="object"))try{var r=pn.call(e);return(r===hy||r===yy||r===gy||r===fy)&&e("")==null}catch{}return!1})}var by=Gt?function(e){if(si(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{Gt(e,null,oi)}catch(r){if(r!==dn)return!1}return!ii(e)&&ai(e)}:function(e){if(si(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(my)return ai(e);if(ii(e))return!1;var r=pn.call(e);return r!==dy&&r!==py&&!/^\[object HTML/.test(r)?!1:ai(e)},wy=by,xy=Object.prototype.toString,Hc=Object.prototype.hasOwnProperty,Ey=function(e,r,n){for(var o=0,i=e.length;o<i;o++)Hc.call(e,o)&&(n==null?r(e[o],o,e):r.call(n,e[o],o,e))},Sy=function(e,r,n){for(var o=0,i=e.length;o<i;o++)n==null?r(e.charAt(o),o,e):r.call(n,e.charAt(o),o,e)},Ay=function(e,r,n){for(var o in e)Hc.call(e,o)&&(n==null?r(e[o],o,e):r.call(n,e[o],o,e))},ky=function(e,r,n){if(!wy(r))throw new TypeError("iterator must be a function");var o;arguments.length>=3&&(o=n),xy.call(e)==="[object Array]"?Ey(e,r,o):typeof e=="string"?Sy(e,r,o):Ay(e,r,o)},Oy=ky,Iy=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"],ci=Iy,Py=typeof globalThis>"u"?ir:globalThis,Ny=function(){for(var e=[],r=0;r<ci.length;r++)typeof Py[ci[r]]=="function"&&(e[e.length]=ci[r]);return e},Gc={exports:{}},Yc=cn,Ty=Oc,Yt=on,Jc=mr,Kc=function(e,r,n){if(!e||typeof e!="object"&&typeof e!="function")throw new Yt("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new Yt("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Yt("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Yt("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Yt("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Yt("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,l=arguments.length>6?arguments[6]:!1,d=!!Jc&&Jc(e,r);if(Yc)Yc(e,r,{configurable:c===null&&d?d.configurable:!c,enumerable:o===null&&d?d.enumerable:!o,value:n,writable:i===null&&d?d.writable:!i});else if(l||!o&&!i&&!c)e[r]=n;else throw new Ty("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},li=cn,Xc=function(){return!!li};Xc.hasArrayLengthDefineBug=function(){if(!li)return null;try{return li([],"length",{value:1}).length!==1}catch{return!0}};var Zc=Xc,Ry=Qo,Qc=Kc,Cy=Zc(),el=mr,tl=on,By=Ry("%Math.floor%"),My=function(e,r){if(typeof e!="function")throw new tl("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||By(r)!==r)throw new tl("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],o=!0,i=!0;if("length"in e&&el){var c=el(e,"length");c&&!c.configurable&&(o=!1),c&&!c.writable&&(i=!1)}return(o||i||!n)&&(Cy?Qc(e,"length",r,!0,!0):Qc(e,"length",r)),e},$y=_r(),Fy=Go(),jy=Cc,Dy=function(){return jy($y,Fy,arguments)};(function(t){var e=My,r=cn,n=Yo,o=Dy;t.exports=function(c){var l=n(arguments),d=c.length-(arguments.length-1);return e(l,1+(d>0?d:0),!0)},r?r(t.exports,"apply",{value:o}):t.exports.apply=o})(Gc);var hn=Gc.exports,yn=Oy,Ly=Ny,rl=hn,ui=ei,gn=mr,Uy=ui("Object.prototype.toString"),nl=Lo(),ol=typeof globalThis>"u"?ir:globalThis,fi=Ly(),di=ui("String.prototype.slice"),pi=Object.getPrototypeOf,zy=ui("Array.prototype.indexOf",!0)||function(e,r){for(var n=0;n<e.length;n+=1)if(e[n]===r)return n;return-1},mn={__proto__:null};nl&&gn&&pi?yn(fi,function(t){var e=new ol[t];if(Symbol.toStringTag in e){var r=pi(e),n=gn(r,Symbol.toStringTag);if(!n){var o=pi(r);n=gn(o,Symbol.toStringTag)}mn["$"+t]=rl(n.get)}}):yn(fi,function(t){var e=new ol[t],r=e.slice||e.set;r&&(mn["$"+t]=rl(r))});var qy=function(e){var r=!1;return yn(mn,function(n,o){if(!r)try{"$"+n(e)===o&&(r=di(o,1))}catch{}}),r},Wy=function(e){var r=!1;return yn(mn,function(n,o){if(!r)try{n(e),r=di(o,1)}catch{}}),r},il=function(e){if(!e||typeof e!="object")return!1;if(!nl){var r=di(Uy(e),8,-1);return zy(fi,r)>-1?r:r!=="Object"?!1:Wy(e)}return gn?qy(e):null},Vy=il,Hy=function(e){return!!Vy(e)};(function(t){var e=oy,r=ly,n=il,o=Hy;function i(j){return j.call.bind(j)}var c=typeof BigInt<"u",l=typeof Symbol<"u",d=i(Object.prototype.toString),p=i(Number.prototype.valueOf),f=i(String.prototype.valueOf),y=i(Boolean.prototype.valueOf);if(c)var v=i(BigInt.prototype.valueOf);if(l)var w=i(Symbol.prototype.valueOf);function N(j,Xe){if(typeof j!="object")return!1;try{return Xe(j),!0}catch{return!1}}t.isArgumentsObject=e,t.isGeneratorFunction=r,t.isTypedArray=o;function A(j){return typeof Promise<"u"&&j instanceof Promise||j!==null&&typeof j=="object"&&typeof j.then=="function"&&typeof j.catch=="function"}t.isPromise=A;function C(j){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(j):o(j)||O(j)}t.isArrayBufferView=C;function P(j){return n(j)==="Uint8Array"}t.isUint8Array=P;function _(j){return n(j)==="Uint8ClampedArray"}t.isUint8ClampedArray=_;function T(j){return n(j)==="Uint16Array"}t.isUint16Array=T;function $(j){return n(j)==="Uint32Array"}t.isUint32Array=$;function B(j){return n(j)==="Int8Array"}t.isInt8Array=B;function q(j){return n(j)==="Int16Array"}t.isInt16Array=q;function W(j){return n(j)==="Int32Array"}t.isInt32Array=W;function Z(j){return n(j)==="Float32Array"}t.isFloat32Array=Z;function U(j){return n(j)==="Float64Array"}t.isFloat64Array=U;function K(j){return n(j)==="BigInt64Array"}t.isBigInt64Array=K;function Q(j){return n(j)==="BigUint64Array"}t.isBigUint64Array=Q;function re(j){return d(j)==="[object Map]"}re.working=typeof Map<"u"&&re(new Map);function se(j){return typeof Map>"u"?!1:re.working?re(j):j instanceof Map}t.isMap=se;function Ae(j){return d(j)==="[object Set]"}Ae.working=typeof Set<"u"&&Ae(new Set);function de(j){return typeof Set>"u"?!1:Ae.working?Ae(j):j instanceof Set}t.isSet=de;function Pe(j){return d(j)==="[object WeakMap]"}Pe.working=typeof WeakMap<"u"&&Pe(new WeakMap);function Se(j){return typeof WeakMap>"u"?!1:Pe.working?Pe(j):j instanceof WeakMap}t.isWeakMap=Se;function ke(j){return d(j)==="[object WeakSet]"}ke.working=typeof WeakSet<"u"&&ke(new WeakSet);function z(j){return ke(j)}t.isWeakSet=z;function V(j){return d(j)==="[object ArrayBuffer]"}V.working=typeof ArrayBuffer<"u"&&V(new ArrayBuffer);function H(j){return typeof ArrayBuffer>"u"?!1:V.working?V(j):j instanceof ArrayBuffer}t.isArrayBuffer=H;function m(j){return d(j)==="[object DataView]"}m.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&m(new DataView(new ArrayBuffer(1),0,1));function O(j){return typeof DataView>"u"?!1:m.working?m(j):j instanceof DataView}t.isDataView=O;var g=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function b(j){return d(j)==="[object SharedArrayBuffer]"}function S(j){return typeof g>"u"?!1:(typeof b.working>"u"&&(b.working=b(new g)),b.working?b(j):j instanceof g)}t.isSharedArrayBuffer=S;function D(j){return d(j)==="[object AsyncFunction]"}t.isAsyncFunction=D;function M(j){return d(j)==="[object Map Iterator]"}t.isMapIterator=M;function L(j){return d(j)==="[object Set Iterator]"}t.isSetIterator=L;function G(j){return d(j)==="[object Generator]"}t.isGeneratorObject=G;function ne(j){return d(j)==="[object WebAssembly.Module]"}t.isWebAssemblyCompiledModule=ne;function le(j){return N(j,p)}t.isNumberObject=le;function he(j){return N(j,f)}t.isStringObject=he;function Ee(j){return N(j,y)}t.isBooleanObject=Ee;function Re(j){return c&&N(j,v)}t.isBigIntObject=Re;function Ue(j){return l&&N(j,w)}t.isSymbolObject=Ue;function ze(j){return le(j)||he(j)||Ee(j)||Re(j)||Ue(j)}t.isBoxedPrimitive=ze;function Fe(j){return typeof Uint8Array<"u"&&(H(j)||S(j))}t.isAnyArrayBuffer=Fe,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(j){Object.defineProperty(t,j,{enumerable:!1,value:function(){throw new Error(j+" is not supported in userland")}})})})(Ac);var Gy=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"},hi={exports:{}};typeof Object.create=="function"?hi.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:hi.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}};var Yy=hi.exports;(function(t){var e=Object.getOwnPropertyDescriptors||function(O){for(var g=Object.keys(O),b={},S=0;S<g.length;S++)b[g[S]]=Object.getOwnPropertyDescriptor(O,g[S]);return b},r=/%[sdj%]/g;t.format=function(m){if(!B(m)){for(var O=[],g=0;g<arguments.length;g++)O.push(c(arguments[g]));return O.join(" ")}for(var g=1,b=arguments,S=b.length,D=String(m).replace(r,function(L){if(L==="%%")return"%";if(g>=S)return L;switch(L){case"%s":return String(b[g++]);case"%d":return Number(b[g++]);case"%j":try{return JSON.stringify(b[g++])}catch{return"[Circular]"}default:return L}}),M=b[g];g<S;M=b[++g])_(M)||!U(M)?D+=" "+M:D+=" "+c(M);return D},t.deprecate=function(m,O){if(typeof $e<"u"&&$e.noDeprecation===!0)return m;if(typeof $e>"u")return function(){return t.deprecate(m,O).apply(this,arguments)};var g=!1;function b(){if(!g){if($e.throwDeprecation)throw new Error(O);$e.traceDeprecation?console.trace(O):console.error(O),g=!0}return m.apply(this,arguments)}return b};var n={},o=/^$/;if($e.env.NODE_DEBUG){var i=$e.env.NODE_DEBUG;i=i.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),o=new RegExp("^"+i+"$","i")}t.debuglog=function(m){if(m=m.toUpperCase(),!n[m])if(o.test(m)){var O=$e.pid;n[m]=function(){var g=t.format.apply(t,arguments);console.error("%s %d: %s",m,O,g)}}else n[m]=function(){};return n[m]};function c(m,O){var g={seen:[],stylize:d};return arguments.length>=3&&(g.depth=arguments[2]),arguments.length>=4&&(g.colors=arguments[3]),P(O)?g.showHidden=O:O&&t._extend(g,O),W(g.showHidden)&&(g.showHidden=!1),W(g.depth)&&(g.depth=2),W(g.colors)&&(g.colors=!1),W(g.customInspect)&&(g.customInspect=!0),g.colors&&(g.stylize=l),f(g,m,g.depth)}t.inspect=c,c.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]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function l(m,O){var g=c.styles[O];return g?"\x1B["+c.colors[g][0]+"m"+m+"\x1B["+c.colors[g][1]+"m":m}function d(m,O){return m}function p(m){var O={};return m.forEach(function(g,b){O[g]=!0}),O}function f(m,O,g){if(m.customInspect&&O&&re(O.inspect)&&O.inspect!==t.inspect&&!(O.constructor&&O.constructor.prototype===O)){var b=O.inspect(g,m);return B(b)||(b=f(m,b,g)),b}var S=y(m,O);if(S)return S;var D=Object.keys(O),M=p(D);if(m.showHidden&&(D=Object.getOwnPropertyNames(O)),Q(O)&&(D.indexOf("message")>=0||D.indexOf("description")>=0))return v(O);if(D.length===0){if(re(O)){var L=O.name?": "+O.name:"";return m.stylize("[Function"+L+"]","special")}if(Z(O))return m.stylize(RegExp.prototype.toString.call(O),"regexp");if(K(O))return m.stylize(Date.prototype.toString.call(O),"date");if(Q(O))return v(O)}var G="",ne=!1,le=["{","}"];if(C(O)&&(ne=!0,le=["[","]"]),re(O)){var he=O.name?": "+O.name:"";G=" [Function"+he+"]"}if(Z(O)&&(G=" "+RegExp.prototype.toString.call(O)),K(O)&&(G=" "+Date.prototype.toUTCString.call(O)),Q(O)&&(G=" "+v(O)),D.length===0&&(!ne||O.length==0))return le[0]+G+le[1];if(g<0)return Z(O)?m.stylize(RegExp.prototype.toString.call(O),"regexp"):m.stylize("[Object]","special");m.seen.push(O);var Ee;return ne?Ee=w(m,O,g,M,D):Ee=D.map(function(Re){return N(m,O,g,M,Re,ne)}),m.seen.pop(),A(Ee,G,le)}function y(m,O){if(W(O))return m.stylize("undefined","undefined");if(B(O)){var g="'"+JSON.stringify(O).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return m.stylize(g,"string")}if($(O))return m.stylize(""+O,"number");if(P(O))return m.stylize(""+O,"boolean");if(_(O))return m.stylize("null","null")}function v(m){return"["+Error.prototype.toString.call(m)+"]"}function w(m,O,g,b,S){for(var D=[],M=0,L=O.length;M<L;++M)ke(O,String(M))?D.push(N(m,O,g,b,String(M),!0)):D.push("");return S.forEach(function(G){G.match(/^\d+$/)||D.push(N(m,O,g,b,G,!0))}),D}function N(m,O,g,b,S,D){var M,L,G;if(G=Object.getOwnPropertyDescriptor(O,S)||{value:O[S]},G.get?G.set?L=m.stylize("[Getter/Setter]","special"):L=m.stylize("[Getter]","special"):G.set&&(L=m.stylize("[Setter]","special")),ke(b,S)||(M="["+S+"]"),L||(m.seen.indexOf(G.value)<0?(_(g)?L=f(m,G.value,null):L=f(m,G.value,g-1),L.indexOf(`
|
|
92
|
+
*/(function(t){const e=en,r=No,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=f,t.SlowBuffer=B,t.INSPECT_MAX_BYTES=50;const o=2147483647;t.kMaxLength=o;const{Uint8Array:i,ArrayBuffer:c,SharedArrayBuffer:l}=globalThis;f.TYPED_ARRAY_SUPPORT=d(),!f.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 d(){try{const u=new i(1),a={foo:function(){return 42}};return Object.setPrototypeOf(a,i.prototype),Object.setPrototypeOf(u,a),u.foo()===42}catch{return!1}}Object.defineProperty(f.prototype,"parent",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.buffer}}),Object.defineProperty(f.prototype,"offset",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.byteOffset}});function p(u){if(u>o)throw new RangeError('The value "'+u+'" is invalid for option "size"');const a=new i(u);return Object.setPrototypeOf(a,f.prototype),a}function f(u,a,s){if(typeof u=="number"){if(typeof a=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return N(u)}return y(u,a,s)}f.poolSize=8192;function y(u,a,s){if(typeof u=="string")return A(u,a);if(c.isView(u))return P(u);if(u==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof u);if(k(u,c)||u&&k(u.buffer,c)||typeof l<"u"&&(k(u,l)||u&&k(u.buffer,l)))return _(u,a,s);if(typeof u=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const h=u.valueOf&&u.valueOf();if(h!=null&&h!==u)return f.from(h,a,s);const x=T(u);if(x)return x;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof u[Symbol.toPrimitive]=="function")return f.from(u[Symbol.toPrimitive]("string"),a,s);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof u)}f.from=function(u,a,s){return y(u,a,s)},Object.setPrototypeOf(f.prototype,i.prototype),Object.setPrototypeOf(f,i);function v(u){if(typeof u!="number")throw new TypeError('"size" argument must be of type number');if(u<0)throw new RangeError('The value "'+u+'" is invalid for option "size"')}function w(u,a,s){return v(u),u<=0?p(u):a!==void 0?typeof s=="string"?p(u).fill(a,s):p(u).fill(a):p(u)}f.alloc=function(u,a,s){return w(u,a,s)};function N(u){return v(u),p(u<0?0:$(u)|0)}f.allocUnsafe=function(u){return N(u)},f.allocUnsafeSlow=function(u){return N(u)};function A(u,a){if((typeof a!="string"||a==="")&&(a="utf8"),!f.isEncoding(a))throw new TypeError("Unknown encoding: "+a);const s=q(u,a)|0;let h=p(s);const x=h.write(u,a);return x!==s&&(h=h.slice(0,x)),h}function C(u){const a=u.length<0?0:$(u.length)|0,s=p(a);for(let h=0;h<a;h+=1)s[h]=u[h]&255;return s}function P(u){if(k(u,i)){const a=new i(u);return _(a.buffer,a.byteOffset,a.byteLength)}return C(u)}function _(u,a,s){if(a<0||u.byteLength<a)throw new RangeError('"offset" is outside of buffer bounds');if(u.byteLength<a+(s||0))throw new RangeError('"length" is outside of buffer bounds');let h;return a===void 0&&s===void 0?h=new i(u):s===void 0?h=new i(u,a):h=new i(u,a,s),Object.setPrototypeOf(h,f.prototype),h}function T(u){if(f.isBuffer(u)){const a=$(u.length)|0,s=p(a);return s.length===0||u.copy(s,0,0,a),s}if(u.length!==void 0)return typeof u.length!="number"||Y(u.length)?p(0):C(u);if(u.type==="Buffer"&&Array.isArray(u.data))return C(u.data)}function $(u){if(u>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return u|0}function B(u){return+u!=u&&(u=0),f.alloc(+u)}f.isBuffer=function(a){return a!=null&&a._isBuffer===!0&&a!==f.prototype},f.compare=function(a,s){if(k(a,i)&&(a=f.from(a,a.offset,a.byteLength)),k(s,i)&&(s=f.from(s,s.offset,s.byteLength)),!f.isBuffer(a)||!f.isBuffer(s))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(a===s)return 0;let h=a.length,x=s.length;for(let R=0,F=Math.min(h,x);R<F;++R)if(a[R]!==s[R]){h=a[R],x=s[R];break}return h<x?-1:x<h?1:0},f.isEncoding=function(a){switch(String(a).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}},f.concat=function(a,s){if(!Array.isArray(a))throw new TypeError('"list" argument must be an Array of Buffers');if(a.length===0)return f.alloc(0);let h;if(s===void 0)for(s=0,h=0;h<a.length;++h)s+=a[h].length;const x=f.allocUnsafe(s);let R=0;for(h=0;h<a.length;++h){let F=a[h];if(k(F,i))R+F.length>x.length?(f.isBuffer(F)||(F=f.from(F)),F.copy(x,R)):i.prototype.set.call(x,F,R);else if(f.isBuffer(F))F.copy(x,R);else throw new TypeError('"list" argument must be an Array of Buffers');R+=F.length}return x};function q(u,a){if(f.isBuffer(u))return u.length;if(c.isView(u)||k(u,c))return u.byteLength;if(typeof u!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof u);const s=u.length,h=arguments.length>2&&arguments[2]===!0;if(!h&&s===0)return 0;let x=!1;for(;;)switch(a){case"ascii":case"latin1":case"binary":return s;case"utf8":case"utf-8":return Xe(u).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return s*2;case"hex":return s>>>1;case"base64":return ve(u).length;default:if(x)return h?-1:Xe(u).length;a=(""+a).toLowerCase(),x=!0}}f.byteLength=q;function W(u,a,s){let h=!1;if((a===void 0||a<0)&&(a=0),a>this.length||((s===void 0||s>this.length)&&(s=this.length),s<=0)||(s>>>=0,a>>>=0,s<=a))return"";for(u||(u="utf8");;)switch(u){case"hex":return m(this,a,s);case"utf8":case"utf-8":return Se(this,a,s);case"ascii":return V(this,a,s);case"latin1":case"binary":return H(this,a,s);case"base64":return Pe(this,a,s);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,a,s);default:if(h)throw new TypeError("Unknown encoding: "+u);u=(u+"").toLowerCase(),h=!0}}f.prototype._isBuffer=!0;function Z(u,a,s){const h=u[a];u[a]=u[s],u[s]=h}f.prototype.swap16=function(){const a=this.length;if(a%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let s=0;s<a;s+=2)Z(this,s,s+1);return this},f.prototype.swap32=function(){const a=this.length;if(a%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let s=0;s<a;s+=4)Z(this,s,s+3),Z(this,s+1,s+2);return this},f.prototype.swap64=function(){const a=this.length;if(a%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let s=0;s<a;s+=8)Z(this,s,s+7),Z(this,s+1,s+6),Z(this,s+2,s+5),Z(this,s+3,s+4);return this},f.prototype.toString=function(){const a=this.length;return a===0?"":arguments.length===0?Se(this,0,a):W.apply(this,arguments)},f.prototype.toLocaleString=f.prototype.toString,f.prototype.equals=function(a){if(!f.isBuffer(a))throw new TypeError("Argument must be a Buffer");return this===a?!0:f.compare(this,a)===0},f.prototype.inspect=function(){let a="";const s=t.INSPECT_MAX_BYTES;return a=this.toString("hex",0,s).replace(/(.{2})/g,"$1 ").trim(),this.length>s&&(a+=" ... "),"<Buffer "+a+">"},n&&(f.prototype[n]=f.prototype.inspect),f.prototype.compare=function(a,s,h,x,R){if(k(a,i)&&(a=f.from(a,a.offset,a.byteLength)),!f.isBuffer(a))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof a);if(s===void 0&&(s=0),h===void 0&&(h=a?a.length:0),x===void 0&&(x=0),R===void 0&&(R=this.length),s<0||h>a.length||x<0||R>this.length)throw new RangeError("out of range index");if(x>=R&&s>=h)return 0;if(x>=R)return-1;if(s>=h)return 1;if(s>>>=0,h>>>=0,x>>>=0,R>>>=0,this===a)return 0;let F=R-x,ie=h-s;const ye=Math.min(F,ie),ge=this.slice(x,R),Ne=a.slice(s,h);for(let xe=0;xe<ye;++xe)if(ge[xe]!==Ne[xe]){F=ge[xe],ie=Ne[xe];break}return F<ie?-1:ie<F?1:0};function U(u,a,s,h,x){if(u.length===0)return-1;if(typeof s=="string"?(h=s,s=0):s>2147483647?s=2147483647:s<-2147483648&&(s=-2147483648),s=+s,Y(s)&&(s=x?0:u.length-1),s<0&&(s=u.length+s),s>=u.length){if(x)return-1;s=u.length-1}else if(s<0)if(x)s=0;else return-1;if(typeof a=="string"&&(a=f.from(a,h)),f.isBuffer(a))return a.length===0?-1:K(u,a,s,h,x);if(typeof a=="number")return a=a&255,typeof i.prototype.indexOf=="function"?x?i.prototype.indexOf.call(u,a,s):i.prototype.lastIndexOf.call(u,a,s):K(u,[a],s,h,x);throw new TypeError("val must be string, number or Buffer")}function K(u,a,s,h,x){let R=1,F=u.length,ie=a.length;if(h!==void 0&&(h=String(h).toLowerCase(),h==="ucs2"||h==="ucs-2"||h==="utf16le"||h==="utf-16le")){if(u.length<2||a.length<2)return-1;R=2,F/=2,ie/=2,s/=2}function ye(Ne,xe){return R===1?Ne[xe]:Ne.readUInt16BE(xe*R)}let ge;if(x){let Ne=-1;for(ge=s;ge<F;ge++)if(ye(u,ge)===ye(a,Ne===-1?0:ge-Ne)){if(Ne===-1&&(Ne=ge),ge-Ne+1===ie)return Ne*R}else Ne!==-1&&(ge-=ge-Ne),Ne=-1}else for(s+ie>F&&(s=F-ie),ge=s;ge>=0;ge--){let Ne=!0;for(let xe=0;xe<ie;xe++)if(ye(u,ge+xe)!==ye(a,xe)){Ne=!1;break}if(Ne)return ge}return-1}f.prototype.includes=function(a,s,h){return this.indexOf(a,s,h)!==-1},f.prototype.indexOf=function(a,s,h){return U(this,a,s,h,!0)},f.prototype.lastIndexOf=function(a,s,h){return U(this,a,s,h,!1)};function Q(u,a,s,h){s=Number(s)||0;const x=u.length-s;h?(h=Number(h),h>x&&(h=x)):h=x;const R=a.length;h>R/2&&(h=R/2);let F;for(F=0;F<h;++F){const ie=parseInt(a.substr(F*2,2),16);if(Y(ie))return F;u[s+F]=ie}return F}function re(u,a,s,h){return E(Xe(a,u.length-s),u,s,h)}function se(u,a,s,h){return E(J(a),u,s,h)}function Ae(u,a,s,h){return E(ve(a),u,s,h)}function de(u,a,s,h){return E(pe(a,u.length-s),u,s,h)}f.prototype.write=function(a,s,h,x){if(s===void 0)x="utf8",h=this.length,s=0;else if(h===void 0&&typeof s=="string")x=s,h=this.length,s=0;else if(isFinite(s))s=s>>>0,isFinite(h)?(h=h>>>0,x===void 0&&(x="utf8")):(x=h,h=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const R=this.length-s;if((h===void 0||h>R)&&(h=R),a.length>0&&(h<0||s<0)||s>this.length)throw new RangeError("Attempt to write outside buffer bounds");x||(x="utf8");let F=!1;for(;;)switch(x){case"hex":return Q(this,a,s,h);case"utf8":case"utf-8":return re(this,a,s,h);case"ascii":case"latin1":case"binary":return se(this,a,s,h);case"base64":return Ae(this,a,s,h);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return de(this,a,s,h);default:if(F)throw new TypeError("Unknown encoding: "+x);x=(""+x).toLowerCase(),F=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Pe(u,a,s){return a===0&&s===u.length?e.fromByteArray(u):e.fromByteArray(u.slice(a,s))}function Se(u,a,s){s=Math.min(u.length,s);const h=[];let x=a;for(;x<s;){const R=u[x];let F=null,ie=R>239?4:R>223?3:R>191?2:1;if(x+ie<=s){let ye,ge,Ne,xe;switch(ie){case 1:R<128&&(F=R);break;case 2:ye=u[x+1],(ye&192)===128&&(xe=(R&31)<<6|ye&63,xe>127&&(F=xe));break;case 3:ye=u[x+1],ge=u[x+2],(ye&192)===128&&(ge&192)===128&&(xe=(R&15)<<12|(ye&63)<<6|ge&63,xe>2047&&(xe<55296||xe>57343)&&(F=xe));break;case 4:ye=u[x+1],ge=u[x+2],Ne=u[x+3],(ye&192)===128&&(ge&192)===128&&(Ne&192)===128&&(xe=(R&15)<<18|(ye&63)<<12|(ge&63)<<6|Ne&63,xe>65535&&xe<1114112&&(F=xe))}}F===null?(F=65533,ie=1):F>65535&&(F-=65536,h.push(F>>>10&1023|55296),F=56320|F&1023),h.push(F),x+=ie}return z(h)}const ke=4096;function z(u){const a=u.length;if(a<=ke)return String.fromCharCode.apply(String,u);let s="",h=0;for(;h<a;)s+=String.fromCharCode.apply(String,u.slice(h,h+=ke));return s}function V(u,a,s){let h="";s=Math.min(u.length,s);for(let x=a;x<s;++x)h+=String.fromCharCode(u[x]&127);return h}function H(u,a,s){let h="";s=Math.min(u.length,s);for(let x=a;x<s;++x)h+=String.fromCharCode(u[x]);return h}function m(u,a,s){const h=u.length;(!a||a<0)&&(a=0),(!s||s<0||s>h)&&(s=h);let x="";for(let R=a;R<s;++R)x+=ee[u[R]];return x}function O(u,a,s){const h=u.slice(a,s);let x="";for(let R=0;R<h.length-1;R+=2)x+=String.fromCharCode(h[R]+h[R+1]*256);return x}f.prototype.slice=function(a,s){const h=this.length;a=~~a,s=s===void 0?h:~~s,a<0?(a+=h,a<0&&(a=0)):a>h&&(a=h),s<0?(s+=h,s<0&&(s=0)):s>h&&(s=h),s<a&&(s=a);const x=this.subarray(a,s);return Object.setPrototypeOf(x,f.prototype),x};function g(u,a,s){if(u%1!==0||u<0)throw new RangeError("offset is not uint");if(u+a>s)throw new RangeError("Trying to access beyond buffer length")}f.prototype.readUintLE=f.prototype.readUIntLE=function(a,s,h){a=a>>>0,s=s>>>0,h||g(a,s,this.length);let x=this[a],R=1,F=0;for(;++F<s&&(R*=256);)x+=this[a+F]*R;return x},f.prototype.readUintBE=f.prototype.readUIntBE=function(a,s,h){a=a>>>0,s=s>>>0,h||g(a,s,this.length);let x=this[a+--s],R=1;for(;s>0&&(R*=256);)x+=this[a+--s]*R;return x},f.prototype.readUint8=f.prototype.readUInt8=function(a,s){return a=a>>>0,s||g(a,1,this.length),this[a]},f.prototype.readUint16LE=f.prototype.readUInt16LE=function(a,s){return a=a>>>0,s||g(a,2,this.length),this[a]|this[a+1]<<8},f.prototype.readUint16BE=f.prototype.readUInt16BE=function(a,s){return a=a>>>0,s||g(a,2,this.length),this[a]<<8|this[a+1]},f.prototype.readUint32LE=f.prototype.readUInt32LE=function(a,s){return a=a>>>0,s||g(a,4,this.length),(this[a]|this[a+1]<<8|this[a+2]<<16)+this[a+3]*16777216},f.prototype.readUint32BE=f.prototype.readUInt32BE=function(a,s){return a=a>>>0,s||g(a,4,this.length),this[a]*16777216+(this[a+1]<<16|this[a+2]<<8|this[a+3])},f.prototype.readBigUInt64LE=X(function(a){a=a>>>0,Ue(a,"offset");const s=this[a],h=this[a+7];(s===void 0||h===void 0)&&ze(a,this.length-8);const x=s+this[++a]*2**8+this[++a]*2**16+this[++a]*2**24,R=this[++a]+this[++a]*2**8+this[++a]*2**16+h*2**24;return BigInt(x)+(BigInt(R)<<BigInt(32))}),f.prototype.readBigUInt64BE=X(function(a){a=a>>>0,Ue(a,"offset");const s=this[a],h=this[a+7];(s===void 0||h===void 0)&&ze(a,this.length-8);const x=s*2**24+this[++a]*2**16+this[++a]*2**8+this[++a],R=this[++a]*2**24+this[++a]*2**16+this[++a]*2**8+h;return(BigInt(x)<<BigInt(32))+BigInt(R)}),f.prototype.readIntLE=function(a,s,h){a=a>>>0,s=s>>>0,h||g(a,s,this.length);let x=this[a],R=1,F=0;for(;++F<s&&(R*=256);)x+=this[a+F]*R;return R*=128,x>=R&&(x-=Math.pow(2,8*s)),x},f.prototype.readIntBE=function(a,s,h){a=a>>>0,s=s>>>0,h||g(a,s,this.length);let x=s,R=1,F=this[a+--x];for(;x>0&&(R*=256);)F+=this[a+--x]*R;return R*=128,F>=R&&(F-=Math.pow(2,8*s)),F},f.prototype.readInt8=function(a,s){return a=a>>>0,s||g(a,1,this.length),this[a]&128?(255-this[a]+1)*-1:this[a]},f.prototype.readInt16LE=function(a,s){a=a>>>0,s||g(a,2,this.length);const h=this[a]|this[a+1]<<8;return h&32768?h|4294901760:h},f.prototype.readInt16BE=function(a,s){a=a>>>0,s||g(a,2,this.length);const h=this[a+1]|this[a]<<8;return h&32768?h|4294901760:h},f.prototype.readInt32LE=function(a,s){return a=a>>>0,s||g(a,4,this.length),this[a]|this[a+1]<<8|this[a+2]<<16|this[a+3]<<24},f.prototype.readInt32BE=function(a,s){return a=a>>>0,s||g(a,4,this.length),this[a]<<24|this[a+1]<<16|this[a+2]<<8|this[a+3]},f.prototype.readBigInt64LE=X(function(a){a=a>>>0,Ue(a,"offset");const s=this[a],h=this[a+7];(s===void 0||h===void 0)&&ze(a,this.length-8);const x=this[a+4]+this[a+5]*2**8+this[a+6]*2**16+(h<<24);return(BigInt(x)<<BigInt(32))+BigInt(s+this[++a]*2**8+this[++a]*2**16+this[++a]*2**24)}),f.prototype.readBigInt64BE=X(function(a){a=a>>>0,Ue(a,"offset");const s=this[a],h=this[a+7];(s===void 0||h===void 0)&&ze(a,this.length-8);const x=(s<<24)+this[++a]*2**16+this[++a]*2**8+this[++a];return(BigInt(x)<<BigInt(32))+BigInt(this[++a]*2**24+this[++a]*2**16+this[++a]*2**8+h)}),f.prototype.readFloatLE=function(a,s){return a=a>>>0,s||g(a,4,this.length),r.read(this,a,!0,23,4)},f.prototype.readFloatBE=function(a,s){return a=a>>>0,s||g(a,4,this.length),r.read(this,a,!1,23,4)},f.prototype.readDoubleLE=function(a,s){return a=a>>>0,s||g(a,8,this.length),r.read(this,a,!0,52,8)},f.prototype.readDoubleBE=function(a,s){return a=a>>>0,s||g(a,8,this.length),r.read(this,a,!1,52,8)};function b(u,a,s,h,x,R){if(!f.isBuffer(u))throw new TypeError('"buffer" argument must be a Buffer instance');if(a>x||a<R)throw new RangeError('"value" argument is out of bounds');if(s+h>u.length)throw new RangeError("Index out of range")}f.prototype.writeUintLE=f.prototype.writeUIntLE=function(a,s,h,x){if(a=+a,s=s>>>0,h=h>>>0,!x){const ie=Math.pow(2,8*h)-1;b(this,a,s,h,ie,0)}let R=1,F=0;for(this[s]=a&255;++F<h&&(R*=256);)this[s+F]=a/R&255;return s+h},f.prototype.writeUintBE=f.prototype.writeUIntBE=function(a,s,h,x){if(a=+a,s=s>>>0,h=h>>>0,!x){const ie=Math.pow(2,8*h)-1;b(this,a,s,h,ie,0)}let R=h-1,F=1;for(this[s+R]=a&255;--R>=0&&(F*=256);)this[s+R]=a/F&255;return s+h},f.prototype.writeUint8=f.prototype.writeUInt8=function(a,s,h){return a=+a,s=s>>>0,h||b(this,a,s,1,255,0),this[s]=a&255,s+1},f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(a,s,h){return a=+a,s=s>>>0,h||b(this,a,s,2,65535,0),this[s]=a&255,this[s+1]=a>>>8,s+2},f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(a,s,h){return a=+a,s=s>>>0,h||b(this,a,s,2,65535,0),this[s]=a>>>8,this[s+1]=a&255,s+2},f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(a,s,h){return a=+a,s=s>>>0,h||b(this,a,s,4,4294967295,0),this[s+3]=a>>>24,this[s+2]=a>>>16,this[s+1]=a>>>8,this[s]=a&255,s+4},f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(a,s,h){return a=+a,s=s>>>0,h||b(this,a,s,4,4294967295,0),this[s]=a>>>24,this[s+1]=a>>>16,this[s+2]=a>>>8,this[s+3]=a&255,s+4};function S(u,a,s,h,x){Re(a,h,x,u,s,7);let R=Number(a&BigInt(4294967295));u[s++]=R,R=R>>8,u[s++]=R,R=R>>8,u[s++]=R,R=R>>8,u[s++]=R;let F=Number(a>>BigInt(32)&BigInt(4294967295));return u[s++]=F,F=F>>8,u[s++]=F,F=F>>8,u[s++]=F,F=F>>8,u[s++]=F,s}function D(u,a,s,h,x){Re(a,h,x,u,s,7);let R=Number(a&BigInt(4294967295));u[s+7]=R,R=R>>8,u[s+6]=R,R=R>>8,u[s+5]=R,R=R>>8,u[s+4]=R;let F=Number(a>>BigInt(32)&BigInt(4294967295));return u[s+3]=F,F=F>>8,u[s+2]=F,F=F>>8,u[s+1]=F,F=F>>8,u[s]=F,s+8}f.prototype.writeBigUInt64LE=X(function(a,s=0){return S(this,a,s,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeBigUInt64BE=X(function(a,s=0){return D(this,a,s,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeIntLE=function(a,s,h,x){if(a=+a,s=s>>>0,!x){const ye=Math.pow(2,8*h-1);b(this,a,s,h,ye-1,-ye)}let R=0,F=1,ie=0;for(this[s]=a&255;++R<h&&(F*=256);)a<0&&ie===0&&this[s+R-1]!==0&&(ie=1),this[s+R]=(a/F>>0)-ie&255;return s+h},f.prototype.writeIntBE=function(a,s,h,x){if(a=+a,s=s>>>0,!x){const ye=Math.pow(2,8*h-1);b(this,a,s,h,ye-1,-ye)}let R=h-1,F=1,ie=0;for(this[s+R]=a&255;--R>=0&&(F*=256);)a<0&&ie===0&&this[s+R+1]!==0&&(ie=1),this[s+R]=(a/F>>0)-ie&255;return s+h},f.prototype.writeInt8=function(a,s,h){return a=+a,s=s>>>0,h||b(this,a,s,1,127,-128),a<0&&(a=255+a+1),this[s]=a&255,s+1},f.prototype.writeInt16LE=function(a,s,h){return a=+a,s=s>>>0,h||b(this,a,s,2,32767,-32768),this[s]=a&255,this[s+1]=a>>>8,s+2},f.prototype.writeInt16BE=function(a,s,h){return a=+a,s=s>>>0,h||b(this,a,s,2,32767,-32768),this[s]=a>>>8,this[s+1]=a&255,s+2},f.prototype.writeInt32LE=function(a,s,h){return a=+a,s=s>>>0,h||b(this,a,s,4,2147483647,-2147483648),this[s]=a&255,this[s+1]=a>>>8,this[s+2]=a>>>16,this[s+3]=a>>>24,s+4},f.prototype.writeInt32BE=function(a,s,h){return a=+a,s=s>>>0,h||b(this,a,s,4,2147483647,-2147483648),a<0&&(a=4294967295+a+1),this[s]=a>>>24,this[s+1]=a>>>16,this[s+2]=a>>>8,this[s+3]=a&255,s+4},f.prototype.writeBigInt64LE=X(function(a,s=0){return S(this,a,s,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),f.prototype.writeBigInt64BE=X(function(a,s=0){return D(this,a,s,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function M(u,a,s,h,x,R){if(s+h>u.length)throw new RangeError("Index out of range");if(s<0)throw new RangeError("Index out of range")}function L(u,a,s,h,x){return a=+a,s=s>>>0,x||M(u,a,s,4),r.write(u,a,s,h,23,4),s+4}f.prototype.writeFloatLE=function(a,s,h){return L(this,a,s,!0,h)},f.prototype.writeFloatBE=function(a,s,h){return L(this,a,s,!1,h)};function G(u,a,s,h,x){return a=+a,s=s>>>0,x||M(u,a,s,8),r.write(u,a,s,h,52,8),s+8}f.prototype.writeDoubleLE=function(a,s,h){return G(this,a,s,!0,h)},f.prototype.writeDoubleBE=function(a,s,h){return G(this,a,s,!1,h)},f.prototype.copy=function(a,s,h,x){if(!f.isBuffer(a))throw new TypeError("argument should be a Buffer");if(h||(h=0),!x&&x!==0&&(x=this.length),s>=a.length&&(s=a.length),s||(s=0),x>0&&x<h&&(x=h),x===h||a.length===0||this.length===0)return 0;if(s<0)throw new RangeError("targetStart out of bounds");if(h<0||h>=this.length)throw new RangeError("Index out of range");if(x<0)throw new RangeError("sourceEnd out of bounds");x>this.length&&(x=this.length),a.length-s<x-h&&(x=a.length-s+h);const R=x-h;return this===a&&typeof i.prototype.copyWithin=="function"?this.copyWithin(s,h,x):i.prototype.set.call(a,this.subarray(h,x),s),R},f.prototype.fill=function(a,s,h,x){if(typeof a=="string"){if(typeof s=="string"?(x=s,s=0,h=this.length):typeof h=="string"&&(x=h,h=this.length),x!==void 0&&typeof x!="string")throw new TypeError("encoding must be a string");if(typeof x=="string"&&!f.isEncoding(x))throw new TypeError("Unknown encoding: "+x);if(a.length===1){const F=a.charCodeAt(0);(x==="utf8"&&F<128||x==="latin1")&&(a=F)}}else typeof a=="number"?a=a&255:typeof a=="boolean"&&(a=Number(a));if(s<0||this.length<s||this.length<h)throw new RangeError("Out of range index");if(h<=s)return this;s=s>>>0,h=h===void 0?this.length:h>>>0,a||(a=0);let R;if(typeof a=="number")for(R=s;R<h;++R)this[R]=a;else{const F=f.isBuffer(a)?a:f.from(a,x),ie=F.length;if(ie===0)throw new TypeError('The value "'+a+'" is invalid for argument "value"');for(R=0;R<h-s;++R)this[R+s]=F[R%ie]}return this};const ne={};function le(u,a,s){ne[u]=class extends s{constructor(){super(),Object.defineProperty(this,"message",{value:a.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${u}]`,this.stack,delete this.name}get code(){return u}set code(x){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:x,writable:!0})}toString(){return`${this.name} [${u}]: ${this.message}`}}}le("ERR_BUFFER_OUT_OF_BOUNDS",function(u){return u?`${u} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),le("ERR_INVALID_ARG_TYPE",function(u,a){return`The "${u}" argument must be of type number. Received type ${typeof a}`},TypeError),le("ERR_OUT_OF_RANGE",function(u,a,s){let h=`The value of "${u}" is out of range.`,x=s;return Number.isInteger(s)&&Math.abs(s)>2**32?x=he(String(s)):typeof s=="bigint"&&(x=String(s),(s>BigInt(2)**BigInt(32)||s<-(BigInt(2)**BigInt(32)))&&(x=he(x)),x+="n"),h+=` It must be ${a}. Received ${x}`,h},RangeError);function he(u){let a="",s=u.length;const h=u[0]==="-"?1:0;for(;s>=h+4;s-=3)a=`_${u.slice(s-3,s)}${a}`;return`${u.slice(0,s)}${a}`}function Ee(u,a,s){Ue(a,"offset"),(u[a]===void 0||u[a+s]===void 0)&&ze(a,u.length-(s+1))}function Re(u,a,s,h,x,R){if(u>s||u<a){const F=typeof a=="bigint"?"n":"";let ie;throw a===0||a===BigInt(0)?ie=`>= 0${F} and < 2${F} ** ${(R+1)*8}${F}`:ie=`>= -(2${F} ** ${(R+1)*8-1}${F}) and < 2 ** ${(R+1)*8-1}${F}`,new ne.ERR_OUT_OF_RANGE("value",ie,u)}Ee(h,x,R)}function Ue(u,a){if(typeof u!="number")throw new ne.ERR_INVALID_ARG_TYPE(a,"number",u)}function ze(u,a,s){throw Math.floor(u)!==u?(Ue(u,s),new ne.ERR_OUT_OF_RANGE("offset","an integer",u)):a<0?new ne.ERR_BUFFER_OUT_OF_BOUNDS:new ne.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${a}`,u)}const Fe=/[^+/0-9A-Za-z-_]/g;function j(u){if(u=u.split("=")[0],u=u.trim().replace(Fe,""),u.length<2)return"";for(;u.length%4!==0;)u=u+"=";return u}function Xe(u,a){a=a||1/0;let s;const h=u.length;let x=null;const R=[];for(let F=0;F<h;++F){if(s=u.charCodeAt(F),s>55295&&s<57344){if(!x){if(s>56319){(a-=3)>-1&&R.push(239,191,189);continue}else if(F+1===h){(a-=3)>-1&&R.push(239,191,189);continue}x=s;continue}if(s<56320){(a-=3)>-1&&R.push(239,191,189),x=s;continue}s=(x-55296<<10|s-56320)+65536}else x&&(a-=3)>-1&&R.push(239,191,189);if(x=null,s<128){if((a-=1)<0)break;R.push(s)}else if(s<2048){if((a-=2)<0)break;R.push(s>>6|192,s&63|128)}else if(s<65536){if((a-=3)<0)break;R.push(s>>12|224,s>>6&63|128,s&63|128)}else if(s<1114112){if((a-=4)<0)break;R.push(s>>18|240,s>>12&63|128,s>>6&63|128,s&63|128)}else throw new Error("Invalid code point")}return R}function J(u){const a=[];for(let s=0;s<u.length;++s)a.push(u.charCodeAt(s)&255);return a}function pe(u,a){let s,h,x;const R=[];for(let F=0;F<u.length&&!((a-=2)<0);++F)s=u.charCodeAt(F),h=s>>8,x=s%256,R.push(x),R.push(h);return R}function ve(u){return e.toByteArray(j(u))}function E(u,a,s,h){let x;for(x=0;x<h&&!(x+s>=a.length||x>=u.length);++x)a[x+s]=u[x];return x}function k(u,a){return u instanceof a||u!=null&&u.constructor!=null&&u.constructor.name!=null&&u.constructor.name===a.name}function Y(u){return u!==u}const ee=function(){const u="0123456789abcdef",a=new Array(256);for(let s=0;s<16;++s){const h=s*16;for(let x=0;x<16;++x)a[h+x]=u[s]+u[x]}return a}();function X(u){return typeof BigInt>"u"?oe:u}function oe(){throw new Error("BigInt not supported")}})(Ip);const To=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,r)=>r(e,0),tn=Je.WebSocket||Je.MozWebSocket,gc=!0,Fp="arraybuffer",mc=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class jp extends Oo{constructor(e){super(e),this.supportsBinary=!e.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const e=this.uri(),r=this.opts.protocols,n=mc?{}:ac(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=gc&&!mc?r?new tn(e,r):new tn(e):new tn(e,r,n)}catch(o){return this.emitReserved("error",o)}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 r=0;r<e.length;r++){const n=e[r],o=r===e.length-1;Eo(n,this.supportsBinary,i=>{const c={};try{gc&&this.ws.send(i)}catch{}o&&To(()=>{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",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=fc()),this.supportsBinary||(r.b64=1),this.createUri(e,r)}check(){return!!tn}}class Dp extends Oo{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 r=pp(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=e.readable.pipeThrough(r).getReader(),o=dp();o.readable.pipeTo(e.writable),this.writer=o.writable.getWriter();const i=()=>{n.read().then(({done:l,value:d})=>{l||(this.onPacket(d),i())}).catch(l=>{})};i();const c={type:"open"};this.query.sid&&(c.data=`{"sid":"${this.query.sid}"}`),this.writer.write(c).then(()=>this.onOpen())})}))}write(e){this.writable=!1;for(let r=0;r<e.length;r++){const n=e[r],o=r===e.length-1;this.writer.write(n).then(()=>{o&&To(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this.transport)===null||e===void 0||e.close()}}const Lp={websocket:jp,webtransport:Dp,polling:Op},Up=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,zp=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Ro(t){if(t.length>2e3)throw"URI too long";const e=t,r=t.indexOf("["),n=t.indexOf("]");r!=-1&&n!=-1&&(t=t.substring(0,r)+t.substring(r,n).replace(/:/g,";")+t.substring(n,t.length));let o=Up.exec(t||""),i={},c=14;for(;c--;)i[zp[c]]=o[c]||"";return r!=-1&&n!=-1&&(i.source=e,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=qp(i,i.path),i.queryKey=Wp(i,i.query),i}function qp(t,e){const r=/\/{2,9}/g,n=e.replace(r,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&n.splice(0,1),e.slice(-1)=="/"&&n.splice(n.length-1,1),n}function Wp(t,e){const r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,o,i){o&&(r[o]=i)}),r}let _c=class Jt extends Me{constructor(e,r={}){super(),this.binaryType=Fp,this.writeBuffer=[],e&&typeof e=="object"&&(r=e,e=null),e?(e=Ro(e),r.hostname=e.host,r.secure=e.protocol==="https"||e.protocol==="wss",r.port=e.port,e.query&&(r.query=e.query)):r.host&&(r.hostname=Ro(r.host).host),Zr(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=r.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},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=wp(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 r=Object.assign({},this.opts.query);r.EIO=ic,r.transport=e,this.id&&(r.sid=this.id);const n=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new Lp[e](n)}open(){let e;if(this.opts.rememberUpgrade&&Jt.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",r=>this.onClose("transport close",r))}probe(e){let r=this.createTransport(e),n=!1;Jt.priorWebsocketSuccess=!1;const o=()=>{n||(r.send([{type:"ping",data:"probe"}]),r.once("packet",y=>{if(!n)if(y.type==="pong"&&y.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;Jt.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{n||this.readyState!=="closed"&&(f(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{const v=new Error("probe error");v.transport=r.name,this.emitReserved("upgradeError",v)}}))};function i(){n||(n=!0,f(),r.close(),r=null)}const c=y=>{const v=new Error("probe error: "+y);v.transport=r.name,i(),this.emitReserved("upgradeError",v)};function l(){c("transport closed")}function d(){c("socket closed")}function p(y){r&&y.name!==r.name&&i()}const f=()=>{r.removeListener("open",o),r.removeListener("error",c),r.removeListener("close",l),this.off("close",d),this.off("upgrading",p)};r.once("open",o),r.once("error",c),r.once("close",l),this.once("close",d),this.once("upgrading",p),this.upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{n||r.open()},200):r.open()}onOpen(){if(this.readyState="open",Jt.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let e=0;const r=this.upgrades.length;for(;e<r;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 r=new Error("server error");r.code=e.data,this.onError(r);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 r=1;for(let n=0;n<this.writeBuffer.length;n++){const o=this.writeBuffer[n].data;if(o&&(r+=_p(o)),n>0&&r>this.maxPayload)return this.writeBuffer.slice(0,n);r+=2}return this.writeBuffer}write(e,r,n){return this.sendPacket("message",e,r,n),this}send(e,r,n){return this.sendPacket("message",e,r,n),this}sendPacket(e,r,n,o){if(typeof r=="function"&&(o=r,r=void 0),typeof n=="function"&&(o=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;const i={type:e,data:r,options:n};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),o&&this.once("flush",o),this.flush()}close(){const e=()=>{this.onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),e()},n=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():e()}):this.upgrading?n():e()),this}onError(e){Jt.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}onClose(e,r){(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,r),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(e){const r=[];let n=0;const o=e.length;for(;n<o;n++)~this.transports.indexOf(e[n])&&r.push(e[n]);return r}};_c.protocol=ic;function Vp(t,e="",r){let n=t;r=r||typeof location<"u"&&location,t==null&&(t=r.protocol+"//"+r.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=r.protocol+t:t=r.host+t),/^(https?|wss?):\/\//.test(t)||(typeof r<"u"?t=r.protocol+"//"+t:t="https://"+t),n=Ro(t)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const i=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+i+":"+n.port+e,n.href=n.protocol+"://"+i+(r&&r.port===n.port?"":":"+n.port),n}const Hp=typeof ArrayBuffer=="function",Gp=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,vc=Object.prototype.toString,Yp=typeof Blob=="function"||typeof Blob<"u"&&vc.call(Blob)==="[object BlobConstructor]",Jp=typeof File=="function"||typeof File<"u"&&vc.call(File)==="[object FileConstructor]";function Co(t){return Hp&&(t instanceof ArrayBuffer||Gp(t))||Yp&&t instanceof Blob||Jp&&t instanceof File}function rn(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let r=0,n=t.length;r<n;r++)if(rn(t[r]))return!0;return!1}if(Co(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return rn(t.toJSON(),!0);for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&rn(t[r]))return!0;return!1}function Kp(t){const e=[],r=t.data,n=t;return n.data=Bo(r,e),n.attachments=e.length,{packet:n,buffers:e}}function Bo(t,e){if(!t)return t;if(Co(t)){const r={_placeholder:!0,num:e.length};return e.push(t),r}else if(Array.isArray(t)){const r=new Array(t.length);for(let n=0;n<t.length;n++)r[n]=Bo(t[n],e);return r}else if(typeof t=="object"&&!(t instanceof Date)){const r={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=Bo(t[n],e));return r}return t}function Xp(t,e){return t.data=Mo(t.data,e),delete t.attachments,t}function Mo(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 r=0;r<t.length;r++)t[r]=Mo(t[r],e);else if(typeof t=="object")for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=Mo(t[r],e));return t}const Zp=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Qp=5;var fe;(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"})(fe||(fe={}));class eh{constructor(e){this.replacer=e}encode(e){return(e.type===fe.EVENT||e.type===fe.ACK)&&rn(e)?this.encodeAsBinary({type:e.type===fe.EVENT?fe.BINARY_EVENT:fe.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let r=""+e.type;return(e.type===fe.BINARY_EVENT||e.type===fe.BINARY_ACK)&&(r+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(r+=e.nsp+","),e.id!=null&&(r+=e.id),e.data!=null&&(r+=JSON.stringify(e.data,this.replacer)),r}encodeAsBinary(e){const r=Kp(e),n=this.encodeAsString(r.packet),o=r.buffers;return o.unshift(n),o}}function bc(t){return Object.prototype.toString.call(t)==="[object Object]"}class $o extends Me{constructor(e){super(),this.reviver=e}add(e){let r;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(e);const n=r.type===fe.BINARY_EVENT;n||r.type===fe.BINARY_ACK?(r.type=n?fe.EVENT:fe.ACK,this.reconstructor=new th(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(Co(e)||e.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(e),r&&(this.reconstructor=null,super.emitReserved("decoded",r));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let r=0;const n={type:Number(e.charAt(0))};if(fe[n.type]===void 0)throw new Error("unknown packet type "+n.type);if(n.type===fe.BINARY_EVENT||n.type===fe.BINARY_ACK){const i=r+1;for(;e.charAt(++r)!=="-"&&r!=e.length;);const c=e.substring(i,r);if(c!=Number(c)||e.charAt(r)!=="-")throw new Error("Illegal attachments");n.attachments=Number(c)}if(e.charAt(r+1)==="/"){const i=r+1;for(;++r&&!(e.charAt(r)===","||r===e.length););n.nsp=e.substring(i,r)}else n.nsp="/";const o=e.charAt(r+1);if(o!==""&&Number(o)==o){const i=r+1;for(;++r;){const c=e.charAt(r);if(c==null||Number(c)!=c){--r;break}if(r===e.length)break}n.id=Number(e.substring(i,r+1))}if(e.charAt(++r)){const i=this.tryParse(e.substr(r));if($o.isPayloadValid(n.type,i))n.data=i;else throw new Error("invalid payload")}return n}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,r){switch(e){case fe.CONNECT:return bc(r);case fe.DISCONNECT:return r===void 0;case fe.CONNECT_ERROR:return typeof r=="string"||bc(r);case fe.EVENT:case fe.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&Zp.indexOf(r[0])===-1);case fe.ACK:case fe.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class th{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const r=Xp(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const rh=Object.freeze(Object.defineProperty({__proto__:null,Decoder:$o,Encoder:eh,get PacketType(){return fe},protocol:Qp},Symbol.toStringTag,{value:"Module"}));function tt(t,e,r){return t.on(e,r),function(){t.off(e,r)}}const nh=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class wc extends Me{constructor(e,r,n){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=r,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[tt(e,"open",this.onopen.bind(this)),tt(e,"packet",this.onpacket.bind(this)),tt(e,"error",this.onerror.bind(this)),tt(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,...r){if(nh.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(r.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(r),this;const n={type:fe.EVENT,data:r};if(n.options={},n.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){const c=this.ids++,l=r.pop();this._registerAckCallback(c,l),n.id=c}const o=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!o||!this.connected)||(this.connected?(this.notifyOutgoingListeners(n),this.packet(n)):this.sendBuffer.push(n)),this.flags={},this}_registerAckCallback(e,r){var n;const o=(n=this.flags.timeout)!==null&&n!==void 0?n:this._opts.ackTimeout;if(o===void 0){this.acks[e]=r;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let l=0;l<this.sendBuffer.length;l++)this.sendBuffer[l].id===e&&this.sendBuffer.splice(l,1);r.call(this,new Error("operation has timed out"))},o),c=(...l)=>{this.io.clearTimeoutFn(i),r.apply(this,l)};c.withError=!0,this.acks[e]=c}emitWithAck(e,...r){return new Promise((n,o)=>{const i=(c,l)=>c?o(c):n(l);i.withError=!0,r.push(i),this.emit(e,...r)})}_addToQueue(e){let r;typeof e[e.length-1]=="function"&&(r=e.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((o,...i)=>n!==this._queue[0]?void 0:(o!==null?n.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(o)):(this._queue.shift(),r&&r(null,...i)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const r=this._queue[0];r.pending&&!e||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.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:fe.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,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(n=>String(n.id)===e)){const n=this.acks[e];delete this.acks[e],n.withError&&n.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case fe.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 fe.EVENT:case fe.BINARY_EVENT:this.onevent(e);break;case fe.ACK:case fe.BINARY_ACK:this.onack(e);break;case fe.DISCONNECT:this.ondisconnect();break;case fe.CONNECT_ERROR:this.destroy();const n=new Error(e.data.message);n.data=e.data.data,this.emitReserved("connect_error",n);break}}onevent(e){const r=e.data||[];e.id!=null&&r.push(this.ack(e.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const r=this._anyListeners.slice();for(const n of r)n.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 r=this;let n=!1;return function(...o){n||(n=!0,r.packet({type:fe.ACK,id:e,data:o}))}}onack(e){const r=this.acks[e.id];typeof r=="function"&&(delete this.acks[e.id],r.withError&&e.data.unshift(null),r.apply(this,e.data))}onconnect(e,r){this.id=e,this.recovered=r&&this._pid===r,this._pid=r,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:fe.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 r=this._anyListeners;for(let n=0;n<r.length;n++)if(e===r[n])return r.splice(n,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 r=this._anyOutgoingListeners;for(let n=0;n<r.length;n++)if(e===r[n])return r.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const r=this._anyOutgoingListeners.slice();for(const n of r)n.apply(this,e.data)}}}function Ut(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}Ut.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),r=Math.floor(e*this.jitter*t);t=Math.floor(e*10)&1?t+r:t-r}return Math.min(t,this.max)|0},Ut.prototype.reset=function(){this.attempts=0},Ut.prototype.setMin=function(t){this.ms=t},Ut.prototype.setMax=function(t){this.max=t},Ut.prototype.setJitter=function(t){this.jitter=t};class Fo extends Me{constructor(e,r){var n;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(r=e,e=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,Zr(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((n=r.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new Ut({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=e;const o=r.parser||rh;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=r.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 r;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(r=this.backoff)===null||r===void 0||r.setMin(e),this)}randomizationFactor(e){var r;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(r=this.backoff)===null||r===void 0||r.setJitter(e),this)}reconnectionDelayMax(e){var r;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(r=this.backoff)===null||r===void 0||r.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 _c(this.uri,this.opts);const r=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const o=tt(r,"open",function(){n.onopen(),e&&e()}),i=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),e?e(l):this.maybeReconnectOnOpen()},c=tt(r,"error",i);if(this._timeout!==!1){const l=this._timeout,d=this.setTimeoutFn(()=>{o(),i(new Error("timeout")),r.close()},l);this.opts.autoUnref&&d.unref(),this.subs.push(()=>{this.clearTimeoutFn(d)})}return this.subs.push(o),this.subs.push(c),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(tt(e,"ping",this.onping.bind(this)),tt(e,"data",this.ondata.bind(this)),tt(e,"error",this.onerror.bind(this)),tt(e,"close",this.onclose.bind(this)),tt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(r){this.onclose("parse error",r)}}ondecoded(e){To(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,r){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new wc(this,e,r),this.nsps[e]=n),n}_destroy(e){const r=Object.keys(this.nsps);for(const n of r)if(this.nsps[n].active)return;this._close()}_packet(e){const r=this.encoder.encode(e);for(let n=0;n<r.length;n++)this.engine.write(r[n],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,r){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,r),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 r=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(o=>{o?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",o)):e.onreconnect()}))},r);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const gr={};function nn(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const r=Vp(t,e.path||"/socket.io"),n=r.source,o=r.id,i=r.path,c=gr[o]&&i in gr[o].nsps,l=e.forceNew||e["force new connection"]||e.multiplex===!1||c;let d;return l?d=new Fo(n,e):(gr[o]||(gr[o]=new Fo(n,e)),d=gr[o]),r.query&&!e.query&&(e.query=r.queryKey),d.socket(r.path,e)}Object.assign(nn,{Manager:Fo,Socket:wc,io:nn,connect:nn});function oh(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var xc={exports:{}},Te=xc.exports={},it,at;function jo(){throw new Error("setTimeout has not been defined")}function Do(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?it=setTimeout:it=jo}catch{it=jo}try{typeof clearTimeout=="function"?at=clearTimeout:at=Do}catch{at=Do}})();function Ec(t){if(it===setTimeout)return setTimeout(t,0);if((it===jo||!it)&&setTimeout)return it=setTimeout,setTimeout(t,0);try{return it(t,0)}catch{try{return it.call(null,t,0)}catch{return it.call(this,t,0)}}}function ih(t){if(at===clearTimeout)return clearTimeout(t);if((at===Do||!at)&&clearTimeout)return at=clearTimeout,clearTimeout(t);try{return at(t)}catch{try{return at.call(null,t)}catch{return at.call(this,t)}}}var ht=[],zt=!1,It,on=-1;function ah(){!zt||!It||(zt=!1,It.length?ht=It.concat(ht):on=-1,ht.length&&Sc())}function Sc(){if(!zt){var t=Ec(ah);zt=!0;for(var e=ht.length;e;){for(It=ht,ht=[];++on<e;)It&&It[on].run();on=-1,e=ht.length}It=null,zt=!1,ih(t)}}Te.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];ht.push(new Ac(t,e)),ht.length===1&&!zt&&Ec(Sc)};function Ac(t,e){this.fun=t,this.array=e}Ac.prototype.run=function(){this.fun.apply(null,this.array)},Te.title="browser",Te.browser=!0,Te.env={},Te.argv=[],Te.version="",Te.versions={};function yt(){}Te.on=yt,Te.addListener=yt,Te.once=yt,Te.off=yt,Te.removeListener=yt,Te.removeAllListeners=yt,Te.emit=yt,Te.prependListener=yt,Te.prependOnceListener=yt,Te.listeners=function(t){return[]},Te.binding=function(t){throw new Error("process.binding is not supported")},Te.cwd=function(){return"/"},Te.chdir=function(t){throw new Error("process.chdir is not supported")},Te.umask=function(){return 0};var sh=xc.exports;const $e=oh(sh);var Pt={},kc={},Lo=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;e[r]=o;for(var i 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 c=Object.getOwnPropertySymbols(e);if(c.length!==1||c[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(e,r);if(l.value!==o||l.enumerable!==!0)return!1}return!0},ch=Lo,Uo=function(){return ch()&&!!Symbol.toStringTag},Oc=Object,lh=Error,uh=EvalError,fh=RangeError,dh=ReferenceError,Ic=SyntaxError,an=TypeError,ph=URIError,hh=Math.abs,yh=Math.floor,gh=Math.max,mh=Math.min,_h=Math.pow,vh=Object.getOwnPropertyDescriptor,sn=vh;if(sn)try{sn([],"length")}catch{sn=null}var mr=sn,cn=Object.defineProperty||!1;if(cn)try{cn({},"a",{value:1})}catch{cn=!1}var ln=cn,zo,Pc;function bh(){if(Pc)return zo;Pc=1;var t=typeof Symbol<"u"&&Symbol,e=Lo;return zo=function(){return typeof t!="function"||typeof Symbol!="function"||typeof t("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},zo}var qo,Nc;function wh(){if(Nc)return qo;Nc=1;var t="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,r=Math.max,n="[object Function]",o=function(d,p){for(var f=[],y=0;y<d.length;y+=1)f[y]=d[y];for(var v=0;v<p.length;v+=1)f[v+d.length]=p[v];return f},i=function(d,p){for(var f=[],y=p,v=0;y<d.length;y+=1,v+=1)f[v]=d[y];return f},c=function(l,d){for(var p="",f=0;f<l.length;f+=1)p+=l[f],f+1<l.length&&(p+=d);return p};return qo=function(d){var p=this;if(typeof p!="function"||e.apply(p)!==n)throw new TypeError(t+p);for(var f=i(arguments,1),y,v=function(){if(this instanceof y){var P=p.apply(this,o(f,arguments));return Object(P)===P?P:this}return p.apply(d,o(f,arguments))},w=r(0,p.length-f.length),N=[],A=0;A<w;A++)N[A]="$"+A;if(y=Function("binder","return function ("+c(N,",")+"){ return binder.apply(this,arguments); }")(v),p.prototype){var C=function(){};C.prototype=p.prototype,y.prototype=new C,C.prototype=null}return y},qo}var Wo,Tc;function _r(){if(Tc)return Wo;Tc=1;var t=wh();return Wo=Function.prototype.bind||t,Wo}var Vo,Rc;function Ho(){return Rc||(Rc=1,Vo=Function.prototype.call),Vo}var Go,Cc;function Yo(){return Cc||(Cc=1,Go=Function.prototype.apply),Go}var xh=typeof Reflect<"u"&&Reflect&&Reflect.apply,Eh=_r(),Sh=Yo(),Ah=Ho(),kh=xh,Bc=kh||Eh.call(Ah,Sh),Oh=_r(),Ih=an,Ph=Ho(),Nh=Bc,Jo=function(e){if(e.length<1||typeof e[0]!="function")throw new Ih("a function is required");return Nh(Oh,Ph,e)},Ko,Mc;function Th(){if(Mc)return Ko;Mc=1;var t=Jo,e=mr,r;try{r=[].__proto__===Array.prototype}catch(c){if(!c||typeof c!="object"||!("code"in c)||c.code!=="ERR_PROTO_ACCESS")throw c}var n=!!r&&e&&e(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return Ko=n&&typeof n.get=="function"?t([n.get]):typeof i=="function"?function(l){return i(l==null?l:o(l))}:!1,Ko}var Xo,$c;function Rh(){if($c)return Xo;$c=1;var t=Function.prototype.call,e=Object.prototype.hasOwnProperty,r=_r();return Xo=r.call(t,e),Xo}var ue,Fc=Oc,Ch=lh,Bh=uh,Mh=fh,$h=dh,qt=Ic,Wt=an,Fh=ph,jh=hh,Dh=yh,Lh=gh,Uh=mh,zh=_h,jc=Function,Zo=function(t){try{return jc('"use strict"; return ('+t+").constructor;")()}catch{}},vr=mr,qh=ln,Qo=function(){throw new Wt},Wh=vr?function(){try{return arguments.callee,Qo}catch{try{return vr(arguments,"callee").get}catch{return Qo}}}():Qo,Vt=bh()(),Vh=Th(),Le=typeof Reflect=="function"&&Reflect.getPrototypeOf||Fc.getPrototypeOf||Vh,Dc=Yo(),br=Ho(),Ht={},Hh=typeof Uint8Array>"u"||!Le?ue:Le(Uint8Array),Nt={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?ue:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?ue:ArrayBuffer,"%ArrayIteratorPrototype%":Vt&&Le?Le([][Symbol.iterator]()):ue,"%AsyncFromSyncIteratorPrototype%":ue,"%AsyncFunction%":Ht,"%AsyncGenerator%":Ht,"%AsyncGeneratorFunction%":Ht,"%AsyncIteratorPrototype%":Ht,"%Atomics%":typeof Atomics>"u"?ue:Atomics,"%BigInt%":typeof BigInt>"u"?ue:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?ue:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?ue:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?ue:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Ch,"%eval%":eval,"%EvalError%":Bh,"%Float32Array%":typeof Float32Array>"u"?ue:Float32Array,"%Float64Array%":typeof Float64Array>"u"?ue:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?ue:FinalizationRegistry,"%Function%":jc,"%GeneratorFunction%":Ht,"%Int8Array%":typeof Int8Array>"u"?ue:Int8Array,"%Int16Array%":typeof Int16Array>"u"?ue:Int16Array,"%Int32Array%":typeof Int32Array>"u"?ue:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Vt&&Le?Le(Le([][Symbol.iterator]())):ue,"%JSON%":typeof JSON=="object"?JSON:ue,"%Map%":typeof Map>"u"?ue:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Vt||!Le?ue:Le(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Fc,"%Object.getOwnPropertyDescriptor%":vr,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?ue:Promise,"%Proxy%":typeof Proxy>"u"?ue:Proxy,"%RangeError%":Mh,"%ReferenceError%":$h,"%Reflect%":typeof Reflect>"u"?ue:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?ue:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Vt||!Le?ue:Le(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?ue:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Vt&&Le?Le(""[Symbol.iterator]()):ue,"%Symbol%":Vt?Symbol:ue,"%SyntaxError%":qt,"%ThrowTypeError%":Wh,"%TypedArray%":Hh,"%TypeError%":Wt,"%Uint8Array%":typeof Uint8Array>"u"?ue:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?ue:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?ue:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?ue:Uint32Array,"%URIError%":Fh,"%WeakMap%":typeof WeakMap>"u"?ue:WeakMap,"%WeakRef%":typeof WeakRef>"u"?ue:WeakRef,"%WeakSet%":typeof WeakSet>"u"?ue:WeakSet,"%Function.prototype.call%":br,"%Function.prototype.apply%":Dc,"%Object.defineProperty%":qh,"%Math.abs%":jh,"%Math.floor%":Dh,"%Math.max%":Lh,"%Math.min%":Uh,"%Math.pow%":zh};if(Le)try{null.error}catch(t){var Gh=Le(Le(t));Nt["%Error.prototype%"]=Gh}var Yh=function t(e){var r;if(e==="%AsyncFunction%")r=Zo("async function () {}");else if(e==="%GeneratorFunction%")r=Zo("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=Zo("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=t("%AsyncGenerator%");o&&Le&&(r=Le(o.prototype))}return Nt[e]=r,r},Lc={__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"]},wr=_r(),un=Rh(),Jh=wr.call(br,Array.prototype.concat),Kh=wr.call(Dc,Array.prototype.splice),Uc=wr.call(br,String.prototype.replace),fn=wr.call(br,String.prototype.slice),Xh=wr.call(br,RegExp.prototype.exec),Zh=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Qh=/\\(\\)?/g,ey=function(e){var r=fn(e,0,1),n=fn(e,-1);if(r==="%"&&n!=="%")throw new qt("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new qt("invalid intrinsic syntax, expected opening `%`");var o=[];return Uc(e,Zh,function(i,c,l,d){o[o.length]=l?Uc(d,Qh,"$1"):c||i}),o},ty=function(e,r){var n=e,o;if(un(Lc,n)&&(o=Lc[n],n="%"+o[0]+"%"),un(Nt,n)){var i=Nt[n];if(i===Ht&&(i=Yh(n)),typeof i>"u"&&!r)throw new Wt("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:i}}throw new qt("intrinsic "+e+" does not exist!")},ei=function(e,r){if(typeof e!="string"||e.length===0)throw new Wt("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Wt('"allowMissing" argument must be a boolean');if(Xh(/^%?[^%]*%?$/,e)===null)throw new qt("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=ey(e),o=n.length>0?n[0]:"",i=ty("%"+o+"%",r),c=i.name,l=i.value,d=!1,p=i.alias;p&&(o=p[0],Kh(n,Jh([0,1],p)));for(var f=1,y=!0;f<n.length;f+=1){var v=n[f],w=fn(v,0,1),N=fn(v,-1);if((w==='"'||w==="'"||w==="`"||N==='"'||N==="'"||N==="`")&&w!==N)throw new qt("property names with quotes must have matching quotes");if((v==="constructor"||!y)&&(d=!0),o+="."+v,c="%"+o+"%",un(Nt,c))l=Nt[c];else if(l!=null){if(!(v in l)){if(!r)throw new Wt("base intrinsic for "+e+" exists, but the property is not available.");return}if(vr&&f+1>=n.length){var A=vr(l,v);y=!!A,y&&"get"in A&&!("originalValue"in A.get)?l=A.get:l=l[v]}else y=un(l,v),l=l[v];y&&!d&&(Nt[c]=l)}}return l},zc=ei,qc=Jo,ry=qc([zc("%String.prototype.indexOf%")]),ti=function(e,r){var n=zc(e,!!r);return typeof n=="function"&&ry(e,".prototype.")>-1?qc([n]):n},ny=Uo(),oy=ti,ri=oy("Object.prototype.toString"),dn=function(e){return ny&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:ri(e)==="[object Arguments]"},Wc=function(e){return dn(e)?!0:e!==null&&typeof e=="object"&&"length"in e&&typeof e.length=="number"&&e.length>=0&&ri(e)!=="[object Array]"&&"callee"in e&&ri(e.callee)==="[object Function]"},iy=function(){return dn(arguments)}();dn.isLegacyArguments=Wc;var ay=iy?dn:Wc,sy=Object.prototype.toString,cy=Function.prototype.toString,ly=/^\s*(?:function)?\*/,Vc=Uo(),ni=Object.getPrototypeOf,uy=function(){if(!Vc)return!1;try{return Function("return function*() {}")()}catch{}},oi,fy=function(e){if(typeof e!="function")return!1;if(ly.test(cy.call(e)))return!0;if(!Vc){var r=sy.call(e);return r==="[object GeneratorFunction]"}if(!ni)return!1;if(typeof oi>"u"){var n=uy();oi=n?ni(n):!1}return ni(e)===oi},Hc=Function.prototype.toString,Gt=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,ii,pn;if(typeof Gt=="function"&&typeof Object.defineProperty=="function")try{ii=Object.defineProperty({},"length",{get:function(){throw pn}}),pn={},Gt(function(){throw 42},null,ii)}catch(t){t!==pn&&(Gt=null)}else Gt=null;var dy=/^\s*class\b/,ai=function(e){try{var r=Hc.call(e);return dy.test(r)}catch{return!1}},si=function(e){try{return ai(e)?!1:(Hc.call(e),!0)}catch{return!1}},hn=Object.prototype.toString,py="[object Object]",hy="[object Function]",yy="[object GeneratorFunction]",gy="[object HTMLAllCollection]",my="[object HTML document.all class]",_y="[object HTMLCollection]",vy=typeof Symbol=="function"&&!!Symbol.toStringTag,by=!(0 in[,]),ci=function(){return!1};if(typeof document=="object"){var wy=document.all;hn.call(wy)===hn.call(document.all)&&(ci=function(e){if((by||!e)&&(typeof e>"u"||typeof e=="object"))try{var r=hn.call(e);return(r===gy||r===my||r===_y||r===py)&&e("")==null}catch{}return!1})}var xy=Gt?function(e){if(ci(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{Gt(e,null,ii)}catch(r){if(r!==pn)return!1}return!ai(e)&&si(e)}:function(e){if(ci(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(vy)return si(e);if(ai(e))return!1;var r=hn.call(e);return r!==hy&&r!==yy&&!/^\[object HTML/.test(r)?!1:si(e)},Ey=xy,Sy=Object.prototype.toString,Gc=Object.prototype.hasOwnProperty,Ay=function(e,r,n){for(var o=0,i=e.length;o<i;o++)Gc.call(e,o)&&(n==null?r(e[o],o,e):r.call(n,e[o],o,e))},ky=function(e,r,n){for(var o=0,i=e.length;o<i;o++)n==null?r(e.charAt(o),o,e):r.call(n,e.charAt(o),o,e)},Oy=function(e,r,n){for(var o in e)Gc.call(e,o)&&(n==null?r(e[o],o,e):r.call(n,e[o],o,e))},Iy=function(e,r,n){if(!Ey(r))throw new TypeError("iterator must be a function");var o;arguments.length>=3&&(o=n),Sy.call(e)==="[object Array]"?Ay(e,r,o):typeof e=="string"?ky(e,r,o):Oy(e,r,o)},Py=Iy,Ny=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"],li=Ny,Ty=typeof globalThis>"u"?ir:globalThis,Ry=function(){for(var e=[],r=0;r<li.length;r++)typeof Ty[li[r]]=="function"&&(e[e.length]=li[r]);return e},Yc={exports:{}},Jc=ln,Cy=Ic,Yt=an,Kc=mr,Xc=function(e,r,n){if(!e||typeof e!="object"&&typeof e!="function")throw new Yt("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new Yt("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Yt("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Yt("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Yt("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Yt("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,l=arguments.length>6?arguments[6]:!1,d=!!Kc&&Kc(e,r);if(Jc)Jc(e,r,{configurable:c===null&&d?d.configurable:!c,enumerable:o===null&&d?d.enumerable:!o,value:n,writable:i===null&&d?d.writable:!i});else if(l||!o&&!i&&!c)e[r]=n;else throw new Cy("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},ui=ln,Zc=function(){return!!ui};Zc.hasArrayLengthDefineBug=function(){if(!ui)return null;try{return ui([],"length",{value:1}).length!==1}catch{return!0}};var Qc=Zc,By=ei,el=Xc,My=Qc(),tl=mr,rl=an,$y=By("%Math.floor%"),Fy=function(e,r){if(typeof e!="function")throw new rl("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||$y(r)!==r)throw new rl("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],o=!0,i=!0;if("length"in e&&tl){var c=tl(e,"length");c&&!c.configurable&&(o=!1),c&&!c.writable&&(i=!1)}return(o||i||!n)&&(My?el(e,"length",r,!0,!0):el(e,"length",r)),e},jy=_r(),Dy=Yo(),Ly=Bc,Uy=function(){return Ly(jy,Dy,arguments)};(function(t){var e=Fy,r=ln,n=Jo,o=Uy;t.exports=function(c){var l=n(arguments),d=c.length-(arguments.length-1);return e(l,1+(d>0?d:0),!0)},r?r(t.exports,"apply",{value:o}):t.exports.apply=o})(Yc);var yn=Yc.exports,gn=Py,zy=Ry,nl=yn,fi=ti,mn=mr,qy=fi("Object.prototype.toString"),ol=Uo(),il=typeof globalThis>"u"?ir:globalThis,di=zy(),pi=fi("String.prototype.slice"),hi=Object.getPrototypeOf,Wy=fi("Array.prototype.indexOf",!0)||function(e,r){for(var n=0;n<e.length;n+=1)if(e[n]===r)return n;return-1},_n={__proto__:null};ol&&mn&&hi?gn(di,function(t){var e=new il[t];if(Symbol.toStringTag in e){var r=hi(e),n=mn(r,Symbol.toStringTag);if(!n){var o=hi(r);n=mn(o,Symbol.toStringTag)}_n["$"+t]=nl(n.get)}}):gn(di,function(t){var e=new il[t],r=e.slice||e.set;r&&(_n["$"+t]=nl(r))});var Vy=function(e){var r=!1;return gn(_n,function(n,o){if(!r)try{"$"+n(e)===o&&(r=pi(o,1))}catch{}}),r},Hy=function(e){var r=!1;return gn(_n,function(n,o){if(!r)try{n(e),r=pi(o,1)}catch{}}),r},al=function(e){if(!e||typeof e!="object")return!1;if(!ol){var r=pi(qy(e),8,-1);return Wy(di,r)>-1?r:r!=="Object"?!1:Hy(e)}return mn?Vy(e):null},Gy=al,Yy=function(e){return!!Gy(e)};(function(t){var e=ay,r=fy,n=al,o=Yy;function i(j){return j.call.bind(j)}var c=typeof BigInt<"u",l=typeof Symbol<"u",d=i(Object.prototype.toString),p=i(Number.prototype.valueOf),f=i(String.prototype.valueOf),y=i(Boolean.prototype.valueOf);if(c)var v=i(BigInt.prototype.valueOf);if(l)var w=i(Symbol.prototype.valueOf);function N(j,Xe){if(typeof j!="object")return!1;try{return Xe(j),!0}catch{return!1}}t.isArgumentsObject=e,t.isGeneratorFunction=r,t.isTypedArray=o;function A(j){return typeof Promise<"u"&&j instanceof Promise||j!==null&&typeof j=="object"&&typeof j.then=="function"&&typeof j.catch=="function"}t.isPromise=A;function C(j){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(j):o(j)||O(j)}t.isArrayBufferView=C;function P(j){return n(j)==="Uint8Array"}t.isUint8Array=P;function _(j){return n(j)==="Uint8ClampedArray"}t.isUint8ClampedArray=_;function T(j){return n(j)==="Uint16Array"}t.isUint16Array=T;function $(j){return n(j)==="Uint32Array"}t.isUint32Array=$;function B(j){return n(j)==="Int8Array"}t.isInt8Array=B;function q(j){return n(j)==="Int16Array"}t.isInt16Array=q;function W(j){return n(j)==="Int32Array"}t.isInt32Array=W;function Z(j){return n(j)==="Float32Array"}t.isFloat32Array=Z;function U(j){return n(j)==="Float64Array"}t.isFloat64Array=U;function K(j){return n(j)==="BigInt64Array"}t.isBigInt64Array=K;function Q(j){return n(j)==="BigUint64Array"}t.isBigUint64Array=Q;function re(j){return d(j)==="[object Map]"}re.working=typeof Map<"u"&&re(new Map);function se(j){return typeof Map>"u"?!1:re.working?re(j):j instanceof Map}t.isMap=se;function Ae(j){return d(j)==="[object Set]"}Ae.working=typeof Set<"u"&&Ae(new Set);function de(j){return typeof Set>"u"?!1:Ae.working?Ae(j):j instanceof Set}t.isSet=de;function Pe(j){return d(j)==="[object WeakMap]"}Pe.working=typeof WeakMap<"u"&&Pe(new WeakMap);function Se(j){return typeof WeakMap>"u"?!1:Pe.working?Pe(j):j instanceof WeakMap}t.isWeakMap=Se;function ke(j){return d(j)==="[object WeakSet]"}ke.working=typeof WeakSet<"u"&&ke(new WeakSet);function z(j){return ke(j)}t.isWeakSet=z;function V(j){return d(j)==="[object ArrayBuffer]"}V.working=typeof ArrayBuffer<"u"&&V(new ArrayBuffer);function H(j){return typeof ArrayBuffer>"u"?!1:V.working?V(j):j instanceof ArrayBuffer}t.isArrayBuffer=H;function m(j){return d(j)==="[object DataView]"}m.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&m(new DataView(new ArrayBuffer(1),0,1));function O(j){return typeof DataView>"u"?!1:m.working?m(j):j instanceof DataView}t.isDataView=O;var g=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function b(j){return d(j)==="[object SharedArrayBuffer]"}function S(j){return typeof g>"u"?!1:(typeof b.working>"u"&&(b.working=b(new g)),b.working?b(j):j instanceof g)}t.isSharedArrayBuffer=S;function D(j){return d(j)==="[object AsyncFunction]"}t.isAsyncFunction=D;function M(j){return d(j)==="[object Map Iterator]"}t.isMapIterator=M;function L(j){return d(j)==="[object Set Iterator]"}t.isSetIterator=L;function G(j){return d(j)==="[object Generator]"}t.isGeneratorObject=G;function ne(j){return d(j)==="[object WebAssembly.Module]"}t.isWebAssemblyCompiledModule=ne;function le(j){return N(j,p)}t.isNumberObject=le;function he(j){return N(j,f)}t.isStringObject=he;function Ee(j){return N(j,y)}t.isBooleanObject=Ee;function Re(j){return c&&N(j,v)}t.isBigIntObject=Re;function Ue(j){return l&&N(j,w)}t.isSymbolObject=Ue;function ze(j){return le(j)||he(j)||Ee(j)||Re(j)||Ue(j)}t.isBoxedPrimitive=ze;function Fe(j){return typeof Uint8Array<"u"&&(H(j)||S(j))}t.isAnyArrayBuffer=Fe,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(j){Object.defineProperty(t,j,{enumerable:!1,value:function(){throw new Error(j+" is not supported in userland")}})})})(kc);var Jy=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"},yi={exports:{}};typeof Object.create=="function"?yi.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:yi.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}};var Ky=yi.exports;(function(t){var e=Object.getOwnPropertyDescriptors||function(O){for(var g=Object.keys(O),b={},S=0;S<g.length;S++)b[g[S]]=Object.getOwnPropertyDescriptor(O,g[S]);return b},r=/%[sdj%]/g;t.format=function(m){if(!B(m)){for(var O=[],g=0;g<arguments.length;g++)O.push(c(arguments[g]));return O.join(" ")}for(var g=1,b=arguments,S=b.length,D=String(m).replace(r,function(L){if(L==="%%")return"%";if(g>=S)return L;switch(L){case"%s":return String(b[g++]);case"%d":return Number(b[g++]);case"%j":try{return JSON.stringify(b[g++])}catch{return"[Circular]"}default:return L}}),M=b[g];g<S;M=b[++g])_(M)||!U(M)?D+=" "+M:D+=" "+c(M);return D},t.deprecate=function(m,O){if(typeof $e<"u"&&$e.noDeprecation===!0)return m;if(typeof $e>"u")return function(){return t.deprecate(m,O).apply(this,arguments)};var g=!1;function b(){if(!g){if($e.throwDeprecation)throw new Error(O);$e.traceDeprecation?console.trace(O):console.error(O),g=!0}return m.apply(this,arguments)}return b};var n={},o=/^$/;if($e.env.NODE_DEBUG){var i=$e.env.NODE_DEBUG;i=i.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),o=new RegExp("^"+i+"$","i")}t.debuglog=function(m){if(m=m.toUpperCase(),!n[m])if(o.test(m)){var O=$e.pid;n[m]=function(){var g=t.format.apply(t,arguments);console.error("%s %d: %s",m,O,g)}}else n[m]=function(){};return n[m]};function c(m,O){var g={seen:[],stylize:d};return arguments.length>=3&&(g.depth=arguments[2]),arguments.length>=4&&(g.colors=arguments[3]),P(O)?g.showHidden=O:O&&t._extend(g,O),W(g.showHidden)&&(g.showHidden=!1),W(g.depth)&&(g.depth=2),W(g.colors)&&(g.colors=!1),W(g.customInspect)&&(g.customInspect=!0),g.colors&&(g.stylize=l),f(g,m,g.depth)}t.inspect=c,c.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]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function l(m,O){var g=c.styles[O];return g?"\x1B["+c.colors[g][0]+"m"+m+"\x1B["+c.colors[g][1]+"m":m}function d(m,O){return m}function p(m){var O={};return m.forEach(function(g,b){O[g]=!0}),O}function f(m,O,g){if(m.customInspect&&O&&re(O.inspect)&&O.inspect!==t.inspect&&!(O.constructor&&O.constructor.prototype===O)){var b=O.inspect(g,m);return B(b)||(b=f(m,b,g)),b}var S=y(m,O);if(S)return S;var D=Object.keys(O),M=p(D);if(m.showHidden&&(D=Object.getOwnPropertyNames(O)),Q(O)&&(D.indexOf("message")>=0||D.indexOf("description")>=0))return v(O);if(D.length===0){if(re(O)){var L=O.name?": "+O.name:"";return m.stylize("[Function"+L+"]","special")}if(Z(O))return m.stylize(RegExp.prototype.toString.call(O),"regexp");if(K(O))return m.stylize(Date.prototype.toString.call(O),"date");if(Q(O))return v(O)}var G="",ne=!1,le=["{","}"];if(C(O)&&(ne=!0,le=["[","]"]),re(O)){var he=O.name?": "+O.name:"";G=" [Function"+he+"]"}if(Z(O)&&(G=" "+RegExp.prototype.toString.call(O)),K(O)&&(G=" "+Date.prototype.toUTCString.call(O)),Q(O)&&(G=" "+v(O)),D.length===0&&(!ne||O.length==0))return le[0]+G+le[1];if(g<0)return Z(O)?m.stylize(RegExp.prototype.toString.call(O),"regexp"):m.stylize("[Object]","special");m.seen.push(O);var Ee;return ne?Ee=w(m,O,g,M,D):Ee=D.map(function(Re){return N(m,O,g,M,Re,ne)}),m.seen.pop(),A(Ee,G,le)}function y(m,O){if(W(O))return m.stylize("undefined","undefined");if(B(O)){var g="'"+JSON.stringify(O).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return m.stylize(g,"string")}if($(O))return m.stylize(""+O,"number");if(P(O))return m.stylize(""+O,"boolean");if(_(O))return m.stylize("null","null")}function v(m){return"["+Error.prototype.toString.call(m)+"]"}function w(m,O,g,b,S){for(var D=[],M=0,L=O.length;M<L;++M)ke(O,String(M))?D.push(N(m,O,g,b,String(M),!0)):D.push("");return S.forEach(function(G){G.match(/^\d+$/)||D.push(N(m,O,g,b,G,!0))}),D}function N(m,O,g,b,S,D){var M,L,G;if(G=Object.getOwnPropertyDescriptor(O,S)||{value:O[S]},G.get?G.set?L=m.stylize("[Getter/Setter]","special"):L=m.stylize("[Getter]","special"):G.set&&(L=m.stylize("[Setter]","special")),ke(b,S)||(M="["+S+"]"),L||(m.seen.indexOf(G.value)<0?(_(g)?L=f(m,G.value,null):L=f(m,G.value,g-1),L.indexOf(`
|
|
93
93
|
`)>-1&&(D?L=L.split(`
|
|
94
94
|
`).map(function(ne){return" "+ne}).join(`
|
|
95
95
|
`).slice(2):L=`
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
`))):L=m.stylize("[Circular]","special")),W(M)){if(D&&S.match(/^\d+$/))return L;M=JSON.stringify(""+S),M.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(M=M.slice(1,-1),M=m.stylize(M,"name")):(M=M.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),M=m.stylize(M,"string"))}return M+": "+L}function A(m,O,g){var b=m.reduce(function(S,D){return D.indexOf(`
|
|
99
99
|
`)>=0,S+D.replace(/\u001b\[\d\d?m/g,"").length+1},0);return b>60?g[0]+(O===""?"":O+`
|
|
100
100
|
`)+" "+m.join(`,
|
|
101
|
-
`)+" "+g[1]:g[0]+O+" "+m.join(", ")+" "+g[1]}t.types=Ac;function C(m){return Array.isArray(m)}t.isArray=C;function P(m){return typeof m=="boolean"}t.isBoolean=P;function _(m){return m===null}t.isNull=_;function T(m){return m==null}t.isNullOrUndefined=T;function $(m){return typeof m=="number"}t.isNumber=$;function B(m){return typeof m=="string"}t.isString=B;function q(m){return typeof m=="symbol"}t.isSymbol=q;function W(m){return m===void 0}t.isUndefined=W;function Z(m){return U(m)&&Ae(m)==="[object RegExp]"}t.isRegExp=Z,t.types.isRegExp=Z;function U(m){return typeof m=="object"&&m!==null}t.isObject=U;function K(m){return U(m)&&Ae(m)==="[object Date]"}t.isDate=K,t.types.isDate=K;function Q(m){return U(m)&&(Ae(m)==="[object Error]"||m instanceof Error)}t.isError=Q,t.types.isNativeError=Q;function re(m){return typeof m=="function"}t.isFunction=re;function se(m){return m===null||typeof m=="boolean"||typeof m=="number"||typeof m=="string"||typeof m=="symbol"||typeof m>"u"}t.isPrimitive=se,t.isBuffer=Gy;function Ae(m){return Object.prototype.toString.call(m)}function de(m){return m<10?"0"+m.toString(10):m.toString(10)}var Pe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Se(){var m=new Date,O=[de(m.getHours()),de(m.getMinutes()),de(m.getSeconds())].join(":");return[m.getDate(),Pe[m.getMonth()],O].join(" ")}t.log=function(){console.log("%s - %s",Se(),t.format.apply(t,arguments))},t.inherits=Yy,t._extend=function(m,O){if(!O||!U(O))return m;for(var g=Object.keys(O),b=g.length;b--;)m[g[b]]=O[g[b]];return m};function ke(m,O){return Object.prototype.hasOwnProperty.call(m,O)}var z=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;t.promisify=function(O){if(typeof O!="function")throw new TypeError('The "original" argument must be of type Function');if(z&&O[z]){var g=O[z];if(typeof g!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(g,z,{value:g,enumerable:!1,writable:!1,configurable:!0}),g}function g(){for(var b,S,D=new Promise(function(G,ne){b=G,S=ne}),M=[],L=0;L<arguments.length;L++)M.push(arguments[L]);M.push(function(G,ne){G?S(G):b(ne)});try{O.apply(this,M)}catch(G){S(G)}return D}return Object.setPrototypeOf(g,Object.getPrototypeOf(O)),z&&Object.defineProperty(g,z,{value:g,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(g,e(O))},t.promisify.custom=z;function V(m,O){if(!m){var g=new Error("Promise was rejected with a falsy value");g.reason=m,m=g}return O(m)}function H(m){if(typeof m!="function")throw new TypeError('The "original" argument must be of type Function');function O(){for(var g=[],b=0;b<arguments.length;b++)g.push(arguments[b]);var S=g.pop();if(typeof S!="function")throw new TypeError("The last argument must be of type Function");var D=this,M=function(){return S.apply(D,arguments)};m.apply(this,g).then(function(L){$e.nextTick(M.bind(null,null,L))},function(L){$e.nextTick(V.bind(null,L,M))})}return Object.setPrototypeOf(O,Object.getPrototypeOf(m)),Object.defineProperties(O,e(m)),O}t.callbackify=H})(Pt);var yi={exports:{}},gi={},al;function sl(){if(al)return gi;al=1;function t(_){"@babel/helpers - typeof";return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(T){return typeof T}:function(T){return T&&typeof Symbol=="function"&&T.constructor===Symbol&&T!==Symbol.prototype?"symbol":typeof T},t(_)}function e(_,T,$){return Object.defineProperty(_,"prototype",{writable:!1}),_}function r(_,T){if(!(_ instanceof T))throw new TypeError("Cannot call a class as a function")}function n(_,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function");_.prototype=Object.create(T&&T.prototype,{constructor:{value:_,writable:!0,configurable:!0}}),Object.defineProperty(_,"prototype",{writable:!1}),T&&o(_,T)}function o(_,T){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(B,q){return B.__proto__=q,B},o(_,T)}function i(_){var T=d();return function(){var B=p(_),q;if(T){var W=p(this).constructor;q=Reflect.construct(B,arguments,W)}else q=B.apply(this,arguments);return c(this,q)}}function c(_,T){if(T&&(t(T)==="object"||typeof T=="function"))return T;if(T!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return l(_)}function l(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}function d(){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 p(_){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function($){return $.__proto__||Object.getPrototypeOf($)},p(_)}var f={},y,v;function w(_,T,$){$||($=Error);function B(W,Z,U){return typeof T=="string"?T:T(W,Z,U)}var q=function(W){n(U,W);var Z=i(U);function U(K,Q,re){var se;return r(this,U),se=Z.call(this,B(K,Q,re)),se.code=_,se}return e(U)}($);f[_]=q}function N(_,T){if(Array.isArray(_)){var $=_.length;return _=_.map(function(B){return String(B)}),$>2?"one of ".concat(T," ").concat(_.slice(0,$-1).join(", "),", or ")+_[$-1]:$===2?"one of ".concat(T," ").concat(_[0]," or ").concat(_[1]):"of ".concat(T," ").concat(_[0])}else return"of ".concat(T," ").concat(String(_))}function A(_,T,$){return _.substr(0,T.length)===T}function C(_,T,$){return($===void 0||$>_.length)&&($=_.length),_.substring($-T.length,$)===T}function P(_,T,$){return typeof $!="number"&&($=0),$+T.length>_.length?!1:_.indexOf(T,$)!==-1}return w("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),w("ERR_INVALID_ARG_TYPE",function(_,T,$){y===void 0&&(y=Pi()),y(typeof _=="string","'name' must be a string");var B;typeof T=="string"&&A(T,"not ")?(B="must not be",T=T.replace(/^not /,"")):B="must be";var q;if(C(_," argument"))q="The ".concat(_," ").concat(B," ").concat(N(T,"type"));else{var W=P(_,".")?"property":"argument";q='The "'.concat(_,'" ').concat(W," ").concat(B," ").concat(N(T,"type"))}return q+=". Received type ".concat(t($)),q},TypeError),w("ERR_INVALID_ARG_VALUE",function(_,T){var $=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";v===void 0&&(v=Pt);var B=v.inspect(T);return B.length>128&&(B="".concat(B.slice(0,128),"...")),"The argument '".concat(_,"' ").concat($,". Received ").concat(B)},TypeError),w("ERR_INVALID_RETURN_VALUE",function(_,T,$){var B;return $&&$.constructor&&$.constructor.name?B="instance of ".concat($.constructor.name):B="type ".concat(t($)),"Expected ".concat(_,' to be returned from the "').concat(T,'"')+" function but got ".concat(B,".")},TypeError),w("ERR_MISSING_ARGS",function(){for(var _=arguments.length,T=new Array(_),$=0;$<_;$++)T[$]=arguments[$];y===void 0&&(y=Pi()),y(T.length>0,"At least one arg needs to be specified");var B="The ",q=T.length;switch(T=T.map(function(W){return'"'.concat(W,'"')}),q){case 1:B+="".concat(T[0]," argument");break;case 2:B+="".concat(T[0]," and ").concat(T[1]," arguments");break;default:B+=T.slice(0,q-1).join(", "),B+=", and ".concat(T[q-1]," arguments");break}return"".concat(B," must be specified")},TypeError),gi.codes=f,gi}var mi,cl;function Jy(){if(cl)return mi;cl=1;function t(z,V){var H=Object.keys(z);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(z);V&&(m=m.filter(function(O){return Object.getOwnPropertyDescriptor(z,O).enumerable})),H.push.apply(H,m)}return H}function e(z){for(var V=1;V<arguments.length;V++){var H=arguments[V]!=null?arguments[V]:{};V%2?t(Object(H),!0).forEach(function(m){r(z,m,H[m])}):Object.getOwnPropertyDescriptors?Object.defineProperties(z,Object.getOwnPropertyDescriptors(H)):t(Object(H)).forEach(function(m){Object.defineProperty(z,m,Object.getOwnPropertyDescriptor(H,m))})}return z}function r(z,V,H){return V=c(V),V in z?Object.defineProperty(z,V,{value:H,enumerable:!0,configurable:!0,writable:!0}):z[V]=H,z}function n(z,V){if(!(z instanceof V))throw new TypeError("Cannot call a class as a function")}function o(z,V){for(var H=0;H<V.length;H++){var m=V[H];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(z,c(m.key),m)}}function i(z,V,H){return V&&o(z.prototype,V),Object.defineProperty(z,"prototype",{writable:!1}),z}function c(z){var V=l(z,"string");return _(V)==="symbol"?V:String(V)}function l(z,V){if(_(z)!=="object"||z===null)return z;var H=z[Symbol.toPrimitive];if(H!==void 0){var m=H.call(z,V||"default");if(_(m)!=="object")return m;throw new TypeError("@@toPrimitive must return a primitive value.")}return(V==="string"?String:Number)(z)}function d(z,V){if(typeof V!="function"&&V!==null)throw new TypeError("Super expression must either be null or a function");z.prototype=Object.create(V&&V.prototype,{constructor:{value:z,writable:!0,configurable:!0}}),Object.defineProperty(z,"prototype",{writable:!1}),V&&C(z,V)}function p(z){var V=N();return function(){var m=P(z),O;if(V){var g=P(this).constructor;O=Reflect.construct(m,arguments,g)}else O=m.apply(this,arguments);return f(this,O)}}function f(z,V){if(V&&(_(V)==="object"||typeof V=="function"))return V;if(V!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y(z)}function y(z){if(z===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return z}function v(z){var V=typeof Map=="function"?new Map:void 0;return v=function(m){if(m===null||!A(m))return m;if(typeof m!="function")throw new TypeError("Super expression must either be null or a function");if(typeof V<"u"){if(V.has(m))return V.get(m);V.set(m,O)}function O(){return w(m,arguments,P(this).constructor)}return O.prototype=Object.create(m.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),C(O,m)},v(z)}function w(z,V,H){return N()?w=Reflect.construct.bind():w=function(O,g,b){var S=[null];S.push.apply(S,g);var D=Function.bind.apply(O,S),M=new D;return b&&C(M,b.prototype),M},w.apply(null,arguments)}function N(){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 A(z){return Function.toString.call(z).indexOf("[native code]")!==-1}function C(z,V){return C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(m,O){return m.__proto__=O,m},C(z,V)}function P(z){return P=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(H){return H.__proto__||Object.getPrototypeOf(H)},P(z)}function _(z){"@babel/helpers - typeof";return _=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(V){return typeof V}:function(V){return V&&typeof Symbol=="function"&&V.constructor===Symbol&&V!==Symbol.prototype?"symbol":typeof V},_(z)}var T=Pt,$=T.inspect,B=sl(),q=B.codes.ERR_INVALID_ARG_TYPE;function W(z,V,H){return(H===void 0||H>z.length)&&(H=z.length),z.substring(H-V.length,H)===V}function Z(z,V){if(V=Math.floor(V),z.length==0||V==0)return"";var H=z.length*V;for(V=Math.floor(Math.log(V)/Math.log(2));V;)z+=z,V--;return z+=z.substring(0,H-z.length),z}var U="",K="",Q="",re="",se={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:"},Ae=10;function de(z){var V=Object.keys(z),H=Object.create(Object.getPrototypeOf(z));return V.forEach(function(m){H[m]=z[m]}),Object.defineProperty(H,"message",{value:z.message}),H}function Pe(z){return $(z,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function Se(z,V,H){var m="",O="",g=0,b="",S=!1,D=Pe(z),M=D.split(`
|
|
101
|
+
`)+" "+g[1]:g[0]+O+" "+m.join(", ")+" "+g[1]}t.types=kc;function C(m){return Array.isArray(m)}t.isArray=C;function P(m){return typeof m=="boolean"}t.isBoolean=P;function _(m){return m===null}t.isNull=_;function T(m){return m==null}t.isNullOrUndefined=T;function $(m){return typeof m=="number"}t.isNumber=$;function B(m){return typeof m=="string"}t.isString=B;function q(m){return typeof m=="symbol"}t.isSymbol=q;function W(m){return m===void 0}t.isUndefined=W;function Z(m){return U(m)&&Ae(m)==="[object RegExp]"}t.isRegExp=Z,t.types.isRegExp=Z;function U(m){return typeof m=="object"&&m!==null}t.isObject=U;function K(m){return U(m)&&Ae(m)==="[object Date]"}t.isDate=K,t.types.isDate=K;function Q(m){return U(m)&&(Ae(m)==="[object Error]"||m instanceof Error)}t.isError=Q,t.types.isNativeError=Q;function re(m){return typeof m=="function"}t.isFunction=re;function se(m){return m===null||typeof m=="boolean"||typeof m=="number"||typeof m=="string"||typeof m=="symbol"||typeof m>"u"}t.isPrimitive=se,t.isBuffer=Jy;function Ae(m){return Object.prototype.toString.call(m)}function de(m){return m<10?"0"+m.toString(10):m.toString(10)}var Pe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Se(){var m=new Date,O=[de(m.getHours()),de(m.getMinutes()),de(m.getSeconds())].join(":");return[m.getDate(),Pe[m.getMonth()],O].join(" ")}t.log=function(){console.log("%s - %s",Se(),t.format.apply(t,arguments))},t.inherits=Ky,t._extend=function(m,O){if(!O||!U(O))return m;for(var g=Object.keys(O),b=g.length;b--;)m[g[b]]=O[g[b]];return m};function ke(m,O){return Object.prototype.hasOwnProperty.call(m,O)}var z=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;t.promisify=function(O){if(typeof O!="function")throw new TypeError('The "original" argument must be of type Function');if(z&&O[z]){var g=O[z];if(typeof g!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(g,z,{value:g,enumerable:!1,writable:!1,configurable:!0}),g}function g(){for(var b,S,D=new Promise(function(G,ne){b=G,S=ne}),M=[],L=0;L<arguments.length;L++)M.push(arguments[L]);M.push(function(G,ne){G?S(G):b(ne)});try{O.apply(this,M)}catch(G){S(G)}return D}return Object.setPrototypeOf(g,Object.getPrototypeOf(O)),z&&Object.defineProperty(g,z,{value:g,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(g,e(O))},t.promisify.custom=z;function V(m,O){if(!m){var g=new Error("Promise was rejected with a falsy value");g.reason=m,m=g}return O(m)}function H(m){if(typeof m!="function")throw new TypeError('The "original" argument must be of type Function');function O(){for(var g=[],b=0;b<arguments.length;b++)g.push(arguments[b]);var S=g.pop();if(typeof S!="function")throw new TypeError("The last argument must be of type Function");var D=this,M=function(){return S.apply(D,arguments)};m.apply(this,g).then(function(L){$e.nextTick(M.bind(null,null,L))},function(L){$e.nextTick(V.bind(null,L,M))})}return Object.setPrototypeOf(O,Object.getPrototypeOf(m)),Object.defineProperties(O,e(m)),O}t.callbackify=H})(Pt);var gi={exports:{}},mi={},sl;function cl(){if(sl)return mi;sl=1;function t(_){"@babel/helpers - typeof";return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(T){return typeof T}:function(T){return T&&typeof Symbol=="function"&&T.constructor===Symbol&&T!==Symbol.prototype?"symbol":typeof T},t(_)}function e(_,T,$){return Object.defineProperty(_,"prototype",{writable:!1}),_}function r(_,T){if(!(_ instanceof T))throw new TypeError("Cannot call a class as a function")}function n(_,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function");_.prototype=Object.create(T&&T.prototype,{constructor:{value:_,writable:!0,configurable:!0}}),Object.defineProperty(_,"prototype",{writable:!1}),T&&o(_,T)}function o(_,T){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(B,q){return B.__proto__=q,B},o(_,T)}function i(_){var T=d();return function(){var B=p(_),q;if(T){var W=p(this).constructor;q=Reflect.construct(B,arguments,W)}else q=B.apply(this,arguments);return c(this,q)}}function c(_,T){if(T&&(t(T)==="object"||typeof T=="function"))return T;if(T!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return l(_)}function l(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}function d(){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 p(_){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function($){return $.__proto__||Object.getPrototypeOf($)},p(_)}var f={},y,v;function w(_,T,$){$||($=Error);function B(W,Z,U){return typeof T=="string"?T:T(W,Z,U)}var q=function(W){n(U,W);var Z=i(U);function U(K,Q,re){var se;return r(this,U),se=Z.call(this,B(K,Q,re)),se.code=_,se}return e(U)}($);f[_]=q}function N(_,T){if(Array.isArray(_)){var $=_.length;return _=_.map(function(B){return String(B)}),$>2?"one of ".concat(T," ").concat(_.slice(0,$-1).join(", "),", or ")+_[$-1]:$===2?"one of ".concat(T," ").concat(_[0]," or ").concat(_[1]):"of ".concat(T," ").concat(_[0])}else return"of ".concat(T," ").concat(String(_))}function A(_,T,$){return _.substr(0,T.length)===T}function C(_,T,$){return($===void 0||$>_.length)&&($=_.length),_.substring($-T.length,$)===T}function P(_,T,$){return typeof $!="number"&&($=0),$+T.length>_.length?!1:_.indexOf(T,$)!==-1}return w("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),w("ERR_INVALID_ARG_TYPE",function(_,T,$){y===void 0&&(y=Ni()),y(typeof _=="string","'name' must be a string");var B;typeof T=="string"&&A(T,"not ")?(B="must not be",T=T.replace(/^not /,"")):B="must be";var q;if(C(_," argument"))q="The ".concat(_," ").concat(B," ").concat(N(T,"type"));else{var W=P(_,".")?"property":"argument";q='The "'.concat(_,'" ').concat(W," ").concat(B," ").concat(N(T,"type"))}return q+=". Received type ".concat(t($)),q},TypeError),w("ERR_INVALID_ARG_VALUE",function(_,T){var $=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";v===void 0&&(v=Pt);var B=v.inspect(T);return B.length>128&&(B="".concat(B.slice(0,128),"...")),"The argument '".concat(_,"' ").concat($,". Received ").concat(B)},TypeError),w("ERR_INVALID_RETURN_VALUE",function(_,T,$){var B;return $&&$.constructor&&$.constructor.name?B="instance of ".concat($.constructor.name):B="type ".concat(t($)),"Expected ".concat(_,' to be returned from the "').concat(T,'"')+" function but got ".concat(B,".")},TypeError),w("ERR_MISSING_ARGS",function(){for(var _=arguments.length,T=new Array(_),$=0;$<_;$++)T[$]=arguments[$];y===void 0&&(y=Ni()),y(T.length>0,"At least one arg needs to be specified");var B="The ",q=T.length;switch(T=T.map(function(W){return'"'.concat(W,'"')}),q){case 1:B+="".concat(T[0]," argument");break;case 2:B+="".concat(T[0]," and ").concat(T[1]," arguments");break;default:B+=T.slice(0,q-1).join(", "),B+=", and ".concat(T[q-1]," arguments");break}return"".concat(B," must be specified")},TypeError),mi.codes=f,mi}var _i,ll;function Xy(){if(ll)return _i;ll=1;function t(z,V){var H=Object.keys(z);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(z);V&&(m=m.filter(function(O){return Object.getOwnPropertyDescriptor(z,O).enumerable})),H.push.apply(H,m)}return H}function e(z){for(var V=1;V<arguments.length;V++){var H=arguments[V]!=null?arguments[V]:{};V%2?t(Object(H),!0).forEach(function(m){r(z,m,H[m])}):Object.getOwnPropertyDescriptors?Object.defineProperties(z,Object.getOwnPropertyDescriptors(H)):t(Object(H)).forEach(function(m){Object.defineProperty(z,m,Object.getOwnPropertyDescriptor(H,m))})}return z}function r(z,V,H){return V=c(V),V in z?Object.defineProperty(z,V,{value:H,enumerable:!0,configurable:!0,writable:!0}):z[V]=H,z}function n(z,V){if(!(z instanceof V))throw new TypeError("Cannot call a class as a function")}function o(z,V){for(var H=0;H<V.length;H++){var m=V[H];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(z,c(m.key),m)}}function i(z,V,H){return V&&o(z.prototype,V),Object.defineProperty(z,"prototype",{writable:!1}),z}function c(z){var V=l(z,"string");return _(V)==="symbol"?V:String(V)}function l(z,V){if(_(z)!=="object"||z===null)return z;var H=z[Symbol.toPrimitive];if(H!==void 0){var m=H.call(z,V||"default");if(_(m)!=="object")return m;throw new TypeError("@@toPrimitive must return a primitive value.")}return(V==="string"?String:Number)(z)}function d(z,V){if(typeof V!="function"&&V!==null)throw new TypeError("Super expression must either be null or a function");z.prototype=Object.create(V&&V.prototype,{constructor:{value:z,writable:!0,configurable:!0}}),Object.defineProperty(z,"prototype",{writable:!1}),V&&C(z,V)}function p(z){var V=N();return function(){var m=P(z),O;if(V){var g=P(this).constructor;O=Reflect.construct(m,arguments,g)}else O=m.apply(this,arguments);return f(this,O)}}function f(z,V){if(V&&(_(V)==="object"||typeof V=="function"))return V;if(V!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y(z)}function y(z){if(z===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return z}function v(z){var V=typeof Map=="function"?new Map:void 0;return v=function(m){if(m===null||!A(m))return m;if(typeof m!="function")throw new TypeError("Super expression must either be null or a function");if(typeof V<"u"){if(V.has(m))return V.get(m);V.set(m,O)}function O(){return w(m,arguments,P(this).constructor)}return O.prototype=Object.create(m.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),C(O,m)},v(z)}function w(z,V,H){return N()?w=Reflect.construct.bind():w=function(O,g,b){var S=[null];S.push.apply(S,g);var D=Function.bind.apply(O,S),M=new D;return b&&C(M,b.prototype),M},w.apply(null,arguments)}function N(){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 A(z){return Function.toString.call(z).indexOf("[native code]")!==-1}function C(z,V){return C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(m,O){return m.__proto__=O,m},C(z,V)}function P(z){return P=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(H){return H.__proto__||Object.getPrototypeOf(H)},P(z)}function _(z){"@babel/helpers - typeof";return _=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(V){return typeof V}:function(V){return V&&typeof Symbol=="function"&&V.constructor===Symbol&&V!==Symbol.prototype?"symbol":typeof V},_(z)}var T=Pt,$=T.inspect,B=cl(),q=B.codes.ERR_INVALID_ARG_TYPE;function W(z,V,H){return(H===void 0||H>z.length)&&(H=z.length),z.substring(H-V.length,H)===V}function Z(z,V){if(V=Math.floor(V),z.length==0||V==0)return"";var H=z.length*V;for(V=Math.floor(Math.log(V)/Math.log(2));V;)z+=z,V--;return z+=z.substring(0,H-z.length),z}var U="",K="",Q="",re="",se={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:"},Ae=10;function de(z){var V=Object.keys(z),H=Object.create(Object.getPrototypeOf(z));return V.forEach(function(m){H[m]=z[m]}),Object.defineProperty(H,"message",{value:z.message}),H}function Pe(z){return $(z,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function Se(z,V,H){var m="",O="",g=0,b="",S=!1,D=Pe(z),M=D.split(`
|
|
102
102
|
`),L=Pe(V).split(`
|
|
103
103
|
`),G=0,ne="";if(H==="strictEqual"&&_(z)==="object"&&_(V)==="object"&&z!==null&&V!==null&&(H="strictEqualObject"),M.length===1&&L.length===1&&M[0]!==L[0]){var le=M[0].length+L[0].length;if(le<=Ae){if((_(z)!=="object"||z===null)&&(_(V)!=="object"||V===null)&&(z!==0||V!==0))return"".concat(se[H],`
|
|
104
104
|
|
|
@@ -144,13 +144,13 @@
|
|
|
144
144
|
|
|
145
145
|
should equal
|
|
146
146
|
|
|
147
|
-
`):Ee=" ".concat(S," ").concat(Ee)),g=H.call(this,"".concat(he).concat(Ee))}return Error.stackTraceLimit=G,g.generatedMessage=!b,Object.defineProperty(y(g),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),g.code="ERR_ASSERTION",g.actual=M,g.expected=L,g.operator=S,Error.captureStackTrace&&Error.captureStackTrace(y(g),D),g.stack,g.name="AssertionError",f(g)}return i(m,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:V,value:function(g,b){return $(this,e(e({},b),{},{customInspect:!1,depth:0}))}}]),m}(v(Error),$.custom);return
|
|
148
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function r(E,k){if(E){if(typeof E=="string")return n(E,k);var Y=Object.prototype.toString.call(E).slice(8,-1);if(Y==="Object"&&E.constructor&&(Y=E.constructor.name),Y==="Map"||Y==="Set")return Array.from(E);if(Y==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Y))return n(E,k)}}function n(E,k){(k==null||k>E.length)&&(k=E.length);for(var Y=0,ee=new Array(k);Y<k;Y++)ee[Y]=E[Y];return ee}function o(E,k){var Y=E==null?null:typeof Symbol<"u"&&E[Symbol.iterator]||E["@@iterator"];if(Y!=null){var ee,X,oe,u,a=[],s=!0,h=!1;try{if(oe=(Y=Y.call(E)).next,k!==0)for(;!(s=(ee=oe.call(Y)).done)&&(a.push(ee.value),a.length!==k);s=!0);}catch(x){h=!0,X=x}finally{try{if(!s&&Y.return!=null&&(u=Y.return(),Object(u)!==u))return}finally{if(h)throw X}}return a}}function i(E){if(Array.isArray(E))return E}function c(E){"@babel/helpers - typeof";return c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(k){return typeof k}:function(k){return k&&typeof Symbol=="function"&&k.constructor===Symbol&&k!==Symbol.prototype?"symbol":typeof k},c(E)}var l=/a/g.flags!==void 0,d=function(k){var Y=[];return k.forEach(function(ee){return Y.push(ee)}),Y},p=function(k){var Y=[];return k.forEach(function(ee,X){return Y.push([X,ee])}),Y},f=Object.is?Object.is:
|
|
147
|
+
`):Ee=" ".concat(S," ").concat(Ee)),g=H.call(this,"".concat(he).concat(Ee))}return Error.stackTraceLimit=G,g.generatedMessage=!b,Object.defineProperty(y(g),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),g.code="ERR_ASSERTION",g.actual=M,g.expected=L,g.operator=S,Error.captureStackTrace&&Error.captureStackTrace(y(g),D),g.stack,g.name="AssertionError",f(g)}return i(m,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:V,value:function(g,b){return $(this,e(e({},b),{},{customInspect:!1,depth:0}))}}]),m}(v(Error),$.custom);return _i=ke,_i}var ul=Object.prototype.toString,fl=function(e){var r=ul.call(e),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&ul.call(e.callee)==="[object Function]"),n},vi,dl;function Zy(){if(dl)return vi;dl=1;var t;if(!Object.keys){var e=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=fl,o=Object.prototype.propertyIsEnumerable,i=!o.call({toString:null},"toString"),c=o.call(function(){},"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],d=function(v){var w=v.constructor;return w&&w.prototype===v},p={$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},f=function(){if(typeof window>"u")return!1;for(var v in window)try{if(!p["$"+v]&&e.call(window,v)&&window[v]!==null&&typeof window[v]=="object")try{d(window[v])}catch{return!0}}catch{return!0}return!1}(),y=function(v){if(typeof window>"u"||!f)return d(v);try{return d(v)}catch{return!1}};t=function(w){var N=w!==null&&typeof w=="object",A=r.call(w)==="[object Function]",C=n(w),P=N&&r.call(w)==="[object String]",_=[];if(!N&&!A&&!C)throw new TypeError("Object.keys called on a non-object");var T=c&&A;if(P&&w.length>0&&!e.call(w,0))for(var $=0;$<w.length;++$)_.push(String($));if(C&&w.length>0)for(var B=0;B<w.length;++B)_.push(String(B));else for(var q in w)!(T&&q==="prototype")&&e.call(w,q)&&_.push(String(q));if(i)for(var W=y(w),Z=0;Z<l.length;++Z)!(W&&l[Z]==="constructor")&&e.call(w,l[Z])&&_.push(l[Z]);return _}}return vi=t,vi}var Qy=Array.prototype.slice,eg=fl,pl=Object.keys,vn=pl?function(e){return pl(e)}:Zy(),hl=Object.keys;vn.shim=function(){if(Object.keys){var e=function(){var r=Object.keys(arguments);return r&&r.length===arguments.length}(1,2);e||(Object.keys=function(n){return eg(n)?hl(Qy.call(n)):hl(n)})}else Object.keys=vn;return Object.keys||vn};var yl=vn,tg=yl,gl=Lo(),ml=ti,bn=Oc,rg=ml("Array.prototype.push"),_l=ml("Object.prototype.propertyIsEnumerable"),ng=gl?bn.getOwnPropertySymbols:null,og=function(e,r){if(e==null)throw new TypeError("target must be an object");var n=bn(e);if(arguments.length===1)return n;for(var o=1;o<arguments.length;++o){var i=bn(arguments[o]),c=tg(i),l=gl&&(bn.getOwnPropertySymbols||ng);if(l)for(var d=l(i),p=0;p<d.length;++p){var f=d[p];_l(i,f)&&rg(c,f)}for(var y=0;y<c.length;++y){var v=c[y];if(_l(i,v)){var w=i[v];n[v]=w}}}return n},bi=og,ig=function(){if(!Object.assign)return!1;for(var t="abcdefghijklmnopqrst",e=t.split(""),r={},n=0;n<e.length;++n)r[e[n]]=e[n];var o=Object.assign({},r),i="";for(var c in o)i+=c;return t!==i},ag=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},sg=function(){return!Object.assign||ig()||ag()?bi:Object.assign},vl=function(t){return t!==t},bl=function(e,r){return e===0&&r===0?1/e===1/r:!!(e===r||vl(e)&&vl(r))},cg=bl,wi=function(){return typeof Object.is=="function"?Object.is:cg},wl=ei,xl=yn,lg=xl(wl("String.prototype.indexOf")),ug=function(e,r){var n=wl(e,!!r);return typeof n=="function"&&lg(e,".prototype.")>-1?xl(n):n},xi,El;function wn(){if(El)return xi;El=1;var t=yl,e=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",r=Object.prototype.toString,n=Array.prototype.concat,o=Xc,i=function(p){return typeof p=="function"&&r.call(p)==="[object Function]"},c=Qc(),l=function(p,f,y,v){if(f in p){if(v===!0){if(p[f]===y)return}else if(!i(v)||!v())return}c?o(p,f,y,!0):o(p,f,y)},d=function(p,f){var y=arguments.length>2?arguments[2]:{},v=t(f);e&&(v=n.call(v,Object.getOwnPropertySymbols(f)));for(var w=0;w<v.length;w+=1)l(p,v[w],f[v[w]],y[v[w]])};return d.supportsDescriptors=!!c,xi=d,xi}var Ei,Sl;function fg(){if(Sl)return Ei;Sl=1;var t=wi,e=wn();return Ei=function(){var n=t();return e(Object,{is:n},{is:function(){return Object.is!==n}}),n},Ei}var Si,Al;function dg(){if(Al)return Si;Al=1;var t=wn(),e=yn,r=bl,n=wi,o=fg(),i=e(n(),Object);return t(i,{getPolyfill:n,implementation:r,shim:o}),Si=i,Si}var Ai,kl;function Ol(){return kl||(kl=1,Ai=function(e){return e!==e}),Ai}var ki,Il;function Pl(){if(Il)return ki;Il=1;var t=Ol();return ki=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:t},ki}var Oi,Nl;function pg(){if(Nl)return Oi;Nl=1;var t=wn(),e=Pl();return Oi=function(){var n=e();return t(Number,{isNaN:n},{isNaN:function(){return Number.isNaN!==n}}),n},Oi}var Ii,Tl;function hg(){if(Tl)return Ii;Tl=1;var t=yn,e=wn(),r=Ol(),n=Pl(),o=pg(),i=t(n(),Number);return e(i,{getPolyfill:n,implementation:r,shim:o}),Ii=i,Ii}var Pi,Rl;function yg(){if(Rl)return Pi;Rl=1;function t(E,k){return i(E)||o(E,k)||r(E,k)||e()}function e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
148
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function r(E,k){if(E){if(typeof E=="string")return n(E,k);var Y=Object.prototype.toString.call(E).slice(8,-1);if(Y==="Object"&&E.constructor&&(Y=E.constructor.name),Y==="Map"||Y==="Set")return Array.from(E);if(Y==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Y))return n(E,k)}}function n(E,k){(k==null||k>E.length)&&(k=E.length);for(var Y=0,ee=new Array(k);Y<k;Y++)ee[Y]=E[Y];return ee}function o(E,k){var Y=E==null?null:typeof Symbol<"u"&&E[Symbol.iterator]||E["@@iterator"];if(Y!=null){var ee,X,oe,u,a=[],s=!0,h=!1;try{if(oe=(Y=Y.call(E)).next,k!==0)for(;!(s=(ee=oe.call(Y)).done)&&(a.push(ee.value),a.length!==k);s=!0);}catch(x){h=!0,X=x}finally{try{if(!s&&Y.return!=null&&(u=Y.return(),Object(u)!==u))return}finally{if(h)throw X}}return a}}function i(E){if(Array.isArray(E))return E}function c(E){"@babel/helpers - typeof";return c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(k){return typeof k}:function(k){return k&&typeof Symbol=="function"&&k.constructor===Symbol&&k!==Symbol.prototype?"symbol":typeof k},c(E)}var l=/a/g.flags!==void 0,d=function(k){var Y=[];return k.forEach(function(ee){return Y.push(ee)}),Y},p=function(k){var Y=[];return k.forEach(function(ee,X){return Y.push([X,ee])}),Y},f=Object.is?Object.is:dg(),y=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},v=Number.isNaN?Number.isNaN:hg();function w(E){return E.call.bind(E)}var N=w(Object.prototype.hasOwnProperty),A=w(Object.prototype.propertyIsEnumerable),C=w(Object.prototype.toString),P=Pt.types,_=P.isAnyArrayBuffer,T=P.isArrayBufferView,$=P.isDate,B=P.isMap,q=P.isRegExp,W=P.isSet,Z=P.isNativeError,U=P.isBoxedPrimitive,K=P.isNumberObject,Q=P.isStringObject,re=P.isBooleanObject,se=P.isBigIntObject,Ae=P.isSymbolObject,de=P.isFloat32Array,Pe=P.isFloat64Array;function Se(E){if(E.length===0||E.length>10)return!0;for(var k=0;k<E.length;k++){var Y=E.charCodeAt(k);if(Y<48||Y>57)return!0}return E.length===10&&E>=Math.pow(2,32)}function ke(E){return Object.keys(E).filter(Se).concat(y(E).filter(Object.prototype.propertyIsEnumerable.bind(E)))}/*!
|
|
149
149
|
* The buffer module from node.js, for the browser.
|
|
150
150
|
*
|
|
151
151
|
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
|
152
152
|
* @license MIT
|
|
153
|
-
*/function z(E,k){if(E===k)return 0;for(var Y=E.length,ee=k.length,X=0,oe=Math.min(Y,ee);X<oe;++X)if(E[X]!==k[X]){Y=E[X],ee=k[X];break}return Y<ee?-1:ee<Y?1:0}var V=!0,H=!1,m=0,O=1,g=2,b=3;function S(E,k){return l?E.source===k.source&&E.flags===k.flags:RegExp.prototype.toString.call(E)===RegExp.prototype.toString.call(k)}function D(E,k){if(E.byteLength!==k.byteLength)return!1;for(var Y=0;Y<E.byteLength;Y++)if(E[Y]!==k[Y])return!1;return!0}function M(E,k){return E.byteLength!==k.byteLength?!1:z(new Uint8Array(E.buffer,E.byteOffset,E.byteLength),new Uint8Array(k.buffer,k.byteOffset,k.byteLength))===0}function L(E,k){return E.byteLength===k.byteLength&&z(new Uint8Array(E),new Uint8Array(k))===0}function G(E,k){return K(E)?K(k)&&f(Number.prototype.valueOf.call(E),Number.prototype.valueOf.call(k)):Q(E)?Q(k)&&String.prototype.valueOf.call(E)===String.prototype.valueOf.call(k):re(E)?re(k)&&Boolean.prototype.valueOf.call(E)===Boolean.prototype.valueOf.call(k):se(E)?se(k)&&BigInt.prototype.valueOf.call(E)===BigInt.prototype.valueOf.call(k):Ae(k)&&Symbol.prototype.valueOf.call(E)===Symbol.prototype.valueOf.call(k)}function ne(E,k,Y,ee){if(E===k)return E!==0?!0:Y?f(E,k):!0;if(Y){if(c(E)!=="object")return typeof E=="number"&&v(E)&&v(k);if(c(k)!=="object"||E===null||k===null||Object.getPrototypeOf(E)!==Object.getPrototypeOf(k))return!1}else{if(E===null||c(E)!=="object")return k===null||c(k)!=="object"?E==k:!1;if(k===null||c(k)!=="object")return!1}var X=C(E),oe=C(k);if(X!==oe)return!1;if(Array.isArray(E)){if(E.length!==k.length)return!1;var u=ke(E),a=ke(k);return u.length!==a.length?!1:he(E,k,Y,ee,O,u)}if(X==="[object Object]"&&(!B(E)&&B(k)||!W(E)&&W(k)))return!1;if($(E)){if(!$(k)||Date.prototype.getTime.call(E)!==Date.prototype.getTime.call(k))return!1}else if(q(E)){if(!q(k)||!S(E,k))return!1}else if(Z(E)||E instanceof Error){if(E.message!==k.message||E.name!==k.name)return!1}else if(T(E)){if(!Y&&(de(E)||Pe(E))){if(!D(E,k))return!1}else if(!M(E,k))return!1;var s=ke(E),h=ke(k);return s.length!==h.length?!1:he(E,k,Y,ee,m,s)}else{if(W(E))return!W(k)||E.size!==k.size?!1:he(E,k,Y,ee,g);if(B(E))return!B(k)||E.size!==k.size?!1:he(E,k,Y,ee,b);if(_(E)){if(!L(E,k))return!1}else if(U(E)&&!G(E,k))return!1}return he(E,k,Y,ee,m)}function le(E,k){return k.filter(function(Y){return A(E,Y)})}function he(E,k,Y,ee,X,oe){if(arguments.length===5){oe=Object.keys(E);var u=Object.keys(k);if(oe.length!==u.length)return!1}for(var a=0;a<oe.length;a++)if(!N(k,oe[a]))return!1;if(Y&&arguments.length===5){var s=y(E);if(s.length!==0){var h=0;for(a=0;a<s.length;a++){var x=s[a];if(A(E,x)){if(!A(k,x))return!1;oe.push(x),h++}else if(A(k,x))return!1}var R=y(k);if(s.length!==R.length&&le(k,R).length!==h)return!1}else{var F=y(k);if(F.length!==0&&le(k,F).length!==0)return!1}}if(oe.length===0&&(X===m||X===O&&E.length===0||E.size===0))return!0;if(ee===void 0)ee={val1:new Map,val2:new Map,position:0};else{var ie=ee.val1.get(E);if(ie!==void 0){var ye=ee.val2.get(k);if(ye!==void 0)return ie===ye}ee.position++}ee.val1.set(E,ee.position),ee.val2.set(k,ee.position);var ge=J(E,k,Y,oe,ee,X);return ee.val1.delete(E),ee.val2.delete(k),ge}function Ee(E,k,Y,ee){for(var X=d(E),oe=0;oe<X.length;oe++){var u=X[oe];if(ne(k,u,Y,ee))return E.delete(u),!0}return!1}function Re(E){switch(c(E)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":E=+E;case"number":if(v(E))return!1}return!0}function Ue(E,k,Y){var ee=Re(Y);return ee??(k.has(ee)&&!E.has(ee))}function ze(E,k,Y,ee,X){var oe=Re(Y);if(oe!=null)return oe;var u=k.get(oe);return u===void 0&&!k.has(oe)||!ne(ee,u,!1,X)?!1:!E.has(oe)&&ne(ee,u,!1,X)}function Fe(E,k,Y,ee){for(var X=null,oe=d(E),u=0;u<oe.length;u++){var a=oe[u];if(c(a)==="object"&&a!==null)X===null&&(X=new Set),X.add(a);else if(!k.has(a)){if(Y||!Ue(E,k,a))return!1;X===null&&(X=new Set),X.add(a)}}if(X!==null){for(var s=d(k),h=0;h<s.length;h++){var x=s[h];if(c(x)==="object"&&x!==null){if(!Ee(X,x,Y,ee))return!1}else if(!Y&&!E.has(x)&&!Ee(X,x,Y,ee))return!1}return X.size===0}return!0}function j(E,k,Y,ee,X,oe){for(var u=d(E),a=0;a<u.length;a++){var s=u[a];if(ne(Y,s,X,oe)&&ne(ee,k.get(s),X,oe))return E.delete(s),!0}return!1}function Xe(E,k,Y,ee){for(var X=null,oe=p(E),u=0;u<oe.length;u++){var a=t(oe[u],2),s=a[0],h=a[1];if(c(s)==="object"&&s!==null)X===null&&(X=new Set),X.add(s);else{var x=k.get(s);if(x===void 0&&!k.has(s)||!ne(h,x,Y,ee)){if(Y||!ze(E,k,s,h,ee))return!1;X===null&&(X=new Set),X.add(s)}}}if(X!==null){for(var R=p(k),F=0;F<R.length;F++){var ie=t(R[F],2),ye=ie[0],ge=ie[1];if(c(ye)==="object"&&ye!==null){if(!j(X,E,ye,ge,Y,ee))return!1}else if(!Y&&(!E.has(ye)||!ne(E.get(ye),ge,!1,ee))&&!j(X,E,ye,ge,!1,ee))return!1}return X.size===0}return!0}function J(E,k,Y,ee,X,oe){var u=0;if(oe===g){if(!Fe(E,k,Y,X))return!1}else if(oe===b){if(!Xe(E,k,Y,X))return!1}else if(oe===O)for(;u<E.length;u++)if(N(E,u)){if(!N(k,u)||!ne(E[u],k[u],Y,X))return!1}else{if(N(k,u))return!1;for(var a=Object.keys(E);u<a.length;u++){var s=a[u];if(!N(k,s)||!ne(E[s],k[s],Y,X))return!1}return a.length===Object.keys(k).length}for(u=0;u<ee.length;u++){var h=ee[u];if(!ne(E[h],k[h],Y,X))return!1}return!0}function pe(E,k){return ne(E,k,H)}function ve(E,k){return ne(E,k,V)}return Ii={isDeepEqual:pe,isDeepStrictEqual:ve},Ii}var Rl;function Pi(){if(Rl)return yi.exports;Rl=1;function t(g){"@babel/helpers - typeof";return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(b){return typeof b}:function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b},t(g)}function e(g,b,S){return Object.defineProperty(g,"prototype",{writable:!1}),g}function r(g,b){if(!(g instanceof b))throw new TypeError("Cannot call a class as a function")}var n=sl(),o=n.codes,i=o.ERR_AMBIGUOUS_ARGUMENT,c=o.ERR_INVALID_ARG_TYPE,l=o.ERR_INVALID_ARG_VALUE,d=o.ERR_INVALID_RETURN_VALUE,p=o.ERR_MISSING_ARGS,f=Jy(),y=Pt,v=y.inspect,w=Pt.types,N=w.isPromise,A=w.isRegExp,C=ig(),P=bi(),_=cg("RegExp.prototype.test"),T,$;function B(){var g=pg();T=g.isDeepEqual,$=g.isDeepStrictEqual}var q=!1,W=yi.exports=re,Z={};function U(g){throw g.message instanceof Error?g.message:new f(g)}function K(g,b,S,D,M){var L=arguments.length,G;if(L===0)G="Failed";else if(L===1)S=g,g=void 0;else{if(q===!1){q=!0;var ne=$e.emitWarning?$e.emitWarning:console.warn.bind(console);ne("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}L===2&&(D="!=")}if(S instanceof Error)throw S;var le={actual:g,expected:b,operator:D===void 0?"fail":D,stackStartFn:M||K};S!==void 0&&(le.message=S);var he=new f(le);throw G&&(he.message=G,he.generatedMessage=!0),he}W.fail=K,W.AssertionError=f;function Q(g,b,S,D){if(!S){var M=!1;if(b===0)M=!0,D="No value argument passed to `assert.ok()`";else if(D instanceof Error)throw D;var L=new f({actual:S,expected:!0,message:D,operator:"==",stackStartFn:g});throw L.generatedMessage=M,L}}function re(){for(var g=arguments.length,b=new Array(g),S=0;S<g;S++)b[S]=arguments[S];Q.apply(void 0,[re,b.length].concat(b))}W.ok=re,W.equal=function g(b,S,D){if(arguments.length<2)throw new p("actual","expected");b!=S&&U({actual:b,expected:S,message:D,operator:"==",stackStartFn:g})},W.notEqual=function g(b,S,D){if(arguments.length<2)throw new p("actual","expected");b==S&&U({actual:b,expected:S,message:D,operator:"!=",stackStartFn:g})},W.deepEqual=function g(b,S,D){if(arguments.length<2)throw new p("actual","expected");T===void 0&&B(),T(b,S)||U({actual:b,expected:S,message:D,operator:"deepEqual",stackStartFn:g})},W.notDeepEqual=function g(b,S,D){if(arguments.length<2)throw new p("actual","expected");T===void 0&&B(),T(b,S)&&U({actual:b,expected:S,message:D,operator:"notDeepEqual",stackStartFn:g})},W.deepStrictEqual=function g(b,S,D){if(arguments.length<2)throw new p("actual","expected");T===void 0&&B(),$(b,S)||U({actual:b,expected:S,message:D,operator:"deepStrictEqual",stackStartFn:g})},W.notDeepStrictEqual=se;function se(g,b,S){if(arguments.length<2)throw new p("actual","expected");T===void 0&&B(),$(g,b)&&U({actual:g,expected:b,message:S,operator:"notDeepStrictEqual",stackStartFn:se})}W.strictEqual=function g(b,S,D){if(arguments.length<2)throw new p("actual","expected");P(b,S)||U({actual:b,expected:S,message:D,operator:"strictEqual",stackStartFn:g})},W.notStrictEqual=function g(b,S,D){if(arguments.length<2)throw new p("actual","expected");P(b,S)&&U({actual:b,expected:S,message:D,operator:"notStrictEqual",stackStartFn:g})};var Ae=e(function g(b,S,D){var M=this;r(this,g),S.forEach(function(L){L in b&&(D!==void 0&&typeof D[L]=="string"&&A(b[L])&&_(b[L],D[L])?M[L]=D[L]:M[L]=b[L])})});function de(g,b,S,D,M,L){if(!(S in g)||!$(g[S],b[S])){if(!D){var G=new Ae(g,M),ne=new Ae(b,M,g),le=new f({actual:G,expected:ne,operator:"deepStrictEqual",stackStartFn:L});throw le.actual=g,le.expected=b,le.operator=L.name,le}U({actual:g,expected:b,message:D,operator:L.name,stackStartFn:L})}}function Pe(g,b,S,D){if(typeof b!="function"){if(A(b))return _(b,g);if(arguments.length===2)throw new c("expected",["Function","RegExp"],b);if(t(g)!=="object"||g===null){var M=new f({actual:g,expected:b,message:S,operator:"deepStrictEqual",stackStartFn:D});throw M.operator=D.name,M}var L=Object.keys(b);if(b instanceof Error)L.push("name","message");else if(L.length===0)throw new l("error",b,"may not be an empty object");return T===void 0&&B(),L.forEach(function(G){typeof g[G]=="string"&&A(b[G])&&_(b[G],g[G])||de(g,b,G,S,L,D)}),!0}return b.prototype!==void 0&&g instanceof b?!0:Error.isPrototypeOf(b)?!1:b.call({},g)===!0}function Se(g){if(typeof g!="function")throw new c("fn","Function",g);try{g()}catch(b){return b}return Z}function ke(g){return N(g)||g!==null&&t(g)==="object"&&typeof g.then=="function"&&typeof g.catch=="function"}function z(g){return Promise.resolve().then(function(){var b;if(typeof g=="function"){if(b=g(),!ke(b))throw new d("instance of Promise","promiseFn",b)}else if(ke(g))b=g;else throw new c("promiseFn",["Function","Promise"],g);return Promise.resolve().then(function(){return b}).then(function(){return Z}).catch(function(S){return S})})}function V(g,b,S,D){if(typeof S=="string"){if(arguments.length===4)throw new c("error",["Object","Error","Function","RegExp"],S);if(t(b)==="object"&&b!==null){if(b.message===S)throw new i("error/message",'The error message "'.concat(b.message,'" is identical to the message.'))}else if(b===S)throw new i("error/message",'The error "'.concat(b,'" is identical to the message.'));D=S,S=void 0}else if(S!=null&&t(S)!=="object"&&typeof S!="function")throw new c("error",["Object","Error","Function","RegExp"],S);if(b===Z){var M="";S&&S.name&&(M+=" (".concat(S.name,")")),M+=D?": ".concat(D):".";var L=g.name==="rejects"?"rejection":"exception";U({actual:void 0,expected:S,operator:g.name,message:"Missing expected ".concat(L).concat(M),stackStartFn:g})}if(S&&!Pe(b,S,D,g))throw b}function H(g,b,S,D){if(b!==Z){if(typeof S=="string"&&(D=S,S=void 0),!S||Pe(b,S)){var M=D?": ".concat(D):".",L=g.name==="doesNotReject"?"rejection":"exception";U({actual:b,expected:S,operator:g.name,message:"Got unwanted ".concat(L).concat(M,`
|
|
153
|
+
*/function z(E,k){if(E===k)return 0;for(var Y=E.length,ee=k.length,X=0,oe=Math.min(Y,ee);X<oe;++X)if(E[X]!==k[X]){Y=E[X],ee=k[X];break}return Y<ee?-1:ee<Y?1:0}var V=!0,H=!1,m=0,O=1,g=2,b=3;function S(E,k){return l?E.source===k.source&&E.flags===k.flags:RegExp.prototype.toString.call(E)===RegExp.prototype.toString.call(k)}function D(E,k){if(E.byteLength!==k.byteLength)return!1;for(var Y=0;Y<E.byteLength;Y++)if(E[Y]!==k[Y])return!1;return!0}function M(E,k){return E.byteLength!==k.byteLength?!1:z(new Uint8Array(E.buffer,E.byteOffset,E.byteLength),new Uint8Array(k.buffer,k.byteOffset,k.byteLength))===0}function L(E,k){return E.byteLength===k.byteLength&&z(new Uint8Array(E),new Uint8Array(k))===0}function G(E,k){return K(E)?K(k)&&f(Number.prototype.valueOf.call(E),Number.prototype.valueOf.call(k)):Q(E)?Q(k)&&String.prototype.valueOf.call(E)===String.prototype.valueOf.call(k):re(E)?re(k)&&Boolean.prototype.valueOf.call(E)===Boolean.prototype.valueOf.call(k):se(E)?se(k)&&BigInt.prototype.valueOf.call(E)===BigInt.prototype.valueOf.call(k):Ae(k)&&Symbol.prototype.valueOf.call(E)===Symbol.prototype.valueOf.call(k)}function ne(E,k,Y,ee){if(E===k)return E!==0?!0:Y?f(E,k):!0;if(Y){if(c(E)!=="object")return typeof E=="number"&&v(E)&&v(k);if(c(k)!=="object"||E===null||k===null||Object.getPrototypeOf(E)!==Object.getPrototypeOf(k))return!1}else{if(E===null||c(E)!=="object")return k===null||c(k)!=="object"?E==k:!1;if(k===null||c(k)!=="object")return!1}var X=C(E),oe=C(k);if(X!==oe)return!1;if(Array.isArray(E)){if(E.length!==k.length)return!1;var u=ke(E),a=ke(k);return u.length!==a.length?!1:he(E,k,Y,ee,O,u)}if(X==="[object Object]"&&(!B(E)&&B(k)||!W(E)&&W(k)))return!1;if($(E)){if(!$(k)||Date.prototype.getTime.call(E)!==Date.prototype.getTime.call(k))return!1}else if(q(E)){if(!q(k)||!S(E,k))return!1}else if(Z(E)||E instanceof Error){if(E.message!==k.message||E.name!==k.name)return!1}else if(T(E)){if(!Y&&(de(E)||Pe(E))){if(!D(E,k))return!1}else if(!M(E,k))return!1;var s=ke(E),h=ke(k);return s.length!==h.length?!1:he(E,k,Y,ee,m,s)}else{if(W(E))return!W(k)||E.size!==k.size?!1:he(E,k,Y,ee,g);if(B(E))return!B(k)||E.size!==k.size?!1:he(E,k,Y,ee,b);if(_(E)){if(!L(E,k))return!1}else if(U(E)&&!G(E,k))return!1}return he(E,k,Y,ee,m)}function le(E,k){return k.filter(function(Y){return A(E,Y)})}function he(E,k,Y,ee,X,oe){if(arguments.length===5){oe=Object.keys(E);var u=Object.keys(k);if(oe.length!==u.length)return!1}for(var a=0;a<oe.length;a++)if(!N(k,oe[a]))return!1;if(Y&&arguments.length===5){var s=y(E);if(s.length!==0){var h=0;for(a=0;a<s.length;a++){var x=s[a];if(A(E,x)){if(!A(k,x))return!1;oe.push(x),h++}else if(A(k,x))return!1}var R=y(k);if(s.length!==R.length&&le(k,R).length!==h)return!1}else{var F=y(k);if(F.length!==0&&le(k,F).length!==0)return!1}}if(oe.length===0&&(X===m||X===O&&E.length===0||E.size===0))return!0;if(ee===void 0)ee={val1:new Map,val2:new Map,position:0};else{var ie=ee.val1.get(E);if(ie!==void 0){var ye=ee.val2.get(k);if(ye!==void 0)return ie===ye}ee.position++}ee.val1.set(E,ee.position),ee.val2.set(k,ee.position);var ge=J(E,k,Y,oe,ee,X);return ee.val1.delete(E),ee.val2.delete(k),ge}function Ee(E,k,Y,ee){for(var X=d(E),oe=0;oe<X.length;oe++){var u=X[oe];if(ne(k,u,Y,ee))return E.delete(u),!0}return!1}function Re(E){switch(c(E)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":E=+E;case"number":if(v(E))return!1}return!0}function Ue(E,k,Y){var ee=Re(Y);return ee??(k.has(ee)&&!E.has(ee))}function ze(E,k,Y,ee,X){var oe=Re(Y);if(oe!=null)return oe;var u=k.get(oe);return u===void 0&&!k.has(oe)||!ne(ee,u,!1,X)?!1:!E.has(oe)&&ne(ee,u,!1,X)}function Fe(E,k,Y,ee){for(var X=null,oe=d(E),u=0;u<oe.length;u++){var a=oe[u];if(c(a)==="object"&&a!==null)X===null&&(X=new Set),X.add(a);else if(!k.has(a)){if(Y||!Ue(E,k,a))return!1;X===null&&(X=new Set),X.add(a)}}if(X!==null){for(var s=d(k),h=0;h<s.length;h++){var x=s[h];if(c(x)==="object"&&x!==null){if(!Ee(X,x,Y,ee))return!1}else if(!Y&&!E.has(x)&&!Ee(X,x,Y,ee))return!1}return X.size===0}return!0}function j(E,k,Y,ee,X,oe){for(var u=d(E),a=0;a<u.length;a++){var s=u[a];if(ne(Y,s,X,oe)&&ne(ee,k.get(s),X,oe))return E.delete(s),!0}return!1}function Xe(E,k,Y,ee){for(var X=null,oe=p(E),u=0;u<oe.length;u++){var a=t(oe[u],2),s=a[0],h=a[1];if(c(s)==="object"&&s!==null)X===null&&(X=new Set),X.add(s);else{var x=k.get(s);if(x===void 0&&!k.has(s)||!ne(h,x,Y,ee)){if(Y||!ze(E,k,s,h,ee))return!1;X===null&&(X=new Set),X.add(s)}}}if(X!==null){for(var R=p(k),F=0;F<R.length;F++){var ie=t(R[F],2),ye=ie[0],ge=ie[1];if(c(ye)==="object"&&ye!==null){if(!j(X,E,ye,ge,Y,ee))return!1}else if(!Y&&(!E.has(ye)||!ne(E.get(ye),ge,!1,ee))&&!j(X,E,ye,ge,!1,ee))return!1}return X.size===0}return!0}function J(E,k,Y,ee,X,oe){var u=0;if(oe===g){if(!Fe(E,k,Y,X))return!1}else if(oe===b){if(!Xe(E,k,Y,X))return!1}else if(oe===O)for(;u<E.length;u++)if(N(E,u)){if(!N(k,u)||!ne(E[u],k[u],Y,X))return!1}else{if(N(k,u))return!1;for(var a=Object.keys(E);u<a.length;u++){var s=a[u];if(!N(k,s)||!ne(E[s],k[s],Y,X))return!1}return a.length===Object.keys(k).length}for(u=0;u<ee.length;u++){var h=ee[u];if(!ne(E[h],k[h],Y,X))return!1}return!0}function pe(E,k){return ne(E,k,H)}function ve(E,k){return ne(E,k,V)}return Pi={isDeepEqual:pe,isDeepStrictEqual:ve},Pi}var Cl;function Ni(){if(Cl)return gi.exports;Cl=1;function t(g){"@babel/helpers - typeof";return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(b){return typeof b}:function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b},t(g)}function e(g,b,S){return Object.defineProperty(g,"prototype",{writable:!1}),g}function r(g,b){if(!(g instanceof b))throw new TypeError("Cannot call a class as a function")}var n=cl(),o=n.codes,i=o.ERR_AMBIGUOUS_ARGUMENT,c=o.ERR_INVALID_ARG_TYPE,l=o.ERR_INVALID_ARG_VALUE,d=o.ERR_INVALID_RETURN_VALUE,p=o.ERR_MISSING_ARGS,f=Xy(),y=Pt,v=y.inspect,w=Pt.types,N=w.isPromise,A=w.isRegExp,C=sg(),P=wi(),_=ug("RegExp.prototype.test"),T,$;function B(){var g=yg();T=g.isDeepEqual,$=g.isDeepStrictEqual}var q=!1,W=gi.exports=re,Z={};function U(g){throw g.message instanceof Error?g.message:new f(g)}function K(g,b,S,D,M){var L=arguments.length,G;if(L===0)G="Failed";else if(L===1)S=g,g=void 0;else{if(q===!1){q=!0;var ne=$e.emitWarning?$e.emitWarning:console.warn.bind(console);ne("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}L===2&&(D="!=")}if(S instanceof Error)throw S;var le={actual:g,expected:b,operator:D===void 0?"fail":D,stackStartFn:M||K};S!==void 0&&(le.message=S);var he=new f(le);throw G&&(he.message=G,he.generatedMessage=!0),he}W.fail=K,W.AssertionError=f;function Q(g,b,S,D){if(!S){var M=!1;if(b===0)M=!0,D="No value argument passed to `assert.ok()`";else if(D instanceof Error)throw D;var L=new f({actual:S,expected:!0,message:D,operator:"==",stackStartFn:g});throw L.generatedMessage=M,L}}function re(){for(var g=arguments.length,b=new Array(g),S=0;S<g;S++)b[S]=arguments[S];Q.apply(void 0,[re,b.length].concat(b))}W.ok=re,W.equal=function g(b,S,D){if(arguments.length<2)throw new p("actual","expected");b!=S&&U({actual:b,expected:S,message:D,operator:"==",stackStartFn:g})},W.notEqual=function g(b,S,D){if(arguments.length<2)throw new p("actual","expected");b==S&&U({actual:b,expected:S,message:D,operator:"!=",stackStartFn:g})},W.deepEqual=function g(b,S,D){if(arguments.length<2)throw new p("actual","expected");T===void 0&&B(),T(b,S)||U({actual:b,expected:S,message:D,operator:"deepEqual",stackStartFn:g})},W.notDeepEqual=function g(b,S,D){if(arguments.length<2)throw new p("actual","expected");T===void 0&&B(),T(b,S)&&U({actual:b,expected:S,message:D,operator:"notDeepEqual",stackStartFn:g})},W.deepStrictEqual=function g(b,S,D){if(arguments.length<2)throw new p("actual","expected");T===void 0&&B(),$(b,S)||U({actual:b,expected:S,message:D,operator:"deepStrictEqual",stackStartFn:g})},W.notDeepStrictEqual=se;function se(g,b,S){if(arguments.length<2)throw new p("actual","expected");T===void 0&&B(),$(g,b)&&U({actual:g,expected:b,message:S,operator:"notDeepStrictEqual",stackStartFn:se})}W.strictEqual=function g(b,S,D){if(arguments.length<2)throw new p("actual","expected");P(b,S)||U({actual:b,expected:S,message:D,operator:"strictEqual",stackStartFn:g})},W.notStrictEqual=function g(b,S,D){if(arguments.length<2)throw new p("actual","expected");P(b,S)&&U({actual:b,expected:S,message:D,operator:"notStrictEqual",stackStartFn:g})};var Ae=e(function g(b,S,D){var M=this;r(this,g),S.forEach(function(L){L in b&&(D!==void 0&&typeof D[L]=="string"&&A(b[L])&&_(b[L],D[L])?M[L]=D[L]:M[L]=b[L])})});function de(g,b,S,D,M,L){if(!(S in g)||!$(g[S],b[S])){if(!D){var G=new Ae(g,M),ne=new Ae(b,M,g),le=new f({actual:G,expected:ne,operator:"deepStrictEqual",stackStartFn:L});throw le.actual=g,le.expected=b,le.operator=L.name,le}U({actual:g,expected:b,message:D,operator:L.name,stackStartFn:L})}}function Pe(g,b,S,D){if(typeof b!="function"){if(A(b))return _(b,g);if(arguments.length===2)throw new c("expected",["Function","RegExp"],b);if(t(g)!=="object"||g===null){var M=new f({actual:g,expected:b,message:S,operator:"deepStrictEqual",stackStartFn:D});throw M.operator=D.name,M}var L=Object.keys(b);if(b instanceof Error)L.push("name","message");else if(L.length===0)throw new l("error",b,"may not be an empty object");return T===void 0&&B(),L.forEach(function(G){typeof g[G]=="string"&&A(b[G])&&_(b[G],g[G])||de(g,b,G,S,L,D)}),!0}return b.prototype!==void 0&&g instanceof b?!0:Error.isPrototypeOf(b)?!1:b.call({},g)===!0}function Se(g){if(typeof g!="function")throw new c("fn","Function",g);try{g()}catch(b){return b}return Z}function ke(g){return N(g)||g!==null&&t(g)==="object"&&typeof g.then=="function"&&typeof g.catch=="function"}function z(g){return Promise.resolve().then(function(){var b;if(typeof g=="function"){if(b=g(),!ke(b))throw new d("instance of Promise","promiseFn",b)}else if(ke(g))b=g;else throw new c("promiseFn",["Function","Promise"],g);return Promise.resolve().then(function(){return b}).then(function(){return Z}).catch(function(S){return S})})}function V(g,b,S,D){if(typeof S=="string"){if(arguments.length===4)throw new c("error",["Object","Error","Function","RegExp"],S);if(t(b)==="object"&&b!==null){if(b.message===S)throw new i("error/message",'The error message "'.concat(b.message,'" is identical to the message.'))}else if(b===S)throw new i("error/message",'The error "'.concat(b,'" is identical to the message.'));D=S,S=void 0}else if(S!=null&&t(S)!=="object"&&typeof S!="function")throw new c("error",["Object","Error","Function","RegExp"],S);if(b===Z){var M="";S&&S.name&&(M+=" (".concat(S.name,")")),M+=D?": ".concat(D):".";var L=g.name==="rejects"?"rejection":"exception";U({actual:void 0,expected:S,operator:g.name,message:"Missing expected ".concat(L).concat(M),stackStartFn:g})}if(S&&!Pe(b,S,D,g))throw b}function H(g,b,S,D){if(b!==Z){if(typeof S=="string"&&(D=S,S=void 0),!S||Pe(b,S)){var M=D?": ".concat(D):".",L=g.name==="doesNotReject"?"rejection":"exception";U({actual:b,expected:S,operator:g.name,message:"Got unwanted ".concat(L).concat(M,`
|
|
154
154
|
`)+'Actual message: "'.concat(b&&b.message,'"'),stackStartFn:g})}throw b}}W.throws=function g(b){for(var S=arguments.length,D=new Array(S>1?S-1:0),M=1;M<S;M++)D[M-1]=arguments[M];V.apply(void 0,[g,Se(b)].concat(D))},W.rejects=function g(b){for(var S=arguments.length,D=new Array(S>1?S-1:0),M=1;M<S;M++)D[M-1]=arguments[M];return z(b).then(function(L){return V.apply(void 0,[g,L].concat(D))})},W.doesNotThrow=function g(b){for(var S=arguments.length,D=new Array(S>1?S-1:0),M=1;M<S;M++)D[M-1]=arguments[M];H.apply(void 0,[g,Se(b)].concat(D))},W.doesNotReject=function g(b){for(var S=arguments.length,D=new Array(S>1?S-1:0),M=1;M<S;M++)D[M-1]=arguments[M];return z(b).then(function(L){return H.apply(void 0,[g,L].concat(D))})},W.ifError=function g(b){if(b!=null){var S="ifError got unwanted exception: ";t(b)==="object"&&typeof b.message=="string"?b.message.length===0&&b.constructor?S+=b.constructor.name:S+=b.message:S+=v(b);var D=new f({actual:b,expected:null,operator:"ifError",message:S,stackStartFn:g}),M=b.stack;if(typeof M=="string"){var L=M.split(`
|
|
155
155
|
`);L.shift();for(var G=D.stack.split(`
|
|
156
156
|
`),ne=0;ne<L.length;ne++){var le=G.indexOf(L[ne]);if(le!==-1){G=G.slice(0,le);break}}D.stack="".concat(G.join(`
|
|
@@ -159,5 +159,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
159
159
|
`))}throw D}};function m(g,b,S,D,M){if(!A(b))throw new c("regexp","RegExp",b);var L=M==="match";if(typeof g!="string"||_(b,g)!==L){if(S instanceof Error)throw S;var G=!S;S=S||(typeof g!="string"?'The "string" argument must be of type string. Received type '+"".concat(t(g)," (").concat(v(g),")"):(L?"The input did not match the regular expression ":"The input was expected to not match the regular expression ")+"".concat(v(b),`. Input:
|
|
160
160
|
|
|
161
161
|
`).concat(v(g),`
|
|
162
|
-
`));var ne=new f({actual:g,expected:b,message:S,operator:M,stackStartFn:D});throw ne.generatedMessage=G,ne}}W.match=function g(b,S,D){m(b,S,D,g,"match")},W.doesNotMatch=function g(b,S,D){m(b,S,D,g,"doesNotMatch")};function O(){for(var g=arguments.length,b=new Array(g),S=0;S<g;S++)b[S]=arguments[S];Q.apply(void 0,[O,b.length].concat(b))}return W.strict=C(O,W,{equal:W.strictEqual,deepEqual:W.deepStrictEqual,notEqual:W.notStrictEqual,notDeepEqual:W.notDeepStrictEqual}),W.strict.strict=W.strict,
|
|
163
|
-
`)}function
|
|
162
|
+
`));var ne=new f({actual:g,expected:b,message:S,operator:M,stackStartFn:D});throw ne.generatedMessage=G,ne}}W.match=function g(b,S,D){m(b,S,D,g,"match")},W.doesNotMatch=function g(b,S,D){m(b,S,D,g,"doesNotMatch")};function O(){for(var g=arguments.length,b=new Array(g),S=0;S<g;S++)b[S]=arguments[S];Q.apply(void 0,[O,b.length].concat(b))}return W.strict=C(O,W,{equal:W.strictEqual,deepEqual:W.deepStrictEqual,notEqual:W.notStrictEqual,notDeepEqual:W.notDeepStrictEqual}),W.strict.strict=W.strict,gi.exports}var Ti=Pt,gg=Ni();function Bl(){return new Date().getTime()}var mg=Array.prototype.slice,We,Ri={};typeof ir<"u"&&ir.console?We=ir.console:typeof window<"u"&&window.console?We=window.console:We={};for(var Ml=[[vg,"log"],[bg,"info"],[wg,"warn"],[xg,"error"],[Eg,"time"],[Sg,"timeEnd"],[Ag,"trace"],[kg,"dir"],[Og,"assert"]],Ci=0;Ci<Ml.length;Ci++){var $l=Ml[Ci],_g=$l[0],Fl=$l[1];We[Fl]||(We[Fl]=_g)}var xn=We;function vg(){}function bg(){We.log.apply(We,arguments)}function wg(){We.log.apply(We,arguments)}function xg(){We.warn.apply(We,arguments)}function Eg(t){Ri[t]=Bl()}function Sg(t){var e=Ri[t];if(!e)throw new Error("No such label: "+t);delete Ri[t];var r=Bl()-e;We.log(t+": "+r+"ms")}function Ag(){var t=new Error;t.name="Trace",t.message=Ti.format.apply(null,arguments),We.error(t.stack)}function kg(t){We.log(Ti.inspect(t)+`
|
|
163
|
+
`)}function Og(t){if(!t){var e=mg.call(arguments,1);gg.ok(!1,Ti.format.apply(null,e))}}function Ig(t){xn.log("✨ onNewSupportMessage",t),je.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 xr(...t){console.log(...t)}function Pg(t){xr("✨ onThreadClosed",t);const e=je.getState().setConversationOpen;e(t.threadId,!1)}function Ng(t){xr("✨ onThreadAssigned",t);const{setConversationCSMember:e,addMessage:r,tempConversationToThread:n}=je.getState();n(t.threadId),e(t.threadId,t.csMember),r(t.threadId,Sf(t.csMember.displayName))}function Tg(t){xn.log("✨ onUpdatedSupportMessage",t),je.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 Rg(t){xn.log("✨ onNewSupportMessage",t),je.getState().removeMessage(t.threadId,t.messageDate)}function Cg(){return new Promise(t=>{const e=nn(dt.api,{path:"/socket"});e.on("connect",async()=>(xn.log("⚡ socket connected"),e.on("new-support-message",Ig),e.on("updated-support-message",Tg),e.on("deleted-support-message",Rg),e.on("thread-closed",Pg),e.on("thread-assigned",Ng),t(e)))})}async function Bg({name:t,email:e}){const r=JSON.stringify({guildId:dt.app_id,name:t,email:e}),n=new Headers;n.append("Content-Type","application/json");const o={method:"POST",headers:n,body:r},c=await(await fetch(`${dt.api}/auth/token`,o)).json();return c.token&&c.token!=="undefined"&&(Tr.set("discord-widget",c.token),je.getState().setToken(c.token)),c}async function Mg(t){const e=new Headers;e.append("Content-Type","application/json"),e.append("Authorization",`Bearer ${t}`);try{const r=await fetch(`${dt.api}/conversations/current`,{method:"GET",headers:e});return r.status!==200?null:(await r.json()).currentConversation??null}catch(r){return console.error("Error fetching current conversation",r),null}}async function $g(t){const e=new Headers;e.append("Content-Type","application/json"),e.append("Authorization",`Bearer ${t}`);try{const r=await fetch(`${dt.api}/conversations/past`,{method:"GET",headers:e});return r.status!==200?null:(await r.json()).pastConversations??null}catch(r){return console.error("Error fetching past conversations",r),null}}function jl(t,e){const r=Array.from(new Map([...t.messages||[],...e.messages||[]].map(n=>[n.date,n])).values());return{...t,...e,messages:r}}async function Fg(){const{conversations:t,setConversations:e,setConversationOpen:r,username:n,email:o}=je.getState(),i=await Cg();let c=Tr.get("discord-widget");if(!c)xr("ℹ️ missing JWT, getting token..."),c=(await Bg({name:n,email:o})).token,xr("✅ got new JWT",c);else{const l=await Mg(c),d=await $g(c);xr(`ℹ️ returning user, ${l?"found an ongoing conversation":"no current conversation"}, ${d!=null&&d.length?`got ${d.length} past conversations`:"no past conversations"}.`);let p=[];if(l){const f=t.find(y=>y.threadId===l.threadId);f?p=[jl(f,l)]:p=[{...l}]}else{const f=t.find(y=>y.status==="open");f&&r(f.threadId,!1)}d!=null&&d.length&&(p=[...p,...d.map(f=>{const y=t.find(v=>v.threadId===f.threadId);return y?jl(y,f):f})]),e(p)}i.emit("identify",{jwt:c})}async function jg(){const{setGuildSettings:t,guildSettings:e}=je.getState();if(e.lastUpdate)return;const r=new Headers;r.append("Content-Type","application/json");try{const o=await(await fetch(`${dt.api}/guildSettings/${dt.app_id}`,{method:"GET",headers:r})).json();t(o)}catch{}}function Dg(){const{isChatOpen:t,isChatVisible:e,setChatVisible:r,toggleChatOpen:n,isNetworkInitialized:o,setNetworkInitialized:i,username:c,email:l,addMessage:d,conversations:p,_REHYDRATED_:f}=je(),y=Vn(),v=Ie(()=>(!c||!l)&&!p.filter(N=>N.messages.filter(A=>A.customRenderer===Ft.IntroduceYourself)).length?(d("TEMP",Ef),!0):!1,[c,l,d,p]);return me(()=>{!f||(jg(),v())||(c||l)&&!o&&(Fg(),i(!0))},[o,i,v,c,l,f]),me(()=>{if(t)r(!0);else{const w=setTimeout(()=>r(!1),300);return()=>clearTimeout(w)}},[t,r]),I(Ce,{children:[I(ku,{onClick:()=>n(),isOpen:t}),e&&I("div",{className:y?`fixed top-[50%] right-0 -translate-y-1/2 h-full max-h-[calc(100%-200px)] w-full max-w-[385px] shadow-xl transform transition-transform duration-300 ease-in-out ${t?"translate-x-0":"translate-x-full"}`:"w-full h-full",children:I("div",{className:"relative h-full",children:I(ip,{})})})]})}const Lg=()=>{const t=ce(null),{isChatOpen:e,fullScreen:r}=je(),n=Vn();return me(()=>{var c;if(t.current){const l=t.current.contentDocument??((c=t.current.contentWindow)==null?void 0:c.document);if(l){l.open(),l.write('<!DOCTYPE html><html><head></head><body style="background-color:transparent!important"><div id="root"></div></body></html>'),l.close();const d=l.createElement("style");d.textContent=lu,l.head.appendChild(d);const p=l.createElement("style");p.textContent=uu,l.head.appendChild(p);const f=l.getElementById("root");f&&or.render(I("div",{className:"absolute h-full w-full",children:I(Dg,{})}),f)}}},[e]),I("div",{children:I("iframe",{ref:t,id:"discord-chat",style:!n||r?{border:"none",bottom:"0px",right:"0px",position:"absolute",width:e?"100%":"94px",height:e?"100%":"94px",backgroundColor:"white"}:{border:"none",position:"fixed",inset:"auto 9px 35px auto",width:e?"450px":"94px",height:e?"800px":"94px",maxHeight:"100vh",opacity:"1",background:"none transparent !important",margin:"0px",maxWidth:"100vw",transform:"translateY(0px)",transition:"none !important",visibility:"visible",zIndex:"999999999 !important",borderRadius:"0px"},sandbox:"allow-same-origin allow-scripts allow-popups allow-forms"})})};let Er=document.getElementById("deskcord-root");Er||(Er=document.createElement("div"),Er.id="deskcord-root",document.body.appendChild(Er)),or.render(I(or.StrictMode,{children:I(Lg,{})}),Er)})();
|