UNPKG

sfs2x-api

Version:

Official JavaScript client API for SmartFoxServer 2X, the leading SDK to create large scale multiplayer games and MMOs

2 lines 436 kB
/*! For license information please see sfs2x-api-1.8.3.js.LICENSE.txt */ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.SFS2X=e():t.SFS2X=e()}(this,(()=>(()=>{var t={1801:(t,e,r)=>{var n;t=r.nmd(t);var o=function(t,e,r){this._byteOffset=e||0,t instanceof ArrayBuffer?this.buffer=t:"object"==typeof t?(this.dataView=t,e&&(this._byteOffset+=e)):this.buffer=new ArrayBuffer(t||1),this.position=0,this.endianness=null==r?o.LITTLE_ENDIAN:r};o.prototype={},void 0===Uint8Array.prototype.BYTES_PER_ELEMENT&&(Uint8Array.prototype.BYTES_PER_ELEMENT=Uint8Array.BYTES_PER_ELEMENT,Int8Array.prototype.BYTES_PER_ELEMENT=Int8Array.BYTES_PER_ELEMENT,Uint8ClampedArray.prototype.BYTES_PER_ELEMENT=Uint8ClampedArray.BYTES_PER_ELEMENT,Uint16Array.prototype.BYTES_PER_ELEMENT=Uint16Array.BYTES_PER_ELEMENT,Int16Array.prototype.BYTES_PER_ELEMENT=Int16Array.BYTES_PER_ELEMENT,Uint32Array.prototype.BYTES_PER_ELEMENT=Uint32Array.BYTES_PER_ELEMENT,Int32Array.prototype.BYTES_PER_ELEMENT=Int32Array.BYTES_PER_ELEMENT,Float64Array.prototype.BYTES_PER_ELEMENT=Float64Array.BYTES_PER_ELEMENT),o.prototype.save=function(t){var e=new Blob(this.buffer),r=window.webkitURL||window.URL;if(!r||!r.createObjectURL)throw"DataStream.save: Can't create object URL.";var n=r.createObjectURL(e),o=document.createElement("a");o.setAttribute("href",n),o.setAttribute("download",t),o.click(),r.revokeObjectURL(n)},o.BIG_ENDIAN=!1,o.LITTLE_ENDIAN=!0,o.prototype._dynamicSize=!0,Object.defineProperty(o.prototype,"dynamicSize",{get:function(){return this._dynamicSize},set:function(t){t||this._trimAlloc(),this._dynamicSize=t}}),o.prototype._byteLength=0,Object.defineProperty(o.prototype,"byteLength",{get:function(){return this._byteLength-this._byteOffset}}),Object.defineProperty(o.prototype,"buffer",{get:function(){return this._trimAlloc(),this._buffer},set:function(t){this._buffer=t,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(o.prototype,"byteOffset",{get:function(){return this._byteOffset},set:function(t){this._byteOffset=t,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(o.prototype,"dataView",{get:function(){return this._dataView},set:function(t){this._byteOffset=t.byteOffset,this._buffer=t.buffer,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._byteOffset+t.byteLength}}),o.prototype._realloc=function(t){if(this._dynamicSize){var e=this._byteOffset+this.position+t,r=this._buffer.byteLength;if(e<=r)e>this._byteLength&&(this._byteLength=e);else{for(r<1&&(r=1);e>r;)r*=2;var n=new ArrayBuffer(r),o=new Uint8Array(this._buffer);new Uint8Array(n,0,o.length).set(o),this.buffer=n,this._byteLength=e}}},o.prototype._trimAlloc=function(){if(this._byteLength!=this._buffer.byteLength){var t=new ArrayBuffer(this._byteLength),e=new Uint8Array(t),r=new Uint8Array(this._buffer,0,e.length);e.set(r),this.buffer=t}},o.prototype.seek=function(t){var e=Math.max(0,Math.min(this.byteLength,t));this.position=isNaN(e)||!isFinite(e)?0:e},o.prototype.isEof=function(){return this.position>=this.byteLength},o.prototype.mapInt32Array=function(t,e){this._realloc(4*t);var r=new Int32Array(this._buffer,this.byteOffset+this.position,t);return o.arrayToNative(r,null==e?this.endianness:e),this.position+=4*t,r},o.prototype.mapInt16Array=function(t,e){this._realloc(2*t);var r=new Int16Array(this._buffer,this.byteOffset+this.position,t);return o.arrayToNative(r,null==e?this.endianness:e),this.position+=2*t,r},o.prototype.mapInt8Array=function(t){this._realloc(1*t);var e=new Int8Array(this._buffer,this.byteOffset+this.position,t);return this.position+=1*t,e},o.prototype.mapUint32Array=function(t,e){this._realloc(4*t);var r=new Uint32Array(this._buffer,this.byteOffset+this.position,t);return o.arrayToNative(r,null==e?this.endianness:e),this.position+=4*t,r},o.prototype.mapUint16Array=function(t,e){this._realloc(2*t);var r=new Uint16Array(this._buffer,this.byteOffset+this.position,t);return o.arrayToNative(r,null==e?this.endianness:e),this.position+=2*t,r},o.prototype.mapUint8Array=function(t){this._realloc(1*t);var e=new Uint8Array(this._buffer,this.byteOffset+this.position,t);return this.position+=1*t,e},o.prototype.mapFloat64Array=function(t,e){this._realloc(8*t);var r=new Float64Array(this._buffer,this.byteOffset+this.position,t);return o.arrayToNative(r,null==e?this.endianness:e),this.position+=8*t,r},o.prototype.mapFloat32Array=function(t,e){this._realloc(4*t);var r=new Float32Array(this._buffer,this.byteOffset+this.position,t);return o.arrayToNative(r,null==e?this.endianness:e),this.position+=4*t,r},o.prototype.readInt32Array=function(t,e){t=null==t?this.byteLength-this.position/4:t;var r=new Int32Array(t);return o.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),o.arrayToNative(r,null==e?this.endianness:e),this.position+=r.byteLength,r},o.prototype.readInt16Array=function(t,e){t=null==t?this.byteLength-this.position/2:t;var r=new Int16Array(t);return o.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),o.arrayToNative(r,null==e?this.endianness:e),this.position+=r.byteLength,r},o.prototype.readInt8Array=function(t){t=null==t?this.byteLength-this.position:t;var e=new Int8Array(t);return o.memcpy(e.buffer,0,this.buffer,this.byteOffset+this.position,t*e.BYTES_PER_ELEMENT),this.position+=e.byteLength,e},o.prototype.readUint32Array=function(t,e){t=null==t?this.byteLength-this.position/4:t;var r=new Uint32Array(t);return o.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),o.arrayToNative(r,null==e?this.endianness:e),this.position+=r.byteLength,r},o.prototype.readUint16Array=function(t,e){t=null==t?this.byteLength-this.position/2:t;var r=new Uint16Array(t);return o.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),o.arrayToNative(r,null==e?this.endianness:e),this.position+=r.byteLength,r},o.prototype.readUint8Array=function(t){t=null==t?this.byteLength-this.position:t;var e=new Uint8Array(t);return o.memcpy(e.buffer,0,this.buffer,this.byteOffset+this.position,t*e.BYTES_PER_ELEMENT),this.position+=e.byteLength,e},o.prototype.readFloat64Array=function(t,e){t=null==t?this.byteLength-this.position/8:t;var r=new Float64Array(t);return o.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),o.arrayToNative(r,null==e?this.endianness:e),this.position+=r.byteLength,r},o.prototype.readFloat32Array=function(t,e){t=null==t?this.byteLength-this.position/4:t;var r=new Float32Array(t);return o.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,t*r.BYTES_PER_ELEMENT),o.arrayToNative(r,null==e?this.endianness:e),this.position+=r.byteLength,r},o.prototype.writeInt32Array=function(t,e){if(this._realloc(4*t.length),t instanceof Int32Array&&(this.byteOffset+this.position)%t.BYTES_PER_ELEMENT==0)o.memcpy(this._buffer,this.byteOffset+this.position,t.buffer,t.byteOffset,t.byteLength),this.mapInt32Array(t.length,e);else for(var r=0;r<t.length;r++)this.writeInt32(t[r],e)},o.prototype.writeInt16Array=function(t,e){if(this._realloc(2*t.length),t instanceof Int16Array&&(this.byteOffset+this.position)%t.BYTES_PER_ELEMENT==0)o.memcpy(this._buffer,this.byteOffset+this.position,t.buffer,t.byteOffset,t.byteLength),this.mapInt16Array(t.length,e);else for(var r=0;r<t.length;r++)this.writeInt16(t[r],e)},o.prototype.writeInt8Array=function(t){if(this._realloc(1*t.length),t instanceof Int8Array&&(this.byteOffset+this.position)%t.BYTES_PER_ELEMENT==0)o.memcpy(this._buffer,this.byteOffset+this.position,t.buffer,t.byteOffset,t.byteLength),this.mapInt8Array(t.length);else for(var e=0;e<t.length;e++)this.writeInt8(t[e])},o.prototype.writeUint32Array=function(t,e){if(this._realloc(4*t.length),t instanceof Uint32Array&&(this.byteOffset+this.position)%t.BYTES_PER_ELEMENT==0)o.memcpy(this._buffer,this.byteOffset+this.position,t.buffer,t.byteOffset,t.byteLength),this.mapUint32Array(t.length,e);else for(var r=0;r<t.length;r++)this.writeUint32(t[r],e)},o.prototype.writeUint16Array=function(t,e){if(this._realloc(2*t.length),t instanceof Uint16Array&&(this.byteOffset+this.position)%t.BYTES_PER_ELEMENT==0)o.memcpy(this._buffer,this.byteOffset+this.position,t.buffer,t.byteOffset,t.byteLength),this.mapUint16Array(t.length,e);else for(var r=0;r<t.length;r++)this.writeUint16(t[r],e)},o.prototype.writeUint8Array=function(t){if(this._realloc(1*t.length),t instanceof Uint8Array&&(this.byteOffset+this.position)%t.BYTES_PER_ELEMENT==0)o.memcpy(this._buffer,this.byteOffset+this.position,t.buffer,t.byteOffset,t.byteLength),this.mapUint8Array(t.length);else for(var e=0;e<t.length;e++)this.writeUint8(t[e])},o.prototype.writeFloat64Array=function(t,e){if(this._realloc(8*t.length),t instanceof Float64Array&&(this.byteOffset+this.position)%t.BYTES_PER_ELEMENT==0)o.memcpy(this._buffer,this.byteOffset+this.position,t.buffer,t.byteOffset,t.byteLength),this.mapFloat64Array(t.length,e);else for(var r=0;r<t.length;r++)this.writeFloat64(t[r],e)},o.prototype.writeFloat32Array=function(t,e){if(this._realloc(4*t.length),t instanceof Float32Array&&(this.byteOffset+this.position)%t.BYTES_PER_ELEMENT==0)o.memcpy(this._buffer,this.byteOffset+this.position,t.buffer,t.byteOffset,t.byteLength),this.mapFloat32Array(t.length,e);else for(var r=0;r<t.length;r++)this.writeFloat32(t[r],e)},o.prototype.readInt32=function(t){var e=this._dataView.getInt32(this.position,null==t?this.endianness:t);return this.position+=4,e},o.prototype.readInt16=function(t){var e=this._dataView.getInt16(this.position,null==t?this.endianness:t);return this.position+=2,e},o.prototype.readInt8=function(){var t=this._dataView.getInt8(this.position);return this.position+=1,t},o.prototype.readUint32=function(t){var e=this._dataView.getUint32(this.position,null==t?this.endianness:t);return this.position+=4,e},o.prototype.readUint16=function(t){var e=this._dataView.getUint16(this.position,null==t?this.endianness:t);return this.position+=2,e},o.prototype.readUint8=function(){var t=this._dataView.getUint8(this.position);return this.position+=1,t},o.prototype.readFloat32=function(t){var e=this._dataView.getFloat32(this.position,null==t?this.endianness:t);return this.position+=4,e},o.prototype.readFloat64=function(t){var e=this._dataView.getFloat64(this.position,null==t?this.endianness:t);return this.position+=8,e},o.prototype.writeInt32=function(t,e){this._realloc(4),this._dataView.setInt32(this.position,t,null==e?this.endianness:e),this.position+=4},o.prototype.writeInt16=function(t,e){this._realloc(2),this._dataView.setInt16(this.position,t,null==e?this.endianness:e),this.position+=2},o.prototype.writeInt8=function(t){this._realloc(1),this._dataView.setInt8(this.position,t),this.position+=1},o.prototype.writeUint32=function(t,e){this._realloc(4),this._dataView.setUint32(this.position,t,null==e?this.endianness:e),this.position+=4},o.prototype.writeUint16=function(t,e){this._realloc(2),this._dataView.setUint16(this.position,t,null==e?this.endianness:e),this.position+=2},o.prototype.writeUint8=function(t){this._realloc(1),this._dataView.setUint8(this.position,t),this.position+=1},o.prototype.writeFloat32=function(t,e){this._realloc(4),this._dataView.setFloat32(this.position,t,null==e?this.endianness:e),this.position+=4},o.prototype.writeFloat64=function(t,e){this._realloc(8),this._dataView.setFloat64(this.position,t,null==e?this.endianness:e),this.position+=8},o.endianness=new Int8Array(new Int16Array([1]).buffer)[0]>0,o.memcpy=function(t,e,r,n,o){var i=new Uint8Array(t,e,o),s=new Uint8Array(r,n,o);i.set(s)},o.arrayToNative=function(t,e){return e==this.endianness?t:this.flipArrayEndianness(t)},o.nativeToEndian=function(t,e){return this.endianness==e?t:this.flipArrayEndianness(t)},o.flipArrayEndianness=function(t){for(var e=new Uint8Array(t.buffer,t.byteOffset,t.byteLength),r=0;r<t.byteLength;r+=t.BYTES_PER_ELEMENT)for(var n=r+t.BYTES_PER_ELEMENT-1,o=r;n>o;n--,o++){var i=e[o];e[o]=e[n],e[n]=i}return t},o.createStringFromArray=function(t){for(var e=[],r=0;r<t.length;r+=32768)e.push(String.fromCharCode.apply(null,t.subarray(r,r+32768)));return e.join("")},o.prototype.failurePosition=0,o.prototype.readStruct=function(t){for(var e,r,n={},o=this.position,i=0;i<t.length;i+=2){if(e=t[i+1],null==(r=this.readType(e,n)))return 0==this.failurePosition&&(this.failurePosition=this.position),this.position=o,null;n[t[i]]=r}return n},o.prototype.readUCS2String=function(t,e){return o.createStringFromArray(this.readUint16Array(t,e))},o.prototype.writeUCS2String=function(t,e,r){null==r&&(r=t.length);for(var n=0;n<t.length&&n<r;n++)this.writeUint16(t.charCodeAt(n),e);for(;n<r;n++)this.writeUint16(0)},o.prototype.readString=function(t,e){return null==e||"ASCII"==e?o.createStringFromArray(this.mapUint8Array(null==t?this.byteLength-this.position:t)):new TextDecoder(e).decode(this.mapUint8Array(t))},o.prototype.writeString=function(t,e,r){if(null==e||"ASCII"==e)if(null!=r){var n=0,o=Math.min(t.length,r);for(n=0;n<o;n++)this.writeUint8(t.charCodeAt(n));for(;n<r;n++)this.writeUint8(0)}else for(n=0;n<t.length;n++)this.writeUint8(t.charCodeAt(n));else this.writeUint8Array(new TextEncoder(e).encode(t.substring(0,r)))},o.prototype.readCString=function(t){var e=this.byteLength-this.position,r=new Uint8Array(this._buffer,this._byteOffset+this.position),n=e;null!=t&&(n=Math.min(t,e));for(var i=0;i<n&&0!=r[i];i++);var s=o.createStringFromArray(this.mapUint8Array(i));return null!=t?this.position+=n-i:i!=e&&(this.position+=1),s},o.prototype.writeCString=function(t,e){if(null!=e){var r=0,n=Math.min(t.length,e);for(r=0;r<n;r++)this.writeUint8(t.charCodeAt(r));for(;r<e;r++)this.writeUint8(0)}else{for(r=0;r<t.length;r++)this.writeUint8(t.charCodeAt(r));this.writeUint8(0)}},o.prototype.readType=function(t,e){if("function"==typeof t)return t(this,e);if(!("object"!=typeof t||t instanceof Array))return t.get(this,e);if(t instanceof Array&&3!=t.length)return this.readStruct(t,e);var r=null,n=null,i="ASCII",s=this.position;if("string"==typeof t&&/:/.test(t)){var a=t.split(":");t=a[0],n=null!=e[u=a[1]]?parseInt(e[u]):parseInt(a[1])}switch("string"==typeof t&&/,/.test(t)&&(a=t.split(","),t=a[0],i=parseInt(a[1])),t){case"uint8":r=this.readUint8();break;case"int8":r=this.readInt8();break;case"uint16":r=this.readUint16(this.endianness);break;case"int16":r=this.readInt16(this.endianness);break;case"uint32":r=this.readUint32(this.endianness);break;case"int32":r=this.readInt32(this.endianness);break;case"float32":r=this.readFloat32(this.endianness);break;case"float64":r=this.readFloat64(this.endianness);break;case"uint16be":r=this.readUint16(o.BIG_ENDIAN);break;case"int16be":r=this.readInt16(o.BIG_ENDIAN);break;case"uint32be":r=this.readUint32(o.BIG_ENDIAN);break;case"int32be":r=this.readInt32(o.BIG_ENDIAN);break;case"float32be":r=this.readFloat32(o.BIG_ENDIAN);break;case"float64be":r=this.readFloat64(o.BIG_ENDIAN);break;case"uint16le":r=this.readUint16(o.LITTLE_ENDIAN);break;case"int16le":r=this.readInt16(o.LITTLE_ENDIAN);break;case"uint32le":r=this.readUint32(o.LITTLE_ENDIAN);break;case"int32le":r=this.readInt32(o.LITTLE_ENDIAN);break;case"float32le":r=this.readFloat32(o.LITTLE_ENDIAN);break;case"float64le":r=this.readFloat64(o.LITTLE_ENDIAN);break;case"cstring":r=this.readCString(n);break;case"string":r=this.readString(n,i);break;case"u16string":r=this.readUCS2String(n,this.endianness);break;case"u16stringle":r=this.readUCS2String(n,o.LITTLE_ENDIAN);break;case"u16stringbe":r=this.readUCS2String(n,o.BIG_ENDIAN);break;default:if(3==t.length){var u,c=t[1],f=0;if(f="function"==typeof(u=t[2])?u(e,this,t):"string"==typeof u&&null!=e[u]?parseInt(e[u]):parseInt(u),"string"==typeof c){var l=c.replace(/(le|be)$/,""),h=null;switch(/le$/.test(c)?h=o.LITTLE_ENDIAN:/be$/.test(c)&&(h=o.BIG_ENDIAN),"*"==u&&(f=null),l){case"uint8":r=this.readUint8Array(f);break;case"uint16":r=this.readUint16Array(f,h);break;case"uint32":r=this.readUint32Array(f,h);break;case"int8":r=this.readInt8Array(f);break;case"int16":r=this.readInt16Array(f,h);break;case"int32":r=this.readInt32Array(f,h);break;case"float32":r=this.readFloat32Array(f,h);break;case"float64":r=this.readFloat64Array(f,h);break;case"cstring":case"utf16string":case"string":if(null==f)for(r=[];!this.isEof()&&null!=(v=this.readType(c,e));)r.push(v);else{r=new Array(f);for(var y=0;y<f;y++)r[y]=this.readType(c,e)}}}else if("*"==u)for(r=[],this.buffer;;){var p=this.position;try{var d=this.readType(c,e);if(null==d){this.position=p;break}r.push(d)}catch(t){this.position=p;break}}else for(r=new Array(f),y=0;y<f;y++){var v;if(null==(v=this.readType(c,e)))return null;r[y]=v}break}}return null!=n&&(this.position=s+n),r},o.prototype.writeStruct=function(t,e){for(var r=0;r<t.length;r+=2){var n=t[r+1];this.writeType(n,e[t[r]],e)}},o.prototype.writeType=function(t,e,r){if("function"==typeof t)return t(this,e);if("object"==typeof t&&!(t instanceof Array))return t.set(this,e,r);var n=null,i="ASCII",s=this.position;if("string"==typeof t&&/:/.test(t)){var a=t.split(":");t=a[0],n=parseInt(a[1])}switch("string"==typeof t&&/,/.test(t)&&(a=t.split(","),t=a[0],i=parseInt(a[1])),t){case"uint8":this.writeUint8(e);break;case"int8":this.writeInt8(e);break;case"uint16":this.writeUint16(e,this.endianness);break;case"int16":this.writeInt16(e,this.endianness);break;case"uint32":this.writeUint32(e,this.endianness);break;case"int32":this.writeInt32(e,this.endianness);break;case"float32":this.writeFloat32(e,this.endianness);break;case"float64":this.writeFloat64(e,this.endianness);break;case"uint16be":this.writeUint16(e,o.BIG_ENDIAN);break;case"int16be":this.writeInt16(e,o.BIG_ENDIAN);break;case"uint32be":this.writeUint32(e,o.BIG_ENDIAN);break;case"int32be":this.writeInt32(e,o.BIG_ENDIAN);break;case"float32be":this.writeFloat32(e,o.BIG_ENDIAN);break;case"float64be":this.writeFloat64(e,o.BIG_ENDIAN);break;case"uint16le":this.writeUint16(e,o.LITTLE_ENDIAN);break;case"int16le":this.writeInt16(e,o.LITTLE_ENDIAN);break;case"uint32le":this.writeUint32(e,o.LITTLE_ENDIAN);break;case"int32le":this.writeInt32(e,o.LITTLE_ENDIAN);break;case"float32le":this.writeFloat32(e,o.LITTLE_ENDIAN);break;case"float64le":this.writeFloat64(e,o.LITTLE_ENDIAN);break;case"cstring":this.writeCString(e,n);break;case"string":this.writeString(e,i,n);break;case"u16string":this.writeUCS2String(e,this.endianness,n);break;case"u16stringle":this.writeUCS2String(e,o.LITTLE_ENDIAN,n);break;case"u16stringbe":this.writeUCS2String(e,o.BIG_ENDIAN,n);break;default:if(3==t.length){for(var u=t[1],c=0;c<e.length;c++)this.writeType(u,e[c]);break}this.writeStruct(t,e)}null!=n&&(this.position=s,this._realloc(n),this.position=s+n)},void 0===(n=function(){return o}.apply(e,[]))||(t.exports=n),t&&t.exports&&(t.exports=o)},6500:function(){!function(t){"use strict";function e(t,e,r){return e<=t&&t<=r}function r(t,e){return Math.floor(t/e)}var n=-1,o=-1;function i(t){var e=0;this.get=function(){return e>=t.length?n:Number(t[e])},this.offset=function(r){if((e+=r)<0)throw new Error("Seeking past start of the buffer");if(e>t.length)throw new Error("Seeking past EOF")},this.match=function(r){if(r.length>e+t.length)return!1;var n;for(n=0;n<r.length;n+=1)if(Number(t[e+n])!==r[n])return!1;return!0}}function s(t){var e=0;this.emit=function(r){var o,i=n;for(o=0;o<arguments.length;++o)i=Number(arguments[o]),t[e++]=i;return i}}function a(t){var r=0,n=function(){for(var r=[],n=0,o=t.length;n<t.length;){var i=t.charCodeAt(n);if(e(i,55296,57343))if(e(i,56320,57343))r.push(65533);else if(n===o-1)r.push(65533);else{var s=t.charCodeAt(n+1);if(e(s,56320,57343)){var a=1023&i,u=1023&s;n+=1,r.push(65536+(a<<10)+u)}else r.push(65533)}else r.push(i);n+=1}return r}();this.offset=function(t){if((r+=t)<0)throw new Error("Seeking past start of the buffer");if(r>n.length)throw new Error("Seeking past EOF")},this.get=function(){return r>=n.length?o:n[r]}}function u(){var t="";this.string=function(){return t},this.emit=function(e){e<=65535?t+=String.fromCharCode(e):(e-=65536,t+=String.fromCharCode(55296+(e>>10&1023)),t+=String.fromCharCode(56320+(1023&e)))}}function c(t,e){if(t)throw new Error("EncodingError");return e||65533}function f(t){throw new Error("EncodingError")}function l(t){if(t=String(t).trim().toLowerCase(),Object.prototype.hasOwnProperty.call(y,t))return y[t];throw new Error("EncodingError: Unknown encoding: "+t)}var h={},y={};function p(t,e){return(e||[])[t]||null}function d(t,e){var r=e.indexOf(t);return-1===r?null:r}[{encodings:[{labels:["unicode-1-1-utf-8","utf-8","utf8"],name:"utf-8"}],heading:"The Encoding"},{encodings:[{labels:["cp864","ibm864"],name:"ibm864"},{labels:["cp866","ibm866"],name:"ibm866"},{labels:["csisolatin2","iso-8859-2","iso-ir-101","iso8859-2","iso_8859-2","l2","latin2"],name:"iso-8859-2"},{labels:["csisolatin3","iso-8859-3","iso_8859-3","iso-ir-109","l3","latin3"],name:"iso-8859-3"},{labels:["csisolatin4","iso-8859-4","iso_8859-4","iso-ir-110","l4","latin4"],name:"iso-8859-4"},{labels:["csisolatincyrillic","cyrillic","iso-8859-5","iso_8859-5","iso-ir-144"],name:"iso-8859-5"},{labels:["arabic","csisolatinarabic","ecma-114","iso-8859-6","iso_8859-6","iso-ir-127"],name:"iso-8859-6"},{labels:["csisolatingreek","ecma-118","elot_928","greek","greek8","iso-8859-7","iso_8859-7","iso-ir-126"],name:"iso-8859-7"},{labels:["csisolatinhebrew","hebrew","iso-8859-8","iso-8859-8-i","iso-ir-138","iso_8859-8","visual"],name:"iso-8859-8"},{labels:["csisolatin6","iso-8859-10","iso-ir-157","iso8859-10","l6","latin6"],name:"iso-8859-10"},{labels:["iso-8859-13"],name:"iso-8859-13"},{labels:["iso-8859-14","iso8859-14"],name:"iso-8859-14"},{labels:["iso-8859-15","iso_8859-15"],name:"iso-8859-15"},{labels:["iso-8859-16"],name:"iso-8859-16"},{labels:["koi8-r","koi8_r"],name:"koi8-r"},{labels:["koi8-u"],name:"koi8-u"},{labels:["csmacintosh","mac","macintosh","x-mac-roman"],name:"macintosh"},{labels:["iso-8859-11","tis-620","windows-874"],name:"windows-874"},{labels:["windows-1250","x-cp1250"],name:"windows-1250"},{labels:["windows-1251","x-cp1251"],name:"windows-1251"},{labels:["ascii","ansi_x3.4-1968","csisolatin1","iso-8859-1","iso8859-1","iso_8859-1","l1","latin1","us-ascii","windows-1252"],name:"windows-1252"},{labels:["cp1253","windows-1253"],name:"windows-1253"},{labels:["csisolatin5","iso-8859-9","iso-ir-148","l5","latin5","windows-1254"],name:"windows-1254"},{labels:["cp1255","windows-1255"],name:"windows-1255"},{labels:["cp1256","windows-1256"],name:"windows-1256"},{labels:["windows-1257"],name:"windows-1257"},{labels:["cp1258","windows-1258"],name:"windows-1258"},{labels:["x-mac-cyrillic","x-mac-ukrainian"],name:"x-mac-cyrillic"}],heading:"Legacy single-byte encodings"},{encodings:[{labels:["chinese","csgb2312","csiso58gb231280","gb2312","gbk","gb_2312","gb_2312-80","iso-ir-58","x-gbk"],name:"gbk"},{labels:["gb18030"],name:"gb18030"},{labels:["hz-gb-2312"],name:"hz-gb-2312"}],heading:"Legacy multi-byte Chinese (simplified) encodings"},{encodings:[{labels:["big5","big5-hkscs","cn-big5","csbig5","x-x-big5"],name:"big5"}],heading:"Legacy multi-byte Chinese (traditional) encodings"},{encodings:[{labels:["cseucpkdfmtjapanese","euc-jp","x-euc-jp"],name:"euc-jp"},{labels:["csiso2022jp","iso-2022-jp"],name:"iso-2022-jp"},{labels:["csshiftjis","ms_kanji","shift-jis","shift_jis","sjis","windows-31j","x-sjis"],name:"shift_jis"}],heading:"Legacy multi-byte Japanese encodings"},{encodings:[{labels:["cseuckr","csksc56011987","euc-kr","iso-ir-149","korean","ks_c_5601-1987","ks_c_5601-1989","ksc5601","ksc_5601","windows-949"],name:"euc-kr"},{labels:["csiso2022kr","iso-2022-kr"],name:"iso-2022-kr"}],heading:"Legacy multi-byte Korean encodings"},{encodings:[{labels:["utf-16","utf-16le"],name:"utf-16"},{labels:["utf-16be"],name:"utf-16be"}],heading:"Legacy utf-16 encodings"}].forEach((function(t){t.encodings.forEach((function(t){h[t.name]=t,t.labels.forEach((function(e){y[e]=t}))}))}));var v=t["encoding-indexes"]||{};function _(t){var r=t.fatal,i=0,s=0,a=0,u=0;this.decode=function(t){var f=t.get();if(f===n)return 0!==s?c(r):o;if(t.offset(1),0===s){if(e(f,0,127))return f;if(e(f,194,223))s=1,u=128,i=f-192;else if(e(f,224,239))s=2,u=2048,i=f-224;else{if(!e(f,240,244))return c(r);s=3,u=65536,i=f-240}return i*=Math.pow(64,s),null}if(!e(f,128,191))return i=0,s=0,a=0,u=0,t.offset(-1),c(r);if(a+=1,i+=(f-128)*Math.pow(64,s-a),a!==s)return null;var l=i,h=u;return i=0,s=0,a=0,u=0,e(l,h,1114111)&&!e(l,55296,57343)?l:c(r)}}function b(t){t.fatal,this.encode=function(t,i){var s,a,u=i.get();if(u===o)return n;if(i.offset(1),e(u,55296,57343))return f();if(e(u,0,127))return t.emit(u);e(u,128,2047)?(s=1,a=192):e(u,2048,65535)?(s=2,a=224):e(u,65536,1114111)&&(s=3,a=240);for(var c=t.emit(r(u,Math.pow(64,s))+a);s>0;){var l=r(u,Math.pow(64,s-1));c=t.emit(128+l%64),s-=1}return c}}function g(t,r){var i=r.fatal;this.decode=function(r){var s=r.get();if(s===n)return o;if(r.offset(1),e(s,0,127))return s;var a=t[s-128];return null===a?c(i):a}}function m(t,r){r.fatal,this.encode=function(r,i){var s=i.get();if(s===o)return n;if(i.offset(1),e(s,0,127))return r.emit(s);var a=d(s,t);return null===a&&f(),r.emit(a+128)}}function E(t,r){var i=r.fatal,s=0,a=0,u=0;this.decode=function(r){var f,l=r.get();if(l===n&&0===s&&0===a&&0===u)return o;if(l!==n||0===s&&0===a&&0===u||(s=0,a=0,u=0,c(i)),r.offset(1),0!==u)return f=null,e(l,48,57)&&(f=function(t){if(t>39419&&t<189e3||t>1237575)return null;var e,r=0,n=0,o=v.gb18030;for(e=0;e<o.length;++e){var i=o[e];if(!(i[0]<=t))break;r=i[0],n=i[1]}return n+t-r}(10*(126*(10*(s-129)+(a-48))+(u-129))+l-48)),s=0,a=0,u=0,null===f?(r.offset(-3),c(i)):f;if(0!==a)return e(l,129,254)?(u=l,null):(r.offset(-2),s=0,a=0,c(i));if(0!==s){if(e(l,48,57)&&t)return a=l,null;var h=s,y=null;s=0;var d=l<127?64:65;return(e(l,64,126)||e(l,128,254))&&(y=190*(h-129)+(l-d)),f=null===y?null:p(y,v.gbk),null===y&&r.offset(-1),null===f?c(i):f}return e(l,0,127)?l:128===l?8364:e(l,129,254)?(s=l,null):c(i)}}function S(t,i){i.fatal,this.encode=function(i,s){var a=s.get();if(a===o)return n;if(s.offset(1),e(a,0,127))return i.emit(a);var u=d(a,v.gbk);if(null!==u){var c=r(u,190)+129,l=u%190,h=l<63?64:65;return i.emit(c,l+h)}if(null===u&&!t)return f();u=function(t){var e,r=0,n=0,o=v.gb18030;for(e=0;e<o.length;++e){var i=o[e];if(!(i[1]<=t))break;r=i[1],n=i[0]}return n+t-r}(a);var y=r(r(r(u,10),126),10),p=r(r(u-=10*y*126*10,10),126),_=r(u-=10*p*126,10),b=u-10*_;return i.emit(y+129,p+48,_+129,b+48)}}function O(t){var r=t.fatal,i=!1,s=0;this.decode=function(t){var a=t.get();if(a===n&&0===s)return o;if(a===n&&0!==s)return s=0,c(r);if(t.offset(1),126===s)return s=0,123===a?(i=!0,null):125===a?(i=!1,null):126===a?126:10===a?null:(t.offset(-1),c(r));if(0!==s){var u=s;s=0;var f=null;return e(a,33,126)&&(f=p(190*(u-1)+(a+63),v.gbk)),10===a&&(i=!1),null===f?c(r):f}return 126===a?(s=126,null):i?e(a,32,127)?(s=a,null):(10===a&&(i=!1),c(r)):e(a,0,127)?a:c(r)}}function w(t){t.fatal;var i=!1;this.encode=function(t,s){var a=s.get();if(a===o)return n;if(s.offset(1),e(a,0,127)&&i)return s.offset(-1),i=!1,t.emit(126,125);if(126===a)return t.emit(126,126);if(e(a,0,127))return t.emit(a);if(!i)return s.offset(-1),i=!0,t.emit(126,123);var u=d(a,v.gbk);if(null===u)return f();var c=r(u,190)+1,l=u%190-63;return e(c,33,126)&&e(l,33,126)?t.emit(c,l):f()}}function R(t){var r=t.fatal,i=0,s=null;this.decode=function(t){if(null!==s){var a=s;return s=null,a}var u=t.get();if(u===n&&0===i)return o;if(u===n&&0!==i)return i=0,c(r);if(t.offset(1),0!==i){var f=i,l=null;i=0;var h=u<127?64:98;if((e(u,64,126)||e(u,161,254))&&(l=157*(f-129)+(u-h)),1133===l)return s=772,202;if(1135===l)return s=780,202;if(1164===l)return s=772,234;if(1166===l)return s=780,234;var y=null===l?null:p(l,v.big5);return null===l&&t.offset(-1),null===y?c(r):y}return e(u,0,127)?u:e(u,129,254)?(i=u,null):c(r)}}function A(t){t.fatal,this.encode=function(t,i){var s=i.get();if(s===o)return n;if(i.offset(1),e(s,0,127))return t.emit(s);var a=d(s,v.big5);if(null===a)return f();var u=r(a,157)+129,c=a%157,l=c<63?64:98;return t.emit(u,c+l)}}function I(t){var r=t.fatal,i=0,s=0;this.decode=function(t){var a,u,f=t.get();return f===n?0===i&&0===s?o:(i=0,s=0,c(r)):(t.offset(1),0!==s?(a=s,s=0,u=null,e(a,161,254)&&e(f,161,254)&&(u=p(94*(a-161)+f-161,v.jis0212)),e(f,161,254)||t.offset(-1),null===u?c(r):u):142===i&&e(f,161,223)?(i=0,65377+f-161):143===i&&e(f,161,254)?(i=0,s=f,null):0!==i?(a=i,i=0,u=null,e(a,161,254)&&e(f,161,254)&&(u=p(94*(a-161)+f-161,v.jis0208)),e(f,161,254)||t.offset(-1),null===u?c(r):u):e(f,0,127)?f:142===f||143===f||e(f,161,254)?(i=f,null):c(r))}}function T(t){t.fatal,this.encode=function(t,i){var s=i.get();if(s===o)return n;if(i.offset(1),e(s,0,127))return t.emit(s);if(165===s)return t.emit(92);if(8254===s)return t.emit(126);if(e(s,65377,65439))return t.emit(142,s-65377+161);var a=d(s,v.jis0208);if(null===a)return f();var u=r(a,94)+161,c=a%94+161;return t.emit(u,c)}}function k(t){var r=t.fatal,i=0,s=!1,a=0;this.decode=function(t){var u=t.get();switch(u!==n&&t.offset(1),i){default:case 0:return 27===u?(i=1,null):e(u,0,127)?u:u===n?o:c(r);case 1:return 36===u||40===u?(a=u,i=2,null):(u!==n&&t.offset(-1),i=0,c(r));case 2:var f=a;return a=0,36!==f||64!==u&&66!==u?36===f&&40===u?(i=3,null):40!==f||66!==u&&74!==u?40===f&&73===u?(i=6,null):(u===n?t.offset(-1):t.offset(-2),i=0,c(r)):(i=0,null):(s=!1,i=4,null);case 3:return 68===u?(s=!0,i=4,null):(u===n?t.offset(-2):t.offset(-3),i=0,c(r));case 4:return 10===u?(i=0,c(r,10)):27===u?(i=1,null):u===n?o:(a=u,i=5,null);case 5:if(i=4,u===n)return c(r);var l=null,h=94*(a-33)+u-33;return e(a,33,126)&&e(u,33,126)&&(l=p(h,!1===s?v.jis0208:v.jis0212)),null===l?c(r):l;case 6:return 27===u?(i=1,null):e(u,33,95)?65377+u-33:u===n?o:c(r)}}}function P(t){t.fatal;var i=0;this.encode=function(t,s){var a=s.get();if(a===o)return n;if(s.offset(1),(e(a,0,127)||165===a||8254===a)&&0!==i)return s.offset(-1),i=0,t.emit(27,40,66);if(e(a,0,127))return t.emit(a);if(165===a)return t.emit(92);if(8254===a)return t.emit(126);if(e(a,65377,65439)&&2!==i)return s.offset(-1),i=2,t.emit(27,40,73);if(e(a,65377,65439))return t.emit(a-65377-33);if(1!==i)return s.offset(-1),i=1,t.emit(27,36,66);var u=d(a,v.jis0208);if(null===u)return f();var c=r(u,94)+33,l=u%94+33;return t.emit(c,l)}}function j(t){var r=t.fatal,i=0;this.decode=function(t){var s=t.get();if(s===n&&0===i)return o;if(s===n&&0!==i)return i=0,c(r);if(t.offset(1),0!==i){var a=i;if(i=0,e(s,64,126)||e(s,128,252)){var u=p(188*(a-(a<160?129:193))+s-(s<127?64:65),v.jis0208);return null===u?c(r):u}return t.offset(-1),c(r)}return e(s,0,128)?s:e(s,161,223)?65377+s-161:e(s,129,159)||e(s,224,252)?(i=s,null):c(r)}}function M(t){t.fatal,this.encode=function(t,i){var s=i.get();if(s===o)return n;if(i.offset(1),e(s,0,128))return t.emit(s);if(165===s)return t.emit(92);if(8254===s)return t.emit(126);if(e(s,65377,65439))return t.emit(s-65377+161);var a=d(s,v.jis0208);if(null===a)return f();var u=r(a,188),c=u<31?129:193,l=a%188,h=l<63?64:65;return t.emit(u+c,l+h)}}function N(t){var r=t.fatal,i=0;this.decode=function(t){var s=t.get();if(s===n&&0===i)return o;if(s===n&&0!==i)return i=0,c(r);if(t.offset(1),0!==i){var a=i,u=null;if(i=0,e(a,129,198)){var f=178*(a-129);e(s,65,90)?u=f+s-65:e(s,97,122)?u=f+26+s-97:e(s,129,254)&&(u=f+26+26+s-129)}e(a,199,253)&&e(s,161,254)&&(u=12460+94*(a-199)+(s-161));var l=null===u?null:p(u,v["euc-kr"]);return null===u&&t.offset(-1),null===l?c(r):l}return e(s,0,127)?s:e(s,129,253)?(i=s,null):c(r)}}function U(t){t.fatal,this.encode=function(t,i){var s=i.get();if(s===o)return n;if(i.offset(1),e(s,0,127))return t.emit(s);var a,u,c=d(s,v["euc-kr"]);if(null===c)return f();if(c<12460){a=r(c,178)+129;var l=(u=c%178)<26?65:u<52?71:77;return t.emit(a,u+l)}return a=r(c-=12460,94)+199,u=c%94+161,t.emit(a,u)}}function Y(t){var r=t.fatal,i=0,s=0;this.decode=function(t){var a=t.get();switch(a!==n&&t.offset(1),i){default:case 0:return 14===a?(i=4,null):15===a?null:27===a?(i=1,null):e(a,0,127)?a:a===n?o:c(r);case 1:return 36===a?(i=2,null):(a!==n&&t.offset(-1),i=0,c(r));case 2:return 41===a?(i=3,null):(a===n?t.offset(-1):t.offset(-2),i=0,c(r));case 3:return 67===a?(i=0,null):(a===n?t.offset(-2):t.offset(-3),i=0,c(r));case 4:return 10===a?(i=0,c(r,10)):14===a?null:15===a?(i=0,null):a===n?o:(s=a,i=5,null);case 5:if(i=4,a===n)return c(r);var u=null;return e(s,33,70)&&e(a,33,126)?u=p(178*(s-1)+26+26+a-1,v["euc-kr"]):e(s,71,126)&&e(a,33,126)&&(u=p(12460+94*(s-71)+(a-33),v["euc-kr"])),null!==u?u:c(r)}}}function B(t){t.fatal;var i=!1,s=0;this.encode=function(t,a){var u=a.get();if(u===o)return n;if(i||(i=!0,t.emit(27,36,41,67)),a.offset(1),e(u,0,127)&&0!==s)return a.offset(-1),s=0,t.emit(15);if(e(u,0,127))return t.emit(u);if(1!==s)return a.offset(-1),s=1,t.emit(14);var c,l,h=d(u,v["euc-kr"]);return null===h?f():h<12460?(l=h%178-26-26+1,e(c=r(h,178)+1,33,70)&&e(l,33,126)?t.emit(c,l):f()):(l=(h-=12460)%94+33,e(c=r(h,94)+71,71,126)&&e(l,33,126)?t.emit(c,l):f())}}function L(t,r){var i=r.fatal,s=null,a=null;this.decode=function(r){var u,f=r.get();if(f===n&&null===s&&null===a)return o;if(f===n&&(null!==s||null!==a))return c(i);if(r.offset(1),null===s)return s=f,null;if(u=t?(s<<8)+f:(f<<8)+s,s=null,null!==a){var l=a;return a=null,e(u,56320,57343)?65536+1024*(l-55296)+(u-56320):(r.offset(-2),c(i))}return e(u,55296,56319)?(a=u,null):e(u,56320,57343)?c(i):u}}function D(t,i){i.fatal,this.encode=function(i,s){function a(e){var r=e>>8,n=255&e;return t?i.emit(r,n):i.emit(n,r)}var u=s.get();if(u===o)return n;if(s.offset(1),e(u,55296,57343)&&f(),u<=65535)return a(u);var c=(u-65536)%1024+56320;return a(r(u-65536,1024)+55296),a(c)}}h["utf-8"].getEncoder=function(t){return new b(t)},h["utf-8"].getDecoder=function(t){return new _(t)},["ibm864","ibm866","iso-8859-2","iso-8859-3","iso-8859-4","iso-8859-5","iso-8859-6","iso-8859-7","iso-8859-8","iso-8859-10","iso-8859-13","iso-8859-14","iso-8859-15","iso-8859-16","koi8-r","koi8-u","macintosh","windows-874","windows-1250","windows-1251","windows-1252","windows-1253","windows-1254","windows-1255","windows-1256","windows-1257","windows-1258","x-mac-cyrillic"].forEach((function(t){var e=h[t],r=v[t];e.getDecoder=function(t){return new g(r,t)},e.getEncoder=function(t){return new m(r,t)}})),h.gbk.getEncoder=function(t){return new S(!1,t)},h.gbk.getDecoder=function(t){return new E(!1,t)},h.gb18030.getEncoder=function(t){return new S(!0,t)},h.gb18030.getDecoder=function(t){return new E(!0,t)},h["hz-gb-2312"].getEncoder=function(t){return new w(t)},h["hz-gb-2312"].getDecoder=function(t){return new O(t)},h.big5.getEncoder=function(t){return new A(t)},h.big5.getDecoder=function(t){return new R(t)},h["euc-jp"].getEncoder=function(t){return new T(t)},h["euc-jp"].getDecoder=function(t){return new I(t)},h["iso-2022-jp"].getEncoder=function(t){return new P(t)},h["iso-2022-jp"].getDecoder=function(t){return new k(t)},h.shift_jis.getEncoder=function(t){return new M(t)},h.shift_jis.getDecoder=function(t){return new j(t)},h["euc-kr"].getEncoder=function(t){return new U(t)},h["euc-kr"].getDecoder=function(t){return new N(t)},h["iso-2022-kr"].getEncoder=function(t){return new B(t)},h["iso-2022-kr"].getDecoder=function(t){return new Y(t)},h["utf-16"].getEncoder=function(t){return new D(!1,t)},h["utf-16"].getDecoder=function(t){return new L(!1,t)},h["utf-16be"].getEncoder=function(t){return new D(!0,t)},h["utf-16be"].getDecoder=function(t){return new L(!0,t)};var C="utf-8";function x(e,r){return this&&this!==t?(e=e?String(e):C,r=Object(r),this._encoding=l(e),this._streaming=!1,this._encoder=null,this._options={fatal:Boolean(r.fatal)},Object.defineProperty?Object.defineProperty(this,"encoding",{get:function(){return this._encoding.name}}):this.encoding=this._encoding.name,this):new x(e,r)}function F(e,r){return this&&this!==t?(e=e?String(e):C,r=Object(r),this._encoding=l(e),this._streaming=!1,this._decoder=null,this._options={fatal:Boolean(r.fatal)},Object.defineProperty?Object.defineProperty(this,"encoding",{get:function(){return this._encoding.name}}):this.encoding=this._encoding.name,this):new F(e,r)}x.prototype={encode:function(t,e){t=t?String(t):"",e=Object(e),this._streaming||(this._encoder=this._encoding.getEncoder(this._options)),this._streaming=Boolean(e.stream);for(var r=[],i=new s(r),u=new a(t);u.get()!==o;)this._encoder.encode(i,u);if(!this._streaming){var c;do{c=this._encoder.encode(i,u)}while(c!==n);this._encoder=null}return new Uint8Array(r)}},F.prototype={decode:function(t,e){if(t&&!("buffer"in t&&"byteOffset"in t&&"byteLength"in t))throw new TypeError("Expected ArrayBufferView");t||(t=new Uint8Array(0)),e=Object(e),this._streaming||(this._decoder=this._encoding.getDecoder(this._options)),this._streaming=Boolean(e.stream);var r=new i(new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),s=function(t,e){return e.match([255,254])?(e.offset(2),"utf-16"):e.match([254,255])?(e.offset(2),"utf-16be"):e.match([239,187,191])?(e.offset(3),"utf-8"):t}(this._encoding.name,r);if(l(s)!==this._encoding)throw new Error("BOM mismatch");for(var a,c=new u;r.get()!==n;)null!==(a=this._decoder.decode(r))&&a!==o&&c.emit(a);if(!this._streaming){do{null!==(a=this._decoder.decode(r))&&a!==o&&c.emit(a)}while(a!==o);this._decoder=null}return c.string()}},t.TextEncoder=t.TextEncoder||x,t.TextDecoder=t.TextDecoder||F}(this)},1878:(t,e,r)=>{"use strict";r.d(e,{B:()=>n});var n=function(){this.hexcase=0,this.b64pad=""};n.prototype={},n.prototype.hex_md5=function(t){return this.rstr2hex(this.rstr_md5(this.str2rstr_utf8(t)))},n.prototype.b64_md5=function(t){return this.rstr2b64(this.rstr_md5(this.str2rstr_utf8(t)))},n.prototype.any_md5=function(t,e){return this.rstr2any(this.rstr_md5(this.str2rstr_utf8(t)),e)},n.prototype.hex_hmac_md5=function(t,e){return this.rstr2hex(this.rstr_hmac_md5(this.str2rstr_utf8(t),this.str2rstr_utf8(e)))},n.prototype.b64_hmac_md5=function(t,e){return this.rstr2b64(this.rstr_hmac_md5(this.str2rstr_utf8(t),this.str2rstr_utf8(e)))},n.prototype.any_hmac_md5=function(t,e,r){return this.rstr2any(this.rstr_hmac_md5(this.str2rstr_utf8(t),this.str2rstr_utf8(e)),r)},n.prototype.md5_vm_test=function(){return"900150983cd24fb0d6963f7d28e17f72"==this.hex_md5("abc").toLowerCase()},n.prototype.rstr_md5=function(t){return this.binl2rstr(this.binl_md5(this.rstr2binl(t),8*t.length))},n.prototype.rstr_hmac_md5=function(t,e){var r=this.rstr2binl(t);r.length>16&&(r=this.binl_md5(r,8*t.length));for(var n=Array(16),o=Array(16),i=0;i<16;i++)n[i]=909522486^r[i],o[i]=1549556828^r[i];var s=this.binl_md5(n.concat(this.rstr2binl(e)),512+8*e.length);return this.binl2rstr(this.binl_md5(o.concat(s),640))},n.prototype.rstr2hex=function(t){try{this.hexcase}catch(t){this.hexcase=0}for(var e,r=this.hexcase?"0123456789ABCDEF":"0123456789abcdef",n="",o=0;o<t.length;o++)e=t.charCodeAt(o),n+=r.charAt(e>>>4&15)+r.charAt(15&e);return n},n.prototype.rstr2b64=function(t){try{this.b64pad}catch(t){this.b64pad=""}for(var e="",r=t.length,n=0;n<r;n+=3)for(var o=t.charCodeAt(n)<<16|(n+1<r?t.charCodeAt(n+1)<<8:0)|(n+2<r?t.charCodeAt(n+2):0),i=0;i<4;i++)8*n+6*i>8*t.length?e+=this.b64pad:e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(o>>>6*(3-i)&63);return e},n.prototype.rstr2any=function(t,e){var r,n,o,i,s,a=e.length,u=Array(Math.ceil(t.length/2));for(r=0;r<u.length;r++)u[r]=t.charCodeAt(2*r)<<8|t.charCodeAt(2*r+1);var c=Math.ceil(8*t.length/(Math.log(e.length)/Math.log(2))),f=Array(c);for(n=0;n<c;n++){for(s=Array(),i=0,r=0;r<u.length;r++)i=(i<<16)+u[r],i-=(o=Math.floor(i/a))*a,(s.length>0||o>0)&&(s[s.length]=o);f[n]=i,u=s}var l="";for(r=f.length-1;r>=0;r--)l+=e.charAt(f[r]);return l},n.prototype.str2rstr_utf8=function(t){for(var e,r,n="",o=-1;++o<t.length;)e=t.charCodeAt(o),r=o+1<t.length?t.charCodeAt(o+1):0,55296<=e&&e<=56319&&56320<=r&&r<=57343&&(e=65536+((1023&e)<<10)+(1023&r),o++),e<=127?n+=String.fromCharCode(e):e<=2047?n+=String.fromCharCode(192|e>>>6&31,128|63&e):e<=65535?n+=String.fromCharCode(224|e>>>12&15,128|e>>>6&63,128|63&e):e<=2097151&&(n+=String.fromCharCode(240|e>>>18&7,128|e>>>12&63,128|e>>>6&63,128|63&e));return n},n.prototype.str2rstr_utf16le=function(t){for(var e="",r=0;r<t.length;r++)e+=String.fromCharCode(255&t.charCodeAt(r),t.charCodeAt(r)>>>8&255);return e},n.prototype.str2rstr_utf16be=function(t){for(var e="",r=0;r<t.length;r++)e+=String.fromCharCode(t.charCodeAt(r)>>>8&255,255&t.charCodeAt(r));return e},n.prototype.rstr2binl=function(t){for(var e=Array(t.length>>2),r=0;r<e.length;r++)e[r]=0;for(r=0;r<8*t.length;r+=8)e[r>>5]|=(255&t.charCodeAt(r/8))<<r%32;return e},n.prototype.binl2rstr=function(t){for(var e="",r=0;r<32*t.length;r+=8)e+=String.fromCharCode(t[r>>5]>>>r%32&255);return e},n.prototype.binl_md5=function(t,e){t[e>>5]|=128<<e%32,t[14+(e+64>>>9<<4)]=e;for(var r=1732584193,n=-271733879,o=-1732584194,i=271733878,s=0;s<t.length;s+=16){var a=r,u=n,c=o,f=i;r=this.md5_ff(r,n,o,i,t[s+0],7,-680876936),i=this.md5_ff(i,r,n,o,t[s+1],12,-389564586),o=this.md5_ff(o,i,r,n,t[s+2],17,606105819),n=this.md5_ff(n,o,i,r,t[s+3],22,-1044525330),r=this.md5_ff(r,n,o,i,t[s+4],7,-176418897),i=this.md5_ff(i,r,n,o,t[s+5],12,1200080426),o=this.md5_ff(o,i,r,n,t[s+6],17,-1473231341),n=this.md5_ff(n,o,i,r,t[s+7],22,-45705983),r=this.md5_ff(r,n,o,i,t[s+8],7,1770035416),i=this.md5_ff(i,r,n,o,t[s+9],12,-1958414417),o=this.md5_ff(o,i,r,n,t[s+10],17,-42063),n=this.md5_ff(n,o,i,r,t[s+11],22,-1990404162),r=this.md5_ff(r,n,o,i,t[s+12],7,1804603682),i=this.md5_ff(i,r,n,o,t[s+13],12,-40341101),o=this.md5_ff(o,i,r,n,t[s+14],17,-1502002290),n=this.md5_ff(n,o,i,r,t[s+15],22,1236535329),r=this.md5_gg(r,n,o,i,t[s+1],5,-165796510),i=this.md5_gg(i,r,n,o,t[s+6],9,-1069501632),o=this.md5_gg(o,i,r,n,t[s+11],14,643717713),n=this.md5_gg(n,o,i,r,t[s+0],20,-373897302),r=this.md5_gg(r,n,o,i,t[s+5],5,-701558691),i=this.md5_gg(i,r,n,o,t[s+10],9,38016083),o=this.md5_gg(o,i,r,n,t[s+15],14,-660478335),n=this.md5_gg(n,o,i,r,t[s+4],20,-405537848),r=this.md5_gg(r,n,o,i,t[s+9],5,568446438),i=this.md5_gg(i,r,n,o,t[s+14],9,-1019803690),o=this.md5_gg(o,i,r,n,t[s+3],14,-187363961),n=this.md5_gg(n,o,i,r,t[s+8],20,1163531501),r=this.md5_gg(r,n,o,i,t[s+13],5,-1444681467),i=this.md5_gg(i,r,n,o,t[s+2],9,-51403784),o=this.md5_gg(o,i,r,n,t[s+7],14,1735328473),n=this.md5_gg(n,o,i,r,t[s+12],20,-1926607734),r=this.md5_hh(r,n,o,i,t[s+5],4,-378558),i=this.md5_hh(i,r,n,o,t[s+8],11,-2022574463),o=this.md5_hh(o,i,r,n,t[s+11],16,1839030562),n=this.md5_hh(n,o,i,r,t[s+14],23,-35309556),r=this.md5_hh(r,n,o,i,t[s+1],4,-1530992060),i=this.md5_hh(i,r,n,o,t[s+4],11,1272893353),o=this.md5_hh(o,i,r,n,t[s+7],16,-155497632),n=this.md5_hh(n,o,i,r,t[s+10],23,-1094730640),r=this.md5_hh(r,n,o,i,t[s+13],4,681279174),i=this.md5_hh(i,r,n,o,t[s+0],11,-358537222),o=this.md5_hh(o,i,r,n,t[s+3],16,-722521979),n=this.md5_hh(n,o,i,r,t[s+6],23,76029189),r=this.md5_hh(r,n,o,i,t[s+9],4,-640364487),i=this.md5_hh(i,r,n,o,t[s+12],11,-421815835),o=this.md5_hh(o,i,r,n,t[s+15],16,530742520),n=this.md5_hh(n,o,i,r,t[s+2],23,-995338651),r=this.md5_ii(r,n,o,i,t[s+0],6,-198630844),i=this.md5_ii(i,r,n,o,t[s+7],10,1126891415),o=this.md5_ii(o,i,r,n,t[s+14],15,-1416354905),n=this.md5_ii(n,o,i,r,t[s+5],21,-57434055),r=this.md5_ii(r,n,o,i,t[s+12],6,1700485571),i=this.md5_ii(i,r,n,o,t[s+3],10,-1894986606),o=this.md5_ii(o,i,r,n,t[s+10],15,-1051523),n=this.md5_ii(n,o,i,r,t[s+1],21,-2054922799),r=this.md5_ii(r,n,o,i,t[s+8],6,1873313359),i=this.md5_ii(i,r,n,o,t[s+15],10,-30611744),o=this.md5_ii(o,i,r,n,t[s+6],15,-1560198380),n=this.md5_ii(n,o,i,r,t[s+13],21,1309151649),r=this.md5_ii(r,n,o,i,t[s+4],6,-145523070),i=this.md5_ii(i,r,n,o,t[s+11],10,-1120210379),o=this.md5_ii(o,i,r,n,t[s+2],15,718787259),n=this.md5_ii(n,o,i,r,t[s+9],21,-343485551),r=this.safe_add(r,a),n=this.safe_add(n,u),o=this.safe_add(o,c),i=this.safe_add(i,f)}return Array(r,n,o,i)},n.prototype.md5_cmn=function(t,e,r,n,o,i){return this.safe_add(this.bit_rol(this.safe_add(this.safe_add(e,t),this.safe_add(n,i)),o),r)},n.prototype.md5_ff=function(t,e,r,n,o,i,s){return this.md5_cmn(e&r|~e&n,t,e,o,i,s)},n.prototype.md5_gg=function(t,e,r,n,o,i,s){return this.md5_cmn(e&n|r&~n,t,e,o,i,s)},n.prototype.md5_hh=function(t,e,r,n,o,i,s){return this.md5_cmn(e^r^n,t,e,o,i,s)},n.prototype.md5_ii=function(t,e,r,n,o,i,s){return this.md5_cmn(r^(e|~n),t,e,o,i,s)},n.prototype.safe_add=function(t,e){var r=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(r>>16)<<16|65535&r},n.prototype.bit_rol=function(t,e){return t<<e|t>>>32-e}},6314:function(){(function(){"use strict";function t(t){throw t}var e=void 0,r=!0,n=this;function o(t,r){var o,i=t.split("."),s=n;!(i[0]in s)&&s.execScript&&s.execScript("var "+i[0]);for(;i.length&&(o=i.shift());)i.length||r===e?s=s[o]?s[o]:s[o]={}:s[o]=r}var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView;function s(e,r){this.index="number"==typeof r?r:0,this.i=0,this.buffer=e instanceof(i?Uint8Array:Array)?e:new(i?Uint8Array:Array)(32768),2*this.buffer.length<=this.index&&t(Error("invalid index")),this.buffer.length<=this.index&&this.f()}s.prototype.f=function(){var t,e=this.buffer,r=e.length,n=new(i?Uint8Array:Array)(r<<1);if(i)n.set(e);else for(t=0;t<r;++t)n[t]=e[t];return this.buffer=n},s.prototype.d=function(t,e,r){var n,o=this.buffer,i=this.index,s=this.i,a=o[i];if(r&&1<e&&(t=8<e?(h[255&t]<<24|h[t>>>8&255]<<16|h[t>>>16&255]<<8|h[t>>>24&255])>>32-e:h[t]>>8-e),8>e+s)a=a<<e|t,s+=e;else for(n=0;n<e;++n)a=a<<1|t>>e-n-1&1,8==++s&&(s=0,o[i++]=h[a],a=0,i===o.length&&(o=this.f()));o[i]=a,this.buffer=o,this.i=s,this.index=i},s.prototype.finish=function(){var t,e=this.buffer,r=this.index;return 0<this.i&&(e[r]<<=8-this.i,e[r]=h[e[r]],r++),i?t=e.subarray(0,r):(e.length=r,t=e),t};var a,u=new(i?Uint8Array:Array)(256);for(a=0;256>a;++a){for(var c=l=a,f=7,l=l>>>1;l;l>>>=1)c<<=1,c|=1&l,--f;u[a]=(c<<f&255)>>>0}var h=u;function y(t){this.buffer=new(i?Uint16Array:Array)(2*t),this.length=0}function p(t){var e,r,n,o,s,a,u,c,f,l,h=t.length,y=0,p=Number.POSITIVE_INFINITY;for(c=0;c<h;++c)t[c]>y&&(y=t[c]),t[c]<p&&(p=t[c]);for(e=1<<y,r=new(i?Uint32Array:Array)(e),n=1,o=0,s=2;n<=y;){for(c=0;c<h;++c)if(t[c]===n){for(a=0,u=o,f=0;f<n;++f)a=a<<1|1&u,u>>=1;for(l=n<<16|c,f=a;f<e;f+=s)r[f]=l;++o}++n,o<<=1,s<<=1}return[r,y,p]}function d(t,e){this.h=_,this.w=0,this.input=i&&t instanceof Array?new Uint8Array(t):t,this.b=0,e&&(e.lazy&&(this.w=e.lazy),"number"==typeof e.compressionType&&(this.h=e.compressionType),e.outputBuffer&&(this.a=i&&e.outputBuffer instanceof Array?new Uint8Array(e.outputBuffer):e.outputBuffer),"number"==typeof e.outputIndex&&(this.b=e.outputIndex)),this.a||(this.a=new(i?Uint8Array:Array)(32768))}y.prototype.getParent=function(t){return 2*((t-2)/4|0)},y.prototype.push=function(t,e){var r,n,o,i=this.buffer;for(r=this.length,i[this.length++]=e,i[this.length++]=t;0<r&&(n=this.getParent(r),i[r]>i[n]);)o=i[r],i[r]=i[n],i[n]=o,o=i[r+1],i[r+1]=i[n+1],i[n+1]=o,r=n;return this.length},y.prototype.pop=function(){var t,e,r,n,o,i=this.buffer;for(e=i[0],t=i[1],this.length-=2,i[0]=i[this.length],i[1]=i[this.length+1],o=0;!((n=2*o+2)>=this.length)&&(n+2<this.length&&i[n+2]>i[n]&&(n+=2),i[n]>i[o]);)r=i[o],i[o]=i[n],i[n]=r,r=i[o+1],i[o+1]=i[n+1],i[n+1]=r,o=n;return{index:t,value:e,length:this.length}};var v,_=2,b={NONE:0,r:1,k:_,O:3},g=[];for(v=0;288>v;v++)switch(r){case 143>=v:g.push([v+48,8]);break;case 255>=v:g.push([v-144+400,9]);break;case 279>=v:g.push([v-256+0,7]);break;case 287>=v:g.push([v-280+192,8]);break;default:t("invalid literal: "+v)}function m(t,e){this.length=t,this.H=e}d.prototype.j=function(){var n,o,a,u,c=this.input;switch(this.h){case 0:for(a=0,u=c.length;a<u;){var f,l,h,y=o=i?c.subarray(a,a+65535):c.slice(a,a+65535),p=(a+=o.length)===u,d=e,v=e,b=this.a,m=this.b;if(i){for(b=new Uint8Array(this.a.buffer);b.length<=m+y.length+5;)b=new Uint8Array(b.length<<1);b.set(this.a)}if(f=p?1:0,b[m++]=0|f,h=65536+~(l=y.length)&65535,b[m++]=255&l,b[m++]=l>>>8&255,b[m++]=255&h,b[m++]=h>>>8&255,i)b.set(y,m),m+=y.length,b=b.subarray(0,m);else{for(d=0,v=y.length;d<v;++d)b[m++]=y[d];b.length=m}this.b=m,this.a=b}break;case 1:var E=new s(i?new Uint8Array(this.a.buffer):this.a,this.b);E.d(1,1,r),E.d(1,2,r);var S,w,I,T=O(this,c);for(S=0,w=T.length;S<w;S++)if(I=T[S],s.prototype.d.apply(E,g[I]),256<I)E.d(T[++S],T[++S],r),E.d(T[++S],5),E.d(T[++S],T[++S],r);else if(256===I)break;this.a=E.finish(),this.b=this.a.length;break;case _:var k,P,j,M,N,U,Y,B,L,D,C,x,F,K,V,G=new s(i?new Uint8Array(this.a.buffer):this.a,this.b),q=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],z=Array(19);for(k=_,G.d(1,1,r),G.d(k,2,r),P=O(this,c),Y=A(U=R(this.M,15)),L=A(B=R(this.L,7)),j=286;257<j&&0===U[j-1];j--);for(M=30;1<M&&0===B[M-1];M--);var X,H,J,W,$,Q,Z=j,tt=M,et=new(i?Uint32Array:Array)(Z+tt),rt=new(i?Uint32Array:Array)(316),nt=new(i?Uint8Array:Array)(19);for(X=H=0;X<Z;X++)et[H++]=U[X];for(X=0;X<tt;X++)et[H++]=B[X];if(!i)for(X=0,W=nt.length;X<W;++X)nt[X]=0;for(X=$=0,W=et.length;X<W;X+=H){for(H=1;X+H<W&&et[X+H]===et[X];++H);if(J=H,0===et[X])if(3>J)for(;0<J--;)rt[$++]=0,nt[0]++;else for(;0<J;)(Q=138>J?J:138)>J-3&&Q<J&&(Q=J-3),10>=Q?(rt[$++]=17,rt[$++]=Q-3,nt[17]++):(rt[$++]=18,rt[$++]=Q-11,nt[18]++),J-=Q;else if(rt[$++]=et[X],nt[et[X]]++,3>--J)for(;0<J--;)rt[$++]=et[X],nt[et[X]]++;else for(;0<J;)(Q=6>J?J:6)>J-3&&Q<J&&(Q=J-3),rt[$++]=16,rt[$++]=Q-3,nt[16]++,J-=Q}for(n=i?rt.subarray(0,$):rt.slice(0,$),D=R(nt,7),K=0;19>K;K++)z[K]=D[q[K]];for(N=19;4<N&&0===z[N-1];N--);for(C=A(D),G.d(j-257,5,r),G.d(M-1,5,r),G.d(N-4,4,r),K=0;K<N;K++)G.d(z[K],3,r);for(K=0,V=n.length;K<V;K++)if(x=n[K],G.d(C[x],D[x],r),16<=x){switch(K++,x){case 16:F=2;break;case 17:F=3;break;case 18:F=7;break;default:t("invalid code: "+x)}G.d(n[K],F,r)}var ot,it,st,at,ut,ct,ft,lt,ht=[Y,U],yt=[L,B];for(ut=ht[0],ct=ht[1],ft=yt[0],lt=yt[1],ot=0,it=P.length;ot<it;++ot)if(st=P[ot],G.d(ut[st],ct[st],r),256<st)G.d(P[++ot],P[++ot],r),at=P[++ot],G.d(ft[at],lt[at],r),G.d(P[++ot],P[++ot],r);else if(256===st)break;this.a=G.finish(),this.b=this.a.length;break;default