1 line
1.1 MiB
JavaScript
1 line
1.1 MiB
JavaScript
|
|
LavaPack.loadBundle([[729,{"./DataItem":728,buffer:4074},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,a,c){(function(c){(function(){var d,f;d=this,f=function(){const{DataItem:a}=e("./DataItem");var d=function(){function e(e){this.$hex=e}e.prototype={length:function(){return this.$hex.length/2},toString:function(e){if(!e||"hex"===e||16===e)return this.$hex;if("utf-8"===e){for(var a="",c=0;c<this.$hex.length;c+=2)a+="%"+this.$hex.substring(c,c+2);return decodeURIComponent(a)}if("latin"===e){for(a=[],c=0;c<this.$hex.length;c+=2)a.push(parseInt(this.$hex.substring(c,c+2),16));return String.fromCharCode.apply(String,a)}throw new Error("Unrecognised format: "+e)}},e.fromLatinString=function(a){for(var c="",d=0;d<a.length;d++){var f=a.charCodeAt(d).toString(16);1===f.length&&(f="0"+f),c+=f}return new e(c)},e.fromUtf8String=function(a){for(var c=encodeURIComponent(a),d="",f=0;f<c.length;f++)if("%"===c.charAt(f))d+=c.substring(f+1,f+3),f+=2;else{var b=c.charCodeAt(f).toString(16);b.length<2&&(b="0"+b),d+=b}return new e(d)};var d=[],f={},b=function(e){return function(){throw new Error(e+" not implemented")}};function t(){}function r(){}function n(e,a){var c=e.value;return c<24?c:24==c?a.readByte():25==c?a.readUint16():26==c?a.readUint32():27==c?a.readUint64():31==c?null:void b("Additional info: "+c)()}function A(e,a,c){var d=e<<5;a<24?c.writeByte(d|a):a<256?(c.writeByte(24|d),c.writeByte(a)):a<65536?(c.writeByte(25|d),c.writeUint16(a)):a<4294967296?(c.writeByte(26|d),c.writeUint32(a)):(c.writeByte(27|d),c.writeUint64(a))}t.prototype={peekByte:b("peekByte"),readByte:b("readByte"),readChunk:b("readChunk"),readFloat16:function(){var e=this.readUint16(),a=(32767&e)>>10,c=1023&e,d=32768&e;if(31===a)return 0===c?d?-Infinity:Infinity:NaN;var f=a?Math.pow(2,a-25)*(1024+c):Math.pow(2,-24)*c;return d?-f:f},readFloat32:function(){var e=this.readUint32(),a=(2147483647&e)>>23,c=8388607&e,d=2147483648&e;if(255===a)return 0===c?d?-Infinity:Infinity:NaN;var f=a?Math.pow(2,a-23-127)*(8388608+c):Math.pow(2,-149)*c;return d?-f:f},readFloat64:function(){var e=this.readUint32(),a=e>>20&2047,c=4294967296*(1048575&e)+this.readUint32(),d=2147483648&e;if(2047===a)return 0===c?d?-Infinity:Infinity:NaN;var f=a?Math.pow(2,a-52-1023)*(4503599627370496+c):Math.pow(2,-1074)*c;return d?-f:f},readUint16:function(){return 256*this.readByte()+this.readByte()},readUint32:function(){return 65536*this.readUint16()+this.readUint16()},readUint64:function(){return 4294967296*this.readUint32()+this.readUint32()}},r.prototype={writeByte:b("writeByte"),result:b("result"),writeFloat16:b("writeFloat16"),writeFloat32:b("writeFloat32"),writeFloat64:b("writeFloat64"),writeUint16:function(e){this.writeByte(e>>8&255),this.writeByte(255&e)},writeUint32:function(e){this.writeUint16(e>>16&65535),this.writeUint16(65535&e)},writeUint64:function(e){if(e>=9007199254740992||e<=-9007199254740992)throw new Error("Cannot encode Uint64 of: "+e+" magnitude to big (floating point errors)");this.writeUint32(Math.floor(e/4294967296)),this.writeUint32(e%4294967296)},writeString:b("writeString"),canWriteBinary:function(e){return!1},writeBinary:b("writeChunk")};var i=new Error;function s(e){var a=function(e){var a=e.readByte();return{type:a>>5,value:31&a}}(e);switch(a.type){case 0:return n(a,e);case 1:return-1-n(a,e);case 2:return e.readChunk(n(a,e));case 3:return e.readChunk(n(a,e)).toString("utf-8");case 4:case 5:var c=n(a,e),d=[];if(null!==c){5===a.type&&(c*=2);for(var b=0;b<c;b++)d[b]=s(e)}else for(var t;(t=s(e))!==i;)d.push(t);if(5===a.type){var r={};for(b=0;b<d.length;b+=2)r[d[b]]=d[b+1];return r}return d;case 6:var A=n(a,e),o=f[A];return d=s(e),o?o(d):d;case 7:if(25===a.value)return e.readFloat16();if(26===a.value)return e.readFloat32();if(27===a.value)return e.readFloat64();switch(n(a,e)){case 20:return!1;case 21:return!0;case 22:return null;case 23:return undefined;case null:return i;default:throw new Error("Unknown fixed value: "+a.value)}default:throw new Error("Unsupported header: "+JSON.stringify(a))}throw new Error("not imp
|