UNPKG

protobufjs

Version:

Protocol Buffers for JavaScript & TypeScript.

7 lines 88.2 kB
/*! * protobuf.js v8.3.0 (c) 2016, daniel wirtz * compiled wed, 13 may 2026 21:15:34 utc * licensed under the bsd-3-clause license * see: https://github.com/dcodeio/protobuf.js for details */ !function(it){"use strict";var r,e,i;r={1:[function(t,i,n){},{}],2:[function(t,i,n){i.exports=e;var r=/\/|\./;function e(t,i){r.test(t)||(t="google/protobuf/"+t+".proto",i={nested:{google:{nested:{protobuf:{nested:i}}}}}),e[t]=i}e("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}}),e("duration",{Duration:i={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),e("timestamp",{Timestamp:i}),e("empty",{Empty:{fields:{}}}),e("struct",{Struct:{fields:{fields:{keyType:"string",type:"Value",id:1}}},Value:{oneofs:{kind:{oneof:["nullValue","numberValue","stringValue","boolValue","structValue","listValue"]}},fields:{nullValue:{type:"NullValue",id:1},numberValue:{type:"double",id:2},stringValue:{type:"string",id:3},boolValue:{type:"bool",id:4},structValue:{type:"Struct",id:5},listValue:{type:"ListValue",id:6}}},NullValue:{values:{NULL_VALUE:0}},ListValue:{fields:{values:{rule:"repeated",type:"Value",id:1}}}}),e("wrappers",{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}}}}),e("field_mask",{FieldMask:{fields:{paths:{rule:"repeated",type:"string",id:1}}}}),e.get=function(t){return e[t]||null}},{}],3:[function(t,i,n){var p=t(6),v=t(27),b=t(28);function u(t,i,n,r){var e=!1;if(i.resolvedType)if(i.resolvedType instanceof p){t("switch(d%s){",r);for(var s=i.resolvedType.values,o=Object.keys(s),u=0;u<o.length;++u)s[o[u]]!==i.typeDefault||e||(t("default:")('if(typeof d%s==="number"){m%s=d%s;break}',r,r,r),i.repeated||t("break"),e=!0),t("case%j:",o[u])("case %i:",s[o[u]])("m%s=%j",r,s[o[u]])("break");t("}")}else t('if(typeof d%s!=="object")',r)("throw TypeError(%j)",i.fullName+": object expected")("m%s=types[%i].fromObject(d%s,q+1)",r,n,r);else{var f=!1;switch(i.type){case"double":case"float":t("m%s=Number(d%s)",r,r);break;case"uint32":case"fixed32":t("m%s=d%s>>>0",r,r);break;case"int32":case"sint32":case"sfixed32":t("m%s=d%s|0",r,r);break;case"uint64":f=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":t("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",r,r,f)('else if(typeof d%s==="string")',r)("m%s=parseInt(d%s,10)",r,r)('else if(typeof d%s==="number")',r)("m%s=d%s",r,r)('else if(typeof d%s==="object")',r)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",r,r,r,f?"true":"");break;case"bytes":t('if(typeof d%s==="string")',r)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",r,r,r)("else if(d%s.length>=0)",r)("m%s=d%s",r,r);break;case"string":t("m%s=String(d%s)",r,r);break;case"bool":t("m%s=Boolean(d%s)",r,r)}}return t}function w(t,i,n,r,e){if(e=e||r,i.resolvedType)i.resolvedType instanceof p?t("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s",r,n,e,e,n,e,e):t("d%s=types[%i].toObject(m%s,o)",r,n,e);else{var s=!1;switch(i.type){case"double":case"float":t("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",r,e,e,e);break;case"uint64":s=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":t('if(typeof m%s==="number")',e)("d%s=o.longs===String?String(m%s):m%s",r,e,e)("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",r,e,e,e,s?"true":"",e);break;case"bytes":t("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",r,e,e,e,e);break;default:t("d%s=m%s",r,e)}}return t}n.fromObject=function(t){var i=t.fieldsArray,n=b.codegen(["d","q"],t.name+"$fromObject")("if(d instanceof C)")("return d")("if(q===undefined)q=0")("if(q>util.recursionLimit)")('throw Error("max depth exceeded")');if(!i.length)return n("return new C");n("var m=new C");for(var r=0;r<i.length;++r){var e=i[r].resolve(),s=b.safeProp(e.name),o=!e.hasPresence&&!e.repeated&&!e.map&&(e.resolvedType instanceof p||v.basic[e.type]!==it);e.map?(n("if(d%s){",s)('if(typeof d%s!=="object")',s)("throw TypeError(%j)",e.fullName+": object expected")("m%s={}",s)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",s),n('if(ks[i]==="__proto__")')("util.makeProp(m%s,ks[i])",s),u(n,e,r,s+"[ks[i]]")("}")("}")):e.repeated?(n("if(d%s){",s)("if(!Array.isArray(d%s))",s)("throw TypeError(%j)",e.fullName+": array expected")("m%s=Array(d%s.length)",s,s)("for(var i=0;i<d%s.length;++i){",s),u(n,e,r,s+"[i]")("}")("}")):(e.resolvedType instanceof p||n("if(d%s!=null){",s),o&&(e.resolvedType instanceof p?n('if(d%s!==%j&&(typeof d%s!=="string"||types[%i].values[d%s]!==%j)){',s,e.typeDefault,s,r,s,e.typeDefault):"string"===e.type?n('if(typeof d%s!=="string"||d%s.length){',s,s):"bytes"===e.type?n("if(d%s.length){",s):"bool"===e.type?n("if(d%s){",s):v.long[e.type]!==it?n('if(typeof d%s==="object"?d%s.low||d%s.high:Number(d%s)!==0){',s,s,s,s):n("if(Number(d%s)!==0){",s)),u(n,e,r,s),o&&n("}"),e.resolvedType instanceof p||n("}"))}return n("return m")},n.toObject=function(t){var i=t.fieldsArray.slice().sort(b.compareFieldsById);if(!i.length)return b.codegen()("return {}");for(var n=b.codegen(["m","o"],t.name+"$toObject")("if(!o)")("o={}")("var d={}"),r=[],e=[],s=[],o=0;o<i.length;++o)i[o].partOf||(i[o].resolve().repeated?r:i[o].map?e:s).push(i[o]);if(r.length){for(n("if(o.arrays||o.defaults){"),o=0;o<r.length;++o)n("d%s=[]",b.safeProp(r[o].name));n("}")}if(e.length){for(n("if(o.objects||o.defaults){"),o=0;o<e.length;++o)n("d%s={}",b.safeProp(e[o].name));n("}")}if(s.length){for(n("if(o.defaults){"),o=0;o<s.length;++o){var u,f=s[o],h=b.safeProp(f.name);f.resolvedType instanceof p?n("d%s=o.enums===String?%j:%j",h,f.resolvedType.valuesById[f.typeDefault],f.typeDefault):f.long?n("if(util.Long){")("var n=new util.Long(%i,%i,%j)",f.typeDefault.low,f.typeDefault.high,f.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",h)("}else")("d%s=o.longs===String?%j:%i",h,f.typeDefault.toString(),f.typeDefault.toNumber()):f.bytes?(u=Array.prototype.slice.call(f.typeDefault),n("if(o.bytes===String)d%s=%j",h,String.fromCharCode.apply(String,f.typeDefault))("else{")("d%s=%j",h,u)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",h,h)("}")):n("d%s=%j",h,f.typeDefault)}n("}")}for(var a=!1,o=0;o<i.length;++o){var c,l,f=i[o],d=t.i.indexOf(f),h=b.safeProp(f.name);f.map?(a||(a=!0,n("var ks2")),n("if(m%s&&(ks2=Object.keys(m%s)).length){",h,h)("d%s={}",h),c=v.long[f.keyType]!==it,l=h+"[ks2[j]]",n("for(var j=0;j<ks2.length;++j){"),c&&n("var k2=util.longFromKey(ks2[j],%j).toString()","uint64"===f.keyType||"fixed64"===f.keyType),n('if(ks2[j]==="__proto__")')("util.makeProp(d%s,ks2[j])",h),w(n,f,d,c?h+"[k2]":l,l)("}")):f.repeated?(n("if(m%s&&m%s.length){",h,h)("d%s=Array(m%s.length)",h,h)("for(var j=0;j<m%s.length;++j){",h),w(n,f,d,h+"[j]")("}")):(n("if(m%s!=null&&m.hasOwnProperty(%j)){",h,f.name),w(n,f,d,h),f.partOf&&n("if(o.oneofs)")("d%s=%j",b.safeProp(f.partOf.name),f.name)),n("}")}return n("return d")}},{27:27,28:28,6:6}],4:[function(t,i,n){i.exports=function(t){for(var i=!1,n=!1,r=0;r<t.fieldsArray.length;++r){var e=t.i[r];e.map&&(i=!0),e.repeated||e.map||e.hasPresence||(n=!0)}var s=d.codegen(["r","l","z","q","g"],t.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("if(q===undefined)q=0")("if(q>Reader.recursionLimit)")('throw Error("max depth exceeded")')("var c=l===undefined?r.len:r.pos+l,m=g||new C"+(i?",k,v":n?",v":""))("while(r.pos<c){")("var s=r.pos")("var t=r.tag()")("if(t===z){")("z=undefined")("break")("}");t.fieldsArray.length&&s("var u=t&7")("switch(t>>>=3){");for(r=0;r<t.fieldsArray.length;++r){var o,u=t.i[r].resolve(),f=u.resolvedType instanceof c?"int32":u.type,h="m"+d.safeProp(u.name);u.map?(s("case %i:{",u.id)("if(u!==2)")("break")("if(%s===util.emptyObject)",h)("%s={}",h)("var c2=r.uint32()+r.pos"),l.defaults[u.keyType]!==it?s("k=%j",l.defaults[u.keyType]):s("k=null"),l.defaults[f]!==it?s("v=%j",l.defaults[f]):s("v=null"),s("while(r.pos<c2){")("var t2=r.tag()")("u=t2&7")("switch(t2>>>=3){")("case 1:")("if(u!==%i)",l.mapKey[u.keyType])("break")("k=r.%s()",u.keyType)("continue")("case 2:")("if(u!==%i)",l.basic[f]===it?2:l.basic[f])("break"),l.basic[f]===it?s("v=types[%i].decode(r,r.uint32(),undefined,q+1)",r):s("v=r.%s()",f),s("continue")("}")("r.skipType(u,q,t2)")("}"),o=l.basic[f]===it?"v||new types["+r+"].ctor":"v",l.long[u.keyType]!==it?s('%s[typeof k==="object"?util.longToHash(k):k]=%s',h,o):("string"===u.keyType&&s('if(k==="__proto__")')("util.makeProp(%s,k)",h),s("%s[k]=%s",h,o))):u.repeated?(s("case %i:",u.id)("{"),l.packed[f]!==it&&s("if(u===2){")("if(!(%s&&%s.length))",h,h)("%s=[]",h)("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",h,f)("continue")("}"),s("if(u!==%i)",l.basic[f]===it?u.delimited?3:2:l.basic[f])("break")("if(!(%s&&%s.length))",h,h)("%s=[]",h),l.basic[f]===it?u.delimited?s("%s.push(types[%i].decode(r,undefined,%i,q+1))",h,r,8*u.id+4):s("%s.push(types[%i].decode(r,r.uint32(),undefined,q+1))",h,r):s("%s.push(r.%s())",h,f)):l.basic[f]===it?(s("case %i:{",u.id)("if(u!==%i)",u.delimited?3:2)("break"),u.delimited?s("%s=types[%i].decode(r,undefined,%i,q+1,%s)",h,r,8*u.id+4,h):s("%s=types[%i].decode(r,r.uint32(),undefined,q+1,%s)",h,r,h)):u.hasPresence?s("case %i:{",u.id)("if(u!==%i)",l.basic[f])("break")("%s=r.%s()",h,f):(s("case %i:{",u.id)("if(u!==%i)",l.basic[f])("break"),u.resolvedType instanceof c&&0!==u.typeDefault?s("if((v=r.%s())!==%j)",f,u.typeDefault):"string"===f||"bytes"===f?s("if((v=r.%s()).length)",f):l.long[f]!==it?s('if(typeof(v=r.%s())==="object"?v.low||v.high:v!==0)',f):s("double"===f||"float"===f?"if((v=r.%s())!==0)":"if(v=r.%s())",f),s("%s=v",h)("else")("delete %s",h)),u.partOf&&s("m%s=%j",d.safeProp(u.partOf.name),u.name),s("continue")("}")}r&&s("}");for(s("r.skipType(%s,q,t)",r?"u":"t&7")('util.makeProp(m,"$unknowns",false);')("(m.$unknowns||(m.$unknowns=[])).push(r.raw(s,r.pos))")("}")("if(z!==undefined)")('throw Error("missing end group")'),r=0;r<t.i.length;++r){var a=t.i[r];a.required&&s("if(!m.hasOwnProperty(%j))",a.name)("throw util.ProtocolError(%j,{instance:m})","missing required '"+a.name+"'")}return s("return m")};var c=t(6),l=t(27),d=t(28)},{27:27,28:28,6:6}],5:[function(t,i,n){i.exports=function(t){for(var i,n=c.codegen(["m","w"],t.name+"$encode")("if(!w)")("w=Writer.create()"),r=t.fieldsArray.slice().sort(c.compareFieldsById),e=0;e<r.length;++e){var s=r[e].resolve(),o=t.i.indexOf(s),u=s.resolvedType instanceof h?"int32":s.type,f=a.basic[u];i="m"+c.safeProp(s.name),s.map?(n("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",i,s.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",i),"bool"===s.keyType?n("w.uint32(%i).fork().uint32(%i).bool(util.boolFromKey(ks[i]))",(s.id<<3|2)>>>0,8|a.mapKey[s.keyType]):a.long[s.keyType]!==it?n("w.uint32(%i).fork().uint32(%i).%s(util.longFromKey(ks[i],%j))",(s.id<<3|2)>>>0,8|a.mapKey[s.keyType],s.keyType,"uint64"===s.keyType||"fixed64"===s.keyType):n("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(s.id<<3|2)>>>0,8|a.mapKey[s.keyType],s.keyType),f===it?n("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",o,i):n(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|f,u,i),n("}")("}")):s.repeated?(n("if(%s!=null&&%s.length){",i,i),s.packed&&a.packed[u]!==it?n("w.uint32(%i).fork()",(s.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",i)("w.%s(%s[i])",u,i)("w.ldelim()"):(n("for(var i=0;i<%s.length;++i)",i),f===it?l(n,s,o,i+"[i]"):n("w.uint32(%i).%s(%s[i])",(s.id<<3|f)>>>0,u,i)),n("}")):(s.required||n("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",i,s.name),f===it?l(n,s,o,i):n("w.uint32(%i).%s(%s)",(s.id<<3|f)>>>0,u,i))}return n('if(m.$unknowns!=null&&Object.hasOwnProperty.call(m,"$unknowns"))')("for(var i=0;i<m.$unknowns.length;++i)")("w.raw(m.$unknowns[i])")("return w")};var h=t(6),a=t(27),c=t(28);function l(t,i,n,r){i.delimited?t("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",n,r,(i.id<<3|3)>>>0,(i.id<<3|4)>>>0):t("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",n,r,(i.id<<3|2)>>>0)}},{27:27,28:28,6:6}],6:[function(t,i,n){i.exports=s;var f=t(15),r=(((s.prototype=Object.create(f.prototype)).constructor=s).className="Enum",t(14)),e=t(28);function s(t,i,n,r,e,s){if(f.call(this,t,n),i&&"object"!=typeof i)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=r,this.comments=e||{},this.valuesOptions=s,this.e={},this.reserved=it,i)for(var o=Object.keys(i),u=0;u<o.length;++u)"__proto__"!==o[u]&&"number"==typeof i[o[u]]&&(this.valuesById[this.values[o[u]]=i[o[u]]]=o[u])}s.prototype.o=function(t){return t=this.u||t,f.prototype.o.call(this,t),Object.keys(this.values).forEach(t=>{var i=Object.assign({},this.f);this.e[t]=Object.assign(i,this.valuesOptions&&this.valuesOptions[t]&&this.valuesOptions[t].features)}),this},s.fromJSON=function(t,i){t=new s(t,i.values,i.options,i.comment,i.comments,i.valuesOptions);return t.reserved=i.reserved,i.edition&&(t.u=i.edition),t.h="proto3",t},s.prototype.toJSON=function(t){t=!!t&&!!t.keepComments;return e.toObject(["edition",this.a(),"options",this.options,"valuesOptions",this.valuesOptions,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:it,"comment",t?this.comment:it,"comments",t?this.comments:it])},s.prototype.add=function(t,i,n,r){if(!e.isString(t))throw TypeError("name must be a string");if(!e.isInteger(i))throw TypeError("id must be an integer");if("__proto__"!==t){if(this.values[t]!==it)throw Error("duplicate name '"+t+"' in "+this);if(this.isReservedId(i))throw Error("id "+i+" is reserved in "+this);if(this.isReservedName(t))throw Error("name '"+t+"' is reserved in "+this);if(this.valuesById[i]!==it){if(!this.options||!this.options.allow_alias)throw Error("duplicate id "+i+" in "+this);this.values[t]=i}else this.valuesById[this.values[t]=i]=t;r&&(this.valuesOptions===it&&(this.valuesOptions={}),this.valuesOptions[t]=r||null),this.comments[t]=n||null}return this},s.prototype.remove=function(t){if(!e.isString(t))throw TypeError("name must be a string");var i=this.values[t];if(null==i)throw Error("name '"+t+"' does not exist in "+this);return delete this.valuesById[i],delete this.values[t],delete this.comments[t],this.valuesOptions&&delete this.valuesOptions[t],this},s.prototype.isReservedId=function(t){return r.isReservedId(this.reserved,t)},s.prototype.isReservedName=function(t){return r.isReservedName(this.reserved,t)}},{14:14,15:15,28:28}],7:[function(t,i,n){i.exports=o;var r,u=t(15),e=(((o.prototype=Object.create(u.prototype)).constructor=o).className="Field",t(6)),f=t(27),h=t(28),a=/^required|optional|repeated$/;function o(t,i,n,r,e,s,o){if(h.isObject(r)?(o=e,s=r,r=e=it):h.isObject(e)&&(o=s,s=e,e=it),u.call(this,t,s),!h.isInteger(i)||i<0)throw TypeError("id must be a non-negative integer");if(!h.isString(n))throw TypeError("type must be a string");if(r!==it&&!a.test(r=r.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(e!==it&&!h.isString(e))throw TypeError("extend must be a string");this.rule=(r="proto3_optional"===r?"optional":r)&&"optional"!==r?r:it,this.type=n,this.id=i,this.extend=e||it,this.repeated="repeated"===r,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!h.Long&&f.long[n]!==it,this.bytes="bytes"===n,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.comment=o}o.fromJSON=function(t,i){t=new o(t,i.id,i.type,i.rule,i.extend,i.options,i.comment);return i.edition&&(t.u=i.edition),t.h="proto3",t},Object.defineProperty(o.prototype,"required",{get:function(){return"LEGACY_REQUIRED"===this.f.field_presence}}),Object.defineProperty(o.prototype,"optional",{get:function(){return!this.required}}),Object.defineProperty(o.prototype,"delimited",{get:function(){return this.resolvedType instanceof r&&"DELIMITED"===this.f.message_encoding}}),Object.defineProperty(o.prototype,"packed",{get:function(){return"PACKED"===this.f.repeated_field_encoding}}),Object.defineProperty(o.prototype,"hasPresence",{get:function(){return!this.repeated&&!this.map&&(this.partOf||this.declaringField||this.extensionField||"IMPLICIT"!==this.f.field_presence)}}),o.prototype.setOption=function(t,i,n){return u.prototype.setOption.call(this,t,i,n)},o.prototype.toJSON=function(t){t=!!t&&!!t.keepComments;return h.toObject(["edition",this.a(),"rule","optional"!==this.rule&&this.rule||it,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:it])},o.prototype.resolve=function(){var t;return this.resolved?this:((this.typeDefault=f.defaults[this.type])===it?(this.resolvedType=(this.declaringField||this).parent.lookupTypeOrEnum(this.type),this.resolvedType instanceof r?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]):this.options&&this.options.proto3_optional&&(this.typeDefault=null),this.options&&null!=this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof e&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(this.options.packed===it||!this.resolvedType||this.resolvedType instanceof e||delete this.options.packed,Object.keys(this.options).length||(this.options=it)),this.long?(this.typeDefault=h.Long.fromNumber(this.typeDefault,"u"==(this.type[0]||"")),Object.freeze&&Object.freeze(this.typeDefault)):this.bytes&&"string"==typeof this.typeDefault&&(h.base64.test(this.typeDefault)?h.base64.decode(this.typeDefault,t=h.newBuffer(h.base64.length(this.typeDefault)),0):h.utf8.write(this.typeDefault,t=h.newBuffer(h.utf8.length(this.typeDefault)),0),this.typeDefault=t),this.map?this.defaultValue=h.emptyObject:this.repeated?this.defaultValue=h.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof r&&this.parent.c&&(this.parent.c.prototype[this.name]=this.defaultValue),u.prototype.resolve.call(this))},o.prototype.l=function(t){var i;return"proto2"!==t&&"proto3"!==t?{}:(t={},"required"===this.rule&&(t.field_presence="LEGACY_REQUIRED"),this.parent&&f.defaults[this.type]===it&&(i=this.parent.get(this.type.split(".").pop()))&&i instanceof r&&i.group&&(t.message_encoding="DELIMITED"),!0===this.getOption("packed")?t.repeated_field_encoding="PACKED":!1===this.getOption("packed")&&(t.repeated_field_encoding="EXPANDED"),t)},o.prototype.o=function(t){return u.prototype.o.call(this,this.u||t)},o.d=function(n,r,e,s){return"function"==typeof r?r=h.decorateType(r).name:r&&"object"==typeof r&&(r=h.decorateEnum(r).name),function(t,i){h.decorateType(t.constructor).add(new o(i,n,r,e,{default:s}))}},o.p=function(t){r=t}},{15:15,27:27,28:28,6:6}],8:[function(t,i,n){var r=i.exports=t(9);r.build="light",r.load=function(t,i,n){return(i="function"==typeof i?(n=i,new r.Root):i||new r.Root).load(t,n)},r.loadSync=function(t,i){return(i=i||new r.Root).loadSync(t)},r.encoder=t(5),r.decoder=t(4),r.verifier=t(43),r.converter=t(3),r.ReflectionObject=t(15),r.Namespace=t(14),r.Root=t(20),r.Enum=t(6),r.Type=t(26),r.Field=t(7),r.OneOf=t(16),r.MapField=t(11),r.Service=t(24),r.Method=t(13),r.Message=t(12),r.wrappers=t(44),r.types=t(27),r.util=t(28),r.ReflectionObject.p(r.Root),r.Namespace.p(r.Type,r.Service,r.Enum),r.Root.p(r.Type),r.Field.p(r.Type)},{11:11,12:12,13:13,14:14,15:15,16:16,20:20,24:24,26:26,27:27,28:28,3:3,4:4,43:43,44:44,5:5,6:6,7:7,9:9}],9:[function(t,i,n){var r=n;function e(){r.util.p(),r.Writer.p(r.BufferWriter),r.Reader.p(r.BufferReader)}r.build="minimal",r.Writer=t(45),r.BufferWriter=t(46),r.Reader=t(18),r.BufferReader=t(19),r.util=t(38),r.rpc=t(22),r.roots=t(21),r.configure=e,e()},{18:18,19:19,21:21,22:22,38:38,45:45,46:46}],10:[function(t,i,n){i=i.exports=t(8);i.build="full",i.tokenize=t(25),i.parse=t(17),i.common=t(2),i.Root.p(i.Type,i.parse,i.common)},{17:17,2:2,25:25,8:8}],11:[function(t,i,n){i.exports=s;var o=t(7),r=(((s.prototype=Object.create(o.prototype)).constructor=s).className="MapField",t(27)),u=t(28);function s(t,i,n,r,e,s){if(o.call(this,t,i,r,it,it,e,s),!u.isString(n))throw TypeError("keyType must be a string");this.keyType=n,this.resolvedKeyType=null,this.map=!0}s.fromJSON=function(t,i){return new s(t,i.id,i.keyType,i.type,i.options,i.comment)},s.prototype.toJSON=function(t){t=!!t&&!!t.keepComments;return u.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:it])},s.prototype.resolve=function(){if(this.resolved)return this;if(r.mapKey[this.keyType]===it)throw Error("invalid key type: "+this.keyType);return o.prototype.resolve.call(this)},s.d=function(n,r,e){return"function"==typeof e?e=u.decorateType(e).name:e&&"object"==typeof e&&(e=u.decorateEnum(e).name),function(t,i){u.decorateType(t.constructor).add(new s(i,n,r,e))}}},{27:27,28:28,7:7}],12:[function(t,i,n){i.exports=e;var r=t(38);function e(t){if(t)for(var i=Object.keys(t),n=0;n<i.length;++n)null!=t[i[n]]&&"__proto__"!==i[n]&&(this[i[n]]=t[i[n]])}e.create=function(t){return this.$type.create(t)},e.encode=function(t,i){return this.$type.encode(t,i)},e.encodeDelimited=function(t,i){return this.$type.encodeDelimited(t,i)},e.decode=function(t){return this.$type.decode(t)},e.decodeDelimited=function(t){return this.$type.decodeDelimited(t)},e.verify=function(t){return this.$type.verify(t)},e.fromObject=function(t){return this.$type.fromObject(t)},e.toObject=function(t,i){return this.$type.toObject(t,i)},e.prototype.toJSON=function(){return this.$type.toObject(this,r.toJSONOptions)}},{38:38}],13:[function(t,i,n){i.exports=r;var h=t(15),a=(((r.prototype=Object.create(h.prototype)).constructor=r).className="Method",t(28));function r(t,i,n,r,e,s,o,u,f){if(a.isObject(e)?(o=e,e=s=it):a.isObject(s)&&(o=s,s=it),i!==it&&!a.isString(i))throw TypeError("type must be a string");if(!a.isString(n))throw TypeError("requestType must be a string");if(!a.isString(r))throw TypeError("responseType must be a string");h.call(this,t,o),this.type=i||"rpc",this.requestType=n,this.requestStream=!!e||it,this.responseType=r,this.responseStream=!!s||it,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=u,this.parsedOptions=f}r.fromJSON=function(t,i){return new r(t,i.type,i.requestType,i.responseType,i.requestStream,i.responseStream,i.options,i.comment,i.parsedOptions)},r.prototype.toJSON=function(t){t=!!t&&!!t.keepComments;return a.toObject(["type","rpc"!==this.type&&this.type||it,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",t?this.comment:it,"parsedOptions",this.parsedOptions])},r.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),h.prototype.resolve.call(this))}},{15:15,28:28}],14:[function(t,i,n){i.exports=c;var s,o,u,r=t(15),f=(((c.prototype=Object.create(r.prototype)).constructor=c).className="Namespace",t(7)),h=t(28),a=t(16);function e(t,i){if(!t||!t.length)return it;for(var n={},r=0;r<t.length;++r)n[t[r].name]=t[r].toJSON(i);return n}function c(t,i){r.call(this,t,i),this.nested=it,this.v=null,this.b=Object.create(null),this.w=!0,this.y=!0}function l(t){t.v=null,t.b=Object.create(null);for(var i=t;i=i.parent;)i.b=Object.create(null);return t}c.fromJSON=function(t,i,n){if((n=n===it?0:n)>h.recursionLimit)throw Error("max depth exceeded");return new c(t,i.options).addJSON(i.nested,n)},c.arrayToJSON=e,c.isReservedId=function(t,i){if(t)for(var n=0;n<t.length;++n)if("string"!=typeof t[n]&&t[n][0]<=i&&t[n][1]>i)return!0;return!1},c.isReservedName=function(t,i){if(t)for(var n=0;n<t.length;++n)if(t[n]===i)return!0;return!1},Object.defineProperty(c.prototype,"nestedArray",{get:function(){return this.v||(this.v=h.toArray(this.nested))}}),c.prototype.toJSON=function(t){return h.toObject(["options",this.options,"nested",e(this.nestedArray,t)])},c.prototype.addJSON=function(t,i){if((i=i===it?0:i)>h.recursionLimit)throw Error("max depth exceeded");if(t)for(var n,r=Object.keys(t),e=0;e<r.length;++e)n=t[r[e]],this.add((n.fields!==it?s:n.values!==it?u:n.methods!==it?o:n.id!==it?f:c).fromJSON(r[e],n,i+1));return this},c.prototype.get=function(t){return this.nested&&Object.prototype.hasOwnProperty.call(this.nested,t)?this.nested[t]:null},c.prototype.getEnum=function(t){if(this.nested&&Object.prototype.hasOwnProperty.call(this.nested,t)&&this.nested[t]instanceof u)return this.nested[t].values;throw Error("no such enum: "+t)},c.prototype.add=function(t){if(!(t instanceof f&&t.extend!==it||t instanceof s||t instanceof a||t instanceof u||t instanceof o||t instanceof c))throw TypeError("object must be a valid nested object");if("__proto__"===t.name)return this;if(this.nested){var i=this.get(t.name);if(i){if(!(i instanceof c&&t instanceof c)||i instanceof s||i instanceof o)throw Error("duplicate name '"+t.name+"' in "+this);for(var n=i.nestedArray,r=0;r<n.length;++r)t.add(n[r]);this.remove(i),this.nested||(this.nested={}),t.setOptions(i.options,!0)}}else this.nested={};this.nested[t.name]=t,this instanceof s||this instanceof o||this instanceof u||this instanceof f||t.u||(t.u=t.h),this.w=!0,this.y=!0;for(var e=this;e=e.parent;)e.w=!0,e.y=!0;return t.onAdd(this),l(this)},c.prototype.remove=function(t){if(!(t instanceof r))throw TypeError("object must be a ReflectionObject");if(t.parent!==this)throw Error(t+" is not a member of "+this);return delete this.nested[t.name],Object.keys(this.nested).length||(this.nested=it),t.onRemove(this),l(this)},c.prototype.define=function(t,i){if(h.isString(t))t=t.split(".");else if(!Array.isArray(t))throw TypeError("illegal path");if(t&&t.length&&""===t[0])throw Error("path must be relative");if(t.length>h.recursionLimit)throw Error("max depth exceeded");for(var n=this;0<t.length;){var r=t.shift();if(n.nested&&n.nested[r]){if(!((n=n.nested[r])instanceof c))throw Error("path conflicts with non-namespace objects")}else n.add(n=new c(r))}return i&&n.addJSON(i),n},c.prototype.resolveAll=function(){if(this.y){this.w&&this.g(this.u);var t=this.nestedArray,i=0;for(this.resolve();i<t.length;)t[i]instanceof c?t[i++].resolveAll():t[i++].resolve();this.y=!1}return this},c.prototype.g=function(i){return this.w&&(this.w=!1,i=this.u||i,r.prototype.g.call(this,i),this.nestedArray.forEach(t=>{t.g(i)})),this},c.prototype.lookup=function(t,i,n){if("boolean"==typeof i?(n=i,i=it):i&&!Array.isArray(i)&&(i=[i]),h.isString(t)&&t.length){if("."===t)return this.root;t=t.split(".")}else if(!t.length)return this;var r=t.join(".");if(""===t[0])return this.root.lookup(t.slice(1),i);var e=this.root.j&&this.root.j["."+r];if(e&&(!i||~i.indexOf(e.constructor)))return e;if((e=this.k(t,r))&&(!i||~i.indexOf(e.constructor)))return e;if(!n)for(var s=this;s.parent;){if((e=s.parent.k(t,r))&&(!i||~i.indexOf(e.constructor)))return e;s=s.parent}return null},c.prototype.k=function(t,i){if(Object.prototype.hasOwnProperty.call(this.b,i))return this.b[i];var n=this.get(t[0]),r=null;if(n)1===t.length?r=n:n instanceof c&&(t=t.slice(1),r=n.k(t,t.join(".")));else for(var e=0;e<this.nestedArray.length;++e)if(this.v[e]instanceof c&&(n=this.v[e].k(t,i))){r=n;break}return this.b[i]=r},c.prototype.lookupType=function(t){var i=this.lookup(t,[s]);if(i)return i;throw Error("no such type: "+t)},c.prototype.lookupEnum=function(t){var i=this.lookup(t,[u]);if(i)return i;throw Error("no such Enum '"+t+"' in "+this)},c.prototype.lookupTypeOrEnum=function(t){var i=this.lookup(t,[s,u]);if(i)return i;throw Error("no such Type or Enum '"+t+"' in "+this)},c.prototype.lookupService=function(t){var i=this.lookup(t,[o]);if(i)return i;throw Error("no such Service '"+t+"' in "+this)},c.p=function(t,i,n){s=t,o=i,u=n}},{15:15,16:16,28:28,7:7}],15:[function(t,i,n){(i.exports=a).className="ReflectionObject";const r=t(16);var e,o=t(28),s={enum_type:"OPEN",field_presence:"EXPLICIT",json_format:"ALLOW",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"PACKED",utf8_validation:"VERIFY",enforce_naming_style:"STYLE2024",default_symbol_visibility:"EXPORT_TOP_LEVEL"},u={enum_type:"OPEN",field_presence:"EXPLICIT",json_format:"ALLOW",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"PACKED",utf8_validation:"VERIFY",enforce_naming_style:"STYLE_LEGACY",default_symbol_visibility:"EXPORT_ALL"},f={enum_type:"CLOSED",field_presence:"EXPLICIT",json_format:"LEGACY_BEST_EFFORT",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"EXPANDED",utf8_validation:"NONE",enforce_naming_style:"STYLE_LEGACY",default_symbol_visibility:"EXPORT_ALL"},h={enum_type:"OPEN",field_presence:"IMPLICIT",json_format:"ALLOW",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"PACKED",utf8_validation:"VERIFY",enforce_naming_style:"STYLE_LEGACY",default_symbol_visibility:"EXPORT_ALL"};function a(t,i){if(!o.isString(t))throw TypeError("name must be a string");if(i&&!o.isObject(i))throw TypeError("options must be an object");this.options=i,this.parsedOptions=null,this.name=t,this.u=null,this.h="proto2",this.f={},this._=!1,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}Object.defineProperties(a.prototype,{root:{get:function(){for(var t=this;null!==t.parent;)t=t.parent;return t}},fullName:{get:function(){for(var t=[this.name],i=this.parent;i;)t.unshift(i.name),i=i.parent;return t.join(".")}}}),a.prototype.toJSON=function(){throw Error()},a.prototype.onAdd=function(t){this.parent&&this.parent!==t&&this.parent.remove(this),this.parent=t,this.resolved=!1;t=t.root;t instanceof e&&t.O(this)},a.prototype.onRemove=function(t){t=t.root;t instanceof e&&t.A(this),this.parent=null,this.resolved=!1},a.prototype.resolve=function(){return this.resolved||this.root instanceof e&&(this.resolved=!0),this},a.prototype.g=function(t){return this.o(this.u||t)},a.prototype.o=function(t){if(!this._){var i={};if(!t)throw Error("Unknown edition for "+this.fullName);var n=Object.assign(this.options?Object.assign({},this.options.features):{},this.l(t));if(this.u){if("proto2"===t)i=Object.assign({},f);else if("proto3"===t)i=Object.assign({},h);else if("2023"===t)i=Object.assign({},u);else{if("2024"!==t)throw Error("Unknown edition: "+t);i=Object.assign({},s)}this.f=Object.assign(i,n||{})}else if(this.partOf instanceof r){t=Object.assign({},this.partOf.f);this.f=Object.assign(t,n||{})}else if(!this.declaringField){if(!this.parent)throw Error("Unable to find a parent for "+this.fullName);i=Object.assign({},this.parent.f);this.f=Object.assign(i,n||{})}this.extensionField&&(this.extensionField.f=this.f),this._=!0}},a.prototype.l=function(){return{}},a.prototype.getOption=function(t){return this.options?this.options[t]:it},a.prototype.setOption=function(t,i,n){return"__proto__"!==t&&(this.options||(this.options={}),/^features\./.test(t)?o.setProperty(this.options,t,i,n):n&&this.options[t]!==it||(this.getOption(t)!==i&&(this.resolved=!1),this.options[t]=i)),this},a.prototype.setParsedOption=function(i,t,n){var r,e,s;return"__proto__"!==i&&(this.parsedOptions||(this.parsedOptions=[]),r=this.parsedOptions,n?(e=r.find(function(t){return Object.prototype.hasOwnProperty.call(t,i)}))?(s=e[i],o.setProperty(s,n,t)):((e={})[i]=o.setProperty({},n,t),r.push(e)):((s={})[i]=t,r.push(s))),this},a.prototype.setOptions=function(t,i){if(t)for(var n=Object.keys(t),r=0;r<n.length;++r)this.setOption(n[r],t[n[r]],i);return this},a.prototype.toString=function(){var t=this.constructor.className,i=this.fullName;return i.length?t+" "+i:t},a.prototype.a=function(){return this.u&&"proto3"!==this.u?this.u:it},a.p=function(t){e=t}},{16:16,28:28}],16:[function(t,i,n){i.exports=o;var e=t(15),r=(((o.prototype=Object.create(e.prototype)).constructor=o).className="OneOf",t(7)),s=t(28);function o(t,i,n,r){if(Array.isArray(i)||(n=i,i=it),e.call(this,t,n),i!==it&&!Array.isArray(i))throw TypeError("fieldNames must be an Array");this.oneof=i||[],this.fieldsArray=[],this.comment=r}function u(t){if(t.parent)for(var i=0;i<t.fieldsArray.length;++i)t.fieldsArray[i].parent||t.parent.add(t.fieldsArray[i])}o.fromJSON=function(t,i){return new o(t,i.oneof,i.options,i.comment)},o.prototype.toJSON=function(t){t=!!t&&!!t.keepComments;return s.toObject(["options",this.options,"oneof",this.oneof,"comment",t?this.comment:it])},o.prototype.add=function(t){if(t instanceof r)return t.parent&&t.parent!==this.parent&&t.parent.remove(t),this.oneof.push(t.name),this.fieldsArray.push(t),u(t.partOf=this),this;throw TypeError("field must be a Field")},o.prototype.remove=function(t){if(!(t instanceof r))throw TypeError("field must be a Field");var i=this.fieldsArray.indexOf(t);if(i<0)throw Error(t+" is not a member of "+this);return this.fieldsArray.splice(i,1),-1<(i=this.oneof.indexOf(t.name))&&this.oneof.splice(i,1),t.partOf=null,this},o.prototype.onAdd=function(t){e.prototype.onAdd.call(this,t);for(var i=0;i<this.oneof.length;++i){var n=t.get(this.oneof[i]);n&&!n.partOf&&(n.partOf=this).fieldsArray.push(n)}u(this)},o.prototype.onRemove=function(t){for(var i,n=0;n<this.fieldsArray.length;++n)(i=this.fieldsArray[n]).parent&&i.parent.remove(i);e.prototype.onRemove.call(this,t)},Object.defineProperty(o.prototype,"isProto3Optional",{get:function(){var t;return null!=this.fieldsArray&&1===this.fieldsArray.length&&(null!=(t=this.fieldsArray[0]).options&&!0===t.options.proto3_optional)}}),o.d=function(){for(var n=Array(arguments.length),t=0;t<arguments.length;)n[t]=arguments[t++];return function(t,i){s.decorateType(t.constructor).add(new o(i,n)),Object.defineProperty(t,i,{get:s.oneOfGetter(n),set:s.oneOfSetter(n)})}}},{15:15,28:28,7:7}],17:[function(t,i,n){(i.exports=tt).filename=null,tt.defaults={keepCase:!1};var P=t(25),$=t(20),q=t(26),V=t(7),R=t(11),F=t(16),M=t(6),C=t(24),D=t(13),U=t(15),z=t(27),X=t(28),Y=/^[1-9][0-9]*$/,Z=/^-?[1-9][0-9]*$/,G=/^0[x][0-9a-fA-F]+$/,B=/^-?0[x][0-9a-fA-F]+$/,K=/^0[0-7]+$/,H=/^-?0[0-7]+$/,W=X.patterns.numberRe,J=/^[a-zA-Z_][a-zA-Z_0-9]*$/,Q=X.patterns.typeRefRe;function tt(t,i,n){i instanceof $||(n=i,i=new $);var r,e,s,a,o=(n=n||tt.defaults).preferTrailingComment||!1,u=P(t,n.alternateCommentMode||!1),d=u.next,c=u.push,p=u.peek,v=u.skip,l=u.cmnt,f=!0,b="proto2",w=i,m=[],h={},y=n.keepCase?function(t){return t}:X.camelCase;function g(t,i,n){var r=tt.filename;return n||(tt.filename=null),Error("illegal "+(i||"token")+" '"+t+"' ("+(r?r+", ":"")+"line "+u.line+")")}function j(){var t,i=[];do{if('"'!==(t=d())&&"'"!==t)throw g(t)}while(i.push(d()),v(t),'"'===(t=p())||"'"===t);return i.join("")}function E(i){var n=d();switch(n){case"'":case'"':return c(n),j();case"true":case"TRUE":return!0;case"false":case"FALSE":return!1}try{var t=n,r=!0,e=1;switch("-"==(t[0]||"")&&(e=-1,t=t.substring(1)),t){case"inf":case"INF":case"Inf":return e*(1/0);case"nan":case"NAN":case"Nan":case"NaN":return NaN;case"0":return 0}if(Y.test(t))return e*parseInt(t,10);if(G.test(t))return e*parseInt(t,16);if(K.test(t))return e*parseInt(t,8);if(W.test(t))return e*parseFloat(t);throw g(t,"number",r)}catch(t){if(i&&Q.test(n))return n;throw g(n,"value")}}function k(i,n){var t;do{if(!n||'"'!==(r=p())&&"'"!==r)try{i.push([t=_(d()),v("to",!0)?_(d()):t])}catch(t){if(!(n&&Q.test(r)&&2023<=b))throw t;i.push(r)}else{var r=j();if(i.push(r),2023<=b)throw g(r,"id")}}while(v(",",!0));var e={options:it,setOption:function(t,i){this.options===it&&(this.options={}),this.options[t]=i}};A(e,function(t){if("option"!==t)throw g(t);S(e,t),v(";")},function(){N(e)})}function _(t,i){switch(t){case"max":case"MAX":case"Max":return 536870911;case"0":return 0}if(i||"-"!=(t[0]||"")){if(Z.test(t))return parseInt(t,10);if(B.test(t))return parseInt(t,16);if(H.test(t))return parseInt(t,8)}throw g(t,"id")}function O(t,i,n){switch(n===it&&(n=0),i){case"option":return S(t,i),v(";"),!0;case"message":return x(t,0,n+1),!0;case"enum":return L(t),!0;case"export":case"local":return b<"2024"?!1:"export"!==(i=d())&&"local"!==i&&(("message"===i||"enum"===i)&&O(t,i,n));case"service":var h,r=t,e=i,a=n+1;if((a=a===it?0:a)>X.recursionLimit)throw Error("max depth exceeded");if(J.test(e=d()))return A(h=new C(e),function(t){if(!O(h,t,a)&&";"!==t){if("rpc"!==t)throw g(t);var i=h,n=l(),r=t;if(!J.test(t=d()))throw g(t,"name");var e,s,o,u=t;if(v("("),v("stream",!0)&&(s=!0),!Q.test(t=d()))throw g(t);if(e=t,v(")"),v("returns"),v("("),v("stream",!0)&&(o=!0),!Q.test(t=d()))throw g(t);t=t,v(")");var f=new D(u,r,e,t,s,o);f.comment=n,A(f,function(t){if(";"!==t){if("option"!==t)throw g(t);S(f,t),v(";")}}),i.add(f)}}),r.add(h),r===w&&m.push(h),!0;throw g(e,"service name");case"extend":var s,o=t,r=i,u=n;if(Q.test(r=d()))return s=r,A(null,function(t){switch(t){case"required":case"repeated":T(o,t,s,u+1);break;case"optional":T(o,"proto3"===b?"proto3_optional":"optional",s,u+1);break;default:if("proto2"===b||!Q.test(t))throw g(t);c(t),T(o,"optional",s,u+1)}}),!0;throw g(r,"reference")}return!1}function A(t,i,n){var r,e=u.line;if(t&&("string"!=typeof t.comment&&(t.comment=l()),t.filename=tt.filename),v("{",!0)){for(;"}"!==(r=d());)i(r);v(";",!0)}else n&&n(),v(";"),t&&("string"!=typeof t.comment||o)&&(t.comment=l(e)||t.comment)}function x(t,i,f){if((f=f===it?0:f)>X.nestingLimit)throw Error("max depth exceeded");if(!J.test(i=d()))throw g(i,"type name");var h=new q(i);A(h,function(t){if(!O(h,t,f))switch(t){case";":break;case"map":var i=h,n=(v("<"),d());if(z.mapKey[n]===it)throw g(n,"type");v(",");var r=d();if(!Q.test(r))throw g(r,"type");v(">");var e=d();if(!J.test(e))throw g(e,"name");v("=");var s=new R(y(e),_(d()),n,r);A(s,function(t){if("option"!==t)throw g(t);S(s,t),v(";")},function(){N(s)}),i.add(s);break;case"required":if("proto2"!==b)throw g(t);case"repeated":T(h,t,it,f+1);break;case"optional":if("proto3"===b)T(h,"proto3_optional",it,f+1);else{if("proto2"!==b)throw g(t);T(h,"optional",it,f+1)}break;case"oneof":var e=h,n=t,o=f+1;if(!J.test(n=d()))throw g(n,"name");var u=new F(y(n));A(u,function(t){"option"===t?(S(u,t),v(";")):(c(t),T(u,"optional",it,o))}),e.add(u);break;case"extensions":k(h.extensions||(h.extensions=[]));break;case"reserved":k(h.reserved||(h.reserved=[]),!0);break;default:if("proto2"===b||!Q.test(t))throw g(t);c(t),T(h,"optional",it,f+1)}}),t.add(h),t===w&&m.push(h)}function T(t,i,n,r){var e=d();if("group"===e){var s=t,o=i,u=n,f=r;if((f=f===it?0:f)>X.nestingLimit)throw Error("max depth exceeded");if(2023<=b)throw g("group");var h,a,r=d();if(J.test(r))return a=X.lcFirst(r),r===a&&(r=X.ucFirst(r)),v("="),c=_(d()),(h=new q(r)).group=!0,(a=new V(a,c,r,o,u)).filename=tt.filename,A(h,function(t){switch(t){case";":break;case"option":S(h,t),v(";");break;case"required":case"repeated":T(h,t,it,f+1);break;case"optional":T(h,"proto3"===b?"proto3_optional":"optional",it,f+1);break;case"message":x(h,0,f+1);break;case"enum":L(h);break;case"reserved":k(h.reserved||(h.reserved=[]),!0);break;case"export":case"local":if(b<"2024")throw g(t);switch(t=d()){case"message":case"enum":x(h,0,f+1);break;default:throw g(t)}break;default:throw g(t)}}),s.add(h).add(a),void(s===w&&(m.push(h),m.push(a)));throw g(r,"name")}for(;e.endsWith(".")||p().startsWith(".");)e+=d();if(!Q.test(e))throw g(e,"type");var c=d();if(!J.test(c))throw g(c,"name");c=y(c),v("=");var l=new V(c,_(d()),e,i,n);A(l,function(t){if("option"!==t)throw g(t);S(l,t),v(";")},function(){N(l)}),"proto3_optional"===i?(o=new F("_"+c),l.setOption("proto3_optional",!0),o.add(l),t.add(o)):t.add(l),t===w&&m.push(l)}function L(t,i){if(!J.test(i=d()))throw g(i,"name");var s=new M(i);A(s,function(t){switch(t){case";":break;case"option":S(s,t),v(";");break;case"reserved":k(s.reserved||(s.reserved=[]),!0),s.reserved===it&&(s.reserved=[]);break;default:var i=s,n=t;if(!J.test(n))throw g(n,"name");v("=");var r=_(d(),!0),e={options:it,getOption:function(t){return this.options[t]},setOption:function(t,i){U.prototype.setOption.call(e,t,i)},setParsedOption:function(){return it}};return A(e,function(t){if("option"!==t)throw g(t);S(e,t),v(";")},function(){N(e)}),void i.add(n,r,e.comment,e.parsedOptions||e.options)}}),t.add(s),t===w&&m.push(s)}function S(t,i){var n=!0;for("option"===i&&(i=d());"="!==i;){if("("===i&&(r=d(),v(")"),i="("+r+")"),n){if(n=!1,i.includes(".")&&!i.includes("(")){var r=i.split("."),e=r[0]+".";i=r[1];continue}e=i}else f=f?f+i:i;i=d()}var s,o,u=f?e.concat(f):e,u=function t(i,n,r){r===it&&(r=0);if(r>X.recursionLimit)throw Error("max depth exceeded");if(v("{",!0)){for(var e={};!v("}",!0);){if(!J.test(a=d()))throw g(a,"name");if(null===a)throw g(a,"end of input");var s,o,u=a;if(v(":",!0),"{"===p())s=t(i,n+"."+a,r+1);else if("["===p()){if(s=[],v("[",!0)&&!v("]",!0)){for(;o=E(!0),s.push(o),v(",",!0););v("]"),void 0!==o&&I(i,n+"."+a,o)}}else s=E(!0),I(i,n+"."+a,s);var f=e[u];f&&(s=[].concat(f).concat(s)),"__proto__"!==u&&(e[u]=s),v(",",!0),v(";",!0)}return e}var h=E(!0);I(i,n,h);return h}(t,u),f=f&&"."===f[0]?f.slice(1):f;e=e&&"."===e[e.length-1]?e.slice(0,-1):e,s=e,u=u,o=f,(t=t).setParsedOption&&t.setParsedOption(s,u,o)}function I(t,i,n){w===t&&/^features\./.test(i)?h[i]=n:t.setOption&&t.setOption(i,n)}function N(t){if(v("[",!0)){for(;S(t,"option"),v(",",!0););v("]")}}for(;null!==(a=d());)switch(a){case";":break;case"package":if(!f)throw g(a);if(r!==it)throw g("package");if(r=d(),!Q.test(r))throw g(r,"name");w=w.define(r),v(";");break;case"import":!function(){var t,i;switch(p()){case"option":if(b<"2024")throw g("option");return d(),j(),v(";");case"weak":i=s=s||[],d();break;case"public":d();default:i=e=e||[]}t=j(),v(";"),i.push(t)}();break;case"syntax":if(!f)throw g(a);if(v("="),(b=j())<2023)throw g(b,"syntax");v(";");break;case"edition":if(!f)throw g(a);if(v("="),b=j(),!["2023","2024"].includes(b))throw g(b,"edition");v(";");break;case"option":S(w,a),v(";",!0);break;default:if(O(w,a,0)){f=!1;continue}throw g(a)}return m.forEach(i=>{i.u=b,Object.keys(h).forEach(t=>{i.getOption(t)===it&&i.setOption(t,h[t],!0)})}),tt.filename=null,{package:r,imports:e,weakImports:s,root:i}}},{11:11,13:13,15:15,16:16,20:20,24:24,25:25,26:26,27:27,28:28,6:6,7:7}],18:[function(t,i,n){i.exports=f;var r,e=t(38),s=e.LongBits,o=e.utf8;function u(t,i){return RangeError("index out of range: "+t.pos+" + "+(i||1)+" > "+t.len)}function f(t){this.buf=t,this.pos=0,this.len=t.length}function h(){return e.Buffer?function(t){return(f.create=function(t){return e.Buffer.isBuffer(t)?new r(t):a(t)})(t)}:a}var a="undefined"!=typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new f(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new f(t);throw Error("illegal buffer")};function c(){var t=new s(0,0),i=0;if(!(4<this.len-this.pos)){for(;i<3;++i){if(this.pos>=this.len)throw u(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*i)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(127&this.buf[this.pos++])<<7*i)>>>0,t}for(;i<4;++i)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*i)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t;if(i=0,4<this.len-this.pos){for(;i<5;++i)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*i+3)>>>0,this.buf[this.pos++]<128)return t}else for(;i<5;++i){if(this.pos>=this.len)throw u(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*i+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function l(t,i){return(t[i-4]|t[i-3]<<8|t[i-2]<<16|t[i-1]<<24)>>>0}function d(){if(this.pos+8>this.len)throw u(this,8);return new s(l(this.buf,this.pos+=4),l(this.buf,this.pos+=4))}f.create=h(),f.prototype.x=e.Array.prototype.subarray||e.Array.prototype.slice,f.prototype.raw=function(t,i){return Array.isArray(this.buf)?this.buf.slice(t,i):t===i?new this.buf.constructor(0):this.x.call(this.buf,t,i)},f.prototype.uint32=function(){var t=this.buf,i=this.pos,n=(127&t[i])>>>0;if(t[i++]<128)return this.pos=i,n;if(n=(n|(127&t[i])<<7)>>>0,t[i++]<128)return this.pos=i,n;if(n=(n|(127&t[i])<<14)>>>0,t[i++]<128)return this.pos=i,n;if(n=(n|(127&t[i])<<21)>>>0,t[i++]<128)return this.pos=i,n;if(n=(n|(15&t[i])<<28)>>>0,t[i++]<128)return this.pos=i,n;for(var r=0;r<5;++r){if(i>=this.len)throw this.pos=i,u(this);if(t[i++]<128)return this.pos=i,n}throw this.pos=i,Error("invalid varint encoding")},f.prototype.tag=function(){var t=this.buf,i=this.pos,n=(127&t[i])>>>0;if(t[i++]<128)return this.pos=i,n;if(n=(n|(127&t[i])<<7)>>>0,t[i++]<128)return this.pos=i,n;if(n=(n|(127&t[i])<<14)>>>0,t[i++]<128)return this.pos=i,n;if(n=(n|(127&t[i])<<21)>>>0,t[i++]<128)return this.pos=i,n;if(n=(n|(15&t[i])<<28)>>>0,t[i]<128&&0==(112&t[i]))return this.pos=i+1,n;throw this.pos=i+1,Error("invalid tag encoding")},f.prototype.int32=function(){return 0|this.uint32()},f.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},f.prototype.bool=function(){for(var t,i=!1,n=0;n<10;++n){if(this.pos>=this.len)throw u(this);if(127&(t=this.buf[this.pos++])&&(i=!0),t<128)return i}throw Error("invalid varint encoding")},f.prototype.fixed32=function(){if(this.pos+4>this.len)throw u(this,4);return l(this.buf,this.pos+=4)},f.prototype.sfixed32=function(){if(this.pos+4>this.len)throw u(this,4);return 0|l(this.buf,this.pos+=4)},f.prototype.float=function(){if(this.pos+4>this.len)throw u(this,4);var t=e.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},f.prototype.double=function(){if(this.pos+8>this.len)throw u(this,4);var t=e.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},f.prototype.bytes=function(){var t=this.uint32(),i=this.pos,n=this.pos+t;if(n>this.len)throw u(this,t);return this.pos=n,this.raw(i,n)},f.prototype.string=function(){var t=this.uint32(),i=this.pos,n=this.pos+t;if(n>this.len)throw u(this,t);return this.pos=n,o.read(this.buf,i,n)},f.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw u(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw u(this)}while(128&this.buf[this.pos++]);return this},f.recursionLimit=e.recursionLimit,f.prototype.skipType=function(t,i,n){if(f.recursionLimit<(i=i===it?0:i))throw Error("max depth exceeded");if(0===n)throw Error("illegal tag: field number 0");switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;;){var r=this.tag(),e=r>>>3;if(!e)throw Error("illegal tag: field number 0");if(4===(t=7&r)){if(n!==it&&e!==n)throw Error("invalid end group tag");break}this.skipType(t,i+1,e)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},f.p=function(t){r=t,f.create=h(),r.p();var i=e.Long?"toLong":"toNumber";e.merge(f.prototype,{int64:function(){return c.call(this)[i](!1)},uint64:function(){return c.call(this)[i](!0)},sint64:function(){return c.call(this).zzDecode()[i](!1)},fixed64:function(){return d.call(this)[i](!0)},sfixed64:function(){return d.call(this)[i](!1)}})}},{38:38}],19:[function(t,i,n){i.exports=s;var r=t(18),e=((s.prototype=Object.create(r.prototype)).constructor=s,t(38));function s(t){r.call(this,t)}s.p=function(){e.Buffer&&(s.prototype.x=e.Buffer.prototype.slice)},s.prototype.raw=function(t,i){return t===i?e.Buffer.alloc(0):this.x.call(this.buf,t,i)},s.prototype.string=function(){var t=this.uint32(),i=this.pos,n=this.pos+t;if(n>this.len)throw RangeError("index out of range: "+this.pos+" + "+t+" > "+this.len);return this.pos=n,this.buf.utf8Slice?this.buf.utf8Slice(i,n):this.buf.toString("utf-8",i,n)},s.p()},{18:18,38:38}],20:[function(t,i,n){i.exports=f;var r,d,p,e=t(14),s=(((f.prototype=Object.create(e.prototype)).constructor=f).className="Root",t(7)),o=t(6),u=t(16),v=t(28);function f(t){e.call(this,"",t),this.deferred=[],this.files=[],this.u="proto2",this.j={}}function b(){}f.fromJSON=function(t,i,n){if((n=n===it?0:n)>v.recursionLimit)throw Error("max depth exceeded");return i=i||new f,t.options&&i.setOptions(t.options),i.addJSON(t.nested,n).resolveAll()},f.prototype.resolvePath=v.path.resolve,f.prototype.fetch=v.fetch,f.prototype.load=function t(i,s,e){"function"==typeof s&&(e=s,s=it);var o=this;if(!e)return v.asPromise(t,o,i,s);var u=e===b;function f(t,i){if(e){if(u)throw t;i&&i.resolveAll();var n=e;e=null,n(t,i)}}function h(t){var i=t.lastIndexOf("google/protobuf/");if(-1<i){i=t.substring(i);if(Object.prototype.hasOwnProperty.call(p,i))return i}return Object.prototype.hasOwnProperty.call(p,t)?t:null}function a(t,i){try{if(v.isString(i)&&"{"==(i[0]||"")&&(i=JSON.parse(i)),v.isString(i)){d.filename=t;var n,r=d(i,o,s),e=0;if(r.imports)for(;e<r.imports.length;++e)(n=h(r.imports[e])||o.resolvePath(t,r.imports[e]))&&c(n);if(r.weakImports)for(e=0;e<r.weakImports.length;++e)(n=h(r.weakImports[e])||o.resolvePath(t,r.weakImports[e]))&&c(n,!0)}else o.setOptions(i.options).addJSON(i.nested)}catch(t){f(t)}u||l||f(null,o)}function c(n,r){if(n=h(n)||n,!~o.files.indexOf(n))if(o.files.push(n),Object.prototype.hasOwnProperty.call(p,n))u?a(n,p[n]):(++l,setTimeout(function(){--l,a(n,p[n])}));else if(u){var t;try{t=v.fs.readFileSync(n).toString("utf8")}catch(t){return void(r||f(t))}a(n,t)}else++l,o.fetch(n,function(t,i){--l,e&&(t?r?l||f(null,o):f(t):a(n,i))})}var l=0;v.isString(i)&&(i=[i]);for(var n,r=0;r<i.length;++r)(n=o.resolvePath("",i[r]))&&c(n);return u?o.resolveAll():l||f(null,o),o},f.prototype.loadSync=function(t,i){if(v.isNode)return this.load(t,i,b);throw Error("not supported")},f.prototype.resolveAll=function(){if(!this.y)return this;if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(t){return"'extend "+t.extend+"' in "+t.parent.fullName}).join(", "));return e.prototype.resolveAll.call(this)};var h=/^[A-Z]/;function a(t,i){var n,r=i.parent.lookup(i.extend);if(r)return n=new s(i.fullName,i.id,i.type,i.rule,it,i.options),r.ge