import{nasg}from"./@babel.80d29b7b.js";import{rasP}from"./engine.io-client.6bbd7bb9.js";import{rasS}from"./debug.b392f131.js";import{rasT}from"./socket.io-parser.4db37fe5.js";import{rasF}from"./@socket.io.573b606e.js";varw={exports:{}},E={},q;functionz(){if(q)returnE;q=1;varl=g&&g.__importDefault||function(o){returno&&o.__esModule?o:{default:o}};Object.defineProperty(E,"__esModule",{value:!0}),E.url=m;constr=P(),_=(0,l(S()).default)("socket.io-client:url");functionm(o,k="",f){leth=o;f=f||typeoflocation<"u"&&location,o==null&&(o=f.protocol+"//"+f.host),typeofo=="string"&&(o.charAt(0)==="/"&&(o.charAt(1)==="/"?o=f.protocol+o:o=f.host+o),/^(https?|wss?):\/\//.test(o)||(_("protocol-less url %s",o),typeoff<"u"?o=f.protocol+"//"+o:o="https://"+o),_("parse %s",o),h=(0,r.parse)(o)),h.port||(/^(http|ws)$/.test(h.protocol)?h.port="80":/^(http|ws)s$/.test(h.protocol)&&(h.port="443")),h.path=h.path||"/";consts=h.host.indexOf(":")!==-1?"["+h.host+"]":h.host;returnh.id=h.protocol+"://"+s+":"+h.port+k,h.href=h.protocol+"://"+s+(f&&f.port===h.port?"":":"+h.port),h}returnE}varO={},j={},R={},L;functionW(){if(L)returnR;L=1,Object.defineProperty(R,"__esModule",{value:!0}),R.on=l;functionl(r,p,_){returnr.on(p,_),function(){r.off(p,_)}}returnR}varD;functionx(){if(D)returnj;D=1;varl=g&&g.__importDefault||function(h){returnh&&h.__esModule?h:{default:h}};Object.defineProperty(j,"__esModule",{value:!0}),j.Socket=void0;constr=T(),p=W(),_=F,o=(0,l(S()).default)("socket.io-client:socket"),k=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});classfextends_.Emitter{constructor(e,s,i){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=s,i&&i.auth&&(this.auth=i.auth),this._opts=Object.assign({},i),this.io._autoConnect&&this.open()}getdisconnected(){return!this.connected}subEvents(){if(this.subs)return;conste=this.io;this.subs=[(0,p.on)(e,"open",this.onopen.bind(this)),(0,p.on)(e,"packet",this.onpacket.bind(this)),(0,p.on)(e,"error",this.onerror.bind(this)),(0,p.on)(e,"close",this.onclose.bind(this))]}getactive(){return!!this.subs}connect(){returnthis.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){returnthis.connect()}send(...e){returne.unshift("message"),this.emit.apply(this,e),this}emit(e,...s){vari,u,c;if(k.hasOwnProperty(e))thrownewError('"'+e.toString()+'" is a reserved event name');if(s.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)returnthis._addToQueue(s),this;constt={type:r.PacketType.EVENT,data:s};if(t.options={},t.options.compress=this.flags.compress!==!1,typeofs[s.length-1]=="function"){constb=this.ids++;o("emitting packet with ack id %d",b);constv=s.pop();this._registerAckCallback(b,v),t.id=b}constn=(u=(i=this.io.engine)===null||i===void0?void0:i.transport)===null||u===void0?void0:u.writable,a=this.connected&&!(!((c=this.io.engine)===null||c===void0)&&c._hasPingExpired());returnthis.flags.volatile&&!n?o("discard packet as the transport is not currently writable"):a?(this.notifyOutgoingListeners(t),this.packet(t)):this.sendBuffer.push(t),this.flags={},this}_registerAckCallback(e,s){vari;constu=(i=this.flags.timeout)!==null&&i!==void0?i:this._opts.ackTimeout;if(u===void0){this.acks[e]=s;return}constc=this.io.setTimeoutFn(()=>{deletethis.acks[e];for(letn=0;n<this.sendBuffer.length;n++)this.sendBuffer[n].id===e&&(o("removing packet with ack id %d from the buffer",e),this.sendBuffer.splice(n,1));o("event with ack id %d has timed out after %d ms",e,u),s.call(this,newError("operation has timed out"))},u),t=(...n)=>{this.io.clearTimeoutFn(c),s.apply(this,n)};t.withError=!0,this.acks[e]=t}emitWithAck(e,...s){returnnewPromise((i,u)=>{constc=(t,n)=>t?u(t):i(n);c.withError=!0,s.push(c),this.emit(e,...s)})}_addToQueue(e){lets;typeofe[e.length-1]=="function"&&(s=e.pop());consti={id:this._queueSeq++,tr