2 lines
32 KiB
JavaScript
Raw Normal View History

2025-04-09 18:55:14 +08:00
'use strict';var t=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t){var e=Object.prototype.hasOwnProperty,n="~";function i(){}function s(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function o(t,e,i,o,a){if("function"!=typeof i)throw new TypeError("The listener must be a function");var r=new s(i,o||t,a),l=n?n+e:e;return t._events[l]?t._events[l].fn?t._events[l]=[t._events[l],r]:t._events[l].push(r):(t._events[l]=r,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new i:delete t._events[e]}function r(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(n=!1)),r.prototype.eventNames=function(){var t,i,s=[];if(0===this._eventsCount)return s;for(i in t=this._events)e.call(t,i)&&s.push(n?i.slice(1):i);return Object.getOwnPropertySymbols?s.concat(Object.getOwnPropertySymbols(t)):s},r.prototype.listeners=function(t){var e=n?n+t:t,i=this._events[e];if(!i)return[];if(i.fn)return[i.fn];for(var s=0,o=i.length,a=new Array(o);s<o;s++)a[s]=i[s].fn;return a},r.prototype.listenerCount=function(t){var e=n?n+t:t,i=this._events[e];return i?i.fn?1:i.length:0},r.prototype.emit=function(t,e,i,s,o,a){var r=n?n+t:t;if(!this._events[r])return!1;var l,g,c=this._events[r],u=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),u){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,i),!0;case 4:return c.fn.call(c.context,e,i,s),!0;case 5:return c.fn.call(c.context,e,i,s,o),!0;case 6:return c.fn.call(c.context,e,i,s,o,a),!0}for(g=1,l=new Array(u-1);g<u;g++)l[g-1]=arguments[g];c.fn.apply(c.context,l)}else{var h,d=c.length;for(g=0;g<d;g++)switch(c[g].once&&this.removeListener(t,c[g].fn,void 0,!0),u){case 1:c[g].fn.call(c[g].context);break;case 2:c[g].fn.call(c[g].context,e);break;case 3:c[g].fn.call(c[g].context,e,i);break;case 4:c[g].fn.call(c[g].context,e,i,s);break;default:if(!l)for(h=1,l=new Array(u-1);h<u;h++)l[h-1]=arguments[h];c[g].fn.apply(c[g].context,l)}}return!0},r.prototype.on=function(t,e,n){return o(this,t,e,n,!1)},r.prototype.once=function(t,e,n){return o(this,t,e,n,!0)},r.prototype.removeListener=function(t,e,i,s){var o=n?n+t:t;if(!this._events[o])return this;if(!e)return a(this,o),this;var r=this._events[o];if(r.fn)r.fn!==e||s&&!r.once||i&&r.context!==i||a(this,o);else{for(var l=0,g=[],c=r.length;l<c;l++)(r[l].fn!==e||s&&!r[l].once||i&&r[l].context!==i)&&g.push(r[l]);g.length?this._events[o]=1===g.length?g[0]:g:a(this,o)}return this},r.prototype.removeAllListeners=function(t){var e;return t?(e=n?n+t:t,this._events[e]&&a(this,e)):(this._events=new i,this._eventsCount=0),this},r.prototype.off=r.prototype.removeListener,r.prototype.addListener=r.prototype.on,r.prefixed=n,r.EventEmitter=r,t.exports=r}));const e=2,n=11,i=12,s=15,o=20,a=23,r=27,l="onMessageModified",g="error";class c{constructor(t=0,e=0){this.high=t,this.low=e}equal(t){return null!==t&&(this.low===t.low&&this.high===t.high)}toString(){const t=Number(this.high).toString(16);let e=Number(this.low).toString(16);if(e.length<8){let t=8-e.length;for(;t;)e="0"+e,t--}return t+e}}const u={TEST:{CHINA:{DEFAULT:"wss://wss-dev.tim.qq.com"},OVERSEA:{DEFAULT:"wss://wss-dev.tim.qq.com"},SINGAPORE:{DEFAULT:"wss://wsssgp-dev.im.qcloud.com"},KOREA:{DEFAULT:"wss://wsskr-dev.im.qcloud.com"},GERMANY:{DEFAULT:"wss://wssger-dev.im.qcloud.com"},IND:{DEFAULT:"wss://wssind-dev.im.qcloud.com"},JPN:{DEFAULT:"wss://wssjpn-dev.im.qcloud.com"},USA:{DEFAULT:"wss://wssusa-dev.im.qcloud.com"},INDONESIA:{DEFAULT:"wss://wssidn-dev.im.qcloud.com"}},PRODUCTION:{CHINA:{DEFAULT:"wss://wss.im.qcloud.com",BACKUP:"wss://wss.tim.qq.com",STAT:"https://events.im.qcloud.com",ANYCAST:"wss://162.14.13.203"},OVERSEA:{DEFAULT:"wss://wss.im.qcloud.com",BACKUP:"wss://wss.my-imcloud.com",STAT:"https://api.my-imcloud.com"},SINGAPORE:{DEFAULT:"wss://wsssgp.im.qcloud.com",BACKUP:"wss://wsssgp.my-imcloud.com",STAT:"https://apisgp.my-imcloud.com",ANYCAST:"wss://162.14.19.159"},KOREA:{DEFAULT:"wss://wsskr.im.qcloud.com",BACKUP:"wss://wsskr.my-imclou