vendor: 6,057 bytes, line 1
1import{g as Ct}from"./vendor-react-BGN68_Lp.js";const x=Object.create(null);x.open="0";x.close="1";x.ping="2";x.pong="3";x.message="4";x.upgrade="5";x.noop="6";const L=Object.create(null);Object.keys(x).forEach(i=>{L[x[i]]=i});const z={type:"error",data:"parser error"},lt=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",pt=typeof ArrayBuffer=="function",dt=i=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(i):i&&i.buffer instanceof ArrayBuffer,j=({type:i,data:t},e,s)=>lt&&t instanceof Blob?e?s(t):st(t,s):pt&&(t instanceof ArrayBuffer||dt(t))?e?s(t):st(new Blob([t]),s):s(x[i]+(t||"")),st=(i,t)=>{const e=new FileReader;return e.onload=function(){const s=e.result.split(",")[1];t("b"+(s||""))},e.readAsDataURL(i)};function it(i){return i instanceof Uint8Array?i:i instanceof ArrayBuffer?new Uint8Array(i):new Uint8Array(i.buffer,i.byteOffset,i.byteLength)}let F;function Ot(i,t){if(lt&&i.data instanceof Blob)return i.data.arrayBuffer().then(it).then(t);if(pt&&(i.data instanceof ArrayBuffer||dt(i.data)))return t(it(i.data));j(i,!1,e=>{F||(F=new TextEncoder),t(F.encode(e))})}const rt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",O=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let i=0;i<rt.length;i++)O[rt.charCodeAt(i)]=i;const Tt=i=>{let t=i.length*.75,e=i.length,s,r=0,n,o,h,a;i[i.length-1]==="="&&(t--,i[i.length-2]==="="&&t--);const f=new ArrayBuffer(t),u=new Uint8Array(f);for(s=0;s<e;s+=4)n=O[i.charCodeAt(s)],o=O[i.charCodeAt(s+1)],h=O[i.charCodeAt(s+2)],a=O[i.charCodeAt(s+3)],u[r++]=n<<2|o>>4,u[r++]=(o&15)<<4|h>>2,u[r++]=(h&3)<<6|a&63;return f},Rt=typeof ArrayBuffer=="function",G=(i,t)=>{if(typeof i!="string")return{type:"message",data:_t(i,t)};const e=i.charAt(0);return e==="b"?{type:"message",data:St(i.substring(1),t)}:L[e]?i.length>1?{type:L[e],data:i.substring(1)}:{type:L[e]}:z},St=(i,t)=>{if(Rt){const e=Tt(i);return _t(e,t)}else return{base64:!0,data:i}},_t=(i,t)=>t==="blob"?i instanceof Blob?i:new Blob([i]):i instanceof ArrayBuffer?i:i.buffer,gt="�",Nt=(i,t)=>{const e=i.length,s=new Array(e);let r=0;i.forEach((n,o)=>{j(n,!1,h=>{s[o]=h,++r===e&&t(s.join(gt))})})},Bt=(i,t)=>{const e=i.split(gt),s=[];for(let r=0;r<e.length;r++){const n=G(e[r],t);if(s.push(n),n.type==="error")break}return s};function Lt(){return new TransformStream({transform(i,t){Ot(i,e=>{const s=e.length;let r;if(s<126)r=new Uint8Array(1),new DataView(r.buffer).setUint8(0,s);else if(s<65536){r=new Uint8Array(3);const n=new DataView(r.buffer);n.setUint8(0,126),n.setUint16(1,s)}else{r=new Uint8Array(9);const n=new DataView(r.buffer);n.setUint8(0,127),n.setBigUint64(1,BigInt(s))}i.data&&typeof i.data!="string"&&(r[0]|=128),t.enqueue(r),t.enqueue(e)})}})}let V;function S(i){return i.reduce((t,e)=>t+e.length,0)}function N(i,t){if(i[0].length===t)return i.shift();const e=new Uint8Array(t);let s=0;for(let r=0;r<t;r++)e[r]=i[0][s++],s===i[0].length&&(i.shift(),s=0);return i.length&&s<i[0].length&&(i[0]=i[0].slice(s)),e}function Ut(i,t){V||(V=new TextDecoder);const e=[];let s=0,r=-1,n=!1;return new TransformStream({transform(o,h){for(e.push(o);;){if(s===0){if(S(e)<1)break;const a=N(e,1);n=(a[0]&128)===128,r=a[0]&127,r<126?s=3:r===126?s=1:s=2}else if(s===1){if(S(e)<2)break;const a=N(e,2);r=new DataView(a.buffer,a.byteOffset,a.length).getUint16(0),s=3}else if(s===2){if(S(e)<8)break;const a=N(e,8),f=new DataView(a.buffer,a.byteOffset,a.length),u=f.getUint32(0);if(u>Math.pow(2,21)-1){h.enqueue(z);break}r=u*Math.pow(2,32)+f.getUint32(4),s=3}else{if(S(e)<r)break;const a=N(e,r);h.enqueue(G(n?a:V.decode(a),t)),s=0}if(r===0||r>i){h.enqueue(z);break}}}})}const yt=4;function _(i){if(i)return qt(i)}function qt(i){for(var t in _.prototype)i[t]=_.prototype[t];return i}_.prototype.on=_.prototype.addEventListener=function(i,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+i]=this._callbacks["$"+i]||[]).push(t),this};_.prototype.once=function(i,t){function e(){this.off(i,e),t.apply(this,arguments)}return e.fn=t,this.on(i,e),this};_.prototype.off=_.prototype.removeListener=_.prototype.removeAllListeners=_.prototype.removeEventListener=function(i,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var e=this._callbacks["$"+i];if(!e)return this;if(arguments.length==1)return delete this._callbacks["$"+i],this;for(var s,r=0;r<e.length;r++)if(s=e[r],s===t||s.fn===t){e.splice(r,1);break}return e.length===0&&delete this._callbacks["$"+i],this};_.prototype.emit=function(i){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),e=this._callbacks["$"+i],s=1;s<arguments.length;s++)t[s-1]=arguments[s];if(e){e=e.slice(0);for(var s=0,r=e.length;s<r;++s)e[s].apply(this,t)}return this};_.prototype.emitReserved=_.prototype.emit;_.prototype.listeners=function(i){return this._callbacks=this._callbacks||{},this._callbacks["$"+i]||[]};_.prototype.hasListeners=function(i){return!!this.listeners(i).length};const I=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,e)=>e(t,0),y=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Pt="arraybuffer";function mt(i,...t){return t.reduce((e,s)=>(i.hasOwnProperty(s)&&(e[s]=i[s]),e),{})}const It=y.setTimeout,Dt=y.clearTimeout;function D(i,t){t.useNativeTimers?(i.setTimeoutFn=It.bind(y),i.clearTimeoutFn=Dt.bind(y)):(i.setTimeoutFn=y.setTimeout.bind(y),i.clearTimeoutFn=y.clearTimeout.bind(y))}const Ft=1.33;function Vt(i){return typeof i=="string"?Mt(i):Math.ceil((i.byteLength||i.size)*Ft)}function Mt(i){let t=0,e=0;for(let s=0,r=i.length;s<r;s++)t=i.charCodeAt(s),t<128?e+=1:t<2048?e+=2:t<55296||t>=57344?e+=3:(s++,e+=4);return e}function wt(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Ht(i){let t="";for(let e in i)i.hasOwnProperty(e)&&(t.length&&(t+="&"),t+=encodeURIComponent(e)+"="+encodeURIComponent(i[e]));return t}function $t(i){let t={},e=i.split("&");for(let s=0,r=e.length;s<r;s++){let n=e[s].split("=");
vendor: 6,241 bytes, line 1
1t[decodeURIComponent(n[0])]=decodeURIComponent(n[1])}return t}class Wt extends Error{constructor(t,e,s){super(t),this.description=e,this.context=s,this.type="TransportError"}}class Z extends _{constructor(t){super(),this.writable=!1,D(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,e,s){return super.emitReserved("error",new Wt(t,e,s)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const e=G(t,this.socket.binaryType);this.onPacket(e)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,e={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(e)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const e=Ht(t);return e.length?"?"+e:""}}class Kt extends Z{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const e=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let s=0;this._polling&&(s++,this.once("pollComplete",function(){--s||e()})),this.writable||(s++,this.once("drain",function(){--s||e()}))}else e()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const e=s=>{if(this.readyState==="opening"&&s.type==="open"&&this.onOpen(),s.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(s)};Bt(t,this.socket.binaryType).forEach(e),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,Nt(t,e=>{this.doWrite(e,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",e=this.query||{};return this.opts.timestampRequests!==!1&&(e[this.opts.timestampParam]=wt()),!this.supportsBinary&&!e.sid&&(e.b64=1),this.createUri(t,e)}}let xt=!1;try{xt=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const zt=xt;function Jt(){}class Yt extends Kt{constructor(t){if(super(t),typeof location<"u"){const e=location.protocol==="https:";let s=location.port;s||(s=e?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||s!==t.port}}doWrite(t,e){const s=this.request({method:"POST",data:t});s.on("success",e),s.on("error",(r,n)=>{this.onError("xhr post error",r,n)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(e,s)=>{this.onError("xhr poll error",e,s)}),this.pollXhr=t}}class w extends _{constructor(t,e,s){super(),this.createRequest=t,D(this,s),this._opts=s,this._method=s.method||"GET",this._uri=e,this._data=s.data!==void 0?s.data:null,this._create()}_create(){var t;const e=mt(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this._opts.xd;const s=this._xhr=this.createRequest(e);try{s.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0);for(let r in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(r)&&s.setRequestHeader(r,this._opts.extraHeaders[r])}}catch{}if(this._method==="POST")try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{s.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(s),"withCredentials"in s&&(s.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(s.timeout=this._opts.requestTimeout),s.onreadystatechange=()=>{var r;s.readyState===3&&((r=this._opts.cookieJar)===null||r===void 0||r.parseCookies(s.getResponseHeader("set-cookie"))),s.readyState===4&&(s.status===200||s.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof s.status=="number"?s.status:0)},0))},s.send(this._data)}catch(r){this.setTimeoutFn(()=>{this._onError(r)},0);return}typeof document<"u"&&(this._index=w.requestsCount++,w.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Jt,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete w.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}w.requestsCount=0;w.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",nt);else if(typeof addEventListener=="function"){const i="onpagehide"in y?"pagehide":"unload";addEventListener(i,nt,!1)}}function nt(){for(let i in w.requests)w.requests.hasOwnProperty(i)&&w.requests[i].abort()}const Xt=(function(){const i=bt({xdomain:!1});return i&&i.responseType!==null})();class Qt extends Yt{constructor(t){super(t);const e=t&&t.forceBase64;this.supportsBinary=Xt&&!e}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new w(bt,this.uri(),t)}}function bt(i){const t=i.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||zt))return new XMLHttpRequest}catch{}if(!t)try{return new y[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const vt=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class jt extends Z{get name(){return"websocket"}doOpen(){const t=this.uri(),e=this.opts.protocols,s=vt?{}:mt(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,e,s)}catch(r){return this.emitReserved("error",r)}
vendor: 10,291 bytes, line 1
1this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let e=0;e<t.length;e++){const s=t[e],r=e===t.length-1;j(s,this.supportsBinary,n=>{try{this.doWrite(s,n)}catch{}r&&I(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",e=this.query||{};return this.opts.timestampRequests&&(e[this.opts.timestampParam]=wt()),this.supportsBinary||(e.b64=1),this.createUri(t,e)}}const M=y.WebSocket||y.MozWebSocket;class Gt extends jt{createSocket(t,e,s){return vt?new M(t,e,s):e?new M(t,e):new M(t)}doWrite(t,e){this.ws.send(e)}}class Zt extends Z{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const e=Ut(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=t.readable.pipeThrough(e).getReader(),r=Lt();r.readable.pipeTo(t.writable),this._writer=r.writable.getWriter();const n=()=>{s.read().then(({done:h,value:a})=>{h||(this.onPacket(a),n())}).catch(h=>{})};n();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let e=0;e<t.length;e++){const s=t[e],r=e===t.length-1;this._writer.write(s).then(()=>{r&&I(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const te={websocket:Gt,webtransport:Zt,polling:Qt},ee=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,se=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function J(i){if(i.length>8e3)throw"URI too long";const t=i,e=i.indexOf("["),s=i.indexOf("]");e!=-1&&s!=-1&&(i=i.substring(0,e)+i.substring(e,s).replace(/:/g,";")+i.substring(s,i.length));let r=ee.exec(i||""),n={},o=14;for(;o--;)n[se[o]]=r[o]||"";return e!=-1&&s!=-1&&(n.source=t,n.host=n.host.substring(1,n.host.length-1).replace(/;/g,":"),n.authority=n.authority.replace("[","").replace("]","").replace(/;/g,":"),n.ipv6uri=!0),n.pathNames=ie(n,n.path),n.queryKey=re(n,n.query),n}function ie(i,t){const e=/\/{2,9}/g,s=t.replace(e,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&s.splice(0,1),t.slice(-1)=="/"&&s.splice(s.length-1,1),s}function re(i,t){const e={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,r,n){r&&(e[r]=n)}),e}const Y=typeof addEventListener=="function"&&typeof removeEventListener=="function",U=[];Y&&addEventListener("offline",()=>{U.forEach(i=>i())},!1);class v extends _{constructor(t,e){if(super(),this.binaryType=Pt,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(e=t,t=null),t){const s=J(t);e.hostname=s.host,e.secure=s.protocol==="https"||s.protocol==="wss",e.port=s.port,s.query&&(e.query=s.query)}else e.host&&(e.hostname=J(e.host).host);D(this,e),this.secure=e.secure!=null?e.secure:typeof location<"u"&&location.protocol==="https:",e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.hostname=e.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=e.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},e.transports.forEach(s=>{const r=s.prototype.name;this.transports.push(r),this._transportsByName[r]=s}),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},e),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=$t(this.opts.query)),Y&&(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"})},U.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const e=Object.assign({},this.opts.query);e.EIO=yt,e.transport=t,this.id&&(e.sid=this.id);const s=Object.assign({},this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](s)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&v.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const e=this.createTransport(t);e.open(),this.setTransport(e)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",e=>this._onClose("transport close",e))}onOpen(){this.readyState="open",v.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const e=new Error("server error");e.code=t.data,this._onError(e);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),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 t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let s=0;s<this.writeBuffer.length;s++){const r=this.writeBuffer[s].data;if(r&&(e+=Vt(r)),s>0&&e>this._maxPayload)return this.writeBuffer.slice(0,s);e+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,I(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,e,s){return this._sendPacket("message",t,e,s),this}send(t,e,s){return this._sendPacket("message",t,e,s),this}_sendPacket(t,e,s,r){if(typeof e=="function"&&(r=e,e=void 0),typeof s=="function"&&(r=s,s=null),this.readyState==="closing"||this.readyState==="closed")return;s=s||{},s.compress=s.compress!==!1;const n={type:t,data:e,options:s};this.emitReserved("packetCreate",n),this.writeBuffer.push(n),r&&this.once("flush",r),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},e=()=>{this.off("upgrade",e),this.off("upgradeError",e),t()},s=()=>{this.once("upgrade",e),this.once("upgradeError",e)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():t()}):this.upgrading?s():t()),this}_onError(t){if(v.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Y&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const s=U.indexOf(this._offlineEventListener);s!==-1&&U.splice(s,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this._prevBufferLen=0}}}v.protocol=yt;class ne extends v{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let e=this.createTransport(t),s=!1;v.priorWebsocketSuccess=!1;const r=()=>{s||(e.send([{type:"ping",data:"probe"}]),e.once("packet",p=>{if(!s)if(p.type==="pong"&&p.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",e),!e)return;v.priorWebsocketSuccess=e.name==="websocket",this.transport.pause(()=>{s||this.readyState!=="closed"&&(u(),this.setTransport(e),e.send([{type:"upgrade"}
vendor: 10,475 bytes, line 1
1]),this.emitReserved("upgrade",e),e=null,this.upgrading=!1,this.flush())})}else{const c=new Error("probe error");c.transport=e.name,this.emitReserved("upgradeError",c)}}))};function n(){s||(s=!0,u(),e.close(),e=null)}const o=p=>{const c=new Error("probe error: "+p);c.transport=e.name,n(),this.emitReserved("upgradeError",c)};function h(){o("transport closed")}function a(){o("socket closed")}function f(p){e&&p.name!==e.name&&n()}const u=()=>{e.removeListener("open",r),e.removeListener("error",o),e.removeListener("close",h),this.off("close",a),this.off("upgrading",f)};e.once("open",r),e.once("error",o),e.once("close",h),this.once("close",a),this.once("upgrading",f),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{s||e.open()},200):e.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const e=[];for(let s=0;s<t.length;s++)~this.transports.indexOf(t[s])&&e.push(t[s]);return e}}let oe=class extends ne{constructor(t,e={}){const s=typeof t=="object",r=s?{...t}:{...e};(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(n=>te[n]).filter(n=>!!n)),super(s?r:t,r)}};function he(i,t="",e){let s=i;e=e||typeof location<"u"&&location,i==null&&(i=e.protocol+"//"+e.host),typeof i=="string"&&(i.charAt(0)==="/"&&(i.charAt(1)==="/"?i=e.protocol+i:i=e.host+i),/^(https?|wss?):\/\//.test(i)||(typeof e<"u"?i=e.protocol+"//"+i:i="https://"+i),s=J(i)),s.port||(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";const n=s.host.indexOf(":")!==-1?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+n+":"+s.port+t,s.href=s.protocol+"://"+n+(e&&e.port===s.port?"":":"+s.port),s}const ae=typeof ArrayBuffer=="function",ce=i=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(i):i.buffer instanceof ArrayBuffer,Et=Object.prototype.toString,fe=typeof Blob=="function"||typeof Blob<"u"&&Et.call(Blob)==="[object BlobConstructor]",ue=typeof File=="function"||typeof File<"u"&&Et.call(File)==="[object FileConstructor]";function tt(i){return ae&&(i instanceof ArrayBuffer||ce(i))||fe&&i instanceof Blob||ue&&i instanceof File}function q(i,t){if(!i||typeof i!="object")return!1;if(Array.isArray(i)){for(let e=0,s=i.length;e<s;e++)if(q(i[e]))return!0;return!1}if(tt(i))return!0;if(i.toJSON&&typeof i.toJSON=="function"&&arguments.length===1)return q(i.toJSON(),!0);for(const e in i)if(Object.prototype.hasOwnProperty.call(i,e)&&q(i[e]))return!0;return!1}function le(i){const t=[],e=i.data,s=i;return s.data=P(e,t),s.attachments=t.length,{packet:s,buffers:t}}function P(i,t,e){if(!i)return i;if(tt(i)){const s={_placeholder:!0,num:t.length};return t.push(i),s}else if(Array.isArray(i)){const s=new Array(i.length);for(let r=0;r<i.length;r++)s[r]=P(i[r],t);return s}else if(typeof i=="object"&&!(i instanceof Date)){if(i.toJSON&&typeof i.toJSON=="function"&&!e)return P(i.toJSON(),t,!0);const s={};for(const r in i)Object.prototype.hasOwnProperty.call(i,r)&&(s[r]=P(i[r],t));return s}return i}function pe(i,t){return i.data=X(i.data,t),delete i.attachments,i}function X(i,t){if(!i)return i;if(i&&i._placeholder===!0){if(typeof i.num=="number"&&i.num>=0&&i.num<t.length)return t[i.num];throw new Error("illegal attachments")}else if(Array.isArray(i))for(let e=0;e<i.length;e++)i[e]=X(i[e],t);else if(typeof i=="object")for(const e in i)Object.prototype.hasOwnProperty.call(i,e)&&(i[e]=X(i[e],t));return i}const de=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var l;(function(i){i[i.CONNECT=0]="CONNECT",i[i.DISCONNECT=1]="DISCONNECT",i[i.EVENT=2]="EVENT",i[i.ACK=3]="ACK",i[i.CONNECT_ERROR=4]="CONNECT_ERROR",i[i.BINARY_EVENT=5]="BINARY_EVENT",i[i.BINARY_ACK=6]="BINARY_ACK"})(l||(l={}));class _e{constructor(t){this.replacer=t}encode(t){return(t.type===l.EVENT||t.type===l.ACK)&&q(t)?this.encodeAsBinary({type:t.type===l.EVENT?l.BINARY_EVENT:l.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let e=""+t.type;return(t.type===l.BINARY_EVENT||t.type===l.BINARY_ACK)&&(e+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(e+=t.nsp+","),t.id!=null&&(e+=t.id),t.data!=null&&(e+=JSON.stringify(t.data,this.replacer)),e}encodeAsBinary(t){const e=le(t),s=this.encodeAsString(e.packet),r=e.buffers;return r.unshift(s),r}}class et extends _{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let e;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");e=this.decodeString(t);const s=e.type===l.BINARY_EVENT;s||e.type===l.BINARY_ACK?(e.type=s?l.EVENT:l.ACK,this.reconstructor=new ge(e)):super.emitReserved("decoded",e)}else if(tt(t)||t.base64)if(this.reconstructor)e=this.reconstructor.takeBinaryData(t),e&&(this.reconstructor=null,super.emitReserved("decoded",e));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let e=0;const s={type:Number(t.charAt(0))};if(l[s.type]===void 0)throw new Error("unknown packet type "+s.type);if(s.type===l.BINARY_EVENT||s.type===l.BINARY_ACK){const n=e+1;for(;t.charAt(++e)!=="-"&&e!=t.length;);const o=t.substring(n,e);if(o!=Number(o)||t.charAt(e)!=="-")throw new Error("Illegal attachments");const h=Number(o);if(!ye(h)||h<1)throw new Error("Illegal attachments");if(h>this.opts.maxAttachments)throw new Error("too many attachments");s.attachments=h}if(t.charAt(e+1)==="/"){const n=e+1;for(;++e&&!(t.charAt(e)===","||e===t.length););s.nsp=t.substring(n,e)}else s.nsp="/";const r=t.charAt(e+1);if(r!==""&&Number(r)==r){const n=e+1;for(;++e;){const o=t.charAt(e);if(o==null||Number(o)!=o){--e;break}if(e===t.length)break}s.id=Number(t.substring(n,e+1))}if(t.charAt(++e)){const n=this.tryParse(t.substr(e));if(et.isPayloadValid(s.type,n))s.data=n;else throw new Error("invalid payload")}return s}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch{return!1}}static isPayloadValid(t,e){switch(t){case l.CONNECT:return ot(e);case l.DISCONNECT:return e===void 0;case l.CONNECT_ERROR:return typeof e=="string"||ot(e);case l.EVENT:case l.BINARY_EVENT:return Array.isArray(e)&&(typeof e[0]=="number"||typeof e[0]=="string"&&de.indexOf(e[0])===-1);case l.ACK:case l.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class ge{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const e=pe(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const ye=Number.isInteger||function(i){return typeof i=="number"&&isFinite(i)&&Math.floor(i)===i};function ot(i){return Object.prototype.toString.call(i)==="[object Object]"}const me=Object.freeze(Object.defineProperty({__proto__:null,Decoder:et,Encoder:_e,get PacketType(){return l}},Symbol.toStringTag,{value:"Module"}));function m(i,t,e){return i.on(t,e),function(){i.off(t,e)}}const we=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class kt extends _{constructor(t,e,s){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=t,this.nsp=e,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[m(t,"open",this.onopen.bind(this)),m(t,"packet",this.onpacket.bind(this)),m(t,"error",this.onerror.bind(this)),m(t,"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(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...e){var s,r,n;if(we.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(e.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(e),this;const o={type:l.EVENT,data:e};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof e[e.length-1]=="function"){const u=this.ids++,p=e.pop();this._registerAckCallback(u,p),o.id=u}const h=(r=(s=this.io.engine)===null||s===void 0?void 0:s.transport)===null||r===void 0?void 0:r.writable,a=this.connected&&!(!((n=this.io.engine)===null||n===void 0)&&n._hasPingExpired());return this.flags.volatile&&!h||(a?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(t,e){var s;const r=(s=this.flags.timeout)!==null&&s!==void 0?s:this._opts.ackTimeout;if(r===void 0){this.acks[t]=e;return}const n=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let h=0;h<this.sendBuffer.length;h++)this.sendBuffer[h].id===t&&this.sendBuffer.splice(h,1);e.call(this,new Error("operation has timed out"))},r),o=(...h)=>{this.io.clearTimeoutFn(n),e.apply(this,h)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...e){return new Promise((s,r)=>{const n=(o,h)=>o?r(o):s(h);n.withError=!0,e.push(n),this.emit(t,...e)})}_addToQueue(t){let e;typeof t[t.length-1]=="function"&&(e=t.pop());const s={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((r,...n)=>(this._queue[0],r!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),e&&e(r)):(this._queue.shift(),e&&e(null,...n)),s.pending=!1,this._drainQueue())),this._queue.push(s),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const e=this._queue[0];e.pending&&!t||(e.pending=!0,e.tryCount++,this.flags=e.flags,this.emit.apply(this,e.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:l.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,e){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,e),this._clearAcks()}
vendor: 5,762 bytes, line 1
1_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(s=>String(s.id)===t)){const s=this.acks[t];delete this.acks[t],s.withError&&s.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case l.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.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 l.EVENT:case l.BINARY_EVENT:this.onevent(t);break;case l.ACK:case l.BINARY_ACK:this.onack(t);break;case l.DISCONNECT:this.ondisconnect();break;case l.CONNECT_ERROR:this.destroy();const s=new Error(t.data.message);s.data=t.data.data,this.emitReserved("connect_error",s);break}}onevent(t){const e=t.data||[];t.id!=null&&e.push(this.ack(t.id)),this.connected?this.emitEvent(e):this.receiveBuffer.push(Object.freeze(e))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const e=this._anyListeners.slice();for(const s of e)s.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const e=this;let s=!1;return function(...r){s||(s=!0,e.packet({type:l.ACK,id:t,data:r}))}}onack(t){const e=this.acks[t.id];typeof e=="function"&&(delete this.acks[t.id],e.withError&&t.data.unshift(null),e.apply(this,t.data))}onconnect(t,e){this.id=t,this.recovered=e&&this._pid===e,this._pid=e,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:l.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const e=this._anyListeners;for(let s=0;s<e.length;s++)if(t===e[s])return e.splice(s,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const e=this._anyOutgoingListeners;for(let s=0;s<e.length;s++)if(t===e[s])return e.splice(s,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const e=this._anyOutgoingListeners.slice();for(const s of e)s.apply(this,t.data)}}}function A(i){i=i||{},this.ms=i.min||100,this.max=i.max||1e4,this.factor=i.factor||2,this.jitter=i.jitter>0&&i.jitter<=1?i.jitter:0,this.attempts=0}A.prototype.duration=function(){var i=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),e=Math.floor(t*this.jitter*i);i=(Math.floor(t*10)&1)==0?i-e:i+e}return Math.min(i,this.max)|0};A.prototype.reset=function(){this.attempts=0};A.prototype.setMin=function(i){this.ms=i};A.prototype.setMax=function(i){this.max=i};A.prototype.setJitter=function(i){this.jitter=i};class Q extends _{constructor(t,e){var s;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(e=t,t=void 0),e=e||{},e.path=e.path||"/socket.io",this.opts=e,D(this,e),this.reconnection(e.reconnection!==!1),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor((s=e.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new A({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(e.timeout==null?2e4:e.timeout),this._readyState="closed",this.uri=t;const r=e.parser||me;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=e.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var e;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(e=this.backoff)===null||e===void 0||e.setMin(t),this)}randomizationFactor(t){var e;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(e=this.backoff)===null||e===void 0||e.setJitter(t),this)}reconnectionDelayMax(t){var e;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(e=this.backoff)===null||e===void 0||e.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new oe(this.uri,this.opts);const e=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;
1const r=m(e,"open",function(){s.onopen(),t&&t()}),n=h=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",h),t?t(h):this.maybeReconnectOnOpen()},o=m(e,"error",n);if(this._timeout!==!1){const h=this._timeout,a=this.setTimeoutFn(()=>{r(),n(new Error("timeout")),e.close()},h);this.opts.autoUnref&&a.unref(),this.subs.push(()=>{this.clearTimeoutFn(a)})}return this.subs.push(r),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(m(t,"ping",this.onping.bind(this)),m(t,"data",this.ondata.bind(this)),m(t,"error",this.onerror.bind(this)),m(t,"close",this.onclose.bind(this)),m(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(e){this.onclose("parse error",e)}}ondecoded(t){I(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,e){let s=this.nsps[t];return s?this._autoConnect&&!s.active&&s.connect():(s=new kt(this,t,e),this.nsps[t]=s),s}_destroy(t){const e=Object.keys(this.nsps);for(const s of e)if(this.nsps[s].active)return;this._close()}_packet(t){const e=this.encoder.encode(t);for(let s=0;s<e.length;s++)this.engine.write(e[s],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,e){var s;this.cleanup(),(s=this.engine)===null||s===void 0||s.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,e),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const e=this.backoff.duration();this._reconnecting=!0;const s=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(r=>{r?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",r)):t.onreconnect()}))},e);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const C={};function H(i,t){typeof i=="object"&&(t=i,i=void 0),t=t||{};const e=he(i,t.path||"/socket.io"),s=e.source,r=e.id,n=e.path,o=C[r]&&n in C[r].nsps,h=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let a;return h?a=new Q(s,t):(C[r]||(C[r]=new Q(s,t)),a=C[r]),e.query&&!t.query&&(t.query=e.queryKey),a.socket(e.path,t)}Object.assign(H,{Manager:Q,Socket:kt,io:H,connect:H});var k={},B={},$,ht;function xe(){if(ht)return $;ht=1;function i(r,n,o){for(var h=0,a=0,f=o.length;a<f;a++)h=o.charCodeAt(a),h<128?r.setUint8(n++,h):h<2048?(r.setUint8(n++,192|h>>6),r.setUint8(n++,128|h&63)):h<55296||h>=57344?(r.setUint8(n++,224|h>>12),r.setUint8(n++,128|h>>6&63),r.setUint8(n++,128|h&63)):(a++,h=65536+((h&1023)<<10|o.charCodeAt(a)&1023),r.setUint8(n++,240|h>>18),r.setUint8(n++,128|h>>12&63),r.setUint8(n++,128|h>>6&63),r.setUint8(n++,128|h&63))}function t(r){for(var n=0,o=0,h=0,a=r.length;h<a;h++)n=r.charCodeAt(h),n<128?o+=1:n<2048?o+=2:n<55296||n>=57344?o+=3:(h++,o+=4);return o}function e(r,n,o){var h=typeof o,a=0,f=0,u=0,p=0,c=0,d=0;if(h==="string"){if(c=t(o),c<32)r.push(c|160),d=1;else if(c<256)r.push(217,c),d=2;else if(c<65536)r.push(218,c>>8,c),d=3;else if(c<4294967296)r.push(219,c>>24,c>>16,c>>8,c),d=5;else throw new Error("String too long");return n.push({_str:o,_length:c,_offset:r.length}),d+c}if(h==="number")return Math.floor(o)!==o||!isFinite(o)?(r.push(203),n.push({_float:o,_length:8,_offset:r.length}),9):o>=0?o<128?(r.push(o),1):o<256?(r.push(204,o),2):o<65536?(r.push(205,o>>8,o),3):o<4294967296?(r.push(206,o>>24,o>>16,o>>8,o),5):(u=o/Math.pow(2,32)>>0,p=o>>>0,r.push(207,u>>24,u>>16,u>>8,u,p>>24,p>>16,p>>8,p),9):o>=-32?(r.push(o),1):o>=-128?(r.push(208,o),2):o>
1=-32768?(r.push(209,o>>8,o),3):o>=-2147483648?(r.push(210,o>>24,o>>16,o>>8,o),5):(u=Math.floor(o/Math.pow(2,32)),p=o>>>0,r.push(211,u>>24,u>>16,u>>8,u,p>>24,p>>16,p>>8,p),9);if(h==="object"){if(o===null)return r.push(192),1;if(Array.isArray(o)){if(c=o.length,c<16)r.push(c|144),d=1;else if(c<65536)r.push(220,c>>8,c),d=3;else if(c<4294967296)r.push(221,c>>24,c>>16,c>>8,c),d=5;else throw new Error("Array too large");for(a=0;a<c;a++)d+=e(r,n,o[a]);return d}if(o instanceof Date){var E=o.getTime();return u=Math.floor(E/Math.pow(2,32)),p=E>>>0,r.push(215,0,u>>24,u>>16,u>>8,u,p>>24,p>>16,p>>8,p),10}if(o instanceof ArrayBuffer){if(c=o.byteLength,c<256)r.push(196,c),d=2;else if(c<65536)r.push(197,c>>8,c),d=3;else if(c<4294967296)r.push(198,c>>24,c>>16,c>>8,c),d=5;else throw new Error("Buffer too large");return n.push({_bin:o,_length:c,_offset:r.length}),d+c}if(typeof o.toJSON=="function")return e(r,n,o.toJSON());var b=[],g="",T=Object.keys(o);for(a=0,f=T.length;a<f;a++)g=T[a],typeof o[g]!="function"&&b.push(g);if(c=b.length,c<16)r.push(c|128),d=1;else if(c<65536)r.push(222,c>>8,c),d=3;else if(c<4294967296)r.push(223,c>>24,c>>16,c>>8,c),d=5;else throw new Error("Object too large");for(a=0;a<c;a++)g=b[a],d+=e(r,n,g),d+=e(r,n,o[g]);return d}if(h==="boolean")return r.push(o?195:194),1;if(h==="undefined")return r.push(212,0,0),3;throw new Error("Could not encode")}function s(r){var n=[],o=[],h=e(n,o,r),a=new ArrayBuffer(h),f=new DataView(a),u=0,p=0,c=-1;o.length>0&&(c=o[0]._offset);for(var d,E=0,b=0,g=0,T=n.length;g<T;g++)if(f.setUint8(p+g,n[g]),g+1===c){if(d=o[u],E=d._length,b=p+c,d._bin)for(var At=new Uint8Array(d._bin),R=0;R<E;R++)f.setUint8(b+R,At[R]);else d._str?i(f,b,d._str):d._float!==void 0&&f.setFloat64(b,d._float);u++,p+=E,o[u]&&(c=o[u]._offset)}return a}return $=s,$}var W,at;function be(){if(at)return W;at=1;function i(s){if(this._offset=0,s instanceof ArrayBuffer)this._buffer=s,this._view=new DataView(this._buffer);else if(ArrayBuffer.isView(s))this._buffer=s.buffer,this._view=new DataView(this._buffer,s.byteOffset,s.byteLength);else throw new Error("Invalid argument")}function t(s,r,n){for(var o="",h=0,a=r,f=r+n;a<f;a++){var u=s.getUint8(a);if((u&128)===0){o+=String.fromCharCode(u);continue}if((u&224)===192){o+=String.fromCharCode((u&31)<<6|s.getUint8(++a)&63);continue}if((u&240)===224){o+=String.fromCharCode((u&15)<<12|(s.getUint8(++a)&63)<<6|(s.getUint8(++a)&63)<<0);continue}if((u&248)===240){h=(u&7)<<18|(s.getUint8(++a)&63)<<12|(s.getUint8(++a)&63)<<6|(s.getUint8(++a)&63)<<0,h>=65536?(h-=65536,o+=String.fromCharCode((h>>>10)+55296,(h&1023)+56320)):o+=String.fromCharCode(h);continue}throw new Error("Invalid byte "+u.toString(16))}return o}i.prototype._array=function(s){for(var r=new Array(s),n=0;n<s;n++)r[n]=this._parse();return r},i.prototype._map=function(s){for(var r="",n={},o=0;o<s;o++)r=this._parse(),n[r]=this._parse();return n},i.prototype._str=function(s){var r=t(this._view,this._offset,s);return this._offset+=s,r},i.prototype._bin=function(s){var r=this._buffer.slice(this._offset,this._offset+s);return this._offset+=s,r},i.prototype._parse=function(){var s=this._view.getUint8(this._offset++),r,n=0,o=0,h=0,a=0;if(s<192)return s<128?s:s<144?this._map(s&15):s<160?this._array(s&15):this._str(s&31);if(s>223)return(255-s+1)*-1;switch(s){case 192:return null;case 194:return!1;case 195:return!0;case 196:return n=this._view.getUint8(this._offset),this._offset+=1,this._bin(n);case 197:return n=this._view.getUint16(this._offset),this._offset+=2,this._bin(n);case 198:return n=this._view.getUint32(this._offset),this._offset+=4,this._bin(n);case 199:return n=this._view.getUint8(this._offset),o=this._view.getInt8(this._offset+1),this._offset+=2,[o,this._bin(n)];case 200:return n=this._view.getUint16(this._offset),o=this._view.getInt8(this._offset+2),this._offset+=3,[o,this._bin(n)];case 201:return n=this._view.getUint32(this._offset),o=this._view.getInt8(this._offset+4),this._offset+=5,[o,this._bin(n)];case 202:return r=this._view.getFloat32(this._offset),this._offset+=4,r;case 203:return r=this._view.getFloat64(this._offset),this._offset+=8,r;case 204:return r=this._view.getUint8(this._offset),this._offset+=1,r;case 205:return r=this._view.getUint16(this._offset),this._offset+=2,r;case 206:return r=this._view.getUint32(this._offset),this._offset+=4,r;case 207:return h=this._view.getUint32(this._offset)*Math.pow(2,32),a=this._view.getUint32(this._offset+4),this._offset+=8,h+a;case 208:return r=this._view.getInt8(this._offset),this._offset+=1,r;case 209:return r=this._view.getInt16(this._offset),this._offset+=2,r;case 210:return r=this._view.getInt32(this._offset),this._offset+=4,r;case 211:return h=this._view.getInt32(this._offset)*Math.pow(2,32),a=this._view.getUint32(this._offset+4),this._offset+=8,h+a;case 212:if(o=this._view.getInt8(this._offset),this._offset+=1,o===0){this._offset+=1;return}return[o,this._bin(1)];case 213:return o=this._view.getInt8(this._offset),this._offset+=1,[o,this._bin(2)];case 214:return o=this._view.getInt8(this._offset),this._offset+=1,[o,this._bin(4)];case 215:return o=this._view.getInt8(this._offset),this._offset+=1,o===0?(h=this._view.getInt32(this._offset)*Math.pow(2,32),a=this._view.getUint32(this._offset+4),this._offset+=8,new Date(h+a)):[o,this._bin(8)];case 216:return o=this._view.getInt8(this._offset),this._offset+=1,[o,this._bin(16)];case 217:return n=this._view.getUint8(this._offset),this._offset+=1,this._str(n);case 218:return n=this._view.getUint16(this._offset),this._offset+=2,this._str(n);case 219:return n=this._view.getUint32(this._offset),this._offset+=4,this._str(n);case 220:return n=this._view.getUint16(this._offset),this._offset+=2,this._array(n);case 221:return n=this._view.getUint32(this._offset),this._offset+=4,this._array(n);case 222:return n=this._view.getUint16(this._offset),this._offset+=2,this._map(n);case 223:return n=this._view.getUint32(this._offset),this._offset+=4,this._map(n)}throw new Error("Could not parse")};function e(s){var r=new i(s),n=r._parse();if(r._offset!==s.byteLength)throw new Error(s.byteLength-r._offset+" trailing bytes");return n}return W=e,W}var ct;function ve(){return ct||(ct=1,B.encode=xe(),B.decode=be()),B}var K={exports:{}},ft;function Ee(){return ft||(ft=1,(function(i){i.exports=t;function t(s){if(s)return e(s)}function e(s){for(var r in t.prototype)s[r]=t.prototype[r];return s}t.prototype.on=t.prototype.addEventListener=function(s,r){return this._callbacks=this._callbacks||{},(this._callbacks["$"+s]=this._callbacks["$"+s]||[]).push(r),this},t.prototype.once=function(s,r){function n(){this.off(s,n),r.apply(this,arguments)}return n.fn=r,this.on(s,n),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(s,r){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+s];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+s],this;for(var o,h=0;h<n.length;h++)if(o=n[h],o===r||o.fn===r){n.splice(h,1);break}return n.length===0&&delete this._callbacks["$"+s],this},t.prototype.emit=function(s){this._callbacks=this._callbacks||{};for(var r=new Array(arguments.length-1),n=this._callbacks["$"+s],o=1;o<arguments.length;o++)r[o-1]=arguments[o];if(n){n=n.slice(0);for(var o=0,h=n.length;o<h;++o)n[o].apply(this,r)}return this},t.prototype.listeners=function(s){return this._callbacks=this._callbacks||{},this._callbacks["$"+s]||[]},t.prototype.hasListeners=function(s){return!!this.listeners(s).length}})(K)),K.exports}var ut;
1function ke(){if(ut)return k;ut=1;var i=ve(),t=Ee();k.protocol=5;var e=k.PacketType={CONNECT:0,DISCONNECT:1,EVENT:2,ACK:3,CONNECT_ERROR:4},s=Number.isInteger||function(f){return typeof f=="number"&&isFinite(f)&&Math.floor(f)===f},r=function(f){return typeof f=="string"},n=function(f){return Object.prototype.toString.call(f)==="[object Object]"};function o(){}o.prototype.encode=function(f){return[i.encode(f)]};function h(){}t(h.prototype),h.prototype.add=function(f){var u=i.decode(f);this.checkPacket(u),this.emit("decoded",u)};function a(f){switch(f.type){case e.CONNECT:return f.data===void 0||n(f.data);case e.DISCONNECT:return f.data===void 0;case e.CONNECT_ERROR:return r(f.data)||n(f.data);default:return Array.isArray(f.data)}}return h.prototype.checkPacket=function(f){var u=s(f.type)&&f.type>=e.CONNECT&&f.type<=e.CONNECT_ERROR;if(!u)throw new Error("invalid packet type");if(!r(f.nsp))throw new Error("invalid namespace");if(!a(f))throw new Error("invalid payload");var p=f.id===void 0||s(f.id);if(!p)throw new Error("invalid packet id")},h.prototype.destroy=function(){},k.Encoder=o,k.Decoder=h,k}var Ae=ke();const Te=Ct(Ae);export{Te as c,H as l};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.