@nutrient-sdk/viewer
Version:
View and annotate PDF files in your web app. Full support for mobile and desktop. Runs in the browser using WASM.
13 lines • 77 kB
JavaScript
/*!
* Nutrient Web SDK 1.15.1 (https://www.nutrient.io/sdk/web)
*
* Copyright (c) 2016-2026 PSPDFKit GmbH. All rights reserved.
*
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
* This notice may not be removed from this file.
*
* PSPDFKit uses several open source third-party components: https://www.nutrient.io/legal/acknowledgements/web-acknowledgements/
*/
"use strict";(globalThis.webpackChunkNutrientViewer=globalThis.webpackChunkNutrientViewer||[]).push([[340],{68260(e,t,n){n(78915),n(97510),n(91830)},56741(e,t,n){n.d(t,{wU:()=>r.w,Zk:()=>a});n(17863),n(78047),n(4868),n(46924),n(37332),n(68260),n(92865);n(22038);var r=n(14641);function a(e,t,...n){return n.reduce((e,t)=>e.nestedMessages[t],e.messages[t])}const o="@bufbuild/protobuf",i={isMessage:{typeOnly:!1,bootstrapWktFrom:"../../is-message.js",from:o},Message:{typeOnly:!0,bootstrapWktFrom:"../../types.js",from:o},create:{typeOnly:!1,bootstrapWktFrom:"../../create.js",from:o},fromJson:{typeOnly:!1,bootstrapWktFrom:"../../from-json.js",from:o},fromJsonString:{typeOnly:!1,bootstrapWktFrom:"../../from-json.js",from:o},fromBinary:{typeOnly:!1,bootstrapWktFrom:"../../from-binary.js",from:o},toBinary:{typeOnly:!1,bootstrapWktFrom:"../../to-binary.js",from:o},toJson:{typeOnly:!1,bootstrapWktFrom:"../../to-json.js",from:o},toJsonString:{typeOnly:!1,bootstrapWktFrom:"../../to-json.js",from:o},protoInt64:{typeOnly:!1,bootstrapWktFrom:"../../proto-int64.js",from:o},JsonValue:{typeOnly:!0,bootstrapWktFrom:"../../json-value.js",from:o},JsonObject:{typeOnly:!0,bootstrapWktFrom:"../../json-value.js",from:o},codegen:{boot:{typeOnly:!1,bootstrapWktFrom:"../../codegenv2/boot.js",from:o+"/codegenv2"},fileDesc:{typeOnly:!1,bootstrapWktFrom:"../../codegenv2/file.js",from:o+"/codegenv2"},enumDesc:{typeOnly:!1,bootstrapWktFrom:"../../codegenv2/enum.js",from:o+"/codegenv2"},extDesc:{typeOnly:!1,bootstrapWktFrom:"../../codegenv2/extension.js",from:o+"/codegenv2"},messageDesc:{typeOnly:!1,bootstrapWktFrom:"../../codegenv2/message.js",from:o+"/codegenv2"},serviceDesc:{typeOnly:!1,bootstrapWktFrom:"../../codegenv2/service.js",from:o+"/codegenv2"},tsEnum:{typeOnly:!1,bootstrapWktFrom:"../../codegenv2/enum.js",from:o+"/codegenv2"},GenFile:{typeOnly:!0,bootstrapWktFrom:"../../codegenv2/types.js",from:o+"/codegenv2"},GenEnum:{typeOnly:!0,bootstrapWktFrom:"../../codegenv2/types.js",from:o+"/codegenv2"},GenExtension:{typeOnly:!0,bootstrapWktFrom:"../../codegenv2/types.js",from:o+"/codegenv2"},GenMessage:{typeOnly:!0,bootstrapWktFrom:"../../codegenv2/types.js",from:o+"/codegenv2"},GenService:{typeOnly:!0,bootstrapWktFrom:"../../codegenv2/types.js",from:o+"/codegenv2"}}};const s=o;Object.assign(Object.assign({},i),{codegen:{boot:{typeOnly:!1,bootstrapWktFrom:"../../codegenv1/boot.js",from:s+"/codegenv1"},fileDesc:{typeOnly:!1,bootstrapWktFrom:"../../codegenv1/file.js",from:s+"/codegenv1"},enumDesc:{typeOnly:!1,bootstrapWktFrom:"../../codegenv1/enum.js",from:s+"/codegenv1"},extDesc:{typeOnly:!1,bootstrapWktFrom:"../../codegenv1/extension.js",from:s+"/codegenv1"},messageDesc:{typeOnly:!1,bootstrapWktFrom:"../../codegenv1/message.js",from:s+"/codegenv1"},serviceDesc:{typeOnly:!1,bootstrapWktFrom:"../../codegenv1/service.js",from:s+"/codegenv1"},tsEnum:{typeOnly:!1,bootstrapWktFrom:"../../codegenv1/enum.js",from:s+"/codegenv1"},GenFile:{typeOnly:!0,bootstrapWktFrom:"../../codegenv1/types.js",from:s+"/codegenv1"},GenEnum:{typeOnly:!0,bootstrapWktFrom:"../../codegenv1/types.js",from:s+"/codegenv1"},GenExtension:{typeOnly:!0,bootstrapWktFrom:"../../codegenv1/types.js",from:s+"/codegenv1"},GenMessage:{typeOnly:!0,bootstrapWktFrom:"../../codegenv1/types.js",from:s+"/codegenv1"},GenService:{typeOnly:!0,bootstrapWktFrom:"../../codegenv1/types.js",from:s+"/codegenv1"}}});n(78915)},17863(e,t,n){n.d(t,{z:()=>o});var r=n(29929),a=n(82237);function o(e){const t=function(e){const t=Object.create({syntax:"",edition:0});return Object.assign(t,Object.assign(Object.assign({$typeName:"google.protobuf.FileDescriptorProto",dependency:[],publicDependency:[],weakDependency:[],optionDependency:[],service:[],extension:[]},e),{messageType:e.messageType.map(i),enumType:e.enumType.map(l)}))}(e);t.messageType.forEach(r.h);return(0,a.uO)(t,()=>{}).getFile(t.name)}function i(e){var t,n,r,a,o,u,m,c;const p=Object.create({visibility:0});return Object.assign(p,{$typeName:"google.protobuf.DescriptorProto",name:e.name,field:null!==(n=null===(t=e.field)||void 0===t?void 0:t.map(s))&&void 0!==n?n:[],extension:[],nestedType:null!==(a=null===(r=e.nestedType)||void 0===r?void 0:r.map(i))&&void 0!==a?a:[],enumType:null!==(u=null===(o=e.enumType)||void 0===o?void 0:o.map(l))&&void 0!==u?u:[],extensionRange:null!==(c=null===(m=e.extensionRange)||void 0===m?void 0:m.map(e=>Object.assign({$typeName:"google.protobuf.DescriptorProto.ExtensionRange"},e)))&&void 0!==c?c:[],oneofDecl:[],reservedRange:[],reservedName:[]})}function s(e){const t=Object.create({label:1,typeName:"",extendee:"",defaultValue:"",oneofIndex:0,jsonName:"",proto3Optional:!1});return Object.assign(t,Object.assign(Object.assign({$typeName:"google.protobuf.FieldDescriptorProto"},e),{options:e.options?u(e.options):void 0}))}function u(e){var t,n,r;const a=Object.create({ctype:0,packed:!1,jstype:0,lazy:!1,unverifiedLazy:!1,deprecated:!1,weak:!1,debugRedact:!1,retention:0});return Object.assign(a,Object.assign(Object.assign({$typeName:"google.protobuf.FieldOptions"},e),{targets:null!==(t=e.targets)&&void 0!==t?t:[],editionDefaults:null!==(r=null===(n=e.editionDefaults)||void 0===n?void 0:n.map(e=>Object.assign({$typeName:"google.protobuf.FieldOptions.EditionDefault"},e)))&&void 0!==r?r:[],uninterpretedOption:[]}))}function l(e){const t=Object.create({visibility:0});return Object.assign(t,{$typeName:"google.protobuf.EnumDescriptorProto",name:e.name,reservedName:[],reservedRange:[],value:e.value.map(e=>Object.assign({$typeName:"google.protobuf.EnumValueDescriptorProto"},e))})}},22038(e,t,n){},14641(e,t,n){n.d(t,{w:()=>u});var r=n(46924),a=n(92865),o=n(82237),i=n(29929),s=n(84407);function u(e,t){var n;const u=(0,s.Er)(a.tr,(0,r.u)(e));u.messageType.forEach(i.h),u.dependency=null!==(n=null==t?void 0:t.map(e=>e.proto.name))&&void 0!==n?n:[];return(0,o.uO)(u,e=>null==t?void 0:t.find(t=>t.proto.name===e)).getFile(u.name)}},93204(e,t,n){function r(e,t,...n){return n.reduce((e,t)=>e.nestedMessages[t],e.messages[t])}n.d(t,{Z:()=>r})},29929(e,t,n){n.d(t,{h:()=>o});var r=n(78047),a=n(91689);function o(e){for(const t of e.field)(0,a.b1)(t,"jsonName")||(t.jsonName=(0,r.RM)(t.name));e.nestedType.forEach(o)}},92657(e,t,n){n.d(t,{v:()=>l});var r=n(1719),a=n(78915),o=n(10475),i=n(91830),s=n(91689),u=n(78534);function l(e,t){if((0,r.K)(t,e))return t;const n=function(e){let t;if(function(e){switch(e.file.edition){case 999:return!1;case 998:return!0;default:return e.fields.some(e=>2!=e.presence&&"message"!=e.fieldKind&&!e.oneof)}}(e)){const n=E.get(e);let r,a;if(n)({prototype:r,members:a}=n);else{r={},a=new Set;for(const t of e.members)"oneof"!=t.kind&&("scalar"!=t.fieldKind&&"enum"!=t.fieldKind||2!=t.presence&&(a.add(t),r[t.localName]=y(t)));E.set(e,{prototype:r,members:a})}t=Object.create(r),t.$typeName=e.typeName;for(const n of e.members)if(!a.has(n)){if("field"==n.kind){if("message"==n.fieldKind)continue;if(("scalar"==n.fieldKind||"enum"==n.fieldKind)&&2!=n.presence)continue}t[n.localName]=y(n)}}else{t={$typeName:e.typeName};for(const n of e.members)"oneof"!=n.kind&&2!=n.presence||(t[n.localName]=y(n))}return t}(e);return void 0!==t&&function(e,t,n){for(const r of e.members){let e,a=n[r.localName];if(null!=a){if("oneof"==r.kind){const t=(0,s.mO)(n,r);if(!t)continue;e=t,a=(0,s.$v)(n,t)}else e=r;switch(e.fieldKind){case"message":a=f(e,a);break;case"scalar":a=m(e,a);break;case"list":a=p(e,a);break;case"map":a=c(e,a)}(0,s.lA)(t,e,a)}}}(e,n,t),n}function m(e,t){return e.scalar==a.L.BYTES?d(t):t}function c(e,t){if((0,i.Gv)(t)){if(e.scalar==a.L.BYTES)return b(t,d);if("message"==e.mapKind)return b(t,t=>f(e,t))}return t}function p(e,t){if(Array.isArray(t)){if(e.scalar==a.L.BYTES)return t.map(d);if("message"==e.listKind)return t.map(t=>f(e,t))}return t}function f(e,t){if("message"==e.fieldKind&&!e.oneof&&(0,u.l)(e.message))return m(e.message.fields[0],t);if((0,i.Gv)(t)){if("google.protobuf.Struct"==e.message.typeName&&"google.protobuf.Value"!==e.parent.typeName)return t;if(!(0,r.K)(t,e.message))return l(e.message,t)}return t}function d(e){return Array.isArray(e)?new Uint8Array(e):e}function b(e,t){const n={};for(const r of Object.entries(e))n[r[0]]=t(r[1]);return n}const g=Symbol(),E=new WeakMap;function y(e){if("oneof"==e.kind)return{case:void 0};if("list"==e.fieldKind)return[];if("map"==e.fieldKind)return{};if("message"==e.fieldKind)return g;const t=e.getDefaultValue();return void 0!==t?"scalar"==e.fieldKind&&e.longAsString?t.toString():t:"scalar"==e.fieldKind?(0,o.M7)(e.scalar,e.longAsString):e.enum.values[0].number}},78915(e,t,n){var r;n.d(t,{L:()=>r}),function(e){e[e.DOUBLE=1]="DOUBLE",e[e.FLOAT=2]="FLOAT",e[e.INT64=3]="INT64",e[e.UINT64=4]="UINT64",e[e.INT32=5]="INT32",e[e.FIXED64=6]="FIXED64",e[e.FIXED32=7]="FIXED32",e[e.BOOL=8]="BOOL",e[e.STRING=9]="STRING",e[e.BYTES=12]="BYTES",e[e.UINT32=13]="UINT32",e[e.SFIXED32=15]="SFIXED32",e[e.SFIXED64=16]="SFIXED64",e[e.SINT32=17]="SINT32",e[e.SINT64=18]="SINT64"}(r||(r={}))},4868(e,t,n){n(91689)},84407(e,t,n){n.d(t,{Er:()=>m});var r=n(78915),a=n(10475),o=n(97510),i=n(28470),s=n(36197);const u={readUnknownFields:!0};function l(e){return e?Object.assign(Object.assign({},u),e):u}function m(e,t,n){const r=(0,o.E4)(e,void 0,!1);return c(r,new i.V5(t),l(n),!1,t.byteLength),r.message}function c(e,t,n,r,a){var o;const s=r?t.len:t.pos+a;let u,l;const m=null!==(o=e.getUnknown())&&void 0!==o?o:[];for(;t.pos<s&&([u,l]=t.tag(),!r||l!=i.O0.EndGroup);){const r=e.findNumber(u);if(!r){const e=t.skip(l,u);n.readUnknownFields&&m.push({no:u,wireType:l,data:e});continue}p(e,t,r,l,n)}if(r&&(l!=i.O0.EndGroup||u!==a))throw new Error("invalid end group tag");m.length>0&&e.setUnknown(m)}function p(e,t,n,u,l){var m;switch(n.fieldKind){case"scalar":e.set(n,d(t,n.scalar));break;case"enum":const c=d(t,r.L.INT32);if(n.enum.open)e.set(n,c);else{if(n.enum.values.some(e=>e.number===c))e.set(n,c);else if(l.readUnknownFields){const t=[];(0,s.f7)(c,t);const r=null!==(m=e.getUnknown())&&void 0!==m?m:[];r.push({no:n.number,wireType:u,data:new Uint8Array(t)}),e.setUnknown(r)}}break;case"message":e.set(n,f(t,l,n,e.get(n)));break;case"list":!function(e,t,n,a){var o;const s=n.field();if("message"===s.listKind)return void n.add(f(e,a,s));const u=null!==(o=s.scalar)&&void 0!==o?o:r.L.INT32,l=t==i.O0.LengthDelimited&&u!=r.L.STRING&&u!=r.L.BYTES;if(!l)return void n.add(d(e,u));const m=e.uint32()+e.pos;for(;e.pos<m;)n.add(d(e,u))}(t,u,e.get(n),l);break;case"map":!function(e,t,n){const r=t.field();let i,s;const u=e.uint32(),l=e.pos+u;for(;e.pos<l;){const[t]=e.tag();switch(t){case 1:i=d(e,r.mapKey);break;case 2:switch(r.mapKind){case"scalar":s=d(e,r.scalar);break;case"enum":s=e.int32();break;case"message":s=f(e,n,r)}}}void 0===i&&(i=(0,a.M7)(r.mapKey,!1));if(void 0===s)switch(r.mapKind){case"scalar":s=(0,a.M7)(r.scalar,!1);break;case"enum":s=r.enum.values[0].number;break;case"message":s=(0,o.E4)(r.message,void 0,!1)}t.set(i,s)}(t,e.get(n),l)}}function f(e,t,n,r){const a=n.delimitedEncoding,i=null!=r?r:(0,o.E4)(n.message,void 0,!1);return c(i,e,t,a,a?n.number:e.uint32()),i}function d(e,t){switch(t){case r.L.STRING:return e.string();case r.L.BOOL:return e.bool();case r.L.DOUBLE:return e.double();case r.L.FLOAT:return e.float();case r.L.INT32:return e.int32();case r.L.INT64:return e.int64();case r.L.UINT64:return e.uint64();case r.L.FIXED64:return e.fixed64();case r.L.BYTES:return e.bytes();case r.L.FIXED32:return e.fixed32();case r.L.SFIXED32:return e.sfixed32();case r.L.SFIXED64:return e.sfixed64();case r.L.SINT64:return e.sint64();case r.L.UINT32:return e.uint32();case r.L.SINT32:return e.sint32()}}},44008(e,t,n){n.d(t,{vt:()=>r.v,Rm:()=>o.R});n(1719);var r=n(92657),a=(n(68260),n(78915),n(10475),n(97510),n(14641));n(93204);n(75397);var o=n(37332);n(84407);n(78534);n(22038);var i;!function(e){e[e.TYPE_UNKNOWN=0]="TYPE_UNKNOWN",e[e.TYPE_DOUBLE=1]="TYPE_DOUBLE",e[e.TYPE_FLOAT=2]="TYPE_FLOAT",e[e.TYPE_INT64=3]="TYPE_INT64",e[e.TYPE_UINT64=4]="TYPE_UINT64",e[e.TYPE_INT32=5]="TYPE_INT32",e[e.TYPE_FIXED64=6]="TYPE_FIXED64",e[e.TYPE_FIXED32=7]="TYPE_FIXED32",e[e.TYPE_BOOL=8]="TYPE_BOOL",e[e.TYPE_STRING=9]="TYPE_STRING",e[e.TYPE_GROUP=10]="TYPE_GROUP",e[e.TYPE_MESSAGE=11]="TYPE_MESSAGE",e[e.TYPE_BYTES=12]="TYPE_BYTES",e[e.TYPE_UINT32=13]="TYPE_UINT32",e[e.TYPE_ENUM=14]="TYPE_ENUM",e[e.TYPE_SFIXED32=15]="TYPE_SFIXED32",e[e.TYPE_SFIXED64=16]="TYPE_SFIXED64",e[e.TYPE_SINT32=17]="TYPE_SINT32",e[e.TYPE_SINT64=18]="TYPE_SINT64"}(i||(i={}));var s;!function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.OPTIONAL=1]="OPTIONAL",e[e.REQUIRED=2]="REQUIRED",e[e.REPEATED=3]="REPEATED"}(s||(s={}));var u;!function(e){e[e.PROTO2=0]="PROTO2",e[e.PROTO3=1]="PROTO3",e[e.EDITIONS=2]="EDITIONS"}(u||(u={}));var l=n(92865);l.PX;var m;!function(e){e[e.STRING_TYPE_UNKNOWN=0]="STRING_TYPE_UNKNOWN",e[e.VIEW=1]="VIEW",e[e.CORD=2]="CORD",e[e.STRING=3]="STRING"}(m||(m={}));l.PX;var c;!function(e){e[e.API_LEVEL_UNSPECIFIED=0]="API_LEVEL_UNSPECIFIED",e[e.API_OPEN=1]="API_OPEN",e[e.API_HYBRID=2]="API_HYBRID",e[e.API_OPAQUE=3]="API_OPAQUE"}(c||(c={}));var p;!function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.KEEP=1]="KEEP",e[e.GENERATE_BOTH=2]="GENERATE_BOTH",e[e.STRIP=3]="STRIP"}(p||(p={}));l.PX;var f;!function(e){e[e.NEST_IN_FILE_CLASS_UNKNOWN=0]="NEST_IN_FILE_CLASS_UNKNOWN",e[e.NO=1]="NO",e[e.YES=2]="YES",e[e.LEGACY=3]="LEGACY"}(f||(f={}));var d;!function(e){e[e.UTF8_VALIDATION_UNKNOWN=0]="UTF8_VALIDATION_UNKNOWN",e[e.DEFAULT=1]="DEFAULT",e[e.VERIFY=2]="VERIFY"}(d||(d={}));var b;!function(e){e[e.NULL_VALUE=0]="NULL_VALUE"}(b||(b={}));l.PX;var g;!function(e){e[e.NONE=0]="NONE",e[e.PROTO3_OPTIONAL=1]="PROTO3_OPTIONAL",e[e.SUPPORTS_EDITIONS=2]="SUPPORTS_EDITIONS"}(g||(g={}));n(28470);n(4868),n(82237),n(78047),n(46924),n(47439),n(85998);n(96159);n(7097);Symbol();Symbol()},1719(e,t,n){function r(e,t){return!(null===e||"object"!=typeof e||!("$typeName"in e)||"string"!=typeof e.$typeName)&&(void 0===t||t.typeName===e.$typeName)}n.d(t,{K:()=>r})},75397(e,t,n){n.d(t,{M:()=>a});var r=n(36197);const a=o();function o(){const e=new DataView(new ArrayBuffer(8));if("function"==typeof BigInt&&"function"==typeof e.getBigInt64&&"function"==typeof e.getBigUint64&&"function"==typeof e.setBigInt64&&"function"==typeof e.setBigUint64&&(!!globalThis.Deno||"object"!=typeof process||"object"!=typeof process.env||"1"!==process.env.BUF_BIGINT_DISABLE)){const t=BigInt("-9223372036854775808"),n=BigInt("9223372036854775807"),r=BigInt("0"),a=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(e){const r="bigint"==typeof e?e:BigInt(e);if(r>n||r<t)throw new Error(`invalid int64: ${e}`);return r},uParse(e){const t="bigint"==typeof e?e:BigInt(e);if(t>a||t<r)throw new Error(`invalid uint64: ${e}`);return t},enc(t){return e.setBigInt64(0,this.parse(t),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},uEnc(t){return e.setBigInt64(0,this.uParse(t),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},dec:(t,n)=>(e.setInt32(0,t,!0),e.setInt32(4,n,!0),e.getBigInt64(0,!0)),uDec:(t,n)=>(e.setInt32(0,t,!0),e.setInt32(4,n,!0),e.getBigUint64(0,!0))}}return{zero:"0",supported:!1,parse:e=>("string"!=typeof e&&(e=e.toString()),i(e),e),uParse:e=>("string"!=typeof e&&(e=e.toString()),s(e),e),enc:e=>("string"!=typeof e&&(e=e.toString()),i(e),(0,r.LJ)(e)),uEnc:e=>("string"!=typeof e&&(e=e.toString()),s(e),(0,r.LJ)(e)),dec:(e,t)=>(0,r._Q)(e,t),uDec:(e,t)=>(0,r.Hc)(e,t)}}function i(e){if(!/^-?[0-9]+$/.test(e))throw new Error("invalid int64: "+e)}function s(e){if(!/^[0-9]+$/.test(e))throw new Error("invalid uint64: "+e)}},7097(e,t,n){n.d(t,{b:()=>r});class r extends Error{constructor(e,t,n="FieldValueInvalidError"){super(t),this.name=n,this.field=()=>e}}},91830(e,t,n){n.d(t,{G6:()=>i,Gv:()=>a,LT:()=>s,sG:()=>o});var r=n(91689);function a(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function o(e,t){var n,o,i,s;if(a(e)&&r.I4 in e&&"add"in e&&"field"in e&&"function"==typeof e.field){if(void 0!==t){const r=t,a=e.field();return r.listKind==a.listKind&&r.scalar===a.scalar&&(null===(n=r.message)||void 0===n?void 0:n.typeName)===(null===(o=a.message)||void 0===o?void 0:o.typeName)&&(null===(i=r.enum)||void 0===i?void 0:i.typeName)===(null===(s=a.enum)||void 0===s?void 0:s.typeName)}return!0}return!1}function i(e,t){var n,o,i,s;if(a(e)&&r.I4 in e&&"has"in e&&"field"in e&&"function"==typeof e.field){if(void 0!==t){const r=t,a=e.field();return r.mapKey===a.mapKey&&r.mapKind==a.mapKind&&r.scalar===a.scalar&&(null===(n=r.message)||void 0===n?void 0:n.typeName)===(null===(o=a.message)||void 0===o?void 0:o.typeName)&&(null===(i=r.enum)||void 0===i?void 0:i.typeName)===(null===(s=a.enum)||void 0===s?void 0:s.typeName)}return!0}return!1}function s(e,t){return a(e)&&r.I4 in e&&"desc"in e&&a(e.desc)&&"message"===e.desc.kind&&(void 0===t||e.desc.typeName==t.typeName)}},78047(e,t,n){function r(e){let t=!1;const n=[];for(let r=0;r<e.length;r++){let a=e.charAt(r);switch(a){case"_":t=!0;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":n.push(a),t=!1;break;default:t&&(t=!1,a=a.toUpperCase()),n.push(a)}}return n.join("")}n.d(t,{RM:()=>r,aV:()=>o});const a=new Set(["constructor","toString","toJSON","valueOf"]);function o(e){return a.has(e)?e+"$":e}},96159(e,t,n){n.d(t,{MJ:()=>c,PZ:()=>m,xI:()=>p});var r=n(78915),a=n(1719),o=n(7097),i=n(91830),s=n(28470),u=n(47439),l=n(75397);function m(e,t){const n="list"==e.fieldKind?(0,i.sG)(t,e):"map"==e.fieldKind?(0,i.G6)(t,e):f(e,t);if(!0===n)return;let r;switch(e.fieldKind){case"list":r=`expected ${y(e)}, got ${g(t)}`;break;case"map":r=`expected ${N(e)}, got ${g(t)}`;break;default:r=b(e,t,n)}return new o.b(e,r)}function c(e,t,n){const r=f(e,n);if(!0!==r)return new o.b(e,`list item #${t+1}: ${b(e,n,r)}`)}function p(e,t,n){const r=d(t,e.mapKey);if(!0!==r)return new o.b(e,`invalid map key: ${b({scalar:e.mapKey},t,r)}`);const a=f(e,n);return!0!==a?new o.b(e,`map entry ${g(t)}: ${b(e,n,a)}`):void 0}function f(e,t){return void 0!==e.scalar?d(t,e.scalar):void 0!==e.enum?e.enum.open?Number.isInteger(t):e.enum.values.some(e=>e.number===t):(0,i.LT)(t,e.message)}function d(e,t){switch(t){case r.L.DOUBLE:return"number"==typeof e;case r.L.FLOAT:return"number"==typeof e&&(!(!Number.isNaN(e)&&Number.isFinite(e))||(!(e>s.xY||e<s.T)||`${e.toFixed()} out of range`));case r.L.INT32:case r.L.SFIXED32:case r.L.SINT32:return!("number"!=typeof e||!Number.isInteger(e))&&(!(e>s.go||e<s.Qh)||`${e.toFixed()} out of range`);case r.L.FIXED32:case r.L.UINT32:return!("number"!=typeof e||!Number.isInteger(e))&&(!(e>s.f7||e<0)||`${e.toFixed()} out of range`);case r.L.BOOL:return"boolean"==typeof e;case r.L.STRING:return"string"==typeof e&&((0,u.d)().checkUtf8(e)||"invalid UTF8");case r.L.BYTES:return e instanceof Uint8Array;case r.L.INT64:case r.L.SFIXED64:case r.L.SINT64:if("bigint"==typeof e||"number"==typeof e||"string"==typeof e&&e.length>0)try{return l.M.parse(e),!0}catch(t){return`${e} out of range`}return!1;case r.L.FIXED64:case r.L.UINT64:if("bigint"==typeof e||"number"==typeof e||"string"==typeof e&&e.length>0)try{return l.M.uParse(e),!0}catch(t){return`${e} out of range`}return!1}}function b(e,t,n){return n="string"==typeof n?`: ${n}`:`, got ${g(t)}`,void 0!==e.scalar?`expected ${function(e){switch(e){case r.L.STRING:return"string";case r.L.BOOL:return"boolean";case r.L.INT64:case r.L.SINT64:case r.L.SFIXED64:return"bigint (int64)";case r.L.UINT64:case r.L.FIXED64:return"bigint (uint64)";case r.L.BYTES:return"Uint8Array";case r.L.DOUBLE:return"number (float64)";case r.L.FLOAT:return"number (float32)";case r.L.FIXED32:case r.L.UINT32:return"number (uint32)";case r.L.INT32:case r.L.SFIXED32:case r.L.SINT32:return"number (int32)"}}(e.scalar)}`+n:void 0!==e.enum?`expected ${e.enum.toString()}`+n:`expected ${E(e.message)}`+n}function g(e){switch(typeof e){case"object":return null===e?"null":e instanceof Uint8Array?`Uint8Array(${e.length})`:Array.isArray(e)?`Array(${e.length})`:(0,i.sG)(e)?y(e.field()):(0,i.G6)(e)?N(e.field()):(0,i.LT)(e)?E(e.desc):(0,a.K)(e)?`message ${e.$typeName}`:"object";case"string":return e.length>30?"string":`"${e.split('"').join('\\"')}"`;case"boolean":case"number":return String(e);case"bigint":return String(e)+"n";default:return typeof e}}function E(e){return`ReflectMessage (${e.typeName})`}function y(e){switch(e.listKind){case"message":return`ReflectList (${e.message.toString()})`;case"enum":return`ReflectList (${e.enum.toString()})`;case"scalar":return`ReflectList (${r.L[e.scalar]})`}}function N(e){switch(e.mapKind){case"message":return`ReflectMap (${r.L[e.mapKey]}, ${e.message.toString()})`;case"enum":return`ReflectMap (${r.L[e.mapKey]}, ${e.enum.toString()})`;case"scalar":return`ReflectMap (${r.L[e.mapKey]}, ${r.L[e.scalar]})`}}},97510(e,t,n){n.d(t,{E4:()=>p});var r=n(78915),a=n(96159),o=n(7097),i=n(91689),s=n(92657),u=n(78534),l=n(10475),m=n(75397),c=n(91830);function p(e,t,n=!0){return new d(e,t,n)}const f=new WeakMap;class d{get sortedFields(){const e=f.get(this.desc);if(e)return e;const t=this.desc.fields.concat().sort((e,t)=>e.number-t.number);return f.set(this.desc,t),t}constructor(e,t,n=!0){this.lists=new Map,this.maps=new Map,this.check=n,this.desc=e,this.message=this[i.I4]=null!=t?t:(0,s.v)(e),this.fields=e.fields,this.oneofs=e.oneofs,this.members=e.members}findNumber(e){return this._fieldsByNumber||(this._fieldsByNumber=new Map(this.desc.fields.map(e=>[e.number,e]))),this._fieldsByNumber.get(e)}oneofCase(e){return b(this.message,e),(0,i.mO)(this.message,e)}isSet(e){return b(this.message,e),(0,i.zB)(this.message,e)}clear(e){b(this.message,e),(0,i.yO)(this.message,e)}get(e){b(this.message,e);const t=(0,i.$v)(this.message,e);switch(e.fieldKind){case"list":let n=this.lists.get(e);return n&&n[i.I4]===t||this.lists.set(e,n=new g(e,t,this.check)),n;case"map":let r=this.maps.get(e);return r&&r[i.I4]===t||this.maps.set(e,r=new E(e,t,this.check)),r;case"message":return N(e,t,this.check);case"scalar":return void 0===t?(0,l.M7)(e.scalar,!1):v(e,t);case"enum":return null!=t?t:e.enum.values[0].number}}set(e,t){if(b(this.message,e),this.check){const n=(0,a.PZ)(e,t);if(n)throw n}let n;n="message"==e.fieldKind?y(e,t):(0,c.G6)(t)||(0,c.sG)(t)?t[i.I4]:L(e,t),(0,i.lA)(this.message,e,n)}getUnknown(){return this.message.$unknown}setUnknown(e){this.message.$unknown=e}}function b(e,t){if(t.parent.typeName!==e.$typeName)throw new o.b(t,`cannot use ${t.toString()} with message ${e.$typeName}`,"ForeignFieldError")}class g{field(){return this._field}get size(){return this._arr.length}constructor(e,t,n){this._field=e,this._arr=this[i.I4]=t,this.check=n}get(e){const t=this._arr[e];return void 0===t?void 0:I(this._field,t,this.check)}set(e,t){if(e<0||e>=this._arr.length)throw new o.b(this._field,`list item #${e+1}: out of range`);if(this.check){const n=(0,a.MJ)(this._field,e,t);if(n)throw n}this._arr[e]=T(this._field,t)}add(e){if(this.check){const t=(0,a.MJ)(this._field,this._arr.length,e);if(t)throw t}this._arr.push(T(this._field,e))}clear(){this._arr.splice(0,this._arr.length)}[Symbol.iterator](){return this.values()}keys(){return this._arr.keys()}*values(){for(const e of this._arr)yield I(this._field,e,this.check)}*entries(){for(let e=0;e<this._arr.length;e++)yield[e,I(this._field,this._arr[e],this.check)]}}class E{constructor(e,t,n=!0){this.obj=this[i.I4]=null!=t?t:{},this.check=n,this._field=e}field(){return this._field}set(e,t){if(this.check){const n=(0,a.xI)(this._field,e,t);if(n)throw n}return this.obj[_(e)]=function(e,t){if("message"==e.mapKind)return y(e,t);return L(e,t)}(this._field,t),this}delete(e){const t=_(e),n=Object.prototype.hasOwnProperty.call(this.obj,t);return n&&delete this.obj[t],n}clear(){for(const e of Object.keys(this.obj))delete this.obj[e]}get(e){let t=this.obj[_(e)];return void 0!==t&&(t=h(this._field,t,this.check)),t}has(e){return Object.prototype.hasOwnProperty.call(this.obj,_(e))}*keys(){for(const e of Object.keys(this.obj))yield O(e,this._field.mapKey)}*entries(){for(const e of Object.entries(this.obj))yield[O(e[0],this._field.mapKey),h(this._field,e[1],this.check)]}[Symbol.iterator](){return this.entries()}get size(){return Object.keys(this.obj).length}*values(){for(const e of Object.values(this.obj))yield h(this._field,e,this.check)}forEach(e,t){for(const n of this.entries())e.call(t,n[1],n[0],this)}}function y(e,t){return(0,c.LT)(t)?(0,u.Y)(t.message)&&!e.oneof&&"message"==e.fieldKind?t.message.value:"google.protobuf.Struct"==t.desc.typeName&&"google.protobuf.Value"!=e.parent.typeName?D(t.message):t.message:t}function N(e,t,n){return void 0!==t&&((0,u.l)(e.message)&&!e.oneof&&"message"==e.fieldKind?t={$typeName:e.message.typeName,value:v(e.message.fields[0],t)}:"google.protobuf.Struct"==e.message.typeName&&"google.protobuf.Value"!=e.parent.typeName&&(0,c.Gv)(t)&&(t=S(t))),new d(e.message,t,n)}function T(e,t){return"message"==e.listKind?y(e,t):L(e,t)}function I(e,t,n){return"message"==e.listKind?N(e,t,n):v(e,t)}function h(e,t,n){return"message"==e.mapKind?N(e,t,n):t}function _(e){return"string"==typeof e||"number"==typeof e?e:String(e)}function O(e,t){switch(t){case r.L.STRING:return e;case r.L.INT32:case r.L.FIXED32:case r.L.UINT32:case r.L.SFIXED32:case r.L.SINT32:{const t=Number.parseInt(e);if(Number.isFinite(t))return t;break}case r.L.BOOL:switch(e){case"true":return!0;case"false":return!1}break;case r.L.UINT64:case r.L.FIXED64:try{return m.M.uParse(e)}catch(e){}break;default:try{return m.M.parse(e)}catch(e){}}return e}function v(e,t){switch(e.scalar){case r.L.INT64:case r.L.SFIXED64:case r.L.SINT64:"longAsString"in e&&e.longAsString&&"string"==typeof t&&(t=m.M.parse(t));break;case r.L.FIXED64:case r.L.UINT64:"longAsString"in e&&e.longAsString&&"string"==typeof t&&(t=m.M.uParse(t))}return t}function L(e,t){switch(e.scalar){case r.L.INT64:case r.L.SFIXED64:case r.L.SINT64:"longAsString"in e&&e.longAsString?t=String(t):"string"!=typeof t&&"number"!=typeof t||(t=m.M.parse(t));break;case r.L.FIXED64:case r.L.UINT64:"longAsString"in e&&e.longAsString?t=String(t):"string"!=typeof t&&"number"!=typeof t||(t=m.M.uParse(t))}return t}function S(e){const t={$typeName:"google.protobuf.Struct",fields:{}};if((0,c.Gv)(e))for(const[n,r]of Object.entries(e))t.fields[n]=P(r);return t}function D(e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=F(r);return t}function F(e){switch(e.kind.case){case"structValue":return D(e.kind.value);case"listValue":return e.kind.value.values.map(F);case"nullValue":case void 0:return null;default:return e.kind.value}}function P(e){const t={$typeName:"google.protobuf.Value",kind:{case:void 0}};switch(typeof e){case"number":t.kind={case:"numberValue",value:e};break;case"string":t.kind={case:"stringValue",value:e};break;case"boolean":t.kind={case:"boolValue",value:e};break;case"object":if(null===e){const e=0;t.kind={case:"nullValue",value:e}}else if(Array.isArray(e)){const n={$typeName:"google.protobuf.ListValue",values:[]};if(Array.isArray(e))for(const t of e)n.values.push(P(t));t.kind={case:"listValue",value:n}}else t.kind={case:"structValue",value:S(e)}}return t}},10475(e,t,n){n.d(t,{M7:()=>o,MZ:()=>i});var r=n(75397),a=n(78915);function o(e,t){switch(e){case a.L.STRING:return"";case a.L.BOOL:return!1;case a.L.DOUBLE:case a.L.FLOAT:return 0;case a.L.INT64:case a.L.UINT64:case a.L.SFIXED64:case a.L.FIXED64:case a.L.SINT64:return t?"0":r.M.zero;case a.L.BYTES:return new Uint8Array(0);default:return 0}}function i(e,t){switch(e){case a.L.BOOL:return!1===t;case a.L.STRING:return""===t;case a.L.BYTES:return t instanceof Uint8Array&&!t.byteLength;default:return 0==t}}},91689(e,t,n){n.d(t,{$v:()=>u,I4:()=>a,b1:()=>s,lA:()=>l,mO:()=>o,yO:()=>m,zB:()=>i});var r=n(10475);const a=Symbol.for("reflect unsafe local");function o(e,t){const n=e[t.localName].case;return void 0===n?n:t.fields.find(e=>e.localName===n)}function i(e,t){const n=t.localName;if(t.oneof)return e[t.oneof.localName].case===n;if(2!=t.presence)return void 0!==e[n]&&Object.prototype.hasOwnProperty.call(e,n);switch(t.fieldKind){case"list":return e[n].length>0;case"map":return Object.keys(e[n]).length>0;case"scalar":return!(0,r.MZ)(t.scalar,e[n]);case"enum":return e[n]!==t.enum.values[0].number}throw new Error("message field with implicit presence")}function s(e,t){return Object.prototype.hasOwnProperty.call(e,t)&&void 0!==e[t]}function u(e,t){if(t.oneof){const n=e[t.oneof.localName];return n.case===t.localName?n.value:void 0}return e[t.localName]}function l(e,t,n){t.oneof?e[t.oneof.localName]={case:t.localName,value:n}:e[t.localName]=n}function m(e,t){const n=t.localName;if(t.oneof){const r=t.oneof.localName;e[r].case===n&&(e[r]={case:void 0})}else if(2!=t.presence)delete e[n];else switch(t.fieldKind){case"map":e[n]={};break;case"list":e[n]=[];break;case"enum":e[n]=t.enum.values[0].number;break;case"scalar":e[n]=(0,r.M7)(t.scalar,t.longAsString)}}},82237(e,t,n){n.d(t,{uO:()=>u});var r=n(78915),a=n(85998);function*o(e){switch(e.kind){case"file":for(const t of e.messages)yield t,yield*o(t);yield*e.enums,yield*e.services,yield*e.extensions;break;case"message":for(const t of e.nestedMessages)yield t,yield*o(t);yield*e.nestedEnums,yield*e.nestedExtensions}}var i=n(91689),s=n(78047);function u(...e){const t=l();if(!e.length)return t;if("$typeName"in e[0]&&"google.protobuf.FileDescriptorSet"==e[0].$typeName){for(const n of e[0].file)f(n,t);return t}if("$typeName"in e[0]){const r=e[0],a=e[1],o=new Set;function i(e){const n=[];for(const r of e.dependency){if(null!=t.getFile(r))continue;if(o.has(r))continue;const i=a(r);if(!i)throw new Error(`Unable to resolve ${r}, imported by ${e.name}`);"kind"in i?t.addFile(i,!1,!0):(o.add(i.name),n.push(i))}return n.concat(...n.map(i))}for(const s of[r,...i(r)].reverse())f(s,t)}else for(const u of e)for(const m of u.files)t.addFile(m);return t}function l(){const e=new Map,t=new Map,n=new Map;return{kind:"registry",types:e,extendees:t,[Symbol.iterator]:()=>e.values(),get files(){return n.values()},addFile(e,t,r){if(n.set(e.proto.name,e),!t)for(const t of o(e))this.add(t);if(r)for(const n of e.dependencies)this.addFile(n,t,r)},add(n){if("extension"==n.kind){let e=t.get(n.extendee.typeName);e||t.set(n.extendee.typeName,e=new Map),e.set(n.number,n)}e.set(n.typeName,n)},get:t=>e.get(t),getFile:e=>n.get(e),getMessage(t){const n=e.get(t);return"message"==(null==n?void 0:n.kind)?n:void 0},getEnum(t){const n=e.get(t);return"enum"==(null==n?void 0:n.kind)?n:void 0},getExtension(t){const n=e.get(t);return"extension"==(null==n?void 0:n.kind)?n:void 0},getExtensionFor(e,n){var r;return null===(r=t.get(e.typeName))||void 0===r?void 0:r.get(n)},getService(t){const n=e.get(t);return"service"==(null==n?void 0:n.kind)?n:void 0}}}const m=10,c=11,p={998:{fieldPresence:1,enumType:2,repeatedFieldEncoding:2,utf8Validation:3,messageEncoding:1,jsonFormat:2,enforceNamingStyle:2,defaultSymbolVisibility:1},999:{fieldPresence:2,enumType:1,repeatedFieldEncoding:1,utf8Validation:2,messageEncoding:1,jsonFormat:1,enforceNamingStyle:2,defaultSymbolVisibility:1},1e3:{fieldPresence:1,enumType:1,repeatedFieldEncoding:1,utf8Validation:2,messageEncoding:1,jsonFormat:1,enforceNamingStyle:2,defaultSymbolVisibility:1},1001:{fieldPresence:1,enumType:1,repeatedFieldEncoding:1,utf8Validation:2,messageEncoding:1,jsonFormat:1,enforceNamingStyle:1,defaultSymbolVisibility:2}};function f(e,t){var n,r;const a={kind:"file",proto:e,deprecated:null!==(r=null===(n=e.options)||void 0===n?void 0:n.deprecated)&&void 0!==r&&r,edition:I(e),name:e.name.replace(/\.proto$/,""),dependencies:h(e,t),enums:[],messages:[],extensions:[],services:[],toString:()=>`file ${e.name}`},o=new Map,i={get:e=>o.get(e),add(e){var t;F(!0===(null===(t=e.proto.options)||void 0===t?void 0:t.mapEntry)),o.set(e.typeName,e)}};for(const n of e.enumType)g(n,a,void 0,t);for(const n of e.messageType)E(n,a,void 0,t,i);for(const n of e.service)y(n,a,t);d(a,t);for(const e of o.values())b(e,t,i);for(const e of a.messages)b(e,t,i),d(e,t);t.addFile(a,!0)}function d(e,t){switch(e.kind){case"file":for(const n of e.proto.extension){const r=T(n,e,t);e.extensions.push(r),t.add(r)}break;case"message":for(const n of e.proto.extension){const r=T(n,e,t);e.nestedExtensions.push(r),t.add(r)}for(const n of e.nestedMessages)d(n,t)}}function b(e,t,n){const r=e.proto.oneofDecl.map(t=>function(e,t){return{kind:"oneof",proto:e,deprecated:!1,parent:t,fields:[],name:e.name,localName:(0,s.aV)((0,s.RM)(e.name)),toString(){return`oneof ${t.typeName}.${this.name}`}}}(t,e)),a=new Set;for(const o of e.proto.field){const i=v(o,r),s=T(o,e,t,i,n);e.fields.push(s),e.field[s.localName]=s,void 0===i?e.members.push(s):(i.fields.push(s),a.has(i)||(a.add(i),e.members.push(i)))}for(const t of r.filter(e=>a.has(e)))e.oneofs.push(t);for(const r of e.nestedMessages)b(r,t,n)}function g(e,t,n,r){var a,o,i,u,l;const m=function(e,t){const n=(r=e,(r.substring(0,1)+r.substring(1).replace(/[A-Z]/g,e=>"_"+e)).toLowerCase()+"_");var r;for(const e of t){if(!e.name.toLowerCase().startsWith(n))return;const t=e.name.substring(n.length);if(0==t.length)return;if(/^\d/.test(t))return}return n}(e.name,e.value),c={kind:"enum",proto:e,deprecated:null!==(o=null===(a=e.options)||void 0===a?void 0:a.deprecated)&&void 0!==o&&o,file:t,parent:n,open:!0,name:e.name,typeName:_(e,n,t),value:{},values:[],sharedPrefix:m,toString(){return`enum ${this.typeName}`}};c.open=function(e){var t;return 1==D("enumType",{proto:e.proto,parent:null!==(t=e.parent)&&void 0!==t?t:e.file})}(c),r.add(c);for(const t of e.value){const e=t.name;c.values.push(c.value[t.number]={kind:"enum_value",proto:t,deprecated:null!==(u=null===(i=t.options)||void 0===i?void 0:i.deprecated)&&void 0!==u&&u,parent:c,name:e,localName:(0,s.aV)(null==m?e:e.substring(m.length)),number:t.number,toString:()=>`enum value ${c.typeName}.${e}`})}(null!==(l=null==n?void 0:n.nestedEnums)&&void 0!==l?l:t.enums).push(c)}function E(e,t,n,r,a){var o,i,s,u;const l={kind:"message",proto:e,deprecated:null!==(i=null===(o=e.options)||void 0===o?void 0:o.deprecated)&&void 0!==i&&i,file:t,parent:n,name:e.name,typeName:_(e,n,t),fields:[],field:{},oneofs:[],members:[],nestedEnums:[],nestedMessages:[],nestedExtensions:[],toString(){return`message ${this.typeName}`}};!0===(null===(s=e.options)||void 0===s?void 0:s.mapEntry)?a.add(l):((null!==(u=null==n?void 0:n.nestedMessages)&&void 0!==u?u:t.messages).push(l),r.add(l));for(const n of e.enumType)g(n,t,l,r);for(const n of e.nestedType)E(n,t,l,r,a)}function y(e,t,n){var r,a;const o={kind:"service",proto:e,deprecated:null!==(a=null===(r=e.options)||void 0===r?void 0:r.deprecated)&&void 0!==a&&a,file:t,name:e.name,typeName:_(e,void 0,t),methods:[],method:{},toString(){return`service ${this.typeName}`}};t.services.push(o),n.add(o);for(const t of e.method){const e=N(t,o,n);o.methods.push(e),o.method[e.localName]=e}}function N(e,t,n){var r,a,o,i;let u;u=e.clientStreaming&&e.serverStreaming?"bidi_streaming":e.clientStreaming?"client_streaming":e.serverStreaming?"server_streaming":"unary";const l=n.getMessage(O(e.inputType)),m=n.getMessage(O(e.outputType));F(l,`invalid MethodDescriptorProto: input_type ${e.inputType} not found`),F(m,`invalid MethodDescriptorProto: output_type ${e.inputType} not found`);const c=e.name;return{kind:"rpc",proto:e,deprecated:null!==(a=null===(r=e.options)||void 0===r?void 0:r.deprecated)&&void 0!==a&&a,parent:t,name:c,localName:(0,s.aV)(c.length?(0,s.aV)(c[0].toLowerCase()+c.substring(1)):c),methodKind:u,input:l,output:m,idempotency:null!==(i=null===(o=e.options)||void 0===o?void 0:o.idempotencyLevel)&&void 0!==i?i:0,toString:()=>`rpc ${t.typeName}.${c}`}}function T(e,t,n,o,u){var l,p,f;const d=void 0===u,b={kind:"field",proto:e,deprecated:null!==(p=null===(l=e.options)||void 0===l?void 0:l.deprecated)&&void 0!==p&&p,name:e.name,number:e.number,scalar:void 0,message:void 0,enum:void 0,presence:L(e,o,d,t),listKind:void 0,mapKind:void 0,mapKey:void 0,delimitedEncoding:void 0,packed:void 0,longAsString:!1,getDefaultValue:void 0};if(d){const r="file"==t.kind?t:t.file,a="file"==t.kind?void 0:t,o=_(e,a,r);b.kind="extension",b.file=r,b.parent=a,b.oneof=void 0,b.typeName=o,b.jsonName=`[${o}]`,b.toString=()=>`extension ${o}`;const i=n.getMessage(O(e.extendee));F(i,`invalid FieldDescriptorProto: extendee ${e.extendee} not found`),b.extendee=i}else{const n=t;F("message"==n.kind),b.parent=n,b.oneof=o,b.localName=o?(0,s.RM)(e.name):(0,s.aV)((0,s.RM)(e.name)),b.jsonName=e.jsonName,b.toString=()=>`field ${n.typeName}.${e.name}`}const g=e.label,E=e.type,y=null===(f=e.options)||void 0===f?void 0:f.jstype;if(3===g){const a=11==E?null==u?void 0:u.get(O(e.typeName)):void 0;if(a){b.fieldKind="map";const{key:e,value:t}=function(e){const t=e.fields.find(e=>1===e.number),n=e.fields.find(e=>2===e.number);return F(t&&"scalar"==t.fieldKind&&t.scalar!=r.L.BYTES&&t.scalar!=r.L.FLOAT&&t.scalar!=r.L.DOUBLE&&n&&"list"!=n.fieldKind&&"map"!=n.fieldKind),{key:t,value:n}}(a);return b.mapKey=e.scalar,b.mapKind=t.fieldKind,b.message=t.message,b.delimitedEncoding=!1,b.enum=t.enum,b.scalar=t.scalar,b}switch(b.fieldKind="list",E){case 11:case 10:b.listKind="message",b.message=n.getMessage(O(e.typeName)),F(b.message),b.delimitedEncoding=S(e,t);break;case 14:b.listKind="enum",b.enum=n.getEnum(O(e.typeName)),F(b.enum);break;default:b.listKind="scalar",b.scalar=E,b.longAsString=1==y}return b.packed=function(e,t){if(3!=e.label)return!1;switch(e.type){case 9:case 12:case m:case c:return!1}const n=e.options;if(n&&(0,i.b1)(n,"packed"))return n.packed;return 1==D("repeatedFieldEncoding",{proto:e,parent:t})}(e,t),b}switch(E){case c:case m:b.fieldKind="message",b.message=n.getMessage(O(e.typeName)),F(b.message,`invalid FieldDescriptorProto: type_name ${e.typeName} not found`),b.delimitedEncoding=S(e,t),b.getDefaultValue=()=>{};break;case 14:{const t=n.getEnum(O(e.typeName));F(void 0!==t,`invalid FieldDescriptorProto: type_name ${e.typeName} not found`),b.fieldKind="enum",b.enum=n.getEnum(O(e.typeName)),b.getDefaultValue=()=>(0,i.b1)(e,"defaultValue")?(0,a.S)(t,e.defaultValue):void 0;break}default:b.fieldKind="scalar",b.scalar=E,b.longAsString=1==y,b.getDefaultValue=()=>(0,i.b1)(e,"defaultValue")?(0,a.f)(E,e.defaultValue):void 0}return b}function I(e){switch(e.syntax){case"":case"proto2":return 998;case"proto3":return 999;case"editions":if(e.edition in p)return e.edition;throw new Error(`${e.name}: unsupported edition`);default:throw new Error(`${e.name}: unsupported syntax "${e.syntax}"`)}}function h(e,t){return e.dependency.map(n=>{const r=t.getFile(n);if(!r)throw new Error(`Cannot find ${n}, imported by ${e.name}`);return r})}function _(e,t,n){let r;return r=t?`${t.typeName}.${e.name}`:n.proto.package.length>0?`${n.proto.package}.${e.name}`:`${e.name}`,r}function O(e){return e.startsWith(".")?e.substring(1):e}function v(e,t){if(!(0,i.b1)(e,"oneofIndex"))return;if(e.proto3Optional)return;const n=t[e.oneofIndex];return F(n,`invalid FieldDescriptorProto: oneof #${e.oneofIndex} for field #${e.number} not found`),n}function L(e,t,n,r){if(2==e.label)return 3;if(3==e.label)return 2;if(t||e.proto3Optional)return 1;if(n)return 1;const a=D("fieldPresence",{proto:e,parent:r});return 2!=a||e.type!=c&&e.type!=m?a:1}function S(e,t){return e.type==m||2==D("messageEncoding",{proto:e,parent:t})}function D(e,t){var n,r;const a=null===(n=t.proto.options)||void 0===n?void 0:n.features;if(a){const t=a[e];if(0!=t)return t}if("kind"in t){if("message"==t.kind)return D(e,null!==(r=t.parent)&&void 0!==r?r:t.file);const n=p[t.edition];if(!n)throw new Error(`feature default for edition ${t.edition} not found`);return n[e]}return D(e,t.parent)}function F(e,t){if(!e)throw new Error(t)}},37332(e,t,n){n.d(t,{R:()=>s});var r=n(97510),a=n(28470),o=n(78915);const i={writeUnknownFields:!0};function s(e,t,n){return u(new a.fI,function(e){return e?Object.assign(Object.assign({},i),e):i}(n),(0,r.E4)(e,t)).finish()}function u(e,t,n){var r;for(const r of n.sortedFields)if(n.isSet(r))l(e,t,n,r);else if(3==r.presence)throw new Error(`cannot encode ${r} to binary: required field not set`);if(t.writeUnknownFields)for(const{no:t,wireType:a,data:o}of null!==(r=n.getUnknown())&&void 0!==r?r:[])e.tag(t,a).raw(o);return e}function l(e,t,n,r){var i;switch(r.fieldKind){case"scalar":case"enum":m(e,n.desc.typeName,r.name,null!==(i=r.scalar)&&void 0!==i?i:o.L.INT32,r.number,n.get(r));break;case"list":!function(e,t,n,r){var i;if("message"==n.listKind){for(const a of r)c(e,t,n,a);return}const s=null!==(i=n.scalar)&&void 0!==i?i:o.L.INT32;if(n.packed){if(!r.size)return;e.tag(n.number,a.O0.LengthDelimited).fork();for(const t of r)f(e,n.parent.typeName,n.name,s,t);return void e.join()}for(const t of r)m(e,n.parent.typeName,n.name,s,n.number,t)}(e,t,r,n.get(r));break;case"message":c(e,t,r,n.get(r));break;case"map":for(const[a,o]of n.get(r))p(e,t,r,a,o)}}function m(e,t,n,r,i,s){f(e.tag(i,function(e){switch(e){case o.L.BYTES:case o.L.STRING:return a.O0.LengthDelimited;case o.L.DOUBLE:case o.L.FIXED64:case o.L.SFIXED64:return a.O0.Bit64;case o.L.FIXED32:case o.L.SFIXED32:case o.L.FLOAT:return a.O0.Bit32;default:return a.O0.Varint}}(r)),t,n,r,s)}function c(e,t,n,r){n.delimitedEncoding?u(e.tag(n.number,a.O0.StartGroup),t,r).tag(n.number,a.O0.EndGroup):u(e.tag(n.number,a.O0.LengthDelimited).fork(),t,r).join()}function p(e,t,n,r,i){var s;switch(e.tag(n.number,a.O0.LengthDelimited).fork(),m(e,n.parent.typeName,n.name,n.mapKey,1,r),n.mapKind){case"scalar":case"enum":m(e,n.parent.typeName,n.name,null!==(s=n.scalar)&&void 0!==s?s:o.L.INT32,2,i);break;case"message":u(e.tag(2,a.O0.LengthDelimited).fork(),t,i).join()}e.join()}function f(e,t,n,r,a){try{switch(r){case o.L.STRING:e.string(a);break;case o.L.BOOL:e.bool(a);break;case o.L.DOUBLE:e.double(a);break;case o.L.FLOAT:e.float(a);break;case o.L.INT32:e.int32(a);break;case o.L.INT64:e.int64(a);break;case o.L.UINT64:e.uint64(a);break;case o.L.FIXED64:e.fixed64(a);break;case o.L.BYTES:e.bytes(a);break;case o.L.FIXED32:e.fixed32(a);break;case o.L.SFIXED32:e.sfixed32(a);break;case o.L.SFIXED64:e.sfixed64(a);break;case o.L.SINT64:e.sint64(a);break;case o.L.UINT32:e.uint32(a);break;case o.L.SINT32:e.sint32(a)}}catch(e){if(e instanceof Error)throw new Error(`cannot encode field ${t}.${n} to binary: ${e.message}`);throw e}}},46924(e,t,n){function r(e){const t=function(){if(!i){i=[];const e=s("std");for(let t=0;t<e.length;t++)i[e[t].charCodeAt(0)]=t;i["-".charCodeAt(0)]=e.indexOf("+"),i["_".charCodeAt(0)]=e.indexOf("/")}return i}();let n=3*e.length/4;"="==e[e.length-2]?n-=2:"="==e[e.length-1]&&(n-=1);let r,a=new Uint8Array(n),o=0,u=0,l=0;for(let n=0;n<e.length;n++){if(r=t[e.charCodeAt(n)],void 0===r)switch(e[n]){case"=":u=0;case"\n":case"\r":case"\t":case" ":continue;default:throw Error("invalid base64 string")}switch(u){case 0:l=r,u=1;break;case 1:a[o++]=l<<2|(48&r)>>4,l=r,u=2;break;case 2:a[o++]=(15&l)<<4|(60&r)>>2,l=r,u=3;break;case 3:a[o++]=(3&l)<<6|r,u=0}}if(1==u)throw Error("invalid base64 string");return a.subarray(0,o)}let a,o,i;function s(e){return a||(a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),o=a.slice(0,-2).concat("-","_")),"url"==e?o:a}n.d(t,{u:()=>r})},28470(e,t,n){n.d(t,{O0:()=>r,Qh:()=>c,T:()=>u,V5:()=>f,f7:()=>l,fI:()=>p,go:()=>m,xY:()=>s});var r,a=n(36197),o=n(75397),i=n(47439);!function(e){e[e.Varint=0]="Varint",e[e.Bit64=1]="Bit64",e[e.LengthDelimited=2]="LengthDelimited",e[e.StartGroup=3]="StartGroup",e[e.EndGroup=4]="EndGroup",e[e.Bit32=5]="Bit32"}(r||(r={}));const s=34028234663852886e22,u=-34028234663852886e22,l=4294967295,m=2147483647,c=-2147483648;class p{constructor(e=(0,i.d)().encodeUtf8){this.encodeUtf8=e,this.stack=[],this.chunks=[],this.buf=[]}finish(){this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]);let e=0;for(let t=0;t<this.chunks.length;t++)e+=this.chunks[t].length;let t=new Uint8Array(e),n=0;for(let e=0;e<this.chunks.length;e++)t.set(this.chunks[e],n),n+=this.chunks[e].length;return this.chunks=[],t}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let e=this.finish(),t=this.stack.pop();if(!t)throw new Error("invalid state, fork stack empty");return this.chunks=t.chunks,this.buf=t.buf,this.uint32(e.byteLength),this.raw(e)}tag(e,t){return this.uint32((e<<3|t)>>>0)}raw(e){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(e),this}uint32(e){for(b(e);e>127;)this.buf.push(127&e|128),e>>>=7;return this.buf.push(e),this}int32(e){return d(e),(0,a.f7)(e,this.buf),this}bool(e){return this.buf.push(e?1:0),this}bytes(e){return this.uint32(e.byteLength),this.raw(e)}string(e){let t=this.encodeUtf8(e);return this.uint32(t.byteLength),this.raw(t)}float(e){!function(e){if("string"==typeof e){const t=e;if(e=Number(e),Number.isNaN(e)&&"NaN"!==t)throw new Error("invalid float32: "+t)}else if("number"!=typeof e)throw new Error("invalid float32: "+typeof e);if(Number.isFinite(e)&&(e>s||e<u))throw new Error("invalid float32: "+e)}(e);let t=new Uint8Array(4);return new DataView(t.buffer).setFloat32(0,e,!0),this.raw(t)}double(e){let t=new Uint8Array(8);return new DataView(t.buffer).setFloat64(0,e,!0),this.raw(t)}fixed32(e){b(e);let t=new Uint8Array(4);return new DataView(t.buffer).setUint32(0,e,!0),this.raw(t)}sfixed32(e){d(e);let t=new Uint8Array(4);return new DataView(t.buffer).setInt32(0,e,!0),this.raw(t)}sint32(e){return d(e),e=(e<<1^e>>31)>>>0,(0,a.f7)(e,this.buf),this}sfixed64(e){let t=new Uint8Array(8),n=new DataView(t.buffer),r=o.M.enc(e);return n.setInt32(0,r.lo,!0),n.setInt32(4,r.hi,!0),this.raw(t)}fixed64(e){let t=new Uint8Array(8),n=new DataView(t.buffer),r=o.M.uEnc(e);return n.setInt32(0,r.lo,!0),n.setInt32(4,r.hi,!0),this.raw(t)}int64(e){let t=o.M.enc(e);return(0,a.cV)(t.lo,t.hi,this.buf),this}sint64(e){const t=o.M.enc(e),n=t.hi>>31,r=t.lo<<1^n,i=(t.hi<<1|t.lo>>>31)^n;return(0,a.cV)(r,i,this.buf),this}uint64(e){const t=o.M.uEnc(e);return(0,a.cV)(t.lo,t.hi,this.buf),this}}class f{constructor(e,t=(0,i.d)().decodeUtf8){this.decodeUtf8=t,this.varint64=a.ls,this.uint32=a.Gn,this.buf=e,this.len=e.length,this.pos=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength)}tag(){let e=this.uint32(),t=e>>>3,n=7&e;if(t<=0||n<0||n>5)throw new Error("illegal tag: field no "+t+" wire type "+n);return[t,n]}skip(e,t){let n=this.pos;switch(e){case r.Varint:for(;128&this.buf[this.pos++];);break;case r.Bit64:this.pos+=4;case r.Bit32:this.pos+=4;break;case r.LengthDelimited:let n=this.uint32();this.pos+=n;break;case r.StartGroup:for(;;){const[e,n]=this.tag();if(n===r.EndGroup){if(void 0!==t&&e!==t)throw new Error("invalid end group tag");break}this.skip(n,e)}break;default:throw new Error("cant skip wire type "+e)}return this.assertBounds(),this.buf.subarray(n,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return 0|this.uint32()}sint32(){let e=this.uint32();return e>>>1^-(1&e)}int64(){return o.M.dec(...this.varint64())}uint64(){return o.M.uDec(...this.varint64())}sint64(){let[e,t]=this.varint64(),n=-(1&e);return e=(e>>>1|(1&t)<<31)^n,t=t>>>1^n,o.M.dec(e,t)}bool(){let[e,t]=this.varint64();return 0!==e||0!==t}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return o.M.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return o.M.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let e=this.uint32(),t=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(t,t+e)}string(){return this.decodeUtf8(this.bytes())}}function d(e){if("string"==typeof e)e=Number(e);else if("number"!=typeof e)throw new Error("invalid int32: "+typeof e);if(!Number.isInteger(e)||e>m||e<c)throw new Error("invalid int32: "+e)}function b(e){if("string"==typeof e)e=Number(e);else if("number"!=typeof e)throw new Error("invalid uint32: "+typeof e);if(!Number.isInteger(e)||e>l||e<0)throw new Error("invalid uint32: "+e)}},47439(e,t,n){n.d(t,{d:()=>a});const r=Symbol.for("@bufbuild/protobuf/text-encoding");function a(){if(null==globalThis[r]){const e=new globalThis.TextEncoder,t=new globalThis.TextDecoder;globalThis[r]={encodeUtf8:t=>e.encode(t),decodeUtf8:e=>t.decode(e),checkUtf8(e){try{return encodeURIComponent(e),!0}catch(e){return!1}}}}return globalThis[r]}},85998(e,t,n){n.d(t,{S:()=>o,f:()=>i});var r=n(78915),a=n(75397);function o(e,t){const n=e.values.find(e=>e.name===t);if(!n)throw new Error(`cannot parse ${e} default value: ${t}`);return n.number}function i(e,t){switch(e){case r.L.STRING:return t;case r.L.BYTES:{const n=function(e){const t=[],n={tail:e,c:"",next(){return 0!=this.tail.length&&(this.c=this.tail[0],this.tail=this.tail.substring(1),!0)},take(e){if(this.tail.length>=e){const t=this.tail.substring(0,e);return this.tail=this.tail.substring(e),t}return!1}};for(;n.next();)if("\\"===n.c){if(n.next())switch(n.c){case"\\":t.push(n.c.charCodeAt(0));break;case"b":t.push(8);break;case"f":t.push(12);break;case"n":t.push(10);break;case"r":t.push(13);break;case"t":t.push(9);break;case"v":t.push(11);break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":{const e=n.c,r=n.take(2);if(!1===r)return!1;const a=parseInt(e+r,8);if(Number.isNaN(a))return!1;t.push(a);break}case"x":{const e=n.c,r=n.take(2);if(!1===r)return!1;const a=parseInt(e+r,16);if(Number.isNaN(a))return!1;t.push(a);break}case"u":{const e=n.c,r=n.take(4);if(!1===r)return!1;const a=parseInt(e+r,16);if(Number.isNaN(a))return!1;const o=new Uint8Array(4);new DataView(o.buffer).setInt32(0,a,!0),t.push(o[0