Rules-For-Quantumult-X/Scripts/Unlock/BiliBili-proto.js

124 lines
210 KiB
JavaScript

let protobuf = null;
// protobuf.js 6.11.2
(function(undefined){"use strict";(function prelude(modules,cache,entries){function $require(name){var $module=cache[name];if(!$module)modules[name][0].call($module=cache[name]={exports:{}},$require,$module,$module.exports);return $module.exports}protobuf=$require(entries[0]);protobuf.util.global.protobuf=protobuf;if(typeof define==="function"&&define.amd)define(["long"],function(Long){if(Long&&Long.isLong){protobuf.util.Long=Long;protobuf.configure()}return protobuf});if(typeof module==="object"&&module&&module.exports)module.exports=protobuf})({1:[function(require,module,exports){"use strict";module.exports=asPromise;function asPromise(fn,ctx){var params=new Array(arguments.length-1),offset=0,index=2,pending=true;while(index<arguments.length)params[offset++]=arguments[index++];return new Promise(function executor(resolve,reject){params[offset]=function callback(err){if(pending){pending=false;if(err)reject(err);else{var params=new Array(arguments.length-1),offset=0;while(offset<params.length)params[offset++]=arguments[offset];resolve.apply(null,params)}}};try{fn.apply(ctx||null,params)}catch(err){if(pending){pending=false;reject(err)}}})}},{}],2:[function(require,module,exports){"use strict";var base64=exports;base64.length=function length(string){var p=string.length;if(!p)return 0;var n=0;while(--p%4>1&&string.charAt(p)==="=")++n;return Math.ceil(string.length*3)/4-n};var b64=new Array(64);var s64=new Array(123);for(var i=0;i<64;)s64[b64[i]=i<26?i+65:i<52?i+71:i<62?i-4:i-59|43]=i++;base64.encode=function encode(buffer,start,end){var parts=null,chunk=[];var i=0,j=0,t;while(start<end){var b=buffer[start++];switch(j){case 0:chunk[i++]=b64[b>>2];t=(b&3)<<4;j=1;break;case 1:chunk[i++]=b64[t|b>>4];t=(b&15)<<2;j=2;break;case 2:chunk[i++]=b64[t|b>>6];chunk[i++]=b64[b&63];j=0;break}if(i>8191){(parts||(parts=[])).push(String.fromCharCode.apply(String,chunk));i=0}}if(j){chunk[i++]=b64[t];chunk[i++]=61;if(j===1)chunk[i++]=61}if(parts){if(i)parts.push(String.fromCharCode.apply(String,chunk.slice(0,i)));return parts.join("")}return String.fromCharCode.apply(String,chunk.slice(0,i))};var invalidEncoding="invalid encoding";base64.decode=function decode(string,buffer,offset){var start=offset;var j=0,t;for(var i=0;i<string.length;){var c=string.charCodeAt(i++);if(c===61&&j>1)break;if((c=s64[c])===undefined)throw Error(invalidEncoding);switch(j){case 0:t=c;j=1;break;case 1:buffer[offset++]=t<<2|(c&48)>>4;t=c;j=2;break;case 2:buffer[offset++]=(t&15)<<4|(c&60)>>2;t=c;j=3;break;case 3:buffer[offset++]=(t&3)<<6|c;j=0;break}}if(j===1)throw Error(invalidEncoding);return offset-start};base64.test=function test(string){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string)}},{}],3:[function(require,module,exports){"use strict";module.exports=codegen;function codegen(functionParams,functionName){if(typeof functionParams==="string"){functionName=functionParams;functionParams=undefined}var body=[];function Codegen(formatStringOrScope){if(typeof formatStringOrScope!=="string"){var source=toString();if(codegen.verbose)console.log("codegen: "+source);source="return "+source;if(formatStringOrScope){var scopeKeys=Object.keys(formatStringOrScope),scopeParams=new Array(scopeKeys.length+1),scopeValues=new Array(scopeKeys.length),scopeOffset=0;while(scopeOffset<scopeKeys.length){scopeParams[scopeOffset]=scopeKeys[scopeOffset];scopeValues[scopeOffset]=formatStringOrScope[scopeKeys[scopeOffset++]]}scopeParams[scopeOffset]=source;return Function.apply(null,scopeParams).apply(null,scopeValues)}return Function(source)()}var formatParams=new Array(arguments.length-1),formatOffset=0;while(formatOffset<formatParams.length)formatParams[formatOffset]=arguments[++formatOffset];formatOffset=0;formatStringOrScope=formatStringOrScope.replace(/%([%dfijs])/g,function replace($0,$1){var value=formatParams[formatOffset++];switch($1){case"d":case"f":return String(Number(value));case"i":return String(Math.floor(value));case"j":return JSON.stringify(value);case"s":return String(value)}return"%"});if(formatOffset!==formatParams.length)throw Error("parameter count mismatch");body.push(formatStringOrScope);return Codegen}function toString(functionNameOverride){return"function "+(functionNameOverride||functionName||"")+"("+(functionParams&&functionParams.join(",")||"")+"){\n "+body.join("\n ")+"\n}"}Codegen.toString=toString;return Codegen}codegen.verbose=false},{}],4:[function(require,module,exports){"use strict";module.exports=EventEmitter;function EventEmitter(){this._listeners={}}EventEmitter.prototype.on=function on(evt,fn,ctx){(this._listeners[evt]||(this._listeners[evt]=[])).push({fn:fn,ctx:ctx||this});return this};EventEmitter.prototype.off=function off(evt,fn){if(evt===undefined)this._listeners={};else{if(fn===undefined)this._listeners[evt]=[];else{var listeners=this._listeners[evt];for(var i=0;i<listeners.length;)if(listeners[i].fn===fn)listeners.splice(i,1);else++i}}return this};EventEmitter.prototype.emit=function emit(evt){var listeners=this._listeners[evt];if(listeners){var args=[],i=1;for(;i<arguments.length;)args.push(arguments[i++]);for(i=0;i<listeners.length;)listeners[i].fn.apply(listeners[i++].ctx,args)}return this}},{}],5:[function(require,module,exports){"use strict";module.exports=fetch;var asPromise=require(1),inquire=require(7);var fs=inquire("fs");function fetch(filename,options,callback){if(typeof options==="function"){callback=options;options={}}else if(!options)options={};if(!callback)return asPromise(fetch,this,filename,options);if(!options.xhr&&fs&&fs.readFile)return fs.readFile(filename,function fetchReadFileCallback(err,contents){return err&&typeof XMLHttpRequest!=="undefined"?fetch.xhr(filename,options,callback):err?callback(err):callback(null,options.binary?contents:contents.toString("utf8"))});return fetch.xhr(filename,options,callback)}fetch.xhr=function fetch_xhr(filename,options,callback){var xhr=new XMLHttpRequest();xhr.onreadystatechange=function fetchOnReadyStateChange(){if(xhr.readyState!==4)return undefined;if(xhr.status!==0&&xhr.status!==200)return callback(Error("status "+xhr.status));if(options.binary){var buffer=xhr.response;if(!buffer){buffer=[];for(var i=0;i<xhr.responseText.length;++i)buffer.push(xhr.responseText.charCodeAt(i)&255)}return callback(null,typeof Uint8Array!=="undefined"?new Uint8Array(buffer):buffer)}return callback(null,xhr.responseText)};if(options.binary){if("overrideMimeType"in xhr)xhr.overrideMimeType("text/plain; charset=x-user-defined");xhr.responseType="arraybuffer"}xhr.open("GET",filename);xhr.send()}},{"1":1,"7":7}],6:[function(require,module,exports){"use strict";module.exports=factory(factory);function factory(exports){if(typeof Float32Array!=="undefined")(function(){var f32=new Float32Array([-0]),f8b=new Uint8Array(f32.buffer),le=f8b[3]===128;function writeFloat_f32_cpy(val,buf,pos){f32[0]=val;buf[pos]=f8b[0];buf[pos+1]=f8b[1];buf[pos+2]=f8b[2];buf[pos+3]=f8b[3]}function writeFloat_f32_rev(val,buf,pos){f32[0]=val;buf[pos]=f8b[3];buf[pos+1]=f8b[2];buf[pos+2]=f8b[1];buf[pos+3]=f8b[0]}exports.writeFloatLE=le?writeFloat_f32_cpy:writeFloat_f32_rev;exports.writeFloatBE=le?writeFloat_f32_rev:writeFloat_f32_cpy;function readFloat_f32_cpy(buf,pos){f8b[0]=buf[pos];f8b[1]=buf[pos+1];f8b[2]=buf[pos+2];f8b[3]=buf[pos+3];return f32[0]}function readFloat_f32_rev(buf,pos){f8b[3]=buf[pos];f8b[2]=buf[pos+1];f8b[1]=buf[pos+2];f8b[0]=buf[pos+3];return f32[0]}exports.readFloatLE=le?readFloat_f32_cpy:readFloat_f32_rev;exports.readFloatBE=le?readFloat_f32_rev:readFloat_f32_cpy})();else(function(){function writeFloat_ieee754(writeUint,val,buf,pos){var sign=val<0?1:0;if(sign)val=-val;if(val===0)writeUint(1/val>0?0:2147483648,buf,pos);else if(isNaN(val))writeUint(2143289344,buf,pos);else if(val>3.4028234663852886e+38)writeUint((sign<<31|2139095040)>>>0,buf,pos);else if(val<1.1754943508222875e-38)writeUint((sign<<31|Math.round(val/1.401298464324817e-45))>>>0,buf,pos);else{var exponent=Math.floor(Math.log(val)/Math.LN2),mantissa=Math.round(val*Math.pow(2,-exponent)*8388608)&8388607;writeUint((sign<<31|exponent+127<<23|mantissa)>>>0,buf,pos)}}exports.writeFloatLE=writeFloat_ieee754.bind(null,writeUintLE);exports.writeFloatBE=writeFloat_ieee754.bind(null,writeUintBE);function readFloat_ieee754(readUint,buf,pos){var uint=readUint(buf,pos),sign=(uint>>31)*2+1,exponent=uint>>>23&255,mantissa=uint&8388607;return exponent===255?mantissa?NaN:sign*Infinity:exponent===0?sign*1.401298464324817e-45*mantissa:sign*Math.pow(2,exponent-150)*(mantissa+8388608)}exports.readFloatLE=readFloat_ieee754.bind(null,readUintLE);exports.readFloatBE=readFloat_ieee754.bind(null,readUintBE)})();if(typeof Float64Array!=="undefined")(function(){var f64=new Float64Array([-0]),f8b=new Uint8Array(f64.buffer),le=f8b[7]===128;function writeDouble_f64_cpy(val,buf,pos){f64[0]=val;buf[pos]=f8b[0];buf[pos+1]=f8b[1];buf[pos+2]=f8b[2];buf[pos+3]=f8b[3];buf[pos+4]=f8b[4];buf[pos+5]=f8b[5];buf[pos+6]=f8b[6];buf[pos+7]=f8b[7]}function writeDouble_f64_rev(val,buf,pos){f64[0]=val;buf[pos]=f8b[7];buf[pos+1]=f8b[6];buf[pos+2]=f8b[5];buf[pos+3]=f8b[4];buf[pos+4]=f8b[3];buf[pos+5]=f8b[2];buf[pos+6]=f8b[1];buf[pos+7]=f8b[0]}exports.writeDoubleLE=le?writeDouble_f64_cpy:writeDouble_f64_rev;exports.writeDoubleBE=le?writeDouble_f64_rev:writeDouble_f64_cpy;function readDouble_f64_cpy(buf,pos){f8b[0]=buf[pos];f8b[1]=buf[pos+1];f8b[2]=buf[pos+2];f8b[3]=buf[pos+3];f8b[4]=buf[pos+4];f8b[5]=buf[pos+5];f8b[6]=buf[pos+6];f8b[7]=buf[pos+7];return f64[0]}function readDouble_f64_rev(buf,pos){f8b[7]=buf[pos];f8b[6]=buf[pos+1];f8b[5]=buf[pos+2];f8b[4]=buf[pos+3];f8b[3]=buf[pos+4];f8b[2]=buf[pos+5];f8b[1]=buf[pos+6];f8b[0]=buf[pos+7];return f64[0]}exports.readDoubleLE=le?readDouble_f64_cpy:readDouble_f64_rev;exports.readDoubleBE=le?readDouble_f64_rev:readDouble_f64_cpy})();else(function(){function writeDouble_ieee754(writeUint,off0,off1,val,buf,pos){var sign=val<0?1:0;if(sign)val=-val;if(val===0){writeUint(0,buf,pos+off0);writeUint(1/val>0?0:2147483648,buf,pos+off1)}else if(isNaN(val)){writeUint(0,buf,pos+off0);writeUint(2146959360,buf,pos+off1)}else if(val>1.7976931348623157e+308){writeUint(0,buf,pos+off0);writeUint((sign<<31|2146435072)>>>0,buf,pos+off1)}else{var mantissa;if(val<2.2250738585072014e-308){mantissa=val/5e-324;writeUint(mantissa>>>0,buf,pos+off0);writeUint((sign<<31|mantissa/4294967296)>>>0,buf,pos+off1)}else{var exponent=Math.floor(Math.log(val)/Math.LN2);if(exponent===1024)exponent=1023;mantissa=val*Math.pow(2,-exponent);writeUint(mantissa*4503599627370496>>>0,buf,pos+off0);writeUint((sign<<31|exponent+1023<<20|mantissa*1048576&1048575)>>>0,buf,pos+off1)}}}exports.writeDoubleLE=writeDouble_ieee754.bind(null,writeUintLE,0,4);exports.writeDoubleBE=writeDouble_ieee754.bind(null,writeUintBE,4,0);function readDouble_ieee754(readUint,off0,off1,buf,pos){var lo=readUint(buf,pos+off0),hi=readUint(buf,pos+off1);var sign=(hi>>31)*2+1,exponent=hi>>>20&2047,mantissa=4294967296*(hi&1048575)+lo;return exponent===2047?mantissa?NaN:sign*Infinity:exponent===0?sign*5e-324*mantissa:sign*Math.pow(2,exponent-1075)*(mantissa+4503599627370496)}exports.readDoubleLE=readDouble_ieee754.bind(null,readUintLE,0,4);exports.readDoubleBE=readDouble_ieee754.bind(null,readUintBE,4,0)})();return exports}function writeUintLE(val,buf,pos){buf[pos]=val&255;buf[pos+1]=val>>>8&255;buf[pos+2]=val>>>16&255;buf[pos+3]=val>>>24}function writeUintBE(val,buf,pos){buf[pos]=val>>>24;buf[pos+1]=val>>>16&255;buf[pos+2]=val>>>8&255;buf[pos+3]=val&255}function readUintLE(buf,pos){return(buf[pos]|buf[pos+1]<<8|buf[pos+2]<<16|buf[pos+3]<<24)>>>0}function readUintBE(buf,pos){return(buf[pos]<<24|buf[pos+1]<<16|buf[pos+2]<<8|buf[pos+3])>>>0}},{}],7:[function(require,module,exports){"use strict";module.exports=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}},{}],8:[function(require,module,exports){"use strict";var path=exports;var isAbsolute=path.isAbsolute=function isAbsolute(path){return/^(?:\/|\w+:)/.test(path)};var normalize=path.normalize=function normalize(path){path=path.replace(/\\/g,"/").replace(/\/{2,}/g,"/");var parts=path.split("/"),absolute=isAbsolute(path),prefix="";if(absolute)prefix=parts.shift()+"/";for(var i=0;i<parts.length;){if(parts[i]===".."){if(i>0&&parts[i-1]!=="..")parts.splice(--i,2);else if(absolute)parts.splice(i,1);else++i}else if(parts[i]===".")parts.splice(i,1);else++i}return prefix+parts.join("/")};path.resolve=function resolve(originPath,includePath,alreadyNormalized){if(!alreadyNormalized)includePath=normalize(includePath);if(isAbsolute(includePath))return includePath;if(!alreadyNormalized)originPath=normalize(originPath);return(originPath=originPath.replace(/(?:\/|^)[^/]+$/,"")).length?normalize(originPath+"/"+includePath):includePath}},{}],9:[function(require,module,exports){"use strict";module.exports=pool;function pool(alloc,slice,size){var SIZE=size||8192;var MAX=SIZE>>>1;var slab=null;var offset=SIZE;return function pool_alloc(size){if(size<1||size>MAX)return alloc(size);if(offset+size>SIZE){slab=alloc(SIZE);offset=0}var buf=slice.call(slab,offset,offset+=size);if(offset&7)offset=(offset|7)+1;return buf}}},{}],10:[function(require,module,exports){"use strict";var utf8=exports;utf8.length=function utf8_length(string){var len=0,c=0;for(var i=0;i<string.length;++i){c=string.charCodeAt(i);if(c<128)len+=1;else if(c<2048)len+=2;else if((c&0xFC00)===0xD800&&(string.charCodeAt(i+1)&0xFC00)===0xDC00){++i;len+=4}else len+=3}return len};utf8.read=function utf8_read(buffer,start,end){var len=end-start;if(len<1)return"";var parts=null,chunk=[],i=0,t;while(start<end){t=buffer[start++];if(t<128)chunk[i++]=t;else if(t>191&&t<224)chunk[i++]=(t&31)<<6|buffer[start++]&63;else if(t>239&&t<365){t=((t&7)<<18|(buffer[start++]&63)<<12|(buffer[start++]&63)<<6|buffer[start++]&63)-0x10000;chunk[i++]=0xD800+(t>>10);chunk[i++]=0xDC00+(t&1023)}else chunk[i++]=(t&15)<<12|(buffer[start++]&63)<<6|buffer[start++]&63;if(i>8191){(parts||(parts=[])).push(String.fromCharCode.apply(String,chunk));i=0}}if(parts){if(i)parts.push(String.fromCharCode.apply(String,chunk.slice(0,i)));return parts.join("")}return String.fromCharCode.apply(String,chunk.slice(0,i))};utf8.write=function utf8_write(string,buffer,offset){var start=offset,c1,c2;for(var i=0;i<string.length;++i){c1=string.charCodeAt(i);if(c1<128){buffer[offset++]=c1}else if(c1<2048){buffer[offset++]=c1>>6|192;buffer[offset++]=c1&63|128}else if((c1&0xFC00)===0xD800&&((c2=string.charCodeAt(i+1))&0xFC00)===0xDC00){c1=0x10000+((c1&0x03FF)<<10)+(c2&0x03FF);++i;buffer[offset++]=c1>>18|240;buffer[offset++]=c1>>12&63|128;buffer[offset++]=c1>>6&63|128;buffer[offset++]=c1&63|128}else{buffer[offset++]=c1>>12|224;buffer[offset++]=c1>>6&63|128;buffer[offset++]=c1&63|128}}return offset-start}},{}],11:[function(require,module,exports){"use strict";var converter=exports;var Enum=require(14),util=require(33);function genValuePartial_fromObject(gen,field,fieldIndex,prop){if(field.resolvedType){if(field.resolvedType instanceof Enum){gen("switch(d%s){",prop);for(var values=field.resolvedType.values,keys=Object.keys(values),i=0;i<keys.length;++i){if(field.repeated&&values[keys[i]]===field.typeDefault)gen("default:");gen("case%j:",keys[i])("case %i:",values[keys[i]])("m%s=%j",prop,values[keys[i]])("break")}gen("}")}else gen("if(typeof d%s!==\"object\")",prop)("throw TypeError(%j)",field.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",prop,fieldIndex,prop)}else{var isUnsigned=false;switch(field.type){case"double":case"float":gen("m%s=Number(d%s)",prop,prop);break;case"uint32":case"fixed32":gen("m%s=d%s>>>0",prop,prop);break;case"int32":case"sint32":case"sfixed32":gen("m%s=d%s|0",prop,prop);break;case"uint64":isUnsigned=true;case"int64":case"sint64":case"fixed64":case"sfixed64":gen("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",prop,prop,isUnsigned)("else if(typeof d%s===\"string\")",prop)("m%s=parseInt(d%s,10)",prop,prop)("else if(typeof d%s===\"number\")",prop)("m%s=d%s",prop,prop)("else if(typeof d%s===\"object\")",prop)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",prop,prop,prop,isUnsigned?"true":"");break;case"bytes":gen("if(typeof d%s===\"string\")",prop)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",prop,prop,prop)("else if(d%s.length)",prop)("m%s=d%s",prop,prop);break;case"string":gen("m%s=String(d%s)",prop,prop);break;case"bool":gen("m%s=Boolean(d%s)",prop,prop);break}}return gen}converter.fromObject=function fromObject(mtype){var fields=mtype.fieldsArray;var gen=util.codegen(["d"],mtype.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!fields.length)return gen("return new this.ctor");gen("var m=new this.ctor");for(var i=0;i<fields.length;++i){var field=fields[i].resolve(),prop=util.safeProp(field.name);if(field.map){gen("if(d%s){",prop)("if(typeof d%s!==\"object\")",prop)("throw TypeError(%j)",field.fullName+": object expected")("m%s={}",prop)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",prop);genValuePartial_fromObject(gen,field,i,prop+"[ks[i]]")("}")("}")}else if(field.repeated){gen("if(d%s){",prop)("if(!Array.isArray(d%s))",prop)("throw TypeError(%j)",field.fullName+": array expected")("m%s=[]",prop)("for(var i=0;i<d%s.length;++i){",prop);genValuePartial_fromObject(gen,field,i,prop+"[i]")("}")("}");}else{if(!(field.resolvedType instanceof Enum))gen("if(d%s!=null){",prop);genValuePartial_fromObject(gen,field,i,prop);if(!(field.resolvedType instanceof Enum))gen("}");}}return gen("return m");};function genValuePartial_toObject(gen,field,fieldIndex,prop){if(field.resolvedType){if(field.resolvedType instanceof Enum)gen("d%s=o.enums===String?types[%i].values[m%s]:m%s",prop,fieldIndex,prop,prop);else gen("d%s=types[%i].toObject(m%s,o)",prop,fieldIndex,prop);}else{var isUnsigned=false;switch(field.type){case"double":case"float":gen("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",prop,prop,prop,prop);break;case"uint64":isUnsigned=true;case"int64":case"sint64":case"fixed64":case"sfixed64":gen("if(typeof m%s===\"number\")",prop)("d%s=o.longs===String?String(m%s):m%s",prop,prop,prop)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",prop,prop,prop,prop,isUnsigned?"true":"",prop);break;case"bytes":gen("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",prop,prop,prop,prop,prop);break;default:gen("d%s=m%s",prop,prop);break}}return gen}converter.toObject=function toObject(mtype){var fields=mtype.fieldsArray.slice().sort(util.compareFieldsById);if(!fields.length)return util.codegen()("return {}");var gen=util.codegen(["m","o"],mtype.name+"$toObject")("if(!o)")("o={}")("var d={}");var repeatedFields=[],mapFields=[],normalFields=[],i=0;for(;i<fields.length;++i)if(!fields[i].partOf)(fields[i].resolve().repeated?repeatedFields:fields[i].map?mapFields:normalFields).push(fields[i]);if(repeatedFields.length){gen("if(o.arrays||o.defaults){");for(i=0;i<repeatedFields.length;++i)gen("d%s=[]",util.safeProp(repeatedFields[i].name));gen("}")}if(mapFields.length){gen("if(o.objects||o.defaults){");for(i=0;i<mapFields.length;++i)gen("d%s={}",util.safeProp(mapFields[i].name));gen("}")}if(normalFields.length){gen("if(o.defaults){");for(i=0;i<normalFields.length;++i){var field=normalFields[i],prop=util.safeProp(field.name);if(field.resolvedType instanceof Enum)gen("d%s=o.enums===String?%j:%j",prop,field.resolvedType.valuesById[field.typeDefault],field.typeDefault);else if(field.long)gen("if(util.Long){")("var n=new util.Long(%i,%i,%j)",field.typeDefault.low,field.typeDefault.high,field.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",prop)("}else")("d%s=o.longs===String?%j:%i",prop,field.typeDefault.toString(),field.typeDefault.toNumber());else if(field.bytes){var arrayDefault="["+Array.prototype.slice.call(field.typeDefault).join(",")+"]";gen("if(o.bytes===String)d%s=%j",prop,String.fromCharCode.apply(String,field.typeDefault))("else{")("d%s=%s",prop,arrayDefault)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",prop,prop)("}")}else gen("d%s=%j",prop,field.typeDefault)}gen("}")}var hasKs2=false;for(i=0;i<fields.length;++i){var field=fields[i],index=mtype._fieldsArray.indexOf(field),prop=util.safeProp(field.name);if(field.map){if(!hasKs2){hasKs2=true;gen("var ks2")}gen("if(m%s&&(ks2=Object.keys(m%s)).length){",prop,prop)("d%s={}",prop)("for(var j=0;j<ks2.length;++j){");genValuePartial_toObject(gen,field,index,prop+"[ks2[j]]")("}");}else if(field.repeated){gen("if(m%s&&m%s.length){",prop,prop)("d%s=[]",prop)("for(var j=0;j<m%s.length;++j){",prop);genValuePartial_toObject(gen,field,index,prop+"[j]")("}");}else{gen("if(m%s!=null&&m.hasOwnProperty(%j)){",prop,field.name);genValuePartial_toObject(gen,field,index,prop);if(field.partOf)gen("if(o.oneofs)")("d%s=%j",util.safeProp(field.partOf.name),field.name);}gen("}");}return gen("return d");};},{"14":14,"33":33}],12:[function(require,module,exports){"use strict";module.exports=decoder;var Enum=require(14),types=require(32),util=require(33);function missing(field){return"missing required '"+field.name+"'";}function decoder(mtype){var gen=util.codegen(["r","l"],mtype.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(mtype.fieldsArray.filter(function(field){return field.map;}).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()");if(mtype.group)gen("if((t&7)===4)")("break");gen("switch(t>>>3){");var i=0;for(;i<mtype.fieldsArray.length;++i){var field=mtype._fieldsArray[i].resolve(),type=field.resolvedType instanceof Enum?"int32":field.type,ref="m"+util.safeProp(field.name);gen("case %i:",field.id);if(field.map){gen("if(%s===util.emptyObject)",ref)("%s={}",ref)("var c2 = r.uint32()+r.pos");if(types.defaults[field.keyType]!==undefined)gen("k=%j",types.defaults[field.keyType]);else gen("k=null");if(types.defaults[type]!==undefined)gen("value=%j",types.defaults[type]);else gen("value=null");gen("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",field.keyType)("case 2:");if(types.basic[type]===undefined)gen("value=types[%i].decode(r,r.uint32())",i);else gen("value=r.%s()",type);gen("break")("default:")("r.skipType(tag2&7)")("break")("}")("}");if(types.long[field.keyType]!==undefined)gen("%s[typeof k===\"object\"?util.longToHash(k):k]=value",ref);else gen("%s[k]=value",ref)}else if(field.repeated){gen("if(!(%s&&%s.length))",ref,ref)("%s=[]",ref);if(types.packed[type]!==undefined)gen("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",ref,type)("}else");if(types.basic[type]===undefined)gen(field.resolvedType.group?"%s.push(types[%i].decode(r))":"%s.push(types[%i].decode(r,r.uint32()))",ref,i);else gen("%s.push(r.%s())",ref,type)}else if(types.basic[type]===undefined)gen(field.resolvedType.group?"%s=types[%i].decode(r)":"%s=types[%i].decode(r,r.uint32())",ref,i);else gen("%s=r.%s()",ref,type);gen("break")}gen("default:")("r.skipType(t&7)")("break")("}")("}");for(i=0;i<mtype._fieldsArray.length;++i){var rfield=mtype._fieldsArray[i];if(rfield.required)gen("if(!m.hasOwnProperty(%j))",rfield.name)("throw util.ProtocolError(%j,{instance:m})",missing(rfield))}return gen("return m")}},{"14":14,"32":32,"33":33}],13:[function(require,module,exports){"use strict";module.exports=encoder;var Enum=require(14),types=require(32),util=require(33);function genTypePartial(gen,field,fieldIndex,ref){return field.resolvedType.group?gen("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",fieldIndex,ref,(field.id<<3|3)>>>0,(field.id<<3|4)>>>0):gen("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",fieldIndex,ref,(field.id<<3|2)>>>0)}function encoder(mtype){var gen=util.codegen(["m","w"],mtype.name+"$encode")("if(!w)")("w=Writer.create()");var i,ref;var fields=mtype.fieldsArray.slice().sort(util.compareFieldsById);for(var i=0;i<fields.length;++i){var field=fields[i].resolve(),index=mtype._fieldsArray.indexOf(field),type=field.resolvedType instanceof Enum?"int32":field.type,wireType=types.basic[type];ref="m"+util.safeProp(field.name);if(field.map){gen("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",ref,field.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",ref)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(field.id<<3|2)>>>0,8|types.mapKey[field.keyType],field.keyType);if(wireType===undefined)gen("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",index,ref);else gen(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|wireType,type,ref);gen("}")("}")}else if(field.repeated){gen("if(%s!=null&&%s.length){",ref,ref);if(field.packed&&types.packed[type]!==undefined){gen("w.uint32(%i).fork()",(field.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",ref)("w.%s(%s[i])",type,ref)("w.ldelim()");}else{gen("for(var i=0;i<%s.length;++i)",ref);if(wireType===undefined)genTypePartial(gen,field,index,ref+"[i]");else gen("w.uint32(%i).%s(%s[i])",(field.id<<3|wireType)>>>0,type,ref);}gen("}");}else{if(field.optional)gen("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",ref,field.name);if(wireType===undefined)genTypePartial(gen,field,index,ref);else gen("w.uint32(%i).%s(%s)",(field.id<<3|wireType)>>>0,type,ref);}}return gen("return w");}},{"14":14,"32":32,"33":33}],14:[function(require,module,exports){"use strict";module.exports=Enum;var ReflectionObject=require(22);((Enum.prototype=Object.create(ReflectionObject.prototype)).constructor=Enum).className="Enum";var Namespace=require(21),util=require(33);function Enum(name,values,options,comment,comments){ReflectionObject.call(this,name,options);if(values&&typeof values!=="object")throw TypeError("values must be an object");this.valuesById={};this.values=Object.create(this.valuesById);this.comment=comment;this.comments=comments||{};this.reserved=undefined;if(values)for(var keys=Object.keys(values),i=0;i<keys.length;++i)if(typeof values[keys[i]]==="number")this.valuesById[this.values[keys[i]]=values[keys[i]]]=keys[i];}Enum.fromJSON=function fromJSON(name,json){var enm=new Enum(name,json.values,json.options,json.comment,json.comments);enm.reserved=json.reserved;return enm;};Enum.prototype.toJSON=function toJSON(toJSONOptions){var keepComments=toJSONOptions?Boolean(toJSONOptions.keepComments):false;return util.toObject(["options",this.options,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:undefined,"comment",keepComments?this.comment:undefined,"comments",keepComments?this.comments:undefined]);};Enum.prototype.add=function add(name,id,comment){if(!util.isString(name))throw TypeError("name must be a string");if(!util.isInteger(id))throw TypeError("id must be an integer");if(this.values[name]!==undefined)throw Error("duplicate name '"+name+"' in "+this);if(this.isReservedId(id))throw Error("id "+id+" is reserved in "+this);if(this.isReservedName(name))throw Error("name '"+name+"' is reserved in "+this);if(this.valuesById[id]!==undefined){if(!(this.options&&this.options.allow_alias))throw Error("duplicate id "+id+" in "+this);this.values[name]=id;}else this.valuesById[this.values[name]=id]=name;this.comments[name]=comment||null;return this;};Enum.prototype.remove=function remove(name){if(!util.isString(name))throw TypeError("name must be a string");var val=this.values[name];if(val==null)throw Error("name '"+name+"' does not exist in "+this);delete this.valuesById[val];delete this.values[name];delete this.comments[name];return this;};Enum.prototype.isReservedId=function isReservedId(id){return Namespace.isReservedId(this.reserved,id);};Enum.prototype.isReservedName=function isReservedName(name){return Namespace.isReservedName(this.reserved,name);};},{"21":21,"22":22,"33":33}],15:[function(require,module,exports){"use strict";module.exports=Field;var ReflectionObject=require(22);((Field.prototype=Object.create(ReflectionObject.prototype)).constructor=Field).className="Field";var Enum=require(14),types=require(32),util=require(33);var Type;var ruleRe=/^required|optional|repeated$/;Field.fromJSON=function fromJSON(name,json){return new Field(name,json.id,json.type,json.rule,json.extend,json.options,json.comment);};function Field(name,id,type,rule,extend,options,comment){if(util.isObject(rule)){comment=extend;options=rule;rule=extend=undefined;}else if(util.isObject(extend)){comment=options;options=extend;extend=undefined;}ReflectionObject.call(this,name,options);if(!util.isInteger(id)||id<0)throw TypeError("id must be a non-negative integer");if(!util.isString(type))throw TypeError("type must be a string");if(rule!==undefined&&!ruleRe.test(rule=rule.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(extend!==undefined&&!util.isString(extend))throw TypeError("extend must be a string");if(rule==="proto3_optional"){rule="optional";}this.rule=rule&&rule!=="optional"?rule:undefined;this.type=type;this.id=id;this.extend=extend||undefined;this.required=rule==="required";this.optional=!this.required;this.repeated=rule==="repeated";this.map=false;this.message=null;this.partOf=null;this.typeDefault=null;this.defaultValue=null;this.long=util.Long?types.long[type]!==undefined:false;this.bytes=type==="bytes";this.resolvedType=null;this.extensionField=null;this.declaringField=null;this._packed=null;this.comment=comment;}Object.defineProperty(Field.prototype,"packed",{get:function(){if(this._packed===null)this._packed=this.getOption("packed")!==false;return this._packed;}});Field.prototype.setOption=function setOption(name,value,ifNotSet){if(name==="packed")this._packed=null;return ReflectionObject.prototype.setOption.call(this,name,value,ifNotSet);};Field.prototype.toJSON=function toJSON(toJSONOptions){var keepComments=toJSONOptions?Boolean(toJSONOptions.keepComments):false;return util.toObject(["rule",this.rule!=="optional"&&this.rule||undefined,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",keepComments?this.comment:undefined]);};Field.prototype.resolve=function resolve(){if(this.resolved)return this;if((this.typeDefault=types.defaults[this.type])===undefined){this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type);if(this.resolvedType instanceof Type)this.typeDefault=null;else this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]];}if(this.options&&this.options["default"]!=null){this.typeDefault=this.options["default"];if(this.resolvedType instanceof Enum&&typeof this.typeDefault==="string")this.typeDefault=this.resolvedType.values[this.typeDefault];}if(this.options){if(this.options.packed===true||this.options.packed!==undefined&&this.resolvedType&&!(this.resolvedType instanceof Enum))delete this.options.packed;if(!Object.keys(this.options).length)this.options=undefined;}if(this.long){this.typeDefault=util.Long.fromNumber(this.typeDefault,this.type.charAt(0)==="u");if(Object.freeze)Object.freeze(this.typeDefault);}else if(this.bytes&&typeof this.typeDefault==="string"){var buf;if(util.base64.test(this.typeDefault))util.base64.decode(this.typeDefault,buf=util.newBuffer(util.base64.length(this.typeDefault)),0);else util.utf8.write(this.typeDefault,buf=util.newBuffer(util.utf8.length(this.typeDefault)),0);this.typeDefault=buf;}if(this.map)this.defaultValue=util.emptyObject;else if(this.repeated)this.defaultValue=util.emptyArray;else this.defaultValue=this.typeDefault;if(this.parent instanceof Type)this.parent.ctor.prototype[this.name]=this.defaultValue;return ReflectionObject.prototype.resolve.call(this);};Field.d=function decorateField(fieldId,fieldType,fieldRule,defaultValue){if(typeof fieldType==="function")fieldType=util.decorateType(fieldType).name;else if(fieldType&&typeof fieldType==="object")fieldType=util.decorateEnum(fieldType).name;return function fieldDecorator(prototype,fieldName){util.decorateType(prototype.constructor).add(new Field(fieldName,fieldId,fieldType,fieldRule,{"default":defaultValue}));};};Field._configure=function configure(Type_){Type=Type_;};},{"14":14,"22":22,"32":32,"33":33}],16:[function(require,module,exports){"use strict";protobuf=module.exports=require(17);protobuf.build="light";function load(filename,root,callback){if(typeof root==="function"){callback=root;root=new protobuf.Root();}else if(!root)root=new protobuf.Root();return root.load(filename,callback);}protobuf.load=load;function loadSync(filename,root){if(!root)root=new protobuf.Root();return root.loadSync(filename);}protobuf.loadSync=loadSync;protobuf.encoder=require(13);protobuf.decoder=require(12);protobuf.verifier=require(36);protobuf.converter=require(11);protobuf.ReflectionObject=require(22);protobuf.Namespace=require(21);protobuf.Root=require(26);protobuf.Enum=require(14);protobuf.Type=require(31);protobuf.Field=require(15);protobuf.OneOf=require(23);protobuf.MapField=require(18);protobuf.Service=require(30);protobuf.Method=require(20);protobuf.Message=require(19);protobuf.wrappers=require(37);protobuf.types=require(32);protobuf.util=require(33);protobuf.ReflectionObject._configure(protobuf.Root);protobuf.Namespace._configure(protobuf.Type,protobuf.Service,protobuf.Enum);protobuf.Root._configure(protobuf.Type);protobuf.Field._configure(protobuf.Type);},{"11":11,"12":12,"13":13,"14":14,"15":15,"17":17,"18":18,"19":19,"20":20,"21":21,"22":22,"23":23,"26":26,"30":30,"31":31,"32":32,"33":33,"36":36,"37":37}],17:[function(require,module,exports){"use strict";protobuf=exports;protobuf.build="minimal";protobuf.Writer=require(38);protobuf.BufferWriter=require(39);protobuf.Reader=require(24);protobuf.BufferReader=require(25);protobuf.util=require(35);protobuf.rpc=require(28);protobuf.roots=require(27);protobuf.configure=configure;function configure(){protobuf.util._configure();protobuf.Writer._configure(protobuf.BufferWriter);protobuf.Reader._configure(protobuf.BufferReader);}configure();},{"24":24,"25":25,"27":27,"28":28,"35":35,"38":38,"39":39}],18:[function(require,module,exports){"use strict";module.exports=MapField;var Field=require(15);((MapField.prototype=Object.create(Field.prototype)).constructor=MapField).className="MapField";var types=require(32),util=require(33);function MapField(name,id,keyType,type,options,comment){Field.call(this,name,id,type,undefined,undefined,options,comment);if(!util.isString(keyType))throw TypeError("keyType must be a string");this.keyType=keyType;this.resolvedKeyType=null;this.map=true;}MapField.fromJSON=function fromJSON(name,json){return new MapField(name,json.id,json.keyType,json.type,json.options,json.comment);};MapField.prototype.toJSON=function toJSON(toJSONOptions){var keepComments=toJSONOptions?Boolean(toJSONOptions.keepComments):false;return util.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",keepComments?this.comment:undefined]);};MapField.prototype.resolve=function resolve(){if(this.resolved)return this;if(types.mapKey[this.keyType]===undefined)throw Error("invalid key type: "+this.keyType);return Field.prototype.resolve.call(this);};MapField.d=function decorateMapField(fieldId,fieldKeyType,fieldValueType){if(typeof fieldValueType==="function")fieldValueType=util.decorateType(fieldValueType).name;else if(fieldValueType&&typeof fieldValueType==="object")fieldValueType=util.decorateEnum(fieldValueType).name;return function mapFieldDecorator(prototype,fieldName){util.decorateType(prototype.constructor).add(new MapField(fieldName,fieldId,fieldKeyType,fieldValueType));};};},{"15":15,"32":32,"33":33}],19:[function(require,module,exports){"use strict";module.exports=Message;var util=require(35);function Message(properties){if(properties)for(var keys=Object.keys(properties),i=0;i<keys.length;++i)this[keys[i]]=properties[keys[i]];}Message.create=function create(properties){return this.$type.create(properties);};Message.encode=function encode(message,writer){return this.$type.encode(message,writer);};Message.encodeDelimited=function encodeDelimited(message,writer){return this.$type.encodeDelimited(message,writer);};Message.decode=function decode(reader){return this.$type.decode(reader);};Message.decodeDelimited=function decodeDelimited(reader){return this.$type.decodeDelimited(reader);};Message.verify=function verify(message){return this.$type.verify(message);};Message.fromObject=function fromObject(object){return this.$type.fromObject(object);};Message.toObject=function toObject(message,options){return this.$type.toObject(message,options);};Message.prototype.toJSON=function toJSON(){return this.$type.toObject(this,util.toJSONOptions);};},{"35":35}],20:[function(require,module,exports){"use strict";module.exports=Method;var ReflectionObject=require(22);((Method.prototype=Object.create(ReflectionObject.prototype)).constructor=Method).className="Method";var util=require(33);function Method(name,type,requestType,responseType,requestStream,responseStream,options,comment,parsedOptions){if(util.isObject(requestStream)){options=requestStream;requestStream=responseStream=undefined;}else if(util.isObject(responseStream)){options=responseStream;responseStream=undefined;}if(!(type===undefined||util.isString(type)))throw TypeError("type must be a string");if(!util.isString(requestType))throw TypeError("requestType must be a string");if(!util.isString(responseType))throw TypeError("responseType must be a string");ReflectionObject.call(this,name,options);this.type=type||"rpc";this.requestType=requestType;this.requestStream=requestStream?true:undefined;this.responseType=responseType;this.responseStream=responseStream?true:undefined;this.resolvedRequestType=null;this.resolvedResponseType=null;this.comment=comment;this.parsedOptions=parsedOptions;}Method.fromJSON=function fromJSON(name,json){return new Method(name,json.type,json.requestType,json.responseType,json.requestStream,json.responseStream,json.options,json.comment,json.parsedOptions);};Method.prototype.toJSON=function toJSON(toJSONOptions){var keepComments=toJSONOptions?Boolean(toJSONOptions.keepComments):false;return util.toObject(["type",this.type!=="rpc"&&this.type||undefined,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",keepComments?this.comment:undefined,"parsedOptions",this.parsedOptions,]);};Method.prototype.resolve=function resolve(){if(this.resolved)return this;this.resolvedRequestType=this.parent.lookupType(this.requestType);this.resolvedResponseType=this.parent.lookupType(this.responseType);return ReflectionObject.prototype.resolve.call(this);};},{"22":22,"33":33}],21:[function(require,module,exports){"use strict";module.exports=Namespace;var ReflectionObject=require(22);((Namespace.prototype=Object.create(ReflectionObject.prototype)).constructor=Namespace).className="Namespace";var Field=require(15),util=require(33);var Type,Service,Enum;Namespace.fromJSON=function fromJSON(name,json){return new Namespace(name,json.options).addJSON(json.nested);};function arrayToJSON(array,toJSONOptions){if(!(array&&array.length))return undefined;var obj={};for(var i=0;i<array.length;++i)obj[array[i].name]=array[i].toJSON(toJSONOptions);return obj;}Namespace.arrayToJSON=arrayToJSON;Namespace.isReservedId=function isReservedId(reserved,id){if(reserved)for(var i=0;i<reserved.length;++i)if(typeof reserved[i]!=="string"&&reserved[i][0]<=id&&reserved[i][1]>id)return true;return false;};Namespace.isReservedName=function isReservedName(reserved,name){if(reserved)for(var i=0;i<reserved.length;++i)if(reserved[i]===name)return true;return false;};function Namespace(name,options){ReflectionObject.call(this,name,options);this.nested=undefined;this._nestedArray=null;}function clearCache(namespace){namespace._nestedArray=null;return namespace;}Object.defineProperty(Namespace.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=util.toArray(this.nested));}});Namespace.prototype.toJSON=function toJSON(toJSONOptions){return util.toObject(["options",this.options,"nested",arrayToJSON(this.nestedArray,toJSONOptions)]);};Namespace.prototype.addJSON=function addJSON(nestedJson){var ns=this;if(nestedJson){for(var names=Object.keys(nestedJson),i=0,nested;i<names.length;++i){nested=nestedJson[names[i]];ns.add((nested.fields!==undefined?Type.fromJSON:nested.values!==undefined?Enum.fromJSON:nested.methods!==undefined?Service.fromJSON:nested.id!==undefined?Field.fromJSON:Namespace.fromJSON)(names[i],nested));}}return this;};Namespace.prototype.get=function get(name){return this.nested&&this.nested[name]||null;};Namespace.prototype.getEnum=function getEnum(name){if(this.nested&&this.nested[name]instanceof Enum)return this.nested[name].values;throw Error("no such enum: "+name);};Namespace.prototype.add=function add(object){if(!(object instanceof Field&&object.extend!==undefined||object instanceof Type||object instanceof Enum||object instanceof Service||object instanceof Namespace))throw TypeError("object must be a valid nested object");if(!this.nested)this.nested={};else{var prev=this.get(object.name);if(prev){if(prev instanceof Namespace&&object instanceof Namespace&&!(prev instanceof Type||prev instanceof Service)){var nested=prev.nestedArray;for(var i=0;i<nested.length;++i)object.add(nested[i]);this.remove(prev);if(!this.nested)this.nested={};object.setOptions(prev.options,true);}else throw Error("duplicate name '"+object.name+"' in "+this);}}this.nested[object.name]=object;object.onAdd(this);return clearCache(this);};Namespace.prototype.remove=function remove(object){if(!(object instanceof ReflectionObject))throw TypeError("object must be a ReflectionObject");if(object.parent!==this)throw Error(object+" is not a member of "+this);delete this.nested[object.name];if(!Object.keys(this.nested).length)this.nested=undefined;object.onRemove(this);return clearCache(this);};Namespace.prototype.define=function define(path,json){if(util.isString(path))path=path.split(".");else if(!Array.isArray(path))throw TypeError("illegal path");if(path&&path.length&&path[0]==="")throw Error("path must be relative");var ptr=this;while(path.length>0){var part=path.shift();if(ptr.nested&&ptr.nested[part]){ptr=ptr.nested[part];if(!(ptr instanceof Namespace))throw Error("path conflicts with non-namespace objects");}else ptr.add(ptr=new Namespace(part));}if(json)ptr.addJSON(json);return ptr;};Namespace.prototype.resolveAll=function resolveAll(){var nested=this.nestedArray,i=0;while(i<nested.length)if(nested[i]instanceof Namespace)nested[i++].resolveAll();else nested[i++].resolve();return this.resolve();};Namespace.prototype.lookup=function lookup(path,filterTypes,parentAlreadyChecked){if(typeof filterTypes==="boolean"){parentAlreadyChecked=filterTypes;filterTypes=undefined;}else if(filterTypes&&!Array.isArray(filterTypes))filterTypes=[filterTypes];if(util.isString(path)&&path.length){if(path===".")return this.root;path=path.split(".");}else if(!path.length)return this;if(path[0]==="")return this.root.lookup(path.slice(1),filterTypes);var found=this.get(path[0]);if(found){if(path.length===1){if(!filterTypes||filterTypes.indexOf(found.constructor)>-1)return found;}else if(found instanceof Namespace&&(found=found.lookup(path.slice(1),filterTypes,true)))return found;}else for(var i=0;i<this.nestedArray.length;++i)if(this._nestedArray[i]instanceof Namespace&&(found=this._nestedArray[i].lookup(path,filterTypes,true)))return found;if(this.parent===null||parentAlreadyChecked)return null;return this.parent.lookup(path,filterTypes);};Namespace.prototype.lookupType=function lookupType(path){var found=this.lookup(path,[Type]);if(!found)throw Error("no such type: "+path);return found;};Namespace.prototype.lookupEnum=function lookupEnum(path){var found=this.lookup(path,[Enum]);if(!found)throw Error("no such Enum '"+path+"' in "+this);return found;};Namespace.prototype.lookupTypeOrEnum=function lookupTypeOrEnum(path){var found=this.lookup(path,[Type,Enum]);if(!found)throw Error("no such Type or Enum '"+path+"' in "+this);return found;};Namespace.prototype.lookupService=function lookupService(path){var found=this.lookup(path,[Service]);if(!found)throw Error("no such Service '"+path+"' in "+this);return found;};Namespace._configure=function(Type_,Service_,Enum_){Type=Type_;Service=Service_;Enum=Enum_;};},{"15":15,"22":22,"33":33}],22:[function(require,module,exports){"use strict";module.exports=ReflectionObject;ReflectionObject.className="ReflectionObject";var util=require(33);var Root;function ReflectionObject(name,options){if(!util.isString(name))throw TypeError("name must be a string");if(options&&!util.isObject(options))throw TypeError("options must be an object");this.options=options;this.parsedOptions=null;this.name=name;this.parent=null;this.resolved=false;this.comment=null;this.filename=null;}Object.defineProperties(ReflectionObject.prototype,{root:{get:function(){var ptr=this;while(ptr.parent!==null)ptr=ptr.parent;return ptr;}},fullName:{get:function(){var path=[this.name],ptr=this.parent;while(ptr){path.unshift(ptr.name);ptr=ptr.parent;}return path.join(".");}}});ReflectionObject.prototype.toJSON=function toJSON(){throw Error();};ReflectionObject.prototype.onAdd=function onAdd(parent){if(this.parent&&this.parent!==parent)this.parent.remove(this);this.parent=parent;this.resolved=false;var root=parent.root;if(root instanceof Root)root._handleAdd(this);};ReflectionObject.prototype.onRemove=function onRemove(parent){var root=parent.root;if(root instanceof Root)root._handleRemove(this);this.parent=null;this.resolved=false;};ReflectionObject.prototype.resolve=function resolve(){if(this.resolved)return this;if(this.root instanceof Root)this.resolved=true;return this;};ReflectionObject.prototype.getOption=function getOption(name){if(this.options)return this.options[name];return undefined;};ReflectionObject.prototype.setOption=function setOption(name,value,ifNotSet){if(!ifNotSet||!this.options||this.options[name]===undefined)(this.options||(this.options={}))[name]=value;return this;};ReflectionObject.prototype.setParsedOption=function setParsedOption(name,value,propName){if(!this.parsedOptions){this.parsedOptions=[];}var parsedOptions=this.parsedOptions;if(propName){var opt=parsedOptions.find(function(opt){return Object.prototype.hasOwnProperty.call(opt,name);});if(opt){var newValue=opt[name];util.setProperty(newValue,propName,value);}else{opt={};opt[name]=util.setProperty({},propName,value);parsedOptions.push(opt);}}else{var newOpt={};newOpt[name]=value;parsedOptions.push(newOpt);}return this;};ReflectionObject.prototype.setOptions=function setOptions(options,ifNotSet){if(options)for(var keys=Object.keys(options),i=0;i<keys.length;++i)this.setOption(keys[i],options[keys[i]],ifNotSet);return this;};ReflectionObject.prototype.toString=function toString(){var className=this.constructor.className,fullName=this.fullName;if(fullName.length)return className+" "+fullName;return className;};ReflectionObject._configure=function(Root_){Root=Root_;};},{"33":33}],23:[function(require,module,exports){"use strict";module.exports=OneOf;var ReflectionObject=require(22);((OneOf.prototype=Object.create(ReflectionObject.prototype)).constructor=OneOf).className="OneOf";var Field=require(15),util=require(33);function OneOf(name,fieldNames,options,comment){if(!Array.isArray(fieldNames)){options=fieldNames;fieldNames=undefined;}ReflectionObject.call(this,name,options);if(!(fieldNames===undefined||Array.isArray(fieldNames)))throw TypeError("fieldNames must be an Array");this.oneof=fieldNames||[];this.fieldsArray=[];this.comment=comment;}OneOf.fromJSON=function fromJSON(name,json){return new OneOf(name,json.oneof,json.options,json.comment);};OneOf.prototype.toJSON=function toJSON(toJSONOptions){var keepComments=toJSONOptions?Boolean(toJSONOptions.keepComments):false;return util.toObject(["options",this.options,"oneof",this.oneof,"comment",keepComments?this.comment:undefined]);};function addFieldsToParent(oneof){if(oneof.parent)for(var i=0;i<oneof.fieldsArray.length;++i)if(!oneof.fieldsArray[i].parent)oneof.parent.add(oneof.fieldsArray[i]);}OneOf.prototype.add=function add(field){if(!(field instanceof Field))throw TypeError("field must be a Field");if(field.parent&&field.parent!==this.parent)field.parent.remove(field);this.oneof.push(field.name);this.fieldsArray.push(field);field.partOf=this;addFieldsToParent(this);return this;};OneOf.prototype.remove=function remove(field){if(!(field instanceof Field))throw TypeError("field must be a Field");var index=this.fieldsArray.indexOf(field);if(index<0)throw Error(field+" is not a member of "+this);this.fieldsArray.splice(index,1);index=this.oneof.indexOf(field.name);if(index>-1)this.oneof.splice(index,1);field.partOf=null;return this;};OneOf.prototype.onAdd=function onAdd(parent){ReflectionObject.prototype.onAdd.call(this,parent);var self=this;for(var i=0;i<this.oneof.length;++i){var field=parent.get(this.oneof[i]);if(field&&!field.partOf){field.partOf=self;self.fieldsArray.push(field);}}addFieldsToParent(this);};OneOf.prototype.onRemove=function onRemove(parent){for(var i=0,field;i<this.fieldsArray.length;++i)if((field=this.fieldsArray[i]).parent)field.parent.remove(field);ReflectionObject.prototype.onRemove.call(this,parent);};OneOf.d=function decorateOneOf(){var fieldNames=new Array(arguments.length),index=0;while(index<arguments.length)fieldNames[index]=arguments[index++];return function oneOfDecorator(prototype,oneofName){util.decorateType(prototype.constructor).add(new OneOf(oneofName,fieldNames));Object.defineProperty(prototype,oneofName,{get:util.oneOfGetter(fieldNames),set:util.oneOfSetter(fieldNames)});};};},{"15":15,"22":22,"33":33}],24:[function(require,module,exports){"use strict";module.exports=Reader;var util=require(35);var BufferReader;var LongBits=util.LongBits,utf8=util.utf8;function indexOutOfRange(reader,writeLength){return RangeError("index out of range: "+reader.pos+" + "+(writeLength||1)+" > "+reader.len);}function Reader(buffer){this.buf=buffer;this.pos=0;this.len=buffer.length;}var create_array=typeof Uint8Array!=="undefined"?function create_typed_array(buffer){if(buffer instanceof Uint8Array||Array.isArray(buffer))return new Reader(buffer);throw Error("illegal buffer");}:function create_array(buffer){if(Array.isArray(buffer))return new Reader(buffer);throw Error("illegal buffer");};var create=function create(){return util.Buffer?function create_buffer_setup(buffer){return(Reader.create=function create_buffer(buffer){return util.Buffer.isBuffer(buffer)?new BufferReader(buffer):create_array(buffer);})(buffer);}:create_array;};Reader.create=create();Reader.prototype._slice=util.Array.prototype.subarray||util.Array.prototype.slice;Reader.prototype.uint32=(function read_uint32_setup(){var value=4294967295;return function read_uint32(){value=(this.buf[this.pos]&127)>>>0;if(this.buf[this.pos++]<128)return value;value=(value|(this.buf[this.pos]&127)<<7)>>>0;if(this.buf[this.pos++]<128)return value;value=(value|(this.buf[this.pos]&127)<<14)>>>0;if(this.buf[this.pos++]<128)return value;value=(value|(this.buf[this.pos]&127)<<21)>>>0;if(this.buf[this.pos++]<128)return value;value=(value|(this.buf[this.pos]&15)<<28)>>>0;if(this.buf[this.pos++]<128)return value;if((this.pos+=5)>this.len){this.pos=this.len;throw indexOutOfRange(this,10);}return value;};})();Reader.prototype.int32=function read_int32(){return this.uint32()|0;};Reader.prototype.sint32=function read_sint32(){var value=this.uint32();return value>>>1^-(value&1)|0;};function readLongVarint(){var bits=new LongBits(0,0);var i=0;if(this.len-this.pos>4){for(;i<4;++i){bits.lo=(bits.lo|(this.buf[this.pos]&127)<<i*7)>>>0;if(this.buf[this.pos++]<128)return bits;}bits.lo=(bits.lo|(this.buf[this.pos]&127)<<28)>>>0;bits.hi=(bits.hi|(this.buf[this.pos]&127)>>4)>>>0;if(this.buf[this.pos++]<128)return bits;i=0;}else{for(;i<3;++i){if(this.pos>=this.len)throw indexOutOfRange(this);bits.lo=(bits.lo|(this.buf[this.pos]&127)<<i*7)>>>0;if(this.buf[this.pos++]<128)return bits;}bits.lo=(bits.lo|(this.buf[this.pos++]&127)<<i*7)>>>0;return bits;}if(this.len-this.pos>4){for(;i<5;++i){bits.hi=(bits.hi|(this.buf[this.pos]&127)<<i*7+3)>>>0;if(this.buf[this.pos++]<128)return bits;}}else{for(;i<5;++i){if(this.pos>=this.len)throw indexOutOfRange(this);bits.hi=(bits.hi|(this.buf[this.pos]&127)<<i*7+3)>>>0;if(this.buf[this.pos++]<128)return bits;}}throw Error("invalid varint encoding");}Reader.prototype.bool=function read_bool(){return this.uint32()!==0;};function readFixed32_end(buf,end){return(buf[end-4]|buf[end-3]<<8|buf[end-2]<<16|buf[end-1]<<24)>>>0;}Reader.prototype.fixed32=function read_fixed32(){if(this.pos+4>this.len)throw indexOutOfRange(this,4);return readFixed32_end(this.buf,this.pos+=4);};Reader.prototype.sfixed32=function read_sfixed32(){if(this.pos+4>this.len)throw indexOutOfRange(this,4);return readFixed32_end(this.buf,this.pos+=4)|0;};function readFixed64(){if(this.pos+8>this.len)throw indexOutOfRange(this,8);return new LongBits(readFixed32_end(this.buf,this.pos+=4),readFixed32_end(this.buf,this.pos+=4));}Reader.prototype.float=function read_float(){if(this.pos+4>this.len)throw indexOutOfRange(this,4);var value=util.float.readFloatLE(this.buf,this.pos);this.pos+=4;return value;};Reader.prototype.double=function read_double(){if(this.pos+8>this.len)throw indexOutOfRange(this,4);var value=util.float.readDoubleLE(this.buf,this.pos);this.pos+=8;return value;};Reader.prototype.bytes=function read_bytes(){var length=this.uint32(),start=this.pos,end=this.pos+length;if(end>this.len)throw indexOutOfRange(this,length);this.pos+=length;if(Array.isArray(this.buf))return this.buf.slice(start,end);return start===end?new this.buf.constructor(0):this._slice.call(this.buf,start,end);};Reader.prototype.string=function read_string(){var bytes=this.bytes();return utf8.read(bytes,0,bytes.length);};Reader.prototype.skip=function skip(length){if(typeof length==="number"){if(this.pos+length>this.len)throw indexOutOfRange(this,length);this.pos+=length;}else{do{if(this.pos>=this.len)throw indexOutOfRange(this);}while(this.buf[this.pos++]&128);}return this;};Reader.prototype.skipType=function(wireType){switch(wireType){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:while((wireType=this.uint32()&7)!==4){this.skipType(wireType);}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+wireType+" at offset "+this.pos);}return this;};Reader._configure=function(BufferReader_){BufferReader=BufferReader_;Reader.create=create();BufferReader._configure();var fn=util.Long?"toLong":"toNumber";util.merge(Reader.prototype,{int64:function read_int64(){return readLongVarint.call(this)[fn](false);},uint64:function read_uint64(){return readLongVarint.call(this)[fn](true);},sint64:function read_sint64(){return readLongVarint.call(this).zzDecode()[fn](false);},fixed64:function read_fixed64(){return readFixed64.call(this)[fn](true);},sfixed64:function read_sfixed64(){return readFixed64.call(this)[fn](false);}});};},{"35":35}],25:[function(require,module,exports){"use strict";module.exports=BufferReader;var Reader=require(24);(BufferReader.prototype=Object.create(Reader.prototype)).constructor=BufferReader;var util=require(35);function BufferReader(buffer){Reader.call(this,buffer);}BufferReader._configure=function(){if(util.Buffer)BufferReader.prototype._slice=util.Buffer.prototype.slice;};BufferReader.prototype.string=function read_string_buffer(){var len=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+len,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+len,this.len));};BufferReader._configure();},{"24":24,"35":35}],26:[function(require,module,exports){"use strict";module.exports=Root;var Namespace=require(21);((Root.prototype=Object.create(Namespace.prototype)).constructor=Root).className="Root";var Field=require(15),Enum=require(14),OneOf=require(23),util=require(33);var Type,parse,common;function Root(options){Namespace.call(this,"",options);this.deferred=[];this.files=[];}Root.fromJSON=function fromJSON(json,root){if(!root)root=new Root();if(json.options)root.setOptions(json.options);return root.addJSON(json.nested);};Root.prototype.resolvePath=util.path.resolve;Root.prototype.fetch=util.fetch;function SYNC(){}Root.prototype.load=function load(filename,options,callback){if(typeof options==="function"){callback=options;options=undefined;}var self=this;if(!callback)return util.asPromise(load,self,filename,options);var sync=callback===SYNC;function finish(err,root){if(!callback)return;var cb=callback;callback=null;if(sync)throw err;cb(err,root);}function getBundledFileName(filename){var idx=filename.lastIndexOf("google/protobuf/");if(idx>-1){var altname=filename.substring(idx);if(altname in common)return altname;}return null;}function process(filename,source){try{if(util.isString(source)&&source.charAt(0)==="{")source=JSON.parse(source);if(!util.isString(source))self.setOptions(source.options).addJSON(source.nested);else{parse.filename=filename;var parsed=parse(source,self,options),resolved,i=0;if(parsed.imports)for(;i<parsed.imports.length;++i)if(resolved=getBundledFileName(parsed.imports[i])||self.resolvePath(filename,parsed.imports[i]))fetch(resolved);if(parsed.weakImports)for(i=0;i<parsed.weakImports.length;++i)if(resolved=getBundledFileName(parsed.weakImports[i])||self.resolvePath(filename,parsed.weakImports[i]))fetch(resolved,true);}}catch(err){finish(err);}if(!sync&&!queued)finish(null,self);}function fetch(filename,weak){if(self.files.indexOf(filename)>-1)return;self.files.push(filename);if(filename in common){if(sync)process(filename,common[filename]);else{++queued;setTimeout(function(){--queued;process(filename,common[filename]);});}return;}if(sync){var source;try{source=util.fs.readFileSync(filename).toString("utf8");}catch(err){if(!weak)finish(err);return;}process(filename,source);}else{++queued;self.fetch(filename,function(err,source){--queued;if(!callback)return;if(err){if(!weak)finish(err);else if(!queued)finish(null,self);return;}process(filename,source);});}}var queued=0;if(util.isString(filename))filename=[filename];for(var i=0,resolved;i<filename.length;++i)if(resolved=self.resolvePath("",filename[i]))fetch(resolved);if(sync)return self;if(!queued)finish(null,self);return undefined;};Root.prototype.loadSync=function loadSync(filename,options){if(!util.isNode)throw Error("not supported");return this.load(filename,options,SYNC);};Root.prototype.resolveAll=function resolveAll(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(field){return"'extend "+field.extend+"' in "+field.parent.fullName;}).join(", "));return Namespace.prototype.resolveAll.call(this);};var exposeRe=/^[A-Z]/;function tryHandleExtension(root,field){var extendedType=field.parent.lookup(field.extend);if(extendedType){var sisterField=new Field(field.fullName,field.id,field.type,field.rule,undefined,field.options);sisterField.declaringField=field;field.extensionField=sisterField;extendedType.add(sisterField);return true;}return false;}Root.prototype._handleAdd=function _handleAdd(object){if(object instanceof Field){if(object.extend!==undefined&&!object.extensionField)if(!tryHandleExtension(this,object))this.deferred.push(object);}else if(object instanceof Enum){if(exposeRe.test(object.name))object.parent[object.name]=object.values;}else if(!(object instanceof OneOf)){if(object instanceof Type)for(var i=0;i<this.deferred.length;)if(tryHandleExtension(this,this.deferred[i]))this.deferred.splice(i,1);else++i;for(var j=0;j<object.nestedArray.length;++j)this._handleAdd(object._nestedArray[j]);if(exposeRe.test(object.name))object.parent[object.name]=object;}};Root.prototype._handleRemove=function _handleRemove(object){if(object instanceof Field){if(object.extend!==undefined){if(object.extensionField){object.extensionField.parent.remove(object.extensionField);object.extensionField=null;}else{var index=this.deferred.indexOf(object);if(index>-1)this.deferred.splice(index,1);}}}else if(object instanceof Enum){if(exposeRe.test(object.name))delete object.parent[object.name];}else if(object instanceof Namespace){for(var i=0;i<object.nestedArray.length;++i)this._handleRemove(object._nestedArray[i]);if(exposeRe.test(object.name))delete object.parent[object.name];}};Root._configure=function(Type_,parse_,common_){Type=Type_;parse=parse_;common=common_;};},{"14":14,"15":15,"21":21,"23":23,"33":33}],27:[function(require,module,exports){"use strict";module.exports={};},{}],28:[function(require,module,exports){"use strict";var rpc=exports;rpc.Service=require(29);},{"29":29}],29:[function(require,module,exports){"use strict";module.exports=Service;var util=require(35);(Service.prototype=Object.create(util.EventEmitter.prototype)).constructor=Service;function Service(rpcImpl,requestDelimited,responseDelimited){if(typeof rpcImpl!=="function")throw TypeError("rpcImpl must be a function");util.EventEmitter.call(this);this.rpcImpl=rpcImpl;this.requestDelimited=Boolean(requestDelimited);this.responseDelimited=Boolean(responseDelimited);}Service.prototype.rpcCall=function rpcCall(method,requestCtor,responseCtor,request,callback){if(!request)throw TypeError("request must be specified");var self=this;if(!callback)return util.asPromise(rpcCall,self,method,requestCtor,responseCtor,request);if(!self.rpcImpl){setTimeout(function(){callback(Error("already ended"));},0);return undefined;}try{return self.rpcImpl(method,requestCtor[self.requestDelimited?"encodeDelimited":"encode"](request).finish(),function rpcCallback(err,response){if(err){self.emit("error",err,method);return callback(err);}if(response===null){self.end(true);return undefined;}if(!(response instanceof responseCtor)){try{response=responseCtor[self.responseDelimited?"decodeDelimited":"decode"](response);}catch(err){self.emit("error",err,method);return callback(err);}}self.emit("data",response,method);return callback(null,response);});}catch(err){self.emit("error",err,method);setTimeout(function(){callback(err);},0);return undefined;}};Service.prototype.end=function end(endedByRPC){if(this.rpcImpl){if(!endedByRPC)this.rpcImpl(null,null,null);this.rpcImpl=null;this.emit("end").off();}return this;};},{"35":35}],30:[function(require,module,exports){"use strict";module.exports=Service;var Namespace=require(21);((Service.prototype=Object.create(Namespace.prototype)).constructor=Service).className="Service";var Method=require(20),util=require(33),rpc=require(28);function Service(name,options){Namespace.call(this,name,options);this.methods={};this._methodsArray=null;}Service.fromJSON=function fromJSON(name,json){var service=new Service(name,json.options);if(json.methods)for(var names=Object.keys(json.methods),i=0;i<names.length;++i)service.add(Method.fromJSON(names[i],json.methods[names[i]]));if(json.nested)service.addJSON(json.nested);service.comment=json.comment;return service;};Service.prototype.toJSON=function toJSON(toJSONOptions){var inherited=Namespace.prototype.toJSON.call(this,toJSONOptions);var keepComments=toJSONOptions?Boolean(toJSONOptions.keepComments):false;return util.toObject(["options",inherited&&inherited.options||undefined,"methods",Namespace.arrayToJSON(this.methodsArray,toJSONOptions)||{},"nested",inherited&&inherited.nested||undefined,"comment",keepComments?this.comment:undefined]);};Object.defineProperty(Service.prototype,"methodsArray",{get:function(){return this._methodsArray||(this._methodsArray=util.toArray(this.methods));}});function clearCache(service){service._methodsArray=null;return service;}Service.prototype.get=function get(name){return this.methods[name]||Namespace.prototype.get.call(this,name);};Service.prototype.resolveAll=function resolveAll(){var methods=this.methodsArray;for(var i=0;i<methods.length;++i)methods[i].resolve();return Namespace.prototype.resolve.call(this);};Service.prototype.add=function add(object){if(this.get(object.name))throw Error("duplicate name '"+object.name+"' in "+this);if(object instanceof Method){this.methods[object.name]=object;object.parent=this;return clearCache(this);}return Namespace.prototype.add.call(this,object);};Service.prototype.remove=function remove(object){if(object instanceof Method){if(this.methods[object.name]!==object)throw Error(object+" is not a member of "+this);delete this.methods[object.name];object.parent=null;return clearCache(this);}return Namespace.prototype.remove.call(this,object);};Service.prototype.create=function create(rpcImpl,requestDelimited,responseDelimited){var rpcService=new rpc.Service(rpcImpl,requestDelimited,responseDelimited);for(var i=0,method;i<this.methodsArray.length;++i){var methodName=util.lcFirst((method=this._methodsArray[i]).resolve().name).replace(/[^$\w_]/g,"");rpcService[methodName]=util.codegen(["r","c"],util.isReserved(methodName)?methodName+"_":methodName)("return this.rpcCall(m,q,s,r,c)")({m:method,q:method.resolvedRequestType.ctor,s:method.resolvedResponseType.ctor});}return rpcService;};},{"20":20,"21":21,"28":28,"33":33}],31:[function(require,module,exports){"use strict";module.exports=Type;var Namespace=require(21);((Type.prototype=Object.create(Namespace.prototype)).constructor=Type).className="Type";var Enum=require(14),OneOf=require(23),Field=require(15),MapField=require(18),Service=require(30),Message=require(19),Reader=require(24),Writer=require(38),util=require(33),encoder=require(13),decoder=require(12),verifier=require(36),converter=require(11),wrappers=require(37);function Type(name,options){Namespace.call(this,name,options);this.fields={};this.oneofs=undefined;this.extensions=undefined;this.reserved=undefined;this.group=undefined;this._fieldsById=null;this._fieldsArray=null;this._oneofsArray=null;this._ctor=null;}Object.defineProperties(Type.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var names=Object.keys(this.fields),i=0;i<names.length;++i){var field=this.fields[names[i]],id=field.id;if(this._fieldsById[id])throw Error("duplicate id "+id+" in "+this);this._fieldsById[id]=field;}return this._fieldsById;}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=util.toArray(this.fields));}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=util.toArray(this.oneofs));}},ctor:{get:function(){return this._ctor||(this.ctor=Type.generateConstructor(this)());},set:function(ctor){var prototype=ctor.prototype;if(!(prototype instanceof Message)){(ctor.prototype=new Message()).constructor=ctor;util.merge(ctor.prototype,prototype);}ctor.$type=ctor.prototype.$type=this;util.merge(ctor,Message,true);this._ctor=ctor;var i=0;for(;i<this.fieldsArray.length;++i)this._fieldsArray[i].resolve();var ctorProperties={};for(i=0;i<this.oneofsArray.length;++i)ctorProperties[this._oneofsArray[i].resolve().name]={get:util.oneOfGetter(this._oneofsArray[i].oneof),set:util.oneOfSetter(this._oneofsArray[i].oneof)};if(i)Object.defineProperties(ctor.prototype,ctorProperties);}}});Type.generateConstructor=function generateConstructor(mtype){var gen=util.codegen(["p"],mtype.name);for(var i=0,field;i<mtype.fieldsArray.length;++i)if((field=mtype._fieldsArray[i]).map)gen("this%s={}",util.safeProp(field.name));else if(field.repeated)gen("this%s=[]",util.safeProp(field.name));return gen("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]");};function clearCache(type){type._fieldsById=type._fieldsArray=type._oneofsArray=null;delete type.encode;delete type.decode;delete type.verify;return type;}Type.fromJSON=function fromJSON(name,json){var type=new Type(name,json.options);type.extensions=json.extensions;type.reserved=json.reserved;var names=Object.keys(json.fields),i=0;for(;i<names.length;++i)type.add((typeof json.fields[names[i]].keyType!=="undefined"?MapField.fromJSON:Field.fromJSON)(names[i],json.fields[names[i]]));if(json.oneofs)for(names=Object.keys(json.oneofs),i=0;i<names.length;++i)type.add(OneOf.fromJSON(names[i],json.oneofs[names[i]]));if(json.nested)for(names=Object.keys(json.nested),i=0;i<names.length;++i){var nested=json.nested[names[i]];type.add((nested.id!==undefined?Field.fromJSON:nested.fields!==undefined?Type.fromJSON:nested.values!==undefined?Enum.fromJSON:nested.methods!==undefined?Service.fromJSON:Namespace.fromJSON)(names[i],nested));}if(json.extensions&&json.extensions.length)type.extensions=json.extensions;if(json.reserved&&json.reserved.length)type.reserved=json.reserved;if(json.group)type.group=true;if(json.comment)type.comment=json.comment;return type;};Type.prototype.toJSON=function toJSON(toJSONOptions){var inherited=Namespace.prototype.toJSON.call(this,toJSONOptions);var keepComments=toJSONOptions?Boolean(toJSONOptions.keepComments):false;return util.toObject(["options",inherited&&inherited.options||undefined,"oneofs",Namespace.arrayToJSON(this.oneofsArray,toJSONOptions),"fields",Namespace.arrayToJSON(this.fieldsArray.filter(function(obj){return!obj.declaringField;}),toJSONOptions)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:undefined,"reserved",this.reserved&&this.reserved.length?this.reserved:undefined,"group",this.group||undefined,"nested",inherited&&inherited.nested||undefined,"comment",keepComments?this.comment:undefined]);};Type.prototype.resolveAll=function resolveAll(){var fields=this.fieldsArray,i=0;while(i<fields.length)fields[i++].resolve();var oneofs=this.oneofsArray;i=0;while(i<oneofs.length)oneofs[i++].resolve();return Namespace.prototype.resolveAll.call(this);};Type.prototype.get=function get(name){return this.fields[name]||this.oneofs&&this.oneofs[name]||this.nested&&this.nested[name]||null;};Type.prototype.add=function add(object){if(this.get(object.name))throw Error("duplicate name '"+object.name+"' in "+this);if(object instanceof Field&&object.extend===undefined){if(this._fieldsById?this._fieldsById[object.id]:this.fieldsById[object.id])throw Error("duplicate id "+object.id+" in "+this);if(this.isReservedId(object.id))throw Error("id "+object.id+" is reserved in "+this);if(this.isReservedName(object.name))throw Error("name '"+object.name+"' is reserved in "+this);if(object.parent)object.parent.remove(object);this.fields[object.name]=object;object.message=this;object.onAdd(this);return clearCache(this);}if(object instanceof OneOf){if(!this.oneofs)this.oneofs={};this.oneofs[object.name]=object;object.onAdd(this);return clearCache(this);}return Namespace.prototype.add.call(this,object);};Type.prototype.remove=function remove(object){if(object instanceof Field&&object.extend===undefined){if(!this.fields||this.fields[object.name]!==object)throw Error(object+" is not a member of "+this);delete this.fields[object.name];object.parent=null;object.onRemove(this);return clearCache(this);}if(object instanceof OneOf){if(!this.oneofs||this.oneofs[object.name]!==object)throw Error(object+" is not a member of "+this);delete this.oneofs[object.name];object.parent=null;object.onRemove(this);return clearCache(this);}return Namespace.prototype.remove.call(this,object);};Type.prototype.isReservedId=function isReservedId(id){return Namespace.isReservedId(this.reserved,id);};Type.prototype.isReservedName=function isReservedName(name){return Namespace.isReservedName(this.reserved,name);};Type.prototype.create=function create(properties){return new this.ctor(properties);};Type.prototype.setup=function setup(){var fullName=this.fullName,types=[];for(var i=0;i<this.fieldsArray.length;++i)types.push(this._fieldsArray[i].resolve().resolvedType);this.encode=encoder(this)({Writer:Writer,types:types,util:util});this.decode=decoder(this)({Reader:Reader,types:types,util:util});this.verify=verifier(this)({types:types,util:util});this.fromObject=converter.fromObject(this)({types:types,util:util});this.toObject=converter.toObject(this)({types:types,util:util});var wrapper=wrappers[fullName];if(wrapper){var originalThis=Object.create(this);originalThis.fromObject=this.fromObject;this.fromObject=wrapper.fromObject.bind(originalThis);originalThis.toObject=this.toObject;this.toObject=wrapper.toObject.bind(originalThis);}return this;};Type.prototype.encode=function encode_setup(message,writer){return this.setup().encode(message,writer);};Type.prototype.encodeDelimited=function encodeDelimited(message,writer){return this.encode(message,writer&&writer.len?writer.fork():writer).ldelim();};Type.prototype.decode=function decode_setup(reader,length){return this.setup().decode(reader,length);};Type.prototype.decodeDelimited=function decodeDelimited(reader){if(!(reader instanceof Reader))reader=Reader.create(reader);return this.decode(reader,reader.uint32());};Type.prototype.verify=function verify_setup(message){return this.setup().verify(message);};Type.prototype.fromObject=function fromObject(object){return this.setup().fromObject(object);};Type.prototype.toObject=function toObject(message,options){return this.setup().toObject(message,options);};Type.d=function decorateType(typeName){return function typeDecorator(target){util.decorateType(target,typeName);};};},{"11":11,"12":12,"13":13,"14":14,"15":15,"18":18,"19":19,"21":21,"23":23,"24":24,"30":30,"33":33,"36":36,"37":37,"38":38}],32:[function(require,module,exports){"use strict";var types=exports;var util=require(33);var s=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function bake(values,offset){var i=0,o={};offset|=0;while(i<values.length)o[s[i+offset]]=values[i++];return o;}types.basic=bake([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]);types.defaults=bake([0,0,0,0,0,0,0,0,0,0,0,0,false,"",util.emptyArray,null]);types.long=bake([0,0,0,1,1],7);types.mapKey=bake([0,0,0,5,5,0,0,0,1,1,0,2],2);types.packed=bake([1,5,0,0,0,5,5,0,0,0,1,1,0]);},{"33":33}],33:[function(require,module,exports){"use strict";var util=module.exports=require(35);var roots=require(27);var Type,Enum;util.codegen=require(3);util.fetch=require(5);util.path=require(8);util.fs=util.inquire("fs");util.toArray=function toArray(object){if(object){var keys=Object.keys(object),array=new Array(keys.length),index=0;while(index<keys.length)array[index]=object[keys[index++]];return array;}return[];};util.toObject=function toObject(array){var object={},index=0;while(index<array.length){var key=array[index++],val=array[index++];if(val!==undefined)object[key]=val;}return object;};var safePropBackslashRe=/\\/g,safePropQuoteRe=/"/g;util.isReserved=function isReserved(name){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(name)};util.safeProp=function safeProp(prop){if(!/^[$\w_]+$/.test(prop)||util.isReserved(prop))return"[\""+prop.replace(safePropBackslashRe,"\\\\").replace(safePropQuoteRe,"\\\"")+"\"]";return"."+prop};util.ucFirst=function ucFirst(str){return str.charAt(0).toUpperCase()+str.substring(1)};var camelCaseRe=/_([a-z])/g;util.camelCase=function camelCase(str){return str.substring(0,1)+str.substring(1).replace(camelCaseRe,function($0,$1){return $1.toUpperCase()})};util.compareFieldsById=function compareFieldsById(a,b){return a.id-b.id};util.decorateType=function decorateType(ctor,typeName){if(ctor.$type){if(typeName&&ctor.$type.name!==typeName){util.decorateRoot.remove(ctor.$type);ctor.$type.name=typeName;util.decorateRoot.add(ctor.$type)}return ctor.$type}if(!Type)Type=require(31);var type=new Type(typeName||ctor.name);util.decorateRoot.add(type);type.ctor=ctor;Object.defineProperty(ctor,"$type",{value:type,enumerable:false});Object.defineProperty(ctor.prototype,"$type",{value:type,enumerable:false});return type};var decorateEnumIndex=0;util.decorateEnum=function decorateEnum(object){if(object.$type)return object.$type;if(!Enum)Enum=require(14);var enm=new Enum("Enum"+decorateEnumIndex++,object);util.decorateRoot.add(enm);Object.defineProperty(object,"$type",{value:enm,enumerable:false});return enm};util.setProperty=function setProperty(dst,path,value){function setProp(dst,path,value){var part=path.shift();if(path.length>0){dst[part]=setProp(dst[part]||{},path,value)}else{var prevValue=dst[part];if(prevValue)value=[].concat(prevValue).concat(value);dst[part]=value}return dst}if(typeof dst!=="object")throw TypeError("dst must be an object");if(!path)throw TypeError("path must be specified");path=path.split(".");return setProp(dst,path,value)};Object.defineProperty(util,"decorateRoot",{get:function(){return roots["decorated"]||(roots["decorated"]=new(require(26))())}})},{"14":14,"26":26,"27":27,"3":3,"31":31,"35":35,"5":5,"8":8}],34:[function(require,module,exports){"use strict";module.exports=LongBits;var util=require(35);function LongBits(lo,hi){this.lo=lo>>>0;this.hi=hi>>>0}var zero=LongBits.zero=new LongBits(0,0);zero.toNumber=function(){return 0};zero.zzEncode=zero.zzDecode=function(){return this};zero.length=function(){return 1};var zeroHash=LongBits.zeroHash="\0\0\0\0\0\0\0\0";LongBits.fromNumber=function fromNumber(value){if(value===0)return zero;var sign=value<0;if(sign)value=-value;var lo=value>>>0,hi=(value-lo)/4294967296>>>0;if(sign){hi=~hi>>>0;lo=~lo>>>0;if(++lo>4294967295){lo=0;if(++hi>4294967295)hi=0}}return new LongBits(lo,hi)};LongBits.from=function from(value){if(typeof value==="number")return LongBits.fromNumber(value);if(util.isString(value)){if(util.Long)value=util.Long.fromString(value);else return LongBits.fromNumber(parseInt(value,10))}return value.low||value.high?new LongBits(value.low>>>0,value.high>>>0):zero};LongBits.prototype.toNumber=function toNumber(unsigned){if(!unsigned&&this.hi>>>31){var lo=~this.lo+1>>>0,hi=~this.hi>>>0;if(!lo)hi=hi+1>>>0;return-(lo+hi*4294967296)}return this.lo+this.hi*4294967296};LongBits.prototype.toLong=function toLong(unsigned){return util.Long?new util.Long(this.lo|0,this.hi|0,Boolean(unsigned)):{low:this.lo|0,high:this.hi|0,unsigned:Boolean(unsigned)}};var charCodeAt=String.prototype.charCodeAt;LongBits.fromHash=function fromHash(hash){if(hash===zeroHash)return zero;return new LongBits((charCodeAt.call(hash,0)|charCodeAt.call(hash,1)<<8|charCodeAt.call(hash,2)<<16|charCodeAt.call(hash,3)<<24)>>>0,(charCodeAt.call(hash,4)|charCodeAt.call(hash,5)<<8|charCodeAt.call(hash,6)<<16|charCodeAt.call(hash,7)<<24)>>>0)};LongBits.prototype.toHash=function toHash(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)};LongBits.prototype.zzEncode=function zzEncode(){var mask=this.hi>>31;this.hi=((this.hi<<1|this.lo>>>31)^mask)>>>0;this.lo=(this.lo<<1^mask)>>>0;return this};LongBits.prototype.zzDecode=function zzDecode(){var mask=-(this.lo&1);this.lo=((this.lo>>>1|this.hi<<31)^mask)>>>0;this.hi=(this.hi>>>1^mask)>>>0;return this};LongBits.prototype.length=function length(){var part0=this.lo,part1=(this.lo>>>28|this.hi<<4)>>>0,part2=this.hi>>>24;return part2===0?part1===0?part0<16384?part0<128?1:2:part0<2097152?3:4:part1<16384?part1<128?5:6:part1<2097152?7:8:part2<128?9:10}},{"35":35}],35:[function(require,module,exports){"use strict";var util=exports;util.asPromise=require(1);util.base64=require(2);util.EventEmitter=require(4);util.float=require(6);util.inquire=require(7);util.utf8=require(10);util.pool=require(9);util.LongBits=require(34);util.isNode=Boolean(typeof global!=="undefined"&&global&&global.process&&global.process.versions&&global.process.versions.node);util.global=util.isNode&&global||typeof window!=="undefined"&&window||typeof self!=="undefined"&&self||this;util.emptyArray=Object.freeze?Object.freeze([]):[];util.emptyObject=Object.freeze?Object.freeze({}):{};util.isInteger=Number.isInteger||function isInteger(value){return typeof value==="number"&&isFinite(value)&&Math.floor(value)===value};util.isString=function isString(value){return typeof value==="string"||value instanceof String};util.isObject=function isObject(value){return value&&typeof value==="object"};util.isset=util.isSet=function isSet(obj,prop){var value=obj[prop];if(value!=null&&obj.hasOwnProperty(prop))return typeof value!=="object"||(Array.isArray(value)?value.length:Object.keys(value).length)>0;return false};util.Buffer=(function(){try{var Buffer=util.inquire("buffer").Buffer;return Buffer.prototype.utf8Write?Buffer:null}catch(e){return null}})();util._Buffer_from=null;util._Buffer_allocUnsafe=null;util.newBuffer=function newBuffer(sizeOrArray){return typeof sizeOrArray==="number"?util.Buffer?util._Buffer_allocUnsafe(sizeOrArray):new util.Array(sizeOrArray):util.Buffer?util._Buffer_from(sizeOrArray):typeof Uint8Array==="undefined"?sizeOrArray:new Uint8Array(sizeOrArray)};util.Array=typeof Uint8Array!=="undefined"?Uint8Array:Array;util.Long=util.global.dcodeIO&&util.global.dcodeIO.Long||util.global.Long||util.inquire("long");util.key2Re=/^true|false|0|1$/;util.key32Re=/^-?(?:0|[1-9][0-9]*)$/;util.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;util.longToHash=function longToHash(value){return value?util.LongBits.from(value).toHash():util.LongBits.zeroHash};util.longFromHash=function longFromHash(hash,unsigned){var bits=util.LongBits.fromHash(hash);if(util.Long)return util.Long.fromBits(bits.lo,bits.hi,unsigned);return bits.toNumber(Boolean(unsigned))};function merge(dst,src,ifNotSet){for(var keys=Object.keys(src),i=0;i<keys.length;++i)if(dst[keys[i]]===undefined||!ifNotSet)dst[keys[i]]=src[keys[i]];return dst}util.merge=merge;util.lcFirst=function lcFirst(str){return str.charAt(0).toLowerCase()+str.substring(1)};function newError(name){function CustomError(message,properties){if(!(this instanceof CustomError))return new CustomError(message,properties);Object.defineProperty(this,"message",{get:function(){return message}});if(Error.captureStackTrace)Error.captureStackTrace(this,CustomError);else Object.defineProperty(this,"stack",{value:new Error().stack||""});if(properties)merge(this,properties)}(CustomError.prototype=Object.create(Error.prototype)).constructor=CustomError;Object.defineProperty(CustomError.prototype,"name",{get:function(){return name}});CustomError.prototype.toString=function toString(){return this.name+": "+this.message};return CustomError}util.newError=newError;util.ProtocolError=newError("ProtocolError");util.oneOfGetter=function getOneOf(fieldNames){var fieldMap={};for(var i=0;i<fieldNames.length;++i)fieldMap[fieldNames[i]]=1;return function(){for(var keys=Object.keys(this),i=keys.length-1;i>-1;--i)if(fieldMap[keys[i]]===1&&this[keys[i]]!==undefined&&this[keys[i]]!==null)return keys[i]}};util.oneOfSetter=function setOneOf(fieldNames){return function(name){for(var i=0;i<fieldNames.length;++i)if(fieldNames[i]!==name)delete this[fieldNames[i]]}};util.toJSONOptions={longs:String,enums:String,bytes:String,json:true};util._configure=function(){var Buffer=util.Buffer;if(!Buffer){util._Buffer_from=util._Buffer_allocUnsafe=null;return}util._Buffer_from=Buffer.from!==Uint8Array.from&&Buffer.from||function Buffer_from(value,encoding){return new Buffer(value,encoding)};util._Buffer_allocUnsafe=Buffer.allocUnsafe||function Buffer_allocUnsafe(size){return new Buffer(size)}}},{"1":1,"10":10,"2":2,"34":34,"4":4,"6":6,"7":7,"9":9}],36:[function(require,module,exports){"use strict";module.exports=verifier;var Enum=require(14),util=require(33);function invalid(field,expected){return field.name+": "+expected+(field.repeated&&expected!=="array"?"[]":field.map&&expected!=="object"?"{k:"+field.keyType+"}":"")+" expected"}function genVerifyValue(gen,field,fieldIndex,ref){if(field.resolvedType){if(field.resolvedType instanceof Enum){gen("switch(%s){",ref)("default:")("return%j",invalid(field,"enum value"));for(var keys=Object.keys(field.resolvedType.values),j=0;j<keys.length;++j)gen("case %i:",field.resolvedType.values[keys[j]]);gen("break")("}")}else{gen("{")("var e=types[%i].verify(%s);",fieldIndex,ref)("if(e)")("return%j+e",field.name+".")("}")}}else{switch(field.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":gen("if(!util.isInteger(%s))",ref)("return%j",invalid(field,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":gen("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",ref,ref,ref,ref)("return%j",invalid(field,"integer|Long"));break;case"float":case"double":gen("if(typeof %s!==\"number\")",ref)("return%j",invalid(field,"number"));break;case"bool":gen("if(typeof %s!==\"boolean\")",ref)("return%j",invalid(field,"boolean"));break;case"string":gen("if(!util.isString(%s))",ref)("return%j",invalid(field,"string"));break;case"bytes":gen("if(!(%s&&typeof %s.length===\"number\"||util.isString(%s)))",ref,ref,ref)("return%j",invalid(field,"buffer"));break}}return gen}function genVerifyKey(gen,field,ref){switch(field.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":gen("if(!util.key32Re.test(%s))",ref)("return%j",invalid(field,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":gen("if(!util.key64Re.test(%s))",ref)("return%j",invalid(field,"integer|Long key"));break;case"bool":gen("if(!util.key2Re.test(%s))",ref)("return%j",invalid(field,"boolean key"));break}return gen}function verifier(mtype){var gen=util.codegen(["m"],mtype.name+"$verify")("if(typeof m!==\"object\"||m===null)")("return%j","object expected");var oneofs=mtype.oneofsArray,seenFirstField={};if(oneofs.length)gen("var p={}");for(var i=0;i<mtype.fieldsArray.length;++i){var field=mtype._fieldsArray[i].resolve(),ref="m"+util.safeProp(field.name);if(field.optional)gen("if(%s!=null&&m.hasOwnProperty(%j)){",ref,field.name);if(field.map){gen("if(!util.isObject(%s))",ref)("return%j",invalid(field,"object"))("var k=Object.keys(%s)",ref)("for(var i=0;i<k.length;++i){");genVerifyKey(gen,field,"k[i]");genVerifyValue(gen,field,i,ref+"[k[i]]")("}");}else if(field.repeated){gen("if(!Array.isArray(%s))",ref)("return%j",invalid(field,"array"))("for(var i=0;i<%s.length;++i){",ref);genVerifyValue(gen,field,i,ref+"[i]")("}");}else{if(field.partOf){var oneofProp=util.safeProp(field.partOf.name);if(seenFirstField[field.partOf.name]===1)gen("if(p%s===1)",oneofProp)("return%j",field.partOf.name+": multiple values");seenFirstField[field.partOf.name]=1;gen("p%s=1",oneofProp);}genVerifyValue(gen,field,i,ref);}if(field.optional)gen("}");}return gen("return null");}},{"14":14,"33":33}],37:[function(require,module,exports){"use strict";var wrappers=exports;var Message=require(19);wrappers[".google.protobuf.Any"]={fromObject:function(object){if(object&&object["@type"]){var name=object["@type"].substring(object["@type"].lastIndexOf("/")+1);var type=this.lookup(name);if(type){var type_url=object["@type"].charAt(0)==="."?object["@type"].substr(1):object["@type"];if(type_url.indexOf("/")===-1){type_url="/"+type_url;}return this.create({type_url:type_url,value:type.encode(type.fromObject(object)).finish()});}}return this.fromObject(object);},toObject:function(message,options){var googleApi="type.googleapis.com/";var prefix="";var name="";if(options&&options.json&&message.type_url&&message.value){name=message.type_url.substring(message.type_url.lastIndexOf("/")+1);prefix=message.type_url.substring(0,message.type_url.lastIndexOf("/")+1);var type=this.lookup(name);if(type)message=type.decode(message.value);}if(!(message instanceof this.ctor)&&message instanceof Message){var object=message.$type.toObject(message,options);var messageName=message.$type.fullName[0]==="."?message.$type.fullName.substr(1):message.$type.fullName;if(prefix===""){prefix=googleApi;}name=prefix+messageName;object["@type"]=name;return object;}return this.toObject(message,options);}};},{"19":19}],38:[function(require,module,exports){"use strict";module.exports=Writer;var util=require(35);var BufferWriter;var LongBits=util.LongBits,base64=util.base64,utf8=util.utf8;function Op(fn,len,val){this.fn=fn;this.len=len;this.next=undefined;this.val=val;}function noop(){}function State(writer){this.head=writer.head;this.tail=writer.tail;this.len=writer.len;this.next=writer.states;}function Writer(){this.len=0;this.head=new Op(noop,0,0);this.tail=this.head;this.states=null;}var create=function create(){return util.Buffer?function create_buffer_setup(){return(Writer.create=function create_buffer(){return new BufferWriter();})();}:function create_array(){return new Writer();};};Writer.create=create();Writer.alloc=function alloc(size){return new util.Array(size);};if(util.Array!==Array)Writer.alloc=util.pool(Writer.alloc,util.Array.prototype.subarray);Writer.prototype._push=function push(fn,len,val){this.tail=this.tail.next=new Op(fn,len,val);this.len+=len;return this;};function writeByte(val,buf,pos){buf[pos]=val&255;}function writeVarint32(val,buf,pos){while(val>127){buf[pos++]=val&127|128;val>>>=7;}buf[pos]=val;}function VarintOp(len,val){this.len=len;this.next=undefined;this.val=val;}VarintOp.prototype=Object.create(Op.prototype);VarintOp.prototype.fn=writeVarint32;Writer.prototype.uint32=function write_uint32(value){this.len+=(this.tail=this.tail.next=new VarintOp((value=value>>>0)<128?1:value<16384?2:value<2097152?3:value<268435456?4:5,value)).len;return this;};Writer.prototype.int32=function write_int32(value){return value<0?this._push(writeVarint64,10,LongBits.fromNumber(value)):this.uint32(value);};Writer.prototype.sint32=function write_sint32(value){return this.uint32((value<<1^value>>31)>>>0);};function writeVarint64(val,buf,pos){while(val.hi){buf[pos++]=val.lo&127|128;val.lo=(val.lo>>>7|val.hi<<25)>>>0;val.hi>>>=7;}while(val.lo>127){buf[pos++]=val.lo&127|128;val.lo=val.lo>>>7;}buf[pos++]=val.lo;}Writer.prototype.uint64=function write_uint64(value){var bits=LongBits.from(value);return this._push(writeVarint64,bits.length(),bits);};Writer.prototype.int64=Writer.prototype.uint64;Writer.prototype.sint64=function write_sint64(value){var bits=LongBits.from(value).zzEncode();return this._push(writeVarint64,bits.length(),bits);};Writer.prototype.bool=function write_bool(value){return this._push(writeByte,1,value?1:0);};function writeFixed32(val,buf,pos){buf[pos]=val&255;buf[pos+1]=val>>>8&255;buf[pos+2]=val>>>16&255;buf[pos+3]=val>>>24;}Writer.prototype.fixed32=function write_fixed32(value){return this._push(writeFixed32,4,value>>>0);};Writer.prototype.sfixed32=Writer.prototype.fixed32;Writer.prototype.fixed64=function write_fixed64(value){var bits=LongBits.from(value);return this._push(writeFixed32,4,bits.lo)._push(writeFixed32,4,bits.hi);};Writer.prototype.sfixed64=Writer.prototype.fixed64;Writer.prototype.float=function write_float(value){return this._push(util.float.writeFloatLE,4,value);};Writer.prototype.double=function write_double(value){return this._push(util.float.writeDoubleLE,8,value);};var writeBytes=util.Array.prototype.set?function writeBytes_set(val,buf,pos){buf.set(val,pos);}:function writeBytes_for(val,buf,pos){for(var i=0;i<val.length;++i)buf[pos+i]=val[i];};Writer.prototype.bytes=function write_bytes(value){var len=value.length>>>0;if(!len)return this._push(writeByte,1,0);if(util.isString(value)){var buf=Writer.alloc(len=base64.length(value));base64.decode(value,buf,0);value=buf;}return this.uint32(len)._push(writeBytes,len,value);};Writer.prototype.string=function write_string(value){var len=utf8.length(value);return len?this.uint32(len)._push(utf8.write,len,value):this._push(writeByte,1,0);};Writer.prototype.fork=function fork(){this.states=new State(this);this.head=this.tail=new Op(noop,0,0);this.len=0;return this;};Writer.prototype.reset=function reset(){if(this.states){this.head=this.states.head;this.tail=this.states.tail;this.len=this.states.len;this.states=this.states.next;}else{this.head=this.tail=new Op(noop,0,0);this.len=0;}return this;};Writer.prototype.ldelim=function ldelim(){var head=this.head,tail=this.tail,len=this.len;this.reset().uint32(len);if(len){this.tail.next=head.next;this.tail=tail;this.len+=len;}return this;};Writer.prototype.finish=function finish(){var head=this.head.next,buf=this.constructor.alloc(this.len),pos=0;while(head){head.fn(head.val,buf,pos);pos+=head.len;head=head.next;}return buf;};Writer._configure=function(BufferWriter_){BufferWriter=BufferWriter_;Writer.create=create();BufferWriter._configure();};},{"35":35}],39:[function(require,module,exports){"use strict";module.exports=BufferWriter;var Writer=require(38);(BufferWriter.prototype=Object.create(Writer.prototype)).constructor=BufferWriter;var util=require(35);function BufferWriter(){Writer.call(this);}BufferWriter._configure=function(){BufferWriter.alloc=util._Buffer_allocUnsafe;BufferWriter.writeBytesBuffer=util.Buffer&&util.Buffer.prototype instanceof Uint8Array&&util.Buffer.prototype.set.name==="set"?function writeBytesBuffer_set(val,buf,pos){buf.set(val,pos);}:function writeBytesBuffer_copy(val,buf,pos){if(val.copy)val.copy(buf,pos,0,val.length);else for(var i=0;i<val.length;)buf[pos++]=val[i++];};};BufferWriter.prototype.bytes=function write_bytes_buffer(value){if(util.isString(value))value=util._Buffer_from(value,"base64");var len=value.length>>>0;this.uint32(len);if(len)this._push(BufferWriter.writeBytesBuffer,len,value);return this;};function writeStringBuffer(val,buf,pos){if(val.length<40)util.utf8.write(val,buf,pos);else if(buf.utf8Write)buf.utf8Write(val,pos);else buf.write(val,pos);}BufferWriter.prototype.string=function write_string_buffer(value){var len=util.Buffer.byteLength(value);this.uint32(len);if(len)this._push(writeStringBuffer,len,value);return this;};BufferWriter._configure();},{"35":35,"38":38}]},{},[16])})();
// pako 2.0.4
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).pako={})}(this,(function(t){"use strict";function e(t){let e=t.length;for(;--e>=0;)t[e]=0}const a=256,i=286,n=30,s=15,r=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),l=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),o=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),h=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),d=new Array(576);e(d);const _=new Array(60);e(_);const f=new Array(512);e(f);const c=new Array(256);e(c);const u=new Array(29);e(u);const w=new Array(n);function b(t,e,a,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}let g,p,m;function k(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(w);const v=t=>t<256?f[t]:f[256+(t>>>7)],y=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},x=(t,e,a)=>{t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,y(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},z=(t,e,a)=>{x(t,a[2*e],a[2*e+1])},A=(t,e)=>{let a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},E=(t,e,a)=>{const i=new Array(16);let n,r,l=0;for(n=1;n<=s;n++)i[n]=l=l+a[n-1]<<1;for(r=0;r<=e;r++){let e=t[2*r+1];0!==e&&(t[2*r]=A(i[e]++,e))}},R=t=>{let e;for(e=0;e<i;e++)t.dyn_ltree[2*e]=0;for(e=0;e<n;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},Z=t=>{t.bi_valid>8?y(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},U=(t,e,a,i)=>{const n=2*e,s=2*a;return t[n]<t[s]||t[n]===t[s]&&i[e]<=i[a]},S=(t,e,a)=>{const i=t.heap[a];let n=a<<1;for(;n<=t.heap_len&&(n<t.heap_len&&U(e,t.heap[n+1],t.heap[n],t.depth)&&n++,!U(e,i,t.heap[n],t.depth));)t.heap[a]=t.heap[n],a=n,n<<=1;t.heap[a]=i},D=(t,e,i)=>{let n,s,o,h,d=0;if(0!==t.last_lit)do{n=t.pending_buf[t.d_buf+2*d]<<8|t.pending_buf[t.d_buf+2*d+1],s=t.pending_buf[t.l_buf+d],d++,0===n?z(t,s,e):(o=c[s],z(t,o+a+1,e),h=r[o],0!==h&&(s-=u[o],x(t,s,h)),n--,o=v(n),z(t,o,i),h=l[o],0!==h&&(n-=w[o],x(t,n,h)))}while(d<t.last_lit);z(t,256,e)},T=(t,e)=>{const a=e.dyn_tree,i=e.stat_desc.static_tree,n=e.stat_desc.has_stree,r=e.stat_desc.elems;let l,o,h,d=-1;for(t.heap_len=0,t.heap_max=573,l=0;l<r;l++)0!==a[2*l]?(t.heap[++t.heap_len]=d=l,t.depth[l]=0):a[2*l+1]=0;for(;t.heap_len<2;)h=t.heap[++t.heap_len]=d<2?++d:0,a[2*h]=1,t.depth[h]=0,t.opt_len--,n&&(t.static_len-=i[2*h+1]);for(e.max_code=d,l=t.heap_len>>1;l>=1;l--)S(t,a,l);h=r;do{l=t.heap[1],t.heap[1]=t.heap[t.heap_len--],S(t,a,1),o=t.heap[1],t.heap[--t.heap_max]=l,t.heap[--t.heap_max]=o,a[2*h]=a[2*l]+a[2*o],t.depth[h]=(t.depth[l]>=t.depth[o]?t.depth[l]:t.depth[o])+1,a[2*l+1]=a[2*o+1]=h,t.heap[1]=h++,S(t,a,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const a=e.dyn_tree,i=e.max_code,n=e.stat_desc.static_tree,r=e.stat_desc.has_stree,l=e.stat_desc.extra_bits,o=e.stat_desc.extra_base,h=e.stat_desc.max_length;let d,_,f,c,u,w,b=0;for(c=0;c<=s;c++)t.bl_count[c]=0;for(a[2*t.heap[t.heap_max]+1]=0,d=t.heap_max+1;d<573;d++)_=t.heap[d],c=a[2*a[2*_+1]+1]+1,c>h&&(c=h,b++),a[2*_+1]=c,_>i||(t.bl_count[c]++,u=0,_>=o&&(u=l[_-o]),w=a[2*_],t.opt_len+=w*(c+u),r&&(t.static_len+=w*(n[2*_+1]+u)));if(0!==b){do{for(c=h-1;0===t.bl_count[c];)c--;t.bl_count[c]--,t.bl_count[c+1]+=2,t.bl_count[h]--,b-=2}while(b>0);for(c=h;0!==c;c--)for(_=t.bl_count[c];0!==_;)f=t.heap[--d],f>i||(a[2*f+1]!==c&&(t.opt_len+=(c-a[2*f+1])*a[2*f],a[2*f+1]=c),_--)}})(t,e),E(a,d,t.bl_count)},O=(t,e,a)=>{let i,n,s=-1,r=e[1],l=0,o=7,h=4;for(0===r&&(o=138,h=3),e[2*(a+1)+1]=65535,i=0;i<=a;i++)n=r,r=e[2*(i+1)+1],++l<o&&n===r||(l<h?t.bl_tree[2*n]+=l:0!==n?(n!==s&&t.bl_tree[2*n]++,t.bl_tree[32]++):l<=10?t.bl_tree[34]++:t.bl_tree[36]++,l=0,s=n,0===r?(o=138,h=3):n===r?(o=6,h=3):(o=7,h=4))},I=(t,e,a)=>{let i,n,s=-1,r=e[1],l=0,o=7,h=4;for(0===r&&(o=138,h=3),i=0;i<=a;i++)if(n=r,r=e[2*(i+1)+1],!(++l<o&&n===r)){if(l<h)do{z(t,n,t.bl_tree)}while(0!=--l);else 0!==n?(n!==s&&(z(t,n,t.bl_tree),l--),z(t,16,t.bl_tree),x(t,l-3,2)):l<=10?(z(t,17,t.bl_tree),x(t,l-3,3)):(z(t,18,t.bl_tree),x(t,l-11,7));l=0,s=n,0===r?(o=138,h=3):n===r?(o=6,h=3):(o=7,h=4)}};let F=!1;const L=(t,e,a,i)=>{x(t,0+(i?1:0),3),((t,e,a,i)=>{Z(t),i&&(y(t,a),y(t,~a)),t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a})(t,e,a,!0)};var N={_tr_init:t=>{F||((()=>{let t,e,a,h,k;const v=new Array(16);for(a=0,h=0;h<28;h++)for(u[h]=a,t=0;t<1<<r[h];t++)c[a++]=h;for(c[a-1]=h,k=0,h=0;h<16;h++)for(w[h]=k,t=0;t<1<<l[h];t++)f[k++]=h;for(k>>=7;h<n;h++)for(w[h]=k<<7,t=0;t<1<<l[h]-7;t++)f[256+k++]=h;for(e=0;e<=s;e++)v[e]=0;for(t=0;t<=143;)d[2*t+1]=8,t++,v[8]++;for(;t<=255;)d[2*t+1]=9,t++,v[9]++;for(;t<=279;)d[2*t+1]=7,t++,v[7]++;for(;t<=287;)d[2*t+1]=8,t++,v[8]++;for(E(d,287,v),t=0;t<n;t++)_[2*t+1]=5,_[2*t]=A(t,5);g=new b(d,r,257,i,s),p=new b(_,l,0,n,s),m=new b(new Array(0),o,0,19,7)})(),F=!0),t.l_desc=new k(t.dyn_ltree,g),t.d_desc=new k(t.dyn_dtree,p),t.bl_desc=new k(t.bl_tree,m),t.bi_buf=0,t.bi_valid=0,R(t)},_tr_stored_block:L,_tr_flush_block:(t,e,i,n)=>{let s,r,l=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,i=4093624447;for(e=0;e<=31;e++,i>>>=1)if(1&i&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<a;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0})(t)),T(t,t.l_desc),T(t,t.d_desc),l=(t=>{let e;for(O(t,t.dyn_ltree,t.l_desc.max_code),O(t,t.dyn_dtree,t.d_desc.max_code),T(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*h[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),s=t.opt_len+3+7>>>3,r=t.static_len+3+7>>>3,r<=s&&(s=r)):s=r=i+5,i+4<=s&&-1!==e?L(t,e,i,n):4===t.strategy||r===s?(x(t,2+(n?1:0),3),D(t,d,_)):(x(t,4+(n?1:0),3),((t,e,a,i)=>{let n;for(x(t,e-257,5),x(t,a-1,5),x(t,i-4,4),n=0;n<i;n++)x(t,t.bl_tree[2*h[n]+1],3);I(t,t.dyn_ltree,e-1),I(t,t.dyn_dtree,a-1)})(t,t.l_desc.max_code+1,t.d_desc.max_code+1,l+1),D(t,t.dyn_ltree,t.dyn_dtree)),R(t),n&&Z(t)},_tr_tally:(t,e,i)=>(t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&i,t.last_lit++,0===e?t.dyn_ltree[2*i]++:(t.matches++,e--,t.dyn_ltree[2*(c[i]+a+1)]++,t.dyn_dtree[2*v(e)]++),t.last_lit===t.lit_bufsize-1),_tr_align:t=>{x(t,2,3),z(t,256,d),(t=>{16===t.bi_valid?(y(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)}};var B=(t,e,a,i)=>{let n=65535&t|0,s=t>>>16&65535|0,r=0;for(;0!==a;){r=a>2e3?2e3:a,a-=r;do{n=n+e[i++]|0,s=s+n|0}while(--r);n%=65521,s%=65521}return n|s<<16|0};const C=new Uint32Array((()=>{let t,e=[];for(var a=0;a<256;a++){t=a;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e})());var M=(t,e,a,i)=>{const n=C,s=i+a;t^=-1;for(let a=i;a<s;a++)t=t>>>8^n[255&(t^e[a])];return-1^t},H={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},j={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:K,_tr_stored_block:P,_tr_flush_block:Y,_tr_tally:G,_tr_align:X}=N,{Z_NO_FLUSH:W,Z_PARTIAL_FLUSH:q,Z_FULL_FLUSH:J,Z_FINISH:Q,Z_BLOCK:V,Z_OK:$,Z_STREAM_END:tt,Z_STREAM_ERROR:et,Z_DATA_ERROR:at,Z_BUF_ERROR:it,Z_DEFAULT_COMPRESSION:nt,Z_FILTERED:st,Z_HUFFMAN_ONLY:rt,Z_RLE:lt,Z_FIXED:ot,Z_DEFAULT_STRATEGY:ht,Z_UNKNOWN:dt,Z_DEFLATED:_t}=j,ft=258,ct=262,ut=103,wt=113,bt=666,gt=(t,e)=>(t.msg=H[e],e),pt=t=>(t<<1)-(t>4?9:0),mt=t=>{let e=t.length;for(;--e>=0;)t[e]=0};let kt=(t,e,a)=>(e<<t.hash_shift^a)&t.hash_mask;const vt=t=>{const e=t.state;let a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},yt=(t,e)=>{Y(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,vt(t.strm)},xt=(t,e)=>{t.pending_buf[t.pending++]=e},zt=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},At=(t,e,a,i)=>{let n=t.avail_in;return n>i&&(n=i),0===n?0:(t.avail_in-=n,e.set(t.input.subarray(t.next_in,t.next_in+n),a),1===t.state.wrap?t.adler=B(t.adler,e,n,a):2===t.state.wrap&&(t.adler=M(t.adler,e,n,a)),t.next_in+=n,t.total_in+=n,n)},Et=(t,e)=>{let a,i,n=t.max_chain_length,s=t.strstart,r=t.prev_length,l=t.nice_match;const o=t.strstart>t.w_size-ct?t.strstart-(t.w_size-ct):0,h=t.window,d=t.w_mask,_=t.prev,f=t.strstart+ft;let c=h[s+r-1],u=h[s+r];t.prev_length>=t.good_match&&(n>>=2),l>t.lookahead&&(l=t.lookahead);do{if(a=e,h[a+r]===u&&h[a+r-1]===c&&h[a]===h[s]&&h[++a]===h[s+1]){s+=2,a++;do{}while(h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&s<f);if(i=ft-(f-s),s=f-ft,i>r){if(t.match_start=e,r=i,i>=l)break;c=h[s+r-1],u=h[s+r]}}}while((e=_[e&d])>o&&0!=--n);return r<=t.lookahead?r:t.lookahead},Rt=t=>{const e=t.w_size;let a,i,n,s,r;do{if(s=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-ct)){t.window.set(t.window.subarray(e,e+e),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,i=t.hash_size,a=i;do{n=t.head[--a],t.head[a]=n>=e?n-e:0}while(--i);i=e,a=i;do{n=t.prev[--a],t.prev[a]=n>=e?n-e:0}while(--i);s+=e}if(0===t.strm.avail_in)break;if(i=At(t.strm,t.window,t.strstart+t.lookahead,s),t.lookahead+=i,t.lookahead+t.insert>=3)for(r=t.strstart-t.insert,t.ins_h=t.window[r],t.ins_h=kt(t,t.ins_h,t.window[r+1]);t.insert&&(t.ins_h=kt(t,t.ins_h,t.window[r+3-1]),t.prev[r&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=r,r++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<ct&&0!==t.strm.avail_in)},Zt=(t,e)=>{let a,i;for(;;){if(t.lookahead<ct){if(Rt(t),t.lookahead<ct&&e===W)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=kt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-ct&&(t.match_length=Et(t,a)),t.match_length>=3)if(i=G(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=kt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=kt(t,t.ins_h,t.window[t.strstart+1]);else i=G(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(yt(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===Q?(yt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(yt(t,!1),0===t.strm.avail_out)?1:2},Ut=(t,e)=>{let a,i,n;for(;;){if(t.lookahead<ct){if(Rt(t),t.lookahead<ct&&e===W)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=kt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-ct&&(t.match_length=Et(t,a),t.match_length<=5&&(t.strategy===st||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){n=t.strstart+t.lookahead-3,i=G(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=n&&(t.ins_h=kt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,i&&(yt(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(i=G(t,0,t.window[t.strstart-1]),i&&yt(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=G(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===Q?(yt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(yt(t,!1),0===t.strm.avail_out)?1:2};function St(t,e,a,i,n){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=i,this.func=n}const Dt=[new St(0,0,0,0,((t,e)=>{let a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(Rt(t),0===t.lookahead&&e===W)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;const i=t.block_start+a;if((0===t.strstart||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,yt(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-ct&&(yt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===Q?(yt(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(yt(t,!1),t.strm.avail_out),1)})),new St(4,4,8,4,Zt),new St(4,5,16,8,Zt),new St(4,6,32,32,Zt),new St(4,4,16,16,Ut),new St(8,16,32,32,Ut),new St(8,16,128,128,Ut),new St(8,32,128,256,Ut),new St(32,128,258,1024,Ut),new St(32,258,258,4096,Ut)];function Tt(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=_t,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),mt(this.dyn_ltree),mt(this.dyn_dtree),mt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),mt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),mt(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Ot=t=>{if(!t||!t.state)return gt(t,et);t.total_in=t.total_out=0,t.data_type=dt;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:wt,t.adler=2===e.wrap?0:1,e.last_flush=W,K(e),$},It=t=>{const e=Ot(t);var a;return e===$&&((a=t.state).window_size=2*a.w_size,mt(a.head),a.max_lazy_match=Dt[a.level].max_lazy,a.good_match=Dt[a.level].good_length,a.nice_match=Dt[a.level].nice_length,a.max_chain_length=Dt[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=2,a.match_available=0,a.ins_h=0),e},Ft=(t,e,a,i,n,s)=>{if(!t)return et;let r=1;if(e===nt&&(e=6),i<0?(r=0,i=-i):i>15&&(r=2,i-=16),n<1||n>9||a!==_t||i<8||i>15||e<0||e>9||s<0||s>ot)return gt(t,et);8===i&&(i=9);const l=new Tt;return t.state=l,l.strm=t,l.wrap=r,l.gzhead=null,l.w_bits=i,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=n+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+3-1)/3),l.window=new Uint8Array(2*l.w_size),l.head=new Uint16Array(l.hash_size),l.prev=new Uint16Array(l.w_size),l.lit_bufsize=1<<n+6,l.pending_buf_size=4*l.lit_bufsize,l.pending_buf=new Uint8Array(l.pending_buf_size),l.d_buf=1*l.lit_bufsize,l.l_buf=3*l.lit_bufsize,l.level=e,l.strategy=s,l.method=a,It(t)};var Lt={deflateInit:(t,e)=>Ft(t,e,_t,15,8,ht),deflateInit2:Ft,deflateReset:It,deflateResetKeep:Ot,deflateSetHeader:(t,e)=>t&&t.state?2!==t.state.wrap?et:(t.state.gzhead=e,$):et,deflate:(t,e)=>{let a,i;if(!t||!t.state||e>V||e<0)return t?gt(t,et):et;const n=t.state;if(!t.output||!t.input&&0!==t.avail_in||n.status===bt&&e!==Q)return gt(t,0===t.avail_out?it:et);n.strm=t;const s=n.last_flush;if(n.last_flush=e,42===n.status)if(2===n.wrap)t.adler=0,xt(n,31),xt(n,139),xt(n,8),n.gzhead?(xt(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),xt(n,255&n.gzhead.time),xt(n,n.gzhead.time>>8&255),xt(n,n.gzhead.time>>16&255),xt(n,n.gzhead.time>>24&255),xt(n,9===n.level?2:n.strategy>=rt||n.level<2?4:0),xt(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(xt(n,255&n.gzhead.extra.length),xt(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(t.adler=M(t.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(xt(n,0),xt(n,0),xt(n,0),xt(n,0),xt(n,0),xt(n,9===n.level?2:n.strategy>=rt||n.level<2?4:0),xt(n,3),n.status=wt);else{let e=_t+(n.w_bits-8<<4)<<8,a=-1;a=n.strategy>=rt||n.level<2?0:n.level<6?1:6===n.level?2:3,e|=a<<6,0!==n.strstart&&(e|=32),e+=31-e%31,n.status=wt,zt(n,e),0!==n.strstart&&(zt(n,t.adler>>>16),zt(n,65535&t.adler)),t.adler=1}if(69===n.status)if(n.gzhead.extra){for(a=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>a&&(t.adler=M(t.adler,n.pending_buf,n.pending-a,a)),vt(t),a=n.pending,n.pending!==n.pending_buf_size));)xt(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>a&&(t.adler=M(t.adler,n.pending_buf,n.pending-a,a)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){a=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>a&&(t.adler=M(t.adler,n.pending_buf,n.pending-a,a)),vt(t),a=n.pending,n.pending===n.pending_buf_size)){i=1;break}i=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,xt(n,i)}while(0!==i);n.gzhead.hcrc&&n.pending>a&&(t.adler=M(t.adler,n.pending_buf,n.pending-a,a)),0===i&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){a=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>a&&(t.adler=M(t.adler,n.pending_buf,n.pending-a,a)),vt(t),a=n.pending,n.pending===n.pending_buf_size)){i=1;break}i=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,xt(n,i)}while(0!==i);n.gzhead.hcrc&&n.pending>a&&(t.adler=M(t.adler,n.pending_buf,n.pending-a,a)),0===i&&(n.status=ut)}else n.status=ut;if(n.status===ut&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&vt(t),n.pending+2<=n.pending_buf_size&&(xt(n,255&t.adler),xt(n,t.adler>>8&255),t.adler=0,n.status=wt)):n.status=wt),0!==n.pending){if(vt(t),0===t.avail_out)return n.last_flush=-1,$}else if(0===t.avail_in&&pt(e)<=pt(s)&&e!==Q)return gt(t,it);if(n.status===bt&&0!==t.avail_in)return gt(t,it);if(0!==t.avail_in||0!==n.lookahead||e!==W&&n.status!==bt){let a=n.strategy===rt?((t,e)=>{let a;for(;;){if(0===t.lookahead&&(Rt(t),0===t.lookahead)){if(e===W)return 1;break}if(t.match_length=0,a=G(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(yt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===Q?(yt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(yt(t,!1),0===t.strm.avail_out)?1:2})(n,e):n.strategy===lt?((t,e)=>{let a,i,n,s;const r=t.window;for(;;){if(t.lookahead<=ft){if(Rt(t),t.lookahead<=ft&&e===W)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=t.strstart-1,i=r[n],i===r[++n]&&i===r[++n]&&i===r[++n])){s=t.strstart+ft;do{}while(i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&n<s);t.match_length=ft-(s-n),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=G(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=G(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(yt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===Q?(yt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(yt(t,!1),0===t.strm.avail_out)?1:2})(n,e):Dt[n.level].func(n,e);if(3!==a&&4!==a||(n.status=bt),1===a||3===a)return 0===t.avail_out&&(n.last_flush=-1),$;if(2===a&&(e===q?X(n):e!==V&&(P(n,0,0,!1),e===J&&(mt(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),vt(t),0===t.avail_out))return n.last_flush=-1,$}return e!==Q?$:n.wrap<=0?tt:(2===n.wrap?(xt(n,255&t.adler),xt(n,t.adler>>8&255),xt(n,t.adler>>16&255),xt(n,t.adler>>24&255),xt(n,255&t.total_in),xt(n,t.total_in>>8&255),xt(n,t.total_in>>16&255),xt(n,t.total_in>>24&255)):(zt(n,t.adler>>>16),zt(n,65535&t.adler)),vt(t),n.wrap>0&&(n.wrap=-n.wrap),0!==n.pending?$:tt)},deflateEnd:t=>{if(!t||!t.state)return et;const e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==ut&&e!==wt&&e!==bt?gt(t,et):(t.state=null,e===wt?gt(t,at):$)},deflateSetDictionary:(t,e)=>{let a=e.length;if(!t||!t.state)return et;const i=t.state,n=i.wrap;if(2===n||1===n&&42!==i.status||i.lookahead)return et;if(1===n&&(t.adler=B(t.adler,e,a,0)),i.wrap=0,a>=i.w_size){0===n&&(mt(i.head),i.strstart=0,i.block_start=0,i.insert=0);let t=new Uint8Array(i.w_size);t.set(e.subarray(a-i.w_size,a),0),e=t,a=i.w_size}const s=t.avail_in,r=t.next_in,l=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,Rt(i);i.lookahead>=3;){let t=i.strstart,e=i.lookahead-2;do{i.ins_h=kt(i,i.ins_h,i.window[t+3-1]),i.prev[t&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=t,t++}while(--e);i.strstart=t,i.lookahead=2,Rt(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,t.next_in=r,t.input=l,t.avail_in=s,i.wrap=n,$},deflateInfo:"pako deflate (from Nodeca project)"};const Nt=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var Bt=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const a=e.shift();if(a){if("object"!=typeof a)throw new TypeError(a+"must be non-object");for(const e in a)Nt(a,e)&&(t[e]=a[e])}}return t},Ct=t=>{let e=0;for(let a=0,i=t.length;a<i;a++)e+=t[a].length;const a=new Uint8Array(e);for(let e=0,i=0,n=t.length;e<n;e++){let n=t[e];a.set(n,i),i+=n.length}return a};let Mt=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){Mt=!1}const Ht=new Uint8Array(256);for(let t=0;t<256;t++)Ht[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;Ht[254]=Ht[254]=1;var jt=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,a,i,n,s,r=t.length,l=0;for(n=0;n<r;n++)a=t.charCodeAt(n),55296==(64512&a)&&n+1<r&&(i=t.charCodeAt(n+1),56320==(64512&i)&&(a=65536+(a-55296<<10)+(i-56320),n++)),l+=a<128?1:a<2048?2:a<65536?3:4;for(e=new Uint8Array(l),s=0,n=0;s<l;n++)a=t.charCodeAt(n),55296==(64512&a)&&n+1<r&&(i=t.charCodeAt(n+1),56320==(64512&i)&&(a=65536+(a-55296<<10)+(i-56320),n++)),a<128?e[s++]=a:a<2048?(e[s++]=192|a>>>6,e[s++]=128|63&a):a<65536?(e[s++]=224|a>>>12,e[s++]=128|a>>>6&63,e[s++]=128|63&a):(e[s++]=240|a>>>18,e[s++]=128|a>>>12&63,e[s++]=128|a>>>6&63,e[s++]=128|63&a);return e},Kt=(t,e)=>{const a=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));let i,n;const s=new Array(2*a);for(n=0,i=0;i<a;){let e=t[i++];if(e<128){s[n++]=e;continue}let r=Ht[e];if(r>4)s[n++]=65533,i+=r-1;else{for(e&=2===r?31:3===r?15:7;r>1&&i<a;)e=e<<6|63&t[i++],r--;r>1?s[n++]=65533:e<65536?s[n++]=e:(e-=65536,s[n++]=55296|e>>10&1023,s[n++]=56320|1023&e)}}return((t,e)=>{if(e<65534&&t.subarray&&Mt)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let a="";for(let i=0;i<e;i++)a+=String.fromCharCode(t[i]);return a})(s,n)},Pt=(t,e)=>{(e=e||t.length)>t.length&&(e=t.length);let a=e-1;for(;a>=0&&128==(192&t[a]);)a--;return a<0||0===a?e:a+Ht[t[a]]>e?a:e};var Yt=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const Gt=Object.prototype.toString,{Z_NO_FLUSH:Xt,Z_SYNC_FLUSH:Wt,Z_FULL_FLUSH:qt,Z_FINISH:Jt,Z_OK:Qt,Z_STREAM_END:Vt,Z_DEFAULT_COMPRESSION:$t,Z_DEFAULT_STRATEGY:te,Z_DEFLATED:ee}=j;function ae(t){this.options=Bt({level:$t,method:ee,chunkSize:16384,windowBits:15,memLevel:8,strategy:te},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Yt,this.strm.avail_out=0;let a=Lt.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(a!==Qt)throw new Error(H[a]);if(e.header&&Lt.deflateSetHeader(this.strm,e.header),e.dictionary){let t;if(t="string"==typeof e.dictionary?jt(e.dictionary):"[object ArrayBuffer]"===Gt.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,a=Lt.deflateSetDictionary(this.strm,t),a!==Qt)throw new Error(H[a]);this._dict_set=!0}}function ie(t,e){const a=new ae(e);if(a.push(t,!0),a.err)throw a.msg||H[a.err];return a.result}ae.prototype.push=function(t,e){const a=this.strm,i=this.options.chunkSize;let n,s;if(this.ended)return!1;for(s=e===~~e?e:!0===e?Jt:Xt,"string"==typeof t?a.input=jt(t):"[object ArrayBuffer]"===Gt.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;;)if(0===a.avail_out&&(a.output=new Uint8Array(i),a.next_out=0,a.avail_out=i),(s===Wt||s===qt)&&a.avail_out<=6)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else{if(n=Lt.deflate(a,s),n===Vt)return a.next_out>0&&this.onData(a.output.subarray(0,a.next_out)),n=Lt.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===Qt;if(0!==a.avail_out){if(s>0&&a.next_out>0)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else if(0===a.avail_in)break}else this.onData(a.output)}return!0},ae.prototype.onData=function(t){this.chunks.push(t)},ae.prototype.onEnd=function(t){t===Qt&&(this.result=Ct(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var ne={Deflate:ae,deflate:ie,deflateRaw:function(t,e){return(e=e||{}).raw=!0,ie(t,e)},gzip:function(t,e){return(e=e||{}).gzip=!0,ie(t,e)},constants:j};var se=function(t,e){let a,i,n,s,r,l,o,h,d,_,f,c,u,w,b,g,p,m,k,v,y,x,z,A;const E=t.state;a=t.next_in,z=t.input,i=a+(t.avail_in-5),n=t.next_out,A=t.output,s=n-(e-t.avail_out),r=n+(t.avail_out-257),l=E.dmax,o=E.wsize,h=E.whave,d=E.wnext,_=E.window,f=E.hold,c=E.bits,u=E.lencode,w=E.distcode,b=(1<<E.lenbits)-1,g=(1<<E.distbits)-1;t:do{c<15&&(f+=z[a++]<<c,c+=8,f+=z[a++]<<c,c+=8),p=u[f&b];e:for(;;){if(m=p>>>24,f>>>=m,c-=m,m=p>>>16&255,0===m)A[n++]=65535&p;else{if(!(16&m)){if(0==(64&m)){p=u[(65535&p)+(f&(1<<m)-1)];continue e}if(32&m){E.mode=12;break t}t.msg="invalid literal/length code",E.mode=30;break t}k=65535&p,m&=15,m&&(c<m&&(f+=z[a++]<<c,c+=8),k+=f&(1<<m)-1,f>>>=m,c-=m),c<15&&(f+=z[a++]<<c,c+=8,f+=z[a++]<<c,c+=8),p=w[f&g];a:for(;;){if(m=p>>>24,f>>>=m,c-=m,m=p>>>16&255,!(16&m)){if(0==(64&m)){p=w[(65535&p)+(f&(1<<m)-1)];continue a}t.msg="invalid distance code",E.mode=30;break t}if(v=65535&p,m&=15,c<m&&(f+=z[a++]<<c,c+=8,c<m&&(f+=z[a++]<<c,c+=8)),v+=f&(1<<m)-1,v>l){t.msg="invalid distance too far back",E.mode=30;break t}if(f>>>=m,c-=m,m=n-s,v>m){if(m=v-m,m>h&&E.sane){t.msg="invalid distance too far back",E.mode=30;break t}if(y=0,x=_,0===d){if(y+=o-m,m<k){k-=m;do{A[n++]=_[y++]}while(--m);y=n-v,x=A}}else if(d<m){if(y+=o+d-m,m-=d,m<k){k-=m;do{A[n++]=_[y++]}while(--m);if(y=0,d<k){m=d,k-=m;do{A[n++]=_[y++]}while(--m);y=n-v,x=A}}}else if(y+=d-m,m<k){k-=m;do{A[n++]=_[y++]}while(--m);y=n-v,x=A}for(;k>2;)A[n++]=x[y++],A[n++]=x[y++],A[n++]=x[y++],k-=3;k&&(A[n++]=x[y++],k>1&&(A[n++]=x[y++]))}else{y=n-v;do{A[n++]=A[y++],A[n++]=A[y++],A[n++]=A[y++],k-=3}while(k>2);k&&(A[n++]=A[y++],k>1&&(A[n++]=A[y++]))}break}}break}}while(a<i&&n<r);k=c>>3,a-=k,c-=k<<3,f&=(1<<c)-1,t.next_in=a,t.next_out=n,t.avail_in=a<i?i-a+5:5-(a-i),t.avail_out=n<r?r-n+257:257-(n-r),E.hold=f,E.bits=c};const re=15,le=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),oe=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),he=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),de=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var _e=(t,e,a,i,n,s,r,l)=>{const o=l.bits;let h,d,_,f,c,u,w=0,b=0,g=0,p=0,m=0,k=0,v=0,y=0,x=0,z=0,A=null,E=0;const R=new Uint16Array(16),Z=new Uint16Array(16);let U,S,D,T=null,O=0;for(w=0;w<=re;w++)R[w]=0;for(b=0;b<i;b++)R[e[a+b]]++;for(m=o,p=re;p>=1&&0===R[p];p--);if(m>p&&(m=p),0===p)return n[s++]=20971520,n[s++]=20971520,l.bits=1,0;for(g=1;g<p&&0===R[g];g++);for(m<g&&(m=g),y=1,w=1;w<=re;w++)if(y<<=1,y-=R[w],y<0)return-1;if(y>0&&(0===t||1!==p))return-1;for(Z[1]=0,w=1;w<re;w++)Z[w+1]=Z[w]+R[w];for(b=0;b<i;b++)0!==e[a+b]&&(r[Z[e[a+b]]++]=b);if(0===t?(A=T=r,u=19):1===t?(A=le,E-=257,T=oe,O-=257,u=256):(A=he,T=de,u=-1),z=0,b=0,w=g,c=s,k=m,v=0,_=-1,x=1<<m,f=x-1,1===t&&x>852||2===t&&x>592)return 1;for(;;){U=w-v,r[b]<u?(S=0,D=r[b]):r[b]>u?(S=T[O+r[b]],D=A[E+r[b]]):(S=96,D=0),h=1<<w-v,d=1<<k,g=d;do{d-=h,n[c+(z>>v)+d]=U<<24|S<<16|D|0}while(0!==d);for(h=1<<w-1;z&h;)h>>=1;if(0!==h?(z&=h-1,z+=h):z=0,b++,0==--R[w]){if(w===p)break;w=e[a+r[b]]}if(w>m&&(z&f)!==_){for(0===v&&(v=m),c+=g,k=w-v,y=1<<k;k+v<p&&(y-=R[k+v],!(y<=0));)k++,y<<=1;if(x+=1<<k,1===t&&x>852||2===t&&x>592)return 1;_=z&f,n[_]=m<<24|k<<16|c-s|0}}return 0!==z&&(n[c+z]=w-v<<24|64<<16|0),l.bits=m,0};const{Z_FINISH:fe,Z_BLOCK:ce,Z_TREES:ue,Z_OK:we,Z_STREAM_END:be,Z_NEED_DICT:ge,Z_STREAM_ERROR:pe,Z_DATA_ERROR:me,Z_MEM_ERROR:ke,Z_BUF_ERROR:ve,Z_DEFLATED:ye}=j,xe=12,ze=30,Ae=t=>(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24);function Ee(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Re=t=>{if(!t||!t.state)return pe;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,we},Ze=t=>{if(!t||!t.state)return pe;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,Re(t)},Ue=(t,e)=>{let a;if(!t||!t.state)return pe;const i=t.state;return e<0?(a=0,e=-e):(a=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?pe:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=a,i.wbits=e,Ze(t))},Se=(t,e)=>{if(!t)return pe;const a=new Ee;t.state=a,a.window=null;const i=Ue(t,e);return i!==we&&(t.state=null),i};let De,Te,Oe=!0;const Ie=t=>{if(Oe){De=new Int32Array(512),Te=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(_e(1,t.lens,0,288,De,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;_e(2,t.lens,0,32,Te,0,t.work,{bits:5}),Oe=!1}t.lencode=De,t.lenbits=9,t.distcode=Te,t.distbits=5},Fe=(t,e,a,i)=>{let n;const s=t.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new Uint8Array(s.wsize)),i>=s.wsize?(s.window.set(e.subarray(a-s.wsize,a),0),s.wnext=0,s.whave=s.wsize):(n=s.wsize-s.wnext,n>i&&(n=i),s.window.set(e.subarray(a-i,a-i+n),s.wnext),(i-=n)?(s.window.set(e.subarray(a-i,a),0),s.wnext=i,s.whave=s.wsize):(s.wnext+=n,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=n))),0};var Le={inflateReset:Ze,inflateReset2:Ue,inflateResetKeep:Re,inflateInit:t=>Se(t,15),inflateInit2:Se,inflate:(t,e)=>{let a,i,n,s,r,l,o,h,d,_,f,c,u,w,b,g,p,m,k,v,y,x,z=0;const A=new Uint8Array(4);let E,R;const Z=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return pe;a=t.state,a.mode===xe&&(a.mode=13),r=t.next_out,n=t.output,o=t.avail_out,s=t.next_in,i=t.input,l=t.avail_in,h=a.hold,d=a.bits,_=l,f=o,x=we;t:for(;;)switch(a.mode){case 1:if(0===a.wrap){a.mode=13;break}for(;d<16;){if(0===l)break t;l--,h+=i[s++]<<d,d+=8}if(2&a.wrap&&35615===h){a.check=0,A[0]=255&h,A[1]=h>>>8&255,a.check=M(a.check,A,2,0),h=0,d=0,a.mode=2;break}if(a.flags=0,a.head&&(a.head.done=!1),!(1&a.wrap)||(((255&h)<<8)+(h>>8))%31){t.msg="incorrect header check",a.mode=ze;break}if((15&h)!==ye){t.msg="unknown compression method",a.mode=ze;break}if(h>>>=4,d-=4,y=8+(15&h),0===a.wbits)a.wbits=y;else if(y>a.wbits){t.msg="invalid window size",a.mode=ze;break}a.dmax=1<<a.wbits,t.adler=a.check=1,a.mode=512&h?10:xe,h=0,d=0;break;case 2:for(;d<16;){if(0===l)break t;l--,h+=i[s++]<<d,d+=8}if(a.flags=h,(255&a.flags)!==ye){t.msg="unknown compression method",a.mode=ze;break}if(57344&a.flags){t.msg="unknown header flags set",a.mode=ze;break}a.head&&(a.head.text=h>>8&1),512&a.flags&&(A[0]=255&h,A[1]=h>>>8&255,a.check=M(a.check,A,2,0)),h=0,d=0,a.mode=3;case 3:for(;d<32;){if(0===l)break t;l--,h+=i[s++]<<d,d+=8}a.head&&(a.head.time=h),512&a.flags&&(A[0]=255&h,A[1]=h>>>8&255,A[2]=h>>>16&255,A[3]=h>>>24&255,a.check=M(a.check,A,4,0)),h=0,d=0,a.mode=4;case 4:for(;d<16;){if(0===l)break t;l--,h+=i[s++]<<d,d+=8}a.head&&(a.head.xflags=255&h,a.head.os=h>>8),512&a.flags&&(A[0]=255&h,A[1]=h>>>8&255,a.check=M(a.check,A,2,0)),h=0,d=0,a.mode=5;case 5:if(1024&a.flags){for(;d<16;){if(0===l)break t;l--,h+=i[s++]<<d,d+=8}a.length=h,a.head&&(a.head.extra_len=h),512&a.flags&&(A[0]=255&h,A[1]=h>>>8&255,a.check=M(a.check,A,2,0)),h=0,d=0}else a.head&&(a.head.extra=null);a.mode=6;case 6:if(1024&a.flags&&(c=a.length,c>l&&(c=l),c&&(a.head&&(y=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Uint8Array(a.head.extra_len)),a.head.extra.set(i.subarray(s,s+c),y)),512&a.flags&&(a.check=M(a.check,i,c,s)),l-=c,s+=c,a.length-=c),a.length))break t;a.length=0,a.mode=7;case 7:if(2048&a.flags){if(0===l)break t;c=0;do{y=i[s+c++],a.head&&y&&a.length<65536&&(a.head.name+=String.fromCharCode(y))}while(y&&c<l);if(512&a.flags&&(a.check=M(a.check,i,c,s)),l-=c,s+=c,y)break t}else a.head&&(a.head.name=null);a.length=0,a.mode=8;case 8:if(4096&a.flags){if(0===l)break t;c=0;do{y=i[s+c++],a.head&&y&&a.length<65536&&(a.head.comment+=String.fromCharCode(y))}while(y&&c<l);if(512&a.flags&&(a.check=M(a.check,i,c,s)),l-=c,s+=c,y)break t}else a.head&&(a.head.comment=null);a.mode=9;case 9:if(512&a.flags){for(;d<16;){if(0===l)break t;l--,h+=i[s++]<<d,d+=8}if(h!==(65535&a.check)){t.msg="header crc mismatch",a.mode=ze;break}h=0,d=0}a.head&&(a.head.hcrc=a.flags>>9&1,a.head.done=!0),t.adler=a.check=0,a.mode=xe;break;case 10:for(;d<32;){if(0===l)break t;l--,h+=i[s++]<<d,d+=8}t.adler=a.check=Ae(h),h=0,d=0,a.mode=11;case 11:if(0===a.havedict)return t.next_out=r,t.avail_out=o,t.next_in=s,t.avail_in=l,a.hold=h,a.bits=d,ge;t.adler=a.check=1,a.mode=xe;case xe:if(e===ce||e===ue)break t;case 13:if(a.last){h>>>=7&d,d-=7&d,a.mode=27;break}for(;d<3;){if(0===l)break t;l--,h+=i[s++]<<d,d+=8}switch(a.last=1&h,h>>>=1,d-=1,3&h){case 0:a.mode=14;break;case 1:if(Ie(a),a.mode=20,e===ue){h>>>=2,d-=2;break t}break;case 2:a.mode=17;break;case 3:t.msg="invalid block type",a.mode=ze}h>>>=2,d-=2;break;case 14:for(h>>>=7&d,d-=7&d;d<32;){if(0===l)break t;l--,h+=i[s++]<<d,d+=8}if((65535&h)!=(h>>>16^65535)){t.msg="invalid stored block lengths",a.mode=ze;break}if(a.length=65535&h,h=0,d=0,a.mode=15,e===ue)break t;case 15:a.mode=16;case 16:if(c=a.length,c){if(c>l&&(c=l),c>o&&(c=o),0===c)break t;n.set(i.subarray(s,s+c),r),l-=c,s+=c,o-=c,r+=c,a.length-=c;break}a.mode=xe;break;case 17:for(;d<14;){if(0===l)break t;l--,h+=i[s++]<<d,d+=8}if(a.nlen=257+(31&h),h>>>=5,d-=5,a.ndist=1+(31&h),h>>>=5,d-=5,a.ncode=4+(15&h),h>>>=4,d-=4,a.nlen>286||a.ndist>30){t.msg="too many length or distance symbols",a.mode=ze;break}a.have=0,a.mode=18;case 18:for(;a.have<a.ncode;){for(;d<3;){if(0===l)break t;l--,h+=i[s++]<<d,d+=8}a.lens[Z[a.have++]]=7&h,h>>>=3,d-=3}for(;a.have<19;)a.lens[Z[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,E={bits:a.lenbits},x=_e(0,a.lens,0,19,a.lencode,0,a.work,E),a.lenbits=E.bits,x){t.msg="invalid code lengths set",a.mode=ze;break}a.have=0,a.mode=19;case 19:for(;a.have<a.nlen+a.ndist;){for(;z=a.lencode[h&(1<<a.lenbits)-1],b=z>>>24,g=z>>>16&255,p=65535&z,!(b<=d);){if(0===l)break t;l--,h+=i[s++]<<d,d+=8}if(p<16)h>>>=b,d-=b,a.lens[a.have++]=p;else{if(16===p){for(R=b+2;d<R;){if(0===l)break t;l--,h+=i[s++]<<d,d+=8}if(h>>>=b,d-=b,0===a.have){t.msg="invalid bit length repeat",a.mode=ze;break}y=a.lens[a.have-1],c=3+(3&h),h>>>=2,d-=2}else if(17===p){for(R=b+3;d<R;){if(0===l)break t;l--,h+=i[s++]<<d,d+=8}h>>>=b,d-=b,y=0,c=3+(7&h),h>>>=3,d-=3}else{for(R=b+7;d<R;){if(0===l)break t;l--,h+=i[s++]<<d,d+=8}h>>>=b,d-=b,y=0,c=11+(127&h),h>>>=7,d-=7}if(a.have+c>a.nlen+a.ndist){t.msg="invalid bit length repeat",a.mode=ze;break}for(;c--;)a.lens[a.have++]=y}}if(a.mode===ze)break;if(0===a.lens[256]){t.msg="invalid code -- missing end-of-block",a.mode=ze;break}if(a.lenbits=9,E={bits:a.lenbits},x=_e(1,a.lens,0,a.nlen,a.lencode,0,a.work,E),a.lenbits=E.bits,x){t.msg="invalid literal/lengths set",a.mode=ze;break}if(a.distbits=6,a.distcode=a.distdyn,E={bits:a.distbits},x=_e(2,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,E),a.distbits=E.bits,x){t.msg="invalid distances set",a.mode=ze;break}if(a.mode=20,e===ue)break t;case 20:a.mode=21;case 21:if(l>=6&&o>=258){t.next_out=r,t.avail_out=o,t.next_in=s,t.avail_in=l,a.hold=h,a.bits=d,se(t,f),r=t.next_out,n=t.output,o=t.avail_out,s=t.next_in,i=t.input,l=t.avail_in,h=a.hold,d=a.bits,a.mode===xe&&(a.back=-1);break}for(a.back=0;z=a.lencode[h&(1<<a.lenbits)-1],b=z>>>24,g=z>>>16&255,p=65535&z,!(b<=d);){if(0===l)break t;l--,h+=i[s++]<<d,d+=8}if(g&&0==(240&g)){for(m=b,k=g,v=p;z=a.lencode[v+((h&(1<<m+k)-1)>>m)],b=z>>>24,g=z>>>16&255,p=65535&z,!(m+b<=d);){if(0===l)break t;l--,h+=i[s++]<<d,d+=8}h>>>=m,d-=m,a.back+=m}if(h>>>=b,d-=b,a.back+=b,a.length=p,0===g){a.mode=26;break}if(32&g){a.back=-1,a.mode=xe;break}if(64&g){t.msg="invalid literal/length code",a.mode=ze;break}a.extra=15&g,a.mode=22;case 22:if(a.extra){for(R=a.extra;d<R;){if(0===l)break t;l--,h+=i[s++]<<d,d+=8}a.length+=h&(1<<a.extra)-1,h>>>=a.extra,d-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=23;case 23:for(;z=a.distcode[h&(1<<a.distbits)-1],b=z>>>24,g=z>>>16&255,p=65535&z,!(b<=d);){if(0===l)break t;l--,h+=i[s++]<<d,d+=8}if(0==(240&g)){for(m=b,k=g,v=p;z=a.distcode[v+((h&(1<<m+k)-1)>>m)],b=z>>>24,g=z>>>16&255,p=65535&z,!(m+b<=d);){if(0===l)break t;l--,h+=i[s++]<<d,d+=8}h>>>=m,d-=m,a.back+=m}if(h>>>=b,d-=b,a.back+=b,64&g){t.msg="invalid distance code",a.mode=ze;break}a.offset=p,a.extra=15&g,a.mode=24;case 24:if(a.extra){for(R=a.extra;d<R;){if(0===l)break t;l--,h+=i[s++]<<d,d+=8}a.offset+=h&(1<<a.extra)-1,h>>>=a.extra,d-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){t.msg="invalid distance too far back",a.mode=ze;break}a.mode=25;case 25:if(0===o)break t;if(c=f-o,a.offset>c){if(c=a.offset-c,c>a.whave&&a.sane){t.msg="invalid distance too far back",a.mode=ze;break}c>a.wnext?(c-=a.wnext,u=a.wsize-c):u=a.wnext-c,c>a.length&&(c=a.length),w=a.window}else w=n,u=r-a.offset,c=a.length;c>o&&(c=o),o-=c,a.length-=c;do{n[r++]=w[u++]}while(--c);0===a.length&&(a.mode=21);break;case 26:if(0===o)break t;n[r++]=a.length,o--,a.mode=21;break;case 27:if(a.wrap){for(;d<32;){if(0===l)break t;l--,h|=i[s++]<<d,d+=8}if(f-=o,t.total_out+=f,a.total+=f,f&&(t.adler=a.check=a.flags?M(a.check,n,f,r-f):B(a.check,n,f,r-f)),f=o,(a.flags?h:Ae(h))!==a.check){t.msg="incorrect data check",a.mode=ze;break}h=0,d=0}a.mode=28;case 28:if(a.wrap&&a.flags){for(;d<32;){if(0===l)break t;l--,h+=i[s++]<<d,d+=8}if(h!==(4294967295&a.total)){t.msg="incorrect length check",a.mode=ze;break}h=0,d=0}a.mode=29;case 29:x=be;break t;case ze:x=me;break t;case 31:return ke;case 32:default:return pe}return t.next_out=r,t.avail_out=o,t.next_in=s,t.avail_in=l,a.hold=h,a.bits=d,(a.wsize||f!==t.avail_out&&a.mode<ze&&(a.mode<27||e!==fe))&&Fe(t,t.output,t.next_out,f-t.avail_out),_-=t.avail_in,f-=t.avail_out,t.total_in+=_,t.total_out+=f,a.total+=f,a.wrap&&f&&(t.adler=a.check=a.flags?M(a.check,n,f,t.next_out-f):B(a.check,n,f,t.next_out-f)),t.data_type=a.bits+(a.last?64:0)+(a.mode===xe?128:0)+(20===a.mode||15===a.mode?256:0),(0===_&&0===f||e===fe)&&x===we&&(x=ve),x},inflateEnd:t=>{if(!t||!t.state)return pe;let e=t.state;return e.window&&(e.window=null),t.state=null,we},inflateGetHeader:(t,e)=>{if(!t||!t.state)return pe;const a=t.state;return 0==(2&a.wrap)?pe:(a.head=e,e.done=!1,we)},inflateSetDictionary:(t,e)=>{const a=e.length;let i,n,s;return t&&t.state?(i=t.state,0!==i.wrap&&11!==i.mode?pe:11===i.mode&&(n=1,n=B(n,e,a,0),n!==i.check)?me:(s=Fe(t,e,a,a),s?(i.mode=31,ke):(i.havedict=1,we))):pe},inflateInfo:"pako inflate (from Nodeca project)"};var Ne=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const Be=Object.prototype.toString,{Z_NO_FLUSH:Ce,Z_FINISH:Me,Z_OK:He,Z_STREAM_END:je,Z_NEED_DICT:Ke,Z_STREAM_ERROR:Pe,Z_DATA_ERROR:Ye,Z_MEM_ERROR:Ge}=j;function Xe(t){this.options=Bt({chunkSize:65536,windowBits:15,to:""},t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Yt,this.strm.avail_out=0;let a=Le.inflateInit2(this.strm,e.windowBits);if(a!==He)throw new Error(H[a]);if(this.header=new Ne,Le.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=jt(e.dictionary):"[object ArrayBuffer]"===Be.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(a=Le.inflateSetDictionary(this.strm,e.dictionary),a!==He)))throw new Error(H[a])}function We(t,e){const a=new Xe(e);if(a.push(t),a.err)throw a.msg||H[a.err];return a.result}Xe.prototype.push=function(t,e){const a=this.strm,i=this.options.chunkSize,n=this.options.dictionary;let s,r,l;if(this.ended)return!1;for(r=e===~~e?e:!0===e?Me:Ce,"[object ArrayBuffer]"===Be.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;;){for(0===a.avail_out&&(a.output=new Uint8Array(i),a.next_out=0,a.avail_out=i),s=Le.inflate(a,r),s===Ke&&n&&(s=Le.inflateSetDictionary(a,n),s===He?s=Le.inflate(a,r):s===Ye&&(s=Ke));a.avail_in>0&&s===je&&a.state.wrap>0&&0!==t[a.next_in];)Le.inflateReset(a),s=Le.inflate(a,r);switch(s){case Pe:case Ye:case Ke:case Ge:return this.onEnd(s),this.ended=!0,!1}if(l=a.avail_out,a.next_out&&(0===a.avail_out||s===je))if("string"===this.options.to){let t=Pt(a.output,a.next_out),e=a.next_out-t,n=Kt(a.output,t);a.next_out=e,a.avail_out=i-e,e&&a.output.set(a.output.subarray(t,t+e),0),this.onData(n)}else this.onData(a.output.length===a.next_out?a.output:a.output.subarray(0,a.next_out));if(s!==He||0!==l){if(s===je)return s=Le.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(0===a.avail_in)break}}return!0},Xe.prototype.onData=function(t){this.chunks.push(t)},Xe.prototype.onEnd=function(t){t===He&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Ct(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var qe={Inflate:Xe,inflate:We,inflateRaw:function(t,e){return(e=e||{}).raw=!0,We(t,e)},ungzip:We,constants:j};const{Deflate:Je,deflate:Qe,deflateRaw:Ve,gzip:$e}=ne,{Inflate:ta,inflate:ea,inflateRaw:aa,ungzip:ia}=qe;var na=Je,sa=Qe,ra=Ve,la=$e,oa=ta,ha=ea,da=aa,_a=ia,fa=j,ca={Deflate:na,deflate:sa,deflateRaw:ra,gzip:la,Inflate:oa,inflate:ha,inflateRaw:da,ungzip:_a,constants:fa};t.Deflate=na,t.Inflate=oa,t.constants=fa,t.default=ca,t.deflate=sa,t.deflateRaw=ra,t.gzip=la,t.inflate=ha,t.inflateRaw=da,t.ungzip=_a,Object.defineProperty(t,"__esModule",{value:!0})}));
const biliJson = {"nested":{"bilibili":{"nested":{"ad":{"nested":{"v1":{"options":{"java_package":"com.smile.bilibili.model"},"nested":{"AdAutoPlayVideoDto":{"fields":{"avid":{"type":"int64","id":1},"cid":{"type":"int64","id":2},"page":{"type":"int64","id":3},"from":{"type":"string","id":4},"url":{"type":"string","id":5},"cover":{"type":"string","id":6},"autoPlay":{"type":"bool","id":7},"btnDycColor":{"type":"bool","id":8},"btnDycTime":{"type":"int32","id":9},"bizId":{"type":"int64","id":10},"process0Urls":{"rule":"repeated","type":"string","id":11},"play3SUrls":{"rule":"repeated","type":"string","id":12},"play5SUrls":{"rule":"repeated","type":"string","id":13},"orientation":{"type":"int32","id":14},"fromSpmid":{"type":"string","id":15},"autoPlayValue":{"type":"int32","id":16}}},"AdBusinessMarkDto":{"fields":{"type":{"type":"int32","id":1},"text":{"type":"string","id":2},"textColor":{"type":"string","id":3},"textColorNight":{"type":"string","id":4},"bgColor":{"type":"string","id":5},"bgColorNight":{"type":"string","id":6},"borderColor":{"type":"string","id":7},"borderColorNight":{"type":"string","id":8},"imgUrl":{"type":"string","id":9},"imgHeight":{"type":"int32","id":10},"imgWidth":{"type":"int32","id":11},"bgBorderColor":{"type":"string","id":12}}},"AdButtonDto":{"fields":{"type":{"type":"int32","id":1},"text":{"type":"string","id":2},"jumpUrl":{"type":"string","id":3},"reportUrls":{"rule":"repeated","type":"string","id":4},"dlsucCallupUrl":{"type":"string","id":5},"gameId":{"type":"int32","id":6},"gameMonitorParam":{"type":"string","id":7}}},"AdCardDto":{"fields":{"cardType":{"type":"int32","id":1},"title":{"type":"string","id":2},"desc":{"type":"string","id":3},"extraDesc":{"type":"string","id":4},"longDesc":{"type":"string","id":5},"shortTitle":{"type":"string","id":6},"danmuTitle":{"type":"string","id":7},"danmuHeight":{"type":"int32","id":8},"danmuWidth":{"type":"int32","id":9},"danmuLife":{"type":"int32","id":10},"danmuBegin":{"type":"int32","id":11},"danmuColor":{"type":"string","id":12},"danmuH5Url":{"type":"string","id":13},"danmuIcon":{"type":"string","id":14},"foldTime":{"type":"int32","id":15},"adTag":{"type":"string","id":16},"covers":{"rule":"repeated","type":"AdCoverDto","id":17},"jumpUrl":{"type":"string","id":18},"imaxLandingPageJsonString":{"type":"string","id":19},"callupUrl":{"type":"string","id":20},"universalApp":{"type":"string","id":21},"oriPrice":{"type":"string","id":22},"curPrice":{"type":"int32","id":23},"priceDesc":{"type":"string","id":24},"priceSymbol":{"type":"string","id":25},"goodsCurPrice":{"type":"string","id":26},"goodsOriPrice":{"type":"string","id":27},"good":{"type":"AdGoodDto","id":28},"rank":{"type":"int32","id":29},"hotScore":{"type":"int32","id":30},"button":{"type":"AdButtonDto","id":31},"adverLogo":{"type":"string","id":32},"adverName":{"type":"string","id":33},"adverPageUrl":{"type":"string","id":34},"videoBarrage":{"rule":"repeated","type":"string","id":35},"adTagStyle":{"type":"AdBusinessMarkDto","id":36},"video":{"type":"AdAutoPlayVideoDto","id":37},"feedbackPanel":{"type":"AdFeedbackPanelDto","id":38},"adverMid":{"type":"int64","id":39},"adverAccountId":{"type":"int64","id":40},"duration":{"type":"string","id":41},"qualityInfos":{"rule":"repeated","type":"QualityInfo","id":42},"dynamicText":{"type":"string","id":43},"adver":{"type":"AdverDto","id":44},"gradeLevel":{"type":"int32","id":45},"supportTransition":{"type":"bool","id":46},"transition":{"type":"string","id":47},"underPlayerInteractionStyle":{"type":"int32","id":48},"imaxLandingPageV2":{"type":"string","id":49},"subcardModule":{"type":"SubCardModule","id":50},"gradeDenominator":{"type":"int32","id":51},"starLevel":{"type":"int32","id":52}}},"SubCardModule":{"fields":{"subcardType":{"type":"string","id":1},"icon":{"type":"string","id":2},"desc":{"type":"string","id":3},"rankStars":{"type":"string","id":4},"amountNumber":{"type":"string","id":5},"avatar":{"type":"string","id":6},"title":{"type":"string","id":7},"button":{"type":"AdButtonDto","id":8},"tagInfos":{"rule":"repeated","type":"TagInfo","id":9}}},"TagInfo":{"fields":{"text":{"type":"string","id":1},"textColor":{"type":"string","id":2},"textColorNight":{"type":"string","id":3},"bgColor":{"type":"string","id":4},"bgColorNight":{"type":"string","id":5},"borderColor":{"type":"string","id":6},"borderColorNight":{"type":"string","id":7},"type":{"type":"string","id":8}}},"AdContentExtraDto":{"fields":{"layout":{"type":"string","id":1},"showUrls":{"rule":"repeated","type":"string","id":2},"clickUrls":{"rule":"repeated","type":"string","id":3},"danmuListShowUrls":{"rule":"repeated","type":"string","id":4},"danmuListClickUrls":{"rule":"repeated","type":"string","id":5},"danmuDetailShowUrls":{"rule":"repeated","type":"string","id":6},"danmuTrolleyAddUrls":{"rule":"repeated","type":"string","id":7},"useAdWebV2":{"type":"bool","id":8},"openWhitelist":{"rule":"repeated","type":"string","id":9},"downloadWhitelist":{"rule":"repeated","type":"AppPackageDto","id":10},"card":{"type":"AdCardDto","id":11},"reportTime":{"type":"int32","id":12},"appstorePriority":{"type":"int32","id":13},"salesType":{"type":"int32","id":14},"preloadLandingpage":{"type":"int32","id":15},"specialIndustry":{"type":"bool","id":16},"specialIndustryTips":{"type":"string","id":17},"enableDownloadDialog":{"type":"bool","id":18},"enableShare":{"type":"bool","id":19},"upzoneEntranceType":{"type":"int32","id":20},"upzoneEntranceReportId":{"type":"int32","id":21},"shareInfo":{"type":"AdShareInfoDto","id":22},"topviewPicUrl":{"type":"string","id":23},"topviewVideoUrl":{"type":"string","id":24},"clickArea":{"type":"int32","id":25},"shopId":{"type":"int64","id":26},"upMid":{"type":"int64","id":27},"trackId":{"type":"string","id":28},"enableStoreDirectLaunch":{"type":"int32","id":29},"productId":{"type":"int64","id":30},"enableDoubleJump":{"type":"bool","id":31},"show1SUrls":{"rule":"repeated","type":"string","id":32},"fromTrackId":{"type":"string","id":33},"storeCallupCard":{"type":"bool","id":34},"landingpageDownloadStyle":{"type":"int32","id":35},"specialIndustryStyle":{"type":"int32","id":36},"enableH5Alert":{"type":"bool","id":37},"macroReplacePriority":{"type":"int32","id":38},"feedbackPanelStyle":{"type":"int32","id":39},"appstoreUrl":{"type":"string","id":40}}},"AdCoverDto":{"fields":{"url":{"type":"string","id":1},"loop":{"type":"int32","id":2},"jumpUrl":{"type":"string","id":3},"reportUrls":{"rule":"repeated","type":"string","id":4},"imageHeight":{"type":"int32","id":5},"imageWidth":{"type":"int32","id":6}}},"AdDto":{"fields":{"creativeId":{"type":"int64","id":1},"adCb":{"type":"string","id":2},"extra":{"type":"AdContentExtraDto","id":3},"cmMark":{"type":"int32","id":4},"topViewId":{"type":"int64","id":5},"creativeType":{"type":"int32","id":6},"cardType":{"type":"int32","id":7},"creativeStyle":{"type":"int32","id":8},"isAd":{"type":"bool","id":9},"creativeContent":{"type":"CreativeDto","id":10}}},"AdFeedbackPanelDto":{"fields":{"panelTypeText":{"type":"string","id":1},"feedbackPanelDetail":{"rule":"repeated","type":"AdFeedbackPanelModuleDto","id":2},"toast":{"type":"string","id":3},"openRecTips":{"type":"string","id":4},"closeRecTips":{"type":"string","id":5}}},"AdFeedbackPanelModuleDto":{"fields":{"moduleId":{"type":"int32","id":1},"iconUrl":{"type":"string","id":2},"jumpType":{"type":"int32","id":3},"jumpUrl":{"type":"string","id":4},"text":{"type":"string","id":5},"secondaryPanel":{"rule":"repeated","type":"AdSecondFeedbackPanelDto","id":6},"subText":{"type":"string","id":7}}},"AdGoodDto":{"fields":{"itemId":{"type":"int64","id":1},"skuId":{"type":"int64","id":2},"shopId":{"type":"int64","id":3},"skuNum":{"type":"int64","id":4}}},"AdSecondFeedbackPanelDto":{"fields":{"reasonId":{"type":"int32","id":1},"text":{"type":"string","id":2}}},"AdShareInfoDto":{"fields":{"title":{"type":"string","id":1},"subtitle":{"type":"string","id":2},"imageUrl":{"type":"string","id":3}}},"AdverDto":{"fields":{"adverId":{"type":"int64","id":1},"adverLogo":{"type":"string","id":2},"adverName":{"type":"string","id":3},"adverType":{"type":"int32","id":4},"adverPageUrl":{"type":"string","id":5},"adverDesc":{"type":"string","id":6}}},"AppPackageDto":{"fields":{"size":{"type":"int64","id":1},"displayName":{"type":"string","id":2},"apkName":{"type":"string","id":3},"url":{"type":"string","id":4},"biliUrl":{"type":"string","id":5},"md5":{"type":"string","id":6},"icon":{"type":"string","id":7},"devName":{"type":"string","id":8},"authUrl":{"type":"string","id":9},"authName":{"type":"string","id":10},"version":{"type":"string","id":11},"updateTime":{"type":"string","id":12},"privacyName":{"type":"string","id":13},"privacyUrl":{"type":"string","id":14}}},"CreativeDto":{"fields":{"title":{"type":"string","id":1},"description":{"type":"string","id":2},"imageUrl":{"type":"string","id":3},"imageMd5":{"type":"string","id":4},"url":{"type":"string","id":5},"clickUrl":{"type":"string","id":6},"showUrl":{"type":"string","id":7},"videoId":{"type":"int64","id":8},"thumbnailUrl":{"type":"string","id":9},"thumbnailUrlMd5":{"type":"string","id":10},"logoUrl":{"type":"string","id":11},"logoMd5":{"type":"string","id":12},"username":{"type":"string","id":13}}},"QualityInfo":{"fields":{"icon":{"type":"string","id":1},"text":{"type":"string","id":2},"isBg":{"type":"bool","id":3},"bgColor":{"type":"string","id":4},"bgColorNight":{"type":"string","id":5}}},"SourceContentDto":{"fields":{"requestId":{"type":"string","id":1},"sourceId":{"type":"int32","id":2},"resourceId":{"type":"int32","id":3},"isAdLoc":{"type":"bool","id":4},"serverType":{"type":"google.protobuf.Int32Value","id":5},"clientIp":{"type":"string","id":6},"cardIndex":{"type":"google.protobuf.Int32Value","id":7},"index":{"type":"int32","id":8},"adContent":{"type":"AdDto","id":9}}},"AdsControlDto":{"fields":{"hasDanmu":{"type":"int32","id":1},"cids":{"rule":"repeated","type":"int64","id":2},"eps":{"rule":"repeated","type":"AdOgvEpDto","id":3}}},"AdOgvEpDto":{"fields":{"epid":{"type":"int64","id":1},"hasRecommend":{"type":"bool","id":2}}}}}}},"app":{"nested":{"archive":{"nested":{"v1":{"options":{"java_package":"com.smile.bilibili.model"},"nested":{"Arc":{"fields":{"aid":{"type":"int64","id":1},"videos":{"type":"int64","id":2},"typeId":{"type":"int32","id":3},"typeName":{"type":"string","id":4},"copyright":{"type":"int32","id":5},"pic":{"type":"string","id":6},"title":{"type":"string","id":7},"pubdate":{"type":"int64","id":8},"ctime":{"type":"int64","id":9},"desc":{"type":"string","id":10},"state":{"type":"int32","id":11},"access":{"type":"int32","id":12},"attribute":{"type":"int32","id":13},"tag":{"type":"string","id":14},"tags":{"rule":"repeated","type":"string","id":15},"duration":{"type":"int64","id":16},"missionId":{"type":"int64","id":17},"orderId":{"type":"int64","id":18},"redirectUrl":{"type":"string","id":19},"forward":{"type":"int64","id":20},"rights":{"type":"Rights","id":21},"author":{"type":"Author","id":22},"stat":{"type":"Stat","id":23},"reportResult":{"type":"string","id":24},"dynamic":{"type":"string","id":25},"firstCid":{"type":"int64","id":26},"dimension":{"type":"Dimension","id":27},"staffInfo":{"rule":"repeated","type":"StaffInfo","id":28},"seasonId":{"type":"int64","id":29},"attributeV2":{"type":"int64","id":30}}},"Rights":{"fields":{"bp":{"type":"int32","id":1},"elec":{"type":"int32","id":2},"download":{"type":"int32","id":3},"movie":{"type":"int32","id":4},"pay":{"type":"int32","id":5},"hd5":{"type":"int32","id":6},"noReprint":{"type":"int32","id":7},"autoplay":{"type":"int32","id":8},"ugcPay":{"type":"int32","id":9},"isCooperation":{"type":"int32","id":10},"ugcPayPreview":{"type":"int32","id":11},"noBackground":{"type":"int32","id":12}}},"Author":{"fields":{"mid":{"type":"int64","id":1},"name":{"type":"string","id":2},"face":{"type":"string","id":3}}},"Stat":{"fields":{"aid":{"type":"int64","id":1},"view":{"type":"int32","id":2},"danmaku":{"type":"int32","id":3},"reply":{"type":"int32","id":4},"fav":{"type":"int32","id":5},"coin":{"type":"int32","id":6},"share":{"type":"int32","id":7},"nowRank":{"type":"int32","id":8},"hisRank":{"type":"int32","id":9},"like":{"type":"int32","id":10},"dislike":{"type":"int32","id":11}}},"StaffInfo":{"fields":{"mid":{"type":"int64","id":1},"title":{"type":"string","id":2},"attribute":{"type":"int64","id":3}}},"Dimension":{"fields":{"width":{"type":"int64","id":1},"height":{"type":"int64","id":2},"rotate":{"type":"int64","id":3}}},"Page":{"fields":{"cid":{"type":"int64","id":1},"page":{"type":"int32","id":2},"from":{"type":"string","id":3},"part":{"type":"string","id":4},"duration":{"type":"int64","id":5},"vid":{"type":"string","id":6},"desc":{"type":"string","id":7},"webLink":{"type":"string","id":8},"dimension":{"type":"Dimension","id":9}}}}}}},"dynamic":{"nested":{"v2":{"options":{"java_package":"com.smile.bilibili.model"},"nested":{"AdditionalButton":{"fields":{"type":{"type":"int32","id":1},"jumpStyle":{"type":"AdditionalButtonStyle","id":2},"jumpUrl":{"type":"string","id":3},"uncheck":{"type":"AdditionalButtonStyle","id":4},"check":{"type":"AdditionalButtonStyle","id":5},"status":{"type":"int32","id":6},"clickType":{"type":"int32","id":7}}},"AdditionalButtonInteractive":{"fields":{"popups":{"type":"string","id":1},"confirm":{"type":"string","id":2},"cancel":{"type":"string","id":3},"desc":{"type":"string","id":4}}},"AdditionalButtonStyle":{"fields":{"icon":{"type":"string","id":1},"text":{"type":"string","id":2},"interactive":{"type":"AdditionalButtonInteractive","id":3},"bgStyle":{"type":"int32","id":4},"toast":{"type":"string","id":5},"disable":{"type":"int32","id":6},"share":{"type":"AdditionalButtonShare","id":7}}},"AdditionalButtonShare":{"fields":{"show":{"type":"int32","id":1},"icon":{"type":"string","id":2},"text":{"type":"string","id":3}}},"AdditionalPGC":{"fields":{"headText":{"type":"string","id":1},"title":{"type":"string","id":2},"imageUrl":{"type":"string","id":3},"descText1":{"type":"string","id":4},"descText2":{"type":"string","id":5},"url":{"type":"string","id":6},"button":{"type":"AdditionalButton","id":7},"headIcon":{"type":"string","id":8},"style":{"type":"int32","id":9},"type":{"type":"string","id":10}}},"AdditionalType":{"values":{"additional_none":0,"additional_type_pgc":1,"additional_type_goods":2,"additional_type_vote":3,"additional_type_common":4,"additional_type_esport":5,"additional_type_up_rcmd":6,"additional_type_ugc":7,"additional_type_up_reservation":8}},"AdditionCommon":{"fields":{"headText":{"type":"string","id":1},"title":{"type":"string","id":2},"imageUrl":{"type":"string","id":3},"descText1":{"type":"string","id":4},"descText2":{"type":"string","id":5},"url":{"type":"string","id":6},"button":{"type":"AdditionalButton","id":7},"headIcon":{"type":"string","id":8},"style":{"type":"int32","id":9},"type":{"type":"string","id":10},"cardType":{"type":"string","id":11}}},"AdditionEsport":{"oneofs":{"item":{"oneof":["additionEsportMoba"]}},"fields":{"style":{"type":"EspaceStyle","id":1},"additionEsportMoba":{"type":"AdditionEsportMoba","id":2},"type":{"type":"string","id":3},"cardType":{"type":"string","id":4}}},"AdditionEsportMoba":{"fields":{"headText":{"type":"string","id":1},"title":{"type":"string","id":2},"matchTeam":{"rule":"repeated","type":"MatchTeam","id":3},"additionEsportMobaStatus":{"type":"AdditionEsportMobaStatus","id":4},"uri":{"type":"string","id":5},"button":{"type":"AdditionalButton","id":6},"subTitle":{"type":"string","id":7},"type":{"type":"string","id":10},"cardType":{"type":"string","id":11},"headIcon":{"type":"string","id":12}}},"AdditionEsportMobaStatus":{"fields":{"additionEsportMobaStatusDesc":{"rule":"repeated","type":"AdditionEsportMobaStatusDesc","id":1},"title":{"type":"string","id":2},"status":{"type":"int32","id":3},"color":{"type":"string","id":4},"nightColor":{"type":"string","id":5}}},"AdditionEsportMobaStatusDesc":{"fields":{"title":{"type":"string","id":1},"color":{"type":"string","id":2},"nightColor":{"type":"string","id":3}}},"AdditionGoods":{"fields":{"rcmdDesc":{"type":"string","id":1},"goodsItems":{"rule":"repeated","type":"GoodsItem","id":2},"cardType":{"type":"string","id":3},"icon":{"type":"string","id":4},"uri":{"type":"string","id":5},"sourceType":{"type":"int32","id":6}}},"AdditionUgc":{"fields":{"headText":{"type":"string","id":1},"title":{"type":"string","id":2},"cover":{"type":"string","id":3},"descText1":{"type":"string","id":4},"descText2":{"type":"string","id":5},"uri":{"type":"string","id":6},"duration":{"type":"string","id":7},"lineFeed":{"type":"bool","id":8},"cardType":{"type":"string","id":9}}},"AdditionUP":{"fields":{"title":{"type":"string","id":1},"descText1":{"type":"HighlightText","id":2},"descText2":{"type":"string","id":3},"url":{"type":"string","id":4},"button":{"type":"AdditionalButton","id":5},"cardType":{"type":"string","id":6},"reserveTotal":{"type":"int64","id":7},"actSkin":{"type":"AdditionalActSkin","id":8},"rid":{"type":"int64","id":9},"lotteryType":{"type":"int32","id":10},"descText3":{"type":"HighlightText","id":11},"upMid":{"type":"int64","id":12},"userInfo":{"type":"AdditionUserInfo","id":13},"dynamicId":{"type":"string","id":14},"showText2":{"type":"bool","id":15},"dynType":{"type":"int64","id":16},"businessId":{"type":"string","id":17}}},"AdditionalActSkin":{"fields":{"svga":{"type":"string","id":1},"lastImage":{"type":"string","id":2},"playTimes":{"type":"int64","id":3}}},"AdditionUserInfo":{"fields":{"name":{"type":"string","id":1},"face":{"type":"string","id":2}}},"AdditionVote":{"fields":{"imageUrl":{"type":"string","id":1},"title":{"type":"string","id":2},"text1":{"type":"string","id":3},"buttonText":{"type":"string","id":4},"url":{"type":"string","id":5}}},"AdditionVote2":{"oneofs":{"item":{"oneof":["additionVoteWord","additionVotePic","additionVoteDefaule"]}},"fields":{"additionVoteType":{"type":"AdditionVoteType","id":1},"voteId":{"type":"int64","id":2},"title":{"type":"string","id":3},"label":{"type":"string","id":4},"deadline":{"type":"int64","id":5},"openText":{"type":"string","id":6},"closeText":{"type":"string","id":7},"votedText":{"type":"string","id":8},"state":{"type":"AdditionVoteState","id":9},"additionVoteWord":{"type":"AdditionVoteWord","id":10},"additionVotePic":{"type":"AdditionVotePic","id":11},"additionVoteDefaule":{"type":"AdditionVoteDefaule","id":12},"bizType":{"type":"int32","id":13},"total":{"type":"int64","id":14},"cardType":{"type":"string","id":15},"tips":{"type":"string","id":16},"uri":{"type":"string","id":17},"isVoted":{"type":"bool","id":18},"choiceCnt":{"type":"int32","id":19},"defauleSelectShare":{"type":"bool","id":20}}},"AdditionVoteDefaule":{"fields":{"cover":{"rule":"repeated","type":"string","id":1}}},"AdditionVotePic":{"fields":{"item":{"rule":"repeated","type":"AdditionVotePicItem","id":1}}},"AdditionVotePicItem":{"fields":{"optIdx":{"type":"int32","id":1},"cover":{"type":"string","id":2},"isVote":{"type":"bool","id":3},"total":{"type":"int32","id":4},"persent":{"type":"double","id":5},"title":{"type":"string","id":6},"isMaxOption":{"type":"bool","id":7}}},"AdditionVoteState":{"values":{"addition_vote_state_none":0,"addition_vote_state_open":1,"addition_vote_state_close":2}},"AdditionVoteType":{"values":{"addition_vote_type_none":0,"addition_vote_type_word":1,"addition_vote_type_pic":2,"addition_vote_type_default":3}},"AdditionVoteWord":{"fields":{"item":{"rule":"repeated","type":"AdditionVoteWordItem","id":1}}},"AdditionVoteWordItem":{"fields":{"optIdx":{"type":"int32","id":1},"title":{"type":"string","id":2},"isVote":{"type":"bool","id":3},"total":{"type":"int32","id":4},"persent":{"type":"double","id":5},"isMaxOption":{"type":"bool","id":6}}},"CardVideoUpList":{"fields":{"title":{"type":"string","id":1},"list":{"rule":"repeated","type":"UpListItem","id":2},"footprint":{"type":"string","id":3},"showLiveNum":{"type":"int32","id":4},"moreLabel":{"type":"UpListMoreLabel","id":5},"titleSwitch":{"type":"int32","id":6},"showMoreLabel":{"type":"bool","id":7},"showInPersonal":{"type":"bool","id":8},"showMoreButton":{"type":"bool","id":9}}},"CmtShowItem":{"fields":{"uid":{"type":"int64","id":1},"uname":{"type":"string","id":2},"uri":{"type":"string","id":3},"comment":{"type":"string","id":4}}},"DecoCardFan":{"fields":{"isFan":{"type":"int32","id":1},"number":{"type":"int32","id":2},"numberStr":{"type":"string","id":3},"color":{"type":"string","id":4}}},"DecorateCard":{"fields":{"id":{"type":"int64","id":1},"cardUrl":{"type":"string","id":2},"jumpUrl":{"type":"string","id":3},"fan":{"type":"DecoCardFan","id":4}}},"Description":{"fields":{"text":{"type":"string","id":1},"type":{"type":"int32","id":2},"uri":{"type":"string","id":3},"emojiType":{"type":"int32","id":4},"goodsType":{"type":"string","id":5},"iconUrl":{"type":"string","id":6},"iconName":{"type":"string","id":7},"rid":{"type":"string","id":8},"goods":{"type":"ModuleDescGoods","id":9},"origText":{"type":"string","id":10},"emojiSize":{"type":"int32","id":11}}},"Dimension":{"fields":{"height":{"type":"int64","id":1},"width":{"type":"int64","id":2},"rotate":{"type":"int64","id":3}}},"DynAllReply":{"fields":{"dynamicList":{"type":"DynamicList","id":1},"upList":{"type":"CardVideoUpList","id":2},"topicList":{"type":"TopicList","id":3},"unfollow":{"type":"Unfollow","id":4},"regionRcmd":{"type":"DynRegionRcmd","id":5}}},"DynRegionRcmd":{"fields":{"items":{"rule":"repeated","type":"DynRegionRcmdItem","id":1},"opts":{"type":"RcmdOption","id":2}}},"RcmdOption":{"fields":{"showTitle":{"type":"bool","id":1}}},"DynRegionRcmdItem":{"fields":{"rid":{"type":"int64","id":1},"title":{"type":"string","id":2},"items":{"rule":"repeated","type":"ModuleRcmd","id":3}}},"ModuleRcmd":{"fields":{"author":{"type":"RcmdAuthor","id":1},"items":{"rule":"repeated","type":"RcmdItem","id":2},"serverInfo":{"type":"string","id":3}}},"RcmdAuthor":{"fields":{"author":{"type":"UserInfo","id":1},"desc":{"type":"string","id":2},"relation":{"type":"Relation","id":3}}},"RcmdItem":{"oneofs":{"item":{"oneof":["rcmdArchive"]}},"fields":{"type":{"type":"RcmdType","id":1},"rcmdArchive":{"type":"RcmdArchive","id":2}}},"RcmdArchive":{"fields":{"title":{"type":"string","id":1},"cover":{"type":"string","id":2},"coverLeftIcon1":{"type":"int32","id":3},"coverLeftText1":{"type":"string","id":4},"uri":{"type":"string","id":5},"isPgc":{"type":"bool","id":6},"aid":{"type":"int64","id":7},"badge":{"type":"IconBadge","id":8},"coverLeftIcon2":{"type":"int32","id":9},"coverLeftText2":{"type":"string","id":10},"coverLeftIcon3":{"type":"int32","id":11},"coverLeftText3":{"type":"string","id":12}}},"IconBadge":{"fields":{"iconBgUrl":{"type":"string","id":1},"text":{"type":"string","id":2}}},"RcmdType":{"values":{"rcmd_archive":0,"rcmd_dynamic":1}},"DynamicItem":{"fields":{"cardType":{"type":"int32","id":1},"itemType":{"type":"int32","id":2},"modules":{"rule":"repeated","type":"Module","id":3},"extend":{"type":"Extend","id":4},"hasFold":{"type":"int32","id":5},"serverInfo":{"type":"string","id":6}}},"DynamicList":{"fields":{"list":{"rule":"repeated","type":"DynamicItem","id":1},"updateNum":{"type":"int64","id":2},"historyOffset":{"type":"string","id":3},"updateBaseline":{"type":"string","id":4},"hasMore":{"type":"bool","id":5}}},"DynExtendType":{"values":{"dyn_ext_type_none":0,"dyn_ext_type_topic":1,"dyn_ext_type_lbs":2,"dyn_ext_type_hot":3,"dyn_ext_type_game":4,"dyn_ext_type_common":5,"dyn_ext_type_biliCut":6,"dyn_ext_type_ogv":7,"dyn_ext_type_auto_ogv":8}},"DynModuleType":{"values":{"module_none":0,"module_author":1,"module_dispute":2,"module_desc":3,"module_dynamic":4,"module_forward":5,"module_likeUser":6,"module_extend":7,"module_additional":8,"module_stat":9,"module_fold":10,"module_comment":11,"module_interaction":12,"module_author_forward":13,"module_ad":14,"module_banner":15,"module_item_null":16,"module_share_info":17,"module_recommend":18,"module_stat_forward":19,"module_top":20,"module_bottom":21,"module_story":22,"module_topic":23,"module_topic_details_ext":24,"module_top_tag":25}},"EspaceStyle":{"values":{"moba":0}},"Extend":{"fields":{"dynIdStr":{"type":"string","id":1},"businessId":{"type":"string","id":2},"origDynIdStr":{"type":"string","id":3},"origName":{"type":"string","id":4},"origImgUrl":{"type":"string","id":5},"origDesc":{"rule":"repeated","type":"Description","id":6},"desc":{"rule":"repeated","type":"Description","id":7},"origDynType":{"type":"int32","id":8},"shareType":{"type":"string","id":9},"shareScene":{"type":"string","id":10},"isFastShare":{"type":"bool","id":11},"rType":{"type":"int32","id":12},"dynType":{"type":"int64","id":13},"uid":{"type":"int64","id":14},"cardUrl":{"type":"string","id":15},"sourceContent":{"type":"google.protobuf.Any","id":16},"origFace":{"type":"string","id":17},"reply":{"type":"ExtendReply","id":18}}},"ExtendReply":{"fields":{"uri":{"type":"string","id":1},"params":{"rule":"repeated","type":"ExtendReplyParam","id":2}}},"ExtendReplyParam":{"fields":{"key":{"type":"string","id":1},"value":{"type":"string","id":2}}},"ExtInfoCommon":{"fields":{"title":{"type":"string","id":1},"uri":{"type":"string","id":2},"icon":{"type":"string","id":3},"poiType":{"type":"int32","id":4},"type":{"type":"int32","id":5},"subModule":{"type":"string","id":6},"actionText":{"type":"string","id":7},"actionUrl":{"type":"string","id":8},"rid":{"type":"int64","id":9},"isShowLight":{"type":"bool","id":10}}},"ExtInfoGame":{"fields":{"title":{"type":"string","id":1},"uri":{"type":"string","id":2},"icon":{"type":"string","id":3}}},"ExtInfoHot":{"fields":{"title":{"type":"string","id":1},"uri":{"type":"string","id":2},"icon":{"type":"string","id":3}}},"ExtInfoLBS":{"fields":{"title":{"type":"string","id":1},"uri":{"type":"string","id":2},"icon":{"type":"string","id":3},"poiType":{"type":"int32","id":4}}},"ExtInfoOGV":{"fields":{"infoOgv":{"rule":"repeated","type":"InfoOGV","id":1}}},"ExtInfoTopic":{"fields":{"title":{"type":"string","id":1},"uri":{"type":"string","id":2},"icon":{"type":"string","id":3}}},"GoodsItem":{"fields":{"cover":{"type":"string","id":1},"schemaPackageName":{"type":"string","id":2},"sourceType":{"type":"int32","id":3},"jumpUrl":{"type":"string","id":4},"jumpDesc":{"type":"string","id":5},"title":{"type":"string","id":6},"brief":{"type":"string","id":7},"price":{"type":"string","id":8},"itemId":{"type":"int64","id":9},"schemaUrl":{"type":"string","id":10},"openWhiteList":{"rule":"repeated","type":"string","id":11},"userWebV2":{"type":"bool","id":12},"adMark":{"type":"string","id":13}}},"HighlightText":{"fields":{"text":{"type":"string","id":1},"textStyle":{"type":"int32","id":2},"jumpUrl":{"type":"string","id":3},"icon":{"type":"string","id":4}}},"InfoOGV":{"fields":{"title":{"type":"string","id":1},"uri":{"type":"string","id":2},"icon":{"type":"string","id":3},"subModule":{"type":"string","id":4}}},"InteractionItem":{"fields":{"iconType":{"type":"int32","id":1},"desc":{"rule":"repeated","type":"Description","id":2},"uri":{"type":"string","id":3},"dynamicId":{"type":"string","id":4},"commentMid":{"type":"int64","id":6},"faces":{"rule":"repeated","type":"InteractionFace","id":7},"stat":{"type":"InteractionStat","id":8},"icon":{"type":"string","id":9}}},"InteractionFace":{"fields":{"mid":{"type":"int64","id":1},"face":{"type":"string","id":2}}},"InteractionStat":{"fields":{"like":{"type":"int64","id":1}}},"LikeAnimation":{"fields":{"begin":{"type":"string","id":1},"proc":{"type":"string","id":2},"end":{"type":"string","id":3},"likeIconId":{"type":"int64","id":4}}},"LikeInfo":{"fields":{"animation":{"type":"LikeAnimation","id":1},"isLike":{"type":"bool","id":2}}},"LikeUser":{"fields":{"uid":{"type":"int64","id":1},"uname":{"type":"string","id":2},"uri":{"type":"string","id":3}}},"LiveInfo":{"fields":{"isLiving":{"type":"int32","id":1},"uri":{"type":"string","id":2},"liveState":{"type":"int32","id":3}}},"MatchTeam":{"fields":{"id":{"type":"int64","id":1},"name":{"type":"string","id":2},"cover":{"type":"string","id":3},"color":{"type":"string","id":4},"nightColor":{"type":"string","id":5}}},"MdlDynApplet":{"fields":{"id":{"type":"int64","id":1},"uri":{"type":"string","id":2},"title":{"type":"string","id":4},"subTitle":{"type":"string","id":5},"cover":{"type":"string","id":6},"icon":{"type":"string","id":7},"label":{"type":"string","id":8},"buttonTitle":{"type":"string","id":9}}},"MdlDynArchive":{"fields":{"title":{"type":"string","id":1},"cover":{"type":"string","id":2},"uri":{"type":"string","id":3},"coverLeftText1":{"type":"string","id":4},"coverLeftText2":{"type":"string","id":5},"coverLeftText3":{"type":"string","id":6},"avid":{"type":"int64","id":7},"cid":{"type":"int64","id":8},"mediaType":{"type":"int32","id":9},"dimension":{"type":"Dimension","id":10},"badge":{"rule":"repeated","type":"VideoBadge","id":11},"canPlay":{"type":"bool","id":12},"stype":{"type":"int32","id":13},"isPGC":{"type":"bool","id":14},"inlineURL":{"type":"string","id":15},"episodeId":{"type":"int64","id":16},"subType":{"type":"int32","id":17},"pgcSeasonId":{"type":"int64","id":18},"playIcon":{"type":"string","id":19},"duration":{"type":"int64","id":20},"jumpUrl":{"type":"string","id":21},"isPreview":{"type":"bool","id":22},"badgeCategory":{"rule":"repeated","type":"VideoBadge","id":23},"isFeature":{"type":"bool","id":24},"reserveType":{"type":"int32","id":25},"bvid":{"type":"string","id":26},"view":{"type":"int32","id":27}}},"MdlDynArticle":{"fields":{"id":{"type":"int64","id":1},"uri":{"type":"string","id":2},"title":{"type":"string","id":3},"desc":{"type":"string","id":4},"covers":{"rule":"repeated","type":"string","id":5},"label":{"type":"string","id":6},"templateID":{"type":"int32","id":7}}},"MdlDynCommon":{"fields":{"oid":{"type":"int64","id":1},"uri":{"type":"string","id":2},"title":{"type":"string","id":3},"desc":{"type":"string","id":4},"cover":{"type":"string","id":5},"label":{"type":"string","id":6},"bizType":{"type":"int32","id":7},"sketchID":{"type":"int64","id":8},"style":{"type":"int32","id":9},"badge":{"rule":"repeated","type":"VideoBadge","id":10},"button":{"type":"AdditionalButton","id":11}}},"MdlDynCourBatch":{"fields":{"title":{"type":"string","id":1},"cover":{"type":"string","id":2},"uri":{"type":"string","id":3},"text1":{"type":"string","id":4},"text2":{"type":"string","id":5},"badge":{"type":"VideoBadge","id":6},"playIcon":{"type":"string","id":7}}},"MdlDynCourSeason":{"fields":{"title":{"type":"string","id":1},"cover":{"type":"string","id":2},"uri":{"type":"string","id":3},"text1":{"type":"string","id":4},"desc":{"type":"string","id":5},"badge":{"type":"VideoBadge","id":6},"playIcon":{"type":"string","id":7}}},"MdlDynDraw":{"fields":{"items":{"rule":"repeated","type":"MdlDynDrawItem","id":1},"uri":{"type":"string","id":2},"id":{"type":"int64","id":3}}},"MdlDynDrawItem":{"fields":{"src":{"type":"string","id":1},"width":{"type":"int64","id":2},"height":{"type":"int64","id":3},"size":{"type":"float","id":4},"tags":{"rule":"repeated","type":"MdlDynDrawTag","id":5}}},"MdlDynDrawTag":{"fields":{"type":{"type":"int32","id":1},"item":{"type":"MdlDynDrawTagItem","id":2}}},"MdlDynDrawTagItem":{"fields":{"url":{"type":"string","id":1},"text":{"type":"string","id":2},"x":{"type":"int64","id":3},"y":{"type":"int64","id":4},"orientation":{"type":"int32","id":5},"source":{"type":"int32","id":6},"itemId":{"type":"int64","id":7},"mid":{"type":"int64","id":8},"tid":{"type":"int64","id":9},"poi":{"type":"string","id":10},"schemaUrl":{"type":"string","id":11}}},"MdlDynForward":{"fields":{"item":{"type":"DynamicItem","id":1},"rtype":{"type":"int32","id":2}}},"MdlDynLive":{"fields":{"id":{"type":"int64","id":1},"uri":{"type":"string","id":2},"title":{"type":"string","id":3},"cover":{"type":"string","id":4},"coverLabel":{"type":"string","id":5},"coverLabel2":{"type":"string","id":6},"liveState":{"type":"int32","id":7},"badge":{"type":"VideoBadge","id":8},"reserveType":{"type":"int32","id":9}}},"MdlDynLiveRcmd":{"fields":{"content":{"type":"string","id":1},"reserveType":{"type":"int32","id":2},"pendant":{"type":"LivePendant","id":3}}},"LivePendant":{"fields":{"text":{"type":"string","id":1},"icon":{"type":"string","id":2},"pendantId":{"type":"int64","id":3}}},"MdlDynMedialist":{"fields":{"id":{"type":"int64","id":1},"uri":{"type":"string","id":2},"title":{"type":"string","id":3},"subTitle":{"type":"string","id":4},"cover":{"type":"string","id":5},"coverType":{"type":"int32","id":6},"badge":{"type":"VideoBadge","id":7}}},"MdlDynMusic":{"fields":{"id":{"type":"int64","id":1},"uri":{"type":"string","id":2},"upId":{"type":"int64","id":3},"title":{"type":"string","id":4},"cover":{"type":"string","id":5},"label1":{"type":"string","id":6},"upper":{"type":"string","id":7}}},"MdlDynPGC":{"fields":{"title":{"type":"string","id":1},"cover":{"type":"string","id":2},"uri":{"type":"string","id":3},"coverLeftText1":{"type":"string","id":4},"coverLeftText2":{"type":"string","id":5},"coverLeftText3":{"type":"string","id":6},"cid":{"type":"int64","id":7},"seasonId":{"type":"int64","id":8},"epid":{"type":"int64","id":9},"aid":{"type":"int64","id":10},"mediaType":{"type":"int32","id":11},"subType":{"type":"int32","id":12},"isPreview":{"type":"bool","id":13},"dimension":{"type":"Dimension","id":14},"badge":{"rule":"repeated","type":"VideoBadge","id":15},"canPlay":{"type":"bool","id":16},"season":{"type":"PGCSeason","id":17},"playIcon":{"type":"string","id":18},"duration":{"type":"int64","id":19},"jumpUrl":{"type":"string","id":20},"badgeCategory":{"rule":"repeated","type":"VideoBadge","id":21},"isFeature":{"type":"bool","id":22}}},"MdlDynSubscription":{"fields":{"id":{"type":"int64","id":1},"adId":{"type":"int64","id":2},"uri":{"type":"string","id":3},"title":{"type":"string","id":4},"cover":{"type":"string","id":5},"adTitle":{"type":"string","id":6},"badge":{"type":"VideoBadge","id":7},"tips":{"type":"string","id":8}}},"MdlDynSubscriptionNew":{"oneofs":{"item":{"oneof":["dynSubscription","dynLiveRcmd"]}},"fields":{"style":{"type":"MdlDynSubscriptionNewStyle","id":1},"dynSubscription":{"type":"MdlDynSubscription","id":2},"dynLiveRcmd":{"type":"MdlDynLiveRcmd","id":3}}},"MdlDynSubscriptionNewStyle":{"values":{"mdl_dyn_subscription_new_style_nont":0,"mdl_dyn_subscription_new_style_live":1,"mdl_dyn_subscription_new_style_draw":2}},"MdlDynUGCSeason":{"fields":{"title":{"type":"string","id":1},"cover":{"type":"string","id":2},"uri":{"type":"string","id":3},"coverLeftText1":{"type":"string","id":4},"coverLeftText2":{"type":"string","id":5},"coverLeftText3":{"type":"string","id":6},"id":{"type":"int64","id":7},"inlineURL":{"type":"string","id":8},"canPlay":{"type":"bool","id":9},"playIcon":{"type":"string","id":10},"avid":{"type":"int64","id":11},"cid":{"type":"int64","id":12},"dimension":{"type":"Dimension","id":13},"duration":{"type":"int64","id":14},"jumpUrl":{"type":"string","id":15}}},"Module":{"oneofs":{"moduleItem":{"oneof":["moduleAuthor","moduleDispute","moduleDesc","moduleDynamic","moduleLikeUser","moduleExtend","moduleAdditional","moduleStat","moduleFold","moduleComment","moduleInteraction","moduleAuthorForward","moduleAd","moduleBanner","moduleItemNull","moduleShareInfo","moduleRecommend","moduleTop","moduleButtom","moduleStat1","moduleStory","moduleTopic","moduleTopicDetailsExt","moduleTopTag"]}},"fields":{"moduleType":{"type":"DynModuleType","id":1},"moduleAuthor":{"type":"ModuleAuthor","id":2},"moduleDispute":{"type":"ModuleDispute","id":3},"moduleDesc":{"type":"ModuleDesc","id":4},"moduleDynamic":{"type":"ModuleDynamic","id":5},"moduleLikeUser":{"type":"ModuleLikeUser","id":6},"moduleExtend":{"type":"ModuleExtend","id":7},"moduleAdditional":{"type":"ModuleAdditional","id":8},"moduleStat":{"type":"ModuleStat","id":9},"moduleFold":{"type":"ModuleFold","id":10},"moduleComment":{"type":"ModuleComment","id":11},"moduleInteraction":{"type":"ModuleInteraction","id":12},"moduleAuthorForward":{"type":"ModuleAuthorForward","id":13},"moduleAd":{"type":"ModuleAd","id":14},"moduleBanner":{"type":"ModuleBanner","id":15},"moduleItemNull":{"type":"ModuleItemNull","id":16},"moduleShareInfo":{"type":"ModuleShareInfo","id":17},"moduleRecommend":{"type":"ModuleRecommend","id":18},"moduleTop":{"type":"ModuleTop","id":19},"moduleButtom":{"type":"ModuleButtom","id":20},"moduleStat1":{"type":"ModuleStat","id":21},"moduleStory":{"type":"ModuleStory","id":22},"moduleTopic":{"type":"ModuleTopic","id":23},"moduleTopicDetailsExt":{"type":"ModuleTopicDetailsExt","id":24},"moduleTopTag":{"type":"ModuleTopTag","id":25}}},"ModuleTopicDetailsExt":{"fields":{"commentGuide":{"type":"string","id":1}}},"ModuleTopTag":{"fields":{"tagName":{"type":"string","id":1}}},"ModuleTopic":{"fields":{"id":{"type":"int64","id":1},"name":{"type":"string","id":2},"url":{"type":"string","id":3}}},"ModuleTop":{"fields":{"id":{"type":"int64","id":1},"name":{"type":"string","id":2},"url":{"type":"string","id":3}}},"ModuleButtom":{"fields":{"moduleStat":{"type":"ModuleStat","id":1}}},"ModuleStory":{"fields":{"title":{"type":"string","id":1},"items":{"rule":"repeated","type":"StoryItem","id":2},"showPublishEntrance":{"type":"bool","id":3},"foldState":{"type":"int64","id":4},"uri":{"type":"string","id":5},"cover":{"type":"string","id":6},"publishText":{"type":"string","id":7}}},"StoryItem":{"oneofs":{"item":{"oneof":["storyArchive"]}},"fields":{"author":{"type":"UserInfo","id":1},"desc":{"type":"string","id":2},"status":{"type":"int64","id":3},"type":{"type":"RcmdType","id":4},"storyArchive":{"type":"StoryArchive","id":5}}},"StoryArchive":{"fields":{"cover":{"type":"string","id":1},"aid":{"type":"int64","id":2},"uri":{"type":"string","id":3},"dimension":{"type":"Dimension","id":4}}},"ModuleAd":{"fields":{"sourceContent":{"type":"google.protobuf.Any","id":1},"moduleAuthor":{"type":"ModuleAuthor","id":2},"adContentType":{"type":"int32","id":3},"coverLeftText1":{"type":"string","id":4},"coverLeftText2":{"type":"string","id":5},"coverLeftText3":{"type":"string","id":6}}},"ModuleAdditional":{"oneofs":{"item":{"oneof":["pgc","goods","vote","common","esport","vote2","ugc","up"]}},"fields":{"type":{"type":"AdditionalType","id":1},"pgc":{"type":"AdditionalPGC","id":2},"goods":{"type":"AdditionGoods","id":3},"vote":{"type":"AdditionVote","id":4},"common":{"type":"AdditionCommon","id":5},"esport":{"type":"AdditionEsport","id":6},"vote2":{"type":"AdditionVote2","id":8},"ugc":{"type":"AdditionUgc","id":9},"up":{"type":"AdditionUP","id":10},"rid":{"type":"int64","id":7},"needWriteCalender":{"type":"bool","id":11}}},"ModuleAuthor":{"fields":{"mid":{"type":"int64","id":1},"ptimeLabelText":{"type":"string","id":2},"author":{"type":"UserInfo","id":3},"decorateCard":{"type":"DecorateCard","id":4},"uri":{"type":"string","id":5},"tpList":{"rule":"repeated","type":"ThreePointItem","id":6},"badgeType":{"type":"int32","id":7},"badgeButton":{"type":"ModuleAuthorBadgeButton","id":8},"attend":{"type":"int32","id":9},"relation":{"type":"Relation","id":10},"weight":{"type":"Weight","id":11},"showFollow":{"type":"bool","id":12},"isTop":{"type":"bool","id":13}}},"Weight":{"fields":{"title":{"type":"string","id":1},"items":{"rule":"repeated","type":"WeightItem","id":2},"icon":{"type":"string","id":3}}},"WeightItem":{"oneofs":{"item":{"oneof":["weightButton","weightDislike"]}},"fields":{"type":{"type":"WeightType","id":1},"weightButton":{"type":"WeightButton","id":2},"weightDislike":{"type":"WeightDislike","id":3}}},"WeightDislike":{"fields":{"feedBackType":{"type":"string","id":1},"title":{"type":"string","id":2}}},"WeightButton":{"fields":{"jumpUrl":{"type":"string","id":1},"title":{"type":"string","id":2}}},"WeightType":{"values":{"weight_none":0,"weight_dislike":1,"weight_jump":2}},"ModuleAuthorBadgeButton":{"fields":{"icon":{"type":"string","id":1},"title":{"type":"string","id":2},"state":{"type":"int32","id":3},"id":{"type":"int64","id":4}}},"ModuleAuthorForward":{"fields":{"title":{"rule":"repeated","type":"ModuleAuthorForwardTitle","id":1},"url":{"type":"string","id":2},"uid":{"type":"int64","id":3},"ptimeLabelText":{"type":"string","id":4},"showFollow":{"type":"bool","id":5},"faceUrl":{"type":"string","id":6},"relation":{"type":"Relation","id":7},"tpList":{"rule":"repeated","type":"ThreePointItem","id":8}}},"ModuleAuthorForwardTitle":{"fields":{"text":{"type":"string","id":1},"url":{"type":"string","id":2}}},"ModuleBanner":{"oneofs":{"item":{"oneof":["user"]}},"fields":{"title":{"type":"string","id":1},"type":{"type":"ModuleBannerType","id":2},"user":{"type":"ModuleBannerUser","id":3},"dislikeText":{"type":"string","id":4},"dislikeIcon":{"type":"string","id":5}}},"ModuleBannerType":{"values":{"module_banner_type_none":0,"module_banner_type_user":1}},"ModuleBannerUser":{"fields":{"list":{"rule":"repeated","type":"ModuleBannerUserItem","id":1}}},"ModuleBannerUserItem":{"fields":{"face":{"type":"string","id":1},"name":{"type":"string","id":2},"uid":{"type":"int64","id":3},"liveState":{"type":"int32","id":4},"official":{"type":"OfficialVerify","id":5},"vip":{"type":"VipInfo","id":6},"label":{"type":"string","id":7},"button":{"type":"AdditionalButton","id":8},"uri":{"type":"string","id":9}}},"ModuleComment":{"fields":{"cmtShowItem":{"rule":"repeated","type":"CmtShowItem","id":1}}},"ModuleDesc":{"fields":{"desc":{"rule":"repeated","type":"Description","id":1},"jumpUri":{"type":"string","id":2},"text":{"type":"string","id":3}}},"ModuleDescGoods":{"fields":{"sourceType":{"type":"int32","id":1},"jumpUrl":{"type":"string","id":2},"schemaUrl":{"type":"string","id":3},"itemId":{"type":"int64","id":4},"openWhiteList":{"rule":"repeated","type":"string","id":5},"userWebV2":{"type":"bool","id":6},"adMark":{"type":"string","id":7},"schemaPackageName":{"type":"string","id":8}}},"ModuleDispute":{"fields":{"title":{"type":"string","id":1},"desc":{"type":"string","id":2},"uri":{"type":"string","id":3}}},"ModuleDynamic":{"oneofs":{"moduleItem":{"oneof":["dynArchive","dynPgc","dynCourSeason","dynCourBatch","dynForward","dynDraw","dynArticle","dynMusic","dynCommon","dynCommonLive","dynMedialist","dynApplet","dynSubscription","dynLiveRcmd","dynUgcSeason","dynSubscriptionNew"]}},"fields":{"type":{"type":"ModuleDynamicType","id":1},"dynArchive":{"type":"MdlDynArchive","id":2},"dynPgc":{"type":"MdlDynPGC","id":3},"dynCourSeason":{"type":"MdlDynCourSeason","id":4},"dynCourBatch":{"type":"MdlDynCourBatch","id":5},"dynForward":{"type":"MdlDynForward","id":6},"dynDraw":{"type":"MdlDynDraw","id":7},"dynArticle":{"type":"MdlDynArticle","id":8},"dynMusic":{"type":"MdlDynMusic","id":9},"dynCommon":{"type":"MdlDynCommon","id":10},"dynCommonLive":{"type":"MdlDynLive","id":11},"dynMedialist":{"type":"MdlDynMedialist","id":12},"dynApplet":{"type":"MdlDynApplet","id":13},"dynSubscription":{"type":"MdlDynSubscription","id":14},"dynLiveRcmd":{"type":"MdlDynLiveRcmd","id":15},"dynUgcSeason":{"type":"MdlDynUGCSeason","id":16},"dynSubscriptionNew":{"type":"MdlDynSubscriptionNew","id":17}}},"ModuleDynamicType":{"values":{"mdl_dyn_archive":0,"mdl_dyn_pgc":1,"mdl_dyn_cour_season":2,"mdl_dyn_cour_batch":3,"mdl_dyn_forward":4,"mdl_dyn_draw":5,"mdl_dyn_article":6,"mdl_dyn_music":7,"mdl_dyn_common":8,"mdl_dyn_live":9,"mdl_dyn_medialist":10,"mdl_dyn_applet":11,"mdl_dyn_subscription":12,"mdl_dyn_live_rcmd":13,"mdl_dyn_ugc_season":14,"mdl_dyn_subscription_new":15}},"ModuleExtend":{"fields":{"extend":{"rule":"repeated","type":"ModuleExtendItem","id":1},"uri":{"type":"string","id":2}}},"ModuleExtendItem":{"oneofs":{"extend":{"oneof":["extInfoTopic","extInfoLbs","extInfoHot","extInfoGame","extInfoCommon","extInfoOgv"]}},"fields":{"type":{"type":"DynExtendType","id":1},"extInfoTopic":{"type":"ExtInfoTopic","id":2},"extInfoLbs":{"type":"ExtInfoLBS","id":3},"extInfoHot":{"type":"ExtInfoHot","id":4},"extInfoGame":{"type":"ExtInfoGame","id":5},"extInfoCommon":{"type":"ExtInfoCommon","id":6},"extInfoOgv":{"type":"ExtInfoOGV","id":7}}},"ModuleFold":{"fields":{"foldType":{"type":"int32","id":1},"text":{"type":"string","id":2},"foldIds":{"type":"string","id":3},"foldUsers":{"rule":"repeated","type":"UserInfo","id":4}}},"ModuleInteraction":{"fields":{"interactionItem":{"rule":"repeated","type":"InteractionItem","id":1}}},"ModuleItemNull":{"fields":{"icon":{"type":"string","id":1},"text":{"type":"string","id":2}}},"ModuleLikeUser":{"fields":{"likeUsers":{"rule":"repeated","type":"LikeUser","id":1},"displayText":{"type":"string","id":2}}},"ModuleRecommend":{"fields":{"moduleTitle":{"type":"string","id":1},"image":{"type":"string","id":2},"tag":{"type":"string","id":3},"title":{"type":"string","id":4},"jumpUrl":{"type":"string","id":5},"ad":{"type":"string","id":6}}},"ModuleShareInfo":{"fields":{"title":{"type":"string","id":1},"shareChannels":{"rule":"repeated","type":"ShareChannel","id":2},"shareOrigin":{"type":"string","id":3},"oid":{"type":"string","id":4},"sid":{"type":"string","id":5}}},"ModuleStat":{"fields":{"repost":{"type":"int64","id":1},"like":{"type":"int64","id":2},"reply":{"type":"int64","id":3},"likeInfo":{"type":"LikeInfo","id":4},"noComment":{"type":"bool","id":5},"noForward":{"type":"bool","id":6},"replyUrl":{"type":"string","id":7},"noCommentText":{"type":"string","id":8},"noForwardText":{"type":"string","id":9}}},"Nameplate":{"fields":{"nid":{"type":"int64","id":1},"name":{"type":"string","id":2},"image":{"type":"string","id":3},"imageSmall":{"type":"string","id":4},"level":{"type":"string","id":5},"condition":{"type":"string","id":6}}},"OfficialVerify":{"fields":{"type":{"type":"int32","id":1},"desc":{"type":"string","id":2},"isAtten":{"type":"int32","id":3}}},"PGCSeason":{"fields":{"isFinish":{"type":"int32","id":1},"title":{"type":"string","id":2},"type":{"type":"int32","id":3}}},"Relation":{"fields":{"status":{"type":"int32","id":1},"isFollow":{"type":"int32","id":2},"isFollowed":{"type":"int32","id":3},"title":{"type":"string","id":4}}},"ShareChannel":{"fields":{"name":{"type":"string","id":1},"image":{"type":"string","id":2},"channel":{"type":"string","id":3},"reserve":{"type":"ShareReserve","id":4}}},"ShareReserve":{"fields":{"title":{"type":"string","id":1},"desc":{"type":"string","id":2},"qrCodeIcon":{"type":"string","id":3},"qrCodeText":{"type":"string","id":4},"qrCodeUrl":{"type":"string","id":5},"userInfo":{"type":"AdditionUserInfo","id":6}}},"ThreePointAttention":{"fields":{"attentionIcon":{"type":"string","id":1},"attentionText":{"type":"string","id":2},"notAttentionIcon":{"type":"string","id":3},"notAttentionText":{"type":"string","id":4},"status":{"type":"int32","id":5}}},"ThreePointAutoPlay":{"fields":{"openIcon":{"type":"string","id":1},"openText":{"type":"string","id":2},"closeIcon":{"type":"string","id":3},"closeText":{"type":"string","id":4},"openTextV2":{"type":"string","id":5},"closeTextV2":{"type":"string","id":6},"onlyIcon":{"type":"string","id":7},"onlyText":{"type":"string","id":8},"openIconV2":{"type":"string","id":9},"closeIconV2":{"type":"string","id":10}}},"ThreePointDefault":{"fields":{"icon":{"type":"string","id":1},"title":{"type":"string","id":2},"uri":{"type":"string","id":3},"id":{"type":"string","id":4},"toast":{"type":"ThreePointDefaultToast","id":5}}},"ThreePointDefaultToast":{"fields":{"title":{"type":"string","id":1},"desc":{"type":"string","id":2}}},"ThreePointDislike":{"fields":{"icon":{"type":"string","id":1},"title":{"type":"string","id":2}}},"ThreePointFavorite":{"fields":{"icon":{"type":"string","id":1},"title":{"type":"string","id":2},"id":{"type":"int64","id":3},"isFavourite":{"type":"bool","id":4},"cancelIcon":{"type":"string","id":5},"cancelTitle":{"type":"string","id":6}}},"ThreePointItem":{"oneofs":{"item":{"oneof":["default","autoPlayer","share","attention","wait","dislike","favorite","threePointTop","threePointComment","threePointHide"]}},"fields":{"type":{"type":"ThreePointType","id":1},"default":{"type":"ThreePointDefault","id":2},"autoPlayer":{"type":"ThreePointAutoPlay","id":3},"share":{"type":"ThreePointShare","id":4},"attention":{"type":"ThreePointAttention","id":5},"wait":{"type":"ThreePointWait","id":6},"dislike":{"type":"ThreePointDislike","id":7},"favorite":{"type":"ThreePointFavorite","id":8},"threePointTop":{"type":"ThreePointTop","id":9},"threePointComment":{"type":"ThreePointComment","id":10},"threePointHide":{"type":"ThreePointHide","id":11}}},"ThreePointHide":{"fields":{"icon":{"type":"string","id":1},"title":{"type":"string","id":2},"interactive":{"type":"ThreePointHideInteractive","id":3},"blookFid":{"type":"int64","id":4},"blookType":{"type":"string","id":5}}},"ThreePointHideInteractive":{"fields":{"title":{"type":"string","id":1},"confirm":{"type":"string","id":2},"cancel":{"type":"string","id":3},"toast":{"type":"string","id":4}}},"ThreePointComment":{"fields":{"upSelection":{"type":"CommentDetail","id":1},"upClose":{"type":"CommentDetail","id":2},"icon":{"type":"string","id":3},"title":{"type":"string","id":4}}},"CommentDetail":{"fields":{"canModify":{"type":"bool","id":1},"status":{"type":"int64","id":2}}},"ThreePointTop":{"fields":{"icon":{"type":"string","id":1},"title":{"type":"string","id":2},"type":{"type":"TopType","id":3}}},"TopType":{"values":{"top_none":0,"top_cancel":1}},"ThreePointShare":{"fields":{"icon":{"type":"string","id":1},"title":{"type":"string","id":2},"channel":{"rule":"repeated","type":"ThreePointShareChannel","id":3},"channelName":{"type":"string","id":4},"reserve":{"type":"ShareReserve","id":5}}},"ThreePointShareChannel":{"fields":{"icon":{"type":"string","id":1},"title":{"type":"string","id":2}}},"ThreePointType":{"values":{"tp_none":0,"background":1,"auto_play":2,"share":3,"wait":4,"attention":5,"report":6,"delete":7,"dislike":8,"favorite":9,"top":10,"comment":11,"hide":12,"campus_delete":13}},"ThreePointWait":{"fields":{"additionIcon":{"type":"string","id":1},"additionText":{"type":"string","id":2},"noAdditionIcon":{"type":"string","id":3},"noAdditionText":{"type":"string","id":4},"id":{"type":"int64","id":5}}},"TopicButton":{"fields":{"icon":{"type":"string","id":1},"title":{"type":"string","id":2},"jumpUri":{"type":"string","id":3},"redDot":{"type":"bool","id":4}}},"TopicList":{"fields":{"title":{"type":"string","id":1},"topicListItem":{"rule":"repeated","type":"TopicListItem","id":2},"actButton":{"type":"TopicButton","id":3},"moreButton":{"type":"TopicButton","id":4},"serverInfo":{"type":"string","id":5}}},"TopicListItem":{"fields":{"icon":{"type":"string","id":1},"iconTitle":{"type":"string","id":2},"topicId":{"type":"int64","id":3},"topicName":{"type":"string","id":4},"url":{"type":"string","id":5},"pos":{"type":"int64","id":6},"serverInfo":{"type":"string","id":7},"headIconUrl":{"type":"string","id":8},"upMid":{"type":"int64","id":9},"tailIconUrl":{"type":"string","id":10},"extension":{"type":"string","id":11}}},"Unfollow":{"fields":{"title":{"type":"string","id":1},"list":{"rule":"repeated","type":"UnfollowUserItem","id":2},"trackId":{"type":"string","id":3}}},"UnfollowUserItem":{"fields":{"hasUpdate":{"type":"bool","id":1},"face":{"type":"string","id":2},"name":{"type":"string","id":3},"uid":{"type":"int64","id":4},"pos":{"type":"int32","id":5},"liveState":{"type":"int32","id":6},"official":{"type":"OfficialVerify","id":7},"vip":{"type":"VipInfo","id":8},"sign":{"type":"string","id":9},"label":{"type":"string","id":10},"button":{"type":"AdditionalButton","id":11},"uri":{"type":"string","id":12}}},"UpListItem":{"fields":{"hasUpdate":{"type":"bool","id":1},"face":{"type":"string","id":2},"name":{"type":"string","id":3},"uid":{"type":"int64","id":4},"pos":{"type":"int64","id":5},"userItemType":{"type":"int32","id":6},"displayStyleDay":{"type":"UserItemStyle","id":7},"displayStyleNight":{"type":"UserItemStyle","id":8},"styleId":{"type":"int64","id":9},"liveState":{"type":"int32","id":10},"separator":{"type":"bool","id":11},"uri":{"type":"string","id":12},"isRecall":{"type":"bool","id":13}}},"UpListMoreLabel":{"fields":{"title":{"type":"string","id":1},"uri":{"type":"string","id":2}}},"UserInfo":{"fields":{"mid":{"type":"int64","id":1},"name":{"type":"string","id":2},"face":{"type":"string","id":3},"official":{"type":"OfficialVerify","id":4},"vip":{"type":"VipInfo","id":5},"live":{"type":"LiveInfo","id":6},"uri":{"type":"string","id":7},"pendant":{"type":"UserPendant","id":8},"nameplate":{"type":"Nameplate","id":9},"level":{"type":"int32","id":10},"sign":{"type":"string","id":11},"faceNft":{"type":"int32","id":12}}},"UserItemStyle":{"fields":{"rectText":{"type":"string","id":1},"rectTextColor":{"type":"string","id":2},"rectIcon":{"type":"string","id":3},"rectBgColor":{"type":"string","id":4},"outerAnimation":{"type":"string","id":5}}},"UserPendant":{"fields":{"pid":{"type":"int64","id":1},"name":{"type":"string","id":2},"image":{"type":"string","id":3},"expire":{"type":"int64","id":4}}},"VideoBadge":{"fields":{"text":{"type":"string","id":1},"textColor":{"type":"string","id":2},"textColorNight":{"type":"string","id":3},"bgColor":{"type":"string","id":4},"bgColorNight":{"type":"string","id":5},"borderColor":{"type":"string","id":6},"borderColorNight":{"type":"string","id":7},"bgStyle":{"type":"int32","id":8},"bgAlpha":{"type":"int32","id":9},"bgAlphaNight":{"type":"int32","id":10}}},"VipInfo":{"fields":{"type":{"type":"int32","id":1},"status":{"type":"int32","id":2},"dueDate":{"type":"int64","id":3},"label":{"type":"VipLabel","id":4},"themeType":{"type":"int32","id":5},"avatarSubscript":{"type":"int32","id":6},"nicknameColor":{"type":"string","id":7}}},"VipLabel":{"fields":{"path":{"type":"string","id":1},"text":{"type":"string","id":2},"labelTheme":{"type":"string","id":3}}}}}}},"view":{"nested":{"v1":{"options":{"java_package":"com.smile.bilibili.model"},"nested":{"ViewReply":{"fields":{"arc":{"type":"bilibili.app.archive.v1.Arc","id":1},"pages":{"rule":"repeated","type":"ViewPage","id":2},"ownerExt":{"type":"OnwerExt","id":3},"reqUser":{"type":"ReqUser","id":4},"tag":{"rule":"repeated","type":"Tag","id":5},"tIcon":{"keyType":"string","type":"TIcon","id":6},"season":{"type":"Season","id":7},"elecRank":{"type":"ElecRank","id":8},"history":{"type":"History","id":9},"relates":{"rule":"repeated","type":"Relate","id":10},"dislike":{"type":"Dislike","id":11},"playerIcon":{"type":"PlayerIcon","id":12},"vipActive":{"type":"string","id":13},"bvid":{"type":"string","id":14},"honor":{"type":"Honor","id":15},"relateTab":{"rule":"repeated","type":"RelateTab","id":16},"activityUrl":{"type":"string","id":17},"bgm":{"rule":"repeated","type":"Bgm","id":18},"staff":{"rule":"repeated","type":"Staff","id":19},"argueMsg":{"type":"string","id":20},"shortLink":{"type":"string","id":21},"playParam":{"type":"int32","id":22},"label":{"type":"Label","id":23},"ugcSeason":{"type":"UgcSeason","id":24},"config":{"type":"Config","id":25},"shareSubtitle":{"type":"string","id":26},"interaction":{"type":"Interaction","id":27},"ecode":{"type":"ECode","id":28},"customConfig":{"type":"CustomConfig","id":29},"cms":{"rule":"repeated","type":"CM","id":30},"cmConfig":{"type":"CMConfig","id":31},"tab":{"type":"Tab","id":32},"rank":{"type":"Rank","id":33},"tfPanelCustomized":{"type":"TFPanelCustomized","id":34},"upAct":{"type":"UpAct","id":35},"userGarb":{"type":"UserGarb","id":36},"activitySeason":{"type":"ActivitySeason","id":37},"badgeUrl":{"type":"string","id":38},"liveOrderInfo":{"type":"LiveOrderInfo","id":39},"descV2":{"rule":"repeated","type":"DescV2","id":40},"cmIpad":{"type":"CmIpad","id":41},"sticker":{"rule":"repeated","type":"ViewMaterial","id":42},"upLikeImg":{"type":"UpLikeImg","id":43},"likeCustom":{"type":"LikeCustom","id":44},"descTag":{"rule":"repeated","type":"Tag","id":45},"specialCell":{"type":"SpecialCell","id":46},"online":{"type":"Online","id":47},"cmUnderPlayer":{"type":"google.protobuf.Any","id":48}}},"Online":{"fields":{"onlineShow":{"type":"bool","id":1},"playerOnlineLogo":{"type":"string","id":2}}},"SpecialCell":{"fields":{"icon":{"type":"string","id":1},"iconNight":{"type":"string","id":2},"text":{"type":"string","id":3},"textColor":{"type":"string","id":4},"textColorNight":{"type":"string","id":5},"jumpUrl":{"type":"string","id":6},"cellType":{"type":"string","id":7},"cellBgcolor":{"type":"string","id":8},"cellBgcolorNight":{"type":"string","id":9},"param":{"type":"string","id":10},"pageTitle":{"type":"string","id":11},"jumpType":{"type":"string","id":12}}},"LikeCustom":{"fields":{"likeSwitch":{"type":"bool","id":1},"fullToHalfProgress":{"type":"int64","id":2},"nonFullProgress":{"type":"int64","id":3},"updateCount":{"type":"int64","id":4}}},"UpLikeImg":{"fields":{"preImg":{"type":"string","id":1},"sucImg":{"type":"string","id":2},"content":{"type":"string","id":3}}},"ViewMaterial":{"fields":{"oid":{"type":"int64","id":1},"mid":{"type":"int64","id":2},"title":{"type":"string","id":3},"author":{"type":"string","id":4},"jumpUrl":{"type":"string","id":5}}},"CmIpad":{"fields":{"cm":{"type":"CM","id":1},"author":{"type":"bilibili.app.archive.v1.Author","id":2},"stat":{"type":"bilibili.app.archive.v1.Stat","id":3},"duration":{"type":"int64","id":4},"aid":{"type":"int64","id":5}}},"DescV2":{"fields":{"text":{"type":"string","id":1},"type":{"type":"DescType","id":2},"uri":{"type":"string","id":3},"rid":{"type":"int64","id":4}}},"DescType":{"values":{"DescTypeUnknown":0,"DescTypeText":1,"DescTypeAt":2}},"LiveOrderInfo":{"fields":{"sid":{"type":"int64","id":1},"text":{"type":"string","id":2},"livePlanStartTime":{"type":"int64","id":3},"isFollow":{"type":"bool","id":4}}},"Season":{"fields":{"allowDownload":{"type":"string","id":1},"seasonId":{"type":"int64","id":2},"isJump":{"type":"int32","id":3},"title":{"type":"string","id":4},"cover":{"type":"string","id":5},"isFinish":{"type":"int32","id":6},"newestEpId":{"type":"int64","id":7},"newestEpIndex":{"type":"string","id":8},"totalCount":{"type":"int64","id":9},"weekday":{"type":"int32","id":10},"userSeason":{"type":"UserSeason","id":11},"player":{"type":"SeasonPlayer","id":12},"ogvPlayurl":{"type":"string","id":13}}},"SeasonPlayer":{"fields":{"aid":{"type":"int64","id":1},"vid":{"type":"string","id":2},"cid":{"type":"int64","id":3},"from":{"type":"string","id":4}}},"UserSeason":{"fields":{"attention":{"type":"string","id":1}}},"Tag":{"fields":{"id":{"type":"int64","id":1},"name":{"type":"string","id":2},"likes":{"type":"int64","id":3},"hates":{"type":"int64","id":4},"liked":{"type":"int32","id":5},"hated":{"type":"int32","id":6},"uri":{"type":"string","id":7},"tagType":{"type":"string","id":8}}},"TIcon":{"fields":{"icon":{"type":"string","id":1}}},"ECode":{"values":{"DEFAULT":0,"CODE404":1}},"ViewPage":{"fields":{"page":{"type":"bilibili.app.archive.v1.Page","id":1},"audio":{"type":"Audio","id":2},"dm":{"type":"DM","id":3},"downloadTitle":{"type":"string","id":4},"downloadSubtitle":{"type":"string","id":5}}},"Audio":{"fields":{"title":{"type":"string","id":1},"coverUrl":{"type":"string","id":2},"songId":{"type":"int64","id":3},"playCount":{"type":"int64","id":4},"replyCount":{"type":"int64","id":5},"upperId":{"type":"int64","id":6},"entrance":{"type":"string","id":7},"songAttr":{"type":"int64","id":8}}},"DM":{"fields":{"closed":{"type":"bool","id":1},"realName":{"type":"bool","id":2},"count":{"type":"int64","id":3}}},"OnwerExt":{"fields":{"officialVerify":{"type":"OfficialVerify","id":1},"live":{"type":"Live","id":2},"vip":{"type":"Vip","id":3},"assists":{"rule":"repeated","type":"int64","id":4},"fans":{"type":"int64","id":5},"arcCount":{"type":"string","id":6}}},"OfficialVerify":{"fields":{"type":{"type":"int32","id":1},"desc":{"type":"string","id":2}}},"Live":{"fields":{"mid":{"type":"int64","id":1},"roomid":{"type":"int64","id":2},"uri":{"type":"string","id":3},"endpageUri":{"type":"string","id":4}}},"Vip":{"fields":{"type":{"type":"int32","id":1},"dueDate":{"type":"int64","id":2},"dueRemark":{"type":"string","id":3},"accessStatus":{"type":"int32","id":4},"vipStatus":{"type":"int32","id":5},"vipStatusWarn":{"type":"string","id":6},"themeType":{"type":"int32","id":7},"label":{"type":"VipLabel","id":8}}},"VipLabel":{"fields":{"path":{"type":"string","id":1},"text":{"type":"string","id":2},"labelTheme":{"type":"string","id":3}}},"ReqUser":{"fields":{"attention":{"type":"int32","id":1},"guestAttention":{"type":"int32","id":2},"favorite":{"type":"int32","id":3},"like":{"type":"int32","id":4},"dislike":{"type":"int32","id":5},"coin":{"type":"int32","id":6},"attentionLevel":{"type":"int32","id":7},"favSeason":{"type":"int32","id":8}}},"ElecRank":{"fields":{"list":{"rule":"repeated","type":"ElecRankItem","id":1},"count":{"type":"int64","id":2}}},"ElecRankItem":{"fields":{"avatar":{"type":"string","id":1},"nickname":{"type":"string","id":2},"message":{"type":"string","id":3},"mid":{"type":"int64","id":4}}},"History":{"fields":{"cid":{"type":"int64","id":1},"progress":{"type":"int64","id":2}}},"Relate":{"fields":{"aid":{"type":"int64","id":1},"pic":{"type":"string","id":2},"title":{"type":"string","id":3},"author":{"type":"bilibili.app.archive.v1.Author","id":4},"stat":{"type":"bilibili.app.archive.v1.Stat","id":5},"duration":{"type":"int64","id":6},"goto":{"type":"string","id":7},"param":{"type":"string","id":8},"uri":{"type":"string","id":9},"jumpUrl":{"type":"string","id":10},"rating":{"type":"double","id":11},"reserve":{"type":"string","id":12},"from":{"type":"string","id":13},"desc":{"type":"string","id":14},"rcmdReason":{"type":"string","id":15},"badge":{"type":"string","id":16},"cid":{"type":"int64","id":17},"seasonType":{"type":"int32","id":18},"ratingCount":{"type":"int32","id":19},"tagName":{"type":"string","id":20},"packInfo":{"type":"PackInfo","id":21},"notice":{"type":"Notice","id":22},"button":{"type":"Button","id":23},"trackid":{"type":"string","id":24},"newCard":{"type":"int32","id":25},"rcmdReasonStyle":{"type":"ReasonStyle","id":26},"coverGif":{"type":"string","id":27},"cm":{"type":"CM","id":28},"reserveStatus":{"type":"int64","id":29},"rcmdReasonExtra_":{"type":"string","id":30},"recThreePoint":{"type":"RecThreePoint","id":31},"uniqueId":{"type":"string","id":32},"materialId":{"type":"int64","id":33}}},"RecThreePoint":{"fields":{"dislike":{"type":"RecDislike","id":1},"feedback":{"type":"RecDislike","id":2},"watchLater":{"type":"bool","id":3}}},"RecDislike":{"fields":{"title":{"type":"string","id":1},"subTitle":{"type":"string","id":2},"closedSubTitle":{"type":"string","id":3},"pasteText":{"type":"string","id":4},"closedPasteText":{"type":"string","id":5},"dislikeReason":{"rule":"repeated","type":"DislikeReasons","id":6}}},"PackInfo":{"fields":{"title":{"type":"string","id":1},"uri":{"type":"string","id":2}}},"Notice":{"fields":{"title":{"type":"string","id":1},"desc":{"type":"string","id":2}}},"Button":{"fields":{"title":{"type":"string","id":1},"uri":{"type":"string","id":2}}},"ReasonStyle":{"fields":{"text":{"type":"string","id":1},"textColor":{"type":"string","id":2},"bgColor":{"type":"string","id":3},"borderColor":{"type":"string","id":4},"textColorNight":{"type":"string","id":5},"bgColorNight":{"type":"string","id":6},"borderColorNight":{"type":"string","id":7},"bgStyle":{"type":"int32","id":8},"selected":{"type":"int32","id":9}}},"CM":{"fields":{"sourceContent":{"type":"google.protobuf.Any","id":1}}},"Dislike":{"fields":{"title":{"type":"string","id":1},"subtitle":{"type":"string","id":2},"reasons":{"rule":"repeated","type":"DislikeReasons","id":3}}},"DislikeReasons":{"fields":{"id":{"type":"int64","id":1},"mid":{"type":"int64","id":2},"rid":{"type":"int32","id":3},"tagId":{"type":"int64","id":4},"name":{"type":"string","id":5}}},"PlayerIcon":{"fields":{"url1":{"type":"string","id":1},"hash1":{"type":"string","id":2},"url2":{"type":"string","id":3},"hash2":{"type":"string","id":4}}},"Honor":{"fields":{"icon":{"type":"string","id":1},"iconNight":{"type":"string","id":2},"text":{"type":"string","id":3},"textExtra":{"type":"string","id":4},"textColor":{"type":"string","id":5},"textColorNight":{"type":"string","id":6},"bgColor":{"type":"string","id":7},"bgColorNight":{"type":"string","id":8},"url":{"type":"string","id":9},"urlText":{"type":"string","id":10}}},"RelateTab":{"fields":{"id":{"type":"string","id":1},"title":{"type":"string","id":2}}},"Bgm":{"fields":{"sid":{"type":"int64","id":1},"mid":{"type":"int64","id":2},"title":{"type":"string","id":3},"author":{"type":"string","id":4},"jumpUrl":{"type":"string","id":5},"cover":{"type":"string","id":6}}},"Staff":{"fields":{"mid":{"type":"int64","id":1},"title":{"type":"string","id":2},"face":{"type":"string","id":3},"name":{"type":"string","id":4},"officialVerify":{"type":"OfficialVerify","id":5},"vip":{"type":"Vip","id":6},"attention":{"type":"int32","id":7},"labelStyle":{"type":"int32","id":8}}},"Label":{"fields":{"type":{"type":"int32","id":1},"uri":{"type":"string","id":2},"icon":{"type":"string","id":3},"iconNight":{"type":"string","id":4},"iconWidth":{"type":"int64","id":5},"iconHeight":{"type":"int64","id":6}}},"UgcSeason":{"fields":{"id":{"type":"int64","id":1},"title":{"type":"string","id":2},"cover":{"type":"string","id":3},"intro":{"type":"string","id":4},"sections":{"rule":"repeated","type":"Section","id":5},"stat":{"type":"UgcSeasonStat","id":6},"labelText":{"type":"string","id":7},"labelTextColor":{"type":"string","id":8},"labelBgColor":{"type":"string","id":9},"labelTextNightColor":{"type":"string","id":10},"labelBgNightColor":{"type":"string","id":11},"descRight":{"type":"string","id":12},"epCount":{"type":"int64","id":13},"seasonType":{"type":"SeasonType","id":14}}},"SeasonType":{"values":{"Unknown":0,"Base":1,"Good":2}},"Section":{"fields":{"id":{"type":"int64","id":1},"title":{"type":"string","id":2},"type":{"type":"int64","id":3},"episodes":{"rule":"repeated","type":"Episode","id":4}}},"Episode":{"fields":{"id":{"type":"int64","id":1},"aid":{"type":"int64","id":2},"cid":{"type":"int64","id":3},"title":{"type":"string","id":4},"cover":{"type":"string","id":5},"coverRightText":{"type":"string","id":6},"page":{"type":"bilibili.app.archive.v1.Page","id":7},"stat":{"type":"bilibili.app.archive.v1.Stat","id":8},"bvid":{"type":"string","id":9},"author":{"type":"bilibili.app.archive.v1.Author","id":10},"authorDesc":{"type":"string","id":11}}},"UgcSeasonStat":{"fields":{"seasonId":{"type":"int64","id":1},"view":{"type":"int32","id":2},"danmaku":{"type":"int32","id":3},"reply":{"type":"int32","id":4},"fav":{"type":"int32","id":5},"coin":{"type":"int32","id":6},"share":{"type":"int32","id":7},"nowRank":{"type":"int32","id":8},"hisRank":{"type":"int32","id":9},"like":{"type":"int32","id":10}}},"Config":{"fields":{"relatesTitle":{"type":"string","id":1},"relatesStyle":{"type":"int32","id":2},"relateGifExp":{"type":"int32","id":3},"endPageHalf":{"type":"int32","id":4},"endPageFull":{"type":"int32","id":5},"autoSwindow":{"type":"bool","id":6},"popupInfo_":{"type":"bool","id":7},"abtestSmallWindow":{"type":"string","id":8},"recThreePointStyle":{"type":"int32","id":9},"isAbsoluteTime":{"type":"bool","id":10}}},"Interaction":{"fields":{"historyNode":{"type":"Node","id":1},"graphVersion":{"type":"int64","id":2},"msg":{"type":"string","id":3},"evaluation":{"type":"string","id":4},"mark":{"type":"int64","id":5}}},"Node":{"fields":{"nodeId":{"type":"int64","id":1},"title":{"type":"string","id":2},"cid":{"type":"int64","id":3}}},"CustomConfig":{"fields":{"redirectUrl":{"type":"string","id":1}}},"CMConfig":{"fields":{"adsControl":{"type":"google.protobuf.Any","id":1}}},"Tab":{"fields":{"background":{"type":"string","id":1},"otype":{"type":"TabOtype","id":2},"oid":{"type":"int64","id":3},"uri":{"type":"string","id":4},"style":{"type":"TabStyle","id":5},"text":{"type":"string","id":6},"textColor":{"type":"string","id":7},"textColorSelected":{"type":"string","id":8},"pic":{"type":"string","id":9},"id":{"type":"int64","id":10},"adTabInfo":{"type":"google.protobuf.Any","id":11}}},"TabOtype":{"values":{"UnknownOtype":0,"URL":1,"TopicNA":2,"CmURI":3}},"TabStyle":{"values":{"UnknownStyle":0,"Text":1,"Pic":2}},"Rank":{"fields":{"icon":{"type":"string","id":1},"iconNight":{"type":"string","id":2},"text":{"type":"string","id":3}}},"TFPanelCustomized":{"fields":{"rightBtnImg":{"type":"string","id":1},"rightBtnText":{"type":"string","id":2},"rightBtnTextColor":{"type":"string","id":3},"rightBtnLink":{"type":"string","id":4},"mainLabel":{"type":"string","id":5},"operator":{"type":"string","id":6},"subPanel":{"keyType":"string","type":"subTFPanel","id":7}}},"subTFPanel":{"fields":{"rightBtnImg":{"type":"string","id":1},"rightBtnText":{"type":"string","id":2},"rightBtnTextColor":{"type":"string","id":3},"rightBtnLink":{"type":"string","id":4},"mainLabel":{"type":"string","id":5},"operator":{"type":"string","id":6}}},"UpAct":{"fields":{"sid":{"type":"int64","id":1},"mid":{"type":"int64","id":2},"title":{"type":"string","id":3},"statement":{"type":"string","id":4},"image":{"type":"string","id":5},"url":{"type":"string","id":6},"button":{"type":"string","id":7}}},"UserGarb":{"fields":{"urlImageAniCut":{"type":"string","id":1}}},"ActivitySeason":{"fields":{"arc":{"type":"bilibili.app.archive.v1.Arc","id":1},"pages":{"rule":"repeated","type":"ViewPage","id":2},"ownerExt":{"type":"OnwerExt","id":3},"reqUser":{"type":"ReqUser","id":4},"elecRank":{"type":"ElecRank","id":5},"history":{"type":"History","id":6},"bvid":{"type":"string","id":7},"honor":{"type":"Honor","id":8},"staff":{"rule":"repeated","type":"Staff","id":9},"ugcSeason":{"type":"UgcSeason","id":10},"tab":{"type":"Tab","id":11},"rank":{"type":"Rank","id":12},"order":{"type":"Order","id":13},"supportDislike":{"type":"bool","id":14},"operationRelate":{"type":"OperationRelate","id":15},"activityResource":{"type":"ActivityResource","id":16},"shortLink":{"type":"string","id":17},"label":{"type":"Label","id":18},"dislike":{"type":"Dislike","id":19},"playerIcon":{"type":"PlayerIcon","id":20},"shareSubtitle":{"type":"string","id":21},"cmConfig":{"type":"CMConfig","id":22},"tfPanelCustomized":{"type":"TFPanelCustomized","id":23},"argueMsg":{"type":"string","id":24},"ecode":{"type":"int32","id":25},"customConfig":{"type":"CustomConfig","id":26},"badgeUrl":{"type":"string","id":27},"descV2":{"rule":"repeated","type":"DescV2","id":28},"config":{"type":"Config","id":29},"online":{"type":"Online","id":30}}},"Order":{"oneofs":{"orderParam":{"oneof":["reserve","favSeason"]}},"fields":{"status":{"type":"bool","id":1},"title":{"type":"string","id":2},"buttonTitle":{"type":"string","id":3},"buttonSelectedTitle":{"type":"string","id":4},"seasonStatView":{"type":"int64","id":5},"seasonStatDanmaku":{"type":"int64","id":6},"orderType":{"type":"BizType","id":7},"reserve":{"type":"BizReserveActivityParam","id":8},"favSeason":{"type":"BizFavSeasonParam","id":9},"intro":{"type":"string","id":10}}},"BizType":{"values":{"BizTypeNone":0,"BizTypeFollowVideo":1,"BizTypeReserveActivity":2,"BizTypeJumpLink":3,"BizTypeFavSeason":4,"BizTypeReserveGame":5}},"BizReserveActivityParam":{"fields":{"activityId":{"type":"int64","id":1},"from":{"type":"string","id":2},"type":{"type":"string","id":3},"oid":{"type":"int64","id":4}}},"BizFavSeasonParam":{"fields":{"seasonId":{"type":"int64","id":1}}},"OperationRelate":{"fields":{"title":{"type":"string","id":1},"relateItem":{"rule":"repeated","type":"RelateItem","id":2},"aiRelateItem":{"rule":"repeated","type":"Relate","id":3}}},"RelateItem":{"fields":{"url":{"type":"string","id":1},"cover":{"type":"string","id":2}}},"ActivityResource":{"fields":{"modPoolName":{"type":"string","id":1},"modResourceName":{"type":"string","id":2},"bgColor":{"type":"string","id":3},"selectedBgColor":{"type":"string","id":4},"textColor":{"type":"string","id":5},"lightTextColor":{"type":"string","id":6},"darkTextColor":{"type":"string","id":7},"dividerColor":{"type":"string","id":8}}}}}}}}}}},"google":{"nested":{"protobuf":{"nested":{"DoubleValue":{"fields":{"value":{"type":"double","id":1}}},"FloatValue":{"fields":{"value":{"type":"float","id":1}}},"Int64Value":{"fields":{"value":{"type":"int64","id":1}}},"UInt64Value":{"fields":{"value":{"type":"uint64","id":1}}},"Int32Value":{"fields":{"value":{"type":"int32","id":1}}},"UInt32Value":{"fields":{"value":{"type":"uint32","id":1}}},"BoolValue":{"fields":{"value":{"type":"bool","id":1}}},"StringValue":{"fields":{"value":{"type":"string","id":1}}},"BytesValue":{"fields":{"value":{"type":"bytes","id":1}}},"Any":{"fields":{"type_url":{"type":"string","id":1},"value":{"type":"bytes","id":2}}}}}}}}};
const url = $request.url;
const method = $request.method;
const postMethod = "POST";
const isQuanX = typeof $task != "undefined";
const binaryBody = isQuanX ? new Uint8Array($response.bodyBytes) : $response.body;
const unGzipBody = pako.ungzip(binaryBody.slice(5));
let body;
const biliRoot = protobuf.Root.fromJSON(biliJson);
let needProcessFlag = false;
if (url.indexOf("Dynamic/DynAll") !== -1 && method === postMethod) {
console.log('动态DynAll');
const dynAllReplyType = biliRoot.lookupType("bilibili.app.dynamic.DynAllReply");
let dynAllReplyMessage = dynAllReplyType.decode(unGzipBody);
if (!dynAllReplyMessage.hasOwnProperty('topicList') || dynAllReplyMessage.topicList === null) {
console.log('topicList为空');
} else {
needProcessFlag = true;
dynAllReplyMessage.topicList = null;
console.log('推荐话题topicList去除');
}
if (!dynAllReplyMessage.dynamicList.hasOwnProperty('list') || dynAllReplyMessage.dynamicList.list === null || dynAllReplyMessage.dynamicList.list.length === 0) {
console.log('动态列表list为空');
} else {
let adCount = 0;
dynAllReplyMessage.dynamicList.list = dynAllReplyMessage.dynamicList.list.filter(item => {
if (item.cardType !== 15) {
return true;
}
adCount++;
return false;
});
if (adCount !== 0) {
needProcessFlag = true;
}
console.log(`动态列表广告数量:${adCount}`);
}
if (needProcessFlag) {
body = processNewBody(dynAllReplyType.encode(dynAllReplyMessage).finish());
}
} else if (url.indexOf("View/View") !== -1 && method === postMethod) {
console.log('视频播放页View/View');
const viewReplyType = biliRoot.lookupType("bilibili.app.view.ViewReply");
let viewReplyMessage = viewReplyType.decode(unGzipBody);
if (!viewReplyMessage.hasOwnProperty('cms') || viewReplyMessage.cms === null || viewReplyMessage.cms.length === 0) {
console.log('cms为空');
} else {
let adCount = 0;
const sourceContentDtoType = biliRoot.lookupType("bilibili.ad.v1.SourceContentDto");
for (let i = 0; i < viewReplyMessage.cms.length; i++) {
let item = viewReplyMessage.cms[i];
if (item.sourceContent !== null && item.sourceContent.hasOwnProperty('value')) {
// 注意这里虽然proto没有属性value 但是viewReplyMessage解析的有
const sourceContentDtoMessage = sourceContentDtoType.decode(item.sourceContent.value);
if (sourceContentDtoMessage.hasOwnProperty('adContent')) {
adCount++;
}
}
}
viewReplyMessage.cms = [];
console.log(`up主推荐广告:${adCount}`);
if (adCount !== 0) {
needProcessFlag = true;
}
}
if (!viewReplyMessage.hasOwnProperty('relates') || viewReplyMessage.relates === null || viewReplyMessage.relates.length === 0) {
console.log('relates相关推荐为空');
} else {
let adCount = 0;
viewReplyMessage.relates = viewReplyMessage.relates.filter(item => {
if (item.goto === 'cm') {
adCount++;
return false;
}
return true;
});
console.log(`相关推荐广告:${adCount}`);
if (adCount !== 0) {
needProcessFlag = true;
}
}
let tIconMap = viewReplyMessage.tIcon;
for (const i in tIconMap) {
if (tIconMap[i] === null) {
// 解决tIcon的null is not an object问题
console.log(`tIconMap:${i}`);
delete tIconMap[i];
}
}
if (needProcessFlag) {
body = processNewBody(viewReplyType.encode(viewReplyMessage).finish());
}
} else {
$notification.post('bilibili-proto', "路径/请求方法匹配错误:", method + "," + url);
}
if (needProcessFlag) {
console.log(`${body.byteLength}---${body.buffer.byteLength}`);
if (isQuanX) {
$done({bodyBytes: body.buffer.slice(body.byteOffset, body.byteLength + body.byteOffset)});
} else {
$done({body});
}
} else {
$done({});
}
function processNewBody(unGzipBody) {
const gzipBody = pako.gzip(unGzipBody);
const length = gzipBody.length;
let merge = new Uint8Array(5 + length);
merge.set(Uint8Array.from([...binaryBody.slice(0, 2), (length >> 16) & 0xff, (length >> 8) & 0xff, length & 0xff]));
merge.set(gzipBody, 5);
return merge;
}