????
Current Path : C:/inetpub/vhost/gdnn.gdtsolutions.vn/build/assets/ |
Current File : C:/inetpub/vhost/gdnn.gdtsolutions.vn/build/assets/_SocketService-0c93a73d.js |
var xt=Object.defineProperty;var Et=(e,t,r)=>t in e?xt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var He=(e,t,r)=>(Et(e,typeof t!="symbol"?t+"":t,r),r);import{M as Nt,T as ne,N as Rt,O as Tt}from"./index-fa055cb8.js";import{r as qt}from"./___vite-browser-external_commonjs-proxy-5cb935fc.js";var Ae={exports:{}},Ot=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Dt=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],rt=function(t){var r=t,n=t.indexOf("["),i=t.indexOf("]");n!=-1&&i!=-1&&(t=t.substring(0,n)+t.substring(n,i).replace(/:/g,";")+t.substring(i,t.length));for(var o=Ot.exec(t||""),s={},u=14;u--;)s[Dt[u]]=o[u]||"";return n!=-1&&i!=-1&&(s.source=r,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=Pt(s,s.path),s.queryKey=_t(s,s.query),s};function Pt(e,t){var r=/\/{2,9}/g,n=t.replace(r,"/").split("/");return(t.substr(0,1)=="/"||t.length===0)&&n.splice(0,1),t.substr(t.length-1,1)=="/"&&n.splice(n.length-1,1),n}function _t(e,t){var r={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,i,o){i&&(r[i]=o)}),r}var ke={exports:{}},Fe={exports:{}},ie=1e3,oe=ie*60,se=oe*60,ae=se*24,It=ae*365.25,Ut=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return $t(e);if(r==="number"&&isNaN(e)===!1)return t.long?Lt(e):Mt(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function $t(e){if(e=String(e),!(e.length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*It;case"days":case"day":case"d":return r*ae;case"hours":case"hour":case"hrs":case"hr":case"h":return r*se;case"minutes":case"minute":case"mins":case"min":case"m":return r*oe;case"seconds":case"second":case"secs":case"sec":case"s":return r*ie;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function Mt(e){return e>=ae?Math.round(e/ae)+"d":e>=se?Math.round(e/se)+"h":e>=oe?Math.round(e/oe)+"m":e>=ie?Math.round(e/ie)+"s":e+"ms"}function Lt(e){return ce(e,ae,"day")||ce(e,se,"hour")||ce(e,oe,"minute")||ce(e,ie,"second")||e+" ms"}function ce(e,t,r){if(!(e<t))return e<t*1.5?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}(function(e,t){t=e.exports=n.debug=n.default=n,t.coerce=l,t.disable=s,t.enable=o,t.enabled=u,t.humanize=Ut,t.instances=[],t.names=[],t.skips=[],t.formatters={};function r(f){var p=0,g;for(g in f)p=(p<<5)-p+f.charCodeAt(g),p|=0;return t.colors[Math.abs(p)%t.colors.length]}function n(f){var p;function g(){if(g.enabled){var d=g,a=+new Date,E=a-(p||a);d.diff=E,d.prev=p,d.curr=a,p=a;for(var F=new Array(arguments.length),h=0;h<F.length;h++)F[h]=arguments[h];F[0]=t.coerce(F[0]),typeof F[0]!="string"&&F.unshift("%O");var b=0;F[0]=F[0].replace(/%([a-zA-Z%])/g,function(P,c){if(P==="%%")return P;b++;var y=t.formatters[c];if(typeof y=="function"){var v=F[b];P=y.call(d,v),F.splice(b,1),b--}return P}),t.formatArgs.call(d,F);var N=g.log||t.log||console.log.bind(console);N.apply(d,F)}}return g.namespace=f,g.enabled=t.enabled(f),g.useColors=t.useColors(),g.color=r(f),g.destroy=i,typeof t.init=="function"&&t.init(g),t.instances.push(g),g}function i(){var f=t.instances.indexOf(this);return f!==-1?(t.instances.splice(f,1),!0):!1}function o(f){t.save(f),t.names=[],t.skips=[];var p,g=(typeof f=="string"?f:"").split(/[\s,]+/),d=g.length;for(p=0;p<d;p++)g[p]&&(f=g[p].replace(/\*/g,".*?"),f[0]==="-"?t.skips.push(new RegExp("^"+f.substr(1)+"$")):t.names.push(new RegExp("^"+f+"$")));for(p=0;p<t.instances.length;p++){var a=t.instances[p];a.enabled=t.enabled(a.namespace)}}function s(){t.enable("")}function u(f){if(f[f.length-1]==="*")return!0;var p,g;for(p=0,g=t.skips.length;p<g;p++)if(t.skips[p].test(f))return!1;for(p=0,g=t.names.length;p<g;p++)if(t.names[p].test(f))return!0;return!1}function l(f){return f instanceof Error?f.stack||f.message:f}})(Fe,Fe.exports);var Ht=Fe.exports;(function(e,t){t=e.exports=Ht,t.log=i,t.formatArgs=n,t.save=o,t.load=s,t.useColors=r,t.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:u(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function r(){return typeof window<"u"&&window.process&&window.process.type==="renderer"?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}t.formatters.j=function(l){try{return JSON.stringify(l)}catch(f){return"[UnexpectedJSONParseError]: "+f.message}};function n(l){var f=this.useColors;if(l[0]=(f?"%c":"")+this.namespace+(f?" %c":" ")+l[0]+(f?"%c ":" ")+"+"+t.humanize(this.diff),!!f){var p="color: "+this.color;l.splice(1,0,p,"color: inherit");var g=0,d=0;l[0].replace(/%[a-zA-Z%]/g,function(a){a!=="%%"&&(g++,a==="%c"&&(d=g))}),l.splice(d,0,p)}}function i(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function o(l){try{l==null?t.storage.removeItem("debug"):t.storage.debug=l}catch{}}function s(){var l;try{l=t.storage.debug}catch{}return!l&&typeof process<"u"&&"env"in process&&(l={}.DEBUG),l}t.enable(s());function u(){try{return window.localStorage}catch{}}})(ke,ke.exports);var L=ke.exports,Xt=rt,Xe=L("socket.io-client:url"),zt=Wt;function Wt(e,t){var r=e;t=t||typeof location<"u"&&location,e==null&&(e=t.protocol+"//"+t.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=t.protocol+e:e=t.host+e),/^(https?|wss?):\/\//.test(e)||(Xe("protocol-less url %s",e),typeof t<"u"?e=t.protocol+"//"+e:e="https://"+e),Xe("parse %s",e),r=Xt(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";var n=r.host.indexOf(":")!==-1,i=n?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+i+":"+r.port,r.href=r.protocol+"://"+i+(t&&t.port===r.port?"":":"+r.port),r}var ve={},nt={exports:{}};(function(e){e.exports=t;function t(n){if(n)return r(n)}function r(n){for(var i in t.prototype)n[i]=t.prototype[i];return n}t.prototype.on=t.prototype.addEventListener=function(n,i){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(i),this},t.prototype.once=function(n,i){function o(){this.off(n,o),i.apply(this,arguments)}return o.fn=i,this.on(n,o),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(n,i){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var o=this._callbacks["$"+n];if(!o)return this;if(arguments.length==1)return delete this._callbacks["$"+n],this;for(var s,u=0;u<o.length;u++)if(s=o[u],s===i||s.fn===i){o.splice(u,1);break}return o.length===0&&delete this._callbacks["$"+n],this},t.prototype.emit=function(n){this._callbacks=this._callbacks||{};for(var i=new Array(arguments.length-1),o=this._callbacks["$"+n],s=1;s<arguments.length;s++)i[s-1]=arguments[s];if(o){o=o.slice(0);for(var s=0,u=o.length;s<u;++s)o[s].apply(this,i)}return this},t.prototype.listeners=function(n){return this._callbacks=this._callbacks||{},this._callbacks["$"+n]||[]},t.prototype.hasListeners=function(n){return!!this.listeners(n).length}})(nt);var Q=nt.exports,ge={},Jt={}.toString,Te=Array.isArray||function(e){return Jt.call(e)=="[object Array]"},it=jt,Kt=typeof Buffer=="function"&&typeof Buffer.isBuffer=="function",Vt=typeof ArrayBuffer=="function",Yt=function(e){return typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer};function jt(e){return Kt&&Buffer.isBuffer(e)||Vt&&(e instanceof ArrayBuffer||Yt(e))}var qe=Te,ot=it,st=Object.prototype.toString,Gt=typeof Blob=="function"||typeof Blob<"u"&&st.call(Blob)==="[object BlobConstructor]",Qt=typeof File=="function"||typeof File<"u"&&st.call(File)==="[object FileConstructor]";ge.deconstructPacket=function(e){var t=[],r=e.data,n=e;return n.data=Se(r,t),n.attachments=t.length,{packet:n,buffers:t}};function Se(e,t){if(!e)return e;if(ot(e)){var r={_placeholder:!0,num:t.length};return t.push(e),r}else if(qe(e)){for(var n=new Array(e.length),i=0;i<e.length;i++)n[i]=Se(e[i],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){var n={};for(var o in e)n[o]=Se(e[o],t);return n}return e}ge.reconstructPacket=function(e,t){return e.data=xe(e.data,t),e.attachments=void 0,e};function xe(e,t){if(!e)return e;if(e&&e._placeholder)return t[e.num];if(qe(e))for(var r=0;r<e.length;r++)e[r]=xe(e[r],t);else if(typeof e=="object")for(var n in e)e[n]=xe(e[n],t);return e}ge.removeBlobs=function(e,t){function r(o,s,u){if(!o)return o;if(Gt&&o instanceof Blob||Qt&&o instanceof File){n++;var l=new FileReader;l.onload=function(){u?u[s]=this.result:i=this.result,--n||t(i)},l.readAsArrayBuffer(o)}else if(qe(o))for(var f=0;f<o.length;f++)r(o[f],f,o);else if(typeof o=="object"&&!ot(o))for(var p in o)r(o[p],p,o)}var n=0,i=e;r(i),n||t(i)};(function(e){var t=L("socket.io-parser"),r=Q,n=ge,i=Te,o=it;e.protocol=4,e.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],e.CONNECT=0,e.DISCONNECT=1,e.EVENT=2,e.ACK=3,e.ERROR=4,e.BINARY_EVENT=5,e.BINARY_ACK=6,e.Encoder=s,e.Decoder=g;function s(){}var u=e.ERROR+'"encode error"';s.prototype.encode=function(h,b){if(t("encoding packet %j",h),e.BINARY_EVENT===h.type||e.BINARY_ACK===h.type)p(h,b);else{var N=l(h);b([N])}};function l(h){var b=""+h.type;if((e.BINARY_EVENT===h.type||e.BINARY_ACK===h.type)&&(b+=h.attachments+"-"),h.nsp&&h.nsp!=="/"&&(b+=h.nsp+","),h.id!=null&&(b+=h.id),h.data!=null){var N=f(h.data);if(N!==!1)b+=N;else return u}return t("encoded %j as %s",h,b),b}function f(h){try{return JSON.stringify(h)}catch{return!1}}function p(h,b){function N(P){var c=n.deconstructPacket(P),y=l(c.packet),v=c.buffers;v.unshift(y),b(v)}n.removeBlobs(h,N)}function g(){this.reconstructor=null}r(g.prototype),g.prototype.add=function(h){var b;if(typeof h=="string")b=d(h),e.BINARY_EVENT===b.type||e.BINARY_ACK===b.type?(this.reconstructor=new E(b),this.reconstructor.reconPack.attachments===0&&this.emit("decoded",b)):this.emit("decoded",b);else if(o(h)||h.base64)if(this.reconstructor)b=this.reconstructor.takeBinaryData(h),b&&(this.reconstructor=null,this.emit("decoded",b));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+h)};function d(h){var b=0,N={type:Number(h.charAt(0))};if(e.types[N.type]==null)return F("unknown packet type "+N.type);if(e.BINARY_EVENT===N.type||e.BINARY_ACK===N.type){for(var P=b+1;h.charAt(++b)!=="-"&&b!=h.length;);var c=h.substring(P,b);if(c!=Number(c)||h.charAt(b)!=="-")throw new Error("Illegal attachments");N.attachments=Number(c)}if(h.charAt(b+1)==="/"){for(var P=b+1;++b;){var y=h.charAt(b);if(y===","||b===h.length)break}N.nsp=h.substring(P,b)}else N.nsp="/";var v=h.charAt(b+1);if(v!==""&&Number(v)==v){for(var P=b+1;++b;){var y=h.charAt(b);if(y==null||Number(y)!=y){--b;break}if(b===h.length)break}N.id=Number(h.substring(P,b+1))}if(h.charAt(++b)){var m=a(h.substr(b)),w=m!==!1&&(N.type===e.ERROR||i(m));if(w)N.data=m;else return F("invalid payload")}return t("decoded %s as %j",h,N),N}function a(h){try{return JSON.parse(h)}catch{return!1}}g.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()};function E(h){this.reconPack=h,this.buffers=[]}E.prototype.takeBinaryData=function(h){if(this.buffers.push(h),this.buffers.length===this.reconPack.attachments){var b=n.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),b}return null},E.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]};function F(h){return{type:e.ERROR,data:"parser error: "+h}}})(ve);var Oe={exports:{}},me={},Ee={exports:{}};try{Ee.exports=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{Ee.exports=!1}var Zt=Ee.exports,De=function(){return typeof self<"u"?self:typeof window<"u"?window:Function("return this")()}(),er=Zt,tr=De,Pe=function(e){var t=e.xdomain,r=e.xscheme,n=e.enablesXDR;try{if(typeof XMLHttpRequest<"u"&&(!t||er))return new XMLHttpRequest}catch{}try{if(typeof XDomainRequest<"u"&&!r&&n)return new XDomainRequest}catch{}if(!t)try{return new tr[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}},_e={exports:{}},V={},rr=Object.keys||function(t){var r=[],n=Object.prototype.hasOwnProperty;for(var i in t)n.call(t,i)&&r.push(i);return r},nr=Te,at=Object.prototype.toString,ir=typeof Blob=="function"||typeof Blob<"u"&&at.call(Blob)==="[object BlobConstructor]",or=typeof File=="function"||typeof File<"u"&&at.call(File)==="[object FileConstructor]",ct=he;function he(e){if(!e||typeof e!="object")return!1;if(nr(e)){for(var t=0,r=e.length;t<r;t++)if(he(e[t]))return!0;return!1}if(typeof Buffer=="function"&&Buffer.isBuffer&&Buffer.isBuffer(e)||typeof ArrayBuffer=="function"&&e instanceof ArrayBuffer||ir&&e instanceof Blob||or&&e instanceof File)return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return he(e.toJSON(),!0);for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&he(e[n]))return!0;return!1}var sr=function(e,t,r){var n=e.byteLength;if(t=t||0,r=r||n,e.slice)return e.slice(t,r);if(t<0&&(t+=n),r<0&&(r+=n),r>n&&(r=n),t>=n||t>=r||n===0)return new ArrayBuffer(0);for(var i=new Uint8Array(e),o=new Uint8Array(r-t),s=t,u=0;s<r;s++,u++)o[u]=i[s];return o.buffer},ar=cr;function cr(e,t,r){var n=!1;return r=r||fr,i.count=e,e===0?t():i;function i(o,s){if(i.count<=0)throw new Error("after called too many times");--i.count,o?(n=!0,t(o),t=r):i.count===0&&!n&&t(null,s)}}function fr(){}/*! https://mths.be/utf8js v2.1.2 by @mathias */var X=String.fromCharCode;function ft(e){for(var t=[],r=0,n=e.length,i,o;r<n;)i=e.charCodeAt(r++),i>=55296&&i<=56319&&r<n?(o=e.charCodeAt(r++),(o&64512)==56320?t.push(((i&1023)<<10)+(o&1023)+65536):(t.push(i),r--)):t.push(i);return t}function ur(e){for(var t=e.length,r=-1,n,i="";++r<t;)n=e[r],n>65535&&(n-=65536,i+=X(n>>>10&1023|55296),n=56320|n&1023),i+=X(n);return i}function ut(e,t){if(e>=55296&&e<=57343){if(t)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function we(e,t){return X(e>>t&63|128)}function hr(e,t){if(!(e&4294967168))return X(e);var r="";return e&4294965248?e&4294901760?e&4292870144||(r=X(e>>18&7|240),r+=we(e,12),r+=we(e,6)):(ut(e,t)||(e=65533),r=X(e>>12&15|224),r+=we(e,6)):r=X(e>>6&31|192),r+=X(e&63|128),r}function lr(e,t){t=t||{};for(var r=t.strict!==!1,n=ft(e),i=n.length,o=-1,s,u="";++o<i;)s=n[o],u+=hr(s,r);return u}function Y(){if(z>=pe)throw Error("Invalid byte index");var e=le[z]&255;if(z++,(e&192)==128)return e&63;throw Error("Invalid continuation byte")}function pr(e){var t,r,n,i,o;if(z>pe)throw Error("Invalid byte index");if(z==pe)return!1;if(t=le[z]&255,z++,!(t&128))return t;if((t&224)==192){if(r=Y(),o=(t&31)<<6|r,o>=128)return o;throw Error("Invalid continuation byte")}if((t&240)==224){if(r=Y(),n=Y(),o=(t&15)<<12|r<<6|n,o>=2048)return ut(o,e)?o:65533;throw Error("Invalid continuation byte")}if((t&248)==240&&(r=Y(),n=Y(),i=Y(),o=(t&7)<<18|r<<12|n<<6|i,o>=65536&&o<=1114111))return o;throw Error("Invalid UTF-8 detected")}var le,pe,z;function dr(e,t){t=t||{};var r=t.strict!==!1;le=ft(e),pe=le.length,z=0;for(var n=[],i;(i=pr(r))!==!1;)n.push(i);return ur(n)}var yr={version:"2.1.2",encode:lr,decode:dr},fe={},ze;function vr(){return ze||(ze=1,function(e){fe.encode=function(t){var r=new Uint8Array(t),n,i=r.length,o="";for(n=0;n<i;n+=3)o+=e[r[n]>>2],o+=e[(r[n]&3)<<4|r[n+1]>>4],o+=e[(r[n+1]&15)<<2|r[n+2]>>6],o+=e[r[n+2]&63];return i%3===2?o=o.substring(0,o.length-1)+"=":i%3===1&&(o=o.substring(0,o.length-2)+"=="),o},fe.decode=function(t){var r=t.length*.75,n=t.length,i,o=0,s,u,l,f;t[t.length-1]==="="&&(r--,t[t.length-2]==="="&&r--);var p=new ArrayBuffer(r),g=new Uint8Array(p);for(i=0;i<n;i+=4)s=e.indexOf(t[i]),u=e.indexOf(t[i+1]),l=e.indexOf(t[i+2]),f=e.indexOf(t[i+3]),g[o++]=s<<2|u>>4,g[o++]=(u&15)<<4|l>>2,g[o++]=(l&3)<<6|f&63;return p}}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")),fe}var Ce,We;function gr(){if(We)return Ce;We=1;var e=typeof e<"u"?e:typeof WebKitBlobBuilder<"u"?WebKitBlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:!1,t=function(){try{var u=new Blob(["hi"]);return u.size===2}catch{return!1}}(),r=t&&function(){try{var u=new Blob([new Uint8Array([1,2])]);return u.size===2}catch{return!1}}(),n=e&&e.prototype.append&&e.prototype.getBlob;function i(u){return u.map(function(l){if(l.buffer instanceof ArrayBuffer){var f=l.buffer;if(l.byteLength!==f.byteLength){var p=new Uint8Array(l.byteLength);p.set(new Uint8Array(f,l.byteOffset,l.byteLength)),f=p.buffer}return f}return l})}function o(u,l){l=l||{};var f=new e;return i(u).forEach(function(p){f.append(p)}),l.type?f.getBlob(l.type):f.getBlob()}function s(u,l){return new Blob(i(u),l||{})}return typeof Blob<"u"&&(o.prototype=Blob.prototype,s.prototype=Blob.prototype),Ce=function(){return t?r?Blob:s:n?o:void 0}(),Ce}(function(e){var t=rr,r=ct,n=sr,i=ar,o=yr,s;typeof ArrayBuffer<"u"&&(s=vr());var u=typeof navigator<"u"&&/Android/i.test(navigator.userAgent),l=typeof navigator<"u"&&/PhantomJS/i.test(navigator.userAgent),f=u||l;e.protocol=3;var p=e.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},g=t(p),d={type:"error",data:"parser error"},a=gr();e.encodePacket=function(c,y,v,m){typeof y=="function"&&(m=y,y=!1),typeof v=="function"&&(m=v,v=null);var w=c.data===void 0?void 0:c.data.buffer||c.data;if(typeof ArrayBuffer<"u"&&w instanceof ArrayBuffer)return F(c,y,m);if(typeof a<"u"&&w instanceof a)return b(c,y,m);if(w&&w.base64)return E(c,m);var C=p[c.type];return c.data!==void 0&&(C+=v?o.encode(String(c.data),{strict:!1}):String(c.data)),m(""+C)};function E(c,y){var v="b"+e.packets[c.type]+c.data.data;return y(v)}function F(c,y,v){if(!y)return e.encodeBase64Packet(c,v);var m=c.data,w=new Uint8Array(m),C=new Uint8Array(1+m.byteLength);C[0]=p[c.type];for(var B=0;B<w.length;B++)C[B+1]=w[B];return v(C.buffer)}function h(c,y,v){if(!y)return e.encodeBase64Packet(c,v);var m=new FileReader;return m.onload=function(){e.encodePacket({type:c.type,data:m.result},y,!0,v)},m.readAsArrayBuffer(c.data)}function b(c,y,v){if(!y)return e.encodeBase64Packet(c,v);if(f)return h(c,y,v);var m=new Uint8Array(1);m[0]=p[c.type];var w=new a([m.buffer,c.data]);return v(w)}e.encodeBase64Packet=function(c,y){var v="b"+e.packets[c.type];if(typeof a<"u"&&c.data instanceof a){var m=new FileReader;return m.onload=function(){var A=m.result.split(",")[1];y(v+A)},m.readAsDataURL(c.data)}var w;try{w=String.fromCharCode.apply(null,new Uint8Array(c.data))}catch{for(var C=new Uint8Array(c.data),B=new Array(C.length),S=0;S<C.length;S++)B[S]=C[S];w=String.fromCharCode.apply(null,B)}return v+=btoa(w),y(v)},e.decodePacket=function(c,y,v){if(c===void 0)return d;if(typeof c=="string"){if(c.charAt(0)==="b")return e.decodeBase64Packet(c.substr(1),y);if(v&&(c=N(c),c===!1))return d;var w=c.charAt(0);return Number(w)!=w||!g[w]?d:c.length>1?{type:g[w],data:c.substring(1)}:{type:g[w]}}var m=new Uint8Array(c),w=m[0],C=n(c,1);return a&&y==="blob"&&(C=new a([C])),{type:g[w],data:C}};function N(c){try{c=o.decode(c,{strict:!1})}catch{return!1}return c}e.decodeBase64Packet=function(c,y){var v=g[c.charAt(0)];if(!s)return{type:v,data:{base64:!0,data:c.substr(1)}};var m=s.decode(c.substr(1));return y==="blob"&&a&&(m=new a([m])),{type:v,data:m}},e.encodePayload=function(c,y,v){typeof y=="function"&&(v=y,y=null);var m=r(c);if(y&&m)return a&&!f?e.encodePayloadAsBlob(c,v):e.encodePayloadAsArrayBuffer(c,v);if(!c.length)return v("0:");function w(B){return B.length+":"+B}function C(B,S){e.encodePacket(B,m?y:!1,!1,function(A){S(null,w(A))})}P(c,C,function(B,S){return v(S.join(""))})};function P(c,y,v){for(var m=new Array(c.length),w=i(c.length,v),C=function(S,A,R){y(A,function(T,q){m[S]=q,R(T,m)})},B=0;B<c.length;B++)C(B,c[B],w)}e.decodePayload=function(c,y,v){if(typeof c!="string")return e.decodePayloadAsBinary(c,y,v);typeof y=="function"&&(v=y,y=null);var m;if(c==="")return v(d,0,1);for(var w="",C,B,S=0,A=c.length;S<A;S++){var R=c.charAt(S);if(R!==":"){w+=R;continue}if(w===""||w!=(C=Number(w))||(B=c.substr(S+1,C),w!=B.length))return v(d,0,1);if(B.length){if(m=e.decodePacket(B,y,!1),d.type===m.type&&d.data===m.data)return v(d,0,1);var T=v(m,S+C,A);if(T===!1)return}S+=C,w=""}if(w!=="")return v(d,0,1)},e.encodePayloadAsArrayBuffer=function(c,y){if(!c.length)return y(new ArrayBuffer(0));function v(m,w){e.encodePacket(m,!0,!0,function(C){return w(null,C)})}P(c,v,function(m,w){var C=w.reduce(function(A,R){var T;return typeof R=="string"?T=R.length:T=R.byteLength,A+T.toString().length+T+2},0),B=new Uint8Array(C),S=0;return w.forEach(function(A){var R=typeof A=="string",T=A;if(R){for(var K=new Uint8Array(A.length),q=0;q<A.length;q++)K[q]=A.charCodeAt(q);T=K.buffer}R?B[S++]=0:B[S++]=1;for(var J=T.byteLength.toString(),q=0;q<J.length;q++)B[S++]=parseInt(J[q]);B[S++]=255;for(var K=new Uint8Array(T),q=0;q<K.length;q++)B[S++]=K[q]}),y(B.buffer)})},e.encodePayloadAsBlob=function(c,y){function v(m,w){e.encodePacket(m,!0,!0,function(C){var B=new Uint8Array(1);if(B[0]=1,typeof C=="string"){for(var S=new Uint8Array(C.length),A=0;A<C.length;A++)S[A]=C.charCodeAt(A);C=S.buffer,B[0]=0}for(var R=C instanceof ArrayBuffer?C.byteLength:C.size,T=R.toString(),q=new Uint8Array(T.length+1),A=0;A<T.length;A++)q[A]=parseInt(T[A]);if(q[T.length]=255,a){var J=new a([B.buffer,q.buffer,C]);w(null,J)}})}P(c,v,function(m,w){return y(new a(w))})},e.decodePayloadAsBinary=function(c,y,v){typeof y=="function"&&(v=y,y=null);for(var m=c,w=[];m.byteLength>0;){for(var C=new Uint8Array(m),B=C[0]===0,S="",A=1;C[A]!==255;A++){if(S.length>310)return v(d,0,1);S+=C[A]}m=n(m,2+S.length),S=parseInt(S);var R=n(m,0,S);if(B)try{R=String.fromCharCode.apply(null,new Uint8Array(R))}catch{var T=new Uint8Array(R);R="";for(var A=0;A<T.length;A++)R+=String.fromCharCode(T[A])}w.push(R),m=n(m,S)}var q=w.length;w.forEach(function(J,K){v(e.decodePacket(J,y,!0),K,q)})}})(V);var Be,Je;function Ie(){if(Je)return Be;Je=1;var e=V,t=Q;Be=r;function r(n){this.path=n.path,this.hostname=n.hostname,this.port=n.port,this.secure=n.secure,this.query=n.query,this.timestampParam=n.timestampParam,this.timestampRequests=n.timestampRequests,this.readyState="",this.agent=n.agent||!1,this.socket=n.socket,this.enablesXDR=n.enablesXDR,this.withCredentials=n.withCredentials,this.pfx=n.pfx,this.key=n.key,this.passphrase=n.passphrase,this.cert=n.cert,this.ca=n.ca,this.ciphers=n.ciphers,this.rejectUnauthorized=n.rejectUnauthorized,this.forceNode=n.forceNode,this.isReactNative=n.isReactNative,this.extraHeaders=n.extraHeaders,this.localAddress=n.localAddress}return t(r.prototype),r.prototype.onError=function(n,i){var o=new Error(n);return o.type="TransportError",o.description=i,this.emit("error",o),this},r.prototype.open=function(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this},r.prototype.close=function(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this},r.prototype.send=function(n){if(this.readyState==="open")this.write(n);else throw new Error("Transport not open")},r.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},r.prototype.onData=function(n){var i=e.decodePacket(n,this.socket.binaryType);this.onPacket(i)},r.prototype.onPacket=function(n){this.emit("packet",n)},r.prototype.onClose=function(){this.readyState="closed",this.emit("close")},Be}var Z={};Z.encode=function(e){var t="";for(var r in e)e.hasOwnProperty(r)&&(t.length&&(t+="&"),t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t};Z.decode=function(e){for(var t={},r=e.split("&"),n=0,i=r.length;n<i;n++){var o=r[n].split("=");t[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return t};var be=function(e,t){var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e},ht="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),de=64,lt={},Ke=0,W=0,Ve;function Ne(e){var t="";do t=ht[e%de]+t,e=Math.floor(e/de);while(e>0);return t}function mr(e){var t=0;for(W=0;W<e.length;W++)t=t*de+lt[e.charAt(W)];return t}function Ue(){var e=Ne(+new Date);return e!==Ve?(Ke=0,Ve=e):e+"."+Ne(Ke++)}for(;W<de;W++)lt[ht[W]]=W;Ue.encode=Ne;Ue.decode=mr;var pt=Ue,dt=Ie(),br=Z,yt=V,wr=be,Cr=pt,$=L("engine.io-client:polling"),vt=M,Br=function(){var e=Pe,t=new e({xdomain:!1});return t.responseType!=null}();function M(e){var t=e&&e.forceBase64;(!Br||t)&&(this.supportsBinary=!1),dt.call(this,e)}wr(M,dt);M.prototype.name="polling";M.prototype.doOpen=function(){this.poll()};M.prototype.pause=function(e){var t=this;this.readyState="pausing";function r(){$("paused"),t.readyState="paused",e()}if(this.polling||!this.writable){var n=0;this.polling&&($("we are currently polling - waiting to pause"),n++,this.once("pollComplete",function(){$("pre-pause polling complete"),--n||r()})),this.writable||($("we are currently writing - waiting to pause"),n++,this.once("drain",function(){$("pre-pause writing complete"),--n||r()}))}else r()};M.prototype.poll=function(){$("polling"),this.polling=!0,this.doPoll(),this.emit("poll")};M.prototype.onData=function(e){var t=this;$("polling got data %s",e);var r=function(n,i,o){if(t.readyState==="opening"&&n.type==="open"&&t.onOpen(),n.type==="close")return t.onClose(),!1;t.onPacket(n)};yt.decodePayload(e,this.socket.binaryType,r),this.readyState!=="closed"&&(this.polling=!1,this.emit("pollComplete"),this.readyState==="open"?this.poll():$('ignoring poll - transport state "%s"',this.readyState))};M.prototype.doClose=function(){var e=this;function t(){$("writing close packet"),e.write([{type:"close"}])}this.readyState==="open"?($("transport open - closing"),t()):($("transport not open - deferring close"),this.once("open",t))};M.prototype.write=function(e){var t=this;this.writable=!1;var r=function(){t.writable=!0,t.emit("drain")};yt.encodePayload(e,this.supportsBinary,function(n){t.doWrite(n,r)})};M.prototype.uri=function(){var e=this.query||{},t=this.secure?"https":"http",r="";this.timestampRequests!==!1&&(e[this.timestampParam]=Cr()),!this.supportsBinary&&!e.sid&&(e.b64=1),e=br.encode(e),this.port&&(t==="https"&&Number(this.port)!==443||t==="http"&&Number(this.port)!==80)&&(r=":"+this.port),e.length&&(e="?"+e);var n=this.hostname.indexOf(":")!==-1;return t+"://"+(n?"["+this.hostname+"]":this.hostname)+r+this.path+e};var Ar=Pe,gt=vt,kr=Q,Fr=be,Re=L("engine.io-client:polling-xhr"),Sr=De;_e.exports=ee;_e.exports.Request=D;function Ye(){}function ee(e){if(gt.call(this,e),this.requestTimeout=e.requestTimeout,this.extraHeaders=e.extraHeaders,typeof location<"u"){var t=location.protocol==="https:",r=location.port;r||(r=t?443:80),this.xd=typeof location<"u"&&e.hostname!==location.hostname||r!==e.port,this.xs=e.secure!==t}}Fr(ee,gt);ee.prototype.supportsBinary=!0;ee.prototype.request=function(e){return e=e||{},e.uri=this.uri(),e.xd=this.xd,e.xs=this.xs,e.agent=this.agent||!1,e.supportsBinary=this.supportsBinary,e.enablesXDR=this.enablesXDR,e.withCredentials=this.withCredentials,e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized,e.requestTimeout=this.requestTimeout,e.extraHeaders=this.extraHeaders,new D(e)};ee.prototype.doWrite=function(e,t){var r=typeof e!="string"&&e!==void 0,n=this.request({method:"POST",data:e,isBinary:r}),i=this;n.on("success",t),n.on("error",function(o){i.onError("xhr post error",o)}),this.sendXhr=n};ee.prototype.doPoll=function(){Re("xhr poll");var e=this.request(),t=this;e.on("data",function(r){t.onData(r)}),e.on("error",function(r){t.onError("xhr poll error",r)}),this.pollXhr=e};function D(e){this.method=e.method||"GET",this.uri=e.uri,this.xd=!!e.xd,this.xs=!!e.xs,this.async=e.async!==!1,this.data=e.data!==void 0?e.data:null,this.agent=e.agent,this.isBinary=e.isBinary,this.supportsBinary=e.supportsBinary,this.enablesXDR=e.enablesXDR,this.withCredentials=e.withCredentials,this.requestTimeout=e.requestTimeout,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.extraHeaders=e.extraHeaders,this.create()}kr(D.prototype);D.prototype.create=function(){var e={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized;var t=this.xhr=new Ar(e),r=this;try{Re("xhr open %s: %s",this.method,this.uri),t.open(this.method,this.uri,this.async);try{if(this.extraHeaders){t.setDisableHeaderCheck&&t.setDisableHeaderCheck(!0);for(var n in this.extraHeaders)this.extraHeaders.hasOwnProperty(n)&&t.setRequestHeader(n,this.extraHeaders[n])}}catch{}if(this.method==="POST")try{this.isBinary?t.setRequestHeader("Content-type","application/octet-stream"):t.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{t.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in t&&(t.withCredentials=this.withCredentials),this.requestTimeout&&(t.timeout=this.requestTimeout),this.hasXDR()?(t.onload=function(){r.onLoad()},t.onerror=function(){r.onError(t.responseText)}):t.onreadystatechange=function(){if(t.readyState===2)try{var i=t.getResponseHeader("Content-Type");(r.supportsBinary&&i==="application/octet-stream"||i==="application/octet-stream; charset=UTF-8")&&(t.responseType="arraybuffer")}catch{}t.readyState===4&&(t.status===200||t.status===1223?r.onLoad():setTimeout(function(){r.onError(typeof t.status=="number"?t.status:0)},0))},Re("xhr data %s",this.data),t.send(this.data)}catch(i){setTimeout(function(){r.onError(i)},0);return}typeof document<"u"&&(this.index=D.requestsCount++,D.requests[this.index]=this)};D.prototype.onSuccess=function(){this.emit("success"),this.cleanup()};D.prototype.onData=function(e){this.emit("data",e),this.onSuccess()};D.prototype.onError=function(e){this.emit("error",e),this.cleanup(!0)};D.prototype.cleanup=function(e){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=Ye:this.xhr.onreadystatechange=Ye,e)try{this.xhr.abort()}catch{}typeof document<"u"&&delete D.requests[this.index],this.xhr=null}};D.prototype.onLoad=function(){var e;try{var t;try{t=this.xhr.getResponseHeader("Content-Type")}catch{}t==="application/octet-stream"||t==="application/octet-stream; charset=UTF-8"?e=this.xhr.response||this.xhr.responseText:e=this.xhr.responseText}catch(r){this.onError(r)}e!=null&&this.onData(e)};D.prototype.hasXDR=function(){return typeof XDomainRequest<"u"&&!this.xs&&this.enablesXDR};D.prototype.abort=function(){this.cleanup()};D.requestsCount=0;D.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",je);else if(typeof addEventListener=="function"){var xr="onpagehide"in Sr?"pagehide":"unload";addEventListener(xr,je,!1)}}function je(){for(var e in D.requests)D.requests.hasOwnProperty(e)&&D.requests[e].abort()}var Er=_e.exports,$e=vt,Nr=be,Ge=De,Rr=te,Tr=/\n/g,qr=/\\n/g,ue;function Or(){}function te(e){$e.call(this,e),this.query=this.query||{},ue||(ue=Ge.___eio=Ge.___eio||[]),this.index=ue.length;var t=this;ue.push(function(r){t.onData(r)}),this.query.j=this.index,typeof addEventListener=="function"&&addEventListener("beforeunload",function(){t.script&&(t.script.onerror=Or)},!1)}Nr(te,$e);te.prototype.supportsBinary=!1;te.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),$e.prototype.doClose.call(this)};te.prototype.doPoll=function(){var e=this,t=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),t.async=!0,t.src=this.uri(),t.onerror=function(i){e.onError("jsonp poll error",i)};var r=document.getElementsByTagName("script")[0];r?r.parentNode.insertBefore(t,r):(document.head||document.body).appendChild(t),this.script=t;var n=typeof navigator<"u"&&/gecko/i.test(navigator.userAgent);n&&setTimeout(function(){var i=document.createElement("iframe");document.body.appendChild(i),document.body.removeChild(i)},100)};te.prototype.doWrite=function(e,t){var r=this;if(!this.form){var n=document.createElement("form"),i=document.createElement("textarea"),o=this.iframeId="eio_iframe_"+this.index,s;n.className="socketio",n.style.position="absolute",n.style.top="-1000px",n.style.left="-1000px",n.target=o,n.method="POST",n.setAttribute("accept-charset","utf-8"),i.name="d",n.appendChild(i),document.body.appendChild(n),this.form=n,this.area=i}this.form.action=this.uri();function u(){l(),t()}function l(){if(r.iframe)try{r.form.removeChild(r.iframe)}catch(p){r.onError("jsonp polling iframe removal error",p)}try{var f='<iframe src="javascript:0" name="'+r.iframeId+'">';s=document.createElement(f)}catch{s=document.createElement("iframe"),s.name=r.iframeId,s.src="javascript:0"}s.id=r.iframeId,r.form.appendChild(s),r.iframe=s}l(),e=e.replace(qr,`\\ `),this.area.value=e.replace(Tr,"\\n");try{this.form.submit()}catch{}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){r.iframe.readyState==="complete"&&u()}:this.iframe.onload=u};var Me=Ie(),Dr=V,Pr=Z,_r=be,Ir=pt,Ur=L("engine.io-client:websocket"),ye,Le;typeof WebSocket<"u"?ye=WebSocket:typeof self<"u"&&(ye=self.WebSocket||self.MozWebSocket);if(typeof window>"u")try{Le=qt}catch{}var G=ye||Le,$r=U;function U(e){var t=e&&e.forceBase64;t&&(this.supportsBinary=!1),this.perMessageDeflate=e.perMessageDeflate,this.usingBrowserWebSocket=ye&&!e.forceNode,this.protocols=e.protocols,this.usingBrowserWebSocket||(G=Le),Me.call(this,e)}_r(U,Me);U.prototype.name="websocket";U.prototype.supportsBinary=!0;U.prototype.doOpen=function(){if(this.check()){var e=this.uri(),t=this.protocols,r={};this.isReactNative||(r.agent=this.agent,r.perMessageDeflate=this.perMessageDeflate,r.pfx=this.pfx,r.key=this.key,r.passphrase=this.passphrase,r.cert=this.cert,r.ca=this.ca,r.ciphers=this.ciphers,r.rejectUnauthorized=this.rejectUnauthorized),this.extraHeaders&&(r.headers=this.extraHeaders),this.localAddress&&(r.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket&&!this.isReactNative?t?new G(e,t):new G(e):new G(e,t,r)}catch(n){return this.emit("error",n)}this.ws.binaryType===void 0&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}};U.prototype.addEventListeners=function(){var e=this;this.ws.onopen=function(){e.onOpen()},this.ws.onclose=function(){e.onClose()},this.ws.onmessage=function(t){e.onData(t.data)},this.ws.onerror=function(t){e.onError("websocket error",t)}};U.prototype.write=function(e){var t=this;this.writable=!1;for(var r=e.length,n=0,i=r;n<i;n++)(function(s){Dr.encodePacket(s,t.supportsBinary,function(u){if(!t.usingBrowserWebSocket){var l={};if(s.options&&(l.compress=s.options.compress),t.perMessageDeflate){var f=typeof u=="string"?Buffer.byteLength(u):u.length;f<t.perMessageDeflate.threshold&&(l.compress=!1)}}try{t.usingBrowserWebSocket?t.ws.send(u):t.ws.send(u,l)}catch{Ur("websocket closed before onclose event")}--r||o()})})(e[n]);function o(){t.emit("flush"),setTimeout(function(){t.writable=!0,t.emit("drain")},0)}};U.prototype.onClose=function(){Me.prototype.onClose.call(this)};U.prototype.doClose=function(){typeof this.ws<"u"&&this.ws.close()};U.prototype.uri=function(){var e=this.query||{},t=this.secure?"wss":"ws",r="";this.port&&(t==="wss"&&Number(this.port)!==443||t==="ws"&&Number(this.port)!==80)&&(r=":"+this.port),this.timestampRequests&&(e[this.timestampParam]=Ir()),this.supportsBinary||(e.b64=1),e=Pr.encode(e),e.length&&(e="?"+e);var n=this.hostname.indexOf(":")!==-1;return t+"://"+(n?"["+this.hostname+"]":this.hostname)+r+this.path+e};U.prototype.check=function(){return!!G&&!("__initialize"in G&&this.name===U.prototype.name)};var Mr=Pe,Lr=Er,Hr=Rr,Xr=$r;me.polling=zr;me.websocket=Xr;function zr(e){var t,r=!1,n=!1,i=e.jsonp!==!1;if(typeof location<"u"){var o=location.protocol==="https:",s=location.port;s||(s=o?443:80),r=e.hostname!==location.hostname||s!==e.port,n=e.secure!==o}if(e.xdomain=r,e.xscheme=n,t=new Mr(e),"open"in t&&!e.forceJSONP)return new Lr(e);if(!i)throw new Error("JSONP disabled");return new Hr(e)}var Wr=[].indexOf,mt=function(e,t){if(Wr)return e.indexOf(t);for(var r=0;r<e.length;++r)if(e[r]===t)return r;return-1},Jr=me,Kr=Q,O=L("engine.io-client:socket"),Vr=mt,bt=V,Qe=rt,Yr=Z,jr=k;function k(e,t){if(!(this instanceof k))return new k(e,t);t=t||{},e&&typeof e=="object"&&(t=e,e=null),e?(e=Qe(e),t.hostname=e.host,t.secure=e.protocol==="https"||e.protocol==="wss",t.port=e.port,e.query&&(t.query=e.query)):t.host&&(t.hostname=Qe(t.host).host),this.secure=t.secure!=null?t.secure:typeof location<"u"&&location.protocol==="https:",t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.agent=t.agent||!1,this.hostname=t.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=t.port||(typeof location<"u"&&location.port?location.port:this.secure?443:80),this.query=t.query||{},typeof this.query=="string"&&(this.query=Yr.decode(this.query)),this.upgrade=t.upgrade!==!1,this.path=(t.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!t.forceJSONP,this.jsonp=t.jsonp!==!1,this.forceBase64=!!t.forceBase64,this.enablesXDR=!!t.enablesXDR,this.withCredentials=t.withCredentials!==!1,this.timestampParam=t.timestampParam||"t",this.timestampRequests=t.timestampRequests,this.transports=t.transports||["polling","websocket"],this.transportOptions=t.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=t.policyPort||843,this.rememberUpgrade=t.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=t.onlyBinaryUpgrades,this.perMessageDeflate=t.perMessageDeflate!==!1?t.perMessageDeflate||{}:!1,this.perMessageDeflate===!0&&(this.perMessageDeflate={}),this.perMessageDeflate&&this.perMessageDeflate.threshold==null&&(this.perMessageDeflate.threshold=1024),this.pfx=t.pfx||void 0,this.key=t.key||void 0,this.passphrase=t.passphrase||void 0,this.cert=t.cert||void 0,this.ca=t.ca||void 0,this.ciphers=t.ciphers||void 0,this.rejectUnauthorized=t.rejectUnauthorized===void 0?!0:t.rejectUnauthorized,this.forceNode=!!t.forceNode,this.isReactNative=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",(typeof self>"u"||this.isReactNative)&&(t.extraHeaders&&Object.keys(t.extraHeaders).length>0&&(this.extraHeaders=t.extraHeaders),t.localAddress&&(this.localAddress=t.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}k.priorWebsocketSuccess=!1;Kr(k.prototype);k.protocol=bt.protocol;k.Socket=k;k.Transport=Ie();k.transports=me;k.parser=V;k.prototype.createTransport=function(e){O('creating transport "%s"',e);var t=Gr(this.query);t.EIO=bt.protocol,t.transport=e;var r=this.transportOptions[e]||{};this.id&&(t.sid=this.id);var n=new Jr[e]({query:t,socket:this,agent:r.agent||this.agent,hostname:r.hostname||this.hostname,port:r.port||this.port,secure:r.secure||this.secure,path:r.path||this.path,forceJSONP:r.forceJSONP||this.forceJSONP,jsonp:r.jsonp||this.jsonp,forceBase64:r.forceBase64||this.forceBase64,enablesXDR:r.enablesXDR||this.enablesXDR,withCredentials:r.withCredentials||this.withCredentials,timestampRequests:r.timestampRequests||this.timestampRequests,timestampParam:r.timestampParam||this.timestampParam,policyPort:r.policyPort||this.policyPort,pfx:r.pfx||this.pfx,key:r.key||this.key,passphrase:r.passphrase||this.passphrase,cert:r.cert||this.cert,ca:r.ca||this.ca,ciphers:r.ciphers||this.ciphers,rejectUnauthorized:r.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:r.perMessageDeflate||this.perMessageDeflate,extraHeaders:r.extraHeaders||this.extraHeaders,forceNode:r.forceNode||this.forceNode,localAddress:r.localAddress||this.localAddress,requestTimeout:r.requestTimeout||this.requestTimeout,protocols:r.protocols||void 0,isReactNative:this.isReactNative});return n};function Gr(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}k.prototype.open=function(){var e;if(this.rememberUpgrade&&k.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)e="websocket";else if(this.transports.length===0){var t=this;setTimeout(function(){t.emit("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)};k.prototype.setTransport=function(e){O("setting transport %s",e.name);var t=this;this.transport&&(O("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=e,e.on("drain",function(){t.onDrain()}).on("packet",function(r){t.onPacket(r)}).on("error",function(r){t.onError(r)}).on("close",function(){t.onClose("transport close")})};k.prototype.probe=function(e){O('probing transport "%s"',e);var t=this.createTransport(e,{probe:1}),r=!1,n=this;k.priorWebsocketSuccess=!1;function i(){if(n.onlyBinaryUpgrades){var g=!this.supportsBinary&&n.transport.supportsBinary;r=r||g}r||(O('probe transport "%s" opened',e),t.send([{type:"ping",data:"probe"}]),t.once("packet",function(d){if(!r)if(d.type==="pong"&&d.data==="probe"){if(O('probe transport "%s" pong',e),n.upgrading=!0,n.emit("upgrading",t),!t)return;k.priorWebsocketSuccess=t.name==="websocket",O('pausing current transport "%s"',n.transport.name),n.transport.pause(function(){r||n.readyState!=="closed"&&(O("changing transport and sending upgrade packet"),p(),n.setTransport(t),t.send([{type:"upgrade"}]),n.emit("upgrade",t),t=null,n.upgrading=!1,n.flush())})}else{O('probe transport "%s" failed',e);var a=new Error("probe error");a.transport=t.name,n.emit("upgradeError",a)}}))}function o(){r||(r=!0,p(),t.close(),t=null)}function s(g){var d=new Error("probe error: "+g);d.transport=t.name,o(),O('probe transport "%s" failed because of error: %s',e,g),n.emit("upgradeError",d)}function u(){s("transport closed")}function l(){s("socket closed")}function f(g){t&&g.name!==t.name&&(O('"%s" works - aborting "%s"',g.name,t.name),o())}function p(){t.removeListener("open",i),t.removeListener("error",s),t.removeListener("close",u),n.removeListener("close",l),n.removeListener("upgrading",f)}t.once("open",i),t.once("error",s),t.once("close",u),this.once("close",l),this.once("upgrading",f),t.open()};k.prototype.onOpen=function(){if(O("socket open"),this.readyState="open",k.priorWebsocketSuccess=this.transport.name==="websocket",this.emit("open"),this.flush(),this.readyState==="open"&&this.upgrade&&this.transport.pause){O("starting upgrade probes");for(var e=0,t=this.upgrades.length;e<t;e++)this.probe(this.upgrades[e])}};k.prototype.onPacket=function(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(O('socket receive: type "%s", data "%s"',e.type,e.data),this.emit("packet",e),this.emit("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emit("data",e.data),this.emit("message",e.data);break}else O('packet received with socket readyState "%s"',this.readyState)};k.prototype.onHandshake=function(e){this.emit("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.onOpen(),this.readyState!=="closed"&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))};k.prototype.onHeartbeat=function(e){clearTimeout(this.pingTimeoutTimer);var t=this;t.pingTimeoutTimer=setTimeout(function(){t.readyState!=="closed"&&t.onClose("ping timeout")},e||t.pingInterval+t.pingTimeout)};k.prototype.setPing=function(){var e=this;clearTimeout(e.pingIntervalTimer),e.pingIntervalTimer=setTimeout(function(){O("writing ping packet - expecting pong within %sms",e.pingTimeout),e.ping(),e.onHeartbeat(e.pingTimeout)},e.pingInterval)};k.prototype.ping=function(){var e=this;this.sendPacket("ping",function(){e.emit("ping")})};k.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emit("drain"):this.flush()};k.prototype.flush=function(){this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(O("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))};k.prototype.write=k.prototype.send=function(e,t,r){return this.sendPacket("message",e,t,r),this};k.prototype.sendPacket=function(e,t,r,n){if(typeof t=="function"&&(n=t,t=void 0),typeof r=="function"&&(n=r,r=null),!(this.readyState==="closing"||this.readyState==="closed")){r=r||{},r.compress=r.compress!==!1;var i={type:e,data:t,options:r};this.emit("packetCreate",i),this.writeBuffer.push(i),n&&this.once("flush",n),this.flush()}};k.prototype.close=function(){if(this.readyState==="opening"||this.readyState==="open"){this.readyState="closing";var e=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?n():t()}):this.upgrading?n():t()}function t(){e.onClose("forced close"),O("socket closing - telling transport to close"),e.transport.close()}function r(){e.removeListener("upgrade",r),e.removeListener("upgradeError",r),t()}function n(){e.once("upgrade",r),e.once("upgradeError",r)}return this};k.prototype.onError=function(e){O("socket error %j",e),k.priorWebsocketSuccess=!1,this.emit("error",e),this.onClose("transport error",e)};k.prototype.onClose=function(e,t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){O('socket close with reason: "%s"',e);var r=this;clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",e,t),r.writeBuffer=[],r.prevBufferLen=0}};k.prototype.filterUpgrades=function(e){for(var t=[],r=0,n=e.length;r<n;r++)~Vr(this.transports,e[r])&&t.push(e[r]);return t};Oe.exports=jr;Oe.exports.parser=V;var Qr=Oe.exports,wt={exports:{}},Zr=en;function en(e,t){var r=[];t=t||0;for(var n=t||0;n<e.length;n++)r[n-t]=e[n];return r}var Ct=tn;function tn(e,t,r){return e.on(t,r),{destroy:function(){e.removeListener(t,r)}}}var Ze=[].slice,Bt=function(e,t){if(typeof t=="string"&&(t=e[t]),typeof t!="function")throw new Error("bind() requires a function");var r=Ze.call(arguments,2);return function(){return t.apply(e,r.concat(Ze.call(arguments)))}};(function(e,t){var r=ve,n=Q,i=Zr,o=Ct,s=Bt,u=L("socket.io-client:socket"),l=Z,f=ct;e.exports=d;var p={connect:1,connect_error:1,connect_timeout:1,connecting:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1,ping:1,pong:1},g=n.prototype.emit;function d(a,E,F){this.io=a,this.nsp=E,this.json=this,this.ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,this.flags={},F&&F.query&&(this.query=F.query),this.io.autoConnect&&this.open()}n(d.prototype),d.prototype.subEvents=function(){if(!this.subs){var a=this.io;this.subs=[o(a,"open",s(this,"onopen")),o(a,"packet",s(this,"onpacket")),o(a,"close",s(this,"onclose"))]}},d.prototype.open=d.prototype.connect=function(){return this.connected?this:(this.subEvents(),this.io.reconnecting||this.io.open(),this.io.readyState==="open"&&this.onopen(),this.emit("connecting"),this)},d.prototype.send=function(){var a=i(arguments);return a.unshift("message"),this.emit.apply(this,a),this},d.prototype.emit=function(a){if(p.hasOwnProperty(a))return g.apply(this,arguments),this;var E=i(arguments),F={type:(this.flags.binary!==void 0?this.flags.binary:f(E))?r.BINARY_EVENT:r.EVENT,data:E};return F.options={},F.options.compress=!this.flags||this.flags.compress!==!1,typeof E[E.length-1]=="function"&&(u("emitting packet with ack id %d",this.ids),this.acks[this.ids]=E.pop(),F.id=this.ids++),this.connected?this.packet(F):this.sendBuffer.push(F),this.flags={},this},d.prototype.packet=function(a){a.nsp=this.nsp,this.io.packet(a)},d.prototype.onopen=function(){if(u("transport is open - connecting"),this.nsp!=="/")if(this.query){var a=typeof this.query=="object"?l.encode(this.query):this.query;u("sending connect packet with query %s",a),this.packet({type:r.CONNECT,query:a})}else this.packet({type:r.CONNECT})},d.prototype.onclose=function(a){u("close (%s)",a),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",a)},d.prototype.onpacket=function(a){var E=a.nsp===this.nsp,F=a.type===r.ERROR&&a.nsp==="/";if(!(!E&&!F))switch(a.type){case r.CONNECT:this.onconnect();break;case r.EVENT:this.onevent(a);break;case r.BINARY_EVENT:this.onevent(a);break;case r.ACK:this.onack(a);break;case r.BINARY_ACK:this.onack(a);break;case r.DISCONNECT:this.ondisconnect();break;case r.ERROR:this.emit("error",a.data);break}},d.prototype.onevent=function(a){var E=a.data||[];u("emitting event %j",E),a.id!=null&&(u("attaching ack callback to event"),E.push(this.ack(a.id))),this.connected?g.apply(this,E):this.receiveBuffer.push(E)},d.prototype.ack=function(a){var E=this,F=!1;return function(){if(!F){F=!0;var h=i(arguments);u("sending ack %j",h),E.packet({type:f(h)?r.BINARY_ACK:r.ACK,id:a,data:h})}}},d.prototype.onack=function(a){var E=this.acks[a.id];typeof E=="function"?(u("calling ack %s with %j",a.id,a.data),E.apply(this,a.data),delete this.acks[a.id]):u("bad ack %s",a.id)},d.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},d.prototype.emitBuffered=function(){var a;for(a=0;a<this.receiveBuffer.length;a++)g.apply(this,this.receiveBuffer[a]);for(this.receiveBuffer=[],a=0;a<this.sendBuffer.length;a++)this.packet(this.sendBuffer[a]);this.sendBuffer=[]},d.prototype.ondisconnect=function(){u("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},d.prototype.destroy=function(){if(this.subs){for(var a=0;a<this.subs.length;a++)this.subs[a].destroy();this.subs=null}this.io.destroy(this)},d.prototype.close=d.prototype.disconnect=function(){return this.connected&&(u("performing disconnect (%s)",this.nsp),this.packet({type:r.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},d.prototype.compress=function(a){return this.flags.compress=a,this},d.prototype.binary=function(a){return this.flags.binary=a,this}})(wt);var At=wt.exports,rn=re;function re(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}re.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),r=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+r:e-r}return Math.min(e,this.max)|0};re.prototype.reset=function(){this.attempts=0};re.prototype.setMin=function(e){this.ms=e};re.prototype.setMax=function(e){this.max=e};re.prototype.setJitter=function(e){this.jitter=e};var nn=Qr,on=At,sn=Q,an=ve,H=Ct,j=Bt,_=L("socket.io-client:manager"),kt=mt,cn=rn,Ft=Object.prototype.hasOwnProperty,et=x;function x(e,t){if(!(this instanceof x))return new x(e,t);e&&typeof e=="object"&&(t=e,e=void 0),t=t||{},t.path=t.path||"/socket.io",this.nsps={},this.subs=[],this.opts=t,this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(t.randomizationFactor||.5),this.backoff=new cn({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this.readyState="closed",this.uri=e,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var r=t.parser||an;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this.autoConnect=t.autoConnect!==!1,this.autoConnect&&this.open()}x.prototype.emitAll=function(){this.emit.apply(this,arguments);for(var e in this.nsps)Ft.call(this.nsps,e)&&this.nsps[e].emit.apply(this.nsps[e],arguments)};x.prototype.updateSocketIds=function(){for(var e in this.nsps)Ft.call(this.nsps,e)&&(this.nsps[e].id=this.generateId(e))};x.prototype.generateId=function(e){return(e==="/"?"":e+"#")+this.engine.id};sn(x.prototype);x.prototype.reconnection=function(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection};x.prototype.reconnectionAttempts=function(e){return arguments.length?(this._reconnectionAttempts=e,this):this._reconnectionAttempts};x.prototype.reconnectionDelay=function(e){return arguments.length?(this._reconnectionDelay=e,this.backoff&&this.backoff.setMin(e),this):this._reconnectionDelay};x.prototype.randomizationFactor=function(e){return arguments.length?(this._randomizationFactor=e,this.backoff&&this.backoff.setJitter(e),this):this._randomizationFactor};x.prototype.reconnectionDelayMax=function(e){return arguments.length?(this._reconnectionDelayMax=e,this.backoff&&this.backoff.setMax(e),this):this._reconnectionDelayMax};x.prototype.timeout=function(e){return arguments.length?(this._timeout=e,this):this._timeout};x.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()};x.prototype.open=x.prototype.connect=function(e,t){if(_("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;_("opening %s",this.uri),this.engine=nn(this.uri,this.opts);var r=this.engine,n=this;this.readyState="opening",this.skipReconnect=!1;var i=H(r,"open",function(){n.onopen(),e&&e()}),o=H(r,"error",function(l){if(_("connect_error"),n.cleanup(),n.readyState="closed",n.emitAll("connect_error",l),e){var f=new Error("Connection error");f.data=l,e(f)}else n.maybeReconnectOnOpen()});if(this._timeout!==!1){var s=this._timeout;_("connect attempt will timeout after %d",s),s===0&&i.destroy();var u=setTimeout(function(){_("connect attempt timed out after %d",s),i.destroy(),r.close(),r.emit("error","timeout"),n.emitAll("connect_timeout",s)},s);this.subs.push({destroy:function(){clearTimeout(u)}})}return this.subs.push(i),this.subs.push(o),this};x.prototype.onopen=function(){_("open"),this.cleanup(),this.readyState="open",this.emit("open");var e=this.engine;this.subs.push(H(e,"data",j(this,"ondata"))),this.subs.push(H(e,"ping",j(this,"onping"))),this.subs.push(H(e,"pong",j(this,"onpong"))),this.subs.push(H(e,"error",j(this,"onerror"))),this.subs.push(H(e,"close",j(this,"onclose"))),this.subs.push(H(this.decoder,"decoded",j(this,"ondecoded")))};x.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")};x.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)};x.prototype.ondata=function(e){this.decoder.add(e)};x.prototype.ondecoded=function(e){this.emit("packet",e)};x.prototype.onerror=function(e){_("error",e),this.emitAll("error",e)};x.prototype.socket=function(e,t){var r=this.nsps[e];if(!r){r=new on(this,e,t),this.nsps[e]=r;var n=this;r.on("connecting",i),r.on("connect",function(){r.id=n.generateId(e)}),this.autoConnect&&i()}function i(){~kt(n.connecting,r)||n.connecting.push(r)}return r};x.prototype.destroy=function(e){var t=kt(this.connecting,e);~t&&this.connecting.splice(t,1),!this.connecting.length&&this.close()};x.prototype.packet=function(e){_("writing packet %j",e);var t=this;e.query&&e.type===0&&(e.nsp+="?"+e.query),t.encoding?t.packetBuffer.push(e):(t.encoding=!0,this.encoder.encode(e,function(r){for(var n=0;n<r.length;n++)t.engine.write(r[n],e.options);t.encoding=!1,t.processPacketQueue()}))};x.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var e=this.packetBuffer.shift();this.packet(e)}};x.prototype.cleanup=function(){_("cleanup");for(var e=this.subs.length,t=0;t<e;t++){var r=this.subs.shift();r.destroy()}this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()};x.prototype.close=x.prototype.disconnect=function(){_("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,this.readyState==="opening"&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()};x.prototype.onclose=function(e){_("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",e),this._reconnection&&!this.skipReconnect&&this.reconnect()};x.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var e=this;if(this.backoff.attempts>=this._reconnectionAttempts)_("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var t=this.backoff.duration();_("will wait %dms before reconnect attempt",t),this.reconnecting=!0;var r=setTimeout(function(){e.skipReconnect||(_("attempting reconnect"),e.emitAll("reconnect_attempt",e.backoff.attempts),e.emitAll("reconnecting",e.backoff.attempts),!e.skipReconnect&&e.open(function(n){n?(_("reconnect attempt error"),e.reconnecting=!1,e.reconnect(),e.emitAll("reconnect_error",n.data)):(_("reconnect success"),e.onreconnect())}))},t);this.subs.push({destroy:function(){clearTimeout(r)}})}};x.prototype.onreconnect=function(){var e=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",e)};(function(e,t){var r=zt,n=ve,i=et,o=L("socket.io-client");e.exports=t=u;var s=t.managers={};function u(l,f){typeof l=="object"&&(f=l,l=void 0),f=f||{};var p=r(l),g=p.source,d=p.id,a=p.path,E=s[d]&&a in s[d].nsps,F=f.forceNew||f["force new connection"]||f.multiplex===!1||E,h;return F?(o("ignoring socket cache for %s",g),h=i(g,f)):(s[d]||(o("new io instance for %s",g),s[d]=i(g,f)),h=s[d]),p.query&&!f.query&&(f.query=p.query),h.socket(p.path,f)}t.protocol=n.protocol,t.connect=u,t.Manager=et,t.Socket=At})(Ae,Ae.exports);var fn=Ae.exports;const un=Nt(fn);var St=null;ne&&(St={user_id:ne.IDDonVi,full_name:ne.TenDonVi,avatar:ne.HinhAnh,account_id:ne.MaTaiKhoan,time:new Date,app_id:"baocaostc"});const hn=St,I=class I{static connect_server(){I.connection.emit("connect_server",hn)}static onSocket(t,r){I.connection.on(t,n=>r(n))}static onNewNotify(t){I.onSocket("newNotify",t)}static onReloadNotify(t){I.onSocket("loadNotify",t)}static onGetUserOnline(t){I.onSocket("getUserOnline",t)}static emitSocket(t,r){I.connection.emit(t,r)}static emitSubscribeTopic(t){I.emitSocket("subscribeTopic",t)}static emitUnSubscribeTopic(t){I.emitSocket("unSubscribeTopic",t)}static emitSendNotify(t){I.emitSocket("sendNotify",t)}static emitFlagLoadNotify(t){I.emitSocket("flagLoadNotify",t)}};He(I,"connection",un(Rt,{path:Tt}));let tt=I;export{tt as S};