@viamrobotics/sdk 0.69.0 → 0.72.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api-version.d.ts +1 -1
- package/dist/app/app-client.d.ts +26 -1
- package/dist/app/data-client.d.ts +107 -3
- package/dist/components/camera/camera.d.ts +1 -1
- package/dist/components/gripper/client.d.ts +2 -0
- package/dist/components/gripper/gripper.d.ts +29 -0
- package/dist/debug.d.ts +82 -0
- package/dist/gen/app/build/v1/build_pb.d.ts +15 -0
- package/dist/gen/app/data/v1/data_connect.d.ts +56 -1
- package/dist/gen/app/data/v1/data_pb.d.ts +396 -1
- package/dist/gen/app/v1/app_connect.d.ts +10 -1
- package/dist/gen/app/v1/app_pb.d.ts +88 -0
- package/dist/gen/app/v1/billing_pb.d.ts +17 -0
- package/dist/gen/common/v1/common_pb.d.ts +26 -0
- package/dist/gen/component/arm/v1/arm_pb.d.ts +17 -0
- package/dist/gen/component/gripper/v1/gripper_connect.d.ts +23 -1
- package/dist/gen/component/gripper/v1/gripper_pb.d.ts +118 -0
- package/dist/main.d.ts +2 -1
- package/dist/main.es.js +6124 -5432
- package/dist/main.umd.js +7 -7
- package/dist/robot/client.d.ts +65 -28
- package/dist/rpc/dial.d.ts +1 -0
- package/dist/rpc/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/main.umd.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
(function(g,G){typeof exports=="object"&&typeof module<"u"?G(exports):typeof define=="function"&&define.amd?define(["exports"],G):(g=typeof globalThis<"u"?globalThis:g||self,G(g.sdk={}))})(this,function(g){"use strict";function G(a,e){if(!a)throw new Error(e)}const Jf=34028234663852886e22,zf=-34028234663852886e22,Vf=4294967295,$f=2147483647,Yf=-2147483648;function jn(a){if(typeof a!="number")throw new Error("invalid int 32: "+typeof a);if(!Number.isInteger(a)||a>$f||a<Yf)throw new Error("invalid int 32: "+a)}function tt(a){if(typeof a!="number")throw new Error("invalid uint 32: "+typeof a);if(!Number.isInteger(a)||a>Vf||a<0)throw new Error("invalid uint 32: "+a)}function Oi(a){if(typeof a!="number")throw new Error("invalid float 32: "+typeof a);if(Number.isFinite(a)&&(a>Jf||a<zf))throw new Error("invalid float 32: "+a)}const Ei=Symbol("@bufbuild/protobuf/enum-type");function Wf(a){const e=a[Ei];return G(e,"missing enum type on enum object"),e}function Mi(a,e,n,t){a[Ei]=wi(e,n.map(o=>({no:o.no,name:o.name,localName:a[o.no]})))}function wi(a,e,n){const t=Object.create(null),o=Object.create(null),i=[];for(const r of e){const c=Ci(r);i.push(c),t[r.name]=c,o[r.no]=c}return{typeName:a,values:i,findName(r){return t[r]},findNumber(r){return o[r]}}}function Hf(a,e,n){const t={};for(const o of e){const i=Ci(o);t[i.localName]=i.no,t[i.no]=i.localName}return Mi(t,a,e),t}function Ci(a){return"localName"in a?a:Object.assign(Object.assign({},a),{localName:a.name})}class M{equals(e){return this.getType().runtime.util.equals(this.getType(),this,e)}clone(){return this.getType().runtime.util.clone(this)}fromBinary(e,n){const t=this.getType(),o=t.runtime.bin,i=o.makeReadOptions(n);return o.readMessage(this,i.readerFactory(e),e.byteLength,i),this}fromJson(e,n){const t=this.getType(),o=t.runtime.json,i=o.makeReadOptions(n);return o.readMessage(t,e,i,this),this}fromJsonString(e,n){let t;try{t=JSON.parse(e)}catch(o){throw new Error(`cannot decode ${this.getType().typeName} from JSON: ${o instanceof Error?o.message:String(o)}`)}return this.fromJson(t,n)}toBinary(e){const n=this.getType(),t=n.runtime.bin,o=t.makeWriteOptions(e),i=o.writerFactory();return t.writeMessage(this,i,o),i.finish()}toJson(e){const n=this.getType(),t=n.runtime.json,o=t.makeWriteOptions(e);return t.writeMessage(this,o)}toJsonString(e){var n;const t=this.toJson(e);return JSON.stringify(t,null,(n=e?.prettySpaces)!==null&&n!==void 0?n:0)}toJSON(){return this.toJson({emitDefaultValues:!0})}getType(){return Object.getPrototypeOf(this).constructor}}function jf(a,e,n,t){var o;const i=(o=t?.localName)!==null&&o!==void 0?o:e.substring(e.lastIndexOf(".")+1),r={[i]:function(c){a.util.initFields(this),a.util.initPartial(c,this)}}[i];return Object.setPrototypeOf(r.prototype,new M),Object.assign(r,{runtime:a,typeName:e,fields:a.util.newFieldList(n),fromBinary(c,d){return new r().fromBinary(c,d)},fromJson(c,d){return new r().fromJson(c,d)},fromJsonString(c,d){return new r().fromJsonString(c,d)},equals(c,d){return a.util.equals(r,c,d)}}),r}function Kf(){let a=0,e=0;for(let t=0;t<28;t+=7){let o=this.buf[this.pos++];if(a|=(o&127)<<t,!(o&128))return this.assertBounds(),[a,e]}let n=this.buf[this.pos++];if(a|=(n&15)<<28,e=(n&112)>>4,!(n&128))return this.assertBounds(),[a,e];for(let t=3;t<=31;t+=7){let o=this.buf[this.pos++];if(e|=(o&127)<<t,!(o&128))return this.assertBounds(),[a,e]}throw new Error("invalid varint")}function st(a,e,n){for(let i=0;i<28;i=i+7){const r=a>>>i,c=!(!(r>>>7)&&e==0),d=(c?r|128:r)&255;if(n.push(d),!c)return}const t=a>>>28&15|(e&7)<<4,o=!!(e>>3);if(n.push((o?t|128:t)&255),!!o){for(let i=3;i<31;i=i+7){const r=e>>>i,c=!!(r>>>7),d=(c?r|128:r)&255;if(n.push(d),!c)return}n.push(e>>>31&1)}}const Kn=4294967296;function Ni(a){const e=a[0]==="-";e&&(a=a.slice(1));const n=1e6;let t=0,o=0;function i(r,c){const d=Number(a.slice(r,c));o*=n,t=t*n+d,t>=Kn&&(o=o+(t/Kn|0),t=t%Kn)}return i(-24,-18),i(-18,-12),i(-12,-6),i(-6),e?Di(t,o):ot(t,o)}function Xf(a,e){let n=ot(a,e);const t=n.hi&2147483648;t&&(n=Di(n.lo,n.hi));const o=Pi(n.lo,n.hi);return t?"-"+o:o}function Pi(a,e){if({lo:a,hi:e}=Qf(a,e),e<=2097151)return String(Kn*e+a);const n=a&16777215,t=(a>>>24|e<<8)&16777215,o=e>>16&65535;let i=n+t*6777216+o*6710656,r=t+o*8147497,c=o*2;const d=1e7;return i>=d&&(r+=Math.floor(i/d),i%=d),r>=d&&(c+=Math.floor(r/d),r%=d),c.toString()+Ai(r)+Ai(i)}function Qf(a,e){return{lo:a>>>0,hi:e>>>0}}function ot(a,e){return{lo:a|0,hi:e|0}}function Di(a,e){return e=~e,a?a=~a+1:e+=1,ot(a,e)}const Ai=a=>{const e=String(a);return"0000000".slice(e.length)+e};function Ui(a,e){if(a>=0){for(;a>127;)e.push(a&127|128),a=a>>>7;e.push(a)}else{for(let n=0;n<9;n++)e.push(a&127|128),a=a>>7;e.push(1)}}function Zf(){let a=this.buf[this.pos++],e=a&127;if(!(a&128))return this.assertBounds(),e;if(a=this.buf[this.pos++],e|=(a&127)<<7,!(a&128))return this.assertBounds(),e;if(a=this.buf[this.pos++],e|=(a&127)<<14,!(a&128))return this.assertBounds(),e;if(a=this.buf[this.pos++],e|=(a&127)<<21,!(a&128))return this.assertBounds(),e;a=this.buf[this.pos++],e|=(a&15)<<28;for(let n=5;a&128&&n<10;n++)a=this.buf[this.pos++];if(a&128)throw new Error("invalid varint");return this.assertBounds(),e>>>0}function eR(){const a=new DataView(new ArrayBuffer(8));if(typeof BigInt=="function"&&typeof a.getBigInt64=="function"&&typeof a.getBigUint64=="function"&&typeof a.setBigInt64=="function"&&typeof a.setBigUint64=="function"&&(typeof process!="object"||typeof process.env!="object"||process.env.BUF_BIGINT_DISABLE!=="1")){const o=BigInt("-9223372036854775808"),i=BigInt("9223372036854775807"),r=BigInt("0"),c=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(d){const l=typeof d=="bigint"?d:BigInt(d);if(l>i||l<o)throw new Error(`int64 invalid: ${d}`);return l},uParse(d){const l=typeof d=="bigint"?d:BigInt(d);if(l>c||l<r)throw new Error(`uint64 invalid: ${d}`);return l},enc(d){return a.setBigInt64(0,this.parse(d),!0),{lo:a.getInt32(0,!0),hi:a.getInt32(4,!0)}},uEnc(d){return a.setBigInt64(0,this.uParse(d),!0),{lo:a.getInt32(0,!0),hi:a.getInt32(4,!0)}},dec(d,l){return a.setInt32(0,d,!0),a.setInt32(4,l,!0),a.getBigInt64(0,!0)},uDec(d,l){return a.setInt32(0,d,!0),a.setInt32(4,l,!0),a.getBigUint64(0,!0)}}}const n=o=>G(/^-?[0-9]+$/.test(o),`int64 invalid: ${o}`),t=o=>G(/^[0-9]+$/.test(o),`uint64 invalid: ${o}`);return{zero:"0",supported:!1,parse(o){return typeof o!="string"&&(o=o.toString()),n(o),o},uParse(o){return typeof o!="string"&&(o=o.toString()),t(o),o},enc(o){return typeof o!="string"&&(o=o.toString()),n(o),Ni(o)},uEnc(o){return typeof o!="string"&&(o=o.toString()),t(o),Ni(o)},dec(o,i){return Xf(o,i)},uDec(o,i){return Pi(o,i)}}}const W=eR();var _;(function(a){a[a.DOUBLE=1]="DOUBLE",a[a.FLOAT=2]="FLOAT",a[a.INT64=3]="INT64",a[a.UINT64=4]="UINT64",a[a.INT32=5]="INT32",a[a.FIXED64=6]="FIXED64",a[a.FIXED32=7]="FIXED32",a[a.BOOL=8]="BOOL",a[a.STRING=9]="STRING",a[a.BYTES=12]="BYTES",a[a.UINT32=13]="UINT32",a[a.SFIXED32=15]="SFIXED32",a[a.SFIXED64=16]="SFIXED64",a[a.SINT32=17]="SINT32",a[a.SINT64=18]="SINT64"})(_||(_={}));var Je;(function(a){a[a.BIGINT=0]="BIGINT",a[a.STRING=1]="STRING"})(Je||(Je={}));function ze(a,e,n){if(e===n)return!0;if(a==_.BYTES){if(!(e instanceof Uint8Array)||!(n instanceof Uint8Array)||e.length!==n.length)return!1;for(let t=0;t<e.length;t++)if(e[t]!==n[t])return!1;return!0}switch(a){case _.UINT64:case _.FIXED64:case _.INT64:case _.SFIXED64:case _.SINT64:return e==n}return!1}function ln(a,e){switch(a){case _.BOOL:return!1;case _.UINT64:case _.FIXED64:case _.INT64:case _.SFIXED64:case _.SINT64:return e==0?W.zero:"0";case _.DOUBLE:case _.FLOAT:return 0;case _.BYTES:return new Uint8Array(0);case _.STRING:return"";default:return 0}}function qi(a,e){switch(a){case _.BOOL:return e===!1;case _.STRING:return e==="";case _.BYTES:return e instanceof Uint8Array&&!e.byteLength;default:return e==0}}var x;(function(a){a[a.Varint=0]="Varint",a[a.Bit64=1]="Bit64",a[a.LengthDelimited=2]="LengthDelimited",a[a.StartGroup=3]="StartGroup",a[a.EndGroup=4]="EndGroup",a[a.Bit32=5]="Bit32"})(x||(x={}));class nR{constructor(e){this.stack=[],this.textEncoder=e??new TextEncoder,this.chunks=[],this.buf=[]}finish(){this.chunks.push(new Uint8Array(this.buf));let e=0;for(let o=0;o<this.chunks.length;o++)e+=this.chunks[o].length;let n=new Uint8Array(e),t=0;for(let o=0;o<this.chunks.length;o++)n.set(this.chunks[o],t),t+=this.chunks[o].length;return this.chunks=[],n}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let e=this.finish(),n=this.stack.pop();if(!n)throw new Error("invalid state, fork stack empty");return this.chunks=n.chunks,this.buf=n.buf,this.uint32(e.byteLength),this.raw(e)}tag(e,n){return this.uint32((e<<3|n)>>>0)}raw(e){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(e),this}uint32(e){for(tt(e);e>127;)this.buf.push(e&127|128),e=e>>>7;return this.buf.push(e),this}int32(e){return jn(e),Ui(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 n=this.textEncoder.encode(e);return this.uint32(n.byteLength),this.raw(n)}float(e){Oi(e);let n=new Uint8Array(4);return new DataView(n.buffer).setFloat32(0,e,!0),this.raw(n)}double(e){let n=new Uint8Array(8);return new DataView(n.buffer).setFloat64(0,e,!0),this.raw(n)}fixed32(e){tt(e);let n=new Uint8Array(4);return new DataView(n.buffer).setUint32(0,e,!0),this.raw(n)}sfixed32(e){jn(e);let n=new Uint8Array(4);return new DataView(n.buffer).setInt32(0,e,!0),this.raw(n)}sint32(e){return jn(e),e=(e<<1^e>>31)>>>0,Ui(e,this.buf),this}sfixed64(e){let n=new Uint8Array(8),t=new DataView(n.buffer),o=W.enc(e);return t.setInt32(0,o.lo,!0),t.setInt32(4,o.hi,!0),this.raw(n)}fixed64(e){let n=new Uint8Array(8),t=new DataView(n.buffer),o=W.uEnc(e);return t.setInt32(0,o.lo,!0),t.setInt32(4,o.hi,!0),this.raw(n)}int64(e){let n=W.enc(e);return st(n.lo,n.hi,this.buf),this}sint64(e){let n=W.enc(e),t=n.hi>>31,o=n.lo<<1^t,i=(n.hi<<1|n.lo>>>31)^t;return st(o,i,this.buf),this}uint64(e){let n=W.uEnc(e);return st(n.lo,n.hi,this.buf),this}}class Li{constructor(e,n){this.varint64=Kf,this.uint32=Zf,this.buf=e,this.len=e.length,this.pos=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength),this.textDecoder=n??new TextDecoder}tag(){let e=this.uint32(),n=e>>>3,t=e&7;if(n<=0||t<0||t>5)throw new Error("illegal tag: field no "+n+" wire type "+t);return[n,t]}skip(e,n){let t=this.pos;switch(e){case x.Varint:for(;this.buf[this.pos++]&128;);break;case x.Bit64:this.pos+=4;case x.Bit32:this.pos+=4;break;case x.LengthDelimited:let o=this.uint32();this.pos+=o;break;case x.StartGroup:for(;;){const[i,r]=this.tag();if(r===x.EndGroup){if(n!==void 0&&i!==n)throw new Error("invalid end group tag");break}this.skip(r,i)}break;default:throw new Error("cant skip wire type "+e)}return this.assertBounds(),this.buf.subarray(t,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let e=this.uint32();return e>>>1^-(e&1)}int64(){return W.dec(...this.varint64())}uint64(){return W.uDec(...this.varint64())}sint64(){let[e,n]=this.varint64(),t=-(e&1);return e=(e>>>1|(n&1)<<31)^t,n=n>>>1^t,W.dec(e,n)}bool(){let[e,n]=this.varint64();return e!==0||n!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return W.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return W.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(),n=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(n,n+e)}string(){return this.textDecoder.decode(this.bytes())}}function aR(a,e,n,t){let o;return{typeName:e,extendee:n,get field(){if(!o){const i=typeof t=="function"?t():t;i.name=e.split(".").pop(),i.jsonName=`[${e}]`,o=a.util.newFieldList([i]).list()[0]}return o},runtime:a}}function Gi(a){const e=a.field.localName,n=Object.create(null);return n[e]=tR(a),[n,()=>n[e]]}function tR(a){const e=a.field;if(e.repeated)return[];if(e.default!==void 0)return e.default;switch(e.kind){case"enum":return e.T.values[0].no;case"scalar":return ln(e.T,e.L);case"message":const n=e.T,t=new n;return n.fieldWrapper?n.fieldWrapper.unwrapField(t):t;case"map":throw"map fields are not allowed to be extensions"}}function sR(a,e){if(!e.repeated&&(e.kind=="enum"||e.kind=="scalar")){for(let n=a.length-1;n>=0;--n)if(a[n].no==e.no)return[a[n]];return[]}return a.filter(n=>n.no===e.no)}let Te="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),Xn=[];for(let a=0;a<Te.length;a++)Xn[Te[a].charCodeAt(0)]=a;Xn[45]=Te.indexOf("+"),Xn[95]=Te.indexOf("/");const it={dec(a){let e=a.length*3/4;a[a.length-2]=="="?e-=2:a[a.length-1]=="="&&(e-=1);let n=new Uint8Array(e),t=0,o=0,i,r=0;for(let c=0;c<a.length;c++){if(i=Xn[a.charCodeAt(c)],i===void 0)switch(a[c]){case"=":o=0;case`
|
|
2
|
-
`:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(o){case 0:r=i,o=1;break;case 1:n[t++]=r<<2|(i&48)>>4,r=i,o=2;break;case 2:n[t++]=(r&15)<<4|(i&60)>>2,r=i,o=3;break;case 3:n[t++]=(r&3)<<6|i,o=0;break}}if(o==1)throw Error("invalid base64 string.");return n.subarray(0,t)},enc(a){let e="",n=0,t,o=0;for(let i=0;i<a.length;i++)switch(t=a[i],n){case 0:e+=Te[t>>2],o=(t&3)<<4,n=1;break;case 1:e+=Te[o|t>>4],o=(t&15)<<2,n=2;break;case 2:e+=Te[o|t>>6],e+=Te[t&63],n=0;break}return n&&(e+=Te[o],e+="=",n==1&&(e+="=")),e}};function oR(a,e,n){Fi(e,a);const t=e.runtime.bin.makeReadOptions(n),o=sR(a.getType().runtime.bin.listUnknownFields(a),e.field),[i,r]=Gi(e);for(const c of o)e.runtime.bin.readField(i,t.readerFactory(c.data),e.field,c.wireType,t);return r()}function iR(a,e,n,t){Fi(e,a);const o=e.runtime.bin.makeReadOptions(t),i=e.runtime.bin.makeWriteOptions(t);if(Bi(a,e)){const l=a.getType().runtime.bin.listUnknownFields(a).filter(u=>u.no!=e.field.no);a.getType().runtime.bin.discardUnknownFields(a);for(const u of l)a.getType().runtime.bin.onUnknownField(a,u.no,u.wireType,u.data)}const r=i.writerFactory();let c=e.field;!c.opt&&!c.repeated&&(c.kind=="enum"||c.kind=="scalar")&&(c=Object.assign(Object.assign({},e.field),{opt:!0})),e.runtime.bin.writeField(c,n,r,i);const d=o.readerFactory(r.finish());for(;d.pos<d.len;){const[l,u]=d.tag(),h=d.skip(u,l);a.getType().runtime.bin.onUnknownField(a,l,u,h)}}function Bi(a,e){const n=a.getType();return e.extendee.typeName===n.typeName&&!!n.runtime.bin.listUnknownFields(a).find(t=>t.no==e.field.no)}function Fi(a,e){G(a.extendee.typeName==e.getType().typeName,`extension ${a.typeName} can only be applied to message ${a.extendee.typeName}`)}function xi(a,e){const n=a.localName;if(a.repeated)return e[n].length>0;if(a.oneof)return e[a.oneof.localName].case===n;switch(a.kind){case"enum":case"scalar":return a.opt||a.req?e[n]!==void 0:a.kind=="enum"?e[n]!==a.T.values[0].no:!qi(a.T,e[n]);case"message":return e[n]!==void 0;case"map":return Object.keys(e[n]).length>0}}function Ji(a,e){const n=a.localName,t=!a.opt&&!a.req;if(a.repeated)e[n]=[];else if(a.oneof)e[a.oneof.localName]={case:void 0};else switch(a.kind){case"map":e[n]={};break;case"enum":e[n]=t?a.T.values[0].no:void 0;break;case"scalar":e[n]=t?ln(a.T,a.L):void 0;break;case"message":e[n]=void 0;break}}function Ze(a,e){if(a===null||typeof a!="object"||!Object.getOwnPropertyNames(M.prototype).every(t=>t in a&&typeof a[t]=="function"))return!1;const n=a.getType();return n===null||typeof n!="function"||!("typeName"in n)||typeof n.typeName!="string"?!1:e===void 0?!0:n.typeName==e.typeName}function zi(a,e){return Ze(e)||!a.fieldWrapper?e:a.fieldWrapper.wrapField(e)}_.DOUBLE,_.FLOAT,_.INT64,_.UINT64,_.INT32,_.UINT32,_.BOOL,_.STRING,_.BYTES;const Vi={ignoreUnknownFields:!1},$i={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0};function rR(a){return a?Object.assign(Object.assign({},Vi),a):Vi}function mR(a){return a?Object.assign(Object.assign({},$i),a):$i}const Qn=Symbol(),Zn=Symbol();function cR(){return{makeReadOptions:rR,makeWriteOptions:mR,readMessage(a,e,n,t){if(e==null||Array.isArray(e)||typeof e!="object")throw new Error(`cannot decode message ${a.typeName} from JSON: ${oe(e)}`);t=t??new a;const o=new Map,i=n.typeRegistry;for(const[r,c]of Object.entries(e)){const d=a.fields.findJsonName(r);if(d){if(d.oneof){if(c===null&&d.kind=="scalar")continue;const l=o.get(d.oneof);if(l!==void 0)throw new Error(`cannot decode message ${a.typeName} from JSON: multiple keys for oneof "${d.oneof.name}" present: "${l}", "${r}"`);o.set(d.oneof,r)}Yi(t,c,d,n,a)}else{let l=!1;if(i?.findExtension&&r.startsWith("[")&&r.endsWith("]")){const u=i.findExtension(r.substring(1,r.length-1));if(u&&u.extendee.typeName==a.typeName){l=!0;const[h,I]=Gi(u);Yi(h,c,u.field,n,u),iR(t,u,I(),n)}}if(!l&&!n.ignoreUnknownFields)throw new Error(`cannot decode message ${a.typeName} from JSON: key "${r}" is unknown`)}}return t},writeMessage(a,e){const n=a.getType(),t={};let o;try{for(o of n.fields.byNumber()){if(!xi(o,a)){if(o.req)throw"required field not set";if(!e.emitDefaultValues||!dR(o))continue}const r=o.oneof?a[o.oneof.localName].value:a[o.localName],c=Wi(o,r,e);c!==void 0&&(t[e.useProtoFieldName?o.name:o.jsonName]=c)}const i=e.typeRegistry;if(i?.findExtensionFor)for(const r of n.runtime.bin.listUnknownFields(a)){const c=i.findExtensionFor(n.typeName,r.no);if(c&&Bi(a,c)){const d=oR(a,c,e),l=Wi(c.field,d,e);l!==void 0&&(t[c.field.jsonName]=l)}}}catch(i){const r=o?`cannot encode field ${n.typeName}.${o.name} to JSON`:`cannot encode message ${n.typeName} to JSON`,c=i instanceof Error?i.message:String(i);throw new Error(r+(c.length>0?`: ${c}`:""))}return t},readScalar(a,e,n){return _n(a,e,n??Je.BIGINT,!0)},writeScalar(a,e,n){if(e!==void 0&&(n||qi(a,e)))return ea(a,e)},debug:oe}}function oe(a){if(a===null)return"null";switch(typeof a){case"object":return Array.isArray(a)?"array":"object";case"string":return a.length>100?"string":`"${a.split('"').join('\\"')}"`;default:return String(a)}}function Yi(a,e,n,t,o){let i=n.localName;if(n.repeated){if(G(n.kind!="map"),e===null)return;if(!Array.isArray(e))throw new Error(`cannot decode field ${o.typeName}.${n.name} from JSON: ${oe(e)}`);const r=a[i];for(const c of e){if(c===null)throw new Error(`cannot decode field ${o.typeName}.${n.name} from JSON: ${oe(c)}`);switch(n.kind){case"message":r.push(n.T.fromJson(c,t));break;case"enum":const d=rt(n.T,c,t.ignoreUnknownFields,!0);d!==Zn&&r.push(d);break;case"scalar":try{r.push(_n(n.T,c,n.L,!0))}catch(l){let u=`cannot decode field ${o.typeName}.${n.name} from JSON: ${oe(c)}`;throw l instanceof Error&&l.message.length>0&&(u+=`: ${l.message}`),new Error(u)}break}}}else if(n.kind=="map"){if(e===null)return;if(typeof e!="object"||Array.isArray(e))throw new Error(`cannot decode field ${o.typeName}.${n.name} from JSON: ${oe(e)}`);const r=a[i];for(const[c,d]of Object.entries(e)){if(d===null)throw new Error(`cannot decode field ${o.typeName}.${n.name} from JSON: map value null`);let l;try{l=lR(n.K,c)}catch(u){let h=`cannot decode map key for field ${o.typeName}.${n.name} from JSON: ${oe(e)}`;throw u instanceof Error&&u.message.length>0&&(h+=`: ${u.message}`),new Error(h)}switch(n.V.kind){case"message":r[l]=n.V.T.fromJson(d,t);break;case"enum":const u=rt(n.V.T,d,t.ignoreUnknownFields,!0);u!==Zn&&(r[l]=u);break;case"scalar":try{r[l]=_n(n.V.T,d,Je.BIGINT,!0)}catch(h){let I=`cannot decode map value for field ${o.typeName}.${n.name} from JSON: ${oe(e)}`;throw h instanceof Error&&h.message.length>0&&(I+=`: ${h.message}`),new Error(I)}break}}}else switch(n.oneof&&(a=a[n.oneof.localName]={case:i},i="value"),n.kind){case"message":const r=n.T;if(e===null&&r.typeName!="google.protobuf.Value")return;let c=a[i];Ze(c)?c.fromJson(e,t):(a[i]=c=r.fromJson(e,t),r.fieldWrapper&&!n.oneof&&(a[i]=r.fieldWrapper.unwrapField(c)));break;case"enum":const d=rt(n.T,e,t.ignoreUnknownFields,!1);switch(d){case Qn:Ji(n,a);break;case Zn:break;default:a[i]=d;break}break;case"scalar":try{const l=_n(n.T,e,n.L,!1);switch(l){case Qn:Ji(n,a);break;default:a[i]=l;break}}catch(l){let u=`cannot decode field ${o.typeName}.${n.name} from JSON: ${oe(e)}`;throw l instanceof Error&&l.message.length>0&&(u+=`: ${l.message}`),new Error(u)}break}}function lR(a,e){if(a===_.BOOL)switch(e){case"true":e=!0;break;case"false":e=!1;break}return _n(a,e,Je.BIGINT,!0).toString()}function _n(a,e,n,t){if(e===null)return t?ln(a,n):Qn;switch(a){case _.DOUBLE:case _.FLOAT:if(e==="NaN")return Number.NaN;if(e==="Infinity")return Number.POSITIVE_INFINITY;if(e==="-Infinity")return Number.NEGATIVE_INFINITY;if(e===""||typeof e=="string"&&e.trim().length!==e.length||typeof e!="string"&&typeof e!="number")break;const o=Number(e);if(Number.isNaN(o)||!Number.isFinite(o))break;return a==_.FLOAT&&Oi(o),o;case _.INT32:case _.FIXED32:case _.SFIXED32:case _.SINT32:case _.UINT32:let i;if(typeof e=="number"?i=e:typeof e=="string"&&e.length>0&&e.trim().length===e.length&&(i=Number(e)),i===void 0)break;return a==_.UINT32||a==_.FIXED32?tt(i):jn(i),i;case _.INT64:case _.SFIXED64:case _.SINT64:if(typeof e!="number"&&typeof e!="string")break;const r=W.parse(e);return n?r.toString():r;case _.FIXED64:case _.UINT64:if(typeof e!="number"&&typeof e!="string")break;const c=W.uParse(e);return n?c.toString():c;case _.BOOL:if(typeof e!="boolean")break;return e;case _.STRING:if(typeof e!="string")break;try{encodeURIComponent(e)}catch{throw new Error("invalid UTF8")}return e;case _.BYTES:if(e==="")return new Uint8Array(0);if(typeof e!="string")break;return it.dec(e)}throw new Error}function rt(a,e,n,t){if(e===null)return a.typeName=="google.protobuf.NullValue"?0:t?a.values[0].no:Qn;switch(typeof e){case"number":if(Number.isInteger(e))return e;break;case"string":const o=a.findName(e);if(o!==void 0)return o.no;if(n)return Zn;break}throw new Error(`cannot decode enum ${a.typeName} from JSON: ${oe(e)}`)}function dR(a){return a.repeated||a.kind=="map"?!0:!(a.oneof||a.kind=="message"||a.opt||a.req)}function Wi(a,e,n){if(a.kind=="map"){G(typeof e=="object"&&e!=null);const t={},o=Object.entries(e);switch(a.V.kind){case"scalar":for(const[r,c]of o)t[r.toString()]=ea(a.V.T,c);break;case"message":for(const[r,c]of o)t[r.toString()]=c.toJson(n);break;case"enum":const i=a.V.T;for(const[r,c]of o)t[r.toString()]=mt(i,c,n.enumAsInteger);break}return n.emitDefaultValues||o.length>0?t:void 0}if(a.repeated){G(Array.isArray(e));const t=[];switch(a.kind){case"scalar":for(let o=0;o<e.length;o++)t.push(ea(a.T,e[o]));break;case"enum":for(let o=0;o<e.length;o++)t.push(mt(a.T,e[o],n.enumAsInteger));break;case"message":for(let o=0;o<e.length;o++)t.push(e[o].toJson(n));break}return n.emitDefaultValues||t.length>0?t:void 0}switch(a.kind){case"scalar":return ea(a.T,e);case"enum":return mt(a.T,e,n.enumAsInteger);case"message":return zi(a.T,e).toJson(n)}}function mt(a,e,n){var t;if(G(typeof e=="number"),a.typeName=="google.protobuf.NullValue")return null;if(n)return e;const o=a.findNumber(e);return(t=o?.name)!==null&&t!==void 0?t:e}function ea(a,e){switch(a){case _.INT32:case _.SFIXED32:case _.SINT32:case _.FIXED32:case _.UINT32:return G(typeof e=="number"),e;case _.FLOAT:case _.DOUBLE:return G(typeof e=="number"),Number.isNaN(e)?"NaN":e===Number.POSITIVE_INFINITY?"Infinity":e===Number.NEGATIVE_INFINITY?"-Infinity":e;case _.STRING:return G(typeof e=="string"),e;case _.BOOL:return G(typeof e=="boolean"),e;case _.UINT64:case _.FIXED64:case _.INT64:case _.SFIXED64:case _.SINT64:return G(typeof e=="bigint"||typeof e=="string"||typeof e=="number"),e.toString();case _.BYTES:return G(e instanceof Uint8Array),it.enc(e)}}const dn=Symbol("@bufbuild/protobuf/unknown-fields"),Hi={readUnknownFields:!0,readerFactory:a=>new Li(a)},ji={writeUnknownFields:!0,writerFactory:()=>new nR};function pR(a){return a?Object.assign(Object.assign({},Hi),a):Hi}function uR(a){return a?Object.assign(Object.assign({},ji),a):ji}function gR(){return{makeReadOptions:pR,makeWriteOptions:uR,listUnknownFields(a){var e;return(e=a[dn])!==null&&e!==void 0?e:[]},discardUnknownFields(a){delete a[dn]},writeUnknownFields(a,e){const t=a[dn];if(t)for(const o of t)e.tag(o.no,o.wireType).raw(o.data)},onUnknownField(a,e,n,t){const o=a;Array.isArray(o[dn])||(o[dn]=[]),o[dn].push({no:e,wireType:n,data:t})},readMessage(a,e,n,t,o){const i=a.getType(),r=o?e.len:e.pos+n;let c,d;for(;e.pos<r&&([c,d]=e.tag(),!(o===!0&&d==x.EndGroup));){const l=i.fields.find(c);if(!l){const u=e.skip(d,c);t.readUnknownFields&&this.onUnknownField(a,c,d,u);continue}Ki(a,e,l,d,t)}if(o&&(d!=x.EndGroup||c!==n))throw new Error("invalid end group tag")},readField:Ki,writeMessage(a,e,n){const t=a.getType();for(const o of t.fields.byNumber()){if(!xi(o,a)){if(o.req)throw new Error(`cannot encode field ${t.typeName}.${o.name} to binary: required field not set`);continue}const i=o.oneof?a[o.oneof.localName].value:a[o.localName];Xi(o,i,e,n)}return n.writeUnknownFields&&this.writeUnknownFields(a,e),e},writeField(a,e,n,t){e!==void 0&&Xi(a,e,n,t)}}}function Ki(a,e,n,t,o){let{repeated:i,localName:r}=n;switch(n.oneof&&(a=a[n.oneof.localName],a.case!=r&&delete a.value,a.case=r,r="value"),n.kind){case"scalar":case"enum":const c=n.kind=="enum"?_.INT32:n.T;let d=aa;if(n.kind=="scalar"&&n.L>0&&(d=kR),i){let I=a[r];if(t==x.LengthDelimited&&c!=_.STRING&&c!=_.BYTES){let b=e.uint32()+e.pos;for(;e.pos<b;)I.push(d(e,c))}else I.push(d(e,c))}else a[r]=d(e,c);break;case"message":const l=n.T;i?a[r].push(na(e,new l,o,n)):Ze(a[r])?na(e,a[r],o,n):(a[r]=na(e,new l,o,n),l.fieldWrapper&&!n.oneof&&!n.repeated&&(a[r]=l.fieldWrapper.unwrapField(a[r])));break;case"map":let[u,h]=TR(n,e,o);a[r][u]=h;break}}function na(a,e,n,t){const o=e.getType().runtime.bin,i=t?.delimited;return o.readMessage(e,a,i?t.no:a.uint32(),n,i),e}function TR(a,e,n){const t=e.uint32(),o=e.pos+t;let i,r;for(;e.pos<o;){const[c]=e.tag();switch(c){case 1:i=aa(e,a.K);break;case 2:switch(a.V.kind){case"scalar":r=aa(e,a.V.T);break;case"enum":r=e.int32();break;case"message":r=na(e,new a.V.T,n,void 0);break}break}}if(i===void 0&&(i=ln(a.K,Je.BIGINT)),typeof i!="string"&&typeof i!="number"&&(i=i.toString()),r===void 0)switch(a.V.kind){case"scalar":r=ln(a.V.T,Je.BIGINT);break;case"enum":r=a.V.T.values[0].no;break;case"message":r=new a.V.T;break}return[i,r]}function kR(a,e){const n=aa(a,e);return typeof n=="bigint"?n.toString():n}function aa(a,e){switch(e){case _.STRING:return a.string();case _.BOOL:return a.bool();case _.DOUBLE:return a.double();case _.FLOAT:return a.float();case _.INT32:return a.int32();case _.INT64:return a.int64();case _.UINT64:return a.uint64();case _.FIXED64:return a.fixed64();case _.BYTES:return a.bytes();case _.FIXED32:return a.fixed32();case _.SFIXED32:return a.sfixed32();case _.SFIXED64:return a.sfixed64();case _.SINT64:return a.sint64();case _.UINT32:return a.uint32();case _.SINT32:return a.sint32()}}function Xi(a,e,n,t){G(e!==void 0);const o=a.repeated;switch(a.kind){case"scalar":case"enum":let i=a.kind=="enum"?_.INT32:a.T;if(o)if(G(Array.isArray(e)),a.packed)vR(n,i,a.no,e);else for(const r of e)Sn(n,i,a.no,r);else Sn(n,i,a.no,e);break;case"message":if(o){G(Array.isArray(e));for(const r of e)Qi(n,t,a,r)}else Qi(n,t,a,e);break;case"map":G(typeof e=="object"&&e!=null);for(const[r,c]of Object.entries(e))yR(n,t,a,r,c);break}}function yR(a,e,n,t,o){a.tag(n.no,x.LengthDelimited),a.fork();let i=t;switch(n.K){case _.INT32:case _.FIXED32:case _.UINT32:case _.SFIXED32:case _.SINT32:i=Number.parseInt(t);break;case _.BOOL:G(t=="true"||t=="false"),i=t=="true";break}switch(Sn(a,n.K,1,i),n.V.kind){case"scalar":Sn(a,n.V.T,2,o);break;case"enum":Sn(a,_.INT32,2,o);break;case"message":G(o!==void 0),a.tag(2,x.LengthDelimited).bytes(o.toBinary(e));break}a.join()}function Qi(a,e,n,t){const o=zi(n.T,t);n.delimited?a.tag(n.no,x.StartGroup).raw(o.toBinary(e)).tag(n.no,x.EndGroup):a.tag(n.no,x.LengthDelimited).bytes(o.toBinary(e))}function Sn(a,e,n,t){G(t!==void 0);let[o,i]=Zi(e);a.tag(n,o)[i](t)}function vR(a,e,n,t){if(!t.length)return;a.tag(n,x.LengthDelimited).fork();let[,o]=Zi(e);for(let i=0;i<t.length;i++)a[o](t[i]);a.join()}function Zi(a){let e=x.Varint;switch(a){case _.BYTES:case _.STRING:e=x.LengthDelimited;break;case _.DOUBLE:case _.FIXED64:case _.SFIXED64:e=x.Bit64;break;case _.FIXED32:case _.SFIXED32:case _.FLOAT:e=x.Bit32;break}const n=_[a].toLowerCase();return[e,n]}function hR(){return{setEnumType:Mi,initPartial(a,e){if(a===void 0)return;const n=e.getType();for(const t of n.fields.byMember()){const o=t.localName,i=e,r=a;if(r[o]!=null)switch(t.kind){case"oneof":const c=r[o].case;if(c===void 0)continue;const d=t.findField(c);let l=r[o].value;d&&d.kind=="message"&&!Ze(l,d.T)?l=new d.T(l):d&&d.kind==="scalar"&&d.T===_.BYTES&&(l=In(l)),i[o]={case:c,value:l};break;case"scalar":case"enum":let u=r[o];t.T===_.BYTES&&(u=t.repeated?u.map(In):In(u)),i[o]=u;break;case"map":switch(t.V.kind){case"scalar":case"enum":if(t.V.T===_.BYTES)for(const[R,b]of Object.entries(r[o]))i[o][R]=In(b);else Object.assign(i[o],r[o]);break;case"message":const I=t.V.T;for(const R of Object.keys(r[o])){let b=r[o][R];I.fieldWrapper||(b=new I(b)),i[o][R]=b}break}break;case"message":const h=t.T;if(t.repeated)i[o]=r[o].map(I=>Ze(I,h)?I:new h(I));else{const I=r[o];h.fieldWrapper?h.typeName==="google.protobuf.BytesValue"?i[o]=In(I):i[o]=I:i[o]=Ze(I,h)?I:new h(I)}break}}},equals(a,e,n){return e===n?!0:!e||!n?!1:a.fields.byMember().every(t=>{const o=e[t.localName],i=n[t.localName];if(t.repeated){if(o.length!==i.length)return!1;switch(t.kind){case"message":return o.every((r,c)=>t.T.equals(r,i[c]));case"scalar":return o.every((r,c)=>ze(t.T,r,i[c]));case"enum":return o.every((r,c)=>ze(_.INT32,r,i[c]))}throw new Error(`repeated cannot contain ${t.kind}`)}switch(t.kind){case"message":return t.T.equals(o,i);case"enum":return ze(_.INT32,o,i);case"scalar":return ze(t.T,o,i);case"oneof":if(o.case!==i.case)return!1;const r=t.findField(o.case);if(r===void 0)return!0;switch(r.kind){case"message":return r.T.equals(o.value,i.value);case"enum":return ze(_.INT32,o.value,i.value);case"scalar":return ze(r.T,o.value,i.value)}throw new Error(`oneof cannot contain ${r.kind}`);case"map":const c=Object.keys(o).concat(Object.keys(i));switch(t.V.kind){case"message":const d=t.V.T;return c.every(u=>d.equals(o[u],i[u]));case"enum":return c.every(u=>ze(_.INT32,o[u],i[u]));case"scalar":const l=t.V.T;return c.every(u=>ze(l,o[u],i[u]))}break}})},clone(a){const e=a.getType(),n=new e,t=n;for(const o of e.fields.byMember()){const i=a[o.localName];let r;if(o.repeated)r=i.map(ta);else if(o.kind=="map"){r=t[o.localName];for(const[c,d]of Object.entries(i))r[c]=ta(d)}else o.kind=="oneof"?r=o.findField(i.case)?{case:i.case,value:ta(i.value)}:{case:void 0}:r=ta(i);t[o.localName]=r}for(const o of e.runtime.bin.listUnknownFields(a))e.runtime.bin.onUnknownField(t,o.no,o.wireType,o.data);return n}}}function ta(a){if(a===void 0)return a;if(Ze(a))return a.clone();if(a instanceof Uint8Array){const e=new Uint8Array(a.byteLength);return e.set(a),e}return a}function In(a){return a instanceof Uint8Array?a:new Uint8Array(a)}function er(a,e,n){return{syntax:a,json:cR(),bin:gR(),util:Object.assign(Object.assign({},hR()),{newFieldList:e,initFields:n}),makeMessageType(t,o,i){return jf(this,t,o,i)},makeEnum:Hf,makeEnumType:wi,getEnumType:Wf,makeExtension(t,o,i){return aR(this,t,o,i)}}}class nr{constructor(e,n){this._fields=e,this._normalizer=n}findJsonName(e){if(!this.jsonNames){const n={};for(const t of this.list())n[t.jsonName]=n[t.name]=t;this.jsonNames=n}return this.jsonNames[e]}find(e){if(!this.numbers){const n={};for(const t of this.list())n[t.no]=t;this.numbers=n}return this.numbers[e]}list(){return this.all||(this.all=this._normalizer(this._fields)),this.all}byNumber(){return this.numbersAsc||(this.numbersAsc=this.list().concat().sort((e,n)=>e.no-n.no)),this.numbersAsc}byMember(){if(!this.members){this.members=[];const e=this.members;let n;for(const t of this.list())t.oneof?t.oneof!==n&&(n=t.oneof,e.push(n)):e.push(t)}return this.members}}function ar(a,e){const n=tr(a);return e?n:bR(IR(n))}function fR(a){return ar(a,!1)}const RR=tr;function tr(a){let e=!1;const n=[];for(let t=0;t<a.length;t++){let o=a.charAt(t);switch(o){case"_":e=!0;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":n.push(o),e=!1;break;default:e&&(e=!1,o=o.toUpperCase()),n.push(o);break}}return n.join("")}const _R=new Set(["constructor","toString","toJSON","valueOf"]),SR=new Set(["getType","clone","equals","fromBinary","fromJson","fromJsonString","toBinary","toJson","toJsonString","toObject"]),sr=a=>`${a}$`,IR=a=>SR.has(a)?sr(a):a,bR=a=>_R.has(a)?sr(a):a;class OR{constructor(e){this.kind="oneof",this.repeated=!1,this.packed=!1,this.opt=!1,this.req=!1,this.default=void 0,this.fields=[],this.name=e,this.localName=fR(e)}addField(e){G(e.oneof===this,`field ${e.name} not one of ${this.name}`),this.fields.push(e)}findField(e){if(!this._lookup){this._lookup=Object.create(null);for(let n=0;n<this.fields.length;n++)this._lookup[this.fields[n].localName]=this.fields[n]}return this._lookup[e]}}function or(a,e){var n,t,o,i,r,c;const d=[];let l;for(const u of typeof a=="function"?a():a){const h=u;if(h.localName=ar(u.name,u.oneof!==void 0),h.jsonName=(n=u.jsonName)!==null&&n!==void 0?n:RR(u.name),h.repeated=(t=u.repeated)!==null&&t!==void 0?t:!1,u.kind=="scalar"&&(h.L=(o=u.L)!==null&&o!==void 0?o:Je.BIGINT),h.delimited=(i=u.delimited)!==null&&i!==void 0?i:!1,h.req=(r=u.req)!==null&&r!==void 0?r:!1,h.opt=(c=u.opt)!==null&&c!==void 0?c:!1,u.packed===void 0&&(e?h.packed=u.kind=="enum"||u.kind=="scalar"&&u.T!=_.BYTES&&u.T!=_.STRING:h.packed=!1),u.oneof!==void 0){const I=typeof u.oneof=="string"?u.oneof:u.oneof.name;(!l||l.name!=I)&&(l=new OR(I)),h.oneof=l,l.addField(h)}d.push(h)}return d}const s=er("proto3",a=>new nr(a,e=>or(e,!0)),a=>{for(const e of a.getType().fields.byMember()){if(e.opt)continue;const n=e.localName,t=a;if(e.repeated){t[n]=[];continue}switch(e.kind){case"oneof":t[n]={case:void 0};break;case"enum":t[n]=0;break;case"map":t[n]={};break;case"scalar":t[n]=ln(e.T,e.L);break}}}),T=er("proto2",a=>new nr(a,e=>or(e,!1)),a=>{for(const e of a.getType().fields.byMember()){const n=e.localName,t=a;if(e.repeated){t[n]=[];continue}switch(e.kind){case"oneof":t[n]={case:void 0};break;case"map":t[n]={};break}}});var m;(function(a){a[a.Unary=0]="Unary",a[a.ServerStreaming=1]="ServerStreaming",a[a.ClientStreaming=2]="ClientStreaming",a[a.BiDiStreaming=3]="BiDiStreaming"})(m||(m={}));var ir;(function(a){a[a.NoSideEffects=1]="NoSideEffects",a[a.Idempotent=2]="Idempotent"})(ir||(ir={}));var ae;(function(a){a[a.EDITION_UNKNOWN=0]="EDITION_UNKNOWN",a[a.EDITION_LEGACY=900]="EDITION_LEGACY",a[a.EDITION_PROTO2=998]="EDITION_PROTO2",a[a.EDITION_PROTO3=999]="EDITION_PROTO3",a[a.EDITION_2023=1e3]="EDITION_2023",a[a.EDITION_2024=1001]="EDITION_2024",a[a.EDITION_1_TEST_ONLY=1]="EDITION_1_TEST_ONLY",a[a.EDITION_2_TEST_ONLY=2]="EDITION_2_TEST_ONLY",a[a.EDITION_99997_TEST_ONLY=99997]="EDITION_99997_TEST_ONLY",a[a.EDITION_99998_TEST_ONLY=99998]="EDITION_99998_TEST_ONLY",a[a.EDITION_99999_TEST_ONLY=99999]="EDITION_99999_TEST_ONLY",a[a.EDITION_MAX=2147483647]="EDITION_MAX"})(ae||(ae={})),T.util.setEnumType(ae,"google.protobuf.Edition",[{no:0,name:"EDITION_UNKNOWN"},{no:900,name:"EDITION_LEGACY"},{no:998,name:"EDITION_PROTO2"},{no:999,name:"EDITION_PROTO3"},{no:1e3,name:"EDITION_2023"},{no:1001,name:"EDITION_2024"},{no:1,name:"EDITION_1_TEST_ONLY"},{no:2,name:"EDITION_2_TEST_ONLY"},{no:99997,name:"EDITION_99997_TEST_ONLY"},{no:99998,name:"EDITION_99998_TEST_ONLY"},{no:99999,name:"EDITION_99999_TEST_ONLY"},{no:2147483647,name:"EDITION_MAX"}]);class Ve extends M{constructor(e){super(),this.file=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Ve().fromBinary(e,n)}static fromJson(e,n){return new Ve().fromJson(e,n)}static fromJsonString(e,n){return new Ve().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Ve,e,n)}}Ve.runtime=T,Ve.typeName="google.protobuf.FileDescriptorSet",Ve.fields=T.util.newFieldList(()=>[{no:1,name:"file",kind:"message",T:ie,repeated:!0}]);class ie extends M{constructor(e){super(),this.dependency=[],this.publicDependency=[],this.weakDependency=[],this.messageType=[],this.enumType=[],this.service=[],this.extension=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new ie().fromBinary(e,n)}static fromJson(e,n){return new ie().fromJson(e,n)}static fromJsonString(e,n){return new ie().fromJsonString(e,n)}static equals(e,n){return T.util.equals(ie,e,n)}}ie.runtime=T,ie.typeName="google.protobuf.FileDescriptorProto",ie.fields=T.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"package",kind:"scalar",T:9,opt:!0},{no:3,name:"dependency",kind:"scalar",T:9,repeated:!0},{no:10,name:"public_dependency",kind:"scalar",T:5,repeated:!0},{no:11,name:"weak_dependency",kind:"scalar",T:5,repeated:!0},{no:4,name:"message_type",kind:"message",T:re,repeated:!0},{no:5,name:"enum_type",kind:"message",T:me,repeated:!0},{no:6,name:"service",kind:"message",T:Se,repeated:!0},{no:7,name:"extension",kind:"message",T:te,repeated:!0},{no:8,name:"options",kind:"message",T:be,opt:!0},{no:9,name:"source_code_info",kind:"message",T:Ue,opt:!0},{no:12,name:"syntax",kind:"scalar",T:9,opt:!0},{no:14,name:"edition",kind:"enum",T:T.getEnumType(ae),opt:!0}]);class re extends M{constructor(e){super(),this.field=[],this.extension=[],this.nestedType=[],this.enumType=[],this.extensionRange=[],this.oneofDecl=[],this.reservedRange=[],this.reservedName=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new re().fromBinary(e,n)}static fromJson(e,n){return new re().fromJson(e,n)}static fromJsonString(e,n){return new re().fromJsonString(e,n)}static equals(e,n){return T.util.equals(re,e,n)}}re.runtime=T,re.typeName="google.protobuf.DescriptorProto",re.fields=T.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"field",kind:"message",T:te,repeated:!0},{no:6,name:"extension",kind:"message",T:te,repeated:!0},{no:3,name:"nested_type",kind:"message",T:re,repeated:!0},{no:4,name:"enum_type",kind:"message",T:me,repeated:!0},{no:5,name:"extension_range",kind:"message",T:ke,repeated:!0},{no:8,name:"oneof_decl",kind:"message",T:fe,repeated:!0},{no:7,name:"options",kind:"message",T:Oe,opt:!0},{no:9,name:"reserved_range",kind:"message",T:ye,repeated:!0},{no:10,name:"reserved_name",kind:"scalar",T:9,repeated:!0}]);class ke extends M{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new ke().fromBinary(e,n)}static fromJson(e,n){return new ke().fromJson(e,n)}static fromJsonString(e,n){return new ke().fromJsonString(e,n)}static equals(e,n){return T.util.equals(ke,e,n)}}ke.runtime=T,ke.typeName="google.protobuf.DescriptorProto.ExtensionRange",ke.fields=T.util.newFieldList(()=>[{no:1,name:"start",kind:"scalar",T:5,opt:!0},{no:2,name:"end",kind:"scalar",T:5,opt:!0},{no:3,name:"options",kind:"message",T:ve,opt:!0}]);class ye extends M{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new ye().fromBinary(e,n)}static fromJson(e,n){return new ye().fromJson(e,n)}static fromJsonString(e,n){return new ye().fromJsonString(e,n)}static equals(e,n){return T.util.equals(ye,e,n)}}ye.runtime=T,ye.typeName="google.protobuf.DescriptorProto.ReservedRange",ye.fields=T.util.newFieldList(()=>[{no:1,name:"start",kind:"scalar",T:5,opt:!0},{no:2,name:"end",kind:"scalar",T:5,opt:!0}]);class ve extends M{constructor(e){super(),this.uninterpretedOption=[],this.declaration=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new ve().fromBinary(e,n)}static fromJson(e,n){return new ve().fromJson(e,n)}static fromJsonString(e,n){return new ve().fromJsonString(e,n)}static equals(e,n){return T.util.equals(ve,e,n)}}ve.runtime=T,ve.typeName="google.protobuf.ExtensionRangeOptions",ve.fields=T.util.newFieldList(()=>[{no:999,name:"uninterpreted_option",kind:"message",T:H,repeated:!0},{no:2,name:"declaration",kind:"message",T:he,repeated:!0},{no:50,name:"features",kind:"message",T:$,opt:!0},{no:3,name:"verification",kind:"enum",T:T.getEnumType(bn),opt:!0,default:bn.UNVERIFIED}]);var bn;(function(a){a[a.DECLARATION=0]="DECLARATION",a[a.UNVERIFIED=1]="UNVERIFIED"})(bn||(bn={})),T.util.setEnumType(bn,"google.protobuf.ExtensionRangeOptions.VerificationState",[{no:0,name:"DECLARATION"},{no:1,name:"UNVERIFIED"}]);class he extends M{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new he().fromBinary(e,n)}static fromJson(e,n){return new he().fromJson(e,n)}static fromJsonString(e,n){return new he().fromJsonString(e,n)}static equals(e,n){return T.util.equals(he,e,n)}}he.runtime=T,he.typeName="google.protobuf.ExtensionRangeOptions.Declaration",he.fields=T.util.newFieldList(()=>[{no:1,name:"number",kind:"scalar",T:5,opt:!0},{no:2,name:"full_name",kind:"scalar",T:9,opt:!0},{no:3,name:"type",kind:"scalar",T:9,opt:!0},{no:5,name:"reserved",kind:"scalar",T:8,opt:!0},{no:6,name:"repeated",kind:"scalar",T:8,opt:!0}]);class te extends M{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new te().fromBinary(e,n)}static fromJson(e,n){return new te().fromJson(e,n)}static fromJsonString(e,n){return new te().fromJsonString(e,n)}static equals(e,n){return T.util.equals(te,e,n)}}te.runtime=T,te.typeName="google.protobuf.FieldDescriptorProto",te.fields=T.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:3,name:"number",kind:"scalar",T:5,opt:!0},{no:4,name:"label",kind:"enum",T:T.getEnumType(oa),opt:!0},{no:5,name:"type",kind:"enum",T:T.getEnumType(sa),opt:!0},{no:6,name:"type_name",kind:"scalar",T:9,opt:!0},{no:2,name:"extendee",kind:"scalar",T:9,opt:!0},{no:7,name:"default_value",kind:"scalar",T:9,opt:!0},{no:9,name:"oneof_index",kind:"scalar",T:5,opt:!0},{no:10,name:"json_name",kind:"scalar",T:9,opt:!0},{no:8,name:"options",kind:"message",T:Ee,opt:!0},{no:17,name:"proto3_optional",kind:"scalar",T:8,opt:!0}]);var sa;(function(a){a[a.DOUBLE=1]="DOUBLE",a[a.FLOAT=2]="FLOAT",a[a.INT64=3]="INT64",a[a.UINT64=4]="UINT64",a[a.INT32=5]="INT32",a[a.FIXED64=6]="FIXED64",a[a.FIXED32=7]="FIXED32",a[a.BOOL=8]="BOOL",a[a.STRING=9]="STRING",a[a.GROUP=10]="GROUP",a[a.MESSAGE=11]="MESSAGE",a[a.BYTES=12]="BYTES",a[a.UINT32=13]="UINT32",a[a.ENUM=14]="ENUM",a[a.SFIXED32=15]="SFIXED32",a[a.SFIXED64=16]="SFIXED64",a[a.SINT32=17]="SINT32",a[a.SINT64=18]="SINT64"})(sa||(sa={})),T.util.setEnumType(sa,"google.protobuf.FieldDescriptorProto.Type",[{no:1,name:"TYPE_DOUBLE"},{no:2,name:"TYPE_FLOAT"},{no:3,name:"TYPE_INT64"},{no:4,name:"TYPE_UINT64"},{no:5,name:"TYPE_INT32"},{no:6,name:"TYPE_FIXED64"},{no:7,name:"TYPE_FIXED32"},{no:8,name:"TYPE_BOOL"},{no:9,name:"TYPE_STRING"},{no:10,name:"TYPE_GROUP"},{no:11,name:"TYPE_MESSAGE"},{no:12,name:"TYPE_BYTES"},{no:13,name:"TYPE_UINT32"},{no:14,name:"TYPE_ENUM"},{no:15,name:"TYPE_SFIXED32"},{no:16,name:"TYPE_SFIXED64"},{no:17,name:"TYPE_SINT32"},{no:18,name:"TYPE_SINT64"}]);var oa;(function(a){a[a.OPTIONAL=1]="OPTIONAL",a[a.REPEATED=3]="REPEATED",a[a.REQUIRED=2]="REQUIRED"})(oa||(oa={})),T.util.setEnumType(oa,"google.protobuf.FieldDescriptorProto.Label",[{no:1,name:"LABEL_OPTIONAL"},{no:3,name:"LABEL_REPEATED"},{no:2,name:"LABEL_REQUIRED"}]);class fe extends M{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new fe().fromBinary(e,n)}static fromJson(e,n){return new fe().fromJson(e,n)}static fromJsonString(e,n){return new fe().fromJsonString(e,n)}static equals(e,n){return T.util.equals(fe,e,n)}}fe.runtime=T,fe.typeName="google.protobuf.OneofDescriptorProto",fe.fields=T.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"options",kind:"message",T:we,opt:!0}]);class me extends M{constructor(e){super(),this.value=[],this.reservedRange=[],this.reservedName=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new me().fromBinary(e,n)}static fromJson(e,n){return new me().fromJson(e,n)}static fromJsonString(e,n){return new me().fromJsonString(e,n)}static equals(e,n){return T.util.equals(me,e,n)}}me.runtime=T,me.typeName="google.protobuf.EnumDescriptorProto",me.fields=T.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"value",kind:"message",T:_e,repeated:!0},{no:3,name:"options",kind:"message",T:Ce,opt:!0},{no:4,name:"reserved_range",kind:"message",T:Re,repeated:!0},{no:5,name:"reserved_name",kind:"scalar",T:9,repeated:!0}]);class Re extends M{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new Re().fromBinary(e,n)}static fromJson(e,n){return new Re().fromJson(e,n)}static fromJsonString(e,n){return new Re().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Re,e,n)}}Re.runtime=T,Re.typeName="google.protobuf.EnumDescriptorProto.EnumReservedRange",Re.fields=T.util.newFieldList(()=>[{no:1,name:"start",kind:"scalar",T:5,opt:!0},{no:2,name:"end",kind:"scalar",T:5,opt:!0}]);class _e extends M{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new _e().fromBinary(e,n)}static fromJson(e,n){return new _e().fromJson(e,n)}static fromJsonString(e,n){return new _e().fromJsonString(e,n)}static equals(e,n){return T.util.equals(_e,e,n)}}_e.runtime=T,_e.typeName="google.protobuf.EnumValueDescriptorProto",_e.fields=T.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"number",kind:"scalar",T:5,opt:!0},{no:3,name:"options",kind:"message",T:Ne,opt:!0}]);class Se extends M{constructor(e){super(),this.method=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Se().fromBinary(e,n)}static fromJson(e,n){return new Se().fromJson(e,n)}static fromJsonString(e,n){return new Se().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Se,e,n)}}Se.runtime=T,Se.typeName="google.protobuf.ServiceDescriptorProto",Se.fields=T.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"method",kind:"message",T:Ie,repeated:!0},{no:3,name:"options",kind:"message",T:Pe,opt:!0}]);class Ie extends M{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new Ie().fromBinary(e,n)}static fromJson(e,n){return new Ie().fromJson(e,n)}static fromJsonString(e,n){return new Ie().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Ie,e,n)}}Ie.runtime=T,Ie.typeName="google.protobuf.MethodDescriptorProto",Ie.fields=T.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"input_type",kind:"scalar",T:9,opt:!0},{no:3,name:"output_type",kind:"scalar",T:9,opt:!0},{no:4,name:"options",kind:"message",T:le,opt:!0},{no:5,name:"client_streaming",kind:"scalar",T:8,opt:!0,default:!1},{no:6,name:"server_streaming",kind:"scalar",T:8,opt:!0,default:!1}]);class be extends M{constructor(e){super(),this.uninterpretedOption=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new be().fromBinary(e,n)}static fromJson(e,n){return new be().fromJson(e,n)}static fromJsonString(e,n){return new be().fromJsonString(e,n)}static equals(e,n){return T.util.equals(be,e,n)}}be.runtime=T,be.typeName="google.protobuf.FileOptions",be.fields=T.util.newFieldList(()=>[{no:1,name:"java_package",kind:"scalar",T:9,opt:!0},{no:8,name:"java_outer_classname",kind:"scalar",T:9,opt:!0},{no:10,name:"java_multiple_files",kind:"scalar",T:8,opt:!0,default:!1},{no:20,name:"java_generate_equals_and_hash",kind:"scalar",T:8,opt:!0},{no:27,name:"java_string_check_utf8",kind:"scalar",T:8,opt:!0,default:!1},{no:9,name:"optimize_for",kind:"enum",T:T.getEnumType(On),opt:!0,default:On.SPEED},{no:11,name:"go_package",kind:"scalar",T:9,opt:!0},{no:16,name:"cc_generic_services",kind:"scalar",T:8,opt:!0,default:!1},{no:17,name:"java_generic_services",kind:"scalar",T:8,opt:!0,default:!1},{no:18,name:"py_generic_services",kind:"scalar",T:8,opt:!0,default:!1},{no:23,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:31,name:"cc_enable_arenas",kind:"scalar",T:8,opt:!0,default:!0},{no:36,name:"objc_class_prefix",kind:"scalar",T:9,opt:!0},{no:37,name:"csharp_namespace",kind:"scalar",T:9,opt:!0},{no:39,name:"swift_prefix",kind:"scalar",T:9,opt:!0},{no:40,name:"php_class_prefix",kind:"scalar",T:9,opt:!0},{no:41,name:"php_namespace",kind:"scalar",T:9,opt:!0},{no:44,name:"php_metadata_namespace",kind:"scalar",T:9,opt:!0},{no:45,name:"ruby_package",kind:"scalar",T:9,opt:!0},{no:50,name:"features",kind:"message",T:$,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:H,repeated:!0}]);var On;(function(a){a[a.SPEED=1]="SPEED",a[a.CODE_SIZE=2]="CODE_SIZE",a[a.LITE_RUNTIME=3]="LITE_RUNTIME"})(On||(On={})),T.util.setEnumType(On,"google.protobuf.FileOptions.OptimizeMode",[{no:1,name:"SPEED"},{no:2,name:"CODE_SIZE"},{no:3,name:"LITE_RUNTIME"}]);class Oe extends M{constructor(e){super(),this.uninterpretedOption=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Oe().fromBinary(e,n)}static fromJson(e,n){return new Oe().fromJson(e,n)}static fromJsonString(e,n){return new Oe().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Oe,e,n)}}Oe.runtime=T,Oe.typeName="google.protobuf.MessageOptions",Oe.fields=T.util.newFieldList(()=>[{no:1,name:"message_set_wire_format",kind:"scalar",T:8,opt:!0,default:!1},{no:2,name:"no_standard_descriptor_accessor",kind:"scalar",T:8,opt:!0,default:!1},{no:3,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:7,name:"map_entry",kind:"scalar",T:8,opt:!0},{no:11,name:"deprecated_legacy_json_field_conflicts",kind:"scalar",T:8,opt:!0},{no:12,name:"features",kind:"message",T:$,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:H,repeated:!0}]);class Ee extends M{constructor(e){super(),this.targets=[],this.editionDefaults=[],this.uninterpretedOption=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Ee().fromBinary(e,n)}static fromJson(e,n){return new Ee().fromJson(e,n)}static fromJsonString(e,n){return new Ee().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Ee,e,n)}}Ee.runtime=T,Ee.typeName="google.protobuf.FieldOptions",Ee.fields=T.util.newFieldList(()=>[{no:1,name:"ctype",kind:"enum",T:T.getEnumType(En),opt:!0,default:En.STRING},{no:2,name:"packed",kind:"scalar",T:8,opt:!0},{no:6,name:"jstype",kind:"enum",T:T.getEnumType(Mn),opt:!0,default:Mn.JS_NORMAL},{no:5,name:"lazy",kind:"scalar",T:8,opt:!0,default:!1},{no:15,name:"unverified_lazy",kind:"scalar",T:8,opt:!0,default:!1},{no:3,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:10,name:"weak",kind:"scalar",T:8,opt:!0,default:!1},{no:16,name:"debug_redact",kind:"scalar",T:8,opt:!0,default:!1},{no:17,name:"retention",kind:"enum",T:T.getEnumType(ia),opt:!0},{no:19,name:"targets",kind:"enum",T:T.getEnumType(ra),repeated:!0},{no:20,name:"edition_defaults",kind:"message",T:Me,repeated:!0},{no:21,name:"features",kind:"message",T:$,opt:!0},{no:22,name:"feature_support",kind:"message",T:ce,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:H,repeated:!0}]);var En;(function(a){a[a.STRING=0]="STRING",a[a.CORD=1]="CORD",a[a.STRING_PIECE=2]="STRING_PIECE"})(En||(En={})),T.util.setEnumType(En,"google.protobuf.FieldOptions.CType",[{no:0,name:"STRING"},{no:1,name:"CORD"},{no:2,name:"STRING_PIECE"}]);var Mn;(function(a){a[a.JS_NORMAL=0]="JS_NORMAL",a[a.JS_STRING=1]="JS_STRING",a[a.JS_NUMBER=2]="JS_NUMBER"})(Mn||(Mn={})),T.util.setEnumType(Mn,"google.protobuf.FieldOptions.JSType",[{no:0,name:"JS_NORMAL"},{no:1,name:"JS_STRING"},{no:2,name:"JS_NUMBER"}]);var ia;(function(a){a[a.RETENTION_UNKNOWN=0]="RETENTION_UNKNOWN",a[a.RETENTION_RUNTIME=1]="RETENTION_RUNTIME",a[a.RETENTION_SOURCE=2]="RETENTION_SOURCE"})(ia||(ia={})),T.util.setEnumType(ia,"google.protobuf.FieldOptions.OptionRetention",[{no:0,name:"RETENTION_UNKNOWN"},{no:1,name:"RETENTION_RUNTIME"},{no:2,name:"RETENTION_SOURCE"}]);var ra;(function(a){a[a.TARGET_TYPE_UNKNOWN=0]="TARGET_TYPE_UNKNOWN",a[a.TARGET_TYPE_FILE=1]="TARGET_TYPE_FILE",a[a.TARGET_TYPE_EXTENSION_RANGE=2]="TARGET_TYPE_EXTENSION_RANGE",a[a.TARGET_TYPE_MESSAGE=3]="TARGET_TYPE_MESSAGE",a[a.TARGET_TYPE_FIELD=4]="TARGET_TYPE_FIELD",a[a.TARGET_TYPE_ONEOF=5]="TARGET_TYPE_ONEOF",a[a.TARGET_TYPE_ENUM=6]="TARGET_TYPE_ENUM",a[a.TARGET_TYPE_ENUM_ENTRY=7]="TARGET_TYPE_ENUM_ENTRY",a[a.TARGET_TYPE_SERVICE=8]="TARGET_TYPE_SERVICE",a[a.TARGET_TYPE_METHOD=9]="TARGET_TYPE_METHOD"})(ra||(ra={})),T.util.setEnumType(ra,"google.protobuf.FieldOptions.OptionTargetType",[{no:0,name:"TARGET_TYPE_UNKNOWN"},{no:1,name:"TARGET_TYPE_FILE"},{no:2,name:"TARGET_TYPE_EXTENSION_RANGE"},{no:3,name:"TARGET_TYPE_MESSAGE"},{no:4,name:"TARGET_TYPE_FIELD"},{no:5,name:"TARGET_TYPE_ONEOF"},{no:6,name:"TARGET_TYPE_ENUM"},{no:7,name:"TARGET_TYPE_ENUM_ENTRY"},{no:8,name:"TARGET_TYPE_SERVICE"},{no:9,name:"TARGET_TYPE_METHOD"}]);class Me extends M{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new Me().fromBinary(e,n)}static fromJson(e,n){return new Me().fromJson(e,n)}static fromJsonString(e,n){return new Me().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Me,e,n)}}Me.runtime=T,Me.typeName="google.protobuf.FieldOptions.EditionDefault",Me.fields=T.util.newFieldList(()=>[{no:3,name:"edition",kind:"enum",T:T.getEnumType(ae),opt:!0},{no:2,name:"value",kind:"scalar",T:9,opt:!0}]);class ce extends M{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new ce().fromBinary(e,n)}static fromJson(e,n){return new ce().fromJson(e,n)}static fromJsonString(e,n){return new ce().fromJsonString(e,n)}static equals(e,n){return T.util.equals(ce,e,n)}}ce.runtime=T,ce.typeName="google.protobuf.FieldOptions.FeatureSupport",ce.fields=T.util.newFieldList(()=>[{no:1,name:"edition_introduced",kind:"enum",T:T.getEnumType(ae),opt:!0},{no:2,name:"edition_deprecated",kind:"enum",T:T.getEnumType(ae),opt:!0},{no:3,name:"deprecation_warning",kind:"scalar",T:9,opt:!0},{no:4,name:"edition_removed",kind:"enum",T:T.getEnumType(ae),opt:!0}]);class we extends M{constructor(e){super(),this.uninterpretedOption=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new we().fromBinary(e,n)}static fromJson(e,n){return new we().fromJson(e,n)}static fromJsonString(e,n){return new we().fromJsonString(e,n)}static equals(e,n){return T.util.equals(we,e,n)}}we.runtime=T,we.typeName="google.protobuf.OneofOptions",we.fields=T.util.newFieldList(()=>[{no:1,name:"features",kind:"message",T:$,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:H,repeated:!0}]);class Ce extends M{constructor(e){super(),this.uninterpretedOption=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Ce().fromBinary(e,n)}static fromJson(e,n){return new Ce().fromJson(e,n)}static fromJsonString(e,n){return new Ce().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Ce,e,n)}}Ce.runtime=T,Ce.typeName="google.protobuf.EnumOptions",Ce.fields=T.util.newFieldList(()=>[{no:2,name:"allow_alias",kind:"scalar",T:8,opt:!0},{no:3,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:6,name:"deprecated_legacy_json_field_conflicts",kind:"scalar",T:8,opt:!0},{no:7,name:"features",kind:"message",T:$,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:H,repeated:!0}]);class Ne extends M{constructor(e){super(),this.uninterpretedOption=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Ne().fromBinary(e,n)}static fromJson(e,n){return new Ne().fromJson(e,n)}static fromJsonString(e,n){return new Ne().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Ne,e,n)}}Ne.runtime=T,Ne.typeName="google.protobuf.EnumValueOptions",Ne.fields=T.util.newFieldList(()=>[{no:1,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:2,name:"features",kind:"message",T:$,opt:!0},{no:3,name:"debug_redact",kind:"scalar",T:8,opt:!0,default:!1},{no:4,name:"feature_support",kind:"message",T:ce,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:H,repeated:!0}]);class Pe extends M{constructor(e){super(),this.uninterpretedOption=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Pe().fromBinary(e,n)}static fromJson(e,n){return new Pe().fromJson(e,n)}static fromJsonString(e,n){return new Pe().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Pe,e,n)}}Pe.runtime=T,Pe.typeName="google.protobuf.ServiceOptions",Pe.fields=T.util.newFieldList(()=>[{no:34,name:"features",kind:"message",T:$,opt:!0},{no:33,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:999,name:"uninterpreted_option",kind:"message",T:H,repeated:!0}]);class le extends M{constructor(e){super(),this.uninterpretedOption=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new le().fromBinary(e,n)}static fromJson(e,n){return new le().fromJson(e,n)}static fromJsonString(e,n){return new le().fromJsonString(e,n)}static equals(e,n){return T.util.equals(le,e,n)}}le.runtime=T,le.typeName="google.protobuf.MethodOptions",le.fields=T.util.newFieldList(()=>[{no:33,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:34,name:"idempotency_level",kind:"enum",T:T.getEnumType(wn),opt:!0,default:wn.IDEMPOTENCY_UNKNOWN},{no:35,name:"features",kind:"message",T:$,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:H,repeated:!0}]);var wn;(function(a){a[a.IDEMPOTENCY_UNKNOWN=0]="IDEMPOTENCY_UNKNOWN",a[a.NO_SIDE_EFFECTS=1]="NO_SIDE_EFFECTS",a[a.IDEMPOTENT=2]="IDEMPOTENT"})(wn||(wn={})),T.util.setEnumType(wn,"google.protobuf.MethodOptions.IdempotencyLevel",[{no:0,name:"IDEMPOTENCY_UNKNOWN"},{no:1,name:"NO_SIDE_EFFECTS"},{no:2,name:"IDEMPOTENT"}]);class H extends M{constructor(e){super(),this.name=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new H().fromBinary(e,n)}static fromJson(e,n){return new H().fromJson(e,n)}static fromJsonString(e,n){return new H().fromJsonString(e,n)}static equals(e,n){return T.util.equals(H,e,n)}}H.runtime=T,H.typeName="google.protobuf.UninterpretedOption",H.fields=T.util.newFieldList(()=>[{no:2,name:"name",kind:"message",T:De,repeated:!0},{no:3,name:"identifier_value",kind:"scalar",T:9,opt:!0},{no:4,name:"positive_int_value",kind:"scalar",T:4,opt:!0},{no:5,name:"negative_int_value",kind:"scalar",T:3,opt:!0},{no:6,name:"double_value",kind:"scalar",T:1,opt:!0},{no:7,name:"string_value",kind:"scalar",T:12,opt:!0},{no:8,name:"aggregate_value",kind:"scalar",T:9,opt:!0}]);class De extends M{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new De().fromBinary(e,n)}static fromJson(e,n){return new De().fromJson(e,n)}static fromJsonString(e,n){return new De().fromJsonString(e,n)}static equals(e,n){return T.util.equals(De,e,n)}}De.runtime=T,De.typeName="google.protobuf.UninterpretedOption.NamePart",De.fields=T.util.newFieldList(()=>[{no:1,name:"name_part",kind:"scalar",T:9,req:!0},{no:2,name:"is_extension",kind:"scalar",T:8,req:!0}]);class $ extends M{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new $().fromBinary(e,n)}static fromJson(e,n){return new $().fromJson(e,n)}static fromJsonString(e,n){return new $().fromJsonString(e,n)}static equals(e,n){return T.util.equals($,e,n)}}$.runtime=T,$.typeName="google.protobuf.FeatureSet",$.fields=T.util.newFieldList(()=>[{no:1,name:"field_presence",kind:"enum",T:T.getEnumType(ma),opt:!0},{no:2,name:"enum_type",kind:"enum",T:T.getEnumType(ca),opt:!0},{no:3,name:"repeated_field_encoding",kind:"enum",T:T.getEnumType(la),opt:!0},{no:4,name:"utf8_validation",kind:"enum",T:T.getEnumType(da),opt:!0},{no:5,name:"message_encoding",kind:"enum",T:T.getEnumType(pa),opt:!0},{no:6,name:"json_format",kind:"enum",T:T.getEnumType(ua),opt:!0}]);var ma;(function(a){a[a.FIELD_PRESENCE_UNKNOWN=0]="FIELD_PRESENCE_UNKNOWN",a[a.EXPLICIT=1]="EXPLICIT",a[a.IMPLICIT=2]="IMPLICIT",a[a.LEGACY_REQUIRED=3]="LEGACY_REQUIRED"})(ma||(ma={})),T.util.setEnumType(ma,"google.protobuf.FeatureSet.FieldPresence",[{no:0,name:"FIELD_PRESENCE_UNKNOWN"},{no:1,name:"EXPLICIT"},{no:2,name:"IMPLICIT"},{no:3,name:"LEGACY_REQUIRED"}]);var ca;(function(a){a[a.ENUM_TYPE_UNKNOWN=0]="ENUM_TYPE_UNKNOWN",a[a.OPEN=1]="OPEN",a[a.CLOSED=2]="CLOSED"})(ca||(ca={})),T.util.setEnumType(ca,"google.protobuf.FeatureSet.EnumType",[{no:0,name:"ENUM_TYPE_UNKNOWN"},{no:1,name:"OPEN"},{no:2,name:"CLOSED"}]);var la;(function(a){a[a.REPEATED_FIELD_ENCODING_UNKNOWN=0]="REPEATED_FIELD_ENCODING_UNKNOWN",a[a.PACKED=1]="PACKED",a[a.EXPANDED=2]="EXPANDED"})(la||(la={})),T.util.setEnumType(la,"google.protobuf.FeatureSet.RepeatedFieldEncoding",[{no:0,name:"REPEATED_FIELD_ENCODING_UNKNOWN"},{no:1,name:"PACKED"},{no:2,name:"EXPANDED"}]);var da;(function(a){a[a.UTF8_VALIDATION_UNKNOWN=0]="UTF8_VALIDATION_UNKNOWN",a[a.VERIFY=2]="VERIFY",a[a.NONE=3]="NONE"})(da||(da={})),T.util.setEnumType(da,"google.protobuf.FeatureSet.Utf8Validation",[{no:0,name:"UTF8_VALIDATION_UNKNOWN"},{no:2,name:"VERIFY"},{no:3,name:"NONE"}]);var pa;(function(a){a[a.MESSAGE_ENCODING_UNKNOWN=0]="MESSAGE_ENCODING_UNKNOWN",a[a.LENGTH_PREFIXED=1]="LENGTH_PREFIXED",a[a.DELIMITED=2]="DELIMITED"})(pa||(pa={})),T.util.setEnumType(pa,"google.protobuf.FeatureSet.MessageEncoding",[{no:0,name:"MESSAGE_ENCODING_UNKNOWN"},{no:1,name:"LENGTH_PREFIXED"},{no:2,name:"DELIMITED"}]);var ua;(function(a){a[a.JSON_FORMAT_UNKNOWN=0]="JSON_FORMAT_UNKNOWN",a[a.ALLOW=1]="ALLOW",a[a.LEGACY_BEST_EFFORT=2]="LEGACY_BEST_EFFORT"})(ua||(ua={})),T.util.setEnumType(ua,"google.protobuf.FeatureSet.JsonFormat",[{no:0,name:"JSON_FORMAT_UNKNOWN"},{no:1,name:"ALLOW"},{no:2,name:"LEGACY_BEST_EFFORT"}]);class $e extends M{constructor(e){super(),this.defaults=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new $e().fromBinary(e,n)}static fromJson(e,n){return new $e().fromJson(e,n)}static fromJsonString(e,n){return new $e().fromJsonString(e,n)}static equals(e,n){return T.util.equals($e,e,n)}}$e.runtime=T,$e.typeName="google.protobuf.FeatureSetDefaults",$e.fields=T.util.newFieldList(()=>[{no:1,name:"defaults",kind:"message",T:Ae,repeated:!0},{no:4,name:"minimum_edition",kind:"enum",T:T.getEnumType(ae),opt:!0},{no:5,name:"maximum_edition",kind:"enum",T:T.getEnumType(ae),opt:!0}]);class Ae extends M{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new Ae().fromBinary(e,n)}static fromJson(e,n){return new Ae().fromJson(e,n)}static fromJsonString(e,n){return new Ae().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Ae,e,n)}}Ae.runtime=T,Ae.typeName="google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault",Ae.fields=T.util.newFieldList(()=>[{no:3,name:"edition",kind:"enum",T:T.getEnumType(ae),opt:!0},{no:4,name:"overridable_features",kind:"message",T:$,opt:!0},{no:5,name:"fixed_features",kind:"message",T:$,opt:!0}]);class Ue extends M{constructor(e){super(),this.location=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Ue().fromBinary(e,n)}static fromJson(e,n){return new Ue().fromJson(e,n)}static fromJsonString(e,n){return new Ue().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Ue,e,n)}}Ue.runtime=T,Ue.typeName="google.protobuf.SourceCodeInfo",Ue.fields=T.util.newFieldList(()=>[{no:1,name:"location",kind:"message",T:qe,repeated:!0}]);class qe extends M{constructor(e){super(),this.path=[],this.span=[],this.leadingDetachedComments=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new qe().fromBinary(e,n)}static fromJson(e,n){return new qe().fromJson(e,n)}static fromJsonString(e,n){return new qe().fromJsonString(e,n)}static equals(e,n){return T.util.equals(qe,e,n)}}qe.runtime=T,qe.typeName="google.protobuf.SourceCodeInfo.Location",qe.fields=T.util.newFieldList(()=>[{no:1,name:"path",kind:"scalar",T:5,repeated:!0,packed:!0},{no:2,name:"span",kind:"scalar",T:5,repeated:!0,packed:!0},{no:3,name:"leading_comments",kind:"scalar",T:9,opt:!0},{no:4,name:"trailing_comments",kind:"scalar",T:9,opt:!0},{no:6,name:"leading_detached_comments",kind:"scalar",T:9,repeated:!0}]);class Ye extends M{constructor(e){super(),this.annotation=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Ye().fromBinary(e,n)}static fromJson(e,n){return new Ye().fromJson(e,n)}static fromJsonString(e,n){return new Ye().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Ye,e,n)}}Ye.runtime=T,Ye.typeName="google.protobuf.GeneratedCodeInfo",Ye.fields=T.util.newFieldList(()=>[{no:1,name:"annotation",kind:"message",T:Le,repeated:!0}]);class Le extends M{constructor(e){super(),this.path=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Le().fromBinary(e,n)}static fromJson(e,n){return new Le().fromJson(e,n)}static fromJsonString(e,n){return new Le().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Le,e,n)}}Le.runtime=T,Le.typeName="google.protobuf.GeneratedCodeInfo.Annotation",Le.fields=T.util.newFieldList(()=>[{no:1,name:"path",kind:"scalar",T:5,repeated:!0,packed:!0},{no:2,name:"source_file",kind:"scalar",T:9,opt:!0},{no:3,name:"begin",kind:"scalar",T:5,opt:!0},{no:4,name:"end",kind:"scalar",T:5,opt:!0},{no:5,name:"semantic",kind:"enum",T:T.getEnumType(ga),opt:!0}]);var ga;(function(a){a[a.NONE=0]="NONE",a[a.SET=1]="SET",a[a.ALIAS=2]="ALIAS"})(ga||(ga={})),T.util.setEnumType(ga,"google.protobuf.GeneratedCodeInfo.Annotation.Semantic",[{no:0,name:"NONE"},{no:1,name:"SET"},{no:2,name:"ALIAS"}]);class S extends M{constructor(e){super(),this.seconds=W.zero,this.nanos=0,s.util.initPartial(e,this)}fromJson(e,n){if(typeof e!="string")throw new Error(`cannot decode google.protobuf.Timestamp from JSON: ${s.json.debug(e)}`);const t=e.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);if(!t)throw new Error("cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string");const o=Date.parse(t[1]+"-"+t[2]+"-"+t[3]+"T"+t[4]+":"+t[5]+":"+t[6]+(t[8]?t[8]:"Z"));if(Number.isNaN(o))throw new Error("cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string");if(o<Date.parse("0001-01-01T00:00:00Z")||o>Date.parse("9999-12-31T23:59:59Z"))throw new Error("cannot decode message google.protobuf.Timestamp from JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive");return this.seconds=W.parse(o/1e3),this.nanos=0,t[7]&&(this.nanos=parseInt("1"+t[7]+"0".repeat(9-t[7].length))-1e9),this}toJson(e){const n=Number(this.seconds)*1e3;if(n<Date.parse("0001-01-01T00:00:00Z")||n>Date.parse("9999-12-31T23:59:59Z"))throw new Error("cannot encode google.protobuf.Timestamp to JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive");if(this.nanos<0)throw new Error("cannot encode google.protobuf.Timestamp to JSON: nanos must not be negative");let t="Z";if(this.nanos>0){const o=(this.nanos+1e9).toString().substring(1);o.substring(3)==="000000"?t="."+o.substring(0,3)+"Z":o.substring(6)==="000"?t="."+o.substring(0,6)+"Z":t="."+o+"Z"}return new Date(n).toISOString().replace(".000Z",t)}toDate(){return new Date(Number(this.seconds)*1e3+Math.ceil(this.nanos/1e6))}static now(){return S.fromDate(new Date)}static fromDate(e){const n=e.getTime();return new S({seconds:W.parse(Math.floor(n/1e3)),nanos:n%1e3*1e6})}static fromBinary(e,n){return new S().fromBinary(e,n)}static fromJson(e,n){return new S().fromJson(e,n)}static fromJsonString(e,n){return new S().fromJsonString(e,n)}static equals(e,n){return s.util.equals(S,e,n)}}S.runtime=s,S.typeName="google.protobuf.Timestamp",S.fields=s.util.newFieldList(()=>[{no:1,name:"seconds",kind:"scalar",T:3},{no:2,name:"nanos",kind:"scalar",T:5}]);class J extends M{constructor(e){super(),this.seconds=W.zero,this.nanos=0,s.util.initPartial(e,this)}fromJson(e,n){if(typeof e!="string")throw new Error(`cannot decode google.protobuf.Duration from JSON: ${s.json.debug(e)}`);const t=e.match(/^(-?[0-9]+)(?:\.([0-9]+))?s/);if(t===null)throw new Error(`cannot decode google.protobuf.Duration from JSON: ${s.json.debug(e)}`);const o=Number(t[1]);if(o>315576e6||o<-315576e6)throw new Error(`cannot decode google.protobuf.Duration from JSON: ${s.json.debug(e)}`);if(this.seconds=W.parse(o),typeof t[2]=="string"){const i=t[2]+"0".repeat(9-t[2].length);this.nanos=parseInt(i),(o<0||Object.is(o,-0))&&(this.nanos=-this.nanos)}return this}toJson(e){if(Number(this.seconds)>315576e6||Number(this.seconds)<-315576e6)throw new Error("cannot encode google.protobuf.Duration to JSON: value out of range");let n=this.seconds.toString();if(this.nanos!==0){let t=Math.abs(this.nanos).toString();t="0".repeat(9-t.length)+t,t.substring(3)==="000000"?t=t.substring(0,3):t.substring(6)==="000"&&(t=t.substring(0,6)),n+="."+t,this.nanos<0&&Number(this.seconds)==0&&(n="-"+n)}return n+"s"}static fromBinary(e,n){return new J().fromBinary(e,n)}static fromJson(e,n){return new J().fromJson(e,n)}static fromJsonString(e,n){return new J().fromJsonString(e,n)}static equals(e,n){return s.util.equals(J,e,n)}}J.runtime=s,J.typeName="google.protobuf.Duration",J.fields=s.util.newFieldList(()=>[{no:1,name:"seconds",kind:"scalar",T:3},{no:2,name:"nanos",kind:"scalar",T:5}]);class Z extends M{constructor(e){super(),this.typeUrl="",this.value=new Uint8Array(0),s.util.initPartial(e,this)}toJson(e){var n;if(this.typeUrl==="")return{};const t=this.typeUrlToName(this.typeUrl),o=(n=e?.typeRegistry)===null||n===void 0?void 0:n.findMessage(t);if(!o)throw new Error(`cannot encode message google.protobuf.Any to JSON: "${this.typeUrl}" is not in the type registry`);let r=o.fromBinary(this.value).toJson(e);return(t.startsWith("google.protobuf.")||r===null||Array.isArray(r)||typeof r!="object")&&(r={value:r}),r["@type"]=this.typeUrl,r}fromJson(e,n){var t;if(e===null||Array.isArray(e)||typeof e!="object")throw new Error(`cannot decode message google.protobuf.Any from JSON: expected object but got ${e===null?"null":Array.isArray(e)?"array":typeof e}`);if(Object.keys(e).length==0)return this;const o=e["@type"];if(typeof o!="string"||o=="")throw new Error('cannot decode message google.protobuf.Any from JSON: "@type" is empty');const i=this.typeUrlToName(o),r=(t=n?.typeRegistry)===null||t===void 0?void 0:t.findMessage(i);if(!r)throw new Error(`cannot decode message google.protobuf.Any from JSON: ${o} is not in the type registry`);let c;if(i.startsWith("google.protobuf.")&&Object.prototype.hasOwnProperty.call(e,"value"))c=r.fromJson(e.value,n);else{const d=Object.assign({},e);delete d["@type"],c=r.fromJson(d,n)}return this.packFrom(c),this}packFrom(e){this.value=e.toBinary(),this.typeUrl=this.typeNameToUrl(e.getType().typeName)}unpackTo(e){return this.is(e.getType())?(e.fromBinary(this.value),!0):!1}unpack(e){if(this.typeUrl==="")return;const n=e.findMessage(this.typeUrlToName(this.typeUrl));if(n)return n.fromBinary(this.value)}is(e){if(this.typeUrl==="")return!1;const n=this.typeUrlToName(this.typeUrl);let t="";return typeof e=="string"?t=e:t=e.typeName,n===t}typeNameToUrl(e){return`type.googleapis.com/${e}`}typeUrlToName(e){if(!e.length)throw new Error(`invalid type url: ${e}`);const n=e.lastIndexOf("/"),t=n>=0?e.substring(n+1):e;if(!t.length)throw new Error(`invalid type url: ${e}`);return t}static pack(e){const n=new Z;return n.packFrom(e),n}static fromBinary(e,n){return new Z().fromBinary(e,n)}static fromJson(e,n){return new Z().fromJson(e,n)}static fromJsonString(e,n){return new Z().fromJsonString(e,n)}static equals(e,n){return s.util.equals(Z,e,n)}}Z.runtime=s,Z.typeName="google.protobuf.Any",Z.fields=s.util.newFieldList(()=>[{no:1,name:"type_url",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:12}]);class Ge extends M{constructor(e){super(),this.paths=[],s.util.initPartial(e,this)}toJson(e){function n(t){let o=!1;const i=[];for(let r=0;r<t.length;r++){let c=t.charAt(r);switch(c){case"_":o=!0;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":i.push(c),o=!1;break;default:o&&(o=!1,c=c.toUpperCase()),i.push(c);break}}return i.join("")}return this.paths.map(t=>{if(t.match(/_[0-9]?_/g)||t.match(/[A-Z]/g))throw new Error('cannot encode google.protobuf.FieldMask to JSON: lowerCamelCase of path name "'+t+'" is irreversible');return n(t)}).join(",")}fromJson(e,n){if(typeof e!="string")throw new Error("cannot decode google.protobuf.FieldMask from JSON: "+s.json.debug(e));if(e==="")return this;function t(o){if(o.includes("_"))throw new Error("cannot decode google.protobuf.FieldMask from JSON: path names must be lowerCamelCase");const i=o.replace(/[A-Z]/g,r=>"_"+r.toLowerCase());return i[0]==="_"?i.substring(1):i}return this.paths=e.split(",").map(t),this}static fromBinary(e,n){return new Ge().fromBinary(e,n)}static fromJson(e,n){return new Ge().fromJson(e,n)}static fromJsonString(e,n){return new Ge().fromJsonString(e,n)}static equals(e,n){return s.util.equals(Ge,e,n)}}Ge.runtime=s,Ge.typeName="google.protobuf.FieldMask",Ge.fields=s.util.newFieldList(()=>[{no:1,name:"paths",kind:"scalar",T:9,repeated:!0}]);var Cn;(function(a){a[a.NULL_VALUE=0]="NULL_VALUE"})(Cn||(Cn={})),s.util.setEnumType(Cn,"google.protobuf.NullValue",[{no:0,name:"NULL_VALUE"}]);class p extends M{constructor(e){super(),this.fields={},s.util.initPartial(e,this)}toJson(e){const n={};for(const[t,o]of Object.entries(this.fields))n[t]=o.toJson(e);return n}fromJson(e,n){if(typeof e!="object"||e==null||Array.isArray(e))throw new Error("cannot decode google.protobuf.Struct from JSON "+s.json.debug(e));for(const[t,o]of Object.entries(e))this.fields[t]=ee.fromJson(o);return this}static fromBinary(e,n){return new p().fromBinary(e,n)}static fromJson(e,n){return new p().fromJson(e,n)}static fromJsonString(e,n){return new p().fromJsonString(e,n)}static equals(e,n){return s.util.equals(p,e,n)}}p.runtime=s,p.typeName="google.protobuf.Struct",p.fields=s.util.newFieldList(()=>[{no:1,name:"fields",kind:"map",K:9,V:{kind:"message",T:ee}}]);class ee extends M{constructor(e){super(),this.kind={case:void 0},s.util.initPartial(e,this)}toJson(e){switch(this.kind.case){case"nullValue":return null;case"numberValue":if(!Number.isFinite(this.kind.value))throw new Error("google.protobuf.Value cannot be NaN or Infinity");return this.kind.value;case"boolValue":return this.kind.value;case"stringValue":return this.kind.value;case"structValue":case"listValue":return this.kind.value.toJson(Object.assign(Object.assign({},e),{emitDefaultValues:!0}))}throw new Error("google.protobuf.Value must have a value")}fromJson(e,n){switch(typeof e){case"number":this.kind={case:"numberValue",value:e};break;case"string":this.kind={case:"stringValue",value:e};break;case"boolean":this.kind={case:"boolValue",value:e};break;case"object":e===null?this.kind={case:"nullValue",value:Cn.NULL_VALUE}:Array.isArray(e)?this.kind={case:"listValue",value:de.fromJson(e)}:this.kind={case:"structValue",value:p.fromJson(e)};break;default:throw new Error("cannot decode google.protobuf.Value from JSON "+s.json.debug(e))}return this}static fromBinary(e,n){return new ee().fromBinary(e,n)}static fromJson(e,n){return new ee().fromJson(e,n)}static fromJsonString(e,n){return new ee().fromJsonString(e,n)}static equals(e,n){return s.util.equals(ee,e,n)}}ee.runtime=s,ee.typeName="google.protobuf.Value",ee.fields=s.util.newFieldList(()=>[{no:1,name:"null_value",kind:"enum",T:s.getEnumType(Cn),oneof:"kind"},{no:2,name:"number_value",kind:"scalar",T:1,oneof:"kind"},{no:3,name:"string_value",kind:"scalar",T:9,oneof:"kind"},{no:4,name:"bool_value",kind:"scalar",T:8,oneof:"kind"},{no:5,name:"struct_value",kind:"message",T:p,oneof:"kind"},{no:6,name:"list_value",kind:"message",T:de,oneof:"kind"}]);class de extends M{constructor(e){super(),this.values=[],s.util.initPartial(e,this)}toJson(e){return this.values.map(n=>n.toJson())}fromJson(e,n){if(!Array.isArray(e))throw new Error("cannot decode google.protobuf.ListValue from JSON "+s.json.debug(e));for(let t of e)this.values.push(ee.fromJson(t));return this}static fromBinary(e,n){return new de().fromBinary(e,n)}static fromJson(e,n){return new de().fromJson(e,n)}static fromJsonString(e,n){return new de().fromJsonString(e,n)}static equals(e,n){return s.util.equals(de,e,n)}}de.runtime=s,de.typeName="google.protobuf.ListValue",de.fields=s.util.newFieldList(()=>[{no:1,name:"values",kind:"message",T:ee,repeated:!0}]),g.Code=void 0,function(a){a[a.Canceled=1]="Canceled",a[a.Unknown=2]="Unknown",a[a.InvalidArgument=3]="InvalidArgument",a[a.DeadlineExceeded=4]="DeadlineExceeded",a[a.NotFound=5]="NotFound",a[a.AlreadyExists=6]="AlreadyExists",a[a.PermissionDenied=7]="PermissionDenied",a[a.ResourceExhausted=8]="ResourceExhausted",a[a.FailedPrecondition=9]="FailedPrecondition",a[a.Aborted=10]="Aborted",a[a.OutOfRange=11]="OutOfRange",a[a.Unimplemented=12]="Unimplemented",a[a.Internal=13]="Internal",a[a.Unavailable=14]="Unavailable",a[a.DataLoss=15]="DataLoss",a[a.Unauthenticated=16]="Unauthenticated"}(g.Code||(g.Code={}));function rr(a){const e=g.Code[a];return typeof e!="string"?a.toString():e[0].toLowerCase()+e.substring(1).replace(/[A-Z]/g,n=>"_"+n.toLowerCase())}class C extends Error{constructor(e,n=g.Code.Unknown,t,o,i){super(ER(e,n)),this.name="ConnectError",Object.setPrototypeOf(this,new.target.prototype),this.rawMessage=e,this.code=n,this.metadata=new Headers(t??{}),this.details=o??[],this.cause=i}static from(e,n=g.Code.Unknown){return e instanceof C?e:e instanceof Error?e.name=="AbortError"?new C(e.message,g.Code.Canceled):new C(e.message,n,void 0,void 0,e):new C(String(e),n,void 0,void 0,e)}static[Symbol.hasInstance](e){return e instanceof Error?Object.getPrototypeOf(e)===C.prototype?!0:e.name==="ConnectError"&&"code"in e&&typeof e.code=="number"&&"metadata"in e&&"details"in e&&Array.isArray(e.details)&&"rawMessage"in e&&typeof e.rawMessage=="string"&&"cause"in e:!1}findDetails(e){const n="typeName"in e?{findMessage:o=>o===e.typeName?e:void 0}:e,t=[];for(const o of this.details){if("getType"in o){n.findMessage(o.getType().typeName)&&t.push(o);continue}const i=n.findMessage(o.type);if(i)try{t.push(i.fromBinary(o.value))}catch{}}return t}}function ER(a,e){return a.length?`[${rr(e)}] ${a}`:`[${rr(e)}]`}function MR(a,e,n){try{const t=it.dec(a);return e?e.fromBinary(t,n):t}catch(t){throw C.from(t,g.Code.DataLoss)}}function wR(a,e){const n={};for(const[t,o]of Object.entries(a.methods)){const i=e(Object.assign(Object.assign({},o),{localName:t,service:a}));i!=null&&(n[t]=i)}return n}const mr=1;function cr(a){let e,n=new Uint8Array(0);function t(o){const i=new Uint8Array(n.length+o.length);i.set(n),i.set(o,n.length),n=i}return new ReadableStream({start(){e=a.getReader()},async pull(o){let i;for(;;){if(i===void 0&&n.byteLength>=5){let d=0;for(let l=1;l<5;l++)d=(d<<8)+n[l];i={flags:n[0],length:d}}if(i!==void 0&&n.byteLength>=i.length+5)break;const c=await e.read();if(c.done)break;t(c.value)}if(i===void 0){if(n.byteLength==0){o.close();return}o.error(new C("premature end of stream",g.Code.DataLoss));return}const r=n.subarray(5,5+i.length);n=n.subarray(5+i.length),o.enqueue({flags:i.flags,data:r})}})}function lr(a,e){const n=new Uint8Array(e.length+5);n.set(e,5);const t=new DataView(n.buffer,n.byteOffset,n.byteLength);return t.setUint8(0,a),t.setUint32(1,e.length),n}var CR=function(a){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=a[Symbol.asyncIterator],n;return e?e.call(a):(a=typeof __values=="function"?__values(a):a[Symbol.iterator](),n={},t("next"),t("throw"),t("return"),n[Symbol.asyncIterator]=function(){return this},n);function t(i){n[i]=a[i]&&function(r){return new Promise(function(c,d){r=a[i](r),o(c,d,r.done,r.value)})}}function o(i,r,c,d){Promise.resolve(d).then(function(l){i({value:l,done:c})},r)}},Nn=function(a){return this instanceof Nn?(this.v=a,this):new Nn(a)},NR=function(a,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=n.apply(a,e||[]),o,i=[];return o={},c("next"),c("throw"),c("return",r),o[Symbol.asyncIterator]=function(){return this},o;function r(R){return function(b){return Promise.resolve(b).then(R,h)}}function c(R,b){t[R]&&(o[R]=function(w){return new Promise(function(N,V){i.push([R,w,N,V])>1||d(R,w)})},b&&(o[R]=b(o[R])))}function d(R,b){try{l(t[R](b))}catch(w){I(i[0][3],w)}}function l(R){R.value instanceof Nn?Promise.resolve(R.value.v).then(u,h):I(i[0][2],R)}function u(R){d("next",R)}function h(R){d("throw",R)}function I(R,b){R(b),i.shift(),i.length&&d(i[0][0],i[0][1])}},PR=function(a){var e,n;return e={},t("next"),t("throw",function(o){throw o}),t("return"),e[Symbol.iterator]=function(){return this},e;function t(o,i){e[o]=a[o]?function(r){return(n=!n)?{value:Nn(a[o](r)),done:!1}:i?i(r):r}:i}};function DR(){const a=[],e=[];let n,t,o,i=new Promise((d,l)=>{t=d,o=l}),r=!1;function c(){for(const d of a.splice(0,a.length))d({done:!0,value:void 0})}return{close(){r=!0,c()},async write(d){if(r)throw n??new Error("cannot write, WritableIterable already closed");const l=a.shift();if(l===void 0)e.push(d);else if(l({done:!1,value:d}),a.length>0)return;const u=e.length+1;for(let h=0;h<u;h++)await i},[Symbol.asyncIterator](){return{next(){t(),i=new Promise((h,I)=>{t=h,o=I});const d=e.shift();if(d!==void 0)return Promise.resolve({done:!1,value:d});if(r)return Promise.resolve({done:!0,value:void 0});let l;const u=new Promise(h=>l=h);return a.push(l),u},throw(d){return n=d,r=!0,e.splice(0,e.length),i.catch(()=>{}),o(n),c(),Promise.resolve({done:!0,value:void 0})},return(){return r=!0,e.splice(0,e.length),t(),i=Promise.reject(new Error("cannot write, consumer called return")),i.catch(()=>{}),c(),Promise.resolve({done:!0,value:void 0})}}}}}function ct(a){return NR(this,arguments,function*(){yield Nn(yield*PR(CR(a)))})}var dr=function(a){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=a[Symbol.asyncIterator],n;return e?e.call(a):(a=typeof __values=="function"?__values(a):a[Symbol.iterator](),n={},t("next"),t("throw"),t("return"),n[Symbol.asyncIterator]=function(){return this},n);function t(i){n[i]=a[i]&&function(r){return new Promise(function(c,d){r=a[i](r),o(c,d,r.done,r.value)})}}function o(i,r,c,d){Promise.resolve(d).then(function(l){i({value:l,done:c})},r)}},pn=function(a){return this instanceof pn?(this.v=a,this):new pn(a)},AR=function(a){var e,n;return e={},t("next"),t("throw",function(o){throw o}),t("return"),e[Symbol.iterator]=function(){return this},e;function t(o,i){e[o]=a[o]?function(r){return(n=!n)?{value:pn(a[o](r)),done:!1}:i?i(r):r}:i}},UR=function(a,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=n.apply(a,e||[]),o,i=[];return o={},c("next"),c("throw"),c("return",r),o[Symbol.asyncIterator]=function(){return this},o;function r(R){return function(b){return Promise.resolve(b).then(R,h)}}function c(R,b){t[R]&&(o[R]=function(w){return new Promise(function(N,V){i.push([R,w,N,V])>1||d(R,w)})},b&&(o[R]=b(o[R])))}function d(R,b){try{l(t[R](b))}catch(w){I(i[0][3],w)}}function l(R){R.value instanceof pn?Promise.resolve(R.value.v).then(u,h):I(i[0][2],R)}function u(R){d("next",R)}function h(R){d("throw",R)}function I(R,b){R(b),i.shift(),i.length&&d(i[0][0],i[0][1])}};function X(a,e){return wR(a,n=>{switch(n.kind){case m.Unary:return qR(e,a,n);case m.ServerStreaming:return LR(e,a,n);case m.ClientStreaming:return GR(e,a,n);case m.BiDiStreaming:return BR(e,a,n);default:return null}})}function qR(a,e,n){return async function(t,o){var i,r;const c=await a.unary(e,n,o?.signal,o?.timeoutMs,o?.headers,t,o?.contextValues);return(i=o?.onHeader)===null||i===void 0||i.call(o,c.header),(r=o?.onTrailer)===null||r===void 0||r.call(o,c.trailer),c.message}}function LR(a,e,n){return function(t,o){return pr(a.stream(e,n,o?.signal,o?.timeoutMs,o?.headers,ct([t]),o?.contextValues),o)}}function GR(a,e,n){return async function(t,o){var i,r,c,d,l,u;const h=await a.stream(e,n,o?.signal,o?.timeoutMs,o?.headers,t,o?.contextValues);(l=o?.onHeader)===null||l===void 0||l.call(o,h.header);let I,R=0;try{for(var b=!0,w=dr(h.message),N;N=await w.next(),i=N.done,!i;b=!0)d=N.value,b=!1,I=d,R++}catch(V){r={error:V}}finally{try{!b&&!i&&(c=w.return)&&await c.call(w)}finally{if(r)throw r.error}}if(!I)throw new C("protocol error: missing response message",g.Code.Unimplemented);if(R>1)throw new C("protocol error: received extra messages for client streaming method",g.Code.Unimplemented);return(u=o?.onTrailer)===null||u===void 0||u.call(o,h.trailer),I}}function BR(a,e,n){return function(t,o){return pr(a.stream(e,n,o?.signal,o?.timeoutMs,o?.headers,t,o?.contextValues),o)}}function pr(a,e){const n=function(){return UR(this,arguments,function*(){var t,o;const i=yield pn(a);(t=e?.onHeader)===null||t===void 0||t.call(e,i.header),yield pn(yield*AR(dr(i.message))),(o=e?.onTrailer)===null||o===void 0||o.call(e,i.trailer)})}()[Symbol.asyncIterator]();return{[Symbol.asyncIterator]:()=>({next:()=>n.next()})}}function FR(...a){const e=new AbortController,n=a.filter(o=>o!==void 0).concat(e.signal);for(const o of n){if(o.aborted){t.apply(o);break}o.addEventListener("abort",t)}function t(){e.signal.aborted||e.abort(ur(this));for(const o of n)o.removeEventListener("abort",t)}return e}function xR(a){const e=new AbortController,n=()=>{e.abort(new C("the operation timed out",g.Code.DeadlineExceeded))};let t;return a!==void 0&&(a<=0?n():t=setTimeout(n,a)),{signal:e.signal,cleanup:()=>clearTimeout(t)}}function ur(a){if(!a.aborted)return;if(a.reason!==void 0)return a.reason;const e=new Error("This operation was aborted");return e.name="AbortError",e}function Ta(){return{get(a){return a.id in this?this[a.id]:a.defaultValue},set(a,e){return this[a.id]=e,this},delete(a){return delete this[a.id],this}}}const lt=128;function gr(a){const e=new Headers,n=new TextDecoder().decode(a).split(`\r
|
|
3
|
-
`);for(const t of n){if(t==="")continue;const o=t.indexOf(":");if(o>0){const i=t.substring(0,o).trim(),r=t.substring(o+1).trim();e.append(i,r)}}return e}const JR="Content-Type",zR="Grpc-Timeout",un="Grpc-Status",Tr="Grpc-Message",VR="Grpc-Status-Details-Bin",$R="X-User-Agent",YR="X-Grpc-Web",WR="application/grpc-web+proto",HR="application/grpc-web+json";let ka=class Hn extends M{constructor(e){super(),this.code=0,this.message="",this.details=[],s.util.initPartial(e,this)}static fromBinary(e,n){return new Hn().fromBinary(e,n)}static fromJson(e,n){return new Hn().fromJson(e,n)}static fromJsonString(e,n){return new Hn().fromJsonString(e,n)}static equals(e,n){return s.util.equals(Hn,e,n)}};ka.runtime=s,ka.typeName="google.rpc.Status",ka.fields=s.util.newFieldList(()=>[{no:1,name:"code",kind:"scalar",T:5},{no:2,name:"message",kind:"scalar",T:9},{no:3,name:"details",kind:"message",T:Z,repeated:!0}]);const jR="0";function kr(a){var e;const n=a.get(VR);if(n!=null){const o=MR(n,ka);if(o.code==0)return;const i=new C(o.message,o.code,a);return i.details=o.details.map(r=>({type:r.typeUrl.substring(r.typeUrl.lastIndexOf("/")+1),value:r.value})),i}const t=a.get(un);if(t!=null){if(t===jR)return;const o=parseInt(t,10);return o in g.Code?new C(decodeURIComponent((e=a.get(Tr))!==null&&e!==void 0?e:""),o,a):new C(`invalid grpc-status: ${t}`,g.Code.Internal,a)}}function yr(a,e,n){const t=typeof e=="string"?e:e.typeName,o=typeof n=="string"?n:n.name;return a.toString().replace(/\/?$/,`/${t}/${o}`)}function vr(a,e){return e instanceof a?e:new a(e)}function KR(a,e){function n(t){return t.done===!0?t:{done:t.done,value:vr(a,t.value)}}return{[Symbol.asyncIterator](){const t=e[Symbol.asyncIterator](),o={next:()=>t.next().then(n)};return t.throw!==void 0&&(o.throw=i=>t.throw(i).then(n)),t.return!==void 0&&(o.return=i=>t.return(i).then(n)),o}}}function hr(a,e){var n;return(n=e?.concat().reverse().reduce((t,o)=>o(t),a))!==null&&n!==void 0?n:a}function XR(a){var e;const n=Object.assign({},a);return(e=n.ignoreUnknownFields)!==null&&e!==void 0||(n.ignoreUnknownFields=!0),n}function dt(a,e,n,t){const o=e?fr(a.I,t):Rr(a.I,n);return{parse:(e?fr(a.O,t):Rr(a.O,n)).parse,serialize:o.serialize}}function fr(a,e){return{parse(n){try{return a.fromBinary(n,e)}catch(t){const o=t instanceof Error?t.message:String(t);throw new C(`parse binary: ${o}`,g.Code.Internal)}},serialize(n){try{return n.toBinary(e)}catch(t){const o=t instanceof Error?t.message:String(t);throw new C(`serialize binary: ${o}`,g.Code.Internal)}}}}function Rr(a,e){var n,t;const o=(n=e?.textEncoder)!==null&&n!==void 0?n:new TextEncoder,i=(t=e?.textDecoder)!==null&&t!==void 0?t:new TextDecoder,r=XR(e);return{parse(c){try{const d=i.decode(c);return a.fromJsonString(d,r)}catch(d){throw C.from(d,g.Code.InvalidArgument)}},serialize(c){try{const d=c.toJsonString(r);return o.encode(d)}catch(d){throw C.from(d,g.Code.Internal)}}}}function _r(a){const e=hr(a.next,a.interceptors),[n,t,o]=Ir(a),i=Object.assign(Object.assign({},a.req),{message:vr(a.req.method.I,a.req.message),signal:n});return e(i).then(r=>(o(),r),t)}function Sr(a){const e=hr(a.next,a.interceptors),[n,t,o]=Ir(a),i=Object.assign(Object.assign({},a.req),{message:KR(a.req.method.I,a.req.message),signal:n});let r=!1;return n.addEventListener("abort",function(){var c,d;const l=a.req.message[Symbol.asyncIterator]();r||(c=l.throw)===null||c===void 0||c.call(l,this.reason).catch(()=>{}),(d=l.return)===null||d===void 0||d.call(l).catch(()=>{})}),e(i).then(c=>Object.assign(Object.assign({},c),{message:{[Symbol.asyncIterator](){const d=c.message[Symbol.asyncIterator]();return{next(){return d.next().then(l=>(l.done==!0&&(r=!0,o()),l),t)}}}}}),t)}function Ir(a){const{signal:e,cleanup:n}=xR(a.timeoutMs),t=FR(a.signal,e);return[t.signal,function(i){const r=C.from(e.aborted?ur(e):i);return t.abort(r),n(),Promise.reject(r)},function(){n(),t.abort()}]}var Q=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},br={},pt={},ya=Q&&Q.__assign||function(){return ya=Object.assign||function(a){for(var e,n=1,t=arguments.length;n<t;n++){e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(a[o]=e[o])}return a},ya.apply(this,arguments)};Object.defineProperty(pt,"__esModule",{value:!0});var QR={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function ZR(a){var e=ya(ya({},QR),a);return e.numOfAttempts<1&&(e.numOfAttempts=1),e}pt.getSanitizedOptions=ZR;var ut={},gt={},va={},Tt={},kt={};Object.defineProperty(kt,"__esModule",{value:!0});function e1(a){var e=Math.random()*a;return Math.round(e)}kt.fullJitter=e1;var yt={};Object.defineProperty(yt,"__esModule",{value:!0});function n1(a){return a}yt.noJitter=n1,Object.defineProperty(Tt,"__esModule",{value:!0});var a1=kt,t1=yt;function s1(a){switch(a.jitter){case"full":return a1.fullJitter;case"none":default:return t1.noJitter}}Tt.JitterFactory=s1,Object.defineProperty(va,"__esModule",{value:!0});var o1=Tt,i1=function(){function a(e){this.options=e,this.attempt=0}return a.prototype.apply=function(){var e=this;return new Promise(function(n){return setTimeout(n,e.jitteredDelay)})},a.prototype.setAttemptNumber=function(e){this.attempt=e},Object.defineProperty(a.prototype,"jitteredDelay",{get:function(){var e=o1.JitterFactory(this.options);return e(this.delay)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"delay",{get:function(){var e=this.options.startingDelay,n=this.options.timeMultiple,t=this.numOfDelayedAttempts,o=e*Math.pow(n,t);return Math.min(o,this.options.maxDelay)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt},enumerable:!0,configurable:!0}),a}();va.Delay=i1;var r1=Q&&Q.__extends||function(){var a=function(e,n){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var i in o)o.hasOwnProperty(i)&&(t[i]=o[i])},a(e,n)};return function(e,n){a(e,n);function t(){this.constructor=e}e.prototype=n===null?Object.create(n):(t.prototype=n.prototype,new t)}}(),m1=Q&&Q.__awaiter||function(a,e,n,t){function o(i){return i instanceof n?i:new n(function(r){r(i)})}return new(n||(n=Promise))(function(i,r){function c(u){try{l(t.next(u))}catch(h){r(h)}}function d(u){try{l(t.throw(u))}catch(h){r(h)}}function l(u){u.done?i(u.value):o(u.value).then(c,d)}l((t=t.apply(a,e||[])).next())})},c1=Q&&Q.__generator||function(a,e){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},t,o,i,r;return r={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(r[Symbol.iterator]=function(){return this}),r;function c(l){return function(u){return d([l,u])}}function d(l){if(t)throw new TypeError("Generator is already executing.");for(;n;)try{if(t=1,o&&(i=l[0]&2?o.return:l[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,l[1])).done)return i;switch(o=0,i&&(l=[l[0]&2,i.value]),l[0]){case 0:case 1:i=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,o=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){n.label=l[1];break}if(l[0]===6&&n.label<i[1]){n.label=i[1],i=l;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(l);break}i[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(a,n)}catch(u){l=[6,u],o=0}finally{t=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(gt,"__esModule",{value:!0});var l1=va,d1=function(a){r1(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.apply=function(){return m1(this,void 0,void 0,function(){return c1(this,function(n){return[2,this.isFirstAttempt?!0:a.prototype.apply.call(this)]})})},Object.defineProperty(e.prototype,"isFirstAttempt",{get:function(){return this.attempt===0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt-1},enumerable:!0,configurable:!0}),e}(l1.Delay);gt.SkipFirstDelay=d1;var vt={},p1=Q&&Q.__extends||function(){var a=function(e,n){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var i in o)o.hasOwnProperty(i)&&(t[i]=o[i])},a(e,n)};return function(e,n){a(e,n);function t(){this.constructor=e}e.prototype=n===null?Object.create(n):(t.prototype=n.prototype,new t)}}();Object.defineProperty(vt,"__esModule",{value:!0});var u1=va,g1=function(a){p1(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e}(u1.Delay);vt.AlwaysDelay=g1,Object.defineProperty(ut,"__esModule",{value:!0});var T1=gt,k1=vt;function y1(a,e){var n=v1(a);return n.setAttemptNumber(e),n}ut.DelayFactory=y1;function v1(a){return a.delayFirstAttempt?new k1.AlwaysDelay(a):new T1.SkipFirstDelay(a)}var ht=Q&&Q.__awaiter||function(a,e,n,t){function o(i){return i instanceof n?i:new n(function(r){r(i)})}return new(n||(n=Promise))(function(i,r){function c(u){try{l(t.next(u))}catch(h){r(h)}}function d(u){try{l(t.throw(u))}catch(h){r(h)}}function l(u){u.done?i(u.value):o(u.value).then(c,d)}l((t=t.apply(a,e||[])).next())})},ft=Q&&Q.__generator||function(a,e){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},t,o,i,r;return r={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(r[Symbol.iterator]=function(){return this}),r;function c(l){return function(u){return d([l,u])}}function d(l){if(t)throw new TypeError("Generator is already executing.");for(;n;)try{if(t=1,o&&(i=l[0]&2?o.return:l[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,l[1])).done)return i;switch(o=0,i&&(l=[l[0]&2,i.value]),l[0]){case 0:case 1:i=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,o=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){n.label=l[1];break}if(l[0]===6&&n.label<i[1]){n.label=i[1],i=l;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(l);break}i[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(a,n)}catch(u){l=[6,u],o=0}finally{t=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(br,"__esModule",{value:!0});var h1=pt,f1=ut;function R1(a,e){return e===void 0&&(e={}),ht(this,void 0,void 0,function(){var n,t;return ft(this,function(o){switch(o.label){case 0:return n=h1.getSanitizedOptions(e),t=new _1(a,n),[4,t.execute()];case 1:return[2,o.sent()]}})})}var Rt=br.backOff=R1,_1=function(){function a(e,n){this.request=e,this.options=n,this.attemptNumber=0}return a.prototype.execute=function(){return ht(this,void 0,void 0,function(){var e,n;return ft(this,function(t){switch(t.label){case 0:if(this.attemptLimitReached)return[3,7];t.label=1;case 1:return t.trys.push([1,4,,6]),[4,this.applyDelay()];case 2:return t.sent(),[4,this.request()];case 3:return[2,t.sent()];case 4:return e=t.sent(),this.attemptNumber++,[4,this.options.retry(e,this.attemptNumber)];case 5:if(n=t.sent(),!n||this.attemptLimitReached)throw e;return[3,6];case 6:return[3,0];case 7:throw new Error("Something went wrong.")}})})},Object.defineProperty(a.prototype,"attemptLimitReached",{get:function(){return this.attemptNumber>=this.options.numOfAttempts},enumerable:!0,configurable:!0}),a.prototype.applyDelay=function(){return ht(this,void 0,void 0,function(){var e;return ft(this,function(n){switch(n.label){case 0:return e=f1.DelayFactory(this.options,this.attemptNumber),[4,e.apply()];case 1:return n.sent(),[2]}})})},a}();const Or=s.makeMessageType("proto.rpc.v1.Credentials",()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"payload",kind:"scalar",T:9}]),_t=s.makeMessageType("proto.rpc.v1.AuthenticateRequest",()=>[{no:1,name:"entity",kind:"scalar",T:9},{no:2,name:"credentials",kind:"message",T:Or}]),S1=s.makeMessageType("proto.rpc.v1.AuthenticateResponse",()=>[{no:1,name:"access_token",kind:"scalar",T:9}]),I1=s.makeMessageType("proto.rpc.v1.AuthenticateToRequest",()=>[{no:1,name:"entity",kind:"scalar",T:9}]),b1=s.makeMessageType("proto.rpc.v1.AuthenticateToResponse",()=>[{no:1,name:"access_token",kind:"scalar",T:9}]),O1={typeName:"proto.rpc.v1.AuthService",methods:{authenticate:{name:"Authenticate",I:_t,O:S1,kind:m.Unary}}},E1={typeName:"proto.rpc.v1.ExternalAuthService",methods:{authenticateTo:{name:"AuthenticateTo",I:I1,O:b1,kind:m.Unary}}},gn=s.makeMessageType("google.rpc.Status",()=>[{no:1,name:"code",kind:"scalar",T:5},{no:2,name:"message",kind:"scalar",T:9},{no:3,name:"details",kind:"message",T:Z,repeated:!0}]),Pn=s.makeMessageType("proto.rpc.webrtc.v1.ICECandidate",()=>[{no:1,name:"candidate",kind:"scalar",T:9},{no:2,name:"sdp_mid",kind:"scalar",T:9,opt:!0},{no:3,name:"sdpm_line_index",kind:"scalar",T:13,opt:!0},{no:4,name:"username_fragment",kind:"scalar",T:9,opt:!0}]),Er=s.makeMessageType("proto.rpc.webrtc.v1.CallRequest",()=>[{no:1,name:"sdp",kind:"scalar",T:9},{no:2,name:"disable_trickle",kind:"scalar",T:8}]),M1=s.makeMessageType("proto.rpc.webrtc.v1.CallResponseInitStage",()=>[{no:1,name:"sdp",kind:"scalar",T:9}]),w1=s.makeMessageType("proto.rpc.webrtc.v1.CallResponseUpdateStage",()=>[{no:1,name:"candidate",kind:"message",T:Pn}]),C1=s.makeMessageType("proto.rpc.webrtc.v1.CallResponse",()=>[{no:1,name:"uuid",kind:"scalar",T:9},{no:2,name:"init",kind:"message",T:M1,oneof:"stage"},{no:3,name:"update",kind:"message",T:w1,oneof:"stage"}]),ha=s.makeMessageType("proto.rpc.webrtc.v1.CallUpdateRequest",()=>[{no:1,name:"uuid",kind:"scalar",T:9},{no:2,name:"candidate",kind:"message",T:Pn,oneof:"update"},{no:3,name:"done",kind:"scalar",T:8,oneof:"update"},{no:4,name:"error",kind:"message",T:gn,oneof:"update"}]),N1=s.makeMessageType("proto.rpc.webrtc.v1.CallUpdateResponse",[]),P1=s.makeMessageType("proto.rpc.webrtc.v1.ICEServer",()=>[{no:1,name:"urls",kind:"scalar",T:9,repeated:!0},{no:2,name:"username",kind:"scalar",T:9},{no:3,name:"credential",kind:"scalar",T:9}]),fa=s.makeMessageType("proto.rpc.webrtc.v1.WebRTCConfig",()=>[{no:1,name:"additional_ice_servers",kind:"message",T:P1,repeated:!0},{no:2,name:"disable_trickle",kind:"scalar",T:8}]),D1=s.makeMessageType("proto.rpc.webrtc.v1.AnswerRequestInitStage",()=>[{no:1,name:"sdp",kind:"scalar",T:9},{no:2,name:"optional_config",kind:"message",T:fa},{no:3,name:"deadline",kind:"message",T:S,opt:!0}]),A1=s.makeMessageType("proto.rpc.webrtc.v1.AnswerRequestUpdateStage",()=>[{no:1,name:"candidate",kind:"message",T:Pn}]),U1=s.makeMessageType("proto.rpc.webrtc.v1.AnswerRequestDoneStage",[]),q1=s.makeMessageType("proto.rpc.webrtc.v1.AnswerRequestErrorStage",()=>[{no:1,name:"status",kind:"message",T:gn}]),L1=s.makeMessageType("proto.rpc.webrtc.v1.AnswerRequestHeartbeatStage",[]),G1=s.makeMessageType("proto.rpc.webrtc.v1.AnswerRequest",()=>[{no:1,name:"uuid",kind:"scalar",T:9},{no:2,name:"init",kind:"message",T:D1,oneof:"stage"},{no:3,name:"update",kind:"message",T:A1,oneof:"stage"},{no:4,name:"done",kind:"message",T:U1,oneof:"stage"},{no:5,name:"error",kind:"message",T:q1,oneof:"stage"},{no:6,name:"heartbeat",kind:"message",T:L1,oneof:"stage"}]),B1=s.makeMessageType("proto.rpc.webrtc.v1.AnswerResponseInitStage",()=>[{no:1,name:"sdp",kind:"scalar",T:9}]),F1=s.makeMessageType("proto.rpc.webrtc.v1.AnswerResponseUpdateStage",()=>[{no:1,name:"candidate",kind:"message",T:Pn}]),x1=s.makeMessageType("proto.rpc.webrtc.v1.AnswerResponseDoneStage",[]),J1=s.makeMessageType("proto.rpc.webrtc.v1.AnswerResponseErrorStage",()=>[{no:1,name:"status",kind:"message",T:gn}]),z1=s.makeMessageType("proto.rpc.webrtc.v1.AnswerResponse",()=>[{no:1,name:"uuid",kind:"scalar",T:9},{no:2,name:"init",kind:"message",T:B1,oneof:"stage"},{no:3,name:"update",kind:"message",T:F1,oneof:"stage"},{no:4,name:"done",kind:"message",T:x1,oneof:"stage"},{no:5,name:"error",kind:"message",T:J1,oneof:"stage"}]),V1=s.makeMessageType("proto.rpc.webrtc.v1.OptionalWebRTCConfigRequest",[]),$1=s.makeMessageType("proto.rpc.webrtc.v1.OptionalWebRTCConfigResponse",()=>[{no:1,name:"config",kind:"message",T:fa}]),Y1={typeName:"proto.rpc.webrtc.v1.SignalingService",methods:{call:{name:"Call",I:Er,O:C1,kind:m.ServerStreaming},callUpdate:{name:"CallUpdate",I:ha,O:N1,kind:m.Unary},answer:{name:"Answer",I:z1,O:G1,kind:m.BiDiStreaming},optionalWebRTCConfig:{name:"OptionalWebRTCConfig",I:V1,O:$1,kind:m.Unary}}},Mr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",St=(a="")=>{const e=a;let n="";for(let t=0,o,i=0,r=Mr;e.charAt(Math.trunc(i))||(r="=",i%1);n+=r.charAt(63&t>>8-i%1*8)){if(o=e.charCodeAt(i+=3/4),o>255)throw new Error("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");t=t<<8|o}return n},wr=(a="")=>{const e=a.replace(/=+$/,"");let n="";if(e.length%4===1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(let t=0,o=0,i,r=0;i=e.charAt(r++);~i&&(o=t%4?o*64+i:i,t++%4)?n+=String.fromCharCode(255&o>>(-2*t&6)):0)i=Mr.indexOf(i);return n},It=(a,e)=>{const n={sdp:a?.sdp,type:a?.type};if(e)for(const[t,o]of Object.entries(e))n.sdp=[n.sdp,`a=${t}:${o}\r
|
|
4
|
-
`].join("");return n},W1=async(a,e,n)=>{const t=e??{iceServers:[{urls:"stun:global.stun.twilio.com:3478"}]},o=new RTCPeerConnection(t);let i;const r=new Promise(h=>{i=h}),c=o.createDataChannel("data",{id:0,negotiated:!0,ordered:!0});c.binaryType="arraybuffer";const d=o.createDataChannel("negotiation",{id:1,negotiated:!0,ordered:!0});d.binaryType="arraybuffer";let l=!1;if(d.addEventListener("open",()=>{l=!0}),d.addEventListener("message",h=>{(async()=>{const I=new RTCSessionDescription(JSON.parse(wr(h.data)));if(await o.setRemoteDescription(I),I.type==="offer"){await o.setLocalDescription();const R=It(o.localDescription,n);d.send(St(JSON.stringify(R)))}})().catch(console.error)}),o.addEventListener("negotiationneeded",()=>{(async()=>{if(!l)return;await o.setLocalDescription();const h=It(o.localDescription,n);d.send(St(JSON.stringify(h)))})().catch(console.error)}),!a)return{pc:o,dc:c};const u=await o.createOffer({});return await o.setLocalDescription(u),o.addEventListener("icecandidate",h=>{h.candidate===null&&i({pc:o,dc:c})}),r};function H1(){try{new Headers}catch{throw new Error("connect-web requires the fetch API. Are you running on an old version of Node.js? Node.js is not supported in Connect for Web - please stay tuned for Connect for Node.")}}function Cr(a,e){const n=kr(a);if(n)throw e.forEach((t,o)=>{n.metadata.append(o,t)}),n;if(!e.has(un)&&!a.has(un))throw new C("protocol error: missing status",g.Code.Internal)}function Nr(a,e,n,t){const o=new Headers(n??{});return o.set(JR,a?WR:HR),o.set(YR,"1"),o.set($R,"connect-es/1.6.1"),e!==void 0&&o.set(zR,`${e}m`),o}function j1(a){switch(a){case 400:return g.Code.Internal;case 401:return g.Code.Unauthenticated;case 403:return g.Code.PermissionDenied;case 404:return g.Code.Unimplemented;case 429:return g.Code.Unavailable;case 502:return g.Code.Unavailable;case 503:return g.Code.Unavailable;case 504:return g.Code.Unavailable;default:return g.Code.Unknown}}function Pr(a,e){var n;if(a>=200&&a<300)return{foundStatus:e.has(un),headerError:kr(e)};throw new C(decodeURIComponent((n=e.get(Tr))!==null&&n!==void 0?n:`HTTP ${a}`),j1(a),e)}var en=function(a){return this instanceof en?(this.v=a,this):new en(a)},K1=function(a,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=n.apply(a,e||[]),o,i=[];return o={},c("next"),c("throw"),c("return",r),o[Symbol.asyncIterator]=function(){return this},o;function r(R){return function(b){return Promise.resolve(b).then(R,h)}}function c(R,b){t[R]&&(o[R]=function(w){return new Promise(function(N,V){i.push([R,w,N,V])>1||d(R,w)})},b&&(o[R]=b(o[R])))}function d(R,b){try{l(t[R](b))}catch(w){I(i[0][3],w)}}function l(R){R.value instanceof en?Promise.resolve(R.value.v).then(u,h):I(i[0][2],R)}function u(R){d("next",R)}function h(R){d("throw",R)}function I(R,b){R(b),i.shift(),i.length&&d(i[0][0],i[0][1])}};function X1(a){var e;H1();const n=(e=a.useBinaryFormat)!==null&&e!==void 0?e:!0;return{async unary(t,o,i,r,c,d,l){var u;const{serialize:h,parse:I}=dt(o,n,a.jsonOptions,a.binaryOptions);return r=r===void 0?a.defaultTimeoutMs:r<=0?void 0:r,await _r({interceptors:a.interceptors,signal:i,timeoutMs:r,req:{stream:!1,service:t,method:o,url:yr(a.baseUrl,t,o),init:{method:"POST",credentials:(u=a.credentials)!==null&&u!==void 0?u:"same-origin",redirect:"error",mode:"cors"},header:Nr(n,r,c),contextValues:l??Ta(),message:d},next:async R=>{var b;const N=await((b=a.fetch)!==null&&b!==void 0?b:globalThis.fetch)(R.url,Object.assign(Object.assign({},R.init),{headers:R.header,signal:R.signal,body:lr(0,h(R.message))})),{headerError:V}=Pr(N.status,N.headers);if(!N.body)throw V!==void 0?V:"missing response body";const y=cr(N.body).getReader();let f,k;for(;;){const v=await y.read();if(v.done)break;const{flags:E,data:O}=v.value;if((E&mr)===mr)throw new C("protocol error: received unsupported compressed output",g.Code.Internal);if(E===lt){if(f!==void 0)throw"extra trailer";f=gr(O);continue}if(k!==void 0)throw new C("extra message",g.Code.Unimplemented);k=I(O)}if(f===void 0)throw V!==void 0?V:new C("missing trailer",N.headers.has(un)?g.Code.Unimplemented:g.Code.Unknown);if(Cr(f,N.headers),k===void 0)throw new C("missing message",f.has(un)?g.Code.Unimplemented:g.Code.Unknown);return{stream:!1,service:t,method:o,header:N.headers,message:k,trailer:f}}})},async stream(t,o,i,r,c,d,l){var u;const{serialize:h,parse:I}=dt(o,n,a.jsonOptions,a.binaryOptions);function R(w,N,V,y,f){return K1(this,arguments,function*(){const v=cr(w).getReader();if(N){if(!(yield en(v.read())).done)throw"extra data for trailers-only";return yield en(void 0)}let E=!1;for(;;){const O=yield en(v.read());if(O.done)break;const{flags:se,data:B}=O.value;if((se<)===lt){if(E)throw"extra trailer";E=!0;const Y=gr(B);Cr(Y,y),Y.forEach((Ii,bi)=>V.set(bi,Ii));continue}if(E)throw"extra message";yield yield en(I(B))}if("throwIfAborted"in f&&f.throwIfAborted(),!E)throw"missing trailer"})}async function b(w){if(o.kind!=m.ServerStreaming)throw"The fetch API does not support streaming request bodies";const N=await w[Symbol.asyncIterator]().next();if(N.done==!0)throw"missing request message";return lr(0,h(N.value))}return r=r===void 0?a.defaultTimeoutMs:r<=0?void 0:r,Sr({interceptors:a.interceptors,signal:i,timeoutMs:r,req:{stream:!0,service:t,method:o,url:yr(a.baseUrl,t,o),init:{method:"POST",credentials:(u=a.credentials)!==null&&u!==void 0?u:"same-origin",redirect:"error",mode:"cors"},header:Nr(n,r,c),contextValues:l??Ta(),message:d},next:async w=>{var N;const y=await((N=a.fetch)!==null&&N!==void 0?N:globalThis.fetch)(w.url,Object.assign(Object.assign({},w.init),{headers:w.header,signal:w.signal,body:await b(w.message)})),{foundStatus:f,headerError:k}=Pr(y.status,y.headers);if(k!=null)throw k;if(!y.body)throw"missing response body";const v=new Headers;return Object.assign(Object.assign({},w),{header:y.headers,trailer:v,message:R(y.body,f,v,y.headers,w.signal)})}})}}}const Ra=s.makeMessageType("proto.rpc.webrtc.v1.PacketMessage",()=>[{no:1,name:"data",kind:"scalar",T:12},{no:2,name:"eom",kind:"scalar",T:8}]),bt=s.makeMessageType("proto.rpc.webrtc.v1.Stream",()=>[{no:1,name:"id",kind:"scalar",T:4}]),Ot=s.makeMessageType("proto.rpc.webrtc.v1.Request",()=>[{no:1,name:"stream",kind:"message",T:bt},{no:2,name:"headers",kind:"message",T:Dr,oneof:"type"},{no:3,name:"message",kind:"message",T:Et,oneof:"type"},{no:4,name:"rst_stream",kind:"scalar",T:8,oneof:"type"}]),Dr=s.makeMessageType("proto.rpc.webrtc.v1.RequestHeaders",()=>[{no:1,name:"method",kind:"scalar",T:9},{no:2,name:"metadata",kind:"message",T:_a},{no:3,name:"timeout",kind:"message",T:J}]),Et=s.makeMessageType("proto.rpc.webrtc.v1.RequestMessage",()=>[{no:1,name:"has_message",kind:"scalar",T:8},{no:2,name:"packet_message",kind:"message",T:Ra},{no:3,name:"eos",kind:"scalar",T:8}]),Q1=s.makeMessageType("proto.rpc.webrtc.v1.Response",()=>[{no:1,name:"stream",kind:"message",T:bt},{no:2,name:"headers",kind:"message",T:Z1,oneof:"type"},{no:3,name:"message",kind:"message",T:e_,oneof:"type"},{no:4,name:"trailers",kind:"message",T:n_,oneof:"type"}]),Z1=s.makeMessageType("proto.rpc.webrtc.v1.ResponseHeaders",()=>[{no:1,name:"metadata",kind:"message",T:_a}]),e_=s.makeMessageType("proto.rpc.webrtc.v1.ResponseMessage",()=>[{no:1,name:"packet_message",kind:"message",T:Ra}]),n_=s.makeMessageType("proto.rpc.webrtc.v1.ResponseTrailers",()=>[{no:1,name:"status",kind:"message",T:gn},{no:2,name:"metadata",kind:"message",T:_a}]),Ar=s.makeMessageType("proto.rpc.webrtc.v1.Strings",()=>[{no:1,name:"values",kind:"scalar",T:9,repeated:!0}]),_a=s.makeMessageType("proto.rpc.webrtc.v1.Metadata",()=>[{no:1,name:"md",kind:"map",K:9,V:{kind:"message",T:Ar}}]);class pe extends Error{name="ConnectionClosedError";constructor(e){super(e),Object.setPrototypeOf(this,pe.prototype)}static isError(e){return e instanceof pe||e instanceof C&&e.rawMessage==="closed"?!0:typeof e=="string"?e==="Response closed without headers":e instanceof Error?e.message==="Response closed without headers":!1}}class a_{ready;peerConn;dataChannel;pResolve;pReject;closed=!1;closedReason;maxDataChannelSize=65535;constructor(e,n){this.peerConn=e,this.dataChannel=n,this.ready=new Promise((t,o)=>{this.pResolve=t,this.pReject=o}),n.addEventListener("open",()=>this.onChannelOpen()),n.addEventListener("close",()=>this.onChannelClose()),n.addEventListener("error",t=>{this.onChannelError(t)}),e.addEventListener("iceconnectionstatechange",()=>{const t=e.iceConnectionState;(t==="failed"||t==="disconnected"||t==="closed")&&this.pReject?.(new Error(`ICE connection failed with state: ${t}`))})}isClosed(){return this.closed}isClosedReason(){return this.closedReason}closeWithReason(e){this.closed||(this.closed=!0,this.closedReason=e,this.pReject?.(e),this.peerConn.close(),this.dataChannel.close())}onChannelOpen(){this.pResolve?.(void 0)}onChannelClose(){this.closeWithReason(new pe("data channel closed"))}onChannelError(e){console.error("channel error",e),this.closeWithReason(new Error(JSON.stringify(e)))}write(e){this.dataChannel.send(e.toBinary())}}const Ur=33554432;class t_{grpcStream;onDone;closed=!1;packetBuf=[];packetBufSize=0;constructor(e,n){this.grpcStream=e,this.onDone=n}closeWithRecvError(){this.closed||(this.closed=!0,this.onDone(this.grpcStream.id))}processPacketMessage(e){const{data:n}=e;if(n.length+this.packetBufSize>Ur){this.packetBuf.length=0,this.packetBufSize=0,console.error(`message size larger than max ${Ur}; discarding`);return}if(this.packetBuf.push(n),this.packetBufSize+=n.length,e.eom){const t=new Uint8Array(this.packetBufSize);let o=0;for(const i of this.packetBuf)t.set(i,o),o+=i.length;return this.packetBuf.length=0,this.packetBufSize=0,t}}}const s_=16373;class qr extends t_{channel;service;method;parseMessage;requestHeaders;headersReceived=!1;trailersReceived=!1;constructor(e,n,t,o,i,r){super(n,t),this.channel=e,this.service=o,this.method=i;const{parse:c}=dt(i,!0,void 0,void 0);this.parseMessage=c;const d=`/${o.typeName}/${i.name}`;this.requestHeaders=new Dr({method:d});const l=o_(Dn(r));l&&(this.requestHeaders.metadata=l)}startRequest(e){e&&e.addEventListener("abort",()=>{this.resetStream()});try{this.channel.writeHeaders(this.grpcStream,this.requestHeaders)}catch(n){console.error("error writing headers",n),this.closeWithRecvError()}}sendMessage(e){if(e){this.writeMessage(!1,e);return}this.writeMessage(!1,void 0)}resetStream(){if(!this.closed)try{this.channel.writeReset(this.grpcStream)}catch(e){console.error("error writing reset",e),this.closeWithRecvError()}}writeMessage(e,n){try{if(!n||n.length===0){const o=new Ra({eom:!0}),i=new Et({hasMessage:!!n,packetMessage:o,eos:e});this.channel.writeMessage(this.grpcStream,i);return}let t=n;for(;t.length>0;){const o=Math.min(t.length,s_),i=new Ra;i.data=t.slice(0,o),t=t.slice(o),t.length===0&&(i.eom=!0);const r=new Et({hasMessage:!!t,packetMessage:i,eos:e});this.channel.writeMessage(this.grpcStream,r)}}catch(t){console.error("error writing message",t),this.closeWithRecvError()}}onResponse(e){switch(e.type.case){case"headers":{if(this.headersReceived){console.error(`invariant: headers already received for ${this.grpcStream.id}`);return}if(this.trailersReceived){console.error(`invariant: headers received after trailers for ${this.grpcStream.id}`);return}this.processHeaders(e.type.value);break}case"message":{if(!this.headersReceived){console.error(`invariant: headers not yet received for ${this.grpcStream.id}`);return}if(this.trailersReceived){console.error(`invariant: headers received after trailers for ${this.grpcStream.id}`);return}this.processMessage(e.type.value);break}case"trailers":{this.processTrailers(e.type.value);break}default:{console.error("unknown response type",e.type.case);break}}}processHeaders(e){this.headersReceived=!0,this.onHeaders(e)}processMessage(e){if(!e.packetMessage)return;const n=super.processPacketMessage(e.packetMessage);n&&this.onMessage(n)}processTrailers(e){this.trailersReceived=!0;const{status:n}=e,t=n?n.code:0;if(this.onTrailers(e),t===0){this.closeWithRecvError();return}this.closeWithRecvError()}}const o_=a=>{if(!a)return;const e=new _a({md:Object.fromEntries([...a.entries()].map(([n,t])=>[n,new Ar({values:[t]})]))});return Object.keys(e.md).length>0?e:void 0},Mt=a=>{const e=Object.entries(a?.md??{}).flatMap(([n,{values:t}])=>t.map(o=>[n,o]));return new Headers(e)};class i_ extends qr{awaitingHeadersResult;gotHeaders=!1;respStream=DR();trailers=new Headers;respStreamQueue;async run(e,n,t,o){const r={req:{stream:!0,url:"",init:{},service:this.service,method:this.method,header:new Headers,contextValues:o??Ta(),message:t},next:async c=>{const l=await new Promise((u,h)=>{this.awaitingHeadersResult={success:u,failure:h},this.startRequest(e),this.sendMessages(c.message).catch(I=>{console.error("error sending streaming message",I),this.closeWithRecvError()})});return{...c,header:l,trailer:this.trailers,message:this.respStream}}};return e&&(r.signal=e),n!==void 0&&(r.timeoutMs=n),Sr(r)}async sendMessages(e){for await(const n of e)this.sendMessage(n.toBinary());this.writeMessage(!0,void 0)}onHeaders(e){this.gotHeaders=!0,this.awaitingHeadersResult?.success(Mt(e.metadata))}onTrailers(e){if(e.metadata?.md){for(const n in e.metadata.md)if(Object.hasOwn(e.metadata.md,n)){const t=e.metadata.md[n];for(const o of t?.values??[])this.trailers.append(n,o)}}if(this.respStream.close(),!e.status||e.status.code===0){if(this.gotHeaders)return;this.awaitingHeadersResult?.success(new Headers);return}this.gotHeaders||this.awaitingHeadersResult?.failure(e.status.message)}onMessage(e){const n=this.parseMessage(e);this.respStreamQueue=this.respStreamQueue?this.respStreamQueue.then(async()=>this.respStream.write(n)):this.respStream.write(n),this.respStreamQueue.catch(t=>{console.error(`error pushing received message into stream; failing: ${t}`),this.resetStream()})}}class r_ extends qr{result;headers;message;async run(e,n,t,o){const r={req:{stream:!1,url:"",init:{},service:this.service,method:this.method,header:new Headers,contextValues:o??Ta(),message:t},next:async c=>new Promise((d,l)=>{this.result={success:d,failure:l},this.startRequest(),this.sendMessage(c.message.toBinary())})};return e&&(r.signal=e),n!==void 0&&(r.timeoutMs=n),_r(r)}onHeaders(e){if(this.headers!==void 0){this.result?.failure(new Error("invariant: received headers more than once"));return}this.headers=Mt(e.metadata)}onTrailers(e){const n=Mt(e.metadata);if(!e.status||e.status.code===0){if(!this.headers){this.result?.failure(new Error("invariant: received trailers for successful unary request without headers"));return}if(this.message===void 0){this.result?.failure(new Error("invariant: received trailers for successful unary request without message"));return}this.result?.success({stream:!1,header:this.headers,message:this.message,trailer:n,service:this.service,method:this.method});return}this.result?.failure(e.status.message)}onMessage(e){if(this.message!==void 0){this.result?.failure(new Error("invariant: received two response messages for unary request"));return}this.message=this.parseMessage(e)}}const m_=256;class c_ extends a_{streamIDCounter=0;streams=new Map;constructor(e,n){super(e,n),n.addEventListener("message",t=>{this.onChannelMessage(t)}),e.addEventListener("iceconnectionstatechange",()=>{const t=e.iceConnectionState;(t==="failed"||t==="disconnected"||t==="closed")&&this.onConnectionTerminated()}),n.addEventListener("close",()=>this.onConnectionTerminated())}onConnectionTerminated(){this.closeWithReason(new pe("data channel closed"));for(const e of this.streams.values())e.cs.closeWithRecvError()}onChannelMessage(e){const n=Q1.fromBinary(new Uint8Array(e.data)),{stream:t}=n;if(t===void 0){console.error("no stream id; discarding");return}const{id:o}=t,i=this.streams.get(o.toString());if(i===void 0){console.error("no stream for id; discarding","id",o);return}i.cs.onResponse(n)}nextStreamID(){const e=this.streamIDCounter;return this.streamIDCounter+=1,new bt({id:BigInt(e)})}newStream(e,n,t,o,i){if(this.isClosed())throw new pe("connection closed");let r=this.streams.get(n.id.toString());if(r!==void 0)throw new Error("invariant: stream should not exist yet");if(Object.keys(this.streams).length>m_)throw new Error("stream limit hit");const c=new e(this,n,d=>this.removeStreamByID(d),t,o,i);return r={cs:c},this.streams.set(n.id.toString(),r),c}removeStreamByID(e){this.streams.delete(e.toString())}writeHeaders(e,n){this.write(new Ot({stream:e,type:{case:"headers",value:n}}))}writeMessage(e,n){this.write(new Ot({stream:e,type:{case:"message",value:n}}))}writeReset(e){this.write(new Ot({stream:e,type:{case:"rstStream",value:!0}}))}async unary(e,n,t,o,i,r,c){return this.newStream(r_,this.nextStreamID(),e,n,i).run(t,o,r,c)}async stream(e,n,t,o,i,r,c){return this.newStream(i_,this.nextStreamID(),e,n,i).run(t,o,r,c)}}const Sa="invariant: call uuid unset";class l_{constructor(e,n,t,o,i){this.signalingClient=e,this.callOpts=n,this.pc=t,this.dc=o,this.dialOpts=i,this.clientChannel=new c_(this.pc,this.dc)}clientChannel;callUuid;sentDoneOrErrorOnce=!1;exchangeDone=!1;iceComplete=!1;haveInitResponse=!1;awaitingRemoteDescription;remoteDescriptionSet;numCallUpdates=0;maxCallUpdateDuration=0;totalCallUpdateDuration=0;async doExchange(){await this.setup();const e=It(this.pc.localDescription,this.dialOpts?.additionalSdpFields),n=St(JSON.stringify(e)),t=new Er({sdp:n});this.dialOpts&&this.dialOpts.disableTrickleICE&&(t.disableTrickle=this.dialOpts.disableTrickleICE),this.clientChannel.ready.then(async()=>{this.exchangeDone=!0,await this.sendDone()}).catch(console.error);const o=this.signalingClient.call(t,this.callOpts),i=this.processCallResponses(o);return await Promise.all([this.clientChannel.ready,i]),this.clientChannel}async setup(){if(this.remoteDescriptionSet=new Promise((e,n)=>{this.awaitingRemoteDescription={success:e,failure:n}}),!this.dialOpts?.disableTrickleICE){const e=await this.pc.createOffer({});this.pc.addEventListener("iceconnectionstatechange",()=>{if(this.pc.iceConnectionState!=="completed"||this.numCallUpdates===0)return;const n=this.totalCallUpdateDuration/this.numCallUpdates;console.groupCollapsed("Caller update statistics"),console.table({num_updates:this.numCallUpdates,average_duration:`${n}ms`,max_duration:`${this.maxCallUpdateDuration}ms`}),console.groupEnd()}),this.pc.addEventListener("icecandidate",n=>{this.onLocalICECandidate(n).catch(t=>{console.error(`error processing local ICE candidate ${t}`)})}),await this.pc.setLocalDescription(e)}}terminate(e){this.clientChannel.closeWithReason(e)}async processCallResponses(e){try{for await(const n of e)switch(n.stage.case){case"init":{if(!await this.handleInitResponse(n.uuid,n.stage.value))return;break}case"update":{if(!await this.handleUpdateResponse(n.uuid,n.stage.value))return;break}default:{await this.sendError("unknown CallResponse stage");return}}}catch(n){this.handleInitError(n)}}handleInitError(e){if(!(this.exchangeDone||this.pc.iceConnectionState==="connected")){if(e instanceof C&&e.code===g.Code.Unimplemented){if(e.message==="Response closed without headers")throw new pe("failed to dial");if(this.clientChannel.isClosed())throw new pe("client channel is closed");console.error(e.message)}throw e}}async handleInitResponse(e,n){if(this.haveInitResponse)return await this.sendError("got init stage more than once"),!1;this.haveInitResponse=!0,this.callUuid=e;const t=new RTCSessionDescription(JSON.parse(wr(n.sdp)));return this.clientChannel.isClosed()?(await this.sendError("client channel is closed"),!1):(await this.pc.setRemoteDescription(t),this.awaitingRemoteDescription?.success(!0),this.dialOpts?.disableTrickleICE?(this.exchangeDone=!0,await this.sendDone(),!1):!0)}async handleUpdateResponse(e,n){if(!this.haveInitResponse)return await this.sendError("got update stage before init stage"),!1;if(e!==this.callUuid)return await this.sendError(`uuid mismatch; have=${e} want=${this.callUuid}`),!1;if(n.candidate===void 0)return await this.sendError("no candidate"),!1;const t=d_(n.candidate);t.candidate!==void 0&&console.debug(`received remote ICE ${t.candidate}`);try{await this.pc.addIceCandidate(t)}catch(o){throw console.log("error adding ice candidate",o),await this.sendError(JSON.stringify(o)),o}return!0}async onLocalICECandidate(e){if(await this.remoteDescriptionSet,this.exchangeDone||this.pc.iceConnectionState==="connected"){e.candidate!==null&&console.info("Dropping ICE candidate - exchange done or already connected",{exchangeDone:this.exchangeDone,iceConnectionState:this.pc.iceConnectionState,candidate:e.candidate.candidate});return}if(e.candidate===null){console.info("ICE gathering complete"),this.iceComplete=!0,await this.sendDone();return}if(this.callUuid===void 0||this.callUuid==="")throw console.error(Sa),new Error(Sa);e.candidate.candidate!==void 0&&console.info(`Gathered local ICE ${e.candidate.candidate}`);const n=p_(e.candidate),t=new ha({uuid:this.callUuid,update:{case:"candidate",value:n}}),o=new Date;try{await this.signalingClient.callUpdate(t,this.callOpts),this.numCallUpdates+=1;const r=new Date().getTime()-o.getTime();r>this.maxCallUpdateDuration&&(this.maxCallUpdateDuration=r),this.totalCallUpdateDuration+=r}catch(i){if(this.exchangeDone||this.iceComplete||this.pc.iceConnectionState==="connected")return;console.error(i)}}async sendError(e){if(this.sentDoneOrErrorOnce)return;if(this.callUuid===void 0||this.callUuid==="")throw new Error(Sa);this.sentDoneOrErrorOnce=!0;const n=new ha({uuid:this.callUuid,update:{case:"error",value:new gn({code:g.Code.Unknown,message:e})}});try{await this.signalingClient.callUpdate(n,this.callOpts)}catch(t){console.error("failed to send call update; continuing",t)}}async sendDone(){if(this.sentDoneOrErrorOnce)return;if(this.callUuid===void 0||this.callUuid==="")throw new Error(Sa);this.sentDoneOrErrorOnce=!0;const e=new ha({uuid:this.callUuid,update:{case:"done",value:!0}});try{await this.signalingClient.callUpdate(e,this.callOpts)}catch(n){console.error(n)}}}const d_=a=>{const e={candidate:a.candidate};return a.sdpMid!==void 0&&(e.sdpMid=a.sdpMid),a.sdpmLineIndex!==void 0&&(e.sdpMLineIndex=a.sdpmLineIndex),a.usernameFragment!==void 0&&(e.usernameFragment=a.usernameFragment),e},p_=a=>{const e=new Pn;return a.candidate!==void 0&&(e.candidate=a.candidate),a.sdpMid!==void 0&&a.sdpMid!==null&&(e.sdpMid=a.sdpMid),a.sdpMLineIndex!==void 0&&a.sdpMLineIndex!==null&&(e.sdpmLineIndex=a.sdpMLineIndex),a.usernameFragment!==void 0&&a.usernameFragment!==null&&(e.usernameFragment=a.usernameFragment),e};var Lr={exports:{}};(function(a,e){(function(n,t){a.exports=t()})(Q,function(){return function(n){var t={};function o(i){if(t[i])return t[i].exports;var r=t[i]={i,l:!1,exports:{}};return n[i].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=n,o.c=t,o.d=function(i,r,c){o.o(i,r)||Object.defineProperty(i,r,{enumerable:!0,get:c})},o.r=function(i){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},o.t=function(i,r){if(1&r&&(i=o(i)),8&r||4&r&&typeof i=="object"&&i&&i.__esModule)return i;var c=Object.create(null);if(o.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:i}),2&r&&typeof i!="string")for(var d in i)o.d(c,d,function(l){return i[l]}.bind(null,d));return c},o.n=function(i){var r=i&&i.__esModule?function(){return i.default}:function(){return i};return o.d(r,"a",r),r},o.o=function(i,r){return Object.prototype.hasOwnProperty.call(i,r)},o.p="",o(o.s=0)}([function(n,t,o){o.r(t),o.d(t,"UuidTool",function(){return c}),o.d(t,"Uuid",function(){return r});var i={uuid:/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i},r=function(){function d(l){this.id="",typeof l=="string"?this.fromString(l):Array.isArray(l)?this.fromBytes(l):this.generate()}return d.fromJson=function(l){if(typeof l=="string"&&(l=JSON.parse(l)),!l||!l.id)throw new TypeError("The input cannot be converted to Uuid.");return new d(l.id)},d.prototype.generate=function(){var l=new Array(16).fill(0).map(function(){return 256*Math.random()&255});return l[6]=79&(64|l[6]),this.fromBytes(l),this},d.prototype.fromBytes=function(l){return this.id=l.map(function(u){return("00"+u.toString(16)).slice(-2)}).join("").replace(/(.{8})(.{4})(.{4})(.{4})(.{12})/,"$1-$2-$3-$4-$5"),this.id=this.toString(),this},d.prototype.toBytes=function(){return(this.id.replace(/-/g,"").match(/.{2}/g)||[]).map(function(l){return parseInt(l,16)})},d.prototype.fromString=function(l){return this.id=l.trim(),this.id=this.toString(),this},d.prototype.toString=function(){switch(d.stringExportFormat){default:case"lowercase":return this.id.toLowerCase();case"uppercase":return this.id.toUpperCase()}},d.prototype.isValid=function(){return typeof this.id=="string"&&this.id.length===36&&i.uuid.test(this.id)},d.prototype.equals=function(l){return typeof l=="string"&&(l=new d(l)),this.toString()===l.toString()},d.stringExportFormat="lowercase",d}(),c=function(){function d(){}return d.toBytes=function(l){return new r().fromString(l).toBytes()},d.toString=function(l){return new r().fromBytes(l).toString()},d.newUuid=function(){return new r().toString()},d.isUuid=function(l){return new r().fromString(l).isValid()},d.compare=function(l,u){return new r(l).equals(new r(u))},d}()}])})})(Lr);var Ia=Lr.exports;const ba=(a,e)=>globalThis.VIAM?.GRPC_TRACE_LOGGING===!0?{...a,unary:async(o,i,r,c,d,l,u)=>{const h=Ia.UuidTool.newUuid();console.trace(`Unary request ${h} : ${e}/${o.typeName}.${i.name}`);const I=await a.unary(o,i,r,c,d,l,u);return console.debug(`Unary response received: ${h}`),I},stream:async(o,i,r,c,d,l,u)=>{const h=Ia.UuidTool.newUuid();console.trace(`Stream request ${h} : ${e}/${o.typeName}.${i.name}`);const I=await a.stream(o,i,r,c,d,l,u);return console.debug(`Stream response received: ${h}`),I}}:a,Oa=async(a,e,n=!1)=>{Br(e);const t=globalThis.VIAM?.GRPC_TRANSPORT_FACTORY??X1,o={baseUrl:a,credentials:"same-origin"};if(e?.accessToken!==void 0&&e.accessToken!==""&&!(e.externalAuthAddress!==void 0&&e.externalAuthAddress!==""&&e.externalAuthToEntity!==void 0&&e.externalAuthToEntity!=="")){const r=new Headers(e.extraHeaders);r.set("authorization",`Bearer ${e.accessToken}`);const c=new Ea(o,t,r);return ba(c,a)}if(e===void 0||e.credentials===void 0&&e.accessToken===void 0){n&&(o.credentials="include");const r=new Headers(e?.extraHeaders??{}),c=new Ea(o,t,r);return ba(c,a)}const i=await u_(a,t,e,o);return ba(i,a)},wt=/^.*:\/\//u,u_=async(a,e,n,t)=>{const o=new Headers(n.extraHeaders);let i;if(n.accessToken===void 0||n.accessToken===""){const r=new _t({entity:Gn(n.credentials)&&n.credentials.authEntity?n.credentials.authEntity:a.replace(wt,"")});n.credentials&&(r.credentials=new Or({type:n.credentials.type,payload:n.credentials.payload}));const c=n.externalAuthAddress??a,d=e({baseUrl:c});i=(await X(O1,d).authenticate(r)).accessToken}else i=n.accessToken;if(n.externalAuthAddress!==void 0&&n.externalAuthAddress!==""&&n.externalAuthToEntity!==void 0&&n.externalAuthToEntity!==""){const r=new Headers;r.set("authorization",`Bearer ${i}`),i="";const c=new _t({entity:n.externalAuthToEntity}),d=e({baseUrl:n.externalAuthAddress});i=(await X(E1,d).authenticateTo(c,{headers:r})).accessToken}return o.set("authorization",`Bearer ${i}`),new Ea(t,e,o)};class Ea{transport;extraHeaders;constructor(e,n,t){this.extraHeaders=t,this.transport=n(e)}unary=async(e,n,t,o,i,r,c)=>{const d=Dn(i);for(const[l,u]of this.extraHeaders)d.set(l,u);return this.transport.unary(e,n,t,o,d,r,c)};stream=async(e,n,t,o,i,r,c)=>{const d=Dn(i);for(const[l,u]of this.extraHeaders)d.set(l,u);return this.transport.stream(e,n,t,o,d,r,c)}}const Dn=a=>{const e=new Headers;if(a!==void 0)if(Array.isArray(a))for(const[n,t]of a)e.append(n,t);else if("forEach"in a)typeof a.forEach=="function"&&a.forEach((n,t)=>{e.append(t,n)});else for(const[n,t]of Object.entries(a))e.append(n,t);return e},g_=async(a,e,n=!1)=>{const t=await Oa(a,e,n);return X(Y1,t)},T_=async(a,e)=>{try{return(await e.optionalWebRTCConfig({},a)).config??new fa}catch(n){if(n instanceof C&&n.code===g.Code.Unimplemented)return new fa;throw n}},k_=async(a,e,n,t=!1)=>{let o=a.replace(/\/$/u,"");n?.webrtcOptions?.signalingInsecure&&(o=`http://${o.replace(/^https?:\/\//u,"")}`),Br(n);const i={headers:{"rpc-host":e}},r=__(o,n),c=await g_(o,r,t),d=await R_(c,i,n),{pc:l,dc:u}=await W1(d.disableTrickleICE,d.rtcConfig,d.additionalSdpFields);let h=!1;const I=new l_(c,i,l,u,d);let R;const b=n?.dialTimeoutMs??n?.dialTimeout;b!==void 0&&b>0&&(R=setTimeout(()=>{h||I.terminate(new Error("timed out"))},b));try{const w=await I.doExchange();n?.externalAuthAddress!==void 0&&n.externalAuthAddress!==""||n?.credentials?.type,h=!0;const N=new Headers(n?.extraHeaders??{}),V=new Ea({baseUrl:e},()=>w,N);return{transport:ba(V,e),peerConnection:l,dataChannel:u}}catch(w){throw console.error("error dialing",w),w}finally{R!==void 0&&(clearTimeout(R),R=void 0),h||(l.close(),u.close())}},y_=a=>(typeof a.urls=="string"?[a.urls]:a.urls).some(n=>n.startsWith("turn:")||n.startsWith("turns:")),Gr=a=>{const e=a.indexOf(":");if(e<0)return;const n=a.slice(0,e);if(n!=="turn"&&n!=="turns")return;const t=a.slice(e+1),o=t.indexOf("?"),i=o>=0?t.slice(0,o):t,r=o>=0?t.slice(o+1):"",c=i.lastIndexOf(":");if(c<0)return;const d=i.slice(0,c),l=Number.parseInt(i.slice(c+1),10);if(Number.isNaN(l))return;const u=r.split("&").find(h=>h.startsWith("transport="))?.slice(10)??"udp";return{scheme:n,host:d,port:l,transport:u}},v_=(a,e)=>a.scheme===e.scheme&&a.host===e.host&&a.port===e.port&&a.transport===e.transport,h_=a=>`${a.scheme}:${a.host}:${a.port}?transport=${a.transport}`,f_=a=>{let e;return a.turnUri!==void 0&&(e=Gr(a.turnUri),e===void 0)?(console.warn(`Failed to parse turnUri, ignoring all TURN URI options: ${a.turnUri}`),a):(a.rtcConfig={...a.rtcConfig,iceServers:(a.rtcConfig?.iceServers??[]).map(n=>{const o=(typeof n.urls=="string"?[n.urls]:n.urls).flatMap(i=>{const r=Gr(i);return r===void 0?[i]:e!==void 0&&!v_(r,e)?[]:(a.turnScheme!==void 0&&(r.scheme=a.turnScheme),a.turnPort!==void 0&&(r.port=a.turnPort),a.turnTransport!==void 0&&(r.transport=a.turnTransport),[h_(r)])});return{...n,urls:o}}).filter(n=>(typeof n.urls=="string"?[n.urls]:n.urls).length>0)},console.debug("TURN filter options set",{turnUri:a.turnUri,turnScheme:a.turnScheme,turnPort:a.turnPort,turnTransport:a.turnTransport}),a)},R_=async(a,e,n)=>{const t=await T_(e,a),o=t.additionalIceServers.map(c=>{const d=[];for(const l of c.urls)l.endsWith("udp")&&d.push(`${l.slice(0,-3)}tcp`),d.push(l);return{urls:d,credential:c.credential,username:c.username}}),i=n??{};let r;return i.webrtcOptions===void 0?r={disableTrickleICE:t.disableTrickle,rtcConfig:{iceServers:o}}:(r=JSON.parse(JSON.stringify(i.webrtcOptions)),r.rtcConfig===void 0?r.rtcConfig={iceServers:o}:r.rtcConfig.iceServers=[...r.rtcConfig.iceServers??[],...o]),r.forceRelay&&r.forceP2P&&console.warn("forceRelay and forceP2P are both set; forceP2P strips TURN servers that forceRelay requires so the connection will fail"),r.forceP2P&&(console.debug("force P2P enabled; stripping TURN servers and ignoring signaling server ICE config"),r.rtcConfig={...r.rtcConfig,iceServers:(r.rtcConfig?.iceServers??[]).filter(c=>!y_(c))}),r.forceRelay&&(console.debug("force relay enabled; using relay-only ICE transport policy"),r.rtcConfig={...r.rtcConfig,iceTransportPolicy:"relay"}),r.forceP2P&&(r.turnUri!==void 0||r.turnScheme!==void 0||r.turnTransport!==void 0||r.turnPort!==void 0)&&console.warn("forceP2P is set alongside TURN options; the TURN filter will have no effect since TURN servers were already stripped"),(r.turnUri!==void 0||r.turnScheme!==void 0||r.turnTransport!==void 0||r.turnPort!==void 0)&&(r=f_(r)),r},__=(a,e)=>{let n=e;return e&&(n={...e},e.accessToken===void 0&&(Gn(n.credentials)&&!n.credentials.authEntity&&(n.credentials.authEntity=n.externalAuthAddress!==void 0&&n.externalAuthAddress!==""?n.externalAuthAddress.replace(wt,""):a.replace(wt,"")),n.credentials=e.webrtcOptions?.signalingCredentials,n.accessToken=e.webrtcOptions?.signalingAccessToken),n.externalAuthAddress=e.webrtcOptions?.signalingExternalAuthAddress,n.externalAuthToEntity=e.webrtcOptions?.signalingExternalAuthToEntity),n},Br=a=>{if(a){if(a.accessToken!==void 0&&a.accessToken.length>0){if(a.credentials)throw new Error("cannot set credentials with accessToken");if(a.webrtcOptions?.signalingAccessToken!==void 0)throw new Error("cannot set webrtcOptions.signalingAccessToken with accessToken");if(a.webrtcOptions?.signalingCredentials!==void 0)throw new Error("cannot set webrtcOptions.signalingCredentials with accessToken")}if(a.webrtcOptions?.signalingAccessToken!==void 0&&a.webrtcOptions.signalingAccessToken.length>0&&a.webrtcOptions.signalingCredentials!==void 0)throw new Error("cannot set webrtcOptions.signalingCredentials with webrtcOptions.signalingAccessToken")}},S_="v0.1.539",Fr=s.makeEnum("viam.common.v1.KinematicsFileFormat",[{no:0,name:"KINEMATICS_FILE_FORMAT_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"KINEMATICS_FILE_FORMAT_SVA",localName:"SVA"},{no:2,name:"KINEMATICS_FILE_FORMAT_URDF",localName:"URDF"}]),z=s.makeMessageType("viam.common.v1.ResourceName",()=>[{no:1,name:"namespace",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"subtype",kind:"scalar",T:9},{no:4,name:"name",kind:"scalar",T:9}]),Be=s.makeMessageType("viam.common.v1.Pose",()=>[{no:1,name:"x",kind:"scalar",T:1},{no:2,name:"y",kind:"scalar",T:1},{no:3,name:"z",kind:"scalar",T:1},{no:4,name:"o_x",kind:"scalar",T:1},{no:5,name:"o_y",kind:"scalar",T:1},{no:6,name:"o_z",kind:"scalar",T:1},{no:7,name:"theta",kind:"scalar",T:1}]),Ct=s.makeMessageType("viam.common.v1.Orientation",()=>[{no:1,name:"o_x",kind:"scalar",T:1},{no:2,name:"o_y",kind:"scalar",T:1},{no:3,name:"o_z",kind:"scalar",T:1},{no:4,name:"theta",kind:"scalar",T:1}]),xr=s.makeMessageType("viam.common.v1.PoseCloud",()=>[{no:1,name:"x",kind:"scalar",T:1},{no:2,name:"y",kind:"scalar",T:1},{no:3,name:"z",kind:"scalar",T:1},{no:4,name:"o_x",kind:"scalar",T:1},{no:5,name:"o_y",kind:"scalar",T:1},{no:6,name:"o_z",kind:"scalar",T:1},{no:7,name:"theta",kind:"scalar",T:1}]),We=s.makeMessageType("viam.common.v1.PoseInFrame",()=>[{no:1,name:"reference_frame",kind:"scalar",T:9},{no:2,name:"pose",kind:"message",T:Be},{no:3,name:"goal_cloud",kind:"message",T:xr,opt:!0}]),ue=s.makeMessageType("viam.common.v1.Vector3",()=>[{no:1,name:"x",kind:"scalar",T:1},{no:2,name:"y",kind:"scalar",T:1},{no:3,name:"z",kind:"scalar",T:1}]),Jr=s.makeMessageType("viam.common.v1.Sphere",()=>[{no:1,name:"radius_mm",kind:"scalar",T:1}]),zr=s.makeMessageType("viam.common.v1.Capsule",()=>[{no:1,name:"radius_mm",kind:"scalar",T:1},{no:2,name:"length_mm",kind:"scalar",T:1}]),Vr=s.makeMessageType("viam.common.v1.RectangularPrism",()=>[{no:1,name:"dims_mm",kind:"message",T:ue}]),Ma=s.makeMessageType("viam.common.v1.Mesh",()=>[{no:1,name:"content_type",kind:"scalar",T:9},{no:2,name:"mesh",kind:"scalar",T:12}]),$r=s.makeMessageType("viam.common.v1.PointCloud",()=>[{no:1,name:"point_cloud",kind:"scalar",T:12}]),nn=s.makeMessageType("viam.common.v1.Geometry",()=>[{no:1,name:"center",kind:"message",T:Be},{no:2,name:"sphere",kind:"message",T:Jr,oneof:"geometry_type"},{no:3,name:"box",kind:"message",T:Vr,oneof:"geometry_type"},{no:5,name:"capsule",kind:"message",T:zr,oneof:"geometry_type"},{no:6,name:"mesh",kind:"message",T:Ma,oneof:"geometry_type"},{no:7,name:"pointcloud",kind:"message",T:$r,oneof:"geometry_type"},{no:4,name:"label",kind:"scalar",T:9}]),Nt=s.makeMessageType("viam.common.v1.GeometriesInFrame",()=>[{no:1,name:"reference_frame",kind:"scalar",T:9},{no:2,name:"geometries",kind:"message",T:nn,repeated:!0}]),Pt=s.makeMessageType("viam.common.v1.PointCloudObject",()=>[{no:1,name:"point_cloud",kind:"scalar",T:12},{no:2,name:"geometries",kind:"message",T:Nt}]),He=s.makeMessageType("viam.common.v1.GeoPoint",()=>[{no:1,name:"latitude",kind:"scalar",T:1},{no:2,name:"longitude",kind:"scalar",T:1}]),wa=s.makeMessageType("viam.common.v1.GeoGeometry",()=>[{no:1,name:"location",kind:"message",T:He},{no:2,name:"geometries",kind:"message",T:nn,repeated:!0}]),Fe=s.makeMessageType("viam.common.v1.Transform",()=>[{no:1,name:"reference_frame",kind:"scalar",T:9},{no:2,name:"pose_in_observer_frame",kind:"message",T:We},{no:3,name:"physical_object",kind:"message",T:nn,opt:!0},{no:4,name:"uuid",kind:"scalar",T:12},{no:5,name:"metadata",kind:"message",T:p,opt:!0}]),Yr=s.makeMessageType("viam.common.v1.WorldState",()=>[{no:1,name:"obstacles",kind:"message",T:Nt,repeated:!0},{no:3,name:"transforms",kind:"message",T:Fe,repeated:!0}]),I_=s.makeMessageType("viam.common.v1.ActuatorStatus",()=>[{no:1,name:"is_moving",kind:"scalar",T:8}]),Wr=s.makeMessageType("viam.common.v1.ResponseMetadata",()=>[{no:1,name:"captured_at",kind:"message",T:S,opt:!0}]),D=s.makeMessageType("viam.common.v1.DoCommandRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"command",kind:"message",T:p}]),U=s.makeMessageType("viam.common.v1.DoCommandResponse",()=>[{no:1,name:"result",kind:"message",T:p}]),P=s.makeMessageType("viam.common.v1.GetStatusRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),A=s.makeMessageType("viam.common.v1.GetStatusResponse",()=>[{no:1,name:"result",kind:"message",T:p}]),An=s.makeMessageType("viam.common.v1.GetKinematicsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Ca=s.makeMessageType("viam.common.v1.GetKinematicsResponse",()=>[{no:1,name:"format",kind:"enum",T:s.getEnumType(Fr)},{no:2,name:"kinematics_data",kind:"scalar",T:12},{no:3,name:"meshes_by_urdf_filepath",kind:"map",K:9,V:{kind:"message",T:Ma}}]),F=s.makeMessageType("viam.common.v1.GetGeometriesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),j=s.makeMessageType("viam.common.v1.GetGeometriesResponse",()=>[{no:1,name:"geometries",kind:"message",T:nn,repeated:!0}]),Dt=s.makeMessageType("viam.common.v1.Get3DModelsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Hr=s.makeMessageType("viam.common.v1.Get3DModelsResponse",()=>[{no:1,name:"models",kind:"map",K:9,V:{kind:"message",T:Ma}}]),an=s.makeMessageType("viam.common.v1.GetReadingsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Na=s.makeMessageType("viam.common.v1.GetReadingsResponse",()=>[{no:1,name:"readings",kind:"map",K:9,V:{kind:"message",T:ee}}]),Un=s.makeMessageType("viam.common.v1.LogEntry",()=>[{no:1,name:"host",kind:"scalar",T:9},{no:2,name:"level",kind:"scalar",T:9},{no:3,name:"time",kind:"message",T:S},{no:4,name:"logger_name",kind:"scalar",T:9},{no:5,name:"message",kind:"scalar",T:9},{no:6,name:"caller",kind:"message",T:p},{no:7,name:"stack",kind:"scalar",T:9},{no:8,name:"fields",kind:"message",T:p,repeated:!0}]),At=s.makeMessageType("viam.common.v1.AudioInfo",()=>[{no:1,name:"codec",kind:"scalar",T:9},{no:2,name:"sample_rate_hz",kind:"scalar",T:5},{no:3,name:"num_channels",kind:"scalar",T:5}]),qn=s.makeMessageType("viam.common.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Ut=s.makeMessageType("viam.common.v1.GetPropertiesResponse",()=>[{no:1,name:"supported_codecs",kind:"scalar",T:9,repeated:!0},{no:2,name:"sample_rate_hz",kind:"scalar",T:5},{no:3,name:"num_channels",kind:"scalar",T:5}]),jr=s.makeExtension("viam.common.v1.safety_heartbeat_monitored",le,{no:84260,kind:"scalar",T:8,opt:!0}),qt=Object.freeze(Object.defineProperty({__proto__:null,ActuatorStatus:I_,AudioInfo:At,Capsule:zr,DoCommandRequest:D,DoCommandResponse:U,GeoGeometry:wa,GeoPoint:He,GeometriesInFrame:Nt,Geometry:nn,Get3DModelsRequest:Dt,Get3DModelsResponse:Hr,GetGeometriesRequest:F,GetGeometriesResponse:j,GetKinematicsRequest:An,GetKinematicsResponse:Ca,GetPropertiesRequest:qn,GetPropertiesResponse:Ut,GetReadingsRequest:an,GetReadingsResponse:Na,GetStatusRequest:P,GetStatusResponse:A,KinematicsFileFormat:Fr,LogEntry:Un,Mesh:Ma,Orientation:Ct,PointCloud:$r,PointCloudObject:Pt,Pose:Be,PoseCloud:xr,PoseInFrame:We,RectangularPrism:Vr,ResourceName:z,ResponseMetadata:Wr,Sphere:Jr,Transform:Fe,Vector3:ue,WorldState:Yr,safety_heartbeat_monitored:jr},Symbol.toStringTag,{value:"Module"})),Ln=new Headers({viam_client:`typescript;v0.69.0;${S_}`}),q=async function(e,n,t,o={},i={}){const r=new D({name:n,command:t instanceof p?t:p.fromJson(t)});o.requestLogger?.(r);const d=(await e(r,i)).result?.toJson();return d===void 0?{}:d},b_=(a,e)=>{const n=e??{headers:{}};let t="";if(a===void 0){const o="abcdefghijklmnopqrstuvwxyz";for(let i=0;i<6;i+=1)t+=o[Math.floor(Math.random()*26)]}else t=a;return n.headers.dtname=t,n},O_=a=>{if(a.headers){const{_:e,...n}=a.headers;a.headers=n}},E_=(a,e,n)=>{const t=n??{headers:{}};return t.headers[a]=e,t},M_=(a,e)=>{const{[e]:n,...t}=a.headers;a.headers=t},Kr=async function(e,n,t=p.fromJson({}),o={}){const i=new An({name:n,extra:t}),r=await e(i,o),d=new TextDecoder("utf8").decode(r.kinematicsData),l=JSON.parse(d);return{...l,kinematicsData:l,meshesByUrdfFilepath:r.meshesByUrdfFilepath}},Xr=async function(e,n,t=p.fromJson({}),o={}){const i=new F({name:n,extra:t});return(await e(i,o)).geometries},L=async function(e,n,t={},o={}){const i=new P({name:n});t.requestLogger?.(i);const c=(await e(i,o)).result?.toJson();return c===void 0?{}:c},Gn=a=>a!==void 0&&"authEntity"in a,w_=async(a,e)=>e.type==="access-token"?Oa(a,{accessToken:e.payload,extraHeaders:Ln}):Oa(a,{credentials:e,extraHeaders:Ln}),Lt=1e4;var K=(a=>(a.CONNECTING="connecting",a.CONNECTED="connected",a.DISCONNECTING="disconnecting",a.DISCONNECTED="disconnected",a.DIALING="dialing",a.RECONNECTING="reconnecting",a.RECONNECTION_FAILED="reconnection_failed",a))(K||{});class Qr{listeners={};on(e,n){const{listeners:t}=this;t[e]??=new Set,t[e]?.add(n)}once(e,n){const t=o=>{n(o),this.off(e,n)};this.on(e,t)}has(e,n){return this.listeners[e]?.has(n)}off(e,n){this.listeners[e]?.delete(n)}emit(e,n){for(const t of this.listeners[e]??[])t(n)}}const Gt=s.makeMessageType("viam.component.arm.v1.GetEndPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Zr=s.makeMessageType("viam.component.arm.v1.GetEndPositionResponse",()=>[{no:1,name:"pose",kind:"message",T:Be}]),Tn=s.makeMessageType("viam.component.arm.v1.JointPositions",()=>[{no:1,name:"values",kind:"scalar",T:1,repeated:!0}]),Bt=s.makeMessageType("viam.component.arm.v1.GetJointPositionsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),em=s.makeMessageType("viam.component.arm.v1.GetJointPositionsResponse",()=>[{no:1,name:"positions",kind:"message",T:Tn}]),Ft=s.makeMessageType("viam.component.arm.v1.MoveToPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"to",kind:"message",T:Be},{no:99,name:"extra",kind:"message",T:p}]),nm=s.makeMessageType("viam.component.arm.v1.MoveToPositionResponse",[]),xt=s.makeMessageType("viam.component.arm.v1.MoveToJointPositionsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"positions",kind:"message",T:Tn},{no:99,name:"extra",kind:"message",T:p}]),am=s.makeMessageType("viam.component.arm.v1.MoveToJointPositionsResponse",[]),tm=s.makeMessageType("viam.component.arm.v1.MoveThroughJointPositionsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"positions",kind:"message",T:Tn,repeated:!0},{no:3,name:"options",kind:"message",T:rm,opt:!0},{no:99,name:"extra",kind:"message",T:p}]),sm=s.makeMessageType("viam.component.arm.v1.MoveThroughJointPositionsResponse",[]),Jt=s.makeMessageType("viam.component.arm.v1.StopRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),om=s.makeMessageType("viam.component.arm.v1.StopResponse",[]),C_=s.makeMessageType("viam.component.arm.v1.Status",()=>[{no:1,name:"end_position",kind:"message",T:Be},{no:2,name:"joint_positions",kind:"message",T:Tn},{no:3,name:"is_moving",kind:"scalar",T:8}]),zt=s.makeMessageType("viam.component.arm.v1.IsMovingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),im=s.makeMessageType("viam.component.arm.v1.IsMovingResponse",()=>[{no:1,name:"is_moving",kind:"scalar",T:8}]),rm=s.makeMessageType("viam.component.arm.v1.MoveOptions",()=>[{no:1,name:"max_vel_degs_per_sec",kind:"scalar",T:1,opt:!0},{no:2,name:"max_acc_degs_per_sec2",kind:"scalar",T:1,opt:!0},{no:3,name:"max_vel_degs_per_sec_joints",kind:"scalar",T:1,repeated:!0},{no:4,name:"max_acc_degs_per_sec2_joints",kind:"scalar",T:1,repeated:!0}]),mm=Object.freeze(Object.defineProperty({__proto__:null,GetEndPositionRequest:Gt,GetEndPositionResponse:Zr,GetJointPositionsRequest:Bt,GetJointPositionsResponse:em,IsMovingRequest:zt,IsMovingResponse:im,JointPositions:Tn,MoveOptions:rm,MoveThroughJointPositionsRequest:tm,MoveThroughJointPositionsResponse:sm,MoveToJointPositionsRequest:xt,MoveToJointPositionsResponse:am,MoveToPositionRequest:Ft,MoveToPositionResponse:nm,Status:C_,StopRequest:Jt,StopResponse:om},Symbol.toStringTag,{value:"Module"})),cm={typeName:"viam.component.arm.v1.ArmService",methods:{getEndPosition:{name:"GetEndPosition",I:Gt,O:Zr,kind:m.Unary},moveToPosition:{name:"MoveToPosition",I:Ft,O:nm,kind:m.Unary},getJointPositions:{name:"GetJointPositions",I:Bt,O:em,kind:m.Unary},moveToJointPositions:{name:"MoveToJointPositions",I:xt,O:am,kind:m.Unary},moveThroughJointPositions:{name:"MoveThroughJointPositions",I:tm,O:sm,kind:m.Unary},stop:{name:"Stop",I:Jt,O:om,kind:m.Unary},isMoving:{name:"IsMoving",I:zt,O:im,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},getKinematics:{name:"GetKinematics",I:An,O:Ca,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary},get3DModels:{name:"Get3DModels",I:Dt,O:Hr,kind:m.Unary}}},Vt=s.makeMessageType("viam.component.base.v1.MoveStraightRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"distance_mm",kind:"scalar",T:3},{no:3,name:"mm_per_sec",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),lm=s.makeMessageType("viam.component.base.v1.MoveStraightResponse",[]),$t=s.makeMessageType("viam.component.base.v1.SpinRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"angle_deg",kind:"scalar",T:1},{no:3,name:"degs_per_sec",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),dm=s.makeMessageType("viam.component.base.v1.SpinResponse",[]),Yt=s.makeMessageType("viam.component.base.v1.StopRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),pm=s.makeMessageType("viam.component.base.v1.StopResponse",[]),Wt=s.makeMessageType("viam.component.base.v1.SetPowerRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"linear",kind:"message",T:ue},{no:3,name:"angular",kind:"message",T:ue},{no:99,name:"extra",kind:"message",T:p}]),um=s.makeMessageType("viam.component.base.v1.SetPowerResponse",[]),Ht=s.makeMessageType("viam.component.base.v1.SetVelocityRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"linear",kind:"message",T:ue},{no:3,name:"angular",kind:"message",T:ue},{no:99,name:"extra",kind:"message",T:p}]),gm=s.makeMessageType("viam.component.base.v1.SetVelocityResponse",[]),jt=s.makeMessageType("viam.component.base.v1.IsMovingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),Tm=s.makeMessageType("viam.component.base.v1.IsMovingResponse",()=>[{no:1,name:"is_moving",kind:"scalar",T:8}]),Pa=s.makeMessageType("viam.component.base.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),km=s.makeMessageType("viam.component.base.v1.GetPropertiesResponse",()=>[{no:1,name:"width_meters",kind:"scalar",T:1},{no:2,name:"turning_radius_meters",kind:"scalar",T:1},{no:3,name:"wheel_circumference_meters",kind:"scalar",T:1}]),ym=Object.freeze(Object.defineProperty({__proto__:null,GetPropertiesRequest:Pa,GetPropertiesResponse:km,IsMovingRequest:jt,IsMovingResponse:Tm,MoveStraightRequest:Vt,MoveStraightResponse:lm,SetPowerRequest:Wt,SetPowerResponse:um,SetVelocityRequest:Ht,SetVelocityResponse:gm,SpinRequest:$t,SpinResponse:dm,StopRequest:Yt,StopResponse:pm},Symbol.toStringTag,{value:"Module"})),vm={typeName:"viam.component.base.v1.BaseService",methods:{moveStraight:{name:"MoveStraight",I:Vt,O:lm,kind:m.Unary},spin:{name:"Spin",I:$t,O:dm,kind:m.Unary},setPower:{name:"SetPower",I:Wt,O:um,kind:m.Unary},setVelocity:{name:"SetVelocity",I:Ht,O:gm,kind:m.Unary},stop:{name:"Stop",I:Yt,O:pm,kind:m.Unary},isMoving:{name:"IsMoving",I:jt,O:Tm,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary},getProperties:{name:"GetProperties",I:Pa,O:km,kind:m.Unary}}},hm=s.makeEnum("viam.component.board.v1.PowerMode",[{no:0,name:"POWER_MODE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"POWER_MODE_NORMAL",localName:"NORMAL"},{no:2,name:"POWER_MODE_OFFLINE_DEEP",localName:"OFFLINE_DEEP"}]),N_=s.makeMessageType("viam.component.board.v1.Status",()=>[{no:1,name:"analogs",kind:"map",K:9,V:{kind:"scalar",T:5}},{no:2,name:"digital_interrupts",kind:"map",K:9,V:{kind:"scalar",T:3}}]),Kt=s.makeMessageType("viam.component.board.v1.SetGPIORequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin",kind:"scalar",T:9},{no:3,name:"high",kind:"scalar",T:8},{no:99,name:"extra",kind:"message",T:p}]),fm=s.makeMessageType("viam.component.board.v1.SetGPIOResponse",[]),Xt=s.makeMessageType("viam.component.board.v1.GetGPIORequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Rm=s.makeMessageType("viam.component.board.v1.GetGPIOResponse",()=>[{no:1,name:"high",kind:"scalar",T:8}]),Qt=s.makeMessageType("viam.component.board.v1.PWMRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),_m=s.makeMessageType("viam.component.board.v1.PWMResponse",()=>[{no:1,name:"duty_cycle_pct",kind:"scalar",T:1}]),Zt=s.makeMessageType("viam.component.board.v1.SetPWMRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin",kind:"scalar",T:9},{no:3,name:"duty_cycle_pct",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),Sm=s.makeMessageType("viam.component.board.v1.SetPWMResponse",[]),es=s.makeMessageType("viam.component.board.v1.PWMFrequencyRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Im=s.makeMessageType("viam.component.board.v1.PWMFrequencyResponse",()=>[{no:1,name:"frequency_hz",kind:"scalar",T:4}]),ns=s.makeMessageType("viam.component.board.v1.SetPWMFrequencyRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin",kind:"scalar",T:9},{no:3,name:"frequency_hz",kind:"scalar",T:4},{no:99,name:"extra",kind:"message",T:p}]),bm=s.makeMessageType("viam.component.board.v1.SetPWMFrequencyResponse",[]),as=s.makeMessageType("viam.component.board.v1.ReadAnalogReaderRequest",()=>[{no:1,name:"board_name",kind:"scalar",T:9},{no:2,name:"analog_reader_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Om=s.makeMessageType("viam.component.board.v1.ReadAnalogReaderResponse",()=>[{no:1,name:"value",kind:"scalar",T:5},{no:2,name:"min_range",kind:"scalar",T:2},{no:3,name:"max_range",kind:"scalar",T:2},{no:4,name:"step_size",kind:"scalar",T:2}]),ts=s.makeMessageType("viam.component.board.v1.WriteAnalogRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin",kind:"scalar",T:9},{no:3,name:"value",kind:"scalar",T:5},{no:99,name:"extra",kind:"message",T:p}]),Em=s.makeMessageType("viam.component.board.v1.WriteAnalogResponse",[]),ss=s.makeMessageType("viam.component.board.v1.GetDigitalInterruptValueRequest",()=>[{no:1,name:"board_name",kind:"scalar",T:9},{no:2,name:"digital_interrupt_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Mm=s.makeMessageType("viam.component.board.v1.GetDigitalInterruptValueResponse",()=>[{no:1,name:"value",kind:"scalar",T:3}]),os=s.makeMessageType("viam.component.board.v1.StreamTicksRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin_names",kind:"scalar",T:9,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),wm=s.makeMessageType("viam.component.board.v1.StreamTicksResponse",()=>[{no:1,name:"pin_name",kind:"scalar",T:9},{no:2,name:"time",kind:"scalar",T:4},{no:3,name:"high",kind:"scalar",T:8}]),is=s.makeMessageType("viam.component.board.v1.SetPowerModeRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"power_mode",kind:"enum",T:s.getEnumType(hm)},{no:3,name:"duration",kind:"message",T:J,opt:!0},{no:99,name:"extra",kind:"message",T:p}]),Cm=s.makeMessageType("viam.component.board.v1.SetPowerModeResponse",[]),Nm=Object.freeze(Object.defineProperty({__proto__:null,GetDigitalInterruptValueRequest:ss,GetDigitalInterruptValueResponse:Mm,GetGPIORequest:Xt,GetGPIOResponse:Rm,PWMFrequencyRequest:es,PWMFrequencyResponse:Im,PWMRequest:Qt,PWMResponse:_m,PowerMode:hm,ReadAnalogReaderRequest:as,ReadAnalogReaderResponse:Om,SetGPIORequest:Kt,SetGPIOResponse:fm,SetPWMFrequencyRequest:ns,SetPWMFrequencyResponse:bm,SetPWMRequest:Zt,SetPWMResponse:Sm,SetPowerModeRequest:is,SetPowerModeResponse:Cm,Status:N_,StreamTicksRequest:os,StreamTicksResponse:wm,WriteAnalogRequest:ts,WriteAnalogResponse:Em},Symbol.toStringTag,{value:"Module"})),Pm={typeName:"viam.component.board.v1.BoardService",methods:{setGPIO:{name:"SetGPIO",I:Kt,O:fm,kind:m.Unary},getGPIO:{name:"GetGPIO",I:Xt,O:Rm,kind:m.Unary},pWM:{name:"PWM",I:Qt,O:_m,kind:m.Unary},setPWM:{name:"SetPWM",I:Zt,O:Sm,kind:m.Unary},pWMFrequency:{name:"PWMFrequency",I:es,O:Im,kind:m.Unary},setPWMFrequency:{name:"SetPWMFrequency",I:ns,O:bm,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},readAnalogReader:{name:"ReadAnalogReader",I:as,O:Om,kind:m.Unary},writeAnalog:{name:"WriteAnalog",I:ts,O:Em,kind:m.Unary},getDigitalInterruptValue:{name:"GetDigitalInterruptValue",I:ss,O:Mm,kind:m.Unary},streamTicks:{name:"StreamTicks",I:os,O:wm,kind:m.ServerStreaming},setPowerMode:{name:"SetPowerMode",I:is,O:Cm,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary}}},rs=s.makeEnum("viam.component.encoder.v1.PositionType",[{no:0,name:"POSITION_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"POSITION_TYPE_TICKS_COUNT",localName:"TICKS_COUNT"},{no:2,name:"POSITION_TYPE_ANGLE_DEGREES",localName:"ANGLE_DEGREES"}]),ms=s.makeMessageType("viam.component.encoder.v1.GetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"position_type",kind:"enum",T:s.getEnumType(rs),opt:!0},{no:99,name:"extra",kind:"message",T:p}]),Dm=s.makeMessageType("viam.component.encoder.v1.GetPositionResponse",()=>[{no:1,name:"value",kind:"scalar",T:2},{no:2,name:"position_type",kind:"enum",T:s.getEnumType(rs)}]),cs=s.makeMessageType("viam.component.encoder.v1.ResetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Am=s.makeMessageType("viam.component.encoder.v1.ResetPositionResponse",[]),ls=s.makeMessageType("viam.component.encoder.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Um=s.makeMessageType("viam.component.encoder.v1.GetPropertiesResponse",()=>[{no:1,name:"ticks_count_supported",kind:"scalar",T:8},{no:2,name:"angle_degrees_supported",kind:"scalar",T:8}]),qm=Object.freeze(Object.defineProperty({__proto__:null,GetPositionRequest:ms,GetPositionResponse:Dm,GetPropertiesRequest:ls,GetPropertiesResponse:Um,PositionType:rs,ResetPositionRequest:cs,ResetPositionResponse:Am},Symbol.toStringTag,{value:"Module"})),Lm={typeName:"viam.component.encoder.v1.EncoderService",methods:{getPosition:{name:"GetPosition",I:ms,O:Dm,kind:m.Unary},resetPosition:{name:"ResetPosition",I:cs,O:Am,kind:m.Unary},getProperties:{name:"GetProperties",I:ls,O:Um,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary}}},ds=s.makeMessageType("viam.component.gantry.v1.GetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Gm=s.makeMessageType("viam.component.gantry.v1.GetPositionResponse",()=>[{no:1,name:"positions_mm",kind:"scalar",T:1,repeated:!0}]),ps=s.makeMessageType("viam.component.gantry.v1.MoveToPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"positions_mm",kind:"scalar",T:1,repeated:!0},{no:3,name:"speeds_mm_per_sec",kind:"scalar",T:1,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),Bm=s.makeMessageType("viam.component.gantry.v1.MoveToPositionResponse",[]),us=s.makeMessageType("viam.component.gantry.v1.HomeRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Fm=s.makeMessageType("viam.component.gantry.v1.HomeResponse",()=>[{no:1,name:"homed",kind:"scalar",T:8}]),gs=s.makeMessageType("viam.component.gantry.v1.GetLengthsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),xm=s.makeMessageType("viam.component.gantry.v1.GetLengthsResponse",()=>[{no:1,name:"lengths_mm",kind:"scalar",T:1,repeated:!0}]),Ts=s.makeMessageType("viam.component.gantry.v1.StopRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Jm=s.makeMessageType("viam.component.gantry.v1.StopResponse",[]),P_=s.makeMessageType("viam.component.gantry.v1.Status",()=>[{no:1,name:"positions_mm",kind:"scalar",T:1,repeated:!0},{no:2,name:"lengths_mm",kind:"scalar",T:1,repeated:!0},{no:3,name:"is_moving",kind:"scalar",T:8}]),ks=s.makeMessageType("viam.component.gantry.v1.IsMovingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),zm=s.makeMessageType("viam.component.gantry.v1.IsMovingResponse",()=>[{no:1,name:"is_moving",kind:"scalar",T:8}]),D_=Object.freeze(Object.defineProperty({__proto__:null,GetLengthsRequest:gs,GetLengthsResponse:xm,GetPositionRequest:ds,GetPositionResponse:Gm,HomeRequest:us,HomeResponse:Fm,IsMovingRequest:ks,IsMovingResponse:zm,MoveToPositionRequest:ps,MoveToPositionResponse:Bm,Status:P_,StopRequest:Ts,StopResponse:Jm},Symbol.toStringTag,{value:"Module"})),Vm={typeName:"viam.component.gantry.v1.GantryService",methods:{getPosition:{name:"GetPosition",I:ds,O:Gm,kind:m.Unary},moveToPosition:{name:"MoveToPosition",I:ps,O:Bm,kind:m.Unary},home:{name:"Home",I:us,O:Fm,kind:m.Unary},getLengths:{name:"GetLengths",I:gs,O:xm,kind:m.Unary},stop:{name:"Stop",I:Ts,O:Jm,kind:m.Unary},isMoving:{name:"IsMoving",I:ks,O:zm,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},getKinematics:{name:"GetKinematics",I:An,O:Ca,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary}}},ys={typeName:"viam.component.generic.v1.GenericService",methods:{doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary}}},A_=Object.freeze(Object.defineProperty({__proto__:null,GenericService:ys},Symbol.toStringTag,{value:"Module"})),vs=s.makeMessageType("viam.component.gripper.v1.OpenRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),$m=s.makeMessageType("viam.component.gripper.v1.OpenResponse",[]),hs=s.makeMessageType("viam.component.gripper.v1.GrabRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Ym=s.makeMessageType("viam.component.gripper.v1.GrabResponse",()=>[{no:1,name:"success",kind:"scalar",T:8},{no:99,name:"extra",kind:"message",T:p}]),fs=s.makeMessageType("viam.component.gripper.v1.StopRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Wm=s.makeMessageType("viam.component.gripper.v1.StopResponse",[]),Rs=s.makeMessageType("viam.component.gripper.v1.IsMovingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),Hm=s.makeMessageType("viam.component.gripper.v1.IsMovingResponse",()=>[{no:1,name:"is_moving",kind:"scalar",T:8}]),_s=s.makeMessageType("viam.component.gripper.v1.IsHoldingSomethingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),jm=s.makeMessageType("viam.component.gripper.v1.IsHoldingSomethingResponse",()=>[{no:1,name:"is_holding_something",kind:"scalar",T:8},{no:99,name:"meta",kind:"message",T:p}]),U_=Object.freeze(Object.defineProperty({__proto__:null,GrabRequest:hs,GrabResponse:Ym,IsHoldingSomethingRequest:_s,IsHoldingSomethingResponse:jm,IsMovingRequest:Rs,IsMovingResponse:Hm,OpenRequest:vs,OpenResponse:$m,StopRequest:fs,StopResponse:Wm},Symbol.toStringTag,{value:"Module"})),Km={typeName:"viam.component.gripper.v1.GripperService",methods:{open:{name:"Open",I:vs,O:$m,kind:m.Unary},grab:{name:"Grab",I:hs,O:Ym,kind:m.Unary},stop:{name:"Stop",I:fs,O:Wm,kind:m.Unary},isMoving:{name:"IsMoving",I:Rs,O:Hm,kind:m.Unary},isHoldingSomething:{name:"IsHoldingSomething",I:_s,O:jm,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary},getKinematics:{name:"GetKinematics",I:An,O:Ca,kind:m.Unary}}},Xm=s.makeMessageType("viam.component.inputcontroller.v1.GetControlsRequest",()=>[{no:1,name:"controller",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Qm=s.makeMessageType("viam.component.inputcontroller.v1.GetControlsResponse",()=>[{no:1,name:"controls",kind:"scalar",T:9,repeated:!0}]),Ss=s.makeMessageType("viam.component.inputcontroller.v1.GetEventsRequest",()=>[{no:1,name:"controller",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Zm=s.makeMessageType("viam.component.inputcontroller.v1.GetEventsResponse",()=>[{no:1,name:"events",kind:"message",T:Bn,repeated:!0}]),Is=s.makeMessageType("viam.component.inputcontroller.v1.TriggerEventRequest",()=>[{no:1,name:"controller",kind:"scalar",T:9},{no:2,name:"event",kind:"message",T:Bn},{no:99,name:"extra",kind:"message",T:p}]),ec=s.makeMessageType("viam.component.inputcontroller.v1.TriggerEventResponse",[]),Bn=s.makeMessageType("viam.component.inputcontroller.v1.Event",()=>[{no:1,name:"time",kind:"message",T:S},{no:2,name:"event",kind:"scalar",T:9},{no:3,name:"control",kind:"scalar",T:9},{no:4,name:"value",kind:"scalar",T:1}]),nc=s.makeMessageType("viam.component.inputcontroller.v1.StreamEventsRequest",()=>[{no:1,name:"controller",kind:"scalar",T:9},{no:2,name:"events",kind:"message",T:ac,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),ac=s.makeMessageType("viam.component.inputcontroller.v1.StreamEventsRequest.Events",()=>[{no:1,name:"control",kind:"scalar",T:9},{no:2,name:"events",kind:"scalar",T:9,repeated:!0},{no:3,name:"cancelled_events",kind:"scalar",T:9,repeated:!0}],{localName:"StreamEventsRequest_Events"}),tc=s.makeMessageType("viam.component.inputcontroller.v1.StreamEventsResponse",()=>[{no:1,name:"event",kind:"message",T:Bn}]),sc=Object.freeze(Object.defineProperty({__proto__:null,Event:Bn,GetControlsRequest:Xm,GetControlsResponse:Qm,GetEventsRequest:Ss,GetEventsResponse:Zm,Status:s.makeMessageType("viam.component.inputcontroller.v1.Status",()=>[{no:1,name:"events",kind:"message",T:Bn,repeated:!0}]),StreamEventsRequest:nc,StreamEventsRequest_Events:ac,StreamEventsResponse:tc,TriggerEventRequest:Is,TriggerEventResponse:ec},Symbol.toStringTag,{value:"Module"})),oc={typeName:"viam.component.inputcontroller.v1.InputControllerService",methods:{getControls:{name:"GetControls",I:Xm,O:Qm,kind:m.Unary},getEvents:{name:"GetEvents",I:Ss,O:Zm,kind:m.Unary},streamEvents:{name:"StreamEvents",I:nc,O:tc,kind:m.ServerStreaming},triggerEvent:{name:"TriggerEvent",I:Is,O:ec,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary}}},bs=s.makeMessageType("viam.component.motor.v1.SetPowerRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"power_pct",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),ic=s.makeMessageType("viam.component.motor.v1.SetPowerResponse",[]),Os=s.makeMessageType("viam.component.motor.v1.GoForRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"rpm",kind:"scalar",T:1},{no:3,name:"revolutions",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),rc=s.makeMessageType("viam.component.motor.v1.GoForResponse",[]),Es=s.makeMessageType("viam.component.motor.v1.GoToRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"rpm",kind:"scalar",T:1},{no:3,name:"position_revolutions",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),mc=s.makeMessageType("viam.component.motor.v1.GoToResponse",[]),Ms=s.makeMessageType("viam.component.motor.v1.SetRPMRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"rpm",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),cc=s.makeMessageType("viam.component.motor.v1.SetRPMResponse",[]),ws=s.makeMessageType("viam.component.motor.v1.ResetZeroPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"offset",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),lc=s.makeMessageType("viam.component.motor.v1.ResetZeroPositionResponse",[]),Cs=s.makeMessageType("viam.component.motor.v1.GetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),dc=s.makeMessageType("viam.component.motor.v1.GetPositionResponse",()=>[{no:1,name:"position",kind:"scalar",T:1}]),Ns=s.makeMessageType("viam.component.motor.v1.StopRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),pc=s.makeMessageType("viam.component.motor.v1.StopResponse",[]),Ps=s.makeMessageType("viam.component.motor.v1.IsPoweredRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),uc=s.makeMessageType("viam.component.motor.v1.IsPoweredResponse",()=>[{no:1,name:"is_on",kind:"scalar",T:8},{no:2,name:"power_pct",kind:"scalar",T:1}]),Ds=s.makeMessageType("viam.component.motor.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),gc=s.makeMessageType("viam.component.motor.v1.GetPropertiesResponse",()=>[{no:1,name:"position_reporting",kind:"scalar",T:8}]),q_=s.makeMessageType("viam.component.motor.v1.Status",()=>[{no:1,name:"is_powered",kind:"scalar",T:8},{no:3,name:"position",kind:"scalar",T:1},{no:4,name:"is_moving",kind:"scalar",T:8}]),As=s.makeMessageType("viam.component.motor.v1.IsMovingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),Tc=s.makeMessageType("viam.component.motor.v1.IsMovingResponse",()=>[{no:1,name:"is_moving",kind:"scalar",T:8}]),L_=Object.freeze(Object.defineProperty({__proto__:null,GetPositionRequest:Cs,GetPositionResponse:dc,GetPropertiesRequest:Ds,GetPropertiesResponse:gc,GoForRequest:Os,GoForResponse:rc,GoToRequest:Es,GoToResponse:mc,IsMovingRequest:As,IsMovingResponse:Tc,IsPoweredRequest:Ps,IsPoweredResponse:uc,ResetZeroPositionRequest:ws,ResetZeroPositionResponse:lc,SetPowerRequest:bs,SetPowerResponse:ic,SetRPMRequest:Ms,SetRPMResponse:cc,Status:q_,StopRequest:Ns,StopResponse:pc},Symbol.toStringTag,{value:"Module"})),kc={typeName:"viam.component.motor.v1.MotorService",methods:{setPower:{name:"SetPower",I:bs,O:ic,kind:m.Unary},goFor:{name:"GoFor",I:Os,O:rc,kind:m.Unary},goTo:{name:"GoTo",I:Es,O:mc,kind:m.Unary},setRPM:{name:"SetRPM",I:Ms,O:cc,kind:m.Unary},resetZeroPosition:{name:"ResetZeroPosition",I:ws,O:lc,kind:m.Unary},getPosition:{name:"GetPosition",I:Cs,O:dc,kind:m.Unary},getProperties:{name:"GetProperties",I:Ds,O:gc,kind:m.Unary},stop:{name:"Stop",I:Ns,O:pc,kind:m.Unary},isPowered:{name:"IsPowered",I:Ps,O:uc,kind:m.Unary},isMoving:{name:"IsMoving",I:As,O:Tc,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary}}},Us=s.makeMessageType("viam.component.movementsensor.v1.GetLinearVelocityRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),yc=s.makeMessageType("viam.component.movementsensor.v1.GetLinearVelocityResponse",()=>[{no:1,name:"linear_velocity",kind:"message",T:ue}]),qs=s.makeMessageType("viam.component.movementsensor.v1.GetAngularVelocityRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),vc=s.makeMessageType("viam.component.movementsensor.v1.GetAngularVelocityResponse",()=>[{no:1,name:"angular_velocity",kind:"message",T:ue}]),Ls=s.makeMessageType("viam.component.movementsensor.v1.GetCompassHeadingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),hc=s.makeMessageType("viam.component.movementsensor.v1.GetCompassHeadingResponse",()=>[{no:1,name:"value",kind:"scalar",T:1}]),Gs=s.makeMessageType("viam.component.movementsensor.v1.GetOrientationRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),fc=s.makeMessageType("viam.component.movementsensor.v1.GetOrientationResponse",()=>[{no:1,name:"orientation",kind:"message",T:Ct}]),Bs=s.makeMessageType("viam.component.movementsensor.v1.GetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Rc=s.makeMessageType("viam.component.movementsensor.v1.GetPositionResponse",()=>[{no:1,name:"coordinate",kind:"message",T:He},{no:2,name:"altitude_m",kind:"scalar",T:2}]),Fs=s.makeMessageType("viam.component.movementsensor.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),_c=s.makeMessageType("viam.component.movementsensor.v1.GetPropertiesResponse",()=>[{no:1,name:"linear_velocity_supported",kind:"scalar",T:8},{no:2,name:"angular_velocity_supported",kind:"scalar",T:8},{no:3,name:"orientation_supported",kind:"scalar",T:8},{no:4,name:"position_supported",kind:"scalar",T:8},{no:5,name:"compass_heading_supported",kind:"scalar",T:8},{no:6,name:"linear_acceleration_supported",kind:"scalar",T:8}]),xs=s.makeMessageType("viam.component.movementsensor.v1.GetAccuracyRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Sc=s.makeMessageType("viam.component.movementsensor.v1.GetAccuracyResponse",()=>[{no:1,name:"accuracy",kind:"map",K:9,V:{kind:"scalar",T:2}},{no:2,name:"position_hdop",kind:"scalar",T:2,opt:!0},{no:3,name:"position_vdop",kind:"scalar",T:2,opt:!0},{no:4,name:"position_nmea_gga_fix",kind:"scalar",T:5,opt:!0},{no:5,name:"compass_degrees_error",kind:"scalar",T:2,opt:!0}]),Js=s.makeMessageType("viam.component.movementsensor.v1.GetLinearAccelerationRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Ic=s.makeMessageType("viam.component.movementsensor.v1.GetLinearAccelerationResponse",()=>[{no:1,name:"linear_acceleration",kind:"message",T:ue}]),bc=Object.freeze(Object.defineProperty({__proto__:null,GetAccuracyRequest:xs,GetAccuracyResponse:Sc,GetAngularVelocityRequest:qs,GetAngularVelocityResponse:vc,GetCompassHeadingRequest:Ls,GetCompassHeadingResponse:hc,GetLinearAccelerationRequest:Js,GetLinearAccelerationResponse:Ic,GetLinearVelocityRequest:Us,GetLinearVelocityResponse:yc,GetOrientationRequest:Gs,GetOrientationResponse:fc,GetPositionRequest:Bs,GetPositionResponse:Rc,GetPropertiesRequest:Fs,GetPropertiesResponse:_c},Symbol.toStringTag,{value:"Module"})),Oc={typeName:"viam.component.movementsensor.v1.MovementSensorService",methods:{getLinearVelocity:{name:"GetLinearVelocity",I:Us,O:yc,kind:m.Unary},getAngularVelocity:{name:"GetAngularVelocity",I:qs,O:vc,kind:m.Unary},getCompassHeading:{name:"GetCompassHeading",I:Ls,O:hc,kind:m.Unary},getOrientation:{name:"GetOrientation",I:Gs,O:fc,kind:m.Unary},getPosition:{name:"GetPosition",I:Bs,O:Rc,kind:m.Unary},getProperties:{name:"GetProperties",I:Fs,O:_c,kind:m.Unary},getAccuracy:{name:"GetAccuracy",I:xs,O:Sc,kind:m.Unary},getLinearAcceleration:{name:"GetLinearAcceleration",I:Js,O:Ic,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary},getReadings:{name:"GetReadings",I:an,O:Na,kind:m.Unary}}},zs=s.makeMessageType("viam.component.powersensor.v1.GetVoltageRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Ec=s.makeMessageType("viam.component.powersensor.v1.GetVoltageResponse",()=>[{no:1,name:"volts",kind:"scalar",T:1},{no:2,name:"is_ac",kind:"scalar",T:8}]),Vs=s.makeMessageType("viam.component.powersensor.v1.GetCurrentRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Mc=s.makeMessageType("viam.component.powersensor.v1.GetCurrentResponse",()=>[{no:1,name:"amperes",kind:"scalar",T:1},{no:2,name:"is_ac",kind:"scalar",T:8}]),$s=s.makeMessageType("viam.component.powersensor.v1.GetPowerRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),wc=s.makeMessageType("viam.component.powersensor.v1.GetPowerResponse",()=>[{no:1,name:"watts",kind:"scalar",T:1}]),G_=Object.freeze(Object.defineProperty({__proto__:null,GetCurrentRequest:Vs,GetCurrentResponse:Mc,GetPowerRequest:$s,GetPowerResponse:wc,GetVoltageRequest:zs,GetVoltageResponse:Ec},Symbol.toStringTag,{value:"Module"})),Cc={typeName:"viam.component.powersensor.v1.PowerSensorService",methods:{getVoltage:{name:"GetVoltage",I:zs,O:Ec,kind:m.Unary},getCurrent:{name:"GetCurrent",I:Vs,O:Mc,kind:m.Unary},getPower:{name:"GetPower",I:$s,O:wc,kind:m.Unary},getReadings:{name:"GetReadings",I:an,O:Na,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary}}},Ys=s.makeMessageType("viam.component.servo.v1.MoveRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"angle_deg",kind:"scalar",T:13},{no:99,name:"extra",kind:"message",T:p}]),Nc=s.makeMessageType("viam.component.servo.v1.MoveResponse",[]),Ws=s.makeMessageType("viam.component.servo.v1.GetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Pc=s.makeMessageType("viam.component.servo.v1.GetPositionResponse",()=>[{no:1,name:"position_deg",kind:"scalar",T:13}]),Hs=s.makeMessageType("viam.component.servo.v1.StopRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Dc=s.makeMessageType("viam.component.servo.v1.StopResponse",[]),B_=s.makeMessageType("viam.component.servo.v1.Status",()=>[{no:1,name:"position_deg",kind:"scalar",T:13},{no:2,name:"is_moving",kind:"scalar",T:8}]),js=s.makeMessageType("viam.component.servo.v1.IsMovingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),Ac=s.makeMessageType("viam.component.servo.v1.IsMovingResponse",()=>[{no:1,name:"is_moving",kind:"scalar",T:8}]),F_=Object.freeze(Object.defineProperty({__proto__:null,GetPositionRequest:Ws,GetPositionResponse:Pc,IsMovingRequest:js,IsMovingResponse:Ac,MoveRequest:Ys,MoveResponse:Nc,Status:B_,StopRequest:Hs,StopResponse:Dc},Symbol.toStringTag,{value:"Module"})),Uc={typeName:"viam.component.servo.v1.ServoService",methods:{move:{name:"Move",I:Ys,O:Nc,kind:m.Unary},getPosition:{name:"GetPosition",I:Ws,O:Pc,kind:m.Unary},stop:{name:"Stop",I:Hs,O:Dc,kind:m.Unary},isMoving:{name:"IsMoving",I:js,O:Ac,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary}}},qc=s.makeMessageType("opentelemetry.proto.common.v1.AnyValue",()=>[{no:1,name:"string_value",kind:"scalar",T:9,oneof:"value"},{no:2,name:"bool_value",kind:"scalar",T:8,oneof:"value"},{no:3,name:"int_value",kind:"scalar",T:3,oneof:"value"},{no:4,name:"double_value",kind:"scalar",T:1,oneof:"value"},{no:5,name:"array_value",kind:"message",T:x_,oneof:"value"},{no:6,name:"kvlist_value",kind:"message",T:J_,oneof:"value"},{no:7,name:"bytes_value",kind:"scalar",T:12,oneof:"value"},{no:8,name:"string_value_strindex",kind:"scalar",T:5,oneof:"value"}]),x_=s.makeMessageType("opentelemetry.proto.common.v1.ArrayValue",()=>[{no:1,name:"values",kind:"message",T:qc,repeated:!0}]),J_=s.makeMessageType("opentelemetry.proto.common.v1.KeyValueList",()=>[{no:1,name:"values",kind:"message",T:kn,repeated:!0}]),kn=s.makeMessageType("opentelemetry.proto.common.v1.KeyValue",()=>[{no:1,name:"key",kind:"scalar",T:9},{no:2,name:"value",kind:"message",T:qc},{no:3,name:"key_strindex",kind:"scalar",T:5}]),z_=s.makeMessageType("opentelemetry.proto.common.v1.InstrumentationScope",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:kn,repeated:!0},{no:4,name:"dropped_attributes_count",kind:"scalar",T:13}]),V_=s.makeMessageType("opentelemetry.proto.common.v1.EntityRef",()=>[{no:1,name:"schema_url",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"id_keys",kind:"scalar",T:9,repeated:!0},{no:4,name:"description_keys",kind:"scalar",T:9,repeated:!0}]),$_=s.makeMessageType("opentelemetry.proto.resource.v1.Resource",()=>[{no:1,name:"attributes",kind:"message",T:kn,repeated:!0},{no:2,name:"dropped_attributes_count",kind:"scalar",T:13},{no:3,name:"entity_refs",kind:"message",T:V_,repeated:!0}]),Y_=s.makeMessageType("opentelemetry.proto.trace.v1.ResourceSpans",()=>[{no:1,name:"resource",kind:"message",T:$_},{no:2,name:"scope_spans",kind:"message",T:W_,repeated:!0},{no:3,name:"schema_url",kind:"scalar",T:9}]),W_=s.makeMessageType("opentelemetry.proto.trace.v1.ScopeSpans",()=>[{no:1,name:"scope",kind:"message",T:z_},{no:2,name:"spans",kind:"message",T:H_,repeated:!0},{no:3,name:"schema_url",kind:"scalar",T:9}]),H_=s.makeMessageType("opentelemetry.proto.trace.v1.Span",()=>[{no:1,name:"trace_id",kind:"scalar",T:12},{no:2,name:"span_id",kind:"scalar",T:12},{no:3,name:"trace_state",kind:"scalar",T:9},{no:4,name:"parent_span_id",kind:"scalar",T:12},{no:16,name:"flags",kind:"scalar",T:7},{no:5,name:"name",kind:"scalar",T:9},{no:6,name:"kind",kind:"enum",T:s.getEnumType(j_)},{no:7,name:"start_time_unix_nano",kind:"scalar",T:6},{no:8,name:"end_time_unix_nano",kind:"scalar",T:6},{no:9,name:"attributes",kind:"message",T:kn,repeated:!0},{no:10,name:"dropped_attributes_count",kind:"scalar",T:13},{no:11,name:"events",kind:"message",T:K_,repeated:!0},{no:12,name:"dropped_events_count",kind:"scalar",T:13},{no:13,name:"links",kind:"message",T:X_,repeated:!0},{no:14,name:"dropped_links_count",kind:"scalar",T:13},{no:15,name:"status",kind:"message",T:Q_}]),j_=s.makeEnum("opentelemetry.proto.trace.v1.Span.SpanKind",[{no:0,name:"SPAN_KIND_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"SPAN_KIND_INTERNAL",localName:"INTERNAL"},{no:2,name:"SPAN_KIND_SERVER",localName:"SERVER"},{no:3,name:"SPAN_KIND_CLIENT",localName:"CLIENT"},{no:4,name:"SPAN_KIND_PRODUCER",localName:"PRODUCER"},{no:5,name:"SPAN_KIND_CONSUMER",localName:"CONSUMER"}]),K_=s.makeMessageType("opentelemetry.proto.trace.v1.Span.Event",()=>[{no:1,name:"time_unix_nano",kind:"scalar",T:6},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:kn,repeated:!0},{no:4,name:"dropped_attributes_count",kind:"scalar",T:13}],{localName:"Span_Event"}),X_=s.makeMessageType("opentelemetry.proto.trace.v1.Span.Link",()=>[{no:1,name:"trace_id",kind:"scalar",T:12},{no:2,name:"span_id",kind:"scalar",T:12},{no:3,name:"trace_state",kind:"scalar",T:9},{no:4,name:"attributes",kind:"message",T:kn,repeated:!0},{no:5,name:"dropped_attributes_count",kind:"scalar",T:13},{no:6,name:"flags",kind:"scalar",T:7}],{localName:"Span_Link"}),Q_=s.makeMessageType("opentelemetry.proto.trace.v1.Status",()=>[{no:2,name:"message",kind:"scalar",T:9},{no:3,name:"code",kind:"enum",T:s.getEnumType(Z_)}]),Z_=s.makeEnum("opentelemetry.proto.trace.v1.Status.StatusCode",[{no:0,name:"STATUS_CODE_UNSET",localName:"UNSET"},{no:1,name:"STATUS_CODE_OK",localName:"OK"},{no:2,name:"STATUS_CODE_ERROR",localName:"ERROR"}]),Lc=s.makeEnum("viam.robot.v1.PeerConnectionType",[{no:0,name:"PEER_CONNECTION_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"PEER_CONNECTION_TYPE_GRPC",localName:"GRPC"},{no:2,name:"PEER_CONNECTION_TYPE_WEBRTC",localName:"WEBRTC"}]),Gc=s.makeMessageType("viam.robot.v1.SendTracesRequest",()=>[{no:1,name:"resource_spans",kind:"message",T:Y_,repeated:!0}]),Bc=s.makeMessageType("viam.robot.v1.SendTracesResponse",[]),Fc=s.makeMessageType("viam.robot.v1.TunnelRequest",()=>[{no:1,name:"destination_port",kind:"scalar",T:13},{no:2,name:"data",kind:"scalar",T:12}]),xc=s.makeMessageType("viam.robot.v1.TunnelResponse",()=>[{no:1,name:"data",kind:"scalar",T:12}]),Jc=s.makeMessageType("viam.robot.v1.ListTunnelsRequest",[]),zc=s.makeMessageType("viam.robot.v1.ListTunnelsResponse",()=>[{no:1,name:"tunnels",kind:"message",T:Vc,repeated:!0}]),Vc=s.makeMessageType("viam.robot.v1.Tunnel",()=>[{no:1,name:"port",kind:"scalar",T:13},{no:2,name:"connection_timeout",kind:"message",T:J}]),$c=s.makeMessageType("viam.robot.v1.FrameSystemConfig",()=>[{no:1,name:"frame",kind:"message",T:Fe},{no:2,name:"kinematics",kind:"message",T:p}]),Yc=s.makeMessageType("viam.robot.v1.FrameSystemConfigRequest",()=>[{no:1,name:"supplemental_transforms",kind:"message",T:Fe,repeated:!0}]),Wc=s.makeMessageType("viam.robot.v1.FrameSystemConfigResponse",()=>[{no:1,name:"frame_system_configs",kind:"message",T:$c,repeated:!0}]),Ks=s.makeMessageType("viam.robot.v1.TransformPoseRequest",()=>[{no:1,name:"source",kind:"message",T:We},{no:2,name:"destination",kind:"scalar",T:9},{no:3,name:"supplemental_transforms",kind:"message",T:Fe,repeated:!0}]),Hc=s.makeMessageType("viam.robot.v1.TransformPoseResponse",()=>[{no:1,name:"pose",kind:"message",T:We}]),Xs=s.makeMessageType("viam.robot.v1.TransformPCDRequest",()=>[{no:1,name:"point_cloud_pcd",kind:"scalar",T:12},{no:2,name:"source",kind:"scalar",T:9},{no:3,name:"destination",kind:"scalar",T:9}]),jc=s.makeMessageType("viam.robot.v1.TransformPCDResponse",()=>[{no:1,name:"point_cloud_pcd",kind:"scalar",T:12}]),Kc=s.makeMessageType("viam.robot.v1.ResourceNamesRequest",[]),Xc=s.makeMessageType("viam.robot.v1.ResourceNamesResponse",()=>[{no:1,name:"resources",kind:"message",T:z,repeated:!0}]),Qc=s.makeMessageType("viam.robot.v1.ResourceRPCSubtype",()=>[{no:1,name:"subtype",kind:"message",T:z},{no:2,name:"proto_service",kind:"scalar",T:9}]),Zc=s.makeMessageType("viam.robot.v1.ResourceRPCSubtypesRequest",[]),el=s.makeMessageType("viam.robot.v1.ResourceRPCSubtypesResponse",()=>[{no:1,name:"resource_rpc_subtypes",kind:"message",T:Qc,repeated:!0}]),nl=s.makeMessageType("viam.robot.v1.Operation",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"method",kind:"scalar",T:9},{no:3,name:"arguments",kind:"message",T:p},{no:4,name:"started",kind:"message",T:S},{no:5,name:"session_id",kind:"scalar",T:9,opt:!0}]),al=s.makeMessageType("viam.robot.v1.GetOperationsRequest",[]),tl=s.makeMessageType("viam.robot.v1.GetOperationsResponse",()=>[{no:1,name:"operations",kind:"message",T:nl,repeated:!0}]),sl=s.makeMessageType("viam.robot.v1.CancelOperationRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),ol=s.makeMessageType("viam.robot.v1.CancelOperationResponse",[]),il=s.makeMessageType("viam.robot.v1.BlockForOperationRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),rl=s.makeMessageType("viam.robot.v1.BlockForOperationResponse",[]),ml=s.makeMessageType("viam.robot.v1.PeerConnectionInfo",()=>[{no:1,name:"type",kind:"enum",T:s.getEnumType(Lc)},{no:2,name:"remote_address",kind:"scalar",T:9,opt:!0},{no:3,name:"local_address",kind:"scalar",T:9,opt:!0}]),cl=s.makeMessageType("viam.robot.v1.Session",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"peer_connection_info",kind:"message",T:ml,opt:!0}]),ll=s.makeMessageType("viam.robot.v1.GetSessionsRequest",[]),dl=s.makeMessageType("viam.robot.v1.GetSessionsResponse",()=>[{no:1,name:"sessions",kind:"message",T:cl,repeated:!0}]),pl=s.makeMessageType("viam.robot.v1.ModuleModel",()=>[{no:1,name:"module_name",kind:"scalar",T:9},{no:2,name:"model",kind:"scalar",T:9},{no:3,name:"api",kind:"scalar",T:9},{no:4,name:"from_local_module",kind:"scalar",T:8}]),Qs=s.makeMessageType("viam.robot.v1.GetModelsFromModulesRequest",[]),ul=s.makeMessageType("viam.robot.v1.GetModelsFromModulesResponse",()=>[{no:1,name:"models",kind:"message",T:pl,repeated:!0}]),Zs=s.makeMessageType("viam.robot.v1.Status",()=>[{no:1,name:"name",kind:"message",T:z},{no:2,name:"status",kind:"message",T:p},{no:3,name:"last_reconfigured",kind:"message",T:S}]),gl=s.makeMessageType("viam.robot.v1.GetStatusRequest",()=>[{no:1,name:"resource_names",kind:"message",T:z,repeated:!0}]),Tl=s.makeMessageType("viam.robot.v1.GetStatusResponse",()=>[{no:1,name:"status",kind:"message",T:Zs,repeated:!0}]),kl=s.makeMessageType("viam.robot.v1.StreamStatusRequest",()=>[{no:1,name:"resource_names",kind:"message",T:z,repeated:!0},{no:2,name:"every",kind:"message",T:J}]),yl=s.makeMessageType("viam.robot.v1.StreamStatusResponse",()=>[{no:1,name:"status",kind:"message",T:Zs,repeated:!0}]),vl=s.makeMessageType("viam.robot.v1.StopExtraParameters",()=>[{no:1,name:"name",kind:"message",T:z},{no:2,name:"params",kind:"message",T:p}]),hl=s.makeMessageType("viam.robot.v1.StopAllRequest",()=>[{no:99,name:"extra",kind:"message",T:vl,repeated:!0}]),fl=s.makeMessageType("viam.robot.v1.StopAllResponse",[]),eo=s.makeMessageType("viam.robot.v1.StartSessionRequest",()=>[{no:1,name:"resume",kind:"scalar",T:9}]),Rl=s.makeMessageType("viam.robot.v1.StartSessionResponse",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"heartbeat_window",kind:"message",T:J}]),no=s.makeMessageType("viam.robot.v1.SendSessionHeartbeatRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),_l=s.makeMessageType("viam.robot.v1.SendSessionHeartbeatResponse",[]),Sl=s.makeMessageType("viam.robot.v1.LogRequest",()=>[{no:1,name:"logs",kind:"message",T:Un,repeated:!0}]),Il=s.makeMessageType("viam.robot.v1.LogResponse",[]),bl=s.makeMessageType("viam.robot.v1.GetCloudMetadataRequest",[]),ao=s.makeMessageType("viam.robot.v1.GetCloudMetadataResponse",()=>[{no:2,name:"primary_org_id",kind:"scalar",T:9},{no:3,name:"location_id",kind:"scalar",T:9},{no:4,name:"machine_id",kind:"scalar",T:9},{no:5,name:"machine_part_id",kind:"scalar",T:9}]),to=s.makeMessageType("viam.robot.v1.RestartModuleRequest",()=>[{no:1,name:"module_id",kind:"scalar",T:9,oneof:"id_or_name"},{no:2,name:"module_name",kind:"scalar",T:9,oneof:"id_or_name"}]),Ol=s.makeMessageType("viam.robot.v1.RestartModuleResponse",[]),El=s.makeMessageType("viam.robot.v1.ShutdownRequest",[]),Ml=s.makeMessageType("viam.robot.v1.ShutdownResponse",[]),wl=s.makeMessageType("viam.robot.v1.GetMachineStatusRequest",[]),Cl=s.makeMessageType("viam.robot.v1.GetMachineStatusResponse",()=>[{no:1,name:"resources",kind:"message",T:Dl,repeated:!0},{no:2,name:"config",kind:"message",T:Ul},{no:3,name:"state",kind:"enum",T:s.getEnumType(Nl)},{no:4,name:"job_statuses",kind:"message",T:Pl,repeated:!0}]),Nl=s.makeEnum("viam.robot.v1.GetMachineStatusResponse.State",[{no:0,name:"STATE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"STATE_INITIALIZING",localName:"INITIALIZING"},{no:2,name:"STATE_RUNNING",localName:"RUNNING"}]),Pl=s.makeMessageType("viam.robot.v1.JobStatus",()=>[{no:1,name:"job_name",kind:"scalar",T:9},{no:2,name:"recent_successful_runs",kind:"message",T:S,repeated:!0},{no:3,name:"recent_failed_runs",kind:"message",T:S,repeated:!0}]),Dl=s.makeMessageType("viam.robot.v1.ResourceStatus",()=>[{no:1,name:"name",kind:"message",T:z},{no:2,name:"state",kind:"enum",T:s.getEnumType(Al)},{no:3,name:"last_updated",kind:"message",T:S},{no:4,name:"revision",kind:"scalar",T:9},{no:5,name:"error",kind:"scalar",T:9},{no:6,name:"cloud_metadata",kind:"message",T:ao,opt:!0}]),Al=s.makeEnum("viam.robot.v1.ResourceStatus.State",[{no:0,name:"STATE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"STATE_UNCONFIGURED",localName:"UNCONFIGURED"},{no:2,name:"STATE_CONFIGURING",localName:"CONFIGURING"},{no:3,name:"STATE_READY",localName:"READY"},{no:4,name:"STATE_REMOVING",localName:"REMOVING"},{no:5,name:"STATE_UNHEALTHY",localName:"UNHEALTHY"}]),Ul=s.makeMessageType("viam.robot.v1.ConfigStatus",()=>[{no:1,name:"revision",kind:"scalar",T:9},{no:2,name:"last_updated",kind:"message",T:S}]),ql=s.makeMessageType("viam.robot.v1.GetVersionRequest",[]),Ll=s.makeMessageType("viam.robot.v1.GetVersionResponse",()=>[{no:1,name:"platform",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"api_version",kind:"scalar",T:9}]),so=s.makeMessageType("viam.robot.v1.GetPoseRequest",()=>[{no:1,name:"component_name",kind:"scalar",T:9},{no:2,name:"destination_frame",kind:"scalar",T:9},{no:3,name:"supplemental_transforms",kind:"message",T:Fe,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),Gl=s.makeMessageType("viam.robot.v1.GetPoseResponse",()=>[{no:1,name:"pose",kind:"message",T:We}]),eS=Object.freeze(Object.defineProperty({__proto__:null,BlockForOperationRequest:il,BlockForOperationResponse:rl,CancelOperationRequest:sl,CancelOperationResponse:ol,ConfigStatus:Ul,FrameSystemConfig:$c,FrameSystemConfigRequest:Yc,FrameSystemConfigResponse:Wc,GetCloudMetadataRequest:bl,GetCloudMetadataResponse:ao,GetMachineStatusRequest:wl,GetMachineStatusResponse:Cl,GetMachineStatusResponse_State:Nl,GetModelsFromModulesRequest:Qs,GetModelsFromModulesResponse:ul,GetOperationsRequest:al,GetOperationsResponse:tl,GetPoseRequest:so,GetPoseResponse:Gl,GetSessionsRequest:ll,GetSessionsResponse:dl,GetStatusRequest:gl,GetStatusResponse:Tl,GetVersionRequest:ql,GetVersionResponse:Ll,JobStatus:Pl,ListTunnelsRequest:Jc,ListTunnelsResponse:zc,LogRequest:Sl,LogResponse:Il,ModuleModel:pl,Operation:nl,PeerConnectionInfo:ml,PeerConnectionType:Lc,ResourceNamesRequest:Kc,ResourceNamesResponse:Xc,ResourceRPCSubtype:Qc,ResourceRPCSubtypesRequest:Zc,ResourceRPCSubtypesResponse:el,ResourceStatus:Dl,ResourceStatus_State:Al,RestartModuleRequest:to,RestartModuleResponse:Ol,SendSessionHeartbeatRequest:no,SendSessionHeartbeatResponse:_l,SendTracesRequest:Gc,SendTracesResponse:Bc,Session:cl,ShutdownRequest:El,ShutdownResponse:Ml,StartSessionRequest:eo,StartSessionResponse:Rl,Status:Zs,StopAllRequest:hl,StopAllResponse:fl,StopExtraParameters:vl,StreamStatusRequest:kl,StreamStatusResponse:yl,TransformPCDRequest:Xs,TransformPCDResponse:jc,TransformPoseRequest:Ks,TransformPoseResponse:Hc,Tunnel:Vc,TunnelRequest:Fc,TunnelResponse:xc},Symbol.toStringTag,{value:"Module"})),oo={typeName:"viam.robot.v1.RobotService",methods:{getOperations:{name:"GetOperations",I:al,O:tl,kind:m.Unary},getSessions:{name:"GetSessions",I:ll,O:dl,kind:m.Unary},resourceNames:{name:"ResourceNames",I:Kc,O:Xc,kind:m.Unary},resourceRPCSubtypes:{name:"ResourceRPCSubtypes",I:Zc,O:el,kind:m.Unary},cancelOperation:{name:"CancelOperation",I:sl,O:ol,kind:m.Unary},blockForOperation:{name:"BlockForOperation",I:il,O:rl,kind:m.Unary},getModelsFromModules:{name:"GetModelsFromModules",I:Qs,O:ul,kind:m.Unary},getStatus:{name:"GetStatus",I:gl,O:Tl,kind:m.Unary},streamStatus:{name:"StreamStatus",I:kl,O:yl,kind:m.ServerStreaming},stopAll:{name:"StopAll",I:hl,O:fl,kind:m.Unary},startSession:{name:"StartSession",I:eo,O:Rl,kind:m.Unary},sendSessionHeartbeat:{name:"SendSessionHeartbeat",I:no,O:_l,kind:m.Unary},log:{name:"Log",I:Sl,O:Il,kind:m.Unary},getCloudMetadata:{name:"GetCloudMetadata",I:bl,O:ao,kind:m.Unary},restartModule:{name:"RestartModule",I:to,O:Ol,kind:m.Unary},shutdown:{name:"Shutdown",I:El,O:Ml,kind:m.Unary},getMachineStatus:{name:"GetMachineStatus",I:wl,O:Cl,kind:m.Unary},getVersion:{name:"GetVersion",I:ql,O:Ll,kind:m.Unary},tunnel:{name:"Tunnel",I:Fc,O:xc,kind:m.BiDiStreaming},listTunnels:{name:"ListTunnels",I:Jc,O:zc,kind:m.Unary},frameSystemConfig:{name:"FrameSystemConfig",I:Yc,O:Wc,kind:m.Unary},getPose:{name:"GetPose",I:so,O:Gl,kind:m.Unary},transformPose:{name:"TransformPose",I:Ks,O:Hc,kind:m.Unary},transformPCD:{name:"TransformPCD",I:Xs,O:jc,kind:m.Unary},sendTraces:{name:"SendTraces",I:Gc,O:Bc,kind:m.Unary}}},io=s.makeEnum("viam.app.v1.CredentialsType",[{no:0,name:"CREDENTIALS_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"CREDENTIALS_TYPE_INTERNAL",localName:"INTERNAL"},{no:2,name:"CREDENTIALS_TYPE_API_KEY",localName:"API_KEY"},{no:3,name:"CREDENTIALS_TYPE_ROBOT_SECRET",localName:"ROBOT_SECRET"},{no:4,name:"CREDENTIALS_TYPE_ROBOT_LOCATION_SECRET",localName:"ROBOT_LOCATION_SECRET"}]),Bl=s.makeMessageType("viam.app.v1.RobotConfig",()=>[{no:1,name:"cloud",kind:"message",T:Vl},{no:2,name:"remotes",kind:"message",T:md,repeated:!0},{no:3,name:"components",kind:"message",T:ro,repeated:!0},{no:4,name:"processes",kind:"message",T:$l,repeated:!0},{no:5,name:"services",kind:"message",T:Yl,repeated:!0},{no:6,name:"network",kind:"message",T:Wl,opt:!0},{no:7,name:"auth",kind:"message",T:Kl,opt:!0},{no:8,name:"debug",kind:"scalar",T:8,opt:!0},{no:9,name:"modules",kind:"message",T:pd,repeated:!0},{no:10,name:"disable_partial_start",kind:"scalar",T:8,opt:!0},{no:11,name:"packages",kind:"message",T:ud,repeated:!0},{no:12,name:"overwrite_fragment_status",kind:"message",T:Da,repeated:!0},{no:13,name:"enable_web_profile",kind:"scalar",T:8},{no:14,name:"log",kind:"message",T:Fl,repeated:!0},{no:15,name:"revision",kind:"scalar",T:9},{no:16,name:"maintenance",kind:"message",T:gd,opt:!0},{no:17,name:"disable_log_deduplication",kind:"scalar",T:8},{no:18,name:"jobs",kind:"message",T:xl,repeated:!0},{no:19,name:"tracing",kind:"message",T:Jl,opt:!0}]),Fl=s.makeMessageType("viam.app.v1.LogPatternConfig",()=>[{no:1,name:"pattern",kind:"scalar",T:9},{no:2,name:"level",kind:"scalar",T:9}]),xl=s.makeMessageType("viam.app.v1.JobConfig",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"schedule",kind:"scalar",T:9},{no:3,name:"resource",kind:"scalar",T:9},{no:4,name:"method",kind:"scalar",T:9},{no:5,name:"command",kind:"message",T:p},{no:6,name:"log_configuration",kind:"message",T:Ua}]),Jl=s.makeMessageType("viam.app.v1.TracingConfig",()=>[{no:1,name:"enabled",kind:"scalar",T:8},{no:2,name:"disk",kind:"scalar",T:8},{no:3,name:"console",kind:"scalar",T:8},{no:4,name:"otlp_endpoint",kind:"scalar",T:9}]),zl=s.makeMessageType("viam.app.v1.LocationSecret",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"secret",kind:"scalar",T:9}]),Da=s.makeMessageType("viam.app.v1.AppValidationStatus",()=>[{no:1,name:"error",kind:"scalar",T:9}]),Vl=s.makeMessageType("viam.app.v1.CloudConfig",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"fqdn",kind:"scalar",T:9},{no:3,name:"local_fqdn",kind:"scalar",T:9},{no:4,name:"managed_by",kind:"scalar",T:9},{no:5,name:"signaling_address",kind:"scalar",T:9},{no:6,name:"signaling_insecure",kind:"scalar",T:8},{no:7,name:"location_secret",kind:"scalar",T:9},{no:8,name:"secret",kind:"scalar",T:9},{no:9,name:"location_secrets",kind:"message",T:zl,repeated:!0},{no:10,name:"primary_org_id",kind:"scalar",T:9},{no:11,name:"location_id",kind:"scalar",T:9},{no:12,name:"machine_id",kind:"scalar",T:9}]),ro=s.makeMessageType("viam.app.v1.ComponentConfig",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"namespace",kind:"scalar",T:9},{no:3,name:"type",kind:"scalar",T:9},{no:4,name:"model",kind:"scalar",T:9},{no:5,name:"frame",kind:"message",T:mo},{no:6,name:"depends_on",kind:"scalar",T:9,repeated:!0},{no:7,name:"service_configs",kind:"message",T:Aa,repeated:!0},{no:8,name:"attributes",kind:"message",T:p},{no:9,name:"api",kind:"scalar",T:9},{no:10,name:"log_configuration",kind:"message",T:Ua}]),Aa=s.makeMessageType("viam.app.v1.ResourceLevelServiceConfig",()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"attributes",kind:"message",T:p}]),$l=s.makeMessageType("viam.app.v1.ProcessConfig",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"args",kind:"scalar",T:9,repeated:!0},{no:4,name:"cwd",kind:"scalar",T:9},{no:5,name:"one_shot",kind:"scalar",T:8},{no:6,name:"log",kind:"scalar",T:8},{no:7,name:"stop_signal",kind:"scalar",T:5},{no:8,name:"stop_timeout",kind:"message",T:J},{no:9,name:"env",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:10,name:"username",kind:"scalar",T:9}]),Yl=s.makeMessageType("viam.app.v1.ServiceConfig",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"namespace",kind:"scalar",T:9},{no:3,name:"type",kind:"scalar",T:9},{no:4,name:"attributes",kind:"message",T:p},{no:5,name:"depends_on",kind:"scalar",T:9,repeated:!0},{no:6,name:"model",kind:"scalar",T:9},{no:9,name:"api",kind:"scalar",T:9},{no:10,name:"service_configs",kind:"message",T:Aa,repeated:!0},{no:11,name:"log_configuration",kind:"message",T:Ua}]),Wl=s.makeMessageType("viam.app.v1.NetworkConfig",()=>[{no:1,name:"fqdn",kind:"scalar",T:9},{no:2,name:"bind_address",kind:"scalar",T:9},{no:3,name:"tls_cert_file",kind:"scalar",T:9},{no:4,name:"tls_key_file",kind:"scalar",T:9},{no:5,name:"sessions",kind:"message",T:Hl},{no:6,name:"traffic_tunnel_endpoints",kind:"message",T:jl,repeated:!0},{no:7,name:"no_tls",kind:"scalar",T:8}]),Hl=s.makeMessageType("viam.app.v1.SessionsConfig",()=>[{no:1,name:"heartbeat_window",kind:"message",T:J}]),jl=s.makeMessageType("viam.app.v1.TrafficTunnelEndpoint",()=>[{no:1,name:"port",kind:"scalar",T:5},{no:2,name:"connection_timeout",kind:"message",T:J}]),Kl=s.makeMessageType("viam.app.v1.AuthConfig",()=>[{no:1,name:"handlers",kind:"message",T:Zl,repeated:!0},{no:2,name:"tls_auth_entities",kind:"scalar",T:9,repeated:!0},{no:3,name:"external_auth_config",kind:"message",T:Ql,opt:!0}]),Xl=s.makeMessageType("viam.app.v1.JWKSFile",()=>[{no:1,name:"json",kind:"message",T:p}]),Ql=s.makeMessageType("viam.app.v1.ExternalAuthConfig",()=>[{no:1,name:"jwks",kind:"message",T:Xl}]),Zl=s.makeMessageType("viam.app.v1.AuthHandlerConfig",()=>[{no:1,name:"type",kind:"enum",T:s.getEnumType(io)},{no:5,name:"config",kind:"message",T:p}]),mo=s.makeMessageType("viam.app.v1.Frame",()=>[{no:1,name:"parent",kind:"scalar",T:9},{no:2,name:"translation",kind:"message",T:ed},{no:3,name:"orientation",kind:"message",T:nd},{no:4,name:"geometry",kind:"message",T:nn}]),Ua=s.makeMessageType("viam.app.v1.LogConfiguration",()=>[{no:1,name:"level",kind:"scalar",T:9}]),ed=s.makeMessageType("viam.app.v1.Translation",()=>[{no:1,name:"x",kind:"scalar",T:1},{no:2,name:"y",kind:"scalar",T:1},{no:3,name:"z",kind:"scalar",T:1}]),nd=s.makeMessageType("viam.app.v1.Orientation",()=>[{no:1,name:"no_orientation",kind:"message",T:ad,oneof:"type"},{no:2,name:"vector_radians",kind:"message",T:td,oneof:"type"},{no:3,name:"vector_degrees",kind:"message",T:sd,oneof:"type"},{no:4,name:"euler_angles",kind:"message",T:od,oneof:"type"},{no:5,name:"axis_angles",kind:"message",T:id,oneof:"type"},{no:6,name:"quaternion",kind:"message",T:rd,oneof:"type"}]),ad=s.makeMessageType("viam.app.v1.Orientation.NoOrientation",[],{localName:"Orientation_NoOrientation"}),td=s.makeMessageType("viam.app.v1.Orientation.OrientationVectorRadians",()=>[{no:1,name:"theta",kind:"scalar",T:1},{no:2,name:"x",kind:"scalar",T:1},{no:3,name:"y",kind:"scalar",T:1},{no:4,name:"z",kind:"scalar",T:1}],{localName:"Orientation_OrientationVectorRadians"}),sd=s.makeMessageType("viam.app.v1.Orientation.OrientationVectorDegrees",()=>[{no:1,name:"theta",kind:"scalar",T:1},{no:2,name:"x",kind:"scalar",T:1},{no:3,name:"y",kind:"scalar",T:1},{no:4,name:"z",kind:"scalar",T:1}],{localName:"Orientation_OrientationVectorDegrees"}),od=s.makeMessageType("viam.app.v1.Orientation.EulerAngles",()=>[{no:1,name:"roll",kind:"scalar",T:1},{no:2,name:"pitch",kind:"scalar",T:1},{no:3,name:"yaw",kind:"scalar",T:1}],{localName:"Orientation_EulerAngles"}),id=s.makeMessageType("viam.app.v1.Orientation.AxisAngles",()=>[{no:1,name:"theta",kind:"scalar",T:1},{no:2,name:"x",kind:"scalar",T:1},{no:3,name:"y",kind:"scalar",T:1},{no:4,name:"z",kind:"scalar",T:1}],{localName:"Orientation_AxisAngles"}),rd=s.makeMessageType("viam.app.v1.Orientation.Quaternion",()=>[{no:1,name:"w",kind:"scalar",T:1},{no:2,name:"x",kind:"scalar",T:1},{no:3,name:"y",kind:"scalar",T:1},{no:4,name:"z",kind:"scalar",T:1}],{localName:"Orientation_Quaternion"}),md=s.makeMessageType("viam.app.v1.RemoteConfig",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"address",kind:"scalar",T:9},{no:3,name:"frame",kind:"message",T:mo},{no:4,name:"auth",kind:"message",T:cd},{no:5,name:"managed_by",kind:"scalar",T:9},{no:6,name:"insecure",kind:"scalar",T:8},{no:7,name:"connection_check_interval",kind:"message",T:J},{no:8,name:"reconnect_interval",kind:"message",T:J},{no:9,name:"service_configs",kind:"message",T:Aa,repeated:!0},{no:10,name:"secret",kind:"scalar",T:9},{no:11,name:"prefix",kind:"scalar",T:9}]),cd=s.makeMessageType("viam.app.v1.RemoteAuth",()=>[{no:1,name:"credentials",kind:"message",T:ld},{no:2,name:"entity",kind:"scalar",T:9}]),ld=s.makeMessageType("viam.app.v1.RemoteAuth.Credentials",()=>[{no:1,name:"type",kind:"enum",T:s.getEnumType(io)},{no:2,name:"payload",kind:"scalar",T:9}],{localName:"RemoteAuth_Credentials"}),dd=s.makeMessageType("viam.app.v1.AgentInfo",()=>[{no:1,name:"host",kind:"scalar",T:9},{no:2,name:"os",kind:"scalar",T:9},{no:3,name:"ips",kind:"scalar",T:9,repeated:!0},{no:4,name:"version",kind:"scalar",T:9},{no:5,name:"git_revision",kind:"scalar",T:9},{no:6,name:"platform",kind:"scalar",T:9,opt:!0},{no:7,name:"platform_tags",kind:"scalar",T:9,repeated:!0}]),nS=s.makeMessageType("viam.app.v1.ConfigRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"agent_info",kind:"message",T:dd,opt:!0}]),aS=s.makeMessageType("viam.app.v1.ConfigResponse",()=>[{no:1,name:"config",kind:"message",T:Bl}]),tS=s.makeMessageType("viam.app.v1.CertificateRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),sS=s.makeMessageType("viam.app.v1.CertificateResponse",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"tls_certificate",kind:"scalar",T:9},{no:3,name:"tls_private_key",kind:"scalar",T:9}]),oS=s.makeMessageType("viam.app.v1.LogRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"logs",kind:"message",T:Un,repeated:!0}]),iS=s.makeMessageType("viam.app.v1.LogResponse",[]),rS=s.makeMessageType("viam.app.v1.NeedsRestartRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),mS=s.makeMessageType("viam.app.v1.NeedsRestartResponse",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"must_restart",kind:"scalar",T:8},{no:3,name:"restart_check_interval",kind:"message",T:J}]),pd=s.makeMessageType("viam.app.v1.ModuleConfig",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"path",kind:"scalar",T:9},{no:3,name:"log_level",kind:"scalar",T:9},{no:4,name:"type",kind:"scalar",T:9},{no:5,name:"module_id",kind:"scalar",T:9},{no:6,name:"env",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:7,name:"status",kind:"message",T:Da},{no:8,name:"first_run_timeout",kind:"message",T:J},{no:9,name:"tcp_mode",kind:"scalar",T:8}]),ud=s.makeMessageType("viam.app.v1.PackageConfig",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"package",kind:"scalar",T:9},{no:3,name:"version",kind:"scalar",T:9},{no:4,name:"type",kind:"scalar",T:9},{no:5,name:"status",kind:"message",T:Da}]),gd=s.makeMessageType("viam.app.v1.MaintenanceConfig",()=>[{no:1,name:"sensor_name",kind:"message",T:z},{no:2,name:"maintenance_allowed_key",kind:"scalar",T:9}]),cS=Object.freeze(Object.defineProperty({__proto__:null,AgentInfo:dd,AppValidationStatus:Da,AuthConfig:Kl,AuthHandlerConfig:Zl,CertificateRequest:tS,CertificateResponse:sS,CloudConfig:Vl,ComponentConfig:ro,ConfigRequest:nS,ConfigResponse:aS,CredentialsType:io,ExternalAuthConfig:Ql,Frame:mo,JWKSFile:Xl,JobConfig:xl,LocationSecret:zl,LogConfiguration:Ua,LogPatternConfig:Fl,LogRequest:oS,LogResponse:iS,MaintenanceConfig:gd,ModuleConfig:pd,NeedsRestartRequest:rS,NeedsRestartResponse:mS,NetworkConfig:Wl,Orientation:nd,Orientation_AxisAngles:id,Orientation_EulerAngles:od,Orientation_NoOrientation:ad,Orientation_OrientationVectorDegrees:sd,Orientation_OrientationVectorRadians:td,Orientation_Quaternion:rd,PackageConfig:ud,ProcessConfig:$l,RemoteAuth:cd,RemoteAuth_Credentials:ld,RemoteConfig:md,ResourceLevelServiceConfig:Aa,RobotConfig:Bl,ServiceConfig:Yl,SessionsConfig:Hl,TracingConfig:Jl,TrafficTunnelEndpoint:jl,Translation:ed},Symbol.toStringTag,{value:"Module"})),co=s.makeMessageType("viam.service.discovery.v1.DiscoverResourcesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Td=s.makeMessageType("viam.service.discovery.v1.DiscoverResourcesResponse",()=>[{no:1,name:"discoveries",kind:"message",T:ro,repeated:!0}]),lS=Object.freeze(Object.defineProperty({__proto__:null,DiscoverResourcesRequest:co,DiscoverResourcesResponse:Td},Symbol.toStringTag,{value:"Module"})),kd={typeName:"viam.service.discovery.v1.DiscoveryService",methods:{discoverResources:{name:"DiscoverResources",I:co,O:Td,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary}}},yd=s.makeEnum("viam.service.motion.v1.PlanState",[{no:0,name:"PLAN_STATE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"PLAN_STATE_IN_PROGRESS",localName:"IN_PROGRESS"},{no:2,name:"PLAN_STATE_STOPPED",localName:"STOPPED"},{no:3,name:"PLAN_STATE_SUCCEEDED",localName:"SUCCEEDED"},{no:4,name:"PLAN_STATE_FAILED",localName:"FAILED"}]),lo=s.makeMessageType("viam.service.motion.v1.MoveRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"destination",kind:"message",T:We},{no:3,name:"component_name_deprecated",kind:"message",T:z},{no:4,name:"world_state",kind:"message",T:Yr,opt:!0},{no:5,name:"constraints",kind:"message",T:Od,opt:!0},{no:6,name:"component_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),vd=s.makeMessageType("viam.service.motion.v1.MoveResponse",()=>[{no:1,name:"success",kind:"scalar",T:8}]),po=s.makeMessageType("viam.service.motion.v1.MoveOnMapRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"destination",kind:"message",T:Be},{no:3,name:"component_name_deprecated",kind:"message",T:z},{no:4,name:"slam_service_name_deprecated",kind:"message",T:z},{no:5,name:"motion_configuration",kind:"message",T:uo,opt:!0},{no:6,name:"obstacles",kind:"message",T:nn,repeated:!0},{no:7,name:"component_name",kind:"scalar",T:9},{no:8,name:"slam_service_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),hd=s.makeMessageType("viam.service.motion.v1.MoveOnMapResponse",()=>[{no:1,name:"execution_id",kind:"scalar",T:9}]),fd=s.makeMessageType("viam.service.motion.v1.ObstacleDetector",()=>[{no:1,name:"vision_service_deprecated",kind:"message",T:z},{no:2,name:"camera_deprecated",kind:"message",T:z},{no:3,name:"vision_service",kind:"scalar",T:9},{no:4,name:"camera",kind:"scalar",T:9}]),uo=s.makeMessageType("viam.service.motion.v1.MotionConfiguration",()=>[{no:1,name:"obstacle_detectors",kind:"message",T:fd,repeated:!0},{no:2,name:"position_polling_frequency_hz",kind:"scalar",T:1,opt:!0},{no:3,name:"obstacle_polling_frequency_hz",kind:"scalar",T:1,opt:!0},{no:4,name:"plan_deviation_m",kind:"scalar",T:1,opt:!0},{no:5,name:"linear_m_per_sec",kind:"scalar",T:1,opt:!0},{no:6,name:"angular_degs_per_sec",kind:"scalar",T:1,opt:!0}]),go=s.makeMessageType("viam.service.motion.v1.MoveOnGlobeRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"destination",kind:"message",T:He},{no:3,name:"heading",kind:"scalar",T:1,opt:!0},{no:4,name:"component_name_deprecated",kind:"message",T:z},{no:5,name:"movement_sensor_name_deprecated",kind:"message",T:z},{no:6,name:"obstacles",kind:"message",T:wa,repeated:!0},{no:7,name:"motion_configuration",kind:"message",T:uo,opt:!0},{no:8,name:"bounding_regions",kind:"message",T:wa,repeated:!0},{no:9,name:"component_name",kind:"scalar",T:9},{no:10,name:"movement_sensor_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Rd=s.makeMessageType("viam.service.motion.v1.MoveOnGlobeResponse",()=>[{no:1,name:"execution_id",kind:"scalar",T:9}]),To=s.makeMessageType("viam.service.motion.v1.GetPoseRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"component_name_deprecated",kind:"message",T:z},{no:3,name:"destination_frame",kind:"scalar",T:9},{no:4,name:"supplemental_transforms",kind:"message",T:Fe,repeated:!0},{no:5,name:"component_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),_d=s.makeMessageType("viam.service.motion.v1.GetPoseResponse",()=>[{no:1,name:"pose",kind:"message",T:We}]),ko=s.makeMessageType("viam.service.motion.v1.StopPlanRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"component_name_deprecated",kind:"message",T:z},{no:3,name:"component_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Sd=s.makeMessageType("viam.service.motion.v1.StopPlanResponse",[]),yo=s.makeMessageType("viam.service.motion.v1.ListPlanStatusesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"only_active_plans",kind:"scalar",T:8},{no:99,name:"extra",kind:"message",T:p}]),Id=s.makeMessageType("viam.service.motion.v1.ListPlanStatusesResponse",()=>[{no:1,name:"plan_statuses_with_ids",kind:"message",T:Pd,repeated:!0}]),vo=s.makeMessageType("viam.service.motion.v1.GetPlanRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"component_name_deprecated",kind:"message",T:z},{no:3,name:"last_plan_only",kind:"scalar",T:8},{no:4,name:"execution_id",kind:"scalar",T:9,opt:!0},{no:5,name:"component_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),bd=s.makeMessageType("viam.service.motion.v1.GetPlanResponse",()=>[{no:1,name:"current_plan_with_status",kind:"message",T:ho},{no:2,name:"replan_history",kind:"message",T:ho,repeated:!0}]),Od=s.makeMessageType("viam.service.motion.v1.Constraints",()=>[{no:1,name:"linear_constraint",kind:"message",T:Ed,repeated:!0},{no:2,name:"orientation_constraint",kind:"message",T:wd,repeated:!0},{no:3,name:"collision_specification",kind:"message",T:Cd,repeated:!0},{no:4,name:"pseudolinear_constraint",kind:"message",T:Md,repeated:!0}]),Ed=s.makeMessageType("viam.service.motion.v1.LinearConstraint",()=>[{no:1,name:"line_tolerance_mm",kind:"scalar",T:2,opt:!0},{no:2,name:"orientation_tolerance_degs",kind:"scalar",T:2,opt:!0}]),Md=s.makeMessageType("viam.service.motion.v1.PseudolinearConstraint",()=>[{no:1,name:"line_tolerance_factor",kind:"scalar",T:2,opt:!0},{no:2,name:"orientation_tolerance_factor",kind:"scalar",T:2,opt:!0}]),wd=s.makeMessageType("viam.service.motion.v1.OrientationConstraint",()=>[{no:1,name:"orientation_tolerance_degs",kind:"scalar",T:2,opt:!0}]),Cd=s.makeMessageType("viam.service.motion.v1.CollisionSpecification",()=>[{no:1,name:"allows",kind:"message",T:Nd,repeated:!0}]),Nd=s.makeMessageType("viam.service.motion.v1.CollisionSpecification.AllowedFrameCollisions",()=>[{no:1,name:"frame1",kind:"scalar",T:9},{no:2,name:"frame2",kind:"scalar",T:9}],{localName:"CollisionSpecification_AllowedFrameCollisions"}),ho=s.makeMessageType("viam.service.motion.v1.PlanWithStatus",()=>[{no:1,name:"plan",kind:"message",T:Dd},{no:2,name:"status",kind:"message",T:qa},{no:3,name:"status_history",kind:"message",T:qa,repeated:!0}]),Pd=s.makeMessageType("viam.service.motion.v1.PlanStatusWithID",()=>[{no:1,name:"plan_id",kind:"scalar",T:9},{no:2,name:"component_name_deprecated",kind:"message",T:z},{no:3,name:"execution_id",kind:"scalar",T:9},{no:4,name:"status",kind:"message",T:qa},{no:5,name:"component_name",kind:"scalar",T:9}]),qa=s.makeMessageType("viam.service.motion.v1.PlanStatus",()=>[{no:1,name:"state",kind:"enum",T:s.getEnumType(yd)},{no:2,name:"timestamp",kind:"message",T:S},{no:3,name:"reason",kind:"scalar",T:9,opt:!0}]),Dd=s.makeMessageType("viam.service.motion.v1.Plan",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"component_name_deprecated",kind:"message",T:z},{no:3,name:"execution_id",kind:"scalar",T:9},{no:4,name:"steps",kind:"message",T:Ad,repeated:!0},{no:5,name:"component_name",kind:"scalar",T:9}]),Ad=s.makeMessageType("viam.service.motion.v1.PlanStep",()=>[{no:1,name:"step",kind:"map",K:9,V:{kind:"message",T:Ud}}]),Ud=s.makeMessageType("viam.service.motion.v1.ComponentState",()=>[{no:1,name:"pose",kind:"message",T:Be}]),qd=Object.freeze(Object.defineProperty({__proto__:null,CollisionSpecification:Cd,CollisionSpecification_AllowedFrameCollisions:Nd,ComponentState:Ud,Constraints:Od,GetPlanRequest:vo,GetPlanResponse:bd,GetPoseRequest:To,GetPoseResponse:_d,LinearConstraint:Ed,ListPlanStatusesRequest:yo,ListPlanStatusesResponse:Id,MotionConfiguration:uo,MoveOnGlobeRequest:go,MoveOnGlobeResponse:Rd,MoveOnMapRequest:po,MoveOnMapResponse:hd,MoveRequest:lo,MoveResponse:vd,ObstacleDetector:fd,OrientationConstraint:wd,Plan:Dd,PlanState:yd,PlanStatus:qa,PlanStatusWithID:Pd,PlanStep:Ad,PlanWithStatus:ho,PseudolinearConstraint:Md,StopPlanRequest:ko,StopPlanResponse:Sd},Symbol.toStringTag,{value:"Module"})),Ld={typeName:"viam.service.motion.v1.MotionService",methods:{move:{name:"Move",I:lo,O:vd,kind:m.Unary},moveOnMap:{name:"MoveOnMap",I:po,O:hd,kind:m.Unary},moveOnGlobe:{name:"MoveOnGlobe",I:go,O:Rd,kind:m.Unary},getPose:{name:"GetPose",I:To,O:_d,kind:m.Unary},stopPlan:{name:"StopPlan",I:ko,O:Sd,kind:m.Unary},listPlanStatuses:{name:"ListPlanStatuses",I:yo,O:Id,kind:m.Unary},getPlan:{name:"GetPlan",I:vo,O:bd,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary}}},Gd=s.makeEnum("viam.service.navigation.v1.MapType",[{no:0,name:"MAP_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MAP_TYPE_NONE",localName:"NONE"},{no:2,name:"MAP_TYPE_GPS",localName:"GPS"}]),fo=s.makeEnum("viam.service.navigation.v1.Mode",[{no:0,name:"MODE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MODE_MANUAL",localName:"MANUAL"},{no:2,name:"MODE_WAYPOINT",localName:"WAYPOINT"},{no:3,name:"MODE_EXPLORE",localName:"EXPLORE"}]),Ro=s.makeMessageType("viam.service.navigation.v1.GetModeRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Bd=s.makeMessageType("viam.service.navigation.v1.GetModeResponse",()=>[{no:1,name:"mode",kind:"enum",T:s.getEnumType(fo)}]),_o=s.makeMessageType("viam.service.navigation.v1.SetModeRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"mode",kind:"enum",T:s.getEnumType(fo)},{no:99,name:"extra",kind:"message",T:p}]),Fd=s.makeMessageType("viam.service.navigation.v1.SetModeResponse",[]),xd=s.makeMessageType("viam.service.navigation.v1.Waypoint",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"location",kind:"message",T:He}]),So=s.makeMessageType("viam.service.navigation.v1.GetLocationRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Jd=s.makeMessageType("viam.service.navigation.v1.GetLocationResponse",()=>[{no:1,name:"location",kind:"message",T:He},{no:2,name:"compass_heading",kind:"scalar",T:1}]),Io=s.makeMessageType("viam.service.navigation.v1.GetWaypointsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),zd=s.makeMessageType("viam.service.navigation.v1.GetWaypointsResponse",()=>[{no:1,name:"waypoints",kind:"message",T:xd,repeated:!0}]),bo=s.makeMessageType("viam.service.navigation.v1.AddWaypointRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"location",kind:"message",T:He},{no:99,name:"extra",kind:"message",T:p}]),Vd=s.makeMessageType("viam.service.navigation.v1.AddWaypointResponse",[]),Oo=s.makeMessageType("viam.service.navigation.v1.RemoveWaypointRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"id",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),$d=s.makeMessageType("viam.service.navigation.v1.RemoveWaypointResponse",[]),Eo=s.makeMessageType("viam.service.navigation.v1.GetObstaclesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Yd=s.makeMessageType("viam.service.navigation.v1.GetObstaclesResponse",()=>[{no:1,name:"obstacles",kind:"message",T:wa,repeated:!0}]),Wd=s.makeMessageType("viam.service.navigation.v1.Path",()=>[{no:1,name:"destination_waypoint_id",kind:"scalar",T:9},{no:2,name:"geopoints",kind:"message",T:He,repeated:!0}]),Mo=s.makeMessageType("viam.service.navigation.v1.GetPathsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Hd=s.makeMessageType("viam.service.navigation.v1.GetPathsResponse",()=>[{no:1,name:"paths",kind:"message",T:Wd,repeated:!0}]),wo=s.makeMessageType("viam.service.navigation.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),jd=s.makeMessageType("viam.service.navigation.v1.GetPropertiesResponse",()=>[{no:1,name:"map_type",kind:"enum",T:s.getEnumType(Gd)}]),Kd=Object.freeze(Object.defineProperty({__proto__:null,AddWaypointRequest:bo,AddWaypointResponse:Vd,GetLocationRequest:So,GetLocationResponse:Jd,GetModeRequest:Ro,GetModeResponse:Bd,GetObstaclesRequest:Eo,GetObstaclesResponse:Yd,GetPathsRequest:Mo,GetPathsResponse:Hd,GetPropertiesRequest:wo,GetPropertiesResponse:jd,GetWaypointsRequest:Io,GetWaypointsResponse:zd,MapType:Gd,Mode:fo,Path:Wd,RemoveWaypointRequest:Oo,RemoveWaypointResponse:$d,SetModeRequest:_o,SetModeResponse:Fd,Waypoint:xd},Symbol.toStringTag,{value:"Module"})),Xd={typeName:"viam.service.navigation.v1.NavigationService",methods:{getMode:{name:"GetMode",I:Ro,O:Bd,kind:m.Unary},setMode:{name:"SetMode",I:_o,O:Fd,kind:m.Unary},getLocation:{name:"GetLocation",I:So,O:Jd,kind:m.Unary},getWaypoints:{name:"GetWaypoints",I:Io,O:zd,kind:m.Unary},addWaypoint:{name:"AddWaypoint",I:bo,O:Vd,kind:m.Unary},removeWaypoint:{name:"RemoveWaypoint",I:Oo,O:$d,kind:m.Unary},getObstacles:{name:"GetObstacles",I:Eo,O:Yd,kind:m.Unary},getPaths:{name:"GetPaths",I:Mo,O:Hd,kind:m.Unary},getProperties:{name:"GetProperties",I:wo,O:jd,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary}}},Qd=s.makeEnum("viam.service.slam.v1.MappingMode",[{no:0,name:"MAPPING_MODE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MAPPING_MODE_CREATE_NEW_MAP",localName:"CREATE_NEW_MAP"},{no:2,name:"MAPPING_MODE_LOCALIZE_ONLY",localName:"LOCALIZE_ONLY"},{no:3,name:"MAPPING_MODE_UPDATE_EXISTING_MAP",localName:"UPDATE_EXISTING_MAP"}]),Zd=s.makeEnum("viam.service.slam.v1.SensorType",[{no:0,name:"SENSOR_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"SENSOR_TYPE_CAMERA",localName:"CAMERA"},{no:2,name:"SENSOR_TYPE_MOVEMENT_SENSOR",localName:"MOVEMENT_SENSOR"}]),Co=s.makeMessageType("viam.service.slam.v1.GetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),ep=s.makeMessageType("viam.service.slam.v1.GetPositionResponse",()=>[{no:1,name:"pose",kind:"message",T:Be}]),No=s.makeMessageType("viam.service.slam.v1.GetPointCloudMapRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"return_edited_map",kind:"scalar",T:8,opt:!0}]),np=s.makeMessageType("viam.service.slam.v1.GetPointCloudMapResponse",()=>[{no:1,name:"point_cloud_pcd_chunk",kind:"scalar",T:12}]),Po=s.makeMessageType("viam.service.slam.v1.GetInternalStateRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),ap=s.makeMessageType("viam.service.slam.v1.GetInternalStateResponse",()=>[{no:1,name:"internal_state_chunk",kind:"scalar",T:12}]),Do=s.makeMessageType("viam.service.slam.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),tp=s.makeMessageType("viam.service.slam.v1.GetPropertiesResponse",()=>[{no:1,name:"cloud_slam",kind:"scalar",T:8},{no:2,name:"mapping_mode",kind:"enum",T:s.getEnumType(Qd)},{no:3,name:"internal_state_file_type",kind:"scalar",T:9,opt:!0},{no:4,name:"sensor_info",kind:"message",T:sp,repeated:!0}]),sp=s.makeMessageType("viam.service.slam.v1.SensorInfo",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:s.getEnumType(Zd)}]),op=Object.freeze(Object.defineProperty({__proto__:null,GetInternalStateRequest:Po,GetInternalStateResponse:ap,GetPointCloudMapRequest:No,GetPointCloudMapResponse:np,GetPositionRequest:Co,GetPositionResponse:ep,GetPropertiesRequest:Do,GetPropertiesResponse:tp,MappingMode:Qd,SensorInfo:sp,SensorType:Zd},Symbol.toStringTag,{value:"Module"})),ip={typeName:"viam.service.slam.v1.SLAMService",methods:{getPosition:{name:"GetPosition",I:Co,O:ep,kind:m.Unary},getPointCloudMap:{name:"GetPointCloudMap",I:No,O:np,kind:m.ServerStreaming},getInternalState:{name:"GetInternalState",I:Po,O:ap,kind:m.ServerStreaming},getProperties:{name:"GetProperties",I:Do,O:tp,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary}}},rp=s.makeEnum("viam.app.data.v1.Order",[{no:0,name:"ORDER_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"ORDER_DESCENDING",localName:"DESCENDING"},{no:2,name:"ORDER_ASCENDING",localName:"ASCENDING"}]),mp=s.makeEnum("viam.app.data.v1.TagsFilterType",[{no:0,name:"TAGS_FILTER_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"TAGS_FILTER_TYPE_MATCH_BY_OR",localName:"MATCH_BY_OR"},{no:2,name:"TAGS_FILTER_TYPE_TAGGED",localName:"TAGGED"},{no:3,name:"TAGS_FILTER_TYPE_UNTAGGED",localName:"UNTAGGED"}]),tn=s.makeEnum("viam.app.data.v1.TabularDataSourceType",[{no:0,name:"TABULAR_DATA_SOURCE_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"TABULAR_DATA_SOURCE_TYPE_STANDARD",localName:"STANDARD"},{no:2,name:"TABULAR_DATA_SOURCE_TYPE_HOT_STORAGE",localName:"HOT_STORAGE"},{no:3,name:"TABULAR_DATA_SOURCE_TYPE_PIPELINE_SINK",localName:"PIPELINE_SINK"}]),Fn=s.makeEnum("viam.app.data.v1.IndexableCollection",[{no:0,name:"INDEXABLE_COLLECTION_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"INDEXABLE_COLLECTION_HOT_STORE",localName:"HOT_STORE"},{no:2,name:"INDEXABLE_COLLECTION_PIPELINE_SINK",localName:"PIPELINE_SINK"}]),cp=s.makeEnum("viam.app.data.v1.IndexCreator",[{no:0,name:"INDEX_CREATOR_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"INDEX_CREATOR_VIAM",localName:"VIAM"},{no:2,name:"INDEX_CREATOR_CUSTOMER",localName:"CUSTOMER"}]),Ao=s.makeMessageType("viam.app.data.v1.DataRequest",()=>[{no:1,name:"filter",kind:"message",T:je},{no:2,name:"limit",kind:"scalar",T:4},{no:3,name:"last",kind:"scalar",T:9},{no:4,name:"sort_order",kind:"enum",T:s.getEnumType(rp)}]),je=s.makeMessageType("viam.app.data.v1.Filter",()=>[{no:1,name:"component_name",kind:"scalar",T:9},{no:2,name:"component_type",kind:"scalar",T:9},{no:4,name:"method",kind:"scalar",T:9},{no:6,name:"robot_name",kind:"scalar",T:9},{no:7,name:"robot_id",kind:"scalar",T:9},{no:8,name:"part_name",kind:"scalar",T:9},{no:9,name:"part_id",kind:"scalar",T:9},{no:10,name:"location_ids",kind:"scalar",T:9,repeated:!0},{no:11,name:"organization_ids",kind:"scalar",T:9,repeated:!0},{no:12,name:"mime_type",kind:"scalar",T:9,repeated:!0},{no:13,name:"interval",kind:"message",T:xn},{no:14,name:"tags_filter",kind:"message",T:La},{no:15,name:"bbox_labels",kind:"scalar",T:9,repeated:!0},{no:16,name:"dataset_id",kind:"scalar",T:9}]),La=s.makeMessageType("viam.app.data.v1.TagsFilter",()=>[{no:1,name:"type",kind:"enum",T:s.getEnumType(mp)},{no:2,name:"tags",kind:"scalar",T:9,repeated:!0}]),Ga=s.makeMessageType("viam.app.data.v1.CaptureMetadata",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"location_id",kind:"scalar",T:9},{no:3,name:"robot_name",kind:"scalar",T:9},{no:4,name:"robot_id",kind:"scalar",T:9},{no:5,name:"part_name",kind:"scalar",T:9},{no:6,name:"part_id",kind:"scalar",T:9},{no:7,name:"component_type",kind:"scalar",T:9},{no:9,name:"component_name",kind:"scalar",T:9},{no:10,name:"method_name",kind:"scalar",T:9},{no:11,name:"method_parameters",kind:"map",K:9,V:{kind:"message",T:Z}},{no:12,name:"tags",kind:"scalar",T:9,repeated:!0},{no:13,name:"mime_type",kind:"scalar",T:9}]),xn=s.makeMessageType("viam.app.data.v1.CaptureInterval",()=>[{no:1,name:"start",kind:"message",T:S},{no:2,name:"end",kind:"message",T:S}]),lp=s.makeMessageType("viam.app.data.v1.TabularDataByFilterRequest",()=>[{no:1,name:"data_request",kind:"message",T:Ao},{no:2,name:"count_only",kind:"scalar",T:8},{no:3,name:"include_internal_data",kind:"scalar",T:8}]),dp=s.makeMessageType("viam.app.data.v1.TabularDataByFilterResponse",()=>[{no:1,name:"metadata",kind:"message",T:Ga,repeated:!0},{no:2,name:"data",kind:"message",T:pp,repeated:!0},{no:3,name:"count",kind:"scalar",T:4},{no:4,name:"last",kind:"scalar",T:9},{no:5,name:"total_size_bytes",kind:"scalar",T:4}]),pp=s.makeMessageType("viam.app.data.v1.TabularData",()=>[{no:1,name:"data",kind:"message",T:p},{no:2,name:"metadata_index",kind:"scalar",T:13},{no:3,name:"time_requested",kind:"message",T:S},{no:4,name:"time_received",kind:"message",T:S}]),up=s.makeMessageType("viam.app.data.v1.TabularDataBySQLRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"sql_query",kind:"scalar",T:9}]),gp=s.makeMessageType("viam.app.data.v1.TabularDataBySQLResponse",()=>[{no:2,name:"raw_data",kind:"scalar",T:12,repeated:!0}]),Uo=s.makeMessageType("viam.app.data.v1.TabularDataSource",()=>[{no:1,name:"type",kind:"enum",T:s.getEnumType(tn)},{no:2,name:"pipeline_id",kind:"scalar",T:9,opt:!0}]),Tp=s.makeMessageType("viam.app.data.v1.TabularDataByMQLRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:3,name:"mql_binary",kind:"scalar",T:12,repeated:!0},{no:4,name:"use_recent_data",kind:"scalar",T:8,opt:!0},{no:6,name:"data_source",kind:"message",T:Uo,opt:!0},{no:7,name:"query_prefix_name",kind:"scalar",T:9,opt:!0}]),kp=s.makeMessageType("viam.app.data.v1.TabularDataByMQLResponse",()=>[{no:2,name:"raw_data",kind:"scalar",T:12,repeated:!0}]),yp=s.makeMessageType("viam.app.data.v1.ExportTabularDataRequest",()=>[{no:1,name:"part_id",kind:"scalar",T:9},{no:2,name:"resource_name",kind:"scalar",T:9},{no:3,name:"resource_subtype",kind:"scalar",T:9},{no:4,name:"method_name",kind:"scalar",T:9},{no:5,name:"interval",kind:"message",T:xn},{no:6,name:"additional_parameters",kind:"message",T:p,opt:!0}]),vp=s.makeMessageType("viam.app.data.v1.ExportTabularDataResponse",()=>[{no:1,name:"part_id",kind:"scalar",T:9},{no:2,name:"resource_name",kind:"scalar",T:9},{no:3,name:"resource_subtype",kind:"scalar",T:9},{no:4,name:"method_name",kind:"scalar",T:9},{no:5,name:"time_captured",kind:"message",T:S},{no:6,name:"organization_id",kind:"scalar",T:9},{no:7,name:"location_id",kind:"scalar",T:9},{no:8,name:"robot_name",kind:"scalar",T:9},{no:9,name:"robot_id",kind:"scalar",T:9},{no:10,name:"part_name",kind:"scalar",T:9},{no:11,name:"method_parameters",kind:"message",T:p},{no:12,name:"tags",kind:"scalar",T:9,repeated:!0},{no:13,name:"payload",kind:"message",T:p}]),hp=s.makeMessageType("viam.app.data.v1.GetLatestTabularDataRequest",()=>[{no:1,name:"part_id",kind:"scalar",T:9},{no:2,name:"resource_name",kind:"scalar",T:9},{no:3,name:"method_name",kind:"scalar",T:9},{no:4,name:"resource_subtype",kind:"scalar",T:9},{no:5,name:"additional_parameters",kind:"message",T:p,opt:!0}]),fp=s.makeMessageType("viam.app.data.v1.GetLatestTabularDataResponse",()=>[{no:1,name:"time_captured",kind:"message",T:S},{no:2,name:"time_synced",kind:"message",T:S},{no:3,name:"payload",kind:"message",T:p}]),qo=s.makeMessageType("viam.app.data.v1.BinaryData",()=>[{no:1,name:"binary",kind:"scalar",T:12},{no:2,name:"metadata",kind:"message",T:Ep}]),Rp=s.makeMessageType("viam.app.data.v1.BinaryDataByFilterRequest",()=>[{no:1,name:"data_request",kind:"message",T:Ao},{no:2,name:"include_binary",kind:"scalar",T:8},{no:3,name:"count_only",kind:"scalar",T:8},{no:4,name:"include_internal_data",kind:"scalar",T:8}]),_p=s.makeMessageType("viam.app.data.v1.BinaryDataByFilterResponse",()=>[{no:1,name:"data",kind:"message",T:qo,repeated:!0},{no:2,name:"count",kind:"scalar",T:4},{no:3,name:"last",kind:"scalar",T:9},{no:4,name:"total_size_bytes",kind:"scalar",T:4}]),ge=s.makeMessageType("viam.app.data.v1.BinaryID",()=>[{no:1,name:"file_id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9},{no:3,name:"location_id",kind:"scalar",T:9}]),Sp=s.makeMessageType("viam.app.data.v1.BinaryDataByIDsRequest",()=>[{no:2,name:"include_binary",kind:"scalar",T:8},{no:3,name:"binary_ids",kind:"message",T:ge,repeated:!0},{no:4,name:"binary_data_ids",kind:"scalar",T:9,repeated:!0}]),Ip=s.makeMessageType("viam.app.data.v1.BinaryDataByIDsResponse",()=>[{no:1,name:"data",kind:"message",T:qo,repeated:!0},{no:2,name:"count",kind:"scalar",T:4}]),bp=s.makeMessageType("viam.app.data.v1.BoundingBox",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"label",kind:"scalar",T:9},{no:3,name:"x_min_normalized",kind:"scalar",T:1},{no:4,name:"y_min_normalized",kind:"scalar",T:1},{no:5,name:"x_max_normalized",kind:"scalar",T:1},{no:6,name:"y_max_normalized",kind:"scalar",T:1},{no:7,name:"confidence",kind:"scalar",T:1,opt:!0}]),Op=s.makeMessageType("viam.app.data.v1.Classification",()=>[{no:3,name:"id",kind:"scalar",T:9},{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"confidence",kind:"scalar",T:1,opt:!0}]),Ba=s.makeMessageType("viam.app.data.v1.Annotations",()=>[{no:1,name:"bboxes",kind:"message",T:bp,repeated:!0},{no:2,name:"classifications",kind:"message",T:Op,repeated:!0}]),Ep=s.makeMessageType("viam.app.data.v1.BinaryMetadata",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"capture_metadata",kind:"message",T:Ga},{no:3,name:"time_requested",kind:"message",T:S},{no:4,name:"time_received",kind:"message",T:S},{no:5,name:"file_name",kind:"scalar",T:9},{no:6,name:"file_ext",kind:"scalar",T:9},{no:7,name:"uri",kind:"scalar",T:9},{no:8,name:"annotations",kind:"message",T:Ba},{no:9,name:"dataset_ids",kind:"scalar",T:9,repeated:!0},{no:10,name:"binary_data_id",kind:"scalar",T:9},{no:11,name:"file_size_bytes",kind:"scalar",T:4}]),Mp=s.makeMessageType("viam.app.data.v1.DeleteTabularFilter",()=>[{no:1,name:"location_ids",kind:"scalar",T:9,repeated:!0},{no:2,name:"robot_id",kind:"scalar",T:9},{no:3,name:"part_id",kind:"scalar",T:9},{no:4,name:"component_type",kind:"scalar",T:9},{no:5,name:"component_name",kind:"scalar",T:9},{no:6,name:"method",kind:"scalar",T:9},{no:7,name:"tags_filter",kind:"message",T:La}]),wp=s.makeMessageType("viam.app.data.v1.DeleteTabularDataRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"delete_older_than_days",kind:"scalar",T:13},{no:3,name:"filter",kind:"message",T:Mp,opt:!0}]),Cp=s.makeMessageType("viam.app.data.v1.DeleteTabularDataResponse",()=>[{no:1,name:"deleted_count",kind:"scalar",T:4}]),Np=s.makeMessageType("viam.app.data.v1.DeleteBinaryDataByFilterRequest",()=>[{no:1,name:"filter",kind:"message",T:je},{no:2,name:"include_internal_data",kind:"scalar",T:8}]),Pp=s.makeMessageType("viam.app.data.v1.DeleteBinaryDataByFilterResponse",()=>[{no:1,name:"deleted_count",kind:"scalar",T:4}]),Dp=s.makeMessageType("viam.app.data.v1.DeleteBinaryDataByIDsRequest",()=>[{no:2,name:"binary_ids",kind:"message",T:ge,repeated:!0},{no:3,name:"binary_data_ids",kind:"scalar",T:9,repeated:!0}]),Ap=s.makeMessageType("viam.app.data.v1.DeleteBinaryDataByIDsResponse",()=>[{no:1,name:"deleted_count",kind:"scalar",T:4}]),Up=s.makeMessageType("viam.app.data.v1.AddTagsToBinaryDataByIDsRequest",()=>[{no:3,name:"binary_ids",kind:"message",T:ge,repeated:!0},{no:4,name:"binary_data_ids",kind:"scalar",T:9,repeated:!0},{no:2,name:"tags",kind:"scalar",T:9,repeated:!0}]),qp=s.makeMessageType("viam.app.data.v1.AddTagsToBinaryDataByIDsResponse",[]),Lp=s.makeMessageType("viam.app.data.v1.AddTagsToBinaryDataByFilterRequest",()=>[{no:1,name:"filter",kind:"message",T:je},{no:2,name:"tags",kind:"scalar",T:9,repeated:!0}]),Gp=s.makeMessageType("viam.app.data.v1.AddTagsToBinaryDataByFilterResponse",[]),Bp=s.makeMessageType("viam.app.data.v1.RemoveTagsFromBinaryDataByIDsRequest",()=>[{no:3,name:"binary_ids",kind:"message",T:ge,repeated:!0},{no:4,name:"binary_data_ids",kind:"scalar",T:9,repeated:!0},{no:2,name:"tags",kind:"scalar",T:9,repeated:!0}]),Fp=s.makeMessageType("viam.app.data.v1.RemoveTagsFromBinaryDataByIDsResponse",()=>[{no:1,name:"deleted_count",kind:"scalar",T:4}]),xp=s.makeMessageType("viam.app.data.v1.RemoveTagsFromBinaryDataByFilterRequest",()=>[{no:1,name:"filter",kind:"message",T:je},{no:2,name:"tags",kind:"scalar",T:9,repeated:!0}]),Jp=s.makeMessageType("viam.app.data.v1.RemoveTagsFromBinaryDataByFilterResponse",()=>[{no:1,name:"deleted_count",kind:"scalar",T:4}]),zp=s.makeMessageType("viam.app.data.v1.TagsByFilterRequest",()=>[{no:1,name:"filter",kind:"message",T:je}]),Vp=s.makeMessageType("viam.app.data.v1.TagsByFilterResponse",()=>[{no:1,name:"tags",kind:"scalar",T:9,repeated:!0}]),$p=s.makeMessageType("viam.app.data.v1.AddBoundingBoxToImageByIDRequest",()=>[{no:7,name:"binary_id",kind:"message",T:ge},{no:8,name:"binary_data_id",kind:"scalar",T:9},{no:2,name:"label",kind:"scalar",T:9},{no:3,name:"x_min_normalized",kind:"scalar",T:1},{no:4,name:"y_min_normalized",kind:"scalar",T:1},{no:5,name:"x_max_normalized",kind:"scalar",T:1},{no:6,name:"y_max_normalized",kind:"scalar",T:1},{no:9,name:"confidence",kind:"scalar",T:1,opt:!0}]),Yp=s.makeMessageType("viam.app.data.v1.AddBoundingBoxToImageByIDResponse",()=>[{no:1,name:"bbox_id",kind:"scalar",T:9}]),Wp=s.makeMessageType("viam.app.data.v1.RemoveBoundingBoxFromImageByIDRequest",()=>[{no:3,name:"binary_id",kind:"message",T:ge},{no:4,name:"binary_data_id",kind:"scalar",T:9},{no:2,name:"bbox_id",kind:"scalar",T:9}]),Hp=s.makeMessageType("viam.app.data.v1.RemoveBoundingBoxFromImageByIDResponse",[]),jp=s.makeMessageType("viam.app.data.v1.UpdateBoundingBoxRequest",()=>[{no:1,name:"binary_id",kind:"message",T:ge},{no:8,name:"binary_data_id",kind:"scalar",T:9},{no:2,name:"bbox_id",kind:"scalar",T:9},{no:3,name:"label",kind:"scalar",T:9,opt:!0},{no:4,name:"x_min_normalized",kind:"scalar",T:1,opt:!0},{no:5,name:"y_min_normalized",kind:"scalar",T:1,opt:!0},{no:6,name:"x_max_normalized",kind:"scalar",T:1,opt:!0},{no:7,name:"y_max_normalized",kind:"scalar",T:1,opt:!0},{no:9,name:"confidence",kind:"scalar",T:1,opt:!0}]),Kp=s.makeMessageType("viam.app.data.v1.UpdateBoundingBoxResponse",[]),Xp=s.makeMessageType("viam.app.data.v1.BoundingBoxLabelsByFilterRequest",()=>[{no:1,name:"filter",kind:"message",T:je}]),Qp=s.makeMessageType("viam.app.data.v1.BoundingBoxLabelsByFilterResponse",()=>[{no:1,name:"labels",kind:"scalar",T:9,repeated:!0}]),Zp=s.makeMessageType("viam.app.data.v1.ConfigureDatabaseUserRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"password",kind:"scalar",T:9}]),eu=s.makeMessageType("viam.app.data.v1.ConfigureDatabaseUserResponse",[]),nu=s.makeMessageType("viam.app.data.v1.GetDatabaseConnectionRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),au=s.makeMessageType("viam.app.data.v1.GetDatabaseConnectionResponse",()=>[{no:1,name:"hostname",kind:"scalar",T:9},{no:2,name:"mongodb_uri",kind:"scalar",T:9},{no:3,name:"has_database_user",kind:"scalar",T:8}]),tu=s.makeMessageType("viam.app.data.v1.AddBinaryDataToDatasetByIDsRequest",()=>[{no:1,name:"binary_ids",kind:"message",T:ge,repeated:!0},{no:3,name:"binary_data_ids",kind:"scalar",T:9,repeated:!0},{no:2,name:"dataset_id",kind:"scalar",T:9}]),su=s.makeMessageType("viam.app.data.v1.AddBinaryDataToDatasetByIDsResponse",[]),ou=s.makeMessageType("viam.app.data.v1.RemoveBinaryDataFromDatasetByIDsRequest",()=>[{no:1,name:"binary_ids",kind:"message",T:ge,repeated:!0},{no:3,name:"binary_data_ids",kind:"scalar",T:9,repeated:!0},{no:2,name:"dataset_id",kind:"scalar",T:9}]),iu=s.makeMessageType("viam.app.data.v1.RemoveBinaryDataFromDatasetByIDsResponse",[]),ru=s.makeMessageType("viam.app.data.v1.CreateIndexRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"collection_type",kind:"enum",T:s.getEnumType(Fn)},{no:3,name:"pipeline_name",kind:"scalar",T:9,opt:!0},{no:4,name:"index_spec",kind:"scalar",T:12,repeated:!0}]),mu=s.makeMessageType("viam.app.data.v1.CreateIndexResponse",[]),cu=s.makeMessageType("viam.app.data.v1.DeleteIndexRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"collection_type",kind:"enum",T:s.getEnumType(Fn)},{no:3,name:"pipeline_name",kind:"scalar",T:9,opt:!0},{no:4,name:"index_name",kind:"scalar",T:9}]),lu=s.makeMessageType("viam.app.data.v1.DeleteIndexResponse",[]),du=s.makeMessageType("viam.app.data.v1.ListIndexesRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"collection_type",kind:"enum",T:s.getEnumType(Fn)},{no:3,name:"pipeline_name",kind:"scalar",T:9,opt:!0}]),pu=s.makeMessageType("viam.app.data.v1.ListIndexesResponse",()=>[{no:1,name:"indexes",kind:"message",T:uu,repeated:!0}]),uu=s.makeMessageType("viam.app.data.v1.Index",()=>[{no:1,name:"collection_type",kind:"enum",T:s.getEnumType(Fn)},{no:2,name:"pipeline_name",kind:"scalar",T:9,opt:!0},{no:3,name:"index_name",kind:"scalar",T:9},{no:4,name:"index_spec",kind:"scalar",T:12,repeated:!0},{no:5,name:"created_by",kind:"enum",T:s.getEnumType(cp)}]),gu=s.makeMessageType("viam.app.data.v1.CreateSavedQueryRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"mql_binary",kind:"scalar",T:12,repeated:!0}]),Tu=s.makeMessageType("viam.app.data.v1.CreateSavedQueryResponse",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Lo=s.makeMessageType("viam.app.data.v1.Query",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"mql_binary",kind:"scalar",T:12,repeated:!0},{no:5,name:"created_on",kind:"message",T:S},{no:6,name:"updated_at",kind:"message",T:S}]),ku=s.makeMessageType("viam.app.data.v1.DeleteSavedQueryRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),yu=s.makeMessageType("viam.app.data.v1.DeleteSavedQueryResponse",[]),vu=s.makeMessageType("viam.app.data.v1.GetSavedQueryRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),hu=s.makeMessageType("viam.app.data.v1.GetSavedQueryResponse",()=>[{no:1,name:"saved_query",kind:"message",T:Lo}]),fu=s.makeMessageType("viam.app.data.v1.UpdateSavedQueryRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"mql_binary",kind:"scalar",T:12,repeated:!0}]),Ru=s.makeMessageType("viam.app.data.v1.UpdateSavedQueryResponse",[]),_u=s.makeMessageType("viam.app.data.v1.ListSavedQueriesRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"limit",kind:"scalar",T:3}]),Su=s.makeMessageType("viam.app.data.v1.ListSavedQueriesResponse",()=>[{no:1,name:"queries",kind:"message",T:Lo,repeated:!0}]),Iu=s.makeMessageType("viam.app.data.v1.CreateBinaryDataSignedURLRequest",()=>[{no:1,name:"binary_data_id",kind:"scalar",T:9},{no:2,name:"expiration_minutes",kind:"scalar",T:13,opt:!0}]),bu=s.makeMessageType("viam.app.data.v1.CreateBinaryDataSignedURLResponse",()=>[{no:1,name:"signed_url",kind:"scalar",T:9},{no:2,name:"expires_at",kind:"message",T:S}]),dS=Object.freeze(Object.defineProperty({__proto__:null,AddBinaryDataToDatasetByIDsRequest:tu,AddBinaryDataToDatasetByIDsResponse:su,AddBoundingBoxToImageByIDRequest:$p,AddBoundingBoxToImageByIDResponse:Yp,AddTagsToBinaryDataByFilterRequest:Lp,AddTagsToBinaryDataByFilterResponse:Gp,AddTagsToBinaryDataByIDsRequest:Up,AddTagsToBinaryDataByIDsResponse:qp,Annotations:Ba,BinaryData:qo,BinaryDataByFilterRequest:Rp,BinaryDataByFilterResponse:_p,BinaryDataByIDsRequest:Sp,BinaryDataByIDsResponse:Ip,BinaryID:ge,BinaryMetadata:Ep,BoundingBox:bp,BoundingBoxLabelsByFilterRequest:Xp,BoundingBoxLabelsByFilterResponse:Qp,CaptureInterval:xn,CaptureMetadata:Ga,Classification:Op,ConfigureDatabaseUserRequest:Zp,ConfigureDatabaseUserResponse:eu,CreateBinaryDataSignedURLRequest:Iu,CreateBinaryDataSignedURLResponse:bu,CreateIndexRequest:ru,CreateIndexResponse:mu,CreateSavedQueryRequest:gu,CreateSavedQueryResponse:Tu,DataRequest:Ao,DeleteBinaryDataByFilterRequest:Np,DeleteBinaryDataByFilterResponse:Pp,DeleteBinaryDataByIDsRequest:Dp,DeleteBinaryDataByIDsResponse:Ap,DeleteIndexRequest:cu,DeleteIndexResponse:lu,DeleteSavedQueryRequest:ku,DeleteSavedQueryResponse:yu,DeleteTabularDataRequest:wp,DeleteTabularDataResponse:Cp,DeleteTabularFilter:Mp,ExportTabularDataRequest:yp,ExportTabularDataResponse:vp,Filter:je,GetDatabaseConnectionRequest:nu,GetDatabaseConnectionResponse:au,GetLatestTabularDataRequest:hp,GetLatestTabularDataResponse:fp,GetSavedQueryRequest:vu,GetSavedQueryResponse:hu,Index:uu,IndexCreator:cp,IndexableCollection:Fn,ListIndexesRequest:du,ListIndexesResponse:pu,ListSavedQueriesRequest:_u,ListSavedQueriesResponse:Su,Order:rp,Query:Lo,RemoveBinaryDataFromDatasetByIDsRequest:ou,RemoveBinaryDataFromDatasetByIDsResponse:iu,RemoveBoundingBoxFromImageByIDRequest:Wp,RemoveBoundingBoxFromImageByIDResponse:Hp,RemoveTagsFromBinaryDataByFilterRequest:xp,RemoveTagsFromBinaryDataByFilterResponse:Jp,RemoveTagsFromBinaryDataByIDsRequest:Bp,RemoveTagsFromBinaryDataByIDsResponse:Fp,TabularData:pp,TabularDataByFilterRequest:lp,TabularDataByFilterResponse:dp,TabularDataByMQLRequest:Tp,TabularDataByMQLResponse:kp,TabularDataBySQLRequest:up,TabularDataBySQLResponse:gp,TabularDataSource:Uo,TabularDataSourceType:tn,TagsByFilterRequest:zp,TagsByFilterResponse:Vp,TagsFilter:La,TagsFilterType:mp,UpdateBoundingBoxRequest:jp,UpdateBoundingBoxResponse:Kp,UpdateSavedQueryRequest:fu,UpdateSavedQueryResponse:Ru},Symbol.toStringTag,{value:"Module"})),Go=s.makeMessageType("viam.component.camera.v1.GetImagesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"filter_source_names",kind:"scalar",T:9,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),Ou=s.makeMessageType("viam.component.camera.v1.GetImagesResponse",()=>[{no:1,name:"images",kind:"message",T:Bo,repeated:!0},{no:84260,name:"response_metadata",kind:"message",T:Wr}]),Bo=s.makeMessageType("viam.component.camera.v1.Image",()=>[{no:1,name:"source_name",kind:"scalar",T:9},{no:3,name:"image",kind:"scalar",T:12},{no:4,name:"mime_type",kind:"scalar",T:9},{no:5,name:"annotations",kind:"message",T:Ba}]),Fo=s.makeMessageType("viam.component.camera.v1.GetPointCloudRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"mime_type",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Eu=s.makeMessageType("viam.component.camera.v1.GetPointCloudResponse",()=>[{no:1,name:"mime_type",kind:"scalar",T:9},{no:2,name:"point_cloud",kind:"scalar",T:12}]),Mu=s.makeMessageType("viam.component.camera.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),wu=s.makeMessageType("viam.component.camera.v1.GetPropertiesResponse",()=>[{no:1,name:"supports_pcd",kind:"scalar",T:8},{no:2,name:"intrinsic_parameters",kind:"message",T:Pu},{no:3,name:"distortion_parameters",kind:"message",T:Du},{no:4,name:"mime_types",kind:"scalar",T:9,repeated:!0},{no:5,name:"frame_rate",kind:"scalar",T:2,opt:!0},{no:6,name:"extrinsic_parameters",kind:"message",T:Au}]),pS=s.makeMessageType("viam.component.camera.v1.Webcams",()=>[{no:1,name:"webcams",kind:"message",T:Cu,repeated:!0}]),Cu=s.makeMessageType("viam.component.camera.v1.Webcam",()=>[{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"status",kind:"scalar",T:9},{no:3,name:"properties",kind:"message",T:Nu,repeated:!0},{no:4,name:"name",kind:"scalar",T:9},{no:5,name:"id",kind:"scalar",T:9}]),Nu=s.makeMessageType("viam.component.camera.v1.Property",()=>[{no:1,name:"width_px",kind:"scalar",T:5},{no:2,name:"height_px",kind:"scalar",T:5},{no:3,name:"frame_format",kind:"scalar",T:9},{no:4,name:"frame_rate",kind:"scalar",T:2}]),Pu=s.makeMessageType("viam.component.camera.v1.IntrinsicParameters",()=>[{no:1,name:"width_px",kind:"scalar",T:13},{no:2,name:"height_px",kind:"scalar",T:13},{no:3,name:"focal_x_px",kind:"scalar",T:1},{no:4,name:"focal_y_px",kind:"scalar",T:1},{no:5,name:"center_x_px",kind:"scalar",T:1},{no:6,name:"center_y_px",kind:"scalar",T:1}]),Du=s.makeMessageType("viam.component.camera.v1.DistortionParameters",()=>[{no:1,name:"model",kind:"scalar",T:9},{no:2,name:"parameters",kind:"scalar",T:1,repeated:!0}]),Au=s.makeMessageType("viam.component.camera.v1.ExtrinsicParameters",()=>[{no:1,name:"translation",kind:"message",T:ue},{no:2,name:"orientation",kind:"message",T:Ct}]),uS=Object.freeze(Object.defineProperty({__proto__:null,DistortionParameters:Du,ExtrinsicParameters:Au,GetImagesRequest:Go,GetImagesResponse:Ou,GetPointCloudRequest:Fo,GetPointCloudResponse:Eu,GetPropertiesRequest:Mu,GetPropertiesResponse:wu,Image:Bo,IntrinsicParameters:Pu,Property:Nu,Webcam:Cu,Webcams:pS},Symbol.toStringTag,{value:"Module"})),xo=s.makeMessageType("viam.service.vision.v1.GetDetectionsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"image",kind:"scalar",T:12},{no:3,name:"width",kind:"scalar",T:3},{no:4,name:"height",kind:"scalar",T:3},{no:5,name:"mime_type",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Uu=s.makeMessageType("viam.service.vision.v1.GetDetectionsResponse",()=>[{no:1,name:"detections",kind:"message",T:Fa,repeated:!0}]),Jo=s.makeMessageType("viam.service.vision.v1.GetDetectionsFromCameraRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"camera_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),qu=s.makeMessageType("viam.service.vision.v1.GetDetectionsFromCameraResponse",()=>[{no:1,name:"detections",kind:"message",T:Fa,repeated:!0}]),Fa=s.makeMessageType("viam.service.vision.v1.Detection",()=>[{no:1,name:"x_min",kind:"scalar",T:3,opt:!0},{no:2,name:"y_min",kind:"scalar",T:3,opt:!0},{no:3,name:"x_max",kind:"scalar",T:3,opt:!0},{no:4,name:"y_max",kind:"scalar",T:3,opt:!0},{no:5,name:"confidence",kind:"scalar",T:1},{no:6,name:"class_name",kind:"scalar",T:9},{no:7,name:"x_min_normalized",kind:"scalar",T:1,opt:!0},{no:8,name:"y_min_normalized",kind:"scalar",T:1,opt:!0},{no:9,name:"x_max_normalized",kind:"scalar",T:1,opt:!0},{no:10,name:"y_max_normalized",kind:"scalar",T:1,opt:!0}]),zo=s.makeMessageType("viam.service.vision.v1.GetClassificationsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"image",kind:"scalar",T:12},{no:3,name:"width",kind:"scalar",T:5},{no:4,name:"height",kind:"scalar",T:5},{no:5,name:"mime_type",kind:"scalar",T:9},{no:6,name:"n",kind:"scalar",T:5},{no:99,name:"extra",kind:"message",T:p}]),Lu=s.makeMessageType("viam.service.vision.v1.GetClassificationsResponse",()=>[{no:1,name:"classifications",kind:"message",T:xa,repeated:!0}]),Vo=s.makeMessageType("viam.service.vision.v1.GetClassificationsFromCameraRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"camera_name",kind:"scalar",T:9},{no:3,name:"n",kind:"scalar",T:5},{no:99,name:"extra",kind:"message",T:p}]),Gu=s.makeMessageType("viam.service.vision.v1.GetClassificationsFromCameraResponse",()=>[{no:1,name:"classifications",kind:"message",T:xa,repeated:!0}]),xa=s.makeMessageType("viam.service.vision.v1.Classification",()=>[{no:1,name:"class_name",kind:"scalar",T:9},{no:2,name:"confidence",kind:"scalar",T:1}]),$o=s.makeMessageType("viam.service.vision.v1.GetObjectPointCloudsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"camera_name",kind:"scalar",T:9},{no:3,name:"mime_type",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Bu=s.makeMessageType("viam.service.vision.v1.GetObjectPointCloudsResponse",()=>[{no:1,name:"mime_type",kind:"scalar",T:9},{no:2,name:"objects",kind:"message",T:Pt,repeated:!0}]),Yo=s.makeMessageType("viam.service.vision.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Wo=s.makeMessageType("viam.service.vision.v1.CaptureAllFromCameraRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"camera_name",kind:"scalar",T:9},{no:3,name:"return_image",kind:"scalar",T:8},{no:4,name:"return_classifications",kind:"scalar",T:8},{no:5,name:"return_detections",kind:"scalar",T:8},{no:6,name:"return_object_point_clouds",kind:"scalar",T:8},{no:99,name:"extra",kind:"message",T:p}]),Fu=s.makeMessageType("viam.service.vision.v1.CaptureAllFromCameraResponse",()=>[{no:1,name:"image",kind:"message",T:Bo},{no:2,name:"detections",kind:"message",T:Fa,repeated:!0},{no:3,name:"classifications",kind:"message",T:xa,repeated:!0},{no:4,name:"objects",kind:"message",T:Pt,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),xu=s.makeMessageType("viam.service.vision.v1.GetPropertiesResponse",()=>[{no:1,name:"classifications_supported",kind:"scalar",T:8},{no:2,name:"detections_supported",kind:"scalar",T:8},{no:3,name:"object_point_clouds_supported",kind:"scalar",T:8}]),Ju=Object.freeze(Object.defineProperty({__proto__:null,CaptureAllFromCameraRequest:Wo,CaptureAllFromCameraResponse:Fu,Classification:xa,Detection:Fa,GetClassificationsFromCameraRequest:Vo,GetClassificationsFromCameraResponse:Gu,GetClassificationsRequest:zo,GetClassificationsResponse:Lu,GetDetectionsFromCameraRequest:Jo,GetDetectionsFromCameraResponse:qu,GetDetectionsRequest:xo,GetDetectionsResponse:Uu,GetObjectPointCloudsRequest:$o,GetObjectPointCloudsResponse:Bu,GetPropertiesRequest:Yo,GetPropertiesResponse:xu},Symbol.toStringTag,{value:"Module"})),zu={typeName:"viam.service.vision.v1.VisionService",methods:{getDetectionsFromCamera:{name:"GetDetectionsFromCamera",I:Jo,O:qu,kind:m.Unary},getDetections:{name:"GetDetections",I:xo,O:Uu,kind:m.Unary},getClassificationsFromCamera:{name:"GetClassificationsFromCamera",I:Vo,O:Gu,kind:m.Unary},getClassifications:{name:"GetClassifications",I:zo,O:Lu,kind:m.Unary},getObjectPointClouds:{name:"GetObjectPointClouds",I:$o,O:Bu,kind:m.Unary},getProperties:{name:"GetProperties",I:Yo,O:xu,kind:m.Unary},captureAllFromCamera:{name:"CaptureAllFromCamera",I:Wo,O:Fu,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary}}},gS=new Blob([`self.onmessage = function(e) {
|
|
1
|
+
(function(g,G){typeof exports=="object"&&typeof module<"u"?G(exports):typeof define=="function"&&define.amd?define(["exports"],G):(g=typeof globalThis<"u"?globalThis:g||self,G(g.sdk={}))})(this,function(g){"use strict";function G(a,e){if(!a)throw new Error(e)}const cR=34028234663852886e22,lR=-34028234663852886e22,dR=4294967295,pR=2147483647,uR=-2147483648;function Xn(a){if(typeof a!="number")throw new Error("invalid int 32: "+typeof a);if(!Number.isInteger(a)||a>pR||a<uR)throw new Error("invalid int 32: "+a)}function it(a){if(typeof a!="number")throw new Error("invalid uint 32: "+typeof a);if(!Number.isInteger(a)||a>dR||a<0)throw new Error("invalid uint 32: "+a)}function Pi(a){if(typeof a!="number")throw new Error("invalid float 32: "+typeof a);if(Number.isFinite(a)&&(a>cR||a<lR))throw new Error("invalid float 32: "+a)}const Di=Symbol("@bufbuild/protobuf/enum-type");function gR(a){const e=a[Di];return G(e,"missing enum type on enum object"),e}function Ai(a,e,n,t){a[Di]=Ui(e,n.map(o=>({no:o.no,name:o.name,localName:a[o.no]})))}function Ui(a,e,n){const t=Object.create(null),o=Object.create(null),i=[];for(const r of e){const c=qi(r);i.push(c),t[r.name]=c,o[r.no]=c}return{typeName:a,values:i,findName(r){return t[r]},findNumber(r){return o[r]}}}function TR(a,e,n){const t={};for(const o of e){const i=qi(o);t[i.localName]=i.no,t[i.no]=i.localName}return Ai(t,a,e),t}function qi(a){return"localName"in a?a:Object.assign(Object.assign({},a),{localName:a.name})}class w{equals(e){return this.getType().runtime.util.equals(this.getType(),this,e)}clone(){return this.getType().runtime.util.clone(this)}fromBinary(e,n){const t=this.getType(),o=t.runtime.bin,i=o.makeReadOptions(n);return o.readMessage(this,i.readerFactory(e),e.byteLength,i),this}fromJson(e,n){const t=this.getType(),o=t.runtime.json,i=o.makeReadOptions(n);return o.readMessage(t,e,i,this),this}fromJsonString(e,n){let t;try{t=JSON.parse(e)}catch(o){throw new Error(`cannot decode ${this.getType().typeName} from JSON: ${o instanceof Error?o.message:String(o)}`)}return this.fromJson(t,n)}toBinary(e){const n=this.getType(),t=n.runtime.bin,o=t.makeWriteOptions(e),i=o.writerFactory();return t.writeMessage(this,i,o),i.finish()}toJson(e){const n=this.getType(),t=n.runtime.json,o=t.makeWriteOptions(e);return t.writeMessage(this,o)}toJsonString(e){var n;const t=this.toJson(e);return JSON.stringify(t,null,(n=e?.prettySpaces)!==null&&n!==void 0?n:0)}toJSON(){return this.toJson({emitDefaultValues:!0})}getType(){return Object.getPrototypeOf(this).constructor}}function kR(a,e,n,t){var o;const i=(o=t?.localName)!==null&&o!==void 0?o:e.substring(e.lastIndexOf(".")+1),r={[i]:function(c){a.util.initFields(this),a.util.initPartial(c,this)}}[i];return Object.setPrototypeOf(r.prototype,new w),Object.assign(r,{runtime:a,typeName:e,fields:a.util.newFieldList(n),fromBinary(c,l){return new r().fromBinary(c,l)},fromJson(c,l){return new r().fromJson(c,l)},fromJsonString(c,l){return new r().fromJsonString(c,l)},equals(c,l){return a.util.equals(r,c,l)}}),r}function yR(){let a=0,e=0;for(let t=0;t<28;t+=7){let o=this.buf[this.pos++];if(a|=(o&127)<<t,!(o&128))return this.assertBounds(),[a,e]}let n=this.buf[this.pos++];if(a|=(n&15)<<28,e=(n&112)>>4,!(n&128))return this.assertBounds(),[a,e];for(let t=3;t<=31;t+=7){let o=this.buf[this.pos++];if(e|=(o&127)<<t,!(o&128))return this.assertBounds(),[a,e]}throw new Error("invalid varint")}function rt(a,e,n){for(let i=0;i<28;i=i+7){const r=a>>>i,c=!(!(r>>>7)&&e==0),l=(c?r|128:r)&255;if(n.push(l),!c)return}const t=a>>>28&15|(e&7)<<4,o=!!(e>>3);if(n.push((o?t|128:t)&255),!!o){for(let i=3;i<31;i=i+7){const r=e>>>i,c=!!(r>>>7),l=(c?r|128:r)&255;if(n.push(l),!c)return}n.push(e>>>31&1)}}const Qn=4294967296;function Li(a){const e=a[0]==="-";e&&(a=a.slice(1));const n=1e6;let t=0,o=0;function i(r,c){const l=Number(a.slice(r,c));o*=n,t=t*n+l,t>=Qn&&(o=o+(t/Qn|0),t=t%Qn)}return i(-24,-18),i(-18,-12),i(-12,-6),i(-6),e?Bi(t,o):mt(t,o)}function vR(a,e){let n=mt(a,e);const t=n.hi&2147483648;t&&(n=Bi(n.lo,n.hi));const o=Gi(n.lo,n.hi);return t?"-"+o:o}function Gi(a,e){if({lo:a,hi:e}=hR(a,e),e<=2097151)return String(Qn*e+a);const n=a&16777215,t=(a>>>24|e<<8)&16777215,o=e>>16&65535;let i=n+t*6777216+o*6710656,r=t+o*8147497,c=o*2;const l=1e7;return i>=l&&(r+=Math.floor(i/l),i%=l),r>=l&&(c+=Math.floor(r/l),r%=l),c.toString()+Fi(r)+Fi(i)}function hR(a,e){return{lo:a>>>0,hi:e>>>0}}function mt(a,e){return{lo:a|0,hi:e|0}}function Bi(a,e){return e=~e,a?a=~a+1:e+=1,mt(a,e)}const Fi=a=>{const e=String(a);return"0000000".slice(e.length)+e};function xi(a,e){if(a>=0){for(;a>127;)e.push(a&127|128),a=a>>>7;e.push(a)}else{for(let n=0;n<9;n++)e.push(a&127|128),a=a>>7;e.push(1)}}function fR(){let a=this.buf[this.pos++],e=a&127;if(!(a&128))return this.assertBounds(),e;if(a=this.buf[this.pos++],e|=(a&127)<<7,!(a&128))return this.assertBounds(),e;if(a=this.buf[this.pos++],e|=(a&127)<<14,!(a&128))return this.assertBounds(),e;if(a=this.buf[this.pos++],e|=(a&127)<<21,!(a&128))return this.assertBounds(),e;a=this.buf[this.pos++],e|=(a&15)<<28;for(let n=5;a&128&&n<10;n++)a=this.buf[this.pos++];if(a&128)throw new Error("invalid varint");return this.assertBounds(),e>>>0}function RR(){const a=new DataView(new ArrayBuffer(8));if(typeof BigInt=="function"&&typeof a.getBigInt64=="function"&&typeof a.getBigUint64=="function"&&typeof a.setBigInt64=="function"&&typeof a.setBigUint64=="function"&&(typeof process!="object"||typeof process.env!="object"||process.env.BUF_BIGINT_DISABLE!=="1")){const o=BigInt("-9223372036854775808"),i=BigInt("9223372036854775807"),r=BigInt("0"),c=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(l){const d=typeof l=="bigint"?l:BigInt(l);if(d>i||d<o)throw new Error(`int64 invalid: ${l}`);return d},uParse(l){const d=typeof l=="bigint"?l:BigInt(l);if(d>c||d<r)throw new Error(`uint64 invalid: ${l}`);return d},enc(l){return a.setBigInt64(0,this.parse(l),!0),{lo:a.getInt32(0,!0),hi:a.getInt32(4,!0)}},uEnc(l){return a.setBigInt64(0,this.uParse(l),!0),{lo:a.getInt32(0,!0),hi:a.getInt32(4,!0)}},dec(l,d){return a.setInt32(0,l,!0),a.setInt32(4,d,!0),a.getBigInt64(0,!0)},uDec(l,d){return a.setInt32(0,l,!0),a.setInt32(4,d,!0),a.getBigUint64(0,!0)}}}const n=o=>G(/^-?[0-9]+$/.test(o),`int64 invalid: ${o}`),t=o=>G(/^[0-9]+$/.test(o),`uint64 invalid: ${o}`);return{zero:"0",supported:!1,parse(o){return typeof o!="string"&&(o=o.toString()),n(o),o},uParse(o){return typeof o!="string"&&(o=o.toString()),t(o),o},enc(o){return typeof o!="string"&&(o=o.toString()),n(o),Li(o)},uEnc(o){return typeof o!="string"&&(o=o.toString()),t(o),Li(o)},dec(o,i){return vR(o,i)},uDec(o,i){return Gi(o,i)}}}const W=RR();var S;(function(a){a[a.DOUBLE=1]="DOUBLE",a[a.FLOAT=2]="FLOAT",a[a.INT64=3]="INT64",a[a.UINT64=4]="UINT64",a[a.INT32=5]="INT32",a[a.FIXED64=6]="FIXED64",a[a.FIXED32=7]="FIXED32",a[a.BOOL=8]="BOOL",a[a.STRING=9]="STRING",a[a.BYTES=12]="BYTES",a[a.UINT32=13]="UINT32",a[a.SFIXED32=15]="SFIXED32",a[a.SFIXED64=16]="SFIXED64",a[a.SINT32=17]="SINT32",a[a.SINT64=18]="SINT64"})(S||(S={}));var ze;(function(a){a[a.BIGINT=0]="BIGINT",a[a.STRING=1]="STRING"})(ze||(ze={}));function Ve(a,e,n){if(e===n)return!0;if(a==S.BYTES){if(!(e instanceof Uint8Array)||!(n instanceof Uint8Array)||e.length!==n.length)return!1;for(let t=0;t<e.length;t++)if(e[t]!==n[t])return!1;return!0}switch(a){case S.UINT64:case S.FIXED64:case S.INT64:case S.SFIXED64:case S.SINT64:return e==n}return!1}function dn(a,e){switch(a){case S.BOOL:return!1;case S.UINT64:case S.FIXED64:case S.INT64:case S.SFIXED64:case S.SINT64:return e==0?W.zero:"0";case S.DOUBLE:case S.FLOAT:return 0;case S.BYTES:return new Uint8Array(0);case S.STRING:return"";default:return 0}}function Ji(a,e){switch(a){case S.BOOL:return e===!1;case S.STRING:return e==="";case S.BYTES:return e instanceof Uint8Array&&!e.byteLength;default:return e==0}}var x;(function(a){a[a.Varint=0]="Varint",a[a.Bit64=1]="Bit64",a[a.LengthDelimited=2]="LengthDelimited",a[a.StartGroup=3]="StartGroup",a[a.EndGroup=4]="EndGroup",a[a.Bit32=5]="Bit32"})(x||(x={}));class _R{constructor(e){this.stack=[],this.textEncoder=e??new TextEncoder,this.chunks=[],this.buf=[]}finish(){this.chunks.push(new Uint8Array(this.buf));let e=0;for(let o=0;o<this.chunks.length;o++)e+=this.chunks[o].length;let n=new Uint8Array(e),t=0;for(let o=0;o<this.chunks.length;o++)n.set(this.chunks[o],t),t+=this.chunks[o].length;return this.chunks=[],n}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let e=this.finish(),n=this.stack.pop();if(!n)throw new Error("invalid state, fork stack empty");return this.chunks=n.chunks,this.buf=n.buf,this.uint32(e.byteLength),this.raw(e)}tag(e,n){return this.uint32((e<<3|n)>>>0)}raw(e){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(e),this}uint32(e){for(it(e);e>127;)this.buf.push(e&127|128),e=e>>>7;return this.buf.push(e),this}int32(e){return Xn(e),xi(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 n=this.textEncoder.encode(e);return this.uint32(n.byteLength),this.raw(n)}float(e){Pi(e);let n=new Uint8Array(4);return new DataView(n.buffer).setFloat32(0,e,!0),this.raw(n)}double(e){let n=new Uint8Array(8);return new DataView(n.buffer).setFloat64(0,e,!0),this.raw(n)}fixed32(e){it(e);let n=new Uint8Array(4);return new DataView(n.buffer).setUint32(0,e,!0),this.raw(n)}sfixed32(e){Xn(e);let n=new Uint8Array(4);return new DataView(n.buffer).setInt32(0,e,!0),this.raw(n)}sint32(e){return Xn(e),e=(e<<1^e>>31)>>>0,xi(e,this.buf),this}sfixed64(e){let n=new Uint8Array(8),t=new DataView(n.buffer),o=W.enc(e);return t.setInt32(0,o.lo,!0),t.setInt32(4,o.hi,!0),this.raw(n)}fixed64(e){let n=new Uint8Array(8),t=new DataView(n.buffer),o=W.uEnc(e);return t.setInt32(0,o.lo,!0),t.setInt32(4,o.hi,!0),this.raw(n)}int64(e){let n=W.enc(e);return rt(n.lo,n.hi,this.buf),this}sint64(e){let n=W.enc(e),t=n.hi>>31,o=n.lo<<1^t,i=(n.hi<<1|n.lo>>>31)^t;return rt(o,i,this.buf),this}uint64(e){let n=W.uEnc(e);return rt(n.lo,n.hi,this.buf),this}}class zi{constructor(e,n){this.varint64=yR,this.uint32=fR,this.buf=e,this.len=e.length,this.pos=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength),this.textDecoder=n??new TextDecoder}tag(){let e=this.uint32(),n=e>>>3,t=e&7;if(n<=0||t<0||t>5)throw new Error("illegal tag: field no "+n+" wire type "+t);return[n,t]}skip(e,n){let t=this.pos;switch(e){case x.Varint:for(;this.buf[this.pos++]&128;);break;case x.Bit64:this.pos+=4;case x.Bit32:this.pos+=4;break;case x.LengthDelimited:let o=this.uint32();this.pos+=o;break;case x.StartGroup:for(;;){const[i,r]=this.tag();if(r===x.EndGroup){if(n!==void 0&&i!==n)throw new Error("invalid end group tag");break}this.skip(r,i)}break;default:throw new Error("cant skip wire type "+e)}return this.assertBounds(),this.buf.subarray(t,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let e=this.uint32();return e>>>1^-(e&1)}int64(){return W.dec(...this.varint64())}uint64(){return W.uDec(...this.varint64())}sint64(){let[e,n]=this.varint64(),t=-(e&1);return e=(e>>>1|(n&1)<<31)^t,n=n>>>1^t,W.dec(e,n)}bool(){let[e,n]=this.varint64();return e!==0||n!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return W.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return W.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(),n=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(n,n+e)}string(){return this.textDecoder.decode(this.bytes())}}function SR(a,e,n,t){let o;return{typeName:e,extendee:n,get field(){if(!o){const i=typeof t=="function"?t():t;i.name=e.split(".").pop(),i.jsonName=`[${e}]`,o=a.util.newFieldList([i]).list()[0]}return o},runtime:a}}function Vi(a){const e=a.field.localName,n=Object.create(null);return n[e]=IR(a),[n,()=>n[e]]}function IR(a){const e=a.field;if(e.repeated)return[];if(e.default!==void 0)return e.default;switch(e.kind){case"enum":return e.T.values[0].no;case"scalar":return dn(e.T,e.L);case"message":const n=e.T,t=new n;return n.fieldWrapper?n.fieldWrapper.unwrapField(t):t;case"map":throw"map fields are not allowed to be extensions"}}function OR(a,e){if(!e.repeated&&(e.kind=="enum"||e.kind=="scalar")){for(let n=a.length-1;n>=0;--n)if(a[n].no==e.no)return[a[n]];return[]}return a.filter(n=>n.no===e.no)}let ve="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),Zn=[];for(let a=0;a<ve.length;a++)Zn[ve[a].charCodeAt(0)]=a;Zn[45]=ve.indexOf("+"),Zn[95]=ve.indexOf("/");const ct={dec(a){let e=a.length*3/4;a[a.length-2]=="="?e-=2:a[a.length-1]=="="&&(e-=1);let n=new Uint8Array(e),t=0,o=0,i,r=0;for(let c=0;c<a.length;c++){if(i=Zn[a.charCodeAt(c)],i===void 0)switch(a[c]){case"=":o=0;case`
|
|
2
|
+
`:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(o){case 0:r=i,o=1;break;case 1:n[t++]=r<<2|(i&48)>>4,r=i,o=2;break;case 2:n[t++]=(r&15)<<4|(i&60)>>2,r=i,o=3;break;case 3:n[t++]=(r&3)<<6|i,o=0;break}}if(o==1)throw Error("invalid base64 string.");return n.subarray(0,t)},enc(a){let e="",n=0,t,o=0;for(let i=0;i<a.length;i++)switch(t=a[i],n){case 0:e+=ve[t>>2],o=(t&3)<<4,n=1;break;case 1:e+=ve[o|t>>4],o=(t&15)<<2,n=2;break;case 2:e+=ve[o|t>>6],e+=ve[t&63],n=0;break}return n&&(e+=ve[o],e+="=",n==1&&(e+="=")),e}};function bR(a,e,n){Yi(e,a);const t=e.runtime.bin.makeReadOptions(n),o=OR(a.getType().runtime.bin.listUnknownFields(a),e.field),[i,r]=Vi(e);for(const c of o)e.runtime.bin.readField(i,t.readerFactory(c.data),e.field,c.wireType,t);return r()}function MR(a,e,n,t){Yi(e,a);const o=e.runtime.bin.makeReadOptions(t),i=e.runtime.bin.makeWriteOptions(t);if($i(a,e)){const d=a.getType().runtime.bin.listUnknownFields(a).filter(u=>u.no!=e.field.no);a.getType().runtime.bin.discardUnknownFields(a);for(const u of d)a.getType().runtime.bin.onUnknownField(a,u.no,u.wireType,u.data)}const r=i.writerFactory();let c=e.field;!c.opt&&!c.repeated&&(c.kind=="enum"||c.kind=="scalar")&&(c=Object.assign(Object.assign({},e.field),{opt:!0})),e.runtime.bin.writeField(c,n,r,i);const l=o.readerFactory(r.finish());for(;l.pos<l.len;){const[d,u]=l.tag(),h=l.skip(u,d);a.getType().runtime.bin.onUnknownField(a,d,u,h)}}function $i(a,e){const n=a.getType();return e.extendee.typeName===n.typeName&&!!n.runtime.bin.listUnknownFields(a).find(t=>t.no==e.field.no)}function Yi(a,e){G(a.extendee.typeName==e.getType().typeName,`extension ${a.typeName} can only be applied to message ${a.extendee.typeName}`)}function Wi(a,e){const n=a.localName;if(a.repeated)return e[n].length>0;if(a.oneof)return e[a.oneof.localName].case===n;switch(a.kind){case"enum":case"scalar":return a.opt||a.req?e[n]!==void 0:a.kind=="enum"?e[n]!==a.T.values[0].no:!Ji(a.T,e[n]);case"message":return e[n]!==void 0;case"map":return Object.keys(e[n]).length>0}}function Hi(a,e){const n=a.localName,t=!a.opt&&!a.req;if(a.repeated)e[n]=[];else if(a.oneof)e[a.oneof.localName]={case:void 0};else switch(a.kind){case"map":e[n]={};break;case"enum":e[n]=t?a.T.values[0].no:void 0;break;case"scalar":e[n]=t?dn(a.T,a.L):void 0;break;case"message":e[n]=void 0;break}}function en(a,e){if(a===null||typeof a!="object"||!Object.getOwnPropertyNames(w.prototype).every(t=>t in a&&typeof a[t]=="function"))return!1;const n=a.getType();return n===null||typeof n!="function"||!("typeName"in n)||typeof n.typeName!="string"?!1:e===void 0?!0:n.typeName==e.typeName}function ji(a,e){return en(e)||!a.fieldWrapper?e:a.fieldWrapper.wrapField(e)}S.DOUBLE,S.FLOAT,S.INT64,S.UINT64,S.INT32,S.UINT32,S.BOOL,S.STRING,S.BYTES;const Ki={ignoreUnknownFields:!1},Xi={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0};function ER(a){return a?Object.assign(Object.assign({},Ki),a):Ki}function wR(a){return a?Object.assign(Object.assign({},Xi),a):Xi}const ea=Symbol(),na=Symbol();function CR(){return{makeReadOptions:ER,makeWriteOptions:wR,readMessage(a,e,n,t){if(e==null||Array.isArray(e)||typeof e!="object")throw new Error(`cannot decode message ${a.typeName} from JSON: ${ie(e)}`);t=t??new a;const o=new Map,i=n.typeRegistry;for(const[r,c]of Object.entries(e)){const l=a.fields.findJsonName(r);if(l){if(l.oneof){if(c===null&&l.kind=="scalar")continue;const d=o.get(l.oneof);if(d!==void 0)throw new Error(`cannot decode message ${a.typeName} from JSON: multiple keys for oneof "${l.oneof.name}" present: "${d}", "${r}"`);o.set(l.oneof,r)}Qi(t,c,l,n,a)}else{let d=!1;if(i?.findExtension&&r.startsWith("[")&&r.endsWith("]")){const u=i.findExtension(r.substring(1,r.length-1));if(u&&u.extendee.typeName==a.typeName){d=!0;const[h,I]=Vi(u);Qi(h,c,u.field,n,u),MR(t,u,I(),n)}}if(!d&&!n.ignoreUnknownFields)throw new Error(`cannot decode message ${a.typeName} from JSON: key "${r}" is unknown`)}}return t},writeMessage(a,e){const n=a.getType(),t={};let o;try{for(o of n.fields.byNumber()){if(!Wi(o,a)){if(o.req)throw"required field not set";if(!e.emitDefaultValues||!PR(o))continue}const r=o.oneof?a[o.oneof.localName].value:a[o.localName],c=Zi(o,r,e);c!==void 0&&(t[e.useProtoFieldName?o.name:o.jsonName]=c)}const i=e.typeRegistry;if(i?.findExtensionFor)for(const r of n.runtime.bin.listUnknownFields(a)){const c=i.findExtensionFor(n.typeName,r.no);if(c&&$i(a,c)){const l=bR(a,c,e),d=Zi(c.field,l,e);d!==void 0&&(t[c.field.jsonName]=d)}}}catch(i){const r=o?`cannot encode field ${n.typeName}.${o.name} to JSON`:`cannot encode message ${n.typeName} to JSON`,c=i instanceof Error?i.message:String(i);throw new Error(r+(c.length>0?`: ${c}`:""))}return t},readScalar(a,e,n){return Sn(a,e,n??ze.BIGINT,!0)},writeScalar(a,e,n){if(e!==void 0&&(n||Ji(a,e)))return aa(a,e)},debug:ie}}function ie(a){if(a===null)return"null";switch(typeof a){case"object":return Array.isArray(a)?"array":"object";case"string":return a.length>100?"string":`"${a.split('"').join('\\"')}"`;default:return String(a)}}function Qi(a,e,n,t,o){let i=n.localName;if(n.repeated){if(G(n.kind!="map"),e===null)return;if(!Array.isArray(e))throw new Error(`cannot decode field ${o.typeName}.${n.name} from JSON: ${ie(e)}`);const r=a[i];for(const c of e){if(c===null)throw new Error(`cannot decode field ${o.typeName}.${n.name} from JSON: ${ie(c)}`);switch(n.kind){case"message":r.push(n.T.fromJson(c,t));break;case"enum":const l=lt(n.T,c,t.ignoreUnknownFields,!0);l!==na&&r.push(l);break;case"scalar":try{r.push(Sn(n.T,c,n.L,!0))}catch(d){let u=`cannot decode field ${o.typeName}.${n.name} from JSON: ${ie(c)}`;throw d instanceof Error&&d.message.length>0&&(u+=`: ${d.message}`),new Error(u)}break}}}else if(n.kind=="map"){if(e===null)return;if(typeof e!="object"||Array.isArray(e))throw new Error(`cannot decode field ${o.typeName}.${n.name} from JSON: ${ie(e)}`);const r=a[i];for(const[c,l]of Object.entries(e)){if(l===null)throw new Error(`cannot decode field ${o.typeName}.${n.name} from JSON: map value null`);let d;try{d=NR(n.K,c)}catch(u){let h=`cannot decode map key for field ${o.typeName}.${n.name} from JSON: ${ie(e)}`;throw u instanceof Error&&u.message.length>0&&(h+=`: ${u.message}`),new Error(h)}switch(n.V.kind){case"message":r[d]=n.V.T.fromJson(l,t);break;case"enum":const u=lt(n.V.T,l,t.ignoreUnknownFields,!0);u!==na&&(r[d]=u);break;case"scalar":try{r[d]=Sn(n.V.T,l,ze.BIGINT,!0)}catch(h){let I=`cannot decode map value for field ${o.typeName}.${n.name} from JSON: ${ie(e)}`;throw h instanceof Error&&h.message.length>0&&(I+=`: ${h.message}`),new Error(I)}break}}}else switch(n.oneof&&(a=a[n.oneof.localName]={case:i},i="value"),n.kind){case"message":const r=n.T;if(e===null&&r.typeName!="google.protobuf.Value")return;let c=a[i];en(c)?c.fromJson(e,t):(a[i]=c=r.fromJson(e,t),r.fieldWrapper&&!n.oneof&&(a[i]=r.fieldWrapper.unwrapField(c)));break;case"enum":const l=lt(n.T,e,t.ignoreUnknownFields,!1);switch(l){case ea:Hi(n,a);break;case na:break;default:a[i]=l;break}break;case"scalar":try{const d=Sn(n.T,e,n.L,!1);switch(d){case ea:Hi(n,a);break;default:a[i]=d;break}}catch(d){let u=`cannot decode field ${o.typeName}.${n.name} from JSON: ${ie(e)}`;throw d instanceof Error&&d.message.length>0&&(u+=`: ${d.message}`),new Error(u)}break}}function NR(a,e){if(a===S.BOOL)switch(e){case"true":e=!0;break;case"false":e=!1;break}return Sn(a,e,ze.BIGINT,!0).toString()}function Sn(a,e,n,t){if(e===null)return t?dn(a,n):ea;switch(a){case S.DOUBLE:case S.FLOAT:if(e==="NaN")return Number.NaN;if(e==="Infinity")return Number.POSITIVE_INFINITY;if(e==="-Infinity")return Number.NEGATIVE_INFINITY;if(e===""||typeof e=="string"&&e.trim().length!==e.length||typeof e!="string"&&typeof e!="number")break;const o=Number(e);if(Number.isNaN(o)||!Number.isFinite(o))break;return a==S.FLOAT&&Pi(o),o;case S.INT32:case S.FIXED32:case S.SFIXED32:case S.SINT32:case S.UINT32:let i;if(typeof e=="number"?i=e:typeof e=="string"&&e.length>0&&e.trim().length===e.length&&(i=Number(e)),i===void 0)break;return a==S.UINT32||a==S.FIXED32?it(i):Xn(i),i;case S.INT64:case S.SFIXED64:case S.SINT64:if(typeof e!="number"&&typeof e!="string")break;const r=W.parse(e);return n?r.toString():r;case S.FIXED64:case S.UINT64:if(typeof e!="number"&&typeof e!="string")break;const c=W.uParse(e);return n?c.toString():c;case S.BOOL:if(typeof e!="boolean")break;return e;case S.STRING:if(typeof e!="string")break;try{encodeURIComponent(e)}catch{throw new Error("invalid UTF8")}return e;case S.BYTES:if(e==="")return new Uint8Array(0);if(typeof e!="string")break;return ct.dec(e)}throw new Error}function lt(a,e,n,t){if(e===null)return a.typeName=="google.protobuf.NullValue"?0:t?a.values[0].no:ea;switch(typeof e){case"number":if(Number.isInteger(e))return e;break;case"string":const o=a.findName(e);if(o!==void 0)return o.no;if(n)return na;break}throw new Error(`cannot decode enum ${a.typeName} from JSON: ${ie(e)}`)}function PR(a){return a.repeated||a.kind=="map"?!0:!(a.oneof||a.kind=="message"||a.opt||a.req)}function Zi(a,e,n){if(a.kind=="map"){G(typeof e=="object"&&e!=null);const t={},o=Object.entries(e);switch(a.V.kind){case"scalar":for(const[r,c]of o)t[r.toString()]=aa(a.V.T,c);break;case"message":for(const[r,c]of o)t[r.toString()]=c.toJson(n);break;case"enum":const i=a.V.T;for(const[r,c]of o)t[r.toString()]=dt(i,c,n.enumAsInteger);break}return n.emitDefaultValues||o.length>0?t:void 0}if(a.repeated){G(Array.isArray(e));const t=[];switch(a.kind){case"scalar":for(let o=0;o<e.length;o++)t.push(aa(a.T,e[o]));break;case"enum":for(let o=0;o<e.length;o++)t.push(dt(a.T,e[o],n.enumAsInteger));break;case"message":for(let o=0;o<e.length;o++)t.push(e[o].toJson(n));break}return n.emitDefaultValues||t.length>0?t:void 0}switch(a.kind){case"scalar":return aa(a.T,e);case"enum":return dt(a.T,e,n.enumAsInteger);case"message":return ji(a.T,e).toJson(n)}}function dt(a,e,n){var t;if(G(typeof e=="number"),a.typeName=="google.protobuf.NullValue")return null;if(n)return e;const o=a.findNumber(e);return(t=o?.name)!==null&&t!==void 0?t:e}function aa(a,e){switch(a){case S.INT32:case S.SFIXED32:case S.SINT32:case S.FIXED32:case S.UINT32:return G(typeof e=="number"),e;case S.FLOAT:case S.DOUBLE:return G(typeof e=="number"),Number.isNaN(e)?"NaN":e===Number.POSITIVE_INFINITY?"Infinity":e===Number.NEGATIVE_INFINITY?"-Infinity":e;case S.STRING:return G(typeof e=="string"),e;case S.BOOL:return G(typeof e=="boolean"),e;case S.UINT64:case S.FIXED64:case S.INT64:case S.SFIXED64:case S.SINT64:return G(typeof e=="bigint"||typeof e=="string"||typeof e=="number"),e.toString();case S.BYTES:return G(e instanceof Uint8Array),ct.enc(e)}}const pn=Symbol("@bufbuild/protobuf/unknown-fields"),er={readUnknownFields:!0,readerFactory:a=>new zi(a)},nr={writeUnknownFields:!0,writerFactory:()=>new _R};function DR(a){return a?Object.assign(Object.assign({},er),a):er}function AR(a){return a?Object.assign(Object.assign({},nr),a):nr}function UR(){return{makeReadOptions:DR,makeWriteOptions:AR,listUnknownFields(a){var e;return(e=a[pn])!==null&&e!==void 0?e:[]},discardUnknownFields(a){delete a[pn]},writeUnknownFields(a,e){const t=a[pn];if(t)for(const o of t)e.tag(o.no,o.wireType).raw(o.data)},onUnknownField(a,e,n,t){const o=a;Array.isArray(o[pn])||(o[pn]=[]),o[pn].push({no:e,wireType:n,data:t})},readMessage(a,e,n,t,o){const i=a.getType(),r=o?e.len:e.pos+n;let c,l;for(;e.pos<r&&([c,l]=e.tag(),!(o===!0&&l==x.EndGroup));){const d=i.fields.find(c);if(!d){const u=e.skip(l,c);t.readUnknownFields&&this.onUnknownField(a,c,l,u);continue}ar(a,e,d,l,t)}if(o&&(l!=x.EndGroup||c!==n))throw new Error("invalid end group tag")},readField:ar,writeMessage(a,e,n){const t=a.getType();for(const o of t.fields.byNumber()){if(!Wi(o,a)){if(o.req)throw new Error(`cannot encode field ${t.typeName}.${o.name} to binary: required field not set`);continue}const i=o.oneof?a[o.oneof.localName].value:a[o.localName];tr(o,i,e,n)}return n.writeUnknownFields&&this.writeUnknownFields(a,e),e},writeField(a,e,n,t){e!==void 0&&tr(a,e,n,t)}}}function ar(a,e,n,t,o){let{repeated:i,localName:r}=n;switch(n.oneof&&(a=a[n.oneof.localName],a.case!=r&&delete a.value,a.case=r,r="value"),n.kind){case"scalar":case"enum":const c=n.kind=="enum"?S.INT32:n.T;let l=sa;if(n.kind=="scalar"&&n.L>0&&(l=LR),i){let I=a[r];if(t==x.LengthDelimited&&c!=S.STRING&&c!=S.BYTES){let O=e.uint32()+e.pos;for(;e.pos<O;)I.push(l(e,c))}else I.push(l(e,c))}else a[r]=l(e,c);break;case"message":const d=n.T;i?a[r].push(ta(e,new d,o,n)):en(a[r])?ta(e,a[r],o,n):(a[r]=ta(e,new d,o,n),d.fieldWrapper&&!n.oneof&&!n.repeated&&(a[r]=d.fieldWrapper.unwrapField(a[r])));break;case"map":let[u,h]=qR(n,e,o);a[r][u]=h;break}}function ta(a,e,n,t){const o=e.getType().runtime.bin,i=t?.delimited;return o.readMessage(e,a,i?t.no:a.uint32(),n,i),e}function qR(a,e,n){const t=e.uint32(),o=e.pos+t;let i,r;for(;e.pos<o;){const[c]=e.tag();switch(c){case 1:i=sa(e,a.K);break;case 2:switch(a.V.kind){case"scalar":r=sa(e,a.V.T);break;case"enum":r=e.int32();break;case"message":r=ta(e,new a.V.T,n,void 0);break}break}}if(i===void 0&&(i=dn(a.K,ze.BIGINT)),typeof i!="string"&&typeof i!="number"&&(i=i.toString()),r===void 0)switch(a.V.kind){case"scalar":r=dn(a.V.T,ze.BIGINT);break;case"enum":r=a.V.T.values[0].no;break;case"message":r=new a.V.T;break}return[i,r]}function LR(a,e){const n=sa(a,e);return typeof n=="bigint"?n.toString():n}function sa(a,e){switch(e){case S.STRING:return a.string();case S.BOOL:return a.bool();case S.DOUBLE:return a.double();case S.FLOAT:return a.float();case S.INT32:return a.int32();case S.INT64:return a.int64();case S.UINT64:return a.uint64();case S.FIXED64:return a.fixed64();case S.BYTES:return a.bytes();case S.FIXED32:return a.fixed32();case S.SFIXED32:return a.sfixed32();case S.SFIXED64:return a.sfixed64();case S.SINT64:return a.sint64();case S.UINT32:return a.uint32();case S.SINT32:return a.sint32()}}function tr(a,e,n,t){G(e!==void 0);const o=a.repeated;switch(a.kind){case"scalar":case"enum":let i=a.kind=="enum"?S.INT32:a.T;if(o)if(G(Array.isArray(e)),a.packed)BR(n,i,a.no,e);else for(const r of e)In(n,i,a.no,r);else In(n,i,a.no,e);break;case"message":if(o){G(Array.isArray(e));for(const r of e)sr(n,t,a,r)}else sr(n,t,a,e);break;case"map":G(typeof e=="object"&&e!=null);for(const[r,c]of Object.entries(e))GR(n,t,a,r,c);break}}function GR(a,e,n,t,o){a.tag(n.no,x.LengthDelimited),a.fork();let i=t;switch(n.K){case S.INT32:case S.FIXED32:case S.UINT32:case S.SFIXED32:case S.SINT32:i=Number.parseInt(t);break;case S.BOOL:G(t=="true"||t=="false"),i=t=="true";break}switch(In(a,n.K,1,i),n.V.kind){case"scalar":In(a,n.V.T,2,o);break;case"enum":In(a,S.INT32,2,o);break;case"message":G(o!==void 0),a.tag(2,x.LengthDelimited).bytes(o.toBinary(e));break}a.join()}function sr(a,e,n,t){const o=ji(n.T,t);n.delimited?a.tag(n.no,x.StartGroup).raw(o.toBinary(e)).tag(n.no,x.EndGroup):a.tag(n.no,x.LengthDelimited).bytes(o.toBinary(e))}function In(a,e,n,t){G(t!==void 0);let[o,i]=or(e);a.tag(n,o)[i](t)}function BR(a,e,n,t){if(!t.length)return;a.tag(n,x.LengthDelimited).fork();let[,o]=or(e);for(let i=0;i<t.length;i++)a[o](t[i]);a.join()}function or(a){let e=x.Varint;switch(a){case S.BYTES:case S.STRING:e=x.LengthDelimited;break;case S.DOUBLE:case S.FIXED64:case S.SFIXED64:e=x.Bit64;break;case S.FIXED32:case S.SFIXED32:case S.FLOAT:e=x.Bit32;break}const n=S[a].toLowerCase();return[e,n]}function FR(){return{setEnumType:Ai,initPartial(a,e){if(a===void 0)return;const n=e.getType();for(const t of n.fields.byMember()){const o=t.localName,i=e,r=a;if(r[o]!=null)switch(t.kind){case"oneof":const c=r[o].case;if(c===void 0)continue;const l=t.findField(c);let d=r[o].value;l&&l.kind=="message"&&!en(d,l.T)?d=new l.T(d):l&&l.kind==="scalar"&&l.T===S.BYTES&&(d=On(d)),i[o]={case:c,value:d};break;case"scalar":case"enum":let u=r[o];t.T===S.BYTES&&(u=t.repeated?u.map(On):On(u)),i[o]=u;break;case"map":switch(t.V.kind){case"scalar":case"enum":if(t.V.T===S.BYTES)for(const[R,O]of Object.entries(r[o]))i[o][R]=On(O);else Object.assign(i[o],r[o]);break;case"message":const I=t.V.T;for(const R of Object.keys(r[o])){let O=r[o][R];I.fieldWrapper||(O=new I(O)),i[o][R]=O}break}break;case"message":const h=t.T;if(t.repeated)i[o]=r[o].map(I=>en(I,h)?I:new h(I));else{const I=r[o];h.fieldWrapper?h.typeName==="google.protobuf.BytesValue"?i[o]=On(I):i[o]=I:i[o]=en(I,h)?I:new h(I)}break}}},equals(a,e,n){return e===n?!0:!e||!n?!1:a.fields.byMember().every(t=>{const o=e[t.localName],i=n[t.localName];if(t.repeated){if(o.length!==i.length)return!1;switch(t.kind){case"message":return o.every((r,c)=>t.T.equals(r,i[c]));case"scalar":return o.every((r,c)=>Ve(t.T,r,i[c]));case"enum":return o.every((r,c)=>Ve(S.INT32,r,i[c]))}throw new Error(`repeated cannot contain ${t.kind}`)}switch(t.kind){case"message":return t.T.equals(o,i);case"enum":return Ve(S.INT32,o,i);case"scalar":return Ve(t.T,o,i);case"oneof":if(o.case!==i.case)return!1;const r=t.findField(o.case);if(r===void 0)return!0;switch(r.kind){case"message":return r.T.equals(o.value,i.value);case"enum":return Ve(S.INT32,o.value,i.value);case"scalar":return Ve(r.T,o.value,i.value)}throw new Error(`oneof cannot contain ${r.kind}`);case"map":const c=Object.keys(o).concat(Object.keys(i));switch(t.V.kind){case"message":const l=t.V.T;return c.every(u=>l.equals(o[u],i[u]));case"enum":return c.every(u=>Ve(S.INT32,o[u],i[u]));case"scalar":const d=t.V.T;return c.every(u=>Ve(d,o[u],i[u]))}break}})},clone(a){const e=a.getType(),n=new e,t=n;for(const o of e.fields.byMember()){const i=a[o.localName];let r;if(o.repeated)r=i.map(oa);else if(o.kind=="map"){r=t[o.localName];for(const[c,l]of Object.entries(i))r[c]=oa(l)}else o.kind=="oneof"?r=o.findField(i.case)?{case:i.case,value:oa(i.value)}:{case:void 0}:r=oa(i);t[o.localName]=r}for(const o of e.runtime.bin.listUnknownFields(a))e.runtime.bin.onUnknownField(t,o.no,o.wireType,o.data);return n}}}function oa(a){if(a===void 0)return a;if(en(a))return a.clone();if(a instanceof Uint8Array){const e=new Uint8Array(a.byteLength);return e.set(a),e}return a}function On(a){return a instanceof Uint8Array?a:new Uint8Array(a)}function ir(a,e,n){return{syntax:a,json:CR(),bin:UR(),util:Object.assign(Object.assign({},FR()),{newFieldList:e,initFields:n}),makeMessageType(t,o,i){return kR(this,t,o,i)},makeEnum:TR,makeEnumType:Ui,getEnumType:gR,makeExtension(t,o,i){return SR(this,t,o,i)}}}class rr{constructor(e,n){this._fields=e,this._normalizer=n}findJsonName(e){if(!this.jsonNames){const n={};for(const t of this.list())n[t.jsonName]=n[t.name]=t;this.jsonNames=n}return this.jsonNames[e]}find(e){if(!this.numbers){const n={};for(const t of this.list())n[t.no]=t;this.numbers=n}return this.numbers[e]}list(){return this.all||(this.all=this._normalizer(this._fields)),this.all}byNumber(){return this.numbersAsc||(this.numbersAsc=this.list().concat().sort((e,n)=>e.no-n.no)),this.numbersAsc}byMember(){if(!this.members){this.members=[];const e=this.members;let n;for(const t of this.list())t.oneof?t.oneof!==n&&(n=t.oneof,e.push(n)):e.push(t)}return this.members}}function mr(a,e){const n=cr(a);return e?n:YR($R(n))}function xR(a){return mr(a,!1)}const JR=cr;function cr(a){let e=!1;const n=[];for(let t=0;t<a.length;t++){let o=a.charAt(t);switch(o){case"_":e=!0;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":n.push(o),e=!1;break;default:e&&(e=!1,o=o.toUpperCase()),n.push(o);break}}return n.join("")}const zR=new Set(["constructor","toString","toJSON","valueOf"]),VR=new Set(["getType","clone","equals","fromBinary","fromJson","fromJsonString","toBinary","toJson","toJsonString","toObject"]),lr=a=>`${a}$`,$R=a=>VR.has(a)?lr(a):a,YR=a=>zR.has(a)?lr(a):a;class WR{constructor(e){this.kind="oneof",this.repeated=!1,this.packed=!1,this.opt=!1,this.req=!1,this.default=void 0,this.fields=[],this.name=e,this.localName=xR(e)}addField(e){G(e.oneof===this,`field ${e.name} not one of ${this.name}`),this.fields.push(e)}findField(e){if(!this._lookup){this._lookup=Object.create(null);for(let n=0;n<this.fields.length;n++)this._lookup[this.fields[n].localName]=this.fields[n]}return this._lookup[e]}}function dr(a,e){var n,t,o,i,r,c;const l=[];let d;for(const u of typeof a=="function"?a():a){const h=u;if(h.localName=mr(u.name,u.oneof!==void 0),h.jsonName=(n=u.jsonName)!==null&&n!==void 0?n:JR(u.name),h.repeated=(t=u.repeated)!==null&&t!==void 0?t:!1,u.kind=="scalar"&&(h.L=(o=u.L)!==null&&o!==void 0?o:ze.BIGINT),h.delimited=(i=u.delimited)!==null&&i!==void 0?i:!1,h.req=(r=u.req)!==null&&r!==void 0?r:!1,h.opt=(c=u.opt)!==null&&c!==void 0?c:!1,u.packed===void 0&&(e?h.packed=u.kind=="enum"||u.kind=="scalar"&&u.T!=S.BYTES&&u.T!=S.STRING:h.packed=!1),u.oneof!==void 0){const I=typeof u.oneof=="string"?u.oneof:u.oneof.name;(!d||d.name!=I)&&(d=new WR(I)),h.oneof=d,d.addField(h)}l.push(h)}return l}const s=ir("proto3",a=>new rr(a,e=>dr(e,!0)),a=>{for(const e of a.getType().fields.byMember()){if(e.opt)continue;const n=e.localName,t=a;if(e.repeated){t[n]=[];continue}switch(e.kind){case"oneof":t[n]={case:void 0};break;case"enum":t[n]=0;break;case"map":t[n]={};break;case"scalar":t[n]=dn(e.T,e.L);break}}}),T=ir("proto2",a=>new rr(a,e=>dr(e,!1)),a=>{for(const e of a.getType().fields.byMember()){const n=e.localName,t=a;if(e.repeated){t[n]=[];continue}switch(e.kind){case"oneof":t[n]={case:void 0};break;case"map":t[n]={};break}}});var m;(function(a){a[a.Unary=0]="Unary",a[a.ServerStreaming=1]="ServerStreaming",a[a.ClientStreaming=2]="ClientStreaming",a[a.BiDiStreaming=3]="BiDiStreaming"})(m||(m={}));var pr;(function(a){a[a.NoSideEffects=1]="NoSideEffects",a[a.Idempotent=2]="Idempotent"})(pr||(pr={}));var te;(function(a){a[a.EDITION_UNKNOWN=0]="EDITION_UNKNOWN",a[a.EDITION_LEGACY=900]="EDITION_LEGACY",a[a.EDITION_PROTO2=998]="EDITION_PROTO2",a[a.EDITION_PROTO3=999]="EDITION_PROTO3",a[a.EDITION_2023=1e3]="EDITION_2023",a[a.EDITION_2024=1001]="EDITION_2024",a[a.EDITION_1_TEST_ONLY=1]="EDITION_1_TEST_ONLY",a[a.EDITION_2_TEST_ONLY=2]="EDITION_2_TEST_ONLY",a[a.EDITION_99997_TEST_ONLY=99997]="EDITION_99997_TEST_ONLY",a[a.EDITION_99998_TEST_ONLY=99998]="EDITION_99998_TEST_ONLY",a[a.EDITION_99999_TEST_ONLY=99999]="EDITION_99999_TEST_ONLY",a[a.EDITION_MAX=2147483647]="EDITION_MAX"})(te||(te={})),T.util.setEnumType(te,"google.protobuf.Edition",[{no:0,name:"EDITION_UNKNOWN"},{no:900,name:"EDITION_LEGACY"},{no:998,name:"EDITION_PROTO2"},{no:999,name:"EDITION_PROTO3"},{no:1e3,name:"EDITION_2023"},{no:1001,name:"EDITION_2024"},{no:1,name:"EDITION_1_TEST_ONLY"},{no:2,name:"EDITION_2_TEST_ONLY"},{no:99997,name:"EDITION_99997_TEST_ONLY"},{no:99998,name:"EDITION_99998_TEST_ONLY"},{no:99999,name:"EDITION_99999_TEST_ONLY"},{no:2147483647,name:"EDITION_MAX"}]);class $e extends w{constructor(e){super(),this.file=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new $e().fromBinary(e,n)}static fromJson(e,n){return new $e().fromJson(e,n)}static fromJsonString(e,n){return new $e().fromJsonString(e,n)}static equals(e,n){return T.util.equals($e,e,n)}}$e.runtime=T,$e.typeName="google.protobuf.FileDescriptorSet",$e.fields=T.util.newFieldList(()=>[{no:1,name:"file",kind:"message",T:re,repeated:!0}]);class re extends w{constructor(e){super(),this.dependency=[],this.publicDependency=[],this.weakDependency=[],this.messageType=[],this.enumType=[],this.service=[],this.extension=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new re().fromBinary(e,n)}static fromJson(e,n){return new re().fromJson(e,n)}static fromJsonString(e,n){return new re().fromJsonString(e,n)}static equals(e,n){return T.util.equals(re,e,n)}}re.runtime=T,re.typeName="google.protobuf.FileDescriptorProto",re.fields=T.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"package",kind:"scalar",T:9,opt:!0},{no:3,name:"dependency",kind:"scalar",T:9,repeated:!0},{no:10,name:"public_dependency",kind:"scalar",T:5,repeated:!0},{no:11,name:"weak_dependency",kind:"scalar",T:5,repeated:!0},{no:4,name:"message_type",kind:"message",T:me,repeated:!0},{no:5,name:"enum_type",kind:"message",T:ce,repeated:!0},{no:6,name:"service",kind:"message",T:be,repeated:!0},{no:7,name:"extension",kind:"message",T:se,repeated:!0},{no:8,name:"options",kind:"message",T:Ee,opt:!0},{no:9,name:"source_code_info",kind:"message",T:Ge,opt:!0},{no:12,name:"syntax",kind:"scalar",T:9,opt:!0},{no:14,name:"edition",kind:"enum",T:T.getEnumType(te),opt:!0}]);class me extends w{constructor(e){super(),this.field=[],this.extension=[],this.nestedType=[],this.enumType=[],this.extensionRange=[],this.oneofDecl=[],this.reservedRange=[],this.reservedName=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new me().fromBinary(e,n)}static fromJson(e,n){return new me().fromJson(e,n)}static fromJsonString(e,n){return new me().fromJsonString(e,n)}static equals(e,n){return T.util.equals(me,e,n)}}me.runtime=T,me.typeName="google.protobuf.DescriptorProto",me.fields=T.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"field",kind:"message",T:se,repeated:!0},{no:6,name:"extension",kind:"message",T:se,repeated:!0},{no:3,name:"nested_type",kind:"message",T:me,repeated:!0},{no:4,name:"enum_type",kind:"message",T:ce,repeated:!0},{no:5,name:"extension_range",kind:"message",T:he,repeated:!0},{no:8,name:"oneof_decl",kind:"message",T:Se,repeated:!0},{no:7,name:"options",kind:"message",T:we,opt:!0},{no:9,name:"reserved_range",kind:"message",T:fe,repeated:!0},{no:10,name:"reserved_name",kind:"scalar",T:9,repeated:!0}]);class he extends w{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new he().fromBinary(e,n)}static fromJson(e,n){return new he().fromJson(e,n)}static fromJsonString(e,n){return new he().fromJsonString(e,n)}static equals(e,n){return T.util.equals(he,e,n)}}he.runtime=T,he.typeName="google.protobuf.DescriptorProto.ExtensionRange",he.fields=T.util.newFieldList(()=>[{no:1,name:"start",kind:"scalar",T:5,opt:!0},{no:2,name:"end",kind:"scalar",T:5,opt:!0},{no:3,name:"options",kind:"message",T:Re,opt:!0}]);class fe extends w{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new fe().fromBinary(e,n)}static fromJson(e,n){return new fe().fromJson(e,n)}static fromJsonString(e,n){return new fe().fromJsonString(e,n)}static equals(e,n){return T.util.equals(fe,e,n)}}fe.runtime=T,fe.typeName="google.protobuf.DescriptorProto.ReservedRange",fe.fields=T.util.newFieldList(()=>[{no:1,name:"start",kind:"scalar",T:5,opt:!0},{no:2,name:"end",kind:"scalar",T:5,opt:!0}]);class Re extends w{constructor(e){super(),this.uninterpretedOption=[],this.declaration=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Re().fromBinary(e,n)}static fromJson(e,n){return new Re().fromJson(e,n)}static fromJsonString(e,n){return new Re().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Re,e,n)}}Re.runtime=T,Re.typeName="google.protobuf.ExtensionRangeOptions",Re.fields=T.util.newFieldList(()=>[{no:999,name:"uninterpreted_option",kind:"message",T:H,repeated:!0},{no:2,name:"declaration",kind:"message",T:_e,repeated:!0},{no:50,name:"features",kind:"message",T:$,opt:!0},{no:3,name:"verification",kind:"enum",T:T.getEnumType(bn),opt:!0,default:bn.UNVERIFIED}]);var bn;(function(a){a[a.DECLARATION=0]="DECLARATION",a[a.UNVERIFIED=1]="UNVERIFIED"})(bn||(bn={})),T.util.setEnumType(bn,"google.protobuf.ExtensionRangeOptions.VerificationState",[{no:0,name:"DECLARATION"},{no:1,name:"UNVERIFIED"}]);class _e extends w{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new _e().fromBinary(e,n)}static fromJson(e,n){return new _e().fromJson(e,n)}static fromJsonString(e,n){return new _e().fromJsonString(e,n)}static equals(e,n){return T.util.equals(_e,e,n)}}_e.runtime=T,_e.typeName="google.protobuf.ExtensionRangeOptions.Declaration",_e.fields=T.util.newFieldList(()=>[{no:1,name:"number",kind:"scalar",T:5,opt:!0},{no:2,name:"full_name",kind:"scalar",T:9,opt:!0},{no:3,name:"type",kind:"scalar",T:9,opt:!0},{no:5,name:"reserved",kind:"scalar",T:8,opt:!0},{no:6,name:"repeated",kind:"scalar",T:8,opt:!0}]);class se extends w{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new se().fromBinary(e,n)}static fromJson(e,n){return new se().fromJson(e,n)}static fromJsonString(e,n){return new se().fromJsonString(e,n)}static equals(e,n){return T.util.equals(se,e,n)}}se.runtime=T,se.typeName="google.protobuf.FieldDescriptorProto",se.fields=T.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:3,name:"number",kind:"scalar",T:5,opt:!0},{no:4,name:"label",kind:"enum",T:T.getEnumType(ra),opt:!0},{no:5,name:"type",kind:"enum",T:T.getEnumType(ia),opt:!0},{no:6,name:"type_name",kind:"scalar",T:9,opt:!0},{no:2,name:"extendee",kind:"scalar",T:9,opt:!0},{no:7,name:"default_value",kind:"scalar",T:9,opt:!0},{no:9,name:"oneof_index",kind:"scalar",T:5,opt:!0},{no:10,name:"json_name",kind:"scalar",T:9,opt:!0},{no:8,name:"options",kind:"message",T:Ce,opt:!0},{no:17,name:"proto3_optional",kind:"scalar",T:8,opt:!0}]);var ia;(function(a){a[a.DOUBLE=1]="DOUBLE",a[a.FLOAT=2]="FLOAT",a[a.INT64=3]="INT64",a[a.UINT64=4]="UINT64",a[a.INT32=5]="INT32",a[a.FIXED64=6]="FIXED64",a[a.FIXED32=7]="FIXED32",a[a.BOOL=8]="BOOL",a[a.STRING=9]="STRING",a[a.GROUP=10]="GROUP",a[a.MESSAGE=11]="MESSAGE",a[a.BYTES=12]="BYTES",a[a.UINT32=13]="UINT32",a[a.ENUM=14]="ENUM",a[a.SFIXED32=15]="SFIXED32",a[a.SFIXED64=16]="SFIXED64",a[a.SINT32=17]="SINT32",a[a.SINT64=18]="SINT64"})(ia||(ia={})),T.util.setEnumType(ia,"google.protobuf.FieldDescriptorProto.Type",[{no:1,name:"TYPE_DOUBLE"},{no:2,name:"TYPE_FLOAT"},{no:3,name:"TYPE_INT64"},{no:4,name:"TYPE_UINT64"},{no:5,name:"TYPE_INT32"},{no:6,name:"TYPE_FIXED64"},{no:7,name:"TYPE_FIXED32"},{no:8,name:"TYPE_BOOL"},{no:9,name:"TYPE_STRING"},{no:10,name:"TYPE_GROUP"},{no:11,name:"TYPE_MESSAGE"},{no:12,name:"TYPE_BYTES"},{no:13,name:"TYPE_UINT32"},{no:14,name:"TYPE_ENUM"},{no:15,name:"TYPE_SFIXED32"},{no:16,name:"TYPE_SFIXED64"},{no:17,name:"TYPE_SINT32"},{no:18,name:"TYPE_SINT64"}]);var ra;(function(a){a[a.OPTIONAL=1]="OPTIONAL",a[a.REPEATED=3]="REPEATED",a[a.REQUIRED=2]="REQUIRED"})(ra||(ra={})),T.util.setEnumType(ra,"google.protobuf.FieldDescriptorProto.Label",[{no:1,name:"LABEL_OPTIONAL"},{no:3,name:"LABEL_REPEATED"},{no:2,name:"LABEL_REQUIRED"}]);class Se extends w{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new Se().fromBinary(e,n)}static fromJson(e,n){return new Se().fromJson(e,n)}static fromJsonString(e,n){return new Se().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Se,e,n)}}Se.runtime=T,Se.typeName="google.protobuf.OneofDescriptorProto",Se.fields=T.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"options",kind:"message",T:Pe,opt:!0}]);class ce extends w{constructor(e){super(),this.value=[],this.reservedRange=[],this.reservedName=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new ce().fromBinary(e,n)}static fromJson(e,n){return new ce().fromJson(e,n)}static fromJsonString(e,n){return new ce().fromJsonString(e,n)}static equals(e,n){return T.util.equals(ce,e,n)}}ce.runtime=T,ce.typeName="google.protobuf.EnumDescriptorProto",ce.fields=T.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"value",kind:"message",T:Oe,repeated:!0},{no:3,name:"options",kind:"message",T:De,opt:!0},{no:4,name:"reserved_range",kind:"message",T:Ie,repeated:!0},{no:5,name:"reserved_name",kind:"scalar",T:9,repeated:!0}]);class Ie extends w{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new Ie().fromBinary(e,n)}static fromJson(e,n){return new Ie().fromJson(e,n)}static fromJsonString(e,n){return new Ie().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Ie,e,n)}}Ie.runtime=T,Ie.typeName="google.protobuf.EnumDescriptorProto.EnumReservedRange",Ie.fields=T.util.newFieldList(()=>[{no:1,name:"start",kind:"scalar",T:5,opt:!0},{no:2,name:"end",kind:"scalar",T:5,opt:!0}]);class Oe extends w{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new Oe().fromBinary(e,n)}static fromJson(e,n){return new Oe().fromJson(e,n)}static fromJsonString(e,n){return new Oe().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Oe,e,n)}}Oe.runtime=T,Oe.typeName="google.protobuf.EnumValueDescriptorProto",Oe.fields=T.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"number",kind:"scalar",T:5,opt:!0},{no:3,name:"options",kind:"message",T:Ae,opt:!0}]);class be extends w{constructor(e){super(),this.method=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new be().fromBinary(e,n)}static fromJson(e,n){return new be().fromJson(e,n)}static fromJsonString(e,n){return new be().fromJsonString(e,n)}static equals(e,n){return T.util.equals(be,e,n)}}be.runtime=T,be.typeName="google.protobuf.ServiceDescriptorProto",be.fields=T.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"method",kind:"message",T:Me,repeated:!0},{no:3,name:"options",kind:"message",T:Ue,opt:!0}]);class Me extends w{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new Me().fromBinary(e,n)}static fromJson(e,n){return new Me().fromJson(e,n)}static fromJsonString(e,n){return new Me().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Me,e,n)}}Me.runtime=T,Me.typeName="google.protobuf.MethodDescriptorProto",Me.fields=T.util.newFieldList(()=>[{no:1,name:"name",kind:"scalar",T:9,opt:!0},{no:2,name:"input_type",kind:"scalar",T:9,opt:!0},{no:3,name:"output_type",kind:"scalar",T:9,opt:!0},{no:4,name:"options",kind:"message",T:de,opt:!0},{no:5,name:"client_streaming",kind:"scalar",T:8,opt:!0,default:!1},{no:6,name:"server_streaming",kind:"scalar",T:8,opt:!0,default:!1}]);class Ee extends w{constructor(e){super(),this.uninterpretedOption=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Ee().fromBinary(e,n)}static fromJson(e,n){return new Ee().fromJson(e,n)}static fromJsonString(e,n){return new Ee().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Ee,e,n)}}Ee.runtime=T,Ee.typeName="google.protobuf.FileOptions",Ee.fields=T.util.newFieldList(()=>[{no:1,name:"java_package",kind:"scalar",T:9,opt:!0},{no:8,name:"java_outer_classname",kind:"scalar",T:9,opt:!0},{no:10,name:"java_multiple_files",kind:"scalar",T:8,opt:!0,default:!1},{no:20,name:"java_generate_equals_and_hash",kind:"scalar",T:8,opt:!0},{no:27,name:"java_string_check_utf8",kind:"scalar",T:8,opt:!0,default:!1},{no:9,name:"optimize_for",kind:"enum",T:T.getEnumType(Mn),opt:!0,default:Mn.SPEED},{no:11,name:"go_package",kind:"scalar",T:9,opt:!0},{no:16,name:"cc_generic_services",kind:"scalar",T:8,opt:!0,default:!1},{no:17,name:"java_generic_services",kind:"scalar",T:8,opt:!0,default:!1},{no:18,name:"py_generic_services",kind:"scalar",T:8,opt:!0,default:!1},{no:23,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:31,name:"cc_enable_arenas",kind:"scalar",T:8,opt:!0,default:!0},{no:36,name:"objc_class_prefix",kind:"scalar",T:9,opt:!0},{no:37,name:"csharp_namespace",kind:"scalar",T:9,opt:!0},{no:39,name:"swift_prefix",kind:"scalar",T:9,opt:!0},{no:40,name:"php_class_prefix",kind:"scalar",T:9,opt:!0},{no:41,name:"php_namespace",kind:"scalar",T:9,opt:!0},{no:44,name:"php_metadata_namespace",kind:"scalar",T:9,opt:!0},{no:45,name:"ruby_package",kind:"scalar",T:9,opt:!0},{no:50,name:"features",kind:"message",T:$,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:H,repeated:!0}]);var Mn;(function(a){a[a.SPEED=1]="SPEED",a[a.CODE_SIZE=2]="CODE_SIZE",a[a.LITE_RUNTIME=3]="LITE_RUNTIME"})(Mn||(Mn={})),T.util.setEnumType(Mn,"google.protobuf.FileOptions.OptimizeMode",[{no:1,name:"SPEED"},{no:2,name:"CODE_SIZE"},{no:3,name:"LITE_RUNTIME"}]);class we extends w{constructor(e){super(),this.uninterpretedOption=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new we().fromBinary(e,n)}static fromJson(e,n){return new we().fromJson(e,n)}static fromJsonString(e,n){return new we().fromJsonString(e,n)}static equals(e,n){return T.util.equals(we,e,n)}}we.runtime=T,we.typeName="google.protobuf.MessageOptions",we.fields=T.util.newFieldList(()=>[{no:1,name:"message_set_wire_format",kind:"scalar",T:8,opt:!0,default:!1},{no:2,name:"no_standard_descriptor_accessor",kind:"scalar",T:8,opt:!0,default:!1},{no:3,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:7,name:"map_entry",kind:"scalar",T:8,opt:!0},{no:11,name:"deprecated_legacy_json_field_conflicts",kind:"scalar",T:8,opt:!0},{no:12,name:"features",kind:"message",T:$,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:H,repeated:!0}]);class Ce extends w{constructor(e){super(),this.targets=[],this.editionDefaults=[],this.uninterpretedOption=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Ce().fromBinary(e,n)}static fromJson(e,n){return new Ce().fromJson(e,n)}static fromJsonString(e,n){return new Ce().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Ce,e,n)}}Ce.runtime=T,Ce.typeName="google.protobuf.FieldOptions",Ce.fields=T.util.newFieldList(()=>[{no:1,name:"ctype",kind:"enum",T:T.getEnumType(En),opt:!0,default:En.STRING},{no:2,name:"packed",kind:"scalar",T:8,opt:!0},{no:6,name:"jstype",kind:"enum",T:T.getEnumType(wn),opt:!0,default:wn.JS_NORMAL},{no:5,name:"lazy",kind:"scalar",T:8,opt:!0,default:!1},{no:15,name:"unverified_lazy",kind:"scalar",T:8,opt:!0,default:!1},{no:3,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:10,name:"weak",kind:"scalar",T:8,opt:!0,default:!1},{no:16,name:"debug_redact",kind:"scalar",T:8,opt:!0,default:!1},{no:17,name:"retention",kind:"enum",T:T.getEnumType(ma),opt:!0},{no:19,name:"targets",kind:"enum",T:T.getEnumType(ca),repeated:!0},{no:20,name:"edition_defaults",kind:"message",T:Ne,repeated:!0},{no:21,name:"features",kind:"message",T:$,opt:!0},{no:22,name:"feature_support",kind:"message",T:le,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:H,repeated:!0}]);var En;(function(a){a[a.STRING=0]="STRING",a[a.CORD=1]="CORD",a[a.STRING_PIECE=2]="STRING_PIECE"})(En||(En={})),T.util.setEnumType(En,"google.protobuf.FieldOptions.CType",[{no:0,name:"STRING"},{no:1,name:"CORD"},{no:2,name:"STRING_PIECE"}]);var wn;(function(a){a[a.JS_NORMAL=0]="JS_NORMAL",a[a.JS_STRING=1]="JS_STRING",a[a.JS_NUMBER=2]="JS_NUMBER"})(wn||(wn={})),T.util.setEnumType(wn,"google.protobuf.FieldOptions.JSType",[{no:0,name:"JS_NORMAL"},{no:1,name:"JS_STRING"},{no:2,name:"JS_NUMBER"}]);var ma;(function(a){a[a.RETENTION_UNKNOWN=0]="RETENTION_UNKNOWN",a[a.RETENTION_RUNTIME=1]="RETENTION_RUNTIME",a[a.RETENTION_SOURCE=2]="RETENTION_SOURCE"})(ma||(ma={})),T.util.setEnumType(ma,"google.protobuf.FieldOptions.OptionRetention",[{no:0,name:"RETENTION_UNKNOWN"},{no:1,name:"RETENTION_RUNTIME"},{no:2,name:"RETENTION_SOURCE"}]);var ca;(function(a){a[a.TARGET_TYPE_UNKNOWN=0]="TARGET_TYPE_UNKNOWN",a[a.TARGET_TYPE_FILE=1]="TARGET_TYPE_FILE",a[a.TARGET_TYPE_EXTENSION_RANGE=2]="TARGET_TYPE_EXTENSION_RANGE",a[a.TARGET_TYPE_MESSAGE=3]="TARGET_TYPE_MESSAGE",a[a.TARGET_TYPE_FIELD=4]="TARGET_TYPE_FIELD",a[a.TARGET_TYPE_ONEOF=5]="TARGET_TYPE_ONEOF",a[a.TARGET_TYPE_ENUM=6]="TARGET_TYPE_ENUM",a[a.TARGET_TYPE_ENUM_ENTRY=7]="TARGET_TYPE_ENUM_ENTRY",a[a.TARGET_TYPE_SERVICE=8]="TARGET_TYPE_SERVICE",a[a.TARGET_TYPE_METHOD=9]="TARGET_TYPE_METHOD"})(ca||(ca={})),T.util.setEnumType(ca,"google.protobuf.FieldOptions.OptionTargetType",[{no:0,name:"TARGET_TYPE_UNKNOWN"},{no:1,name:"TARGET_TYPE_FILE"},{no:2,name:"TARGET_TYPE_EXTENSION_RANGE"},{no:3,name:"TARGET_TYPE_MESSAGE"},{no:4,name:"TARGET_TYPE_FIELD"},{no:5,name:"TARGET_TYPE_ONEOF"},{no:6,name:"TARGET_TYPE_ENUM"},{no:7,name:"TARGET_TYPE_ENUM_ENTRY"},{no:8,name:"TARGET_TYPE_SERVICE"},{no:9,name:"TARGET_TYPE_METHOD"}]);class Ne extends w{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new Ne().fromBinary(e,n)}static fromJson(e,n){return new Ne().fromJson(e,n)}static fromJsonString(e,n){return new Ne().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Ne,e,n)}}Ne.runtime=T,Ne.typeName="google.protobuf.FieldOptions.EditionDefault",Ne.fields=T.util.newFieldList(()=>[{no:3,name:"edition",kind:"enum",T:T.getEnumType(te),opt:!0},{no:2,name:"value",kind:"scalar",T:9,opt:!0}]);class le extends w{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new le().fromBinary(e,n)}static fromJson(e,n){return new le().fromJson(e,n)}static fromJsonString(e,n){return new le().fromJsonString(e,n)}static equals(e,n){return T.util.equals(le,e,n)}}le.runtime=T,le.typeName="google.protobuf.FieldOptions.FeatureSupport",le.fields=T.util.newFieldList(()=>[{no:1,name:"edition_introduced",kind:"enum",T:T.getEnumType(te),opt:!0},{no:2,name:"edition_deprecated",kind:"enum",T:T.getEnumType(te),opt:!0},{no:3,name:"deprecation_warning",kind:"scalar",T:9,opt:!0},{no:4,name:"edition_removed",kind:"enum",T:T.getEnumType(te),opt:!0}]);class Pe extends w{constructor(e){super(),this.uninterpretedOption=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Pe().fromBinary(e,n)}static fromJson(e,n){return new Pe().fromJson(e,n)}static fromJsonString(e,n){return new Pe().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Pe,e,n)}}Pe.runtime=T,Pe.typeName="google.protobuf.OneofOptions",Pe.fields=T.util.newFieldList(()=>[{no:1,name:"features",kind:"message",T:$,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:H,repeated:!0}]);class De extends w{constructor(e){super(),this.uninterpretedOption=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new De().fromBinary(e,n)}static fromJson(e,n){return new De().fromJson(e,n)}static fromJsonString(e,n){return new De().fromJsonString(e,n)}static equals(e,n){return T.util.equals(De,e,n)}}De.runtime=T,De.typeName="google.protobuf.EnumOptions",De.fields=T.util.newFieldList(()=>[{no:2,name:"allow_alias",kind:"scalar",T:8,opt:!0},{no:3,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:6,name:"deprecated_legacy_json_field_conflicts",kind:"scalar",T:8,opt:!0},{no:7,name:"features",kind:"message",T:$,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:H,repeated:!0}]);class Ae extends w{constructor(e){super(),this.uninterpretedOption=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Ae().fromBinary(e,n)}static fromJson(e,n){return new Ae().fromJson(e,n)}static fromJsonString(e,n){return new Ae().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Ae,e,n)}}Ae.runtime=T,Ae.typeName="google.protobuf.EnumValueOptions",Ae.fields=T.util.newFieldList(()=>[{no:1,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:2,name:"features",kind:"message",T:$,opt:!0},{no:3,name:"debug_redact",kind:"scalar",T:8,opt:!0,default:!1},{no:4,name:"feature_support",kind:"message",T:le,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:H,repeated:!0}]);class Ue extends w{constructor(e){super(),this.uninterpretedOption=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Ue().fromBinary(e,n)}static fromJson(e,n){return new Ue().fromJson(e,n)}static fromJsonString(e,n){return new Ue().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Ue,e,n)}}Ue.runtime=T,Ue.typeName="google.protobuf.ServiceOptions",Ue.fields=T.util.newFieldList(()=>[{no:34,name:"features",kind:"message",T:$,opt:!0},{no:33,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:999,name:"uninterpreted_option",kind:"message",T:H,repeated:!0}]);class de extends w{constructor(e){super(),this.uninterpretedOption=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new de().fromBinary(e,n)}static fromJson(e,n){return new de().fromJson(e,n)}static fromJsonString(e,n){return new de().fromJsonString(e,n)}static equals(e,n){return T.util.equals(de,e,n)}}de.runtime=T,de.typeName="google.protobuf.MethodOptions",de.fields=T.util.newFieldList(()=>[{no:33,name:"deprecated",kind:"scalar",T:8,opt:!0,default:!1},{no:34,name:"idempotency_level",kind:"enum",T:T.getEnumType(Cn),opt:!0,default:Cn.IDEMPOTENCY_UNKNOWN},{no:35,name:"features",kind:"message",T:$,opt:!0},{no:999,name:"uninterpreted_option",kind:"message",T:H,repeated:!0}]);var Cn;(function(a){a[a.IDEMPOTENCY_UNKNOWN=0]="IDEMPOTENCY_UNKNOWN",a[a.NO_SIDE_EFFECTS=1]="NO_SIDE_EFFECTS",a[a.IDEMPOTENT=2]="IDEMPOTENT"})(Cn||(Cn={})),T.util.setEnumType(Cn,"google.protobuf.MethodOptions.IdempotencyLevel",[{no:0,name:"IDEMPOTENCY_UNKNOWN"},{no:1,name:"NO_SIDE_EFFECTS"},{no:2,name:"IDEMPOTENT"}]);class H extends w{constructor(e){super(),this.name=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new H().fromBinary(e,n)}static fromJson(e,n){return new H().fromJson(e,n)}static fromJsonString(e,n){return new H().fromJsonString(e,n)}static equals(e,n){return T.util.equals(H,e,n)}}H.runtime=T,H.typeName="google.protobuf.UninterpretedOption",H.fields=T.util.newFieldList(()=>[{no:2,name:"name",kind:"message",T:qe,repeated:!0},{no:3,name:"identifier_value",kind:"scalar",T:9,opt:!0},{no:4,name:"positive_int_value",kind:"scalar",T:4,opt:!0},{no:5,name:"negative_int_value",kind:"scalar",T:3,opt:!0},{no:6,name:"double_value",kind:"scalar",T:1,opt:!0},{no:7,name:"string_value",kind:"scalar",T:12,opt:!0},{no:8,name:"aggregate_value",kind:"scalar",T:9,opt:!0}]);class qe extends w{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new qe().fromBinary(e,n)}static fromJson(e,n){return new qe().fromJson(e,n)}static fromJsonString(e,n){return new qe().fromJsonString(e,n)}static equals(e,n){return T.util.equals(qe,e,n)}}qe.runtime=T,qe.typeName="google.protobuf.UninterpretedOption.NamePart",qe.fields=T.util.newFieldList(()=>[{no:1,name:"name_part",kind:"scalar",T:9,req:!0},{no:2,name:"is_extension",kind:"scalar",T:8,req:!0}]);class $ extends w{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new $().fromBinary(e,n)}static fromJson(e,n){return new $().fromJson(e,n)}static fromJsonString(e,n){return new $().fromJsonString(e,n)}static equals(e,n){return T.util.equals($,e,n)}}$.runtime=T,$.typeName="google.protobuf.FeatureSet",$.fields=T.util.newFieldList(()=>[{no:1,name:"field_presence",kind:"enum",T:T.getEnumType(la),opt:!0},{no:2,name:"enum_type",kind:"enum",T:T.getEnumType(da),opt:!0},{no:3,name:"repeated_field_encoding",kind:"enum",T:T.getEnumType(pa),opt:!0},{no:4,name:"utf8_validation",kind:"enum",T:T.getEnumType(ua),opt:!0},{no:5,name:"message_encoding",kind:"enum",T:T.getEnumType(ga),opt:!0},{no:6,name:"json_format",kind:"enum",T:T.getEnumType(Ta),opt:!0}]);var la;(function(a){a[a.FIELD_PRESENCE_UNKNOWN=0]="FIELD_PRESENCE_UNKNOWN",a[a.EXPLICIT=1]="EXPLICIT",a[a.IMPLICIT=2]="IMPLICIT",a[a.LEGACY_REQUIRED=3]="LEGACY_REQUIRED"})(la||(la={})),T.util.setEnumType(la,"google.protobuf.FeatureSet.FieldPresence",[{no:0,name:"FIELD_PRESENCE_UNKNOWN"},{no:1,name:"EXPLICIT"},{no:2,name:"IMPLICIT"},{no:3,name:"LEGACY_REQUIRED"}]);var da;(function(a){a[a.ENUM_TYPE_UNKNOWN=0]="ENUM_TYPE_UNKNOWN",a[a.OPEN=1]="OPEN",a[a.CLOSED=2]="CLOSED"})(da||(da={})),T.util.setEnumType(da,"google.protobuf.FeatureSet.EnumType",[{no:0,name:"ENUM_TYPE_UNKNOWN"},{no:1,name:"OPEN"},{no:2,name:"CLOSED"}]);var pa;(function(a){a[a.REPEATED_FIELD_ENCODING_UNKNOWN=0]="REPEATED_FIELD_ENCODING_UNKNOWN",a[a.PACKED=1]="PACKED",a[a.EXPANDED=2]="EXPANDED"})(pa||(pa={})),T.util.setEnumType(pa,"google.protobuf.FeatureSet.RepeatedFieldEncoding",[{no:0,name:"REPEATED_FIELD_ENCODING_UNKNOWN"},{no:1,name:"PACKED"},{no:2,name:"EXPANDED"}]);var ua;(function(a){a[a.UTF8_VALIDATION_UNKNOWN=0]="UTF8_VALIDATION_UNKNOWN",a[a.VERIFY=2]="VERIFY",a[a.NONE=3]="NONE"})(ua||(ua={})),T.util.setEnumType(ua,"google.protobuf.FeatureSet.Utf8Validation",[{no:0,name:"UTF8_VALIDATION_UNKNOWN"},{no:2,name:"VERIFY"},{no:3,name:"NONE"}]);var ga;(function(a){a[a.MESSAGE_ENCODING_UNKNOWN=0]="MESSAGE_ENCODING_UNKNOWN",a[a.LENGTH_PREFIXED=1]="LENGTH_PREFIXED",a[a.DELIMITED=2]="DELIMITED"})(ga||(ga={})),T.util.setEnumType(ga,"google.protobuf.FeatureSet.MessageEncoding",[{no:0,name:"MESSAGE_ENCODING_UNKNOWN"},{no:1,name:"LENGTH_PREFIXED"},{no:2,name:"DELIMITED"}]);var Ta;(function(a){a[a.JSON_FORMAT_UNKNOWN=0]="JSON_FORMAT_UNKNOWN",a[a.ALLOW=1]="ALLOW",a[a.LEGACY_BEST_EFFORT=2]="LEGACY_BEST_EFFORT"})(Ta||(Ta={})),T.util.setEnumType(Ta,"google.protobuf.FeatureSet.JsonFormat",[{no:0,name:"JSON_FORMAT_UNKNOWN"},{no:1,name:"ALLOW"},{no:2,name:"LEGACY_BEST_EFFORT"}]);class Ye extends w{constructor(e){super(),this.defaults=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Ye().fromBinary(e,n)}static fromJson(e,n){return new Ye().fromJson(e,n)}static fromJsonString(e,n){return new Ye().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Ye,e,n)}}Ye.runtime=T,Ye.typeName="google.protobuf.FeatureSetDefaults",Ye.fields=T.util.newFieldList(()=>[{no:1,name:"defaults",kind:"message",T:Le,repeated:!0},{no:4,name:"minimum_edition",kind:"enum",T:T.getEnumType(te),opt:!0},{no:5,name:"maximum_edition",kind:"enum",T:T.getEnumType(te),opt:!0}]);class Le extends w{constructor(e){super(),T.util.initPartial(e,this)}static fromBinary(e,n){return new Le().fromBinary(e,n)}static fromJson(e,n){return new Le().fromJson(e,n)}static fromJsonString(e,n){return new Le().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Le,e,n)}}Le.runtime=T,Le.typeName="google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault",Le.fields=T.util.newFieldList(()=>[{no:3,name:"edition",kind:"enum",T:T.getEnumType(te),opt:!0},{no:4,name:"overridable_features",kind:"message",T:$,opt:!0},{no:5,name:"fixed_features",kind:"message",T:$,opt:!0}]);class Ge extends w{constructor(e){super(),this.location=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Ge().fromBinary(e,n)}static fromJson(e,n){return new Ge().fromJson(e,n)}static fromJsonString(e,n){return new Ge().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Ge,e,n)}}Ge.runtime=T,Ge.typeName="google.protobuf.SourceCodeInfo",Ge.fields=T.util.newFieldList(()=>[{no:1,name:"location",kind:"message",T:Be,repeated:!0}]);class Be extends w{constructor(e){super(),this.path=[],this.span=[],this.leadingDetachedComments=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Be().fromBinary(e,n)}static fromJson(e,n){return new Be().fromJson(e,n)}static fromJsonString(e,n){return new Be().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Be,e,n)}}Be.runtime=T,Be.typeName="google.protobuf.SourceCodeInfo.Location",Be.fields=T.util.newFieldList(()=>[{no:1,name:"path",kind:"scalar",T:5,repeated:!0,packed:!0},{no:2,name:"span",kind:"scalar",T:5,repeated:!0,packed:!0},{no:3,name:"leading_comments",kind:"scalar",T:9,opt:!0},{no:4,name:"trailing_comments",kind:"scalar",T:9,opt:!0},{no:6,name:"leading_detached_comments",kind:"scalar",T:9,repeated:!0}]);class We extends w{constructor(e){super(),this.annotation=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new We().fromBinary(e,n)}static fromJson(e,n){return new We().fromJson(e,n)}static fromJsonString(e,n){return new We().fromJsonString(e,n)}static equals(e,n){return T.util.equals(We,e,n)}}We.runtime=T,We.typeName="google.protobuf.GeneratedCodeInfo",We.fields=T.util.newFieldList(()=>[{no:1,name:"annotation",kind:"message",T:Fe,repeated:!0}]);class Fe extends w{constructor(e){super(),this.path=[],T.util.initPartial(e,this)}static fromBinary(e,n){return new Fe().fromBinary(e,n)}static fromJson(e,n){return new Fe().fromJson(e,n)}static fromJsonString(e,n){return new Fe().fromJsonString(e,n)}static equals(e,n){return T.util.equals(Fe,e,n)}}Fe.runtime=T,Fe.typeName="google.protobuf.GeneratedCodeInfo.Annotation",Fe.fields=T.util.newFieldList(()=>[{no:1,name:"path",kind:"scalar",T:5,repeated:!0,packed:!0},{no:2,name:"source_file",kind:"scalar",T:9,opt:!0},{no:3,name:"begin",kind:"scalar",T:5,opt:!0},{no:4,name:"end",kind:"scalar",T:5,opt:!0},{no:5,name:"semantic",kind:"enum",T:T.getEnumType(ka),opt:!0}]);var ka;(function(a){a[a.NONE=0]="NONE",a[a.SET=1]="SET",a[a.ALIAS=2]="ALIAS"})(ka||(ka={})),T.util.setEnumType(ka,"google.protobuf.GeneratedCodeInfo.Annotation.Semantic",[{no:0,name:"NONE"},{no:1,name:"SET"},{no:2,name:"ALIAS"}]);class _ extends w{constructor(e){super(),this.seconds=W.zero,this.nanos=0,s.util.initPartial(e,this)}fromJson(e,n){if(typeof e!="string")throw new Error(`cannot decode google.protobuf.Timestamp from JSON: ${s.json.debug(e)}`);const t=e.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);if(!t)throw new Error("cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string");const o=Date.parse(t[1]+"-"+t[2]+"-"+t[3]+"T"+t[4]+":"+t[5]+":"+t[6]+(t[8]?t[8]:"Z"));if(Number.isNaN(o))throw new Error("cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string");if(o<Date.parse("0001-01-01T00:00:00Z")||o>Date.parse("9999-12-31T23:59:59Z"))throw new Error("cannot decode message google.protobuf.Timestamp from JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive");return this.seconds=W.parse(o/1e3),this.nanos=0,t[7]&&(this.nanos=parseInt("1"+t[7]+"0".repeat(9-t[7].length))-1e9),this}toJson(e){const n=Number(this.seconds)*1e3;if(n<Date.parse("0001-01-01T00:00:00Z")||n>Date.parse("9999-12-31T23:59:59Z"))throw new Error("cannot encode google.protobuf.Timestamp to JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive");if(this.nanos<0)throw new Error("cannot encode google.protobuf.Timestamp to JSON: nanos must not be negative");let t="Z";if(this.nanos>0){const o=(this.nanos+1e9).toString().substring(1);o.substring(3)==="000000"?t="."+o.substring(0,3)+"Z":o.substring(6)==="000"?t="."+o.substring(0,6)+"Z":t="."+o+"Z"}return new Date(n).toISOString().replace(".000Z",t)}toDate(){return new Date(Number(this.seconds)*1e3+Math.ceil(this.nanos/1e6))}static now(){return _.fromDate(new Date)}static fromDate(e){const n=e.getTime();return new _({seconds:W.parse(Math.floor(n/1e3)),nanos:n%1e3*1e6})}static fromBinary(e,n){return new _().fromBinary(e,n)}static fromJson(e,n){return new _().fromJson(e,n)}static fromJsonString(e,n){return new _().fromJsonString(e,n)}static equals(e,n){return s.util.equals(_,e,n)}}_.runtime=s,_.typeName="google.protobuf.Timestamp",_.fields=s.util.newFieldList(()=>[{no:1,name:"seconds",kind:"scalar",T:3},{no:2,name:"nanos",kind:"scalar",T:5}]);class J extends w{constructor(e){super(),this.seconds=W.zero,this.nanos=0,s.util.initPartial(e,this)}fromJson(e,n){if(typeof e!="string")throw new Error(`cannot decode google.protobuf.Duration from JSON: ${s.json.debug(e)}`);const t=e.match(/^(-?[0-9]+)(?:\.([0-9]+))?s/);if(t===null)throw new Error(`cannot decode google.protobuf.Duration from JSON: ${s.json.debug(e)}`);const o=Number(t[1]);if(o>315576e6||o<-315576e6)throw new Error(`cannot decode google.protobuf.Duration from JSON: ${s.json.debug(e)}`);if(this.seconds=W.parse(o),typeof t[2]=="string"){const i=t[2]+"0".repeat(9-t[2].length);this.nanos=parseInt(i),(o<0||Object.is(o,-0))&&(this.nanos=-this.nanos)}return this}toJson(e){if(Number(this.seconds)>315576e6||Number(this.seconds)<-315576e6)throw new Error("cannot encode google.protobuf.Duration to JSON: value out of range");let n=this.seconds.toString();if(this.nanos!==0){let t=Math.abs(this.nanos).toString();t="0".repeat(9-t.length)+t,t.substring(3)==="000000"?t=t.substring(0,3):t.substring(6)==="000"&&(t=t.substring(0,6)),n+="."+t,this.nanos<0&&Number(this.seconds)==0&&(n="-"+n)}return n+"s"}static fromBinary(e,n){return new J().fromBinary(e,n)}static fromJson(e,n){return new J().fromJson(e,n)}static fromJsonString(e,n){return new J().fromJsonString(e,n)}static equals(e,n){return s.util.equals(J,e,n)}}J.runtime=s,J.typeName="google.protobuf.Duration",J.fields=s.util.newFieldList(()=>[{no:1,name:"seconds",kind:"scalar",T:3},{no:2,name:"nanos",kind:"scalar",T:5}]);class Z extends w{constructor(e){super(),this.typeUrl="",this.value=new Uint8Array(0),s.util.initPartial(e,this)}toJson(e){var n;if(this.typeUrl==="")return{};const t=this.typeUrlToName(this.typeUrl),o=(n=e?.typeRegistry)===null||n===void 0?void 0:n.findMessage(t);if(!o)throw new Error(`cannot encode message google.protobuf.Any to JSON: "${this.typeUrl}" is not in the type registry`);let r=o.fromBinary(this.value).toJson(e);return(t.startsWith("google.protobuf.")||r===null||Array.isArray(r)||typeof r!="object")&&(r={value:r}),r["@type"]=this.typeUrl,r}fromJson(e,n){var t;if(e===null||Array.isArray(e)||typeof e!="object")throw new Error(`cannot decode message google.protobuf.Any from JSON: expected object but got ${e===null?"null":Array.isArray(e)?"array":typeof e}`);if(Object.keys(e).length==0)return this;const o=e["@type"];if(typeof o!="string"||o=="")throw new Error('cannot decode message google.protobuf.Any from JSON: "@type" is empty');const i=this.typeUrlToName(o),r=(t=n?.typeRegistry)===null||t===void 0?void 0:t.findMessage(i);if(!r)throw new Error(`cannot decode message google.protobuf.Any from JSON: ${o} is not in the type registry`);let c;if(i.startsWith("google.protobuf.")&&Object.prototype.hasOwnProperty.call(e,"value"))c=r.fromJson(e.value,n);else{const l=Object.assign({},e);delete l["@type"],c=r.fromJson(l,n)}return this.packFrom(c),this}packFrom(e){this.value=e.toBinary(),this.typeUrl=this.typeNameToUrl(e.getType().typeName)}unpackTo(e){return this.is(e.getType())?(e.fromBinary(this.value),!0):!1}unpack(e){if(this.typeUrl==="")return;const n=e.findMessage(this.typeUrlToName(this.typeUrl));if(n)return n.fromBinary(this.value)}is(e){if(this.typeUrl==="")return!1;const n=this.typeUrlToName(this.typeUrl);let t="";return typeof e=="string"?t=e:t=e.typeName,n===t}typeNameToUrl(e){return`type.googleapis.com/${e}`}typeUrlToName(e){if(!e.length)throw new Error(`invalid type url: ${e}`);const n=e.lastIndexOf("/"),t=n>=0?e.substring(n+1):e;if(!t.length)throw new Error(`invalid type url: ${e}`);return t}static pack(e){const n=new Z;return n.packFrom(e),n}static fromBinary(e,n){return new Z().fromBinary(e,n)}static fromJson(e,n){return new Z().fromJson(e,n)}static fromJsonString(e,n){return new Z().fromJsonString(e,n)}static equals(e,n){return s.util.equals(Z,e,n)}}Z.runtime=s,Z.typeName="google.protobuf.Any",Z.fields=s.util.newFieldList(()=>[{no:1,name:"type_url",kind:"scalar",T:9},{no:2,name:"value",kind:"scalar",T:12}]);class pe extends w{constructor(e){super(),this.paths=[],s.util.initPartial(e,this)}toJson(e){function n(t){let o=!1;const i=[];for(let r=0;r<t.length;r++){let c=t.charAt(r);switch(c){case"_":o=!0;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":i.push(c),o=!1;break;default:o&&(o=!1,c=c.toUpperCase()),i.push(c);break}}return i.join("")}return this.paths.map(t=>{if(t.match(/_[0-9]?_/g)||t.match(/[A-Z]/g))throw new Error('cannot encode google.protobuf.FieldMask to JSON: lowerCamelCase of path name "'+t+'" is irreversible');return n(t)}).join(",")}fromJson(e,n){if(typeof e!="string")throw new Error("cannot decode google.protobuf.FieldMask from JSON: "+s.json.debug(e));if(e==="")return this;function t(o){if(o.includes("_"))throw new Error("cannot decode google.protobuf.FieldMask from JSON: path names must be lowerCamelCase");const i=o.replace(/[A-Z]/g,r=>"_"+r.toLowerCase());return i[0]==="_"?i.substring(1):i}return this.paths=e.split(",").map(t),this}static fromBinary(e,n){return new pe().fromBinary(e,n)}static fromJson(e,n){return new pe().fromJson(e,n)}static fromJsonString(e,n){return new pe().fromJsonString(e,n)}static equals(e,n){return s.util.equals(pe,e,n)}}pe.runtime=s,pe.typeName="google.protobuf.FieldMask",pe.fields=s.util.newFieldList(()=>[{no:1,name:"paths",kind:"scalar",T:9,repeated:!0}]);var Nn;(function(a){a[a.NULL_VALUE=0]="NULL_VALUE"})(Nn||(Nn={})),s.util.setEnumType(Nn,"google.protobuf.NullValue",[{no:0,name:"NULL_VALUE"}]);class p extends w{constructor(e){super(),this.fields={},s.util.initPartial(e,this)}toJson(e){const n={};for(const[t,o]of Object.entries(this.fields))n[t]=o.toJson(e);return n}fromJson(e,n){if(typeof e!="object"||e==null||Array.isArray(e))throw new Error("cannot decode google.protobuf.Struct from JSON "+s.json.debug(e));for(const[t,o]of Object.entries(e))this.fields[t]=ee.fromJson(o);return this}static fromBinary(e,n){return new p().fromBinary(e,n)}static fromJson(e,n){return new p().fromJson(e,n)}static fromJsonString(e,n){return new p().fromJsonString(e,n)}static equals(e,n){return s.util.equals(p,e,n)}}p.runtime=s,p.typeName="google.protobuf.Struct",p.fields=s.util.newFieldList(()=>[{no:1,name:"fields",kind:"map",K:9,V:{kind:"message",T:ee}}]);class ee extends w{constructor(e){super(),this.kind={case:void 0},s.util.initPartial(e,this)}toJson(e){switch(this.kind.case){case"nullValue":return null;case"numberValue":if(!Number.isFinite(this.kind.value))throw new Error("google.protobuf.Value cannot be NaN or Infinity");return this.kind.value;case"boolValue":return this.kind.value;case"stringValue":return this.kind.value;case"structValue":case"listValue":return this.kind.value.toJson(Object.assign(Object.assign({},e),{emitDefaultValues:!0}))}throw new Error("google.protobuf.Value must have a value")}fromJson(e,n){switch(typeof e){case"number":this.kind={case:"numberValue",value:e};break;case"string":this.kind={case:"stringValue",value:e};break;case"boolean":this.kind={case:"boolValue",value:e};break;case"object":e===null?this.kind={case:"nullValue",value:Nn.NULL_VALUE}:Array.isArray(e)?this.kind={case:"listValue",value:ue.fromJson(e)}:this.kind={case:"structValue",value:p.fromJson(e)};break;default:throw new Error("cannot decode google.protobuf.Value from JSON "+s.json.debug(e))}return this}static fromBinary(e,n){return new ee().fromBinary(e,n)}static fromJson(e,n){return new ee().fromJson(e,n)}static fromJsonString(e,n){return new ee().fromJsonString(e,n)}static equals(e,n){return s.util.equals(ee,e,n)}}ee.runtime=s,ee.typeName="google.protobuf.Value",ee.fields=s.util.newFieldList(()=>[{no:1,name:"null_value",kind:"enum",T:s.getEnumType(Nn),oneof:"kind"},{no:2,name:"number_value",kind:"scalar",T:1,oneof:"kind"},{no:3,name:"string_value",kind:"scalar",T:9,oneof:"kind"},{no:4,name:"bool_value",kind:"scalar",T:8,oneof:"kind"},{no:5,name:"struct_value",kind:"message",T:p,oneof:"kind"},{no:6,name:"list_value",kind:"message",T:ue,oneof:"kind"}]);class ue extends w{constructor(e){super(),this.values=[],s.util.initPartial(e,this)}toJson(e){return this.values.map(n=>n.toJson())}fromJson(e,n){if(!Array.isArray(e))throw new Error("cannot decode google.protobuf.ListValue from JSON "+s.json.debug(e));for(let t of e)this.values.push(ee.fromJson(t));return this}static fromBinary(e,n){return new ue().fromBinary(e,n)}static fromJson(e,n){return new ue().fromJson(e,n)}static fromJsonString(e,n){return new ue().fromJsonString(e,n)}static equals(e,n){return s.util.equals(ue,e,n)}}ue.runtime=s,ue.typeName="google.protobuf.ListValue",ue.fields=s.util.newFieldList(()=>[{no:1,name:"values",kind:"message",T:ee,repeated:!0}]),g.Code=void 0,function(a){a[a.Canceled=1]="Canceled",a[a.Unknown=2]="Unknown",a[a.InvalidArgument=3]="InvalidArgument",a[a.DeadlineExceeded=4]="DeadlineExceeded",a[a.NotFound=5]="NotFound",a[a.AlreadyExists=6]="AlreadyExists",a[a.PermissionDenied=7]="PermissionDenied",a[a.ResourceExhausted=8]="ResourceExhausted",a[a.FailedPrecondition=9]="FailedPrecondition",a[a.Aborted=10]="Aborted",a[a.OutOfRange=11]="OutOfRange",a[a.Unimplemented=12]="Unimplemented",a[a.Internal=13]="Internal",a[a.Unavailable=14]="Unavailable",a[a.DataLoss=15]="DataLoss",a[a.Unauthenticated=16]="Unauthenticated"}(g.Code||(g.Code={}));function ur(a){const e=g.Code[a];return typeof e!="string"?a.toString():e[0].toLowerCase()+e.substring(1).replace(/[A-Z]/g,n=>"_"+n.toLowerCase())}class C extends Error{constructor(e,n=g.Code.Unknown,t,o,i){super(HR(e,n)),this.name="ConnectError",Object.setPrototypeOf(this,new.target.prototype),this.rawMessage=e,this.code=n,this.metadata=new Headers(t??{}),this.details=o??[],this.cause=i}static from(e,n=g.Code.Unknown){return e instanceof C?e:e instanceof Error?e.name=="AbortError"?new C(e.message,g.Code.Canceled):new C(e.message,n,void 0,void 0,e):new C(String(e),n,void 0,void 0,e)}static[Symbol.hasInstance](e){return e instanceof Error?Object.getPrototypeOf(e)===C.prototype?!0:e.name==="ConnectError"&&"code"in e&&typeof e.code=="number"&&"metadata"in e&&"details"in e&&Array.isArray(e.details)&&"rawMessage"in e&&typeof e.rawMessage=="string"&&"cause"in e:!1}findDetails(e){const n="typeName"in e?{findMessage:o=>o===e.typeName?e:void 0}:e,t=[];for(const o of this.details){if("getType"in o){n.findMessage(o.getType().typeName)&&t.push(o);continue}const i=n.findMessage(o.type);if(i)try{t.push(i.fromBinary(o.value))}catch{}}return t}}function HR(a,e){return a.length?`[${ur(e)}] ${a}`:`[${ur(e)}]`}function jR(a,e,n){try{const t=ct.dec(a);return e?e.fromBinary(t,n):t}catch(t){throw C.from(t,g.Code.DataLoss)}}function KR(a,e){const n={};for(const[t,o]of Object.entries(a.methods)){const i=e(Object.assign(Object.assign({},o),{localName:t,service:a}));i!=null&&(n[t]=i)}return n}const gr=1;function Tr(a){let e,n=new Uint8Array(0);function t(o){const i=new Uint8Array(n.length+o.length);i.set(n),i.set(o,n.length),n=i}return new ReadableStream({start(){e=a.getReader()},async pull(o){let i;for(;;){if(i===void 0&&n.byteLength>=5){let l=0;for(let d=1;d<5;d++)l=(l<<8)+n[d];i={flags:n[0],length:l}}if(i!==void 0&&n.byteLength>=i.length+5)break;const c=await e.read();if(c.done)break;t(c.value)}if(i===void 0){if(n.byteLength==0){o.close();return}o.error(new C("premature end of stream",g.Code.DataLoss));return}const r=n.subarray(5,5+i.length);n=n.subarray(5+i.length),o.enqueue({flags:i.flags,data:r})}})}function kr(a,e){const n=new Uint8Array(e.length+5);n.set(e,5);const t=new DataView(n.buffer,n.byteOffset,n.byteLength);return t.setUint8(0,a),t.setUint32(1,e.length),n}var XR=function(a){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=a[Symbol.asyncIterator],n;return e?e.call(a):(a=typeof __values=="function"?__values(a):a[Symbol.iterator](),n={},t("next"),t("throw"),t("return"),n[Symbol.asyncIterator]=function(){return this},n);function t(i){n[i]=a[i]&&function(r){return new Promise(function(c,l){r=a[i](r),o(c,l,r.done,r.value)})}}function o(i,r,c,l){Promise.resolve(l).then(function(d){i({value:d,done:c})},r)}},Pn=function(a){return this instanceof Pn?(this.v=a,this):new Pn(a)},QR=function(a,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=n.apply(a,e||[]),o,i=[];return o={},c("next"),c("throw"),c("return",r),o[Symbol.asyncIterator]=function(){return this},o;function r(R){return function(O){return Promise.resolve(O).then(R,h)}}function c(R,O){t[R]&&(o[R]=function(b){return new Promise(function(N,V){i.push([R,b,N,V])>1||l(R,b)})},O&&(o[R]=O(o[R])))}function l(R,O){try{d(t[R](O))}catch(b){I(i[0][3],b)}}function d(R){R.value instanceof Pn?Promise.resolve(R.value.v).then(u,h):I(i[0][2],R)}function u(R){l("next",R)}function h(R){l("throw",R)}function I(R,O){R(O),i.shift(),i.length&&l(i[0][0],i[0][1])}},ZR=function(a){var e,n;return e={},t("next"),t("throw",function(o){throw o}),t("return"),e[Symbol.iterator]=function(){return this},e;function t(o,i){e[o]=a[o]?function(r){return(n=!n)?{value:Pn(a[o](r)),done:!1}:i?i(r):r}:i}};function e1(){const a=[],e=[];let n,t,o,i=new Promise((l,d)=>{t=l,o=d}),r=!1;function c(){for(const l of a.splice(0,a.length))l({done:!0,value:void 0})}return{close(){r=!0,c()},async write(l){if(r)throw n??new Error("cannot write, WritableIterable already closed");const d=a.shift();if(d===void 0)e.push(l);else if(d({done:!1,value:l}),a.length>0)return;const u=e.length+1;for(let h=0;h<u;h++)await i},[Symbol.asyncIterator](){return{next(){t(),i=new Promise((h,I)=>{t=h,o=I});const l=e.shift();if(l!==void 0)return Promise.resolve({done:!1,value:l});if(r)return Promise.resolve({done:!0,value:void 0});let d;const u=new Promise(h=>d=h);return a.push(d),u},throw(l){return n=l,r=!0,e.splice(0,e.length),i.catch(()=>{}),o(n),c(),Promise.resolve({done:!0,value:void 0})},return(){return r=!0,e.splice(0,e.length),t(),i=Promise.reject(new Error("cannot write, consumer called return")),i.catch(()=>{}),c(),Promise.resolve({done:!0,value:void 0})}}}}}function pt(a){return QR(this,arguments,function*(){yield Pn(yield*ZR(XR(a)))})}var yr=function(a){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=a[Symbol.asyncIterator],n;return e?e.call(a):(a=typeof __values=="function"?__values(a):a[Symbol.iterator](),n={},t("next"),t("throw"),t("return"),n[Symbol.asyncIterator]=function(){return this},n);function t(i){n[i]=a[i]&&function(r){return new Promise(function(c,l){r=a[i](r),o(c,l,r.done,r.value)})}}function o(i,r,c,l){Promise.resolve(l).then(function(d){i({value:d,done:c})},r)}},un=function(a){return this instanceof un?(this.v=a,this):new un(a)},n1=function(a){var e,n;return e={},t("next"),t("throw",function(o){throw o}),t("return"),e[Symbol.iterator]=function(){return this},e;function t(o,i){e[o]=a[o]?function(r){return(n=!n)?{value:un(a[o](r)),done:!1}:i?i(r):r}:i}},a1=function(a,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=n.apply(a,e||[]),o,i=[];return o={},c("next"),c("throw"),c("return",r),o[Symbol.asyncIterator]=function(){return this},o;function r(R){return function(O){return Promise.resolve(O).then(R,h)}}function c(R,O){t[R]&&(o[R]=function(b){return new Promise(function(N,V){i.push([R,b,N,V])>1||l(R,b)})},O&&(o[R]=O(o[R])))}function l(R,O){try{d(t[R](O))}catch(b){I(i[0][3],b)}}function d(R){R.value instanceof un?Promise.resolve(R.value.v).then(u,h):I(i[0][2],R)}function u(R){l("next",R)}function h(R){l("throw",R)}function I(R,O){R(O),i.shift(),i.length&&l(i[0][0],i[0][1])}};function X(a,e){return KR(a,n=>{switch(n.kind){case m.Unary:return t1(e,a,n);case m.ServerStreaming:return s1(e,a,n);case m.ClientStreaming:return o1(e,a,n);case m.BiDiStreaming:return i1(e,a,n);default:return null}})}function t1(a,e,n){return async function(t,o){var i,r;const c=await a.unary(e,n,o?.signal,o?.timeoutMs,o?.headers,t,o?.contextValues);return(i=o?.onHeader)===null||i===void 0||i.call(o,c.header),(r=o?.onTrailer)===null||r===void 0||r.call(o,c.trailer),c.message}}function s1(a,e,n){return function(t,o){return vr(a.stream(e,n,o?.signal,o?.timeoutMs,o?.headers,pt([t]),o?.contextValues),o)}}function o1(a,e,n){return async function(t,o){var i,r,c,l,d,u;const h=await a.stream(e,n,o?.signal,o?.timeoutMs,o?.headers,t,o?.contextValues);(d=o?.onHeader)===null||d===void 0||d.call(o,h.header);let I,R=0;try{for(var O=!0,b=yr(h.message),N;N=await b.next(),i=N.done,!i;O=!0)l=N.value,O=!1,I=l,R++}catch(V){r={error:V}}finally{try{!O&&!i&&(c=b.return)&&await c.call(b)}finally{if(r)throw r.error}}if(!I)throw new C("protocol error: missing response message",g.Code.Unimplemented);if(R>1)throw new C("protocol error: received extra messages for client streaming method",g.Code.Unimplemented);return(u=o?.onTrailer)===null||u===void 0||u.call(o,h.trailer),I}}function i1(a,e,n){return function(t,o){return vr(a.stream(e,n,o?.signal,o?.timeoutMs,o?.headers,t,o?.contextValues),o)}}function vr(a,e){const n=function(){return a1(this,arguments,function*(){var t,o;const i=yield un(a);(t=e?.onHeader)===null||t===void 0||t.call(e,i.header),yield un(yield*n1(yr(i.message))),(o=e?.onTrailer)===null||o===void 0||o.call(e,i.trailer)})}()[Symbol.asyncIterator]();return{[Symbol.asyncIterator]:()=>({next:()=>n.next()})}}function r1(...a){const e=new AbortController,n=a.filter(o=>o!==void 0).concat(e.signal);for(const o of n){if(o.aborted){t.apply(o);break}o.addEventListener("abort",t)}function t(){e.signal.aborted||e.abort(hr(this));for(const o of n)o.removeEventListener("abort",t)}return e}function m1(a){const e=new AbortController,n=()=>{e.abort(new C("the operation timed out",g.Code.DeadlineExceeded))};let t;return a!==void 0&&(a<=0?n():t=setTimeout(n,a)),{signal:e.signal,cleanup:()=>clearTimeout(t)}}function hr(a){if(!a.aborted)return;if(a.reason!==void 0)return a.reason;const e=new Error("This operation was aborted");return e.name="AbortError",e}function ya(){return{get(a){return a.id in this?this[a.id]:a.defaultValue},set(a,e){return this[a.id]=e,this},delete(a){return delete this[a.id],this}}}const ut=128;function fr(a){const e=new Headers,n=new TextDecoder().decode(a).split(`\r
|
|
3
|
+
`);for(const t of n){if(t==="")continue;const o=t.indexOf(":");if(o>0){const i=t.substring(0,o).trim(),r=t.substring(o+1).trim();e.append(i,r)}}return e}const c1="Content-Type",l1="Grpc-Timeout",gn="Grpc-Status",Rr="Grpc-Message",d1="Grpc-Status-Details-Bin",p1="X-User-Agent",u1="X-Grpc-Web",g1="application/grpc-web+proto",T1="application/grpc-web+json";let va=class Kn extends w{constructor(e){super(),this.code=0,this.message="",this.details=[],s.util.initPartial(e,this)}static fromBinary(e,n){return new Kn().fromBinary(e,n)}static fromJson(e,n){return new Kn().fromJson(e,n)}static fromJsonString(e,n){return new Kn().fromJsonString(e,n)}static equals(e,n){return s.util.equals(Kn,e,n)}};va.runtime=s,va.typeName="google.rpc.Status",va.fields=s.util.newFieldList(()=>[{no:1,name:"code",kind:"scalar",T:5},{no:2,name:"message",kind:"scalar",T:9},{no:3,name:"details",kind:"message",T:Z,repeated:!0}]);const k1="0";function _r(a){var e;const n=a.get(d1);if(n!=null){const o=jR(n,va);if(o.code==0)return;const i=new C(o.message,o.code,a);return i.details=o.details.map(r=>({type:r.typeUrl.substring(r.typeUrl.lastIndexOf("/")+1),value:r.value})),i}const t=a.get(gn);if(t!=null){if(t===k1)return;const o=parseInt(t,10);return o in g.Code?new C(decodeURIComponent((e=a.get(Rr))!==null&&e!==void 0?e:""),o,a):new C(`invalid grpc-status: ${t}`,g.Code.Internal,a)}}function Sr(a,e,n){const t=typeof e=="string"?e:e.typeName,o=typeof n=="string"?n:n.name;return a.toString().replace(/\/?$/,`/${t}/${o}`)}function Ir(a,e){return e instanceof a?e:new a(e)}function y1(a,e){function n(t){return t.done===!0?t:{done:t.done,value:Ir(a,t.value)}}return{[Symbol.asyncIterator](){const t=e[Symbol.asyncIterator](),o={next:()=>t.next().then(n)};return t.throw!==void 0&&(o.throw=i=>t.throw(i).then(n)),t.return!==void 0&&(o.return=i=>t.return(i).then(n)),o}}}function Or(a,e){var n;return(n=e?.concat().reverse().reduce((t,o)=>o(t),a))!==null&&n!==void 0?n:a}function v1(a){var e;const n=Object.assign({},a);return(e=n.ignoreUnknownFields)!==null&&e!==void 0||(n.ignoreUnknownFields=!0),n}function gt(a,e,n,t){const o=e?br(a.I,t):Mr(a.I,n);return{parse:(e?br(a.O,t):Mr(a.O,n)).parse,serialize:o.serialize}}function br(a,e){return{parse(n){try{return a.fromBinary(n,e)}catch(t){const o=t instanceof Error?t.message:String(t);throw new C(`parse binary: ${o}`,g.Code.Internal)}},serialize(n){try{return n.toBinary(e)}catch(t){const o=t instanceof Error?t.message:String(t);throw new C(`serialize binary: ${o}`,g.Code.Internal)}}}}function Mr(a,e){var n,t;const o=(n=e?.textEncoder)!==null&&n!==void 0?n:new TextEncoder,i=(t=e?.textDecoder)!==null&&t!==void 0?t:new TextDecoder,r=v1(e);return{parse(c){try{const l=i.decode(c);return a.fromJsonString(l,r)}catch(l){throw C.from(l,g.Code.InvalidArgument)}},serialize(c){try{const l=c.toJsonString(r);return o.encode(l)}catch(l){throw C.from(l,g.Code.Internal)}}}}function Er(a){const e=Or(a.next,a.interceptors),[n,t,o]=Cr(a),i=Object.assign(Object.assign({},a.req),{message:Ir(a.req.method.I,a.req.message),signal:n});return e(i).then(r=>(o(),r),t)}function wr(a){const e=Or(a.next,a.interceptors),[n,t,o]=Cr(a),i=Object.assign(Object.assign({},a.req),{message:y1(a.req.method.I,a.req.message),signal:n});let r=!1;return n.addEventListener("abort",function(){var c,l;const d=a.req.message[Symbol.asyncIterator]();r||(c=d.throw)===null||c===void 0||c.call(d,this.reason).catch(()=>{}),(l=d.return)===null||l===void 0||l.call(d).catch(()=>{})}),e(i).then(c=>Object.assign(Object.assign({},c),{message:{[Symbol.asyncIterator](){const l=c.message[Symbol.asyncIterator]();return{next(){return l.next().then(d=>(d.done==!0&&(r=!0,o()),d),t)}}}}}),t)}function Cr(a){const{signal:e,cleanup:n}=m1(a.timeoutMs),t=r1(a.signal,e);return[t.signal,function(i){const r=C.from(e.aborted?hr(e):i);return t.abort(r),n(),Promise.reject(r)},function(){n(),t.abort()}]}var Q=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Nr={},Tt={},ha=Q&&Q.__assign||function(){return ha=Object.assign||function(a){for(var e,n=1,t=arguments.length;n<t;n++){e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(a[o]=e[o])}return a},ha.apply(this,arguments)};Object.defineProperty(Tt,"__esModule",{value:!0});var h1={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function f1(a){var e=ha(ha({},h1),a);return e.numOfAttempts<1&&(e.numOfAttempts=1),e}Tt.getSanitizedOptions=f1;var kt={},yt={},fa={},vt={},ht={};Object.defineProperty(ht,"__esModule",{value:!0});function R1(a){var e=Math.random()*a;return Math.round(e)}ht.fullJitter=R1;var ft={};Object.defineProperty(ft,"__esModule",{value:!0});function _1(a){return a}ft.noJitter=_1,Object.defineProperty(vt,"__esModule",{value:!0});var S1=ht,I1=ft;function O1(a){switch(a.jitter){case"full":return S1.fullJitter;case"none":default:return I1.noJitter}}vt.JitterFactory=O1,Object.defineProperty(fa,"__esModule",{value:!0});var b1=vt,M1=function(){function a(e){this.options=e,this.attempt=0}return a.prototype.apply=function(){var e=this;return new Promise(function(n){return setTimeout(n,e.jitteredDelay)})},a.prototype.setAttemptNumber=function(e){this.attempt=e},Object.defineProperty(a.prototype,"jitteredDelay",{get:function(){var e=b1.JitterFactory(this.options);return e(this.delay)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"delay",{get:function(){var e=this.options.startingDelay,n=this.options.timeMultiple,t=this.numOfDelayedAttempts,o=e*Math.pow(n,t);return Math.min(o,this.options.maxDelay)},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt},enumerable:!0,configurable:!0}),a}();fa.Delay=M1;var E1=Q&&Q.__extends||function(){var a=function(e,n){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var i in o)o.hasOwnProperty(i)&&(t[i]=o[i])},a(e,n)};return function(e,n){a(e,n);function t(){this.constructor=e}e.prototype=n===null?Object.create(n):(t.prototype=n.prototype,new t)}}(),w1=Q&&Q.__awaiter||function(a,e,n,t){function o(i){return i instanceof n?i:new n(function(r){r(i)})}return new(n||(n=Promise))(function(i,r){function c(u){try{d(t.next(u))}catch(h){r(h)}}function l(u){try{d(t.throw(u))}catch(h){r(h)}}function d(u){u.done?i(u.value):o(u.value).then(c,l)}d((t=t.apply(a,e||[])).next())})},C1=Q&&Q.__generator||function(a,e){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},t,o,i,r;return r={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(r[Symbol.iterator]=function(){return this}),r;function c(d){return function(u){return l([d,u])}}function l(d){if(t)throw new TypeError("Generator is already executing.");for(;n;)try{if(t=1,o&&(i=d[0]&2?o.return:d[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,d[1])).done)return i;switch(o=0,i&&(d=[d[0]&2,i.value]),d[0]){case 0:case 1:i=d;break;case 4:return n.label++,{value:d[1],done:!1};case 5:n.label++,o=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!i||d[1]>i[0]&&d[1]<i[3])){n.label=d[1];break}if(d[0]===6&&n.label<i[1]){n.label=i[1],i=d;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(d);break}i[2]&&n.ops.pop(),n.trys.pop();continue}d=e.call(a,n)}catch(u){d=[6,u],o=0}finally{t=i=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}};Object.defineProperty(yt,"__esModule",{value:!0});var N1=fa,P1=function(a){E1(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e.prototype.apply=function(){return w1(this,void 0,void 0,function(){return C1(this,function(n){return[2,this.isFirstAttempt?!0:a.prototype.apply.call(this)]})})},Object.defineProperty(e.prototype,"isFirstAttempt",{get:function(){return this.attempt===0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt-1},enumerable:!0,configurable:!0}),e}(N1.Delay);yt.SkipFirstDelay=P1;var Rt={},D1=Q&&Q.__extends||function(){var a=function(e,n){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var i in o)o.hasOwnProperty(i)&&(t[i]=o[i])},a(e,n)};return function(e,n){a(e,n);function t(){this.constructor=e}e.prototype=n===null?Object.create(n):(t.prototype=n.prototype,new t)}}();Object.defineProperty(Rt,"__esModule",{value:!0});var A1=fa,U1=function(a){D1(e,a);function e(){return a!==null&&a.apply(this,arguments)||this}return e}(A1.Delay);Rt.AlwaysDelay=U1,Object.defineProperty(kt,"__esModule",{value:!0});var q1=yt,L1=Rt;function G1(a,e){var n=B1(a);return n.setAttemptNumber(e),n}kt.DelayFactory=G1;function B1(a){return a.delayFirstAttempt?new L1.AlwaysDelay(a):new q1.SkipFirstDelay(a)}var _t=Q&&Q.__awaiter||function(a,e,n,t){function o(i){return i instanceof n?i:new n(function(r){r(i)})}return new(n||(n=Promise))(function(i,r){function c(u){try{d(t.next(u))}catch(h){r(h)}}function l(u){try{d(t.throw(u))}catch(h){r(h)}}function d(u){u.done?i(u.value):o(u.value).then(c,l)}d((t=t.apply(a,e||[])).next())})},St=Q&&Q.__generator||function(a,e){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},t,o,i,r;return r={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(r[Symbol.iterator]=function(){return this}),r;function c(d){return function(u){return l([d,u])}}function l(d){if(t)throw new TypeError("Generator is already executing.");for(;n;)try{if(t=1,o&&(i=d[0]&2?o.return:d[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,d[1])).done)return i;switch(o=0,i&&(d=[d[0]&2,i.value]),d[0]){case 0:case 1:i=d;break;case 4:return n.label++,{value:d[1],done:!1};case 5:n.label++,o=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!i||d[1]>i[0]&&d[1]<i[3])){n.label=d[1];break}if(d[0]===6&&n.label<i[1]){n.label=i[1],i=d;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(d);break}i[2]&&n.ops.pop(),n.trys.pop();continue}d=e.call(a,n)}catch(u){d=[6,u],o=0}finally{t=i=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}};Object.defineProperty(Nr,"__esModule",{value:!0});var F1=Tt,x1=kt;function J1(a,e){return e===void 0&&(e={}),_t(this,void 0,void 0,function(){var n,t;return St(this,function(o){switch(o.label){case 0:return n=F1.getSanitizedOptions(e),t=new z1(a,n),[4,t.execute()];case 1:return[2,o.sent()]}})})}var It=Nr.backOff=J1,z1=function(){function a(e,n){this.request=e,this.options=n,this.attemptNumber=0}return a.prototype.execute=function(){return _t(this,void 0,void 0,function(){var e,n;return St(this,function(t){switch(t.label){case 0:if(this.attemptLimitReached)return[3,7];t.label=1;case 1:return t.trys.push([1,4,,6]),[4,this.applyDelay()];case 2:return t.sent(),[4,this.request()];case 3:return[2,t.sent()];case 4:return e=t.sent(),this.attemptNumber++,[4,this.options.retry(e,this.attemptNumber)];case 5:if(n=t.sent(),!n||this.attemptLimitReached)throw e;return[3,6];case 6:return[3,0];case 7:throw new Error("Something went wrong.")}})})},Object.defineProperty(a.prototype,"attemptLimitReached",{get:function(){return this.attemptNumber>=this.options.numOfAttempts},enumerable:!0,configurable:!0}),a.prototype.applyDelay=function(){return _t(this,void 0,void 0,function(){var e;return St(this,function(n){switch(n.label){case 0:return e=x1.DelayFactory(this.options,this.attemptNumber),[4,e.apply()];case 1:return n.sent(),[2]}})})},a}(),Pr={exports:{}};(function(a,e){(function(n,t){a.exports=t()})(Q,function(){return function(n){var t={};function o(i){if(t[i])return t[i].exports;var r=t[i]={i,l:!1,exports:{}};return n[i].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=n,o.c=t,o.d=function(i,r,c){o.o(i,r)||Object.defineProperty(i,r,{enumerable:!0,get:c})},o.r=function(i){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},o.t=function(i,r){if(1&r&&(i=o(i)),8&r||4&r&&typeof i=="object"&&i&&i.__esModule)return i;var c=Object.create(null);if(o.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:i}),2&r&&typeof i!="string")for(var l in i)o.d(c,l,function(d){return i[d]}.bind(null,l));return c},o.n=function(i){var r=i&&i.__esModule?function(){return i.default}:function(){return i};return o.d(r,"a",r),r},o.o=function(i,r){return Object.prototype.hasOwnProperty.call(i,r)},o.p="",o(o.s=0)}([function(n,t,o){o.r(t),o.d(t,"UuidTool",function(){return c}),o.d(t,"Uuid",function(){return r});var i={uuid:/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i},r=function(){function l(d){this.id="",typeof d=="string"?this.fromString(d):Array.isArray(d)?this.fromBytes(d):this.generate()}return l.fromJson=function(d){if(typeof d=="string"&&(d=JSON.parse(d)),!d||!d.id)throw new TypeError("The input cannot be converted to Uuid.");return new l(d.id)},l.prototype.generate=function(){var d=new Array(16).fill(0).map(function(){return 256*Math.random()&255});return d[6]=79&(64|d[6]),this.fromBytes(d),this},l.prototype.fromBytes=function(d){return this.id=d.map(function(u){return("00"+u.toString(16)).slice(-2)}).join("").replace(/(.{8})(.{4})(.{4})(.{4})(.{12})/,"$1-$2-$3-$4-$5"),this.id=this.toString(),this},l.prototype.toBytes=function(){return(this.id.replace(/-/g,"").match(/.{2}/g)||[]).map(function(d){return parseInt(d,16)})},l.prototype.fromString=function(d){return this.id=d.trim(),this.id=this.toString(),this},l.prototype.toString=function(){switch(l.stringExportFormat){default:case"lowercase":return this.id.toLowerCase();case"uppercase":return this.id.toUpperCase()}},l.prototype.isValid=function(){return typeof this.id=="string"&&this.id.length===36&&i.uuid.test(this.id)},l.prototype.equals=function(d){return typeof d=="string"&&(d=new l(d)),this.toString()===d.toString()},l.stringExportFormat="lowercase",l}(),c=function(){function l(){}return l.toBytes=function(d){return new r().fromString(d).toBytes()},l.toString=function(d){return new r().fromBytes(d).toString()},l.newUuid=function(){return new r().toString()},l.isUuid=function(d){return new r().fromString(d).isValid()},l.compare=function(d,u){return new r(d).equals(new r(u))},l}()}])})})(Pr);var Dn=Pr.exports;const Dr=s.makeMessageType("proto.rpc.v1.Credentials",()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"payload",kind:"scalar",T:9}]),Ot=s.makeMessageType("proto.rpc.v1.AuthenticateRequest",()=>[{no:1,name:"entity",kind:"scalar",T:9},{no:2,name:"credentials",kind:"message",T:Dr}]),V1=s.makeMessageType("proto.rpc.v1.AuthenticateResponse",()=>[{no:1,name:"access_token",kind:"scalar",T:9}]),$1=s.makeMessageType("proto.rpc.v1.AuthenticateToRequest",()=>[{no:1,name:"entity",kind:"scalar",T:9}]),Y1=s.makeMessageType("proto.rpc.v1.AuthenticateToResponse",()=>[{no:1,name:"access_token",kind:"scalar",T:9}]),W1={typeName:"proto.rpc.v1.AuthService",methods:{authenticate:{name:"Authenticate",I:Ot,O:V1,kind:m.Unary}}},H1={typeName:"proto.rpc.v1.ExternalAuthService",methods:{authenticateTo:{name:"AuthenticateTo",I:$1,O:Y1,kind:m.Unary}}},Tn=s.makeMessageType("google.rpc.Status",()=>[{no:1,name:"code",kind:"scalar",T:5},{no:2,name:"message",kind:"scalar",T:9},{no:3,name:"details",kind:"message",T:Z,repeated:!0}]),An=s.makeMessageType("proto.rpc.webrtc.v1.ICECandidate",()=>[{no:1,name:"candidate",kind:"scalar",T:9},{no:2,name:"sdp_mid",kind:"scalar",T:9,opt:!0},{no:3,name:"sdpm_line_index",kind:"scalar",T:13,opt:!0},{no:4,name:"username_fragment",kind:"scalar",T:9,opt:!0}]),Ar=s.makeMessageType("proto.rpc.webrtc.v1.CallRequest",()=>[{no:1,name:"sdp",kind:"scalar",T:9},{no:2,name:"disable_trickle",kind:"scalar",T:8}]),j1=s.makeMessageType("proto.rpc.webrtc.v1.CallResponseInitStage",()=>[{no:1,name:"sdp",kind:"scalar",T:9}]),K1=s.makeMessageType("proto.rpc.webrtc.v1.CallResponseUpdateStage",()=>[{no:1,name:"candidate",kind:"message",T:An}]),X1=s.makeMessageType("proto.rpc.webrtc.v1.CallResponse",()=>[{no:1,name:"uuid",kind:"scalar",T:9},{no:2,name:"init",kind:"message",T:j1,oneof:"stage"},{no:3,name:"update",kind:"message",T:K1,oneof:"stage"}]),Ra=s.makeMessageType("proto.rpc.webrtc.v1.CallUpdateRequest",()=>[{no:1,name:"uuid",kind:"scalar",T:9},{no:2,name:"candidate",kind:"message",T:An,oneof:"update"},{no:3,name:"done",kind:"scalar",T:8,oneof:"update"},{no:4,name:"error",kind:"message",T:Tn,oneof:"update"}]),Q1=s.makeMessageType("proto.rpc.webrtc.v1.CallUpdateResponse",[]),Z1=s.makeMessageType("proto.rpc.webrtc.v1.ICEServer",()=>[{no:1,name:"urls",kind:"scalar",T:9,repeated:!0},{no:2,name:"username",kind:"scalar",T:9},{no:3,name:"credential",kind:"scalar",T:9}]),_a=s.makeMessageType("proto.rpc.webrtc.v1.WebRTCConfig",()=>[{no:1,name:"additional_ice_servers",kind:"message",T:Z1,repeated:!0},{no:2,name:"disable_trickle",kind:"scalar",T:8}]),e_=s.makeMessageType("proto.rpc.webrtc.v1.AnswerRequestInitStage",()=>[{no:1,name:"sdp",kind:"scalar",T:9},{no:2,name:"optional_config",kind:"message",T:_a},{no:3,name:"deadline",kind:"message",T:_,opt:!0}]),n_=s.makeMessageType("proto.rpc.webrtc.v1.AnswerRequestUpdateStage",()=>[{no:1,name:"candidate",kind:"message",T:An}]),a_=s.makeMessageType("proto.rpc.webrtc.v1.AnswerRequestDoneStage",[]),t_=s.makeMessageType("proto.rpc.webrtc.v1.AnswerRequestErrorStage",()=>[{no:1,name:"status",kind:"message",T:Tn}]),s_=s.makeMessageType("proto.rpc.webrtc.v1.AnswerRequestHeartbeatStage",[]),o_=s.makeMessageType("proto.rpc.webrtc.v1.AnswerRequest",()=>[{no:1,name:"uuid",kind:"scalar",T:9},{no:2,name:"init",kind:"message",T:e_,oneof:"stage"},{no:3,name:"update",kind:"message",T:n_,oneof:"stage"},{no:4,name:"done",kind:"message",T:a_,oneof:"stage"},{no:5,name:"error",kind:"message",T:t_,oneof:"stage"},{no:6,name:"heartbeat",kind:"message",T:s_,oneof:"stage"}]),i_=s.makeMessageType("proto.rpc.webrtc.v1.AnswerResponseInitStage",()=>[{no:1,name:"sdp",kind:"scalar",T:9}]),r_=s.makeMessageType("proto.rpc.webrtc.v1.AnswerResponseUpdateStage",()=>[{no:1,name:"candidate",kind:"message",T:An}]),m_=s.makeMessageType("proto.rpc.webrtc.v1.AnswerResponseDoneStage",[]),c_=s.makeMessageType("proto.rpc.webrtc.v1.AnswerResponseErrorStage",()=>[{no:1,name:"status",kind:"message",T:Tn}]),l_=s.makeMessageType("proto.rpc.webrtc.v1.AnswerResponse",()=>[{no:1,name:"uuid",kind:"scalar",T:9},{no:2,name:"init",kind:"message",T:i_,oneof:"stage"},{no:3,name:"update",kind:"message",T:r_,oneof:"stage"},{no:4,name:"done",kind:"message",T:m_,oneof:"stage"},{no:5,name:"error",kind:"message",T:c_,oneof:"stage"}]),d_=s.makeMessageType("proto.rpc.webrtc.v1.OptionalWebRTCConfigRequest",[]),p_=s.makeMessageType("proto.rpc.webrtc.v1.OptionalWebRTCConfigResponse",()=>[{no:1,name:"config",kind:"message",T:_a}]),u_={typeName:"proto.rpc.webrtc.v1.SignalingService",methods:{call:{name:"Call",I:Ar,O:X1,kind:m.ServerStreaming},callUpdate:{name:"CallUpdate",I:Ra,O:Q1,kind:m.Unary},answer:{name:"Answer",I:l_,O:o_,kind:m.BiDiStreaming},optionalWebRTCConfig:{name:"OptionalWebRTCConfig",I:d_,O:p_,kind:m.Unary}}},Ur="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bt=(a="")=>{const e=a;let n="";for(let t=0,o,i=0,r=Ur;e.charAt(Math.trunc(i))||(r="=",i%1);n+=r.charAt(63&t>>8-i%1*8)){if(o=e.charCodeAt(i+=3/4),o>255)throw new Error("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");t=t<<8|o}return n},qr=(a="")=>{const e=a.replace(/=+$/,"");let n="";if(e.length%4===1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(let t=0,o=0,i,r=0;i=e.charAt(r++);~i&&(o=t%4?o*64+i:i,t++%4)?n+=String.fromCharCode(255&o>>(-2*t&6)):0)i=Ur.indexOf(i);return n},Mt=(a,e)=>{const n={sdp:a?.sdp,type:a?.type};if(e)for(const[t,o]of Object.entries(e))n.sdp=[n.sdp,`a=${t}:${o}\r
|
|
4
|
+
`].join("");return n},g_=async(a,e,n)=>{const t=e??{iceServers:[{urls:"stun:global.stun.twilio.com:3478"}]},o=new RTCPeerConnection(t);let i;const r=new Promise(h=>{i=h}),c=o.createDataChannel("data",{id:0,negotiated:!0,ordered:!0});c.binaryType="arraybuffer";const l=o.createDataChannel("negotiation",{id:1,negotiated:!0,ordered:!0});l.binaryType="arraybuffer";let d=!1;if(l.addEventListener("open",()=>{d=!0}),l.addEventListener("message",h=>{(async()=>{const I=new RTCSessionDescription(JSON.parse(qr(h.data)));if(await o.setRemoteDescription(I),I.type==="offer"){await o.setLocalDescription();const R=Mt(o.localDescription,n);l.send(bt(JSON.stringify(R)))}})().catch(console.error)}),o.addEventListener("negotiationneeded",()=>{(async()=>{if(!d)return;await o.setLocalDescription();const h=Mt(o.localDescription,n);l.send(bt(JSON.stringify(h)))})().catch(console.error)}),!a)return{pc:o,dc:c};const u=await o.createOffer({});return await o.setLocalDescription(u),o.addEventListener("icecandidate",h=>{h.candidate===null&&i({pc:o,dc:c})}),r};function T_(){try{new Headers}catch{throw new Error("connect-web requires the fetch API. Are you running on an old version of Node.js? Node.js is not supported in Connect for Web - please stay tuned for Connect for Node.")}}function Lr(a,e){const n=_r(a);if(n)throw e.forEach((t,o)=>{n.metadata.append(o,t)}),n;if(!e.has(gn)&&!a.has(gn))throw new C("protocol error: missing status",g.Code.Internal)}function Gr(a,e,n,t){const o=new Headers(n??{});return o.set(c1,a?g1:T1),o.set(u1,"1"),o.set(p1,"connect-es/1.6.1"),e!==void 0&&o.set(l1,`${e}m`),o}function k_(a){switch(a){case 400:return g.Code.Internal;case 401:return g.Code.Unauthenticated;case 403:return g.Code.PermissionDenied;case 404:return g.Code.Unimplemented;case 429:return g.Code.Unavailable;case 502:return g.Code.Unavailable;case 503:return g.Code.Unavailable;case 504:return g.Code.Unavailable;default:return g.Code.Unknown}}function Br(a,e){var n;if(a>=200&&a<300)return{foundStatus:e.has(gn),headerError:_r(e)};throw new C(decodeURIComponent((n=e.get(Rr))!==null&&n!==void 0?n:`HTTP ${a}`),k_(a),e)}var nn=function(a){return this instanceof nn?(this.v=a,this):new nn(a)},y_=function(a,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=n.apply(a,e||[]),o,i=[];return o={},c("next"),c("throw"),c("return",r),o[Symbol.asyncIterator]=function(){return this},o;function r(R){return function(O){return Promise.resolve(O).then(R,h)}}function c(R,O){t[R]&&(o[R]=function(b){return new Promise(function(N,V){i.push([R,b,N,V])>1||l(R,b)})},O&&(o[R]=O(o[R])))}function l(R,O){try{d(t[R](O))}catch(b){I(i[0][3],b)}}function d(R){R.value instanceof nn?Promise.resolve(R.value.v).then(u,h):I(i[0][2],R)}function u(R){l("next",R)}function h(R){l("throw",R)}function I(R,O){R(O),i.shift(),i.length&&l(i[0][0],i[0][1])}};function v_(a){var e;T_();const n=(e=a.useBinaryFormat)!==null&&e!==void 0?e:!0;return{async unary(t,o,i,r,c,l,d){var u;const{serialize:h,parse:I}=gt(o,n,a.jsonOptions,a.binaryOptions);return r=r===void 0?a.defaultTimeoutMs:r<=0?void 0:r,await Er({interceptors:a.interceptors,signal:i,timeoutMs:r,req:{stream:!1,service:t,method:o,url:Sr(a.baseUrl,t,o),init:{method:"POST",credentials:(u=a.credentials)!==null&&u!==void 0?u:"same-origin",redirect:"error",mode:"cors"},header:Gr(n,r,c),contextValues:d??ya(),message:l},next:async R=>{var O;const N=await((O=a.fetch)!==null&&O!==void 0?O:globalThis.fetch)(R.url,Object.assign(Object.assign({},R.init),{headers:R.header,signal:R.signal,body:kr(0,h(R.message))})),{headerError:V}=Br(N.status,N.headers);if(!N.body)throw V!==void 0?V:"missing response body";const y=Tr(N.body).getReader();let f,k;for(;;){const v=await y.read();if(v.done)break;const{flags:E,data:M}=v.value;if((E&gr)===gr)throw new C("protocol error: received unsupported compressed output",g.Code.Internal);if(E===ut){if(f!==void 0)throw"extra trailer";f=fr(M);continue}if(k!==void 0)throw new C("extra message",g.Code.Unimplemented);k=I(M)}if(f===void 0)throw V!==void 0?V:new C("missing trailer",N.headers.has(gn)?g.Code.Unimplemented:g.Code.Unknown);if(Lr(f,N.headers),k===void 0)throw new C("missing message",f.has(gn)?g.Code.Unimplemented:g.Code.Unknown);return{stream:!1,service:t,method:o,header:N.headers,message:k,trailer:f}}})},async stream(t,o,i,r,c,l,d){var u;const{serialize:h,parse:I}=gt(o,n,a.jsonOptions,a.binaryOptions);function R(b,N,V,y,f){return y_(this,arguments,function*(){const v=Tr(b).getReader();if(N){if(!(yield nn(v.read())).done)throw"extra data for trailers-only";return yield nn(void 0)}let E=!1;for(;;){const M=yield nn(v.read());if(M.done)break;const{flags:oe,data:B}=M.value;if((oe&ut)===ut){if(E)throw"extra trailer";E=!0;const Y=fr(B);Lr(Y,y),Y.forEach((Ci,Ni)=>V.set(Ni,Ci));continue}if(E)throw"extra message";yield yield nn(I(B))}if("throwIfAborted"in f&&f.throwIfAborted(),!E)throw"missing trailer"})}async function O(b){if(o.kind!=m.ServerStreaming)throw"The fetch API does not support streaming request bodies";const N=await b[Symbol.asyncIterator]().next();if(N.done==!0)throw"missing request message";return kr(0,h(N.value))}return r=r===void 0?a.defaultTimeoutMs:r<=0?void 0:r,wr({interceptors:a.interceptors,signal:i,timeoutMs:r,req:{stream:!0,service:t,method:o,url:Sr(a.baseUrl,t,o),init:{method:"POST",credentials:(u=a.credentials)!==null&&u!==void 0?u:"same-origin",redirect:"error",mode:"cors"},header:Gr(n,r,c),contextValues:d??ya(),message:l},next:async b=>{var N;const y=await((N=a.fetch)!==null&&N!==void 0?N:globalThis.fetch)(b.url,Object.assign(Object.assign({},b.init),{headers:b.header,signal:b.signal,body:await O(b.message)})),{foundStatus:f,headerError:k}=Br(y.status,y.headers);if(k!=null)throw k;if(!y.body)throw"missing response body";const v=new Headers;return Object.assign(Object.assign({},b),{header:y.headers,trailer:v,message:R(y.body,f,v,y.headers,b.signal)})}})}}}let Sa;const h_=a=>{Sa=a},f_=()=>Sa!==void 0,ne=(a,e={})=>{Sa&&Sa({timestamp:new Date,event:a,...e})},R_=a=>{console.debug("[viam-sdk]",JSON.stringify(a))},__=()=>R_,Ia=s.makeMessageType("proto.rpc.webrtc.v1.PacketMessage",()=>[{no:1,name:"data",kind:"scalar",T:12},{no:2,name:"eom",kind:"scalar",T:8}]),Et=s.makeMessageType("proto.rpc.webrtc.v1.Stream",()=>[{no:1,name:"id",kind:"scalar",T:4}]),wt=s.makeMessageType("proto.rpc.webrtc.v1.Request",()=>[{no:1,name:"stream",kind:"message",T:Et},{no:2,name:"headers",kind:"message",T:Fr,oneof:"type"},{no:3,name:"message",kind:"message",T:Ct,oneof:"type"},{no:4,name:"rst_stream",kind:"scalar",T:8,oneof:"type"}]),Fr=s.makeMessageType("proto.rpc.webrtc.v1.RequestHeaders",()=>[{no:1,name:"method",kind:"scalar",T:9},{no:2,name:"metadata",kind:"message",T:Oa},{no:3,name:"timeout",kind:"message",T:J}]),Ct=s.makeMessageType("proto.rpc.webrtc.v1.RequestMessage",()=>[{no:1,name:"has_message",kind:"scalar",T:8},{no:2,name:"packet_message",kind:"message",T:Ia},{no:3,name:"eos",kind:"scalar",T:8}]),S_=s.makeMessageType("proto.rpc.webrtc.v1.Response",()=>[{no:1,name:"stream",kind:"message",T:Et},{no:2,name:"headers",kind:"message",T:I_,oneof:"type"},{no:3,name:"message",kind:"message",T:O_,oneof:"type"},{no:4,name:"trailers",kind:"message",T:b_,oneof:"type"}]),I_=s.makeMessageType("proto.rpc.webrtc.v1.ResponseHeaders",()=>[{no:1,name:"metadata",kind:"message",T:Oa}]),O_=s.makeMessageType("proto.rpc.webrtc.v1.ResponseMessage",()=>[{no:1,name:"packet_message",kind:"message",T:Ia}]),b_=s.makeMessageType("proto.rpc.webrtc.v1.ResponseTrailers",()=>[{no:1,name:"status",kind:"message",T:Tn},{no:2,name:"metadata",kind:"message",T:Oa}]),xr=s.makeMessageType("proto.rpc.webrtc.v1.Strings",()=>[{no:1,name:"values",kind:"scalar",T:9,repeated:!0}]),Oa=s.makeMessageType("proto.rpc.webrtc.v1.Metadata",()=>[{no:1,name:"md",kind:"map",K:9,V:{kind:"message",T:xr}}]);class ge extends Error{name="ConnectionClosedError";constructor(e){super(e),Object.setPrototypeOf(this,ge.prototype)}static isError(e){return e instanceof ge||e instanceof C&&e.rawMessage==="closed"?!0:typeof e=="string"?e==="Response closed without headers":e instanceof Error?e.message==="Response closed without headers":!1}}class M_{ready;peerConn;dataChannel;pResolve;pReject;closed=!1;closedReason;maxDataChannelSize=65535;constructor(e,n){this.peerConn=e,this.dataChannel=n,this.ready=new Promise((t,o)=>{this.pResolve=t,this.pReject=o}),n.addEventListener("open",()=>this.onChannelOpen()),n.addEventListener("close",()=>this.onChannelClose()),n.addEventListener("error",t=>{this.onChannelError(t)}),e.addEventListener("iceconnectionstatechange",()=>{const t=e.iceConnectionState;(t==="failed"||t==="disconnected"||t==="closed")&&this.pReject?.(new Error(`ICE connection failed with state: ${t}`))})}isClosed(){return this.closed}isClosedReason(){return this.closedReason}closeWithReason(e){this.closed||(this.closed=!0,this.closedReason=e,this.pReject?.(e),this.peerConn.close(),this.dataChannel.close())}onChannelOpen(){this.pResolve?.(void 0)}onChannelClose(){this.closeWithReason(new ge("data channel closed"))}onChannelError(e){console.error("channel error",e),this.closeWithReason(new Error(JSON.stringify(e)))}write(e){this.dataChannel.send(e.toBinary())}}const Jr=33554432;class E_{grpcStream;onDone;closed=!1;packetBuf=[];packetBufSize=0;constructor(e,n){this.grpcStream=e,this.onDone=n}closeWithRecvError(){this.closed||(this.closed=!0,this.onDone(this.grpcStream.id))}processPacketMessage(e){const{data:n}=e;if(n.length+this.packetBufSize>Jr){this.packetBuf.length=0,this.packetBufSize=0,console.error(`message size larger than max ${Jr}; discarding`);return}if(this.packetBuf.push(n),this.packetBufSize+=n.length,e.eom){const t=new Uint8Array(this.packetBufSize);let o=0;for(const i of this.packetBuf)t.set(i,o),o+=i.length;return this.packetBuf.length=0,this.packetBufSize=0,t}}}const w_=16373;class zr extends E_{channel;service;method;parseMessage;requestHeaders;headersReceived=!1;trailersReceived=!1;constructor(e,n,t,o,i,r){super(n,t),this.channel=e,this.service=o,this.method=i;const{parse:c}=gt(i,!0,void 0,void 0);this.parseMessage=c;const l=`/${o.typeName}/${i.name}`;this.requestHeaders=new Fr({method:l});const d=C_(Un(r));d&&(this.requestHeaders.metadata=d)}startRequest(e){e&&e.addEventListener("abort",()=>{this.resetStream()});try{this.channel.writeHeaders(this.grpcStream,this.requestHeaders)}catch(n){console.error("error writing headers",n),this.closeWithRecvError()}}sendMessage(e){if(e){this.writeMessage(!1,e);return}this.writeMessage(!1,void 0)}resetStream(){if(!this.closed)try{this.channel.writeReset(this.grpcStream)}catch(e){console.error("error writing reset",e),this.closeWithRecvError()}}writeMessage(e,n){try{if(!n||n.length===0){const o=new Ia({eom:!0}),i=new Ct({hasMessage:!!n,packetMessage:o,eos:e});this.channel.writeMessage(this.grpcStream,i);return}let t=n;for(;t.length>0;){const o=Math.min(t.length,w_),i=new Ia;i.data=t.slice(0,o),t=t.slice(o),t.length===0&&(i.eom=!0);const r=new Ct({hasMessage:!!t,packetMessage:i,eos:e});this.channel.writeMessage(this.grpcStream,r)}}catch(t){console.error("error writing message",t),this.closeWithRecvError()}}onResponse(e){switch(e.type.case){case"headers":{if(this.headersReceived){console.error(`invariant: headers already received for ${this.grpcStream.id}`);return}if(this.trailersReceived){console.error(`invariant: headers received after trailers for ${this.grpcStream.id}`);return}this.processHeaders(e.type.value);break}case"message":{if(!this.headersReceived){console.error(`invariant: headers not yet received for ${this.grpcStream.id}`);return}if(this.trailersReceived){console.error(`invariant: headers received after trailers for ${this.grpcStream.id}`);return}this.processMessage(e.type.value);break}case"trailers":{this.processTrailers(e.type.value);break}default:{console.error("unknown response type",e.type.case);break}}}processHeaders(e){this.headersReceived=!0,this.onHeaders(e)}processMessage(e){if(!e.packetMessage)return;const n=super.processPacketMessage(e.packetMessage);n&&this.onMessage(n)}processTrailers(e){this.trailersReceived=!0;const{status:n}=e,t=n?n.code:0;if(this.onTrailers(e),t===0){this.closeWithRecvError();return}this.closeWithRecvError()}}const C_=a=>{if(!a)return;const e=new Oa({md:Object.fromEntries([...a.entries()].map(([n,t])=>[n,new xr({values:[t]})]))});return Object.keys(e.md).length>0?e:void 0},Nt=a=>{const e=Object.entries(a?.md??{}).flatMap(([n,{values:t}])=>t.map(o=>[n,o]));return new Headers(e)};class N_ extends zr{awaitingHeadersResult;gotHeaders=!1;respStream=e1();trailers=new Headers;respStreamQueue;async run(e,n,t,o){const r={req:{stream:!0,url:"",init:{},service:this.service,method:this.method,header:new Headers,contextValues:o??ya(),message:t},next:async c=>{const d=await new Promise((u,h)=>{this.awaitingHeadersResult={success:u,failure:h},this.startRequest(e),this.sendMessages(c.message).catch(I=>{console.error("error sending streaming message",I),this.closeWithRecvError()})});return{...c,header:d,trailer:this.trailers,message:this.respStream}}};return e&&(r.signal=e),n!==void 0&&(r.timeoutMs=n),wr(r)}async sendMessages(e){for await(const n of e)this.sendMessage(n.toBinary());this.writeMessage(!0,void 0)}onHeaders(e){this.gotHeaders=!0,this.awaitingHeadersResult?.success(Nt(e.metadata))}onTrailers(e){if(e.metadata?.md){for(const n in e.metadata.md)if(Object.hasOwn(e.metadata.md,n)){const t=e.metadata.md[n];for(const o of t?.values??[])this.trailers.append(n,o)}}if(this.respStream.close(),!e.status||e.status.code===0){if(this.gotHeaders)return;this.awaitingHeadersResult?.success(new Headers);return}this.gotHeaders||this.awaitingHeadersResult?.failure(e.status.message)}onMessage(e){const n=this.parseMessage(e);this.respStreamQueue=this.respStreamQueue?this.respStreamQueue.then(async()=>this.respStream.write(n)):this.respStream.write(n),this.respStreamQueue.catch(t=>{console.error(`error pushing received message into stream; failing: ${t}`),this.resetStream()})}}class P_ extends zr{result;headers;message;async run(e,n,t,o){const r={req:{stream:!1,url:"",init:{},service:this.service,method:this.method,header:new Headers,contextValues:o??ya(),message:t},next:async c=>new Promise((l,d)=>{this.result={success:l,failure:d},this.startRequest(),this.sendMessage(c.message.toBinary())})};return e&&(r.signal=e),n!==void 0&&(r.timeoutMs=n),Er(r)}onHeaders(e){if(this.headers!==void 0){this.result?.failure(new Error("invariant: received headers more than once"));return}this.headers=Nt(e.metadata)}onTrailers(e){const n=Nt(e.metadata);if(!e.status||e.status.code===0){if(!this.headers){this.result?.failure(new Error("invariant: received trailers for successful unary request without headers"));return}if(this.message===void 0){this.result?.failure(new Error("invariant: received trailers for successful unary request without message"));return}this.result?.success({stream:!1,header:this.headers,message:this.message,trailer:n,service:this.service,method:this.method});return}this.result?.failure(e.status.message)}onMessage(e){if(this.message!==void 0){this.result?.failure(new Error("invariant: received two response messages for unary request"));return}this.message=this.parseMessage(e)}}const D_=256;class A_ extends M_{streamIDCounter=0;streams=new Map;constructor(e,n){super(e,n),n.addEventListener("message",t=>{this.onChannelMessage(t)}),e.addEventListener("iceconnectionstatechange",()=>{const t=e.iceConnectionState;(t==="failed"||t==="disconnected"||t==="closed")&&this.onConnectionTerminated()}),n.addEventListener("close",()=>this.onConnectionTerminated())}onConnectionTerminated(){this.closeWithReason(new ge("data channel closed"));for(const e of this.streams.values())e.cs.closeWithRecvError()}onChannelMessage(e){const n=S_.fromBinary(new Uint8Array(e.data)),{stream:t}=n;if(t===void 0){console.error("no stream id; discarding");return}const{id:o}=t,i=this.streams.get(o.toString());if(i===void 0){console.error("no stream for id; discarding","id",o);return}i.cs.onResponse(n)}nextStreamID(){const e=this.streamIDCounter;return this.streamIDCounter+=1,new Et({id:BigInt(e)})}newStream(e,n,t,o,i){if(this.isClosed())throw new ge("connection closed");let r=this.streams.get(n.id.toString());if(r!==void 0)throw new Error("invariant: stream should not exist yet");if(Object.keys(this.streams).length>D_)throw new Error("stream limit hit");const c=new e(this,n,l=>this.removeStreamByID(l),t,o,i);return r={cs:c},this.streams.set(n.id.toString(),r),c}removeStreamByID(e){this.streams.delete(e.toString())}writeHeaders(e,n){this.write(new wt({stream:e,type:{case:"headers",value:n}}))}writeMessage(e,n){this.write(new wt({stream:e,type:{case:"message",value:n}}))}writeReset(e){this.write(new wt({stream:e,type:{case:"rstStream",value:!0}}))}async unary(e,n,t,o,i,r,c){return this.newStream(P_,this.nextStreamID(),e,n,i).run(t,o,r,c)}async stream(e,n,t,o,i,r,c){return this.newStream(N_,this.nextStreamID(),e,n,i).run(t,o,r,c)}}const ba="invariant: call uuid unset";class U_{constructor(e,n,t,o,i){this.signalingClient=e,this.callOpts=n,this.pc=t,this.dc=o,this.dialOpts=i,this.clientChannel=new A_(this.pc,this.dc)}clientChannel;callUuid;sentDoneOrErrorOnce=!1;exchangeDone=!1;iceComplete=!1;haveInitResponse=!1;awaitingRemoteDescription;remoteDescriptionSet;numCallUpdates=0;maxCallUpdateDuration=0;totalCallUpdateDuration=0;async doExchange(){await this.setup();const e=Mt(this.pc.localDescription,this.dialOpts?.additionalSdpFields),n=bt(JSON.stringify(e)),t=new Ar({sdp:n});this.dialOpts&&this.dialOpts.disableTrickleICE&&(t.disableTrickle=this.dialOpts.disableTrickleICE),this.clientChannel.ready.then(async()=>{this.exchangeDone=!0,await this.sendDone()}).catch(console.error);const o=this.signalingClient.call(t,this.callOpts),i=this.processCallResponses(o);return await Promise.all([this.clientChannel.ready,i]),this.clientChannel}async setup(){if(this.remoteDescriptionSet=new Promise((e,n)=>{this.awaitingRemoteDescription={success:e,failure:n}}),!this.dialOpts?.disableTrickleICE){const e=await this.pc.createOffer({});this.pc.addEventListener("iceconnectionstatechange",()=>{if(this.pc.iceConnectionState!=="completed"||this.numCallUpdates===0)return;const n=this.totalCallUpdateDuration/this.numCallUpdates;console.groupCollapsed("Caller update statistics"),console.table({num_updates:this.numCallUpdates,average_duration:`${n}ms`,max_duration:`${this.maxCallUpdateDuration}ms`}),console.groupEnd()}),this.pc.addEventListener("icecandidate",n=>{this.onLocalICECandidate(n).catch(t=>{console.error(`error processing local ICE candidate ${t}`)})}),await this.pc.setLocalDescription(e)}}terminate(e){this.clientChannel.closeWithReason(e)}async processCallResponses(e){try{for await(const n of e)switch(n.stage.case){case"init":{if(!await this.handleInitResponse(n.uuid,n.stage.value))return;break}case"update":{if(!await this.handleUpdateResponse(n.uuid,n.stage.value))return;break}default:{await this.sendError("unknown CallResponse stage");return}}}catch(n){this.handleInitError(n)}}handleInitError(e){if(!(this.exchangeDone||this.pc.iceConnectionState==="connected")){if(e instanceof C&&e.code===g.Code.Unimplemented){if(e.message==="Response closed without headers")throw new ge("failed to dial");if(this.clientChannel.isClosed())throw new ge("client channel is closed");console.error(e.message)}throw e}}async handleInitResponse(e,n){if(this.haveInitResponse)return await this.sendError("got init stage more than once"),!1;this.haveInitResponse=!0,this.callUuid=e;const t=new RTCSessionDescription(JSON.parse(qr(n.sdp)));return this.clientChannel.isClosed()?(await this.sendError("client channel is closed"),!1):(await this.pc.setRemoteDescription(t),this.awaitingRemoteDescription?.success(!0),this.dialOpts?.disableTrickleICE?(this.exchangeDone=!0,await this.sendDone(),!1):!0)}async handleUpdateResponse(e,n){if(!this.haveInitResponse)return await this.sendError("got update stage before init stage"),!1;if(e!==this.callUuid)return await this.sendError(`uuid mismatch; have=${e} want=${this.callUuid}`),!1;if(n.candidate===void 0)return await this.sendError("no candidate"),!1;const t=q_(n.candidate);t.candidate!==void 0&&console.debug(`received remote ICE ${t.candidate}`);try{await this.pc.addIceCandidate(t)}catch(o){throw console.log("error adding ice candidate",o),await this.sendError(JSON.stringify(o)),o}return!0}async onLocalICECandidate(e){if(await this.remoteDescriptionSet,this.exchangeDone||this.pc.iceConnectionState==="connected"){e.candidate!==null&&console.info("Dropping ICE candidate - exchange done or already connected",{exchangeDone:this.exchangeDone,iceConnectionState:this.pc.iceConnectionState,candidate:e.candidate.candidate});return}if(e.candidate===null){console.info("ICE gathering complete"),this.iceComplete=!0,await this.sendDone();return}if(this.callUuid===void 0||this.callUuid==="")throw console.error(ba),new Error(ba);e.candidate.candidate!==void 0&&console.info(`Gathered local ICE ${e.candidate.candidate}`);const n=L_(e.candidate),t=new Ra({uuid:this.callUuid,update:{case:"candidate",value:n}}),o=new Date;try{await this.signalingClient.callUpdate(t,this.callOpts),this.numCallUpdates+=1;const r=new Date().getTime()-o.getTime();r>this.maxCallUpdateDuration&&(this.maxCallUpdateDuration=r),this.totalCallUpdateDuration+=r}catch(i){if(this.exchangeDone||this.iceComplete||this.pc.iceConnectionState==="connected")return;console.error(i)}}async sendError(e){if(this.sentDoneOrErrorOnce)return;if(this.callUuid===void 0||this.callUuid==="")throw new Error(ba);this.sentDoneOrErrorOnce=!0;const n=new Ra({uuid:this.callUuid,update:{case:"error",value:new Tn({code:g.Code.Unknown,message:e})}});try{await this.signalingClient.callUpdate(n,this.callOpts)}catch(t){console.error("failed to send call update; continuing",t)}}async sendDone(){if(this.sentDoneOrErrorOnce)return;if(this.callUuid===void 0||this.callUuid==="")throw new Error(ba);this.sentDoneOrErrorOnce=!0;const e=new Ra({uuid:this.callUuid,update:{case:"done",value:!0}});try{await this.signalingClient.callUpdate(e,this.callOpts)}catch(n){console.error(n)}}}const q_=a=>{const e={candidate:a.candidate};return a.sdpMid!==void 0&&(e.sdpMid=a.sdpMid),a.sdpmLineIndex!==void 0&&(e.sdpMLineIndex=a.sdpmLineIndex),a.usernameFragment!==void 0&&(e.usernameFragment=a.usernameFragment),e},L_=a=>{const e=new An;return a.candidate!==void 0&&(e.candidate=a.candidate),a.sdpMid!==void 0&&a.sdpMid!==null&&(e.sdpMid=a.sdpMid),a.sdpMLineIndex!==void 0&&a.sdpMLineIndex!==null&&(e.sdpmLineIndex=a.sdpMLineIndex),a.usernameFragment!==void 0&&a.usernameFragment!==null&&(e.usernameFragment=a.usernameFragment),e},Ma=(a,e)=>globalThis.VIAM?.GRPC_TRACE_LOGGING===!0?{...a,unary:async(o,i,r,c,l,d,u)=>{const h=Dn.UuidTool.newUuid();console.trace(`Unary request ${h} : ${e}/${o.typeName}.${i.name}`);const I=await a.unary(o,i,r,c,l,d,u);return console.debug(`Unary response received: ${h}`),I},stream:async(o,i,r,c,l,d,u)=>{const h=Dn.UuidTool.newUuid();console.trace(`Stream request ${h} : ${e}/${o.typeName}.${i.name}`);const I=await a.stream(o,i,r,c,l,d,u);return console.debug(`Stream response received: ${h}`),I}}:a,Vr=(a,e)=>({...a,unary:async(o,i,r,c,l,d,u)=>{const h=`${o.typeName}/${i.name}`;ne("grpc_request",{connectionId:e,type:"unary",method:h});try{const I=await a.unary(o,i,r,c,l,d,u);return ne("grpc_response",{connectionId:e,type:"unary",method:h}),I}catch(I){throw ne("grpc_response",{connectionId:e,type:"unary",method:h,error:I instanceof Error?I.message:String(I)}),I}},stream:async(o,i,r,c,l,d,u)=>{if(!f_())return a.stream(o,i,r,c,l,d,u);const h=`${o.typeName}/${i.name}`;ne("grpc_request",{connectionId:e,type:"stream",method:h});let I;try{I=await a.stream(o,i,r,c,l,d,u)}catch(O){throw ne("grpc_response",{connectionId:e,type:"stream",method:h,error:O instanceof Error?O.message:String(O)}),O}return{...I,message:async function*(){try{for await(const b of I.message)ne("grpc_response",{connectionId:e,type:"stream",method:h}),yield b}catch(b){throw ne("grpc_response",{connectionId:e,type:"stream",method:h,error:b instanceof Error?b.message:String(b)}),b}}()}}}),Ea=async(a,e,n=!1)=>{Yr(e);const t=globalThis.VIAM?.GRPC_TRANSPORT_FACTORY??v_,o={baseUrl:a,credentials:"same-origin"};if(e?.accessToken!==void 0&&e.accessToken!==""&&!(e.externalAuthAddress!==void 0&&e.externalAuthAddress!==""&&e.externalAuthToEntity!==void 0&&e.externalAuthToEntity!=="")){const r=new Headers(e.extraHeaders);r.set("authorization",`Bearer ${e.accessToken}`);const c=new wa(o,t,r);return Ma(c,a)}if(e===void 0||e.credentials===void 0&&e.accessToken===void 0){n&&(o.credentials="include");const r=new Headers(e?.extraHeaders??{}),c=new wa(o,t,r);return Ma(c,a)}const i=await G_(a,t,e,o);return Ma(i,a)},Pt=/^.*:\/\//u,G_=async(a,e,n,t)=>{const o=new Headers(n.extraHeaders);let i;if(n.accessToken===void 0||n.accessToken===""){const r=new Ot({entity:Fn(n.credentials)&&n.credentials.authEntity?n.credentials.authEntity:a.replace(Pt,"")});n.credentials&&(r.credentials=new Dr({type:n.credentials.type,payload:n.credentials.payload}));const c=n.externalAuthAddress??a,l=e({baseUrl:c});i=(await X(W1,l).authenticate(r)).accessToken}else i=n.accessToken;if(n.externalAuthAddress!==void 0&&n.externalAuthAddress!==""&&n.externalAuthToEntity!==void 0&&n.externalAuthToEntity!==""){const r=new Headers;r.set("authorization",`Bearer ${i}`),i="";const c=new Ot({entity:n.externalAuthToEntity}),l=e({baseUrl:n.externalAuthAddress});i=(await X(H1,l).authenticateTo(c,{headers:r})).accessToken}return o.set("authorization",`Bearer ${i}`),new wa(t,e,o)};class wa{transport;extraHeaders;constructor(e,n,t){this.extraHeaders=t,this.transport=n(e)}unary=async(e,n,t,o,i,r,c)=>{const l=Un(i);for(const[d,u]of this.extraHeaders)l.set(d,u);return this.transport.unary(e,n,t,o,l,r,c)};stream=async(e,n,t,o,i,r,c)=>{const l=Un(i);for(const[d,u]of this.extraHeaders)l.set(d,u);return this.transport.stream(e,n,t,o,l,r,c)}}const Un=a=>{const e=new Headers;if(a!==void 0)if(Array.isArray(a))for(const[n,t]of a)e.append(n,t);else if("forEach"in a)typeof a.forEach=="function"&&a.forEach((n,t)=>{e.append(t,n)});else for(const[n,t]of Object.entries(a))e.append(n,t);return e},B_=async(a,e,n=!1)=>{const t=await Ea(a,e,n);return X(u_,t)},F_=async(a,e)=>{try{return(await e.optionalWebRTCConfig({},a)).config??new _a}catch(n){if(n instanceof C&&n.code===g.Code.Unimplemented)return new _a;throw n}},x_=async(a,e,n,t=!1)=>{let o=a.replace(/\/$/u,"");n?.webrtcOptions?.signalingInsecure&&(o=`http://${o.replace(/^https?:\/\//u,"")}`),Yr(n);const i={headers:{"rpc-host":e}},r=W_(o,n),c=await B_(o,r,t),l=await Y_(c,i,n),{pc:d,dc:u}=await g_(l.disableTrickleICE,l.rtcConfig,l.additionalSdpFields);let h=!1;const I=new U_(c,i,d,u,l);let R;const O=n?.dialTimeoutMs??n?.dialTimeout;O!==void 0&&O>0&&(R=setTimeout(()=>{h||I.terminate(new Error("timed out"))},O));try{const b=await I.doExchange();n?.externalAuthAddress!==void 0&&n.externalAuthAddress!==""||n?.credentials?.type,h=!0;const N=new Headers(n?.extraHeaders??{}),V=new wa({baseUrl:e},()=>b,N);return{transport:Ma(V,e),peerConnection:d,dataChannel:u}}catch(b){throw console.error("error dialing",b),b}finally{R!==void 0&&(clearTimeout(R),R=void 0),h||(d.close(),u.close())}},J_=a=>(typeof a.urls=="string"?[a.urls]:a.urls).some(n=>n.startsWith("turn:")||n.startsWith("turns:")),$r=a=>{const e=a.indexOf(":");if(e<0)return;const n=a.slice(0,e);if(n!=="turn"&&n!=="turns")return;const t=a.slice(e+1),o=t.indexOf("?"),i=o>=0?t.slice(0,o):t,r=o>=0?t.slice(o+1):"",c=i.lastIndexOf(":");if(c<0)return;const l=i.slice(0,c),d=Number.parseInt(i.slice(c+1),10);if(Number.isNaN(d))return;const u=r.split("&").find(h=>h.startsWith("transport="))?.slice(10)??"udp";return{scheme:n,host:l,port:d,transport:u}},z_=(a,e)=>a.scheme===e.scheme&&a.host===e.host&&a.port===e.port&&a.transport===e.transport,V_=a=>`${a.scheme}:${a.host}:${a.port}?transport=${a.transport}`,$_=a=>{let e;return a.turnUri!==void 0&&(e=$r(a.turnUri),e===void 0)?(console.warn(`Failed to parse turnUri, ignoring all TURN URI options: ${a.turnUri}`),a):(a.rtcConfig={...a.rtcConfig,iceServers:(a.rtcConfig?.iceServers??[]).map(n=>{const o=(typeof n.urls=="string"?[n.urls]:n.urls).flatMap(i=>{const r=$r(i);return r===void 0?[i]:e!==void 0&&!z_(r,e)?[]:(a.turnScheme!==void 0&&(r.scheme=a.turnScheme),a.turnPort!==void 0&&(r.port=a.turnPort),a.turnTransport!==void 0&&(r.transport=a.turnTransport),[V_(r)])});return{...n,urls:o}}).filter(n=>(typeof n.urls=="string"?[n.urls]:n.urls).length>0)},console.debug("TURN filter options set",{turnUri:a.turnUri,turnScheme:a.turnScheme,turnPort:a.turnPort,turnTransport:a.turnTransport}),a)},Y_=async(a,e,n)=>{const t=await F_(e,a),o=t.additionalIceServers.map(c=>{const l=[];for(const d of c.urls)d.endsWith("udp")&&l.push(`${d.slice(0,-3)}tcp`),l.push(d);return{urls:l,credential:c.credential,username:c.username}}),i=n??{};let r;return i.webrtcOptions===void 0?r={disableTrickleICE:t.disableTrickle,rtcConfig:{iceServers:o}}:(r=JSON.parse(JSON.stringify(i.webrtcOptions)),r.rtcConfig===void 0?r.rtcConfig={iceServers:o}:r.rtcConfig.iceServers=[...r.rtcConfig.iceServers??[],...o]),r.forceRelay&&r.forceP2P&&console.warn("forceRelay and forceP2P are both set; forceP2P strips TURN servers that forceRelay requires so the connection will fail"),r.forceP2P&&(console.debug("force P2P enabled; stripping TURN servers and ignoring signaling server ICE config"),r.rtcConfig={...r.rtcConfig,iceServers:(r.rtcConfig?.iceServers??[]).filter(c=>!J_(c))}),r.forceRelay&&(console.debug("force relay enabled; using relay-only ICE transport policy"),r.rtcConfig={...r.rtcConfig,iceTransportPolicy:"relay"}),r.forceP2P&&(r.turnUri!==void 0||r.turnScheme!==void 0||r.turnTransport!==void 0||r.turnPort!==void 0)&&console.warn("forceP2P is set alongside TURN options; the TURN filter will have no effect since TURN servers were already stripped"),(r.turnUri!==void 0||r.turnScheme!==void 0||r.turnTransport!==void 0||r.turnPort!==void 0)&&(r=$_(r)),r},W_=(a,e)=>{let n=e;return e&&(n={...e},e.accessToken===void 0&&(Fn(n.credentials)&&!n.credentials.authEntity&&(n.credentials.authEntity=n.externalAuthAddress!==void 0&&n.externalAuthAddress!==""?n.externalAuthAddress.replace(Pt,""):a.replace(Pt,"")),n.credentials=e.webrtcOptions?.signalingCredentials,n.accessToken=e.webrtcOptions?.signalingAccessToken),n.externalAuthAddress=e.webrtcOptions?.signalingExternalAuthAddress,n.externalAuthToEntity=e.webrtcOptions?.signalingExternalAuthToEntity),n},Yr=a=>{if(a){if(a.accessToken!==void 0&&a.accessToken.length>0){if(a.credentials)throw new Error("cannot set credentials with accessToken");if(a.webrtcOptions?.signalingAccessToken!==void 0)throw new Error("cannot set webrtcOptions.signalingAccessToken with accessToken");if(a.webrtcOptions?.signalingCredentials!==void 0)throw new Error("cannot set webrtcOptions.signalingCredentials with accessToken")}if(a.webrtcOptions?.signalingAccessToken!==void 0&&a.webrtcOptions.signalingAccessToken.length>0&&a.webrtcOptions.signalingCredentials!==void 0)throw new Error("cannot set webrtcOptions.signalingCredentials with webrtcOptions.signalingAccessToken")}},H_="v0.1.548",Wr=s.makeEnum("viam.common.v1.KinematicsFileFormat",[{no:0,name:"KINEMATICS_FILE_FORMAT_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"KINEMATICS_FILE_FORMAT_SVA",localName:"SVA"},{no:2,name:"KINEMATICS_FILE_FORMAT_URDF",localName:"URDF"}]),z=s.makeMessageType("viam.common.v1.ResourceName",()=>[{no:1,name:"namespace",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"subtype",kind:"scalar",T:9},{no:4,name:"name",kind:"scalar",T:9}]),Te=s.makeMessageType("viam.common.v1.Pose",()=>[{no:1,name:"x",kind:"scalar",T:1},{no:2,name:"y",kind:"scalar",T:1},{no:3,name:"z",kind:"scalar",T:1},{no:4,name:"o_x",kind:"scalar",T:1},{no:5,name:"o_y",kind:"scalar",T:1},{no:6,name:"o_z",kind:"scalar",T:1},{no:7,name:"theta",kind:"scalar",T:1}]),Dt=s.makeMessageType("viam.common.v1.Orientation",()=>[{no:1,name:"o_x",kind:"scalar",T:1},{no:2,name:"o_y",kind:"scalar",T:1},{no:3,name:"o_z",kind:"scalar",T:1},{no:4,name:"theta",kind:"scalar",T:1}]),Hr=s.makeMessageType("viam.common.v1.PoseCloud",()=>[{no:1,name:"x",kind:"scalar",T:1},{no:2,name:"y",kind:"scalar",T:1},{no:3,name:"z",kind:"scalar",T:1},{no:4,name:"o_x",kind:"scalar",T:1},{no:5,name:"o_y",kind:"scalar",T:1},{no:6,name:"o_z",kind:"scalar",T:1},{no:7,name:"theta",kind:"scalar",T:1}]),He=s.makeMessageType("viam.common.v1.PoseInFrame",()=>[{no:1,name:"reference_frame",kind:"scalar",T:9},{no:2,name:"pose",kind:"message",T:Te},{no:3,name:"goal_cloud",kind:"message",T:Hr,opt:!0}]),ke=s.makeMessageType("viam.common.v1.Vector3",()=>[{no:1,name:"x",kind:"scalar",T:1},{no:2,name:"y",kind:"scalar",T:1},{no:3,name:"z",kind:"scalar",T:1}]),jr=s.makeMessageType("viam.common.v1.Sphere",()=>[{no:1,name:"radius_mm",kind:"scalar",T:1}]),Kr=s.makeMessageType("viam.common.v1.Capsule",()=>[{no:1,name:"radius_mm",kind:"scalar",T:1},{no:2,name:"length_mm",kind:"scalar",T:1}]),Xr=s.makeMessageType("viam.common.v1.RectangularPrism",()=>[{no:1,name:"dims_mm",kind:"message",T:ke}]),Ca=s.makeMessageType("viam.common.v1.Mesh",()=>[{no:1,name:"content_type",kind:"scalar",T:9},{no:2,name:"mesh",kind:"scalar",T:12}]),Qr=s.makeMessageType("viam.common.v1.PointCloud",()=>[{no:1,name:"point_cloud",kind:"scalar",T:12}]),an=s.makeMessageType("viam.common.v1.Geometry",()=>[{no:1,name:"center",kind:"message",T:Te},{no:2,name:"sphere",kind:"message",T:jr,oneof:"geometry_type"},{no:3,name:"box",kind:"message",T:Xr,oneof:"geometry_type"},{no:5,name:"capsule",kind:"message",T:Kr,oneof:"geometry_type"},{no:6,name:"mesh",kind:"message",T:Ca,oneof:"geometry_type"},{no:7,name:"pointcloud",kind:"message",T:Qr,oneof:"geometry_type"},{no:4,name:"label",kind:"scalar",T:9}]),At=s.makeMessageType("viam.common.v1.GeometriesInFrame",()=>[{no:1,name:"reference_frame",kind:"scalar",T:9},{no:2,name:"geometries",kind:"message",T:an,repeated:!0}]),Ut=s.makeMessageType("viam.common.v1.PointCloudObject",()=>[{no:1,name:"point_cloud",kind:"scalar",T:12},{no:2,name:"geometries",kind:"message",T:At}]),je=s.makeMessageType("viam.common.v1.GeoPoint",()=>[{no:1,name:"latitude",kind:"scalar",T:1},{no:2,name:"longitude",kind:"scalar",T:1}]),Na=s.makeMessageType("viam.common.v1.GeoGeometry",()=>[{no:1,name:"location",kind:"message",T:je},{no:2,name:"geometries",kind:"message",T:an,repeated:!0}]),xe=s.makeMessageType("viam.common.v1.Transform",()=>[{no:1,name:"reference_frame",kind:"scalar",T:9},{no:2,name:"pose_in_observer_frame",kind:"message",T:He},{no:3,name:"physical_object",kind:"message",T:an,opt:!0},{no:4,name:"uuid",kind:"scalar",T:12},{no:5,name:"metadata",kind:"message",T:p,opt:!0}]),Zr=s.makeMessageType("viam.common.v1.WorldState",()=>[{no:1,name:"obstacles",kind:"message",T:At,repeated:!0},{no:3,name:"transforms",kind:"message",T:xe,repeated:!0}]),j_=s.makeMessageType("viam.common.v1.ActuatorStatus",()=>[{no:1,name:"is_moving",kind:"scalar",T:8}]),em=s.makeMessageType("viam.common.v1.ResponseMetadata",()=>[{no:1,name:"captured_at",kind:"message",T:_,opt:!0}]),D=s.makeMessageType("viam.common.v1.DoCommandRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"command",kind:"message",T:p}]),U=s.makeMessageType("viam.common.v1.DoCommandResponse",()=>[{no:1,name:"result",kind:"message",T:p}]),P=s.makeMessageType("viam.common.v1.GetStatusRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),A=s.makeMessageType("viam.common.v1.GetStatusResponse",()=>[{no:1,name:"result",kind:"message",T:p}]),qn=s.makeMessageType("viam.common.v1.GetKinematicsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Pa=s.makeMessageType("viam.common.v1.GetKinematicsResponse",()=>[{no:1,name:"format",kind:"enum",T:s.getEnumType(Wr)},{no:2,name:"kinematics_data",kind:"scalar",T:12},{no:3,name:"meshes_by_urdf_filepath",kind:"map",K:9,V:{kind:"message",T:Ca}}]),F=s.makeMessageType("viam.common.v1.GetGeometriesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),j=s.makeMessageType("viam.common.v1.GetGeometriesResponse",()=>[{no:1,name:"geometries",kind:"message",T:an,repeated:!0}]),qt=s.makeMessageType("viam.common.v1.Get3DModelsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),nm=s.makeMessageType("viam.common.v1.Get3DModelsResponse",()=>[{no:1,name:"models",kind:"map",K:9,V:{kind:"message",T:Ca}}]),K_=s.makeMessageType("viam.common.v1.GetWorldPoseResponse",()=>[{no:1,name:"pose",kind:"message",T:Te}]),tn=s.makeMessageType("viam.common.v1.GetReadingsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Da=s.makeMessageType("viam.common.v1.GetReadingsResponse",()=>[{no:1,name:"readings",kind:"map",K:9,V:{kind:"message",T:ee}}]),Ln=s.makeMessageType("viam.common.v1.LogEntry",()=>[{no:1,name:"host",kind:"scalar",T:9},{no:2,name:"level",kind:"scalar",T:9},{no:3,name:"time",kind:"message",T:_},{no:4,name:"logger_name",kind:"scalar",T:9},{no:5,name:"message",kind:"scalar",T:9},{no:6,name:"caller",kind:"message",T:p},{no:7,name:"stack",kind:"scalar",T:9},{no:8,name:"fields",kind:"message",T:p,repeated:!0}]),Lt=s.makeMessageType("viam.common.v1.AudioInfo",()=>[{no:1,name:"codec",kind:"scalar",T:9},{no:2,name:"sample_rate_hz",kind:"scalar",T:5},{no:3,name:"num_channels",kind:"scalar",T:5}]),Gn=s.makeMessageType("viam.common.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Gt=s.makeMessageType("viam.common.v1.GetPropertiesResponse",()=>[{no:1,name:"supported_codecs",kind:"scalar",T:9,repeated:!0},{no:2,name:"sample_rate_hz",kind:"scalar",T:5},{no:3,name:"num_channels",kind:"scalar",T:5}]),am=s.makeExtension("viam.common.v1.safety_heartbeat_monitored",de,{no:84260,kind:"scalar",T:8,opt:!0}),Bt=Object.freeze(Object.defineProperty({__proto__:null,ActuatorStatus:j_,AudioInfo:Lt,Capsule:Kr,DoCommandRequest:D,DoCommandResponse:U,GeoGeometry:Na,GeoPoint:je,GeometriesInFrame:At,Geometry:an,Get3DModelsRequest:qt,Get3DModelsResponse:nm,GetGeometriesRequest:F,GetGeometriesResponse:j,GetKinematicsRequest:qn,GetKinematicsResponse:Pa,GetPropertiesRequest:Gn,GetPropertiesResponse:Gt,GetReadingsRequest:tn,GetReadingsResponse:Da,GetStatusRequest:P,GetStatusResponse:A,GetWorldPoseResponse:K_,KinematicsFileFormat:Wr,LogEntry:Ln,Mesh:Ca,Orientation:Dt,PointCloud:Qr,PointCloudObject:Ut,Pose:Te,PoseCloud:Hr,PoseInFrame:He,RectangularPrism:Xr,ResourceName:z,ResponseMetadata:em,Sphere:jr,Transform:xe,Vector3:ke,WorldState:Zr,safety_heartbeat_monitored:am},Symbol.toStringTag,{value:"Module"})),Bn=new Headers({viam_client:`typescript;v0.72.0;${H_}`}),q=async function(e,n,t,o={},i={}){const r=new D({name:n,command:t instanceof p?t:p.fromJson(t)});o.requestLogger?.(r);const l=(await e(r,i)).result?.toJson();return l===void 0?{}:l},X_=(a,e)=>{const n=e??{headers:{}};let t="";if(a===void 0){const o="abcdefghijklmnopqrstuvwxyz";for(let i=0;i<6;i+=1)t+=o[Math.floor(Math.random()*26)]}else t=a;return n.headers.dtname=t,n},Q_=a=>{if(a.headers){const{_:e,...n}=a.headers;a.headers=n}},Z_=(a,e,n)=>{const t=n??{headers:{}};return t.headers[a]=e,t},eS=(a,e)=>{const{[e]:n,...t}=a.headers;a.headers=t},tm=async function(e,n,t=p.fromJson({}),o={}){const i=new qn({name:n,extra:t}),r=await e(i,o),l=new TextDecoder("utf8").decode(r.kinematicsData),d=JSON.parse(l);return{...d,kinematicsData:d,meshesByUrdfFilepath:r.meshesByUrdfFilepath}},sm=async function(e,n,t=p.fromJson({}),o={}){const i=new F({name:n,extra:t});return(await e(i,o)).geometries},L=async function(e,n,t={},o={}){const i=new P({name:n});t.requestLogger?.(i);const c=(await e(i,o)).result?.toJson();return c===void 0?{}:c},Fn=a=>a!==void 0&&"authEntity"in a,nS=async(a,e)=>e.type==="access-token"?Ea(a,{accessToken:e.payload,extraHeaders:Bn}):Ea(a,{credentials:e,extraHeaders:Bn}),Ft=1e4;var K=(a=>(a.CONNECTING="connecting",a.CONNECTED="connected",a.DISCONNECTING="disconnecting",a.DISCONNECTED="disconnected",a.DIALING="dialing",a.RECONNECTING="reconnecting",a.RECONNECTION_FAILED="reconnection_failed",a))(K||{});class om{listeners={};on(e,n){const{listeners:t}=this;t[e]??=new Set,t[e]?.add(n)}once(e,n){const t=o=>{n(o),this.off(e,n)};this.on(e,t)}has(e,n){return this.listeners[e]?.has(n)}off(e,n){this.listeners[e]?.delete(n)}emit(e,n){for(const t of this.listeners[e]??[])t(n)}}const xt=s.makeMessageType("viam.component.arm.v1.GetEndPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),im=s.makeMessageType("viam.component.arm.v1.GetEndPositionResponse",()=>[{no:1,name:"pose",kind:"message",T:Te}]),kn=s.makeMessageType("viam.component.arm.v1.JointPositions",()=>[{no:1,name:"values",kind:"scalar",T:1,repeated:!0}]),Jt=s.makeMessageType("viam.component.arm.v1.GetJointPositionsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),rm=s.makeMessageType("viam.component.arm.v1.GetJointPositionsResponse",()=>[{no:1,name:"positions",kind:"message",T:kn}]),zt=s.makeMessageType("viam.component.arm.v1.MoveToPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"to",kind:"message",T:Te},{no:99,name:"extra",kind:"message",T:p}]),mm=s.makeMessageType("viam.component.arm.v1.MoveToPositionResponse",[]),Vt=s.makeMessageType("viam.component.arm.v1.MoveToJointPositionsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"positions",kind:"message",T:kn},{no:99,name:"extra",kind:"message",T:p}]),cm=s.makeMessageType("viam.component.arm.v1.MoveToJointPositionsResponse",[]),lm=s.makeMessageType("viam.component.arm.v1.MoveThroughJointPositionsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"positions",kind:"message",T:kn,repeated:!0},{no:3,name:"options",kind:"message",T:gm,opt:!0},{no:99,name:"extra",kind:"message",T:p}]),dm=s.makeMessageType("viam.component.arm.v1.MoveThroughJointPositionsResponse",[]),$t=s.makeMessageType("viam.component.arm.v1.StopRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),pm=s.makeMessageType("viam.component.arm.v1.StopResponse",[]),aS=s.makeMessageType("viam.component.arm.v1.Status",()=>[{no:1,name:"end_position",kind:"message",T:Te},{no:2,name:"joint_positions",kind:"message",T:kn},{no:3,name:"is_moving",kind:"scalar",T:8}]),Yt=s.makeMessageType("viam.component.arm.v1.IsMovingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),um=s.makeMessageType("viam.component.arm.v1.IsMovingResponse",()=>[{no:1,name:"is_moving",kind:"scalar",T:8}]),gm=s.makeMessageType("viam.component.arm.v1.MoveOptions",()=>[{no:1,name:"max_vel_degs_per_sec",kind:"scalar",T:1,opt:!0},{no:2,name:"max_acc_degs_per_sec2",kind:"scalar",T:1,opt:!0},{no:3,name:"max_vel_degs_per_sec_joints",kind:"scalar",T:1,repeated:!0},{no:4,name:"max_acc_degs_per_sec2_joints",kind:"scalar",T:1,repeated:!0},{no:5,name:"max_tcp_speed",kind:"scalar",T:1,opt:!0}]),Tm=Object.freeze(Object.defineProperty({__proto__:null,GetEndPositionRequest:xt,GetEndPositionResponse:im,GetJointPositionsRequest:Jt,GetJointPositionsResponse:rm,IsMovingRequest:Yt,IsMovingResponse:um,JointPositions:kn,MoveOptions:gm,MoveThroughJointPositionsRequest:lm,MoveThroughJointPositionsResponse:dm,MoveToJointPositionsRequest:Vt,MoveToJointPositionsResponse:cm,MoveToPositionRequest:zt,MoveToPositionResponse:mm,Status:aS,StopRequest:$t,StopResponse:pm},Symbol.toStringTag,{value:"Module"})),km={typeName:"viam.component.arm.v1.ArmService",methods:{getEndPosition:{name:"GetEndPosition",I:xt,O:im,kind:m.Unary},moveToPosition:{name:"MoveToPosition",I:zt,O:mm,kind:m.Unary},getJointPositions:{name:"GetJointPositions",I:Jt,O:rm,kind:m.Unary},moveToJointPositions:{name:"MoveToJointPositions",I:Vt,O:cm,kind:m.Unary},moveThroughJointPositions:{name:"MoveThroughJointPositions",I:lm,O:dm,kind:m.Unary},stop:{name:"Stop",I:$t,O:pm,kind:m.Unary},isMoving:{name:"IsMoving",I:Yt,O:um,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},getKinematics:{name:"GetKinematics",I:qn,O:Pa,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary},get3DModels:{name:"Get3DModels",I:qt,O:nm,kind:m.Unary}}},Wt=s.makeMessageType("viam.component.base.v1.MoveStraightRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"distance_mm",kind:"scalar",T:3},{no:3,name:"mm_per_sec",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),ym=s.makeMessageType("viam.component.base.v1.MoveStraightResponse",[]),Ht=s.makeMessageType("viam.component.base.v1.SpinRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"angle_deg",kind:"scalar",T:1},{no:3,name:"degs_per_sec",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),vm=s.makeMessageType("viam.component.base.v1.SpinResponse",[]),jt=s.makeMessageType("viam.component.base.v1.StopRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),hm=s.makeMessageType("viam.component.base.v1.StopResponse",[]),Kt=s.makeMessageType("viam.component.base.v1.SetPowerRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"linear",kind:"message",T:ke},{no:3,name:"angular",kind:"message",T:ke},{no:99,name:"extra",kind:"message",T:p}]),fm=s.makeMessageType("viam.component.base.v1.SetPowerResponse",[]),Xt=s.makeMessageType("viam.component.base.v1.SetVelocityRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"linear",kind:"message",T:ke},{no:3,name:"angular",kind:"message",T:ke},{no:99,name:"extra",kind:"message",T:p}]),Rm=s.makeMessageType("viam.component.base.v1.SetVelocityResponse",[]),Qt=s.makeMessageType("viam.component.base.v1.IsMovingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),_m=s.makeMessageType("viam.component.base.v1.IsMovingResponse",()=>[{no:1,name:"is_moving",kind:"scalar",T:8}]),Aa=s.makeMessageType("viam.component.base.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Sm=s.makeMessageType("viam.component.base.v1.GetPropertiesResponse",()=>[{no:1,name:"width_meters",kind:"scalar",T:1},{no:2,name:"turning_radius_meters",kind:"scalar",T:1},{no:3,name:"wheel_circumference_meters",kind:"scalar",T:1}]),Im=Object.freeze(Object.defineProperty({__proto__:null,GetPropertiesRequest:Aa,GetPropertiesResponse:Sm,IsMovingRequest:Qt,IsMovingResponse:_m,MoveStraightRequest:Wt,MoveStraightResponse:ym,SetPowerRequest:Kt,SetPowerResponse:fm,SetVelocityRequest:Xt,SetVelocityResponse:Rm,SpinRequest:Ht,SpinResponse:vm,StopRequest:jt,StopResponse:hm},Symbol.toStringTag,{value:"Module"})),Om={typeName:"viam.component.base.v1.BaseService",methods:{moveStraight:{name:"MoveStraight",I:Wt,O:ym,kind:m.Unary},spin:{name:"Spin",I:Ht,O:vm,kind:m.Unary},setPower:{name:"SetPower",I:Kt,O:fm,kind:m.Unary},setVelocity:{name:"SetVelocity",I:Xt,O:Rm,kind:m.Unary},stop:{name:"Stop",I:jt,O:hm,kind:m.Unary},isMoving:{name:"IsMoving",I:Qt,O:_m,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary},getProperties:{name:"GetProperties",I:Aa,O:Sm,kind:m.Unary}}},bm=s.makeEnum("viam.component.board.v1.PowerMode",[{no:0,name:"POWER_MODE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"POWER_MODE_NORMAL",localName:"NORMAL"},{no:2,name:"POWER_MODE_OFFLINE_DEEP",localName:"OFFLINE_DEEP"}]),tS=s.makeMessageType("viam.component.board.v1.Status",()=>[{no:1,name:"analogs",kind:"map",K:9,V:{kind:"scalar",T:5}},{no:2,name:"digital_interrupts",kind:"map",K:9,V:{kind:"scalar",T:3}}]),Zt=s.makeMessageType("viam.component.board.v1.SetGPIORequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin",kind:"scalar",T:9},{no:3,name:"high",kind:"scalar",T:8},{no:99,name:"extra",kind:"message",T:p}]),Mm=s.makeMessageType("viam.component.board.v1.SetGPIOResponse",[]),es=s.makeMessageType("viam.component.board.v1.GetGPIORequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Em=s.makeMessageType("viam.component.board.v1.GetGPIOResponse",()=>[{no:1,name:"high",kind:"scalar",T:8}]),ns=s.makeMessageType("viam.component.board.v1.PWMRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),wm=s.makeMessageType("viam.component.board.v1.PWMResponse",()=>[{no:1,name:"duty_cycle_pct",kind:"scalar",T:1}]),as=s.makeMessageType("viam.component.board.v1.SetPWMRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin",kind:"scalar",T:9},{no:3,name:"duty_cycle_pct",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),Cm=s.makeMessageType("viam.component.board.v1.SetPWMResponse",[]),ts=s.makeMessageType("viam.component.board.v1.PWMFrequencyRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Nm=s.makeMessageType("viam.component.board.v1.PWMFrequencyResponse",()=>[{no:1,name:"frequency_hz",kind:"scalar",T:4}]),ss=s.makeMessageType("viam.component.board.v1.SetPWMFrequencyRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin",kind:"scalar",T:9},{no:3,name:"frequency_hz",kind:"scalar",T:4},{no:99,name:"extra",kind:"message",T:p}]),Pm=s.makeMessageType("viam.component.board.v1.SetPWMFrequencyResponse",[]),os=s.makeMessageType("viam.component.board.v1.ReadAnalogReaderRequest",()=>[{no:1,name:"board_name",kind:"scalar",T:9},{no:2,name:"analog_reader_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Dm=s.makeMessageType("viam.component.board.v1.ReadAnalogReaderResponse",()=>[{no:1,name:"value",kind:"scalar",T:5},{no:2,name:"min_range",kind:"scalar",T:2},{no:3,name:"max_range",kind:"scalar",T:2},{no:4,name:"step_size",kind:"scalar",T:2}]),is=s.makeMessageType("viam.component.board.v1.WriteAnalogRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin",kind:"scalar",T:9},{no:3,name:"value",kind:"scalar",T:5},{no:99,name:"extra",kind:"message",T:p}]),Am=s.makeMessageType("viam.component.board.v1.WriteAnalogResponse",[]),rs=s.makeMessageType("viam.component.board.v1.GetDigitalInterruptValueRequest",()=>[{no:1,name:"board_name",kind:"scalar",T:9},{no:2,name:"digital_interrupt_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Um=s.makeMessageType("viam.component.board.v1.GetDigitalInterruptValueResponse",()=>[{no:1,name:"value",kind:"scalar",T:3}]),ms=s.makeMessageType("viam.component.board.v1.StreamTicksRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"pin_names",kind:"scalar",T:9,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),qm=s.makeMessageType("viam.component.board.v1.StreamTicksResponse",()=>[{no:1,name:"pin_name",kind:"scalar",T:9},{no:2,name:"time",kind:"scalar",T:4},{no:3,name:"high",kind:"scalar",T:8}]),cs=s.makeMessageType("viam.component.board.v1.SetPowerModeRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"power_mode",kind:"enum",T:s.getEnumType(bm)},{no:3,name:"duration",kind:"message",T:J,opt:!0},{no:99,name:"extra",kind:"message",T:p}]),Lm=s.makeMessageType("viam.component.board.v1.SetPowerModeResponse",[]),Gm=Object.freeze(Object.defineProperty({__proto__:null,GetDigitalInterruptValueRequest:rs,GetDigitalInterruptValueResponse:Um,GetGPIORequest:es,GetGPIOResponse:Em,PWMFrequencyRequest:ts,PWMFrequencyResponse:Nm,PWMRequest:ns,PWMResponse:wm,PowerMode:bm,ReadAnalogReaderRequest:os,ReadAnalogReaderResponse:Dm,SetGPIORequest:Zt,SetGPIOResponse:Mm,SetPWMFrequencyRequest:ss,SetPWMFrequencyResponse:Pm,SetPWMRequest:as,SetPWMResponse:Cm,SetPowerModeRequest:cs,SetPowerModeResponse:Lm,Status:tS,StreamTicksRequest:ms,StreamTicksResponse:qm,WriteAnalogRequest:is,WriteAnalogResponse:Am},Symbol.toStringTag,{value:"Module"})),Bm={typeName:"viam.component.board.v1.BoardService",methods:{setGPIO:{name:"SetGPIO",I:Zt,O:Mm,kind:m.Unary},getGPIO:{name:"GetGPIO",I:es,O:Em,kind:m.Unary},pWM:{name:"PWM",I:ns,O:wm,kind:m.Unary},setPWM:{name:"SetPWM",I:as,O:Cm,kind:m.Unary},pWMFrequency:{name:"PWMFrequency",I:ts,O:Nm,kind:m.Unary},setPWMFrequency:{name:"SetPWMFrequency",I:ss,O:Pm,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},readAnalogReader:{name:"ReadAnalogReader",I:os,O:Dm,kind:m.Unary},writeAnalog:{name:"WriteAnalog",I:is,O:Am,kind:m.Unary},getDigitalInterruptValue:{name:"GetDigitalInterruptValue",I:rs,O:Um,kind:m.Unary},streamTicks:{name:"StreamTicks",I:ms,O:qm,kind:m.ServerStreaming},setPowerMode:{name:"SetPowerMode",I:cs,O:Lm,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary}}},ls=s.makeEnum("viam.component.encoder.v1.PositionType",[{no:0,name:"POSITION_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"POSITION_TYPE_TICKS_COUNT",localName:"TICKS_COUNT"},{no:2,name:"POSITION_TYPE_ANGLE_DEGREES",localName:"ANGLE_DEGREES"}]),ds=s.makeMessageType("viam.component.encoder.v1.GetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"position_type",kind:"enum",T:s.getEnumType(ls),opt:!0},{no:99,name:"extra",kind:"message",T:p}]),Fm=s.makeMessageType("viam.component.encoder.v1.GetPositionResponse",()=>[{no:1,name:"value",kind:"scalar",T:2},{no:2,name:"position_type",kind:"enum",T:s.getEnumType(ls)}]),ps=s.makeMessageType("viam.component.encoder.v1.ResetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),xm=s.makeMessageType("viam.component.encoder.v1.ResetPositionResponse",[]),us=s.makeMessageType("viam.component.encoder.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Jm=s.makeMessageType("viam.component.encoder.v1.GetPropertiesResponse",()=>[{no:1,name:"ticks_count_supported",kind:"scalar",T:8},{no:2,name:"angle_degrees_supported",kind:"scalar",T:8}]),zm=Object.freeze(Object.defineProperty({__proto__:null,GetPositionRequest:ds,GetPositionResponse:Fm,GetPropertiesRequest:us,GetPropertiesResponse:Jm,PositionType:ls,ResetPositionRequest:ps,ResetPositionResponse:xm},Symbol.toStringTag,{value:"Module"})),Vm={typeName:"viam.component.encoder.v1.EncoderService",methods:{getPosition:{name:"GetPosition",I:ds,O:Fm,kind:m.Unary},resetPosition:{name:"ResetPosition",I:ps,O:xm,kind:m.Unary},getProperties:{name:"GetProperties",I:us,O:Jm,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary}}},gs=s.makeMessageType("viam.component.gantry.v1.GetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),$m=s.makeMessageType("viam.component.gantry.v1.GetPositionResponse",()=>[{no:1,name:"positions_mm",kind:"scalar",T:1,repeated:!0}]),Ts=s.makeMessageType("viam.component.gantry.v1.MoveToPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"positions_mm",kind:"scalar",T:1,repeated:!0},{no:3,name:"speeds_mm_per_sec",kind:"scalar",T:1,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),Ym=s.makeMessageType("viam.component.gantry.v1.MoveToPositionResponse",[]),ks=s.makeMessageType("viam.component.gantry.v1.HomeRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Wm=s.makeMessageType("viam.component.gantry.v1.HomeResponse",()=>[{no:1,name:"homed",kind:"scalar",T:8}]),ys=s.makeMessageType("viam.component.gantry.v1.GetLengthsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Hm=s.makeMessageType("viam.component.gantry.v1.GetLengthsResponse",()=>[{no:1,name:"lengths_mm",kind:"scalar",T:1,repeated:!0}]),vs=s.makeMessageType("viam.component.gantry.v1.StopRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),jm=s.makeMessageType("viam.component.gantry.v1.StopResponse",[]),sS=s.makeMessageType("viam.component.gantry.v1.Status",()=>[{no:1,name:"positions_mm",kind:"scalar",T:1,repeated:!0},{no:2,name:"lengths_mm",kind:"scalar",T:1,repeated:!0},{no:3,name:"is_moving",kind:"scalar",T:8}]),hs=s.makeMessageType("viam.component.gantry.v1.IsMovingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),Km=s.makeMessageType("viam.component.gantry.v1.IsMovingResponse",()=>[{no:1,name:"is_moving",kind:"scalar",T:8}]),oS=Object.freeze(Object.defineProperty({__proto__:null,GetLengthsRequest:ys,GetLengthsResponse:Hm,GetPositionRequest:gs,GetPositionResponse:$m,HomeRequest:ks,HomeResponse:Wm,IsMovingRequest:hs,IsMovingResponse:Km,MoveToPositionRequest:Ts,MoveToPositionResponse:Ym,Status:sS,StopRequest:vs,StopResponse:jm},Symbol.toStringTag,{value:"Module"})),Xm={typeName:"viam.component.gantry.v1.GantryService",methods:{getPosition:{name:"GetPosition",I:gs,O:$m,kind:m.Unary},moveToPosition:{name:"MoveToPosition",I:Ts,O:Ym,kind:m.Unary},home:{name:"Home",I:ks,O:Wm,kind:m.Unary},getLengths:{name:"GetLengths",I:ys,O:Hm,kind:m.Unary},stop:{name:"Stop",I:vs,O:jm,kind:m.Unary},isMoving:{name:"IsMoving",I:hs,O:Km,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},getKinematics:{name:"GetKinematics",I:qn,O:Pa,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary}}},fs={typeName:"viam.component.generic.v1.GenericService",methods:{doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary}}},iS=Object.freeze(Object.defineProperty({__proto__:null,GenericService:fs},Symbol.toStringTag,{value:"Module"})),Rs=s.makeMessageType("viam.component.gripper.v1.OpenRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Qm=s.makeMessageType("viam.component.gripper.v1.OpenResponse",[]),_s=s.makeMessageType("viam.component.gripper.v1.GrabRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Zm=s.makeMessageType("viam.component.gripper.v1.GrabResponse",()=>[{no:1,name:"success",kind:"scalar",T:8},{no:99,name:"extra",kind:"message",T:p}]),Ss=s.makeMessageType("viam.component.gripper.v1.StopRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),ec=s.makeMessageType("viam.component.gripper.v1.StopResponse",[]),Is=s.makeMessageType("viam.component.gripper.v1.IsMovingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),nc=s.makeMessageType("viam.component.gripper.v1.IsMovingResponse",()=>[{no:1,name:"is_moving",kind:"scalar",T:8}]),Os=s.makeMessageType("viam.component.gripper.v1.IsHoldingSomethingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),ac=s.makeMessageType("viam.component.gripper.v1.IsHoldingSomethingResponse",()=>[{no:1,name:"is_holding_something",kind:"scalar",T:8},{no:99,name:"meta",kind:"message",T:p}]),bs=s.makeMessageType("viam.component.gripper.v1.GetCurrentInputsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),tc=s.makeMessageType("viam.component.gripper.v1.GetCurrentInputsResponse",()=>[{no:1,name:"values",kind:"scalar",T:1,repeated:!0}]),Ms=s.makeMessageType("viam.component.gripper.v1.GoToInputsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"values",kind:"scalar",T:1,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),sc=s.makeMessageType("viam.component.gripper.v1.GoToInputsResponse",[]),rS=Object.freeze(Object.defineProperty({__proto__:null,GetCurrentInputsRequest:bs,GetCurrentInputsResponse:tc,GoToInputsRequest:Ms,GoToInputsResponse:sc,GrabRequest:_s,GrabResponse:Zm,IsHoldingSomethingRequest:Os,IsHoldingSomethingResponse:ac,IsMovingRequest:Is,IsMovingResponse:nc,OpenRequest:Rs,OpenResponse:Qm,StopRequest:Ss,StopResponse:ec},Symbol.toStringTag,{value:"Module"})),oc={typeName:"viam.component.gripper.v1.GripperService",methods:{open:{name:"Open",I:Rs,O:Qm,kind:m.Unary},grab:{name:"Grab",I:_s,O:Zm,kind:m.Unary},stop:{name:"Stop",I:Ss,O:ec,kind:m.Unary},isMoving:{name:"IsMoving",I:Is,O:nc,kind:m.Unary},isHoldingSomething:{name:"IsHoldingSomething",I:Os,O:ac,kind:m.Unary},getCurrentInputs:{name:"GetCurrentInputs",I:bs,O:tc,kind:m.Unary},goToInputs:{name:"GoToInputs",I:Ms,O:sc,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary},getKinematics:{name:"GetKinematics",I:qn,O:Pa,kind:m.Unary}}},ic=s.makeMessageType("viam.component.inputcontroller.v1.GetControlsRequest",()=>[{no:1,name:"controller",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),rc=s.makeMessageType("viam.component.inputcontroller.v1.GetControlsResponse",()=>[{no:1,name:"controls",kind:"scalar",T:9,repeated:!0}]),Es=s.makeMessageType("viam.component.inputcontroller.v1.GetEventsRequest",()=>[{no:1,name:"controller",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),mc=s.makeMessageType("viam.component.inputcontroller.v1.GetEventsResponse",()=>[{no:1,name:"events",kind:"message",T:xn,repeated:!0}]),ws=s.makeMessageType("viam.component.inputcontroller.v1.TriggerEventRequest",()=>[{no:1,name:"controller",kind:"scalar",T:9},{no:2,name:"event",kind:"message",T:xn},{no:99,name:"extra",kind:"message",T:p}]),cc=s.makeMessageType("viam.component.inputcontroller.v1.TriggerEventResponse",[]),xn=s.makeMessageType("viam.component.inputcontroller.v1.Event",()=>[{no:1,name:"time",kind:"message",T:_},{no:2,name:"event",kind:"scalar",T:9},{no:3,name:"control",kind:"scalar",T:9},{no:4,name:"value",kind:"scalar",T:1}]),lc=s.makeMessageType("viam.component.inputcontroller.v1.StreamEventsRequest",()=>[{no:1,name:"controller",kind:"scalar",T:9},{no:2,name:"events",kind:"message",T:dc,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),dc=s.makeMessageType("viam.component.inputcontroller.v1.StreamEventsRequest.Events",()=>[{no:1,name:"control",kind:"scalar",T:9},{no:2,name:"events",kind:"scalar",T:9,repeated:!0},{no:3,name:"cancelled_events",kind:"scalar",T:9,repeated:!0}],{localName:"StreamEventsRequest_Events"}),pc=s.makeMessageType("viam.component.inputcontroller.v1.StreamEventsResponse",()=>[{no:1,name:"event",kind:"message",T:xn}]),uc=Object.freeze(Object.defineProperty({__proto__:null,Event:xn,GetControlsRequest:ic,GetControlsResponse:rc,GetEventsRequest:Es,GetEventsResponse:mc,Status:s.makeMessageType("viam.component.inputcontroller.v1.Status",()=>[{no:1,name:"events",kind:"message",T:xn,repeated:!0}]),StreamEventsRequest:lc,StreamEventsRequest_Events:dc,StreamEventsResponse:pc,TriggerEventRequest:ws,TriggerEventResponse:cc},Symbol.toStringTag,{value:"Module"})),gc={typeName:"viam.component.inputcontroller.v1.InputControllerService",methods:{getControls:{name:"GetControls",I:ic,O:rc,kind:m.Unary},getEvents:{name:"GetEvents",I:Es,O:mc,kind:m.Unary},streamEvents:{name:"StreamEvents",I:lc,O:pc,kind:m.ServerStreaming},triggerEvent:{name:"TriggerEvent",I:ws,O:cc,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary}}},Cs=s.makeMessageType("viam.component.motor.v1.SetPowerRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"power_pct",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),Tc=s.makeMessageType("viam.component.motor.v1.SetPowerResponse",[]),Ns=s.makeMessageType("viam.component.motor.v1.GoForRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"rpm",kind:"scalar",T:1},{no:3,name:"revolutions",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),kc=s.makeMessageType("viam.component.motor.v1.GoForResponse",[]),Ps=s.makeMessageType("viam.component.motor.v1.GoToRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"rpm",kind:"scalar",T:1},{no:3,name:"position_revolutions",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),yc=s.makeMessageType("viam.component.motor.v1.GoToResponse",[]),Ds=s.makeMessageType("viam.component.motor.v1.SetRPMRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"rpm",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),vc=s.makeMessageType("viam.component.motor.v1.SetRPMResponse",[]),As=s.makeMessageType("viam.component.motor.v1.ResetZeroPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"offset",kind:"scalar",T:1},{no:99,name:"extra",kind:"message",T:p}]),hc=s.makeMessageType("viam.component.motor.v1.ResetZeroPositionResponse",[]),Us=s.makeMessageType("viam.component.motor.v1.GetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),fc=s.makeMessageType("viam.component.motor.v1.GetPositionResponse",()=>[{no:1,name:"position",kind:"scalar",T:1}]),qs=s.makeMessageType("viam.component.motor.v1.StopRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Rc=s.makeMessageType("viam.component.motor.v1.StopResponse",[]),Ls=s.makeMessageType("viam.component.motor.v1.IsPoweredRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),_c=s.makeMessageType("viam.component.motor.v1.IsPoweredResponse",()=>[{no:1,name:"is_on",kind:"scalar",T:8},{no:2,name:"power_pct",kind:"scalar",T:1}]),Gs=s.makeMessageType("viam.component.motor.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Sc=s.makeMessageType("viam.component.motor.v1.GetPropertiesResponse",()=>[{no:1,name:"position_reporting",kind:"scalar",T:8}]),mS=s.makeMessageType("viam.component.motor.v1.Status",()=>[{no:1,name:"is_powered",kind:"scalar",T:8},{no:3,name:"position",kind:"scalar",T:1},{no:4,name:"is_moving",kind:"scalar",T:8}]),Bs=s.makeMessageType("viam.component.motor.v1.IsMovingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),Ic=s.makeMessageType("viam.component.motor.v1.IsMovingResponse",()=>[{no:1,name:"is_moving",kind:"scalar",T:8}]),cS=Object.freeze(Object.defineProperty({__proto__:null,GetPositionRequest:Us,GetPositionResponse:fc,GetPropertiesRequest:Gs,GetPropertiesResponse:Sc,GoForRequest:Ns,GoForResponse:kc,GoToRequest:Ps,GoToResponse:yc,IsMovingRequest:Bs,IsMovingResponse:Ic,IsPoweredRequest:Ls,IsPoweredResponse:_c,ResetZeroPositionRequest:As,ResetZeroPositionResponse:hc,SetPowerRequest:Cs,SetPowerResponse:Tc,SetRPMRequest:Ds,SetRPMResponse:vc,Status:mS,StopRequest:qs,StopResponse:Rc},Symbol.toStringTag,{value:"Module"})),Oc={typeName:"viam.component.motor.v1.MotorService",methods:{setPower:{name:"SetPower",I:Cs,O:Tc,kind:m.Unary},goFor:{name:"GoFor",I:Ns,O:kc,kind:m.Unary},goTo:{name:"GoTo",I:Ps,O:yc,kind:m.Unary},setRPM:{name:"SetRPM",I:Ds,O:vc,kind:m.Unary},resetZeroPosition:{name:"ResetZeroPosition",I:As,O:hc,kind:m.Unary},getPosition:{name:"GetPosition",I:Us,O:fc,kind:m.Unary},getProperties:{name:"GetProperties",I:Gs,O:Sc,kind:m.Unary},stop:{name:"Stop",I:qs,O:Rc,kind:m.Unary},isPowered:{name:"IsPowered",I:Ls,O:_c,kind:m.Unary},isMoving:{name:"IsMoving",I:Bs,O:Ic,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary}}},Fs=s.makeMessageType("viam.component.movementsensor.v1.GetLinearVelocityRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),bc=s.makeMessageType("viam.component.movementsensor.v1.GetLinearVelocityResponse",()=>[{no:1,name:"linear_velocity",kind:"message",T:ke}]),xs=s.makeMessageType("viam.component.movementsensor.v1.GetAngularVelocityRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Mc=s.makeMessageType("viam.component.movementsensor.v1.GetAngularVelocityResponse",()=>[{no:1,name:"angular_velocity",kind:"message",T:ke}]),Js=s.makeMessageType("viam.component.movementsensor.v1.GetCompassHeadingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Ec=s.makeMessageType("viam.component.movementsensor.v1.GetCompassHeadingResponse",()=>[{no:1,name:"value",kind:"scalar",T:1}]),zs=s.makeMessageType("viam.component.movementsensor.v1.GetOrientationRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),wc=s.makeMessageType("viam.component.movementsensor.v1.GetOrientationResponse",()=>[{no:1,name:"orientation",kind:"message",T:Dt}]),Vs=s.makeMessageType("viam.component.movementsensor.v1.GetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Cc=s.makeMessageType("viam.component.movementsensor.v1.GetPositionResponse",()=>[{no:1,name:"coordinate",kind:"message",T:je},{no:2,name:"altitude_m",kind:"scalar",T:2}]),$s=s.makeMessageType("viam.component.movementsensor.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Nc=s.makeMessageType("viam.component.movementsensor.v1.GetPropertiesResponse",()=>[{no:1,name:"linear_velocity_supported",kind:"scalar",T:8},{no:2,name:"angular_velocity_supported",kind:"scalar",T:8},{no:3,name:"orientation_supported",kind:"scalar",T:8},{no:4,name:"position_supported",kind:"scalar",T:8},{no:5,name:"compass_heading_supported",kind:"scalar",T:8},{no:6,name:"linear_acceleration_supported",kind:"scalar",T:8}]),Ys=s.makeMessageType("viam.component.movementsensor.v1.GetAccuracyRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Pc=s.makeMessageType("viam.component.movementsensor.v1.GetAccuracyResponse",()=>[{no:1,name:"accuracy",kind:"map",K:9,V:{kind:"scalar",T:2}},{no:2,name:"position_hdop",kind:"scalar",T:2,opt:!0},{no:3,name:"position_vdop",kind:"scalar",T:2,opt:!0},{no:4,name:"position_nmea_gga_fix",kind:"scalar",T:5,opt:!0},{no:5,name:"compass_degrees_error",kind:"scalar",T:2,opt:!0}]),Ws=s.makeMessageType("viam.component.movementsensor.v1.GetLinearAccelerationRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Dc=s.makeMessageType("viam.component.movementsensor.v1.GetLinearAccelerationResponse",()=>[{no:1,name:"linear_acceleration",kind:"message",T:ke}]),Ac=Object.freeze(Object.defineProperty({__proto__:null,GetAccuracyRequest:Ys,GetAccuracyResponse:Pc,GetAngularVelocityRequest:xs,GetAngularVelocityResponse:Mc,GetCompassHeadingRequest:Js,GetCompassHeadingResponse:Ec,GetLinearAccelerationRequest:Ws,GetLinearAccelerationResponse:Dc,GetLinearVelocityRequest:Fs,GetLinearVelocityResponse:bc,GetOrientationRequest:zs,GetOrientationResponse:wc,GetPositionRequest:Vs,GetPositionResponse:Cc,GetPropertiesRequest:$s,GetPropertiesResponse:Nc},Symbol.toStringTag,{value:"Module"})),Uc={typeName:"viam.component.movementsensor.v1.MovementSensorService",methods:{getLinearVelocity:{name:"GetLinearVelocity",I:Fs,O:bc,kind:m.Unary},getAngularVelocity:{name:"GetAngularVelocity",I:xs,O:Mc,kind:m.Unary},getCompassHeading:{name:"GetCompassHeading",I:Js,O:Ec,kind:m.Unary},getOrientation:{name:"GetOrientation",I:zs,O:wc,kind:m.Unary},getPosition:{name:"GetPosition",I:Vs,O:Cc,kind:m.Unary},getProperties:{name:"GetProperties",I:$s,O:Nc,kind:m.Unary},getAccuracy:{name:"GetAccuracy",I:Ys,O:Pc,kind:m.Unary},getLinearAcceleration:{name:"GetLinearAcceleration",I:Ws,O:Dc,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary},getReadings:{name:"GetReadings",I:tn,O:Da,kind:m.Unary}}},Hs=s.makeMessageType("viam.component.powersensor.v1.GetVoltageRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),qc=s.makeMessageType("viam.component.powersensor.v1.GetVoltageResponse",()=>[{no:1,name:"volts",kind:"scalar",T:1},{no:2,name:"is_ac",kind:"scalar",T:8}]),js=s.makeMessageType("viam.component.powersensor.v1.GetCurrentRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Lc=s.makeMessageType("viam.component.powersensor.v1.GetCurrentResponse",()=>[{no:1,name:"amperes",kind:"scalar",T:1},{no:2,name:"is_ac",kind:"scalar",T:8}]),Ks=s.makeMessageType("viam.component.powersensor.v1.GetPowerRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Gc=s.makeMessageType("viam.component.powersensor.v1.GetPowerResponse",()=>[{no:1,name:"watts",kind:"scalar",T:1}]),lS=Object.freeze(Object.defineProperty({__proto__:null,GetCurrentRequest:js,GetCurrentResponse:Lc,GetPowerRequest:Ks,GetPowerResponse:Gc,GetVoltageRequest:Hs,GetVoltageResponse:qc},Symbol.toStringTag,{value:"Module"})),Bc={typeName:"viam.component.powersensor.v1.PowerSensorService",methods:{getVoltage:{name:"GetVoltage",I:Hs,O:qc,kind:m.Unary},getCurrent:{name:"GetCurrent",I:js,O:Lc,kind:m.Unary},getPower:{name:"GetPower",I:Ks,O:Gc,kind:m.Unary},getReadings:{name:"GetReadings",I:tn,O:Da,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary}}},Xs=s.makeMessageType("viam.component.servo.v1.MoveRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"angle_deg",kind:"scalar",T:13},{no:99,name:"extra",kind:"message",T:p}]),Fc=s.makeMessageType("viam.component.servo.v1.MoveResponse",[]),Qs=s.makeMessageType("viam.component.servo.v1.GetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),xc=s.makeMessageType("viam.component.servo.v1.GetPositionResponse",()=>[{no:1,name:"position_deg",kind:"scalar",T:13}]),Zs=s.makeMessageType("viam.component.servo.v1.StopRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Jc=s.makeMessageType("viam.component.servo.v1.StopResponse",[]),dS=s.makeMessageType("viam.component.servo.v1.Status",()=>[{no:1,name:"position_deg",kind:"scalar",T:13},{no:2,name:"is_moving",kind:"scalar",T:8}]),eo=s.makeMessageType("viam.component.servo.v1.IsMovingRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),zc=s.makeMessageType("viam.component.servo.v1.IsMovingResponse",()=>[{no:1,name:"is_moving",kind:"scalar",T:8}]),pS=Object.freeze(Object.defineProperty({__proto__:null,GetPositionRequest:Qs,GetPositionResponse:xc,IsMovingRequest:eo,IsMovingResponse:zc,MoveRequest:Xs,MoveResponse:Fc,Status:dS,StopRequest:Zs,StopResponse:Jc},Symbol.toStringTag,{value:"Module"})),Vc={typeName:"viam.component.servo.v1.ServoService",methods:{move:{name:"Move",I:Xs,O:Fc,kind:m.Unary},getPosition:{name:"GetPosition",I:Qs,O:xc,kind:m.Unary},stop:{name:"Stop",I:Zs,O:Jc,kind:m.Unary},isMoving:{name:"IsMoving",I:eo,O:zc,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary}}},$c=s.makeMessageType("opentelemetry.proto.common.v1.AnyValue",()=>[{no:1,name:"string_value",kind:"scalar",T:9,oneof:"value"},{no:2,name:"bool_value",kind:"scalar",T:8,oneof:"value"},{no:3,name:"int_value",kind:"scalar",T:3,oneof:"value"},{no:4,name:"double_value",kind:"scalar",T:1,oneof:"value"},{no:5,name:"array_value",kind:"message",T:uS,oneof:"value"},{no:6,name:"kvlist_value",kind:"message",T:gS,oneof:"value"},{no:7,name:"bytes_value",kind:"scalar",T:12,oneof:"value"},{no:8,name:"string_value_strindex",kind:"scalar",T:5,oneof:"value"}]),uS=s.makeMessageType("opentelemetry.proto.common.v1.ArrayValue",()=>[{no:1,name:"values",kind:"message",T:$c,repeated:!0}]),gS=s.makeMessageType("opentelemetry.proto.common.v1.KeyValueList",()=>[{no:1,name:"values",kind:"message",T:yn,repeated:!0}]),yn=s.makeMessageType("opentelemetry.proto.common.v1.KeyValue",()=>[{no:1,name:"key",kind:"scalar",T:9},{no:2,name:"value",kind:"message",T:$c},{no:3,name:"key_strindex",kind:"scalar",T:5}]),TS=s.makeMessageType("opentelemetry.proto.common.v1.InstrumentationScope",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:yn,repeated:!0},{no:4,name:"dropped_attributes_count",kind:"scalar",T:13}]),kS=s.makeMessageType("opentelemetry.proto.common.v1.EntityRef",()=>[{no:1,name:"schema_url",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"id_keys",kind:"scalar",T:9,repeated:!0},{no:4,name:"description_keys",kind:"scalar",T:9,repeated:!0}]),yS=s.makeMessageType("opentelemetry.proto.resource.v1.Resource",()=>[{no:1,name:"attributes",kind:"message",T:yn,repeated:!0},{no:2,name:"dropped_attributes_count",kind:"scalar",T:13},{no:3,name:"entity_refs",kind:"message",T:kS,repeated:!0}]),vS=s.makeMessageType("opentelemetry.proto.trace.v1.ResourceSpans",()=>[{no:1,name:"resource",kind:"message",T:yS},{no:2,name:"scope_spans",kind:"message",T:hS,repeated:!0},{no:3,name:"schema_url",kind:"scalar",T:9}]),hS=s.makeMessageType("opentelemetry.proto.trace.v1.ScopeSpans",()=>[{no:1,name:"scope",kind:"message",T:TS},{no:2,name:"spans",kind:"message",T:fS,repeated:!0},{no:3,name:"schema_url",kind:"scalar",T:9}]),fS=s.makeMessageType("opentelemetry.proto.trace.v1.Span",()=>[{no:1,name:"trace_id",kind:"scalar",T:12},{no:2,name:"span_id",kind:"scalar",T:12},{no:3,name:"trace_state",kind:"scalar",T:9},{no:4,name:"parent_span_id",kind:"scalar",T:12},{no:16,name:"flags",kind:"scalar",T:7},{no:5,name:"name",kind:"scalar",T:9},{no:6,name:"kind",kind:"enum",T:s.getEnumType(RS)},{no:7,name:"start_time_unix_nano",kind:"scalar",T:6},{no:8,name:"end_time_unix_nano",kind:"scalar",T:6},{no:9,name:"attributes",kind:"message",T:yn,repeated:!0},{no:10,name:"dropped_attributes_count",kind:"scalar",T:13},{no:11,name:"events",kind:"message",T:_S,repeated:!0},{no:12,name:"dropped_events_count",kind:"scalar",T:13},{no:13,name:"links",kind:"message",T:SS,repeated:!0},{no:14,name:"dropped_links_count",kind:"scalar",T:13},{no:15,name:"status",kind:"message",T:IS}]),RS=s.makeEnum("opentelemetry.proto.trace.v1.Span.SpanKind",[{no:0,name:"SPAN_KIND_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"SPAN_KIND_INTERNAL",localName:"INTERNAL"},{no:2,name:"SPAN_KIND_SERVER",localName:"SERVER"},{no:3,name:"SPAN_KIND_CLIENT",localName:"CLIENT"},{no:4,name:"SPAN_KIND_PRODUCER",localName:"PRODUCER"},{no:5,name:"SPAN_KIND_CONSUMER",localName:"CONSUMER"}]),_S=s.makeMessageType("opentelemetry.proto.trace.v1.Span.Event",()=>[{no:1,name:"time_unix_nano",kind:"scalar",T:6},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"attributes",kind:"message",T:yn,repeated:!0},{no:4,name:"dropped_attributes_count",kind:"scalar",T:13}],{localName:"Span_Event"}),SS=s.makeMessageType("opentelemetry.proto.trace.v1.Span.Link",()=>[{no:1,name:"trace_id",kind:"scalar",T:12},{no:2,name:"span_id",kind:"scalar",T:12},{no:3,name:"trace_state",kind:"scalar",T:9},{no:4,name:"attributes",kind:"message",T:yn,repeated:!0},{no:5,name:"dropped_attributes_count",kind:"scalar",T:13},{no:6,name:"flags",kind:"scalar",T:7}],{localName:"Span_Link"}),IS=s.makeMessageType("opentelemetry.proto.trace.v1.Status",()=>[{no:2,name:"message",kind:"scalar",T:9},{no:3,name:"code",kind:"enum",T:s.getEnumType(OS)}]),OS=s.makeEnum("opentelemetry.proto.trace.v1.Status.StatusCode",[{no:0,name:"STATUS_CODE_UNSET",localName:"UNSET"},{no:1,name:"STATUS_CODE_OK",localName:"OK"},{no:2,name:"STATUS_CODE_ERROR",localName:"ERROR"}]),Yc=s.makeEnum("viam.robot.v1.PeerConnectionType",[{no:0,name:"PEER_CONNECTION_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"PEER_CONNECTION_TYPE_GRPC",localName:"GRPC"},{no:2,name:"PEER_CONNECTION_TYPE_WEBRTC",localName:"WEBRTC"}]),Wc=s.makeMessageType("viam.robot.v1.SendTracesRequest",()=>[{no:1,name:"resource_spans",kind:"message",T:vS,repeated:!0}]),Hc=s.makeMessageType("viam.robot.v1.SendTracesResponse",[]),jc=s.makeMessageType("viam.robot.v1.TunnelRequest",()=>[{no:1,name:"destination_port",kind:"scalar",T:13},{no:2,name:"data",kind:"scalar",T:12}]),Kc=s.makeMessageType("viam.robot.v1.TunnelResponse",()=>[{no:1,name:"data",kind:"scalar",T:12}]),Xc=s.makeMessageType("viam.robot.v1.ListTunnelsRequest",[]),Qc=s.makeMessageType("viam.robot.v1.ListTunnelsResponse",()=>[{no:1,name:"tunnels",kind:"message",T:Zc,repeated:!0}]),Zc=s.makeMessageType("viam.robot.v1.Tunnel",()=>[{no:1,name:"port",kind:"scalar",T:13},{no:2,name:"connection_timeout",kind:"message",T:J}]),el=s.makeMessageType("viam.robot.v1.FrameSystemConfig",()=>[{no:1,name:"frame",kind:"message",T:xe},{no:2,name:"kinematics",kind:"message",T:p}]),nl=s.makeMessageType("viam.robot.v1.FrameSystemConfigRequest",()=>[{no:1,name:"supplemental_transforms",kind:"message",T:xe,repeated:!0}]),al=s.makeMessageType("viam.robot.v1.FrameSystemConfigResponse",()=>[{no:1,name:"frame_system_configs",kind:"message",T:el,repeated:!0}]),no=s.makeMessageType("viam.robot.v1.TransformPoseRequest",()=>[{no:1,name:"source",kind:"message",T:He},{no:2,name:"destination",kind:"scalar",T:9},{no:3,name:"supplemental_transforms",kind:"message",T:xe,repeated:!0}]),tl=s.makeMessageType("viam.robot.v1.TransformPoseResponse",()=>[{no:1,name:"pose",kind:"message",T:He}]),ao=s.makeMessageType("viam.robot.v1.TransformPCDRequest",()=>[{no:1,name:"point_cloud_pcd",kind:"scalar",T:12},{no:2,name:"source",kind:"scalar",T:9},{no:3,name:"destination",kind:"scalar",T:9}]),sl=s.makeMessageType("viam.robot.v1.TransformPCDResponse",()=>[{no:1,name:"point_cloud_pcd",kind:"scalar",T:12}]),ol=s.makeMessageType("viam.robot.v1.ResourceNamesRequest",[]),il=s.makeMessageType("viam.robot.v1.ResourceNamesResponse",()=>[{no:1,name:"resources",kind:"message",T:z,repeated:!0}]),rl=s.makeMessageType("viam.robot.v1.ResourceRPCSubtype",()=>[{no:1,name:"subtype",kind:"message",T:z},{no:2,name:"proto_service",kind:"scalar",T:9}]),ml=s.makeMessageType("viam.robot.v1.ResourceRPCSubtypesRequest",[]),cl=s.makeMessageType("viam.robot.v1.ResourceRPCSubtypesResponse",()=>[{no:1,name:"resource_rpc_subtypes",kind:"message",T:rl,repeated:!0}]),ll=s.makeMessageType("viam.robot.v1.Operation",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"method",kind:"scalar",T:9},{no:3,name:"arguments",kind:"message",T:p},{no:4,name:"started",kind:"message",T:_},{no:5,name:"session_id",kind:"scalar",T:9,opt:!0}]),dl=s.makeMessageType("viam.robot.v1.GetOperationsRequest",[]),pl=s.makeMessageType("viam.robot.v1.GetOperationsResponse",()=>[{no:1,name:"operations",kind:"message",T:ll,repeated:!0}]),ul=s.makeMessageType("viam.robot.v1.CancelOperationRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),gl=s.makeMessageType("viam.robot.v1.CancelOperationResponse",[]),Tl=s.makeMessageType("viam.robot.v1.BlockForOperationRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),kl=s.makeMessageType("viam.robot.v1.BlockForOperationResponse",[]),yl=s.makeMessageType("viam.robot.v1.PeerConnectionInfo",()=>[{no:1,name:"type",kind:"enum",T:s.getEnumType(Yc)},{no:2,name:"remote_address",kind:"scalar",T:9,opt:!0},{no:3,name:"local_address",kind:"scalar",T:9,opt:!0}]),vl=s.makeMessageType("viam.robot.v1.Session",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"peer_connection_info",kind:"message",T:yl,opt:!0}]),hl=s.makeMessageType("viam.robot.v1.GetSessionsRequest",[]),fl=s.makeMessageType("viam.robot.v1.GetSessionsResponse",()=>[{no:1,name:"sessions",kind:"message",T:vl,repeated:!0}]),Rl=s.makeMessageType("viam.robot.v1.ModuleModel",()=>[{no:1,name:"module_name",kind:"scalar",T:9},{no:2,name:"model",kind:"scalar",T:9},{no:3,name:"api",kind:"scalar",T:9},{no:4,name:"from_local_module",kind:"scalar",T:8}]),to=s.makeMessageType("viam.robot.v1.GetModelsFromModulesRequest",[]),_l=s.makeMessageType("viam.robot.v1.GetModelsFromModulesResponse",()=>[{no:1,name:"models",kind:"message",T:Rl,repeated:!0}]),so=s.makeMessageType("viam.robot.v1.Status",()=>[{no:1,name:"name",kind:"message",T:z},{no:2,name:"status",kind:"message",T:p},{no:3,name:"last_reconfigured",kind:"message",T:_}]),Sl=s.makeMessageType("viam.robot.v1.GetStatusRequest",()=>[{no:1,name:"resource_names",kind:"message",T:z,repeated:!0}]),Il=s.makeMessageType("viam.robot.v1.GetStatusResponse",()=>[{no:1,name:"status",kind:"message",T:so,repeated:!0}]),Ol=s.makeMessageType("viam.robot.v1.StreamStatusRequest",()=>[{no:1,name:"resource_names",kind:"message",T:z,repeated:!0},{no:2,name:"every",kind:"message",T:J}]),bl=s.makeMessageType("viam.robot.v1.StreamStatusResponse",()=>[{no:1,name:"status",kind:"message",T:so,repeated:!0}]),Ml=s.makeMessageType("viam.robot.v1.StopExtraParameters",()=>[{no:1,name:"name",kind:"message",T:z},{no:2,name:"params",kind:"message",T:p}]),El=s.makeMessageType("viam.robot.v1.StopAllRequest",()=>[{no:99,name:"extra",kind:"message",T:Ml,repeated:!0}]),wl=s.makeMessageType("viam.robot.v1.StopAllResponse",[]),oo=s.makeMessageType("viam.robot.v1.StartSessionRequest",()=>[{no:1,name:"resume",kind:"scalar",T:9}]),Cl=s.makeMessageType("viam.robot.v1.StartSessionResponse",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"heartbeat_window",kind:"message",T:J}]),io=s.makeMessageType("viam.robot.v1.SendSessionHeartbeatRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Nl=s.makeMessageType("viam.robot.v1.SendSessionHeartbeatResponse",[]),Pl=s.makeMessageType("viam.robot.v1.LogRequest",()=>[{no:1,name:"logs",kind:"message",T:Ln,repeated:!0}]),Dl=s.makeMessageType("viam.robot.v1.LogResponse",[]),Al=s.makeMessageType("viam.robot.v1.GetCloudMetadataRequest",[]),ro=s.makeMessageType("viam.robot.v1.GetCloudMetadataResponse",()=>[{no:2,name:"primary_org_id",kind:"scalar",T:9},{no:3,name:"location_id",kind:"scalar",T:9},{no:4,name:"machine_id",kind:"scalar",T:9},{no:5,name:"machine_part_id",kind:"scalar",T:9}]),mo=s.makeMessageType("viam.robot.v1.RestartModuleRequest",()=>[{no:1,name:"module_id",kind:"scalar",T:9,oneof:"id_or_name"},{no:2,name:"module_name",kind:"scalar",T:9,oneof:"id_or_name"}]),Ul=s.makeMessageType("viam.robot.v1.RestartModuleResponse",[]),ql=s.makeMessageType("viam.robot.v1.ShutdownRequest",[]),Ll=s.makeMessageType("viam.robot.v1.ShutdownResponse",[]),Gl=s.makeMessageType("viam.robot.v1.GetMachineStatusRequest",[]),Bl=s.makeMessageType("viam.robot.v1.GetMachineStatusResponse",()=>[{no:1,name:"resources",kind:"message",T:Jl,repeated:!0},{no:2,name:"config",kind:"message",T:Vl},{no:3,name:"state",kind:"enum",T:s.getEnumType(Fl)},{no:4,name:"job_statuses",kind:"message",T:xl,repeated:!0}]),Fl=s.makeEnum("viam.robot.v1.GetMachineStatusResponse.State",[{no:0,name:"STATE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"STATE_INITIALIZING",localName:"INITIALIZING"},{no:2,name:"STATE_RUNNING",localName:"RUNNING"}]),xl=s.makeMessageType("viam.robot.v1.JobStatus",()=>[{no:1,name:"job_name",kind:"scalar",T:9},{no:2,name:"recent_successful_runs",kind:"message",T:_,repeated:!0},{no:3,name:"recent_failed_runs",kind:"message",T:_,repeated:!0}]),Jl=s.makeMessageType("viam.robot.v1.ResourceStatus",()=>[{no:1,name:"name",kind:"message",T:z},{no:2,name:"state",kind:"enum",T:s.getEnumType(zl)},{no:3,name:"last_updated",kind:"message",T:_},{no:4,name:"revision",kind:"scalar",T:9},{no:5,name:"error",kind:"scalar",T:9},{no:6,name:"cloud_metadata",kind:"message",T:ro,opt:!0}]),zl=s.makeEnum("viam.robot.v1.ResourceStatus.State",[{no:0,name:"STATE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"STATE_UNCONFIGURED",localName:"UNCONFIGURED"},{no:2,name:"STATE_CONFIGURING",localName:"CONFIGURING"},{no:3,name:"STATE_READY",localName:"READY"},{no:4,name:"STATE_REMOVING",localName:"REMOVING"},{no:5,name:"STATE_UNHEALTHY",localName:"UNHEALTHY"}]),Vl=s.makeMessageType("viam.robot.v1.ConfigStatus",()=>[{no:1,name:"revision",kind:"scalar",T:9},{no:2,name:"last_updated",kind:"message",T:_}]),$l=s.makeMessageType("viam.robot.v1.GetVersionRequest",[]),Yl=s.makeMessageType("viam.robot.v1.GetVersionResponse",()=>[{no:1,name:"platform",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"api_version",kind:"scalar",T:9}]),co=s.makeMessageType("viam.robot.v1.GetPoseRequest",()=>[{no:1,name:"component_name",kind:"scalar",T:9},{no:2,name:"destination_frame",kind:"scalar",T:9},{no:3,name:"supplemental_transforms",kind:"message",T:xe,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),Wl=s.makeMessageType("viam.robot.v1.GetPoseResponse",()=>[{no:1,name:"pose",kind:"message",T:He}]),bS=Object.freeze(Object.defineProperty({__proto__:null,BlockForOperationRequest:Tl,BlockForOperationResponse:kl,CancelOperationRequest:ul,CancelOperationResponse:gl,ConfigStatus:Vl,FrameSystemConfig:el,FrameSystemConfigRequest:nl,FrameSystemConfigResponse:al,GetCloudMetadataRequest:Al,GetCloudMetadataResponse:ro,GetMachineStatusRequest:Gl,GetMachineStatusResponse:Bl,GetMachineStatusResponse_State:Fl,GetModelsFromModulesRequest:to,GetModelsFromModulesResponse:_l,GetOperationsRequest:dl,GetOperationsResponse:pl,GetPoseRequest:co,GetPoseResponse:Wl,GetSessionsRequest:hl,GetSessionsResponse:fl,GetStatusRequest:Sl,GetStatusResponse:Il,GetVersionRequest:$l,GetVersionResponse:Yl,JobStatus:xl,ListTunnelsRequest:Xc,ListTunnelsResponse:Qc,LogRequest:Pl,LogResponse:Dl,ModuleModel:Rl,Operation:ll,PeerConnectionInfo:yl,PeerConnectionType:Yc,ResourceNamesRequest:ol,ResourceNamesResponse:il,ResourceRPCSubtype:rl,ResourceRPCSubtypesRequest:ml,ResourceRPCSubtypesResponse:cl,ResourceStatus:Jl,ResourceStatus_State:zl,RestartModuleRequest:mo,RestartModuleResponse:Ul,SendSessionHeartbeatRequest:io,SendSessionHeartbeatResponse:Nl,SendTracesRequest:Wc,SendTracesResponse:Hc,Session:vl,ShutdownRequest:ql,ShutdownResponse:Ll,StartSessionRequest:oo,StartSessionResponse:Cl,Status:so,StopAllRequest:El,StopAllResponse:wl,StopExtraParameters:Ml,StreamStatusRequest:Ol,StreamStatusResponse:bl,TransformPCDRequest:ao,TransformPCDResponse:sl,TransformPoseRequest:no,TransformPoseResponse:tl,Tunnel:Zc,TunnelRequest:jc,TunnelResponse:Kc},Symbol.toStringTag,{value:"Module"})),lo={typeName:"viam.robot.v1.RobotService",methods:{getOperations:{name:"GetOperations",I:dl,O:pl,kind:m.Unary},getSessions:{name:"GetSessions",I:hl,O:fl,kind:m.Unary},resourceNames:{name:"ResourceNames",I:ol,O:il,kind:m.Unary},resourceRPCSubtypes:{name:"ResourceRPCSubtypes",I:ml,O:cl,kind:m.Unary},cancelOperation:{name:"CancelOperation",I:ul,O:gl,kind:m.Unary},blockForOperation:{name:"BlockForOperation",I:Tl,O:kl,kind:m.Unary},getModelsFromModules:{name:"GetModelsFromModules",I:to,O:_l,kind:m.Unary},getStatus:{name:"GetStatus",I:Sl,O:Il,kind:m.Unary},streamStatus:{name:"StreamStatus",I:Ol,O:bl,kind:m.ServerStreaming},stopAll:{name:"StopAll",I:El,O:wl,kind:m.Unary},startSession:{name:"StartSession",I:oo,O:Cl,kind:m.Unary},sendSessionHeartbeat:{name:"SendSessionHeartbeat",I:io,O:Nl,kind:m.Unary},log:{name:"Log",I:Pl,O:Dl,kind:m.Unary},getCloudMetadata:{name:"GetCloudMetadata",I:Al,O:ro,kind:m.Unary},restartModule:{name:"RestartModule",I:mo,O:Ul,kind:m.Unary},shutdown:{name:"Shutdown",I:ql,O:Ll,kind:m.Unary},getMachineStatus:{name:"GetMachineStatus",I:Gl,O:Bl,kind:m.Unary},getVersion:{name:"GetVersion",I:$l,O:Yl,kind:m.Unary},tunnel:{name:"Tunnel",I:jc,O:Kc,kind:m.BiDiStreaming},listTunnels:{name:"ListTunnels",I:Xc,O:Qc,kind:m.Unary},frameSystemConfig:{name:"FrameSystemConfig",I:nl,O:al,kind:m.Unary},getPose:{name:"GetPose",I:co,O:Wl,kind:m.Unary},transformPose:{name:"TransformPose",I:no,O:tl,kind:m.Unary},transformPCD:{name:"TransformPCD",I:ao,O:sl,kind:m.Unary},sendTraces:{name:"SendTraces",I:Wc,O:Hc,kind:m.Unary}}},po=s.makeEnum("viam.app.v1.CredentialsType",[{no:0,name:"CREDENTIALS_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"CREDENTIALS_TYPE_INTERNAL",localName:"INTERNAL"},{no:2,name:"CREDENTIALS_TYPE_API_KEY",localName:"API_KEY"},{no:3,name:"CREDENTIALS_TYPE_ROBOT_SECRET",localName:"ROBOT_SECRET"},{no:4,name:"CREDENTIALS_TYPE_ROBOT_LOCATION_SECRET",localName:"ROBOT_LOCATION_SECRET"}]),Hl=s.makeMessageType("viam.app.v1.RobotConfig",()=>[{no:1,name:"cloud",kind:"message",T:Zl},{no:2,name:"remotes",kind:"message",T:yd,repeated:!0},{no:3,name:"components",kind:"message",T:uo,repeated:!0},{no:4,name:"processes",kind:"message",T:ed,repeated:!0},{no:5,name:"services",kind:"message",T:nd,repeated:!0},{no:6,name:"network",kind:"message",T:ad,opt:!0},{no:7,name:"auth",kind:"message",T:od,opt:!0},{no:8,name:"debug",kind:"scalar",T:8,opt:!0},{no:9,name:"modules",kind:"message",T:Rd,repeated:!0},{no:10,name:"disable_partial_start",kind:"scalar",T:8,opt:!0},{no:11,name:"packages",kind:"message",T:_d,repeated:!0},{no:12,name:"overwrite_fragment_status",kind:"message",T:Ua,repeated:!0},{no:13,name:"enable_web_profile",kind:"scalar",T:8},{no:14,name:"log",kind:"message",T:jl,repeated:!0},{no:15,name:"revision",kind:"scalar",T:9},{no:16,name:"maintenance",kind:"message",T:Sd,opt:!0},{no:17,name:"disable_log_deduplication",kind:"scalar",T:8},{no:18,name:"jobs",kind:"message",T:Kl,repeated:!0},{no:19,name:"tracing",kind:"message",T:Xl,opt:!0}]),jl=s.makeMessageType("viam.app.v1.LogPatternConfig",()=>[{no:1,name:"pattern",kind:"scalar",T:9},{no:2,name:"level",kind:"scalar",T:9}]),Kl=s.makeMessageType("viam.app.v1.JobConfig",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"schedule",kind:"scalar",T:9},{no:3,name:"resource",kind:"scalar",T:9},{no:4,name:"method",kind:"scalar",T:9},{no:5,name:"command",kind:"message",T:p},{no:6,name:"log_configuration",kind:"message",T:La}]),Xl=s.makeMessageType("viam.app.v1.TracingConfig",()=>[{no:1,name:"enabled",kind:"scalar",T:8},{no:2,name:"disk",kind:"scalar",T:8},{no:3,name:"console",kind:"scalar",T:8},{no:4,name:"otlp_endpoint",kind:"scalar",T:9}]),Ql=s.makeMessageType("viam.app.v1.LocationSecret",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"secret",kind:"scalar",T:9}]),Ua=s.makeMessageType("viam.app.v1.AppValidationStatus",()=>[{no:1,name:"error",kind:"scalar",T:9}]),Zl=s.makeMessageType("viam.app.v1.CloudConfig",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"fqdn",kind:"scalar",T:9},{no:3,name:"local_fqdn",kind:"scalar",T:9},{no:4,name:"managed_by",kind:"scalar",T:9},{no:5,name:"signaling_address",kind:"scalar",T:9},{no:6,name:"signaling_insecure",kind:"scalar",T:8},{no:7,name:"location_secret",kind:"scalar",T:9},{no:8,name:"secret",kind:"scalar",T:9},{no:9,name:"location_secrets",kind:"message",T:Ql,repeated:!0},{no:10,name:"primary_org_id",kind:"scalar",T:9},{no:11,name:"location_id",kind:"scalar",T:9},{no:12,name:"machine_id",kind:"scalar",T:9}]),uo=s.makeMessageType("viam.app.v1.ComponentConfig",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"namespace",kind:"scalar",T:9},{no:3,name:"type",kind:"scalar",T:9},{no:4,name:"model",kind:"scalar",T:9},{no:5,name:"frame",kind:"message",T:go},{no:6,name:"depends_on",kind:"scalar",T:9,repeated:!0},{no:7,name:"service_configs",kind:"message",T:qa,repeated:!0},{no:8,name:"attributes",kind:"message",T:p},{no:9,name:"api",kind:"scalar",T:9},{no:10,name:"log_configuration",kind:"message",T:La}]),qa=s.makeMessageType("viam.app.v1.ResourceLevelServiceConfig",()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"attributes",kind:"message",T:p}]),ed=s.makeMessageType("viam.app.v1.ProcessConfig",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"args",kind:"scalar",T:9,repeated:!0},{no:4,name:"cwd",kind:"scalar",T:9},{no:5,name:"one_shot",kind:"scalar",T:8},{no:6,name:"log",kind:"scalar",T:8},{no:7,name:"stop_signal",kind:"scalar",T:5},{no:8,name:"stop_timeout",kind:"message",T:J},{no:9,name:"env",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:10,name:"username",kind:"scalar",T:9}]),nd=s.makeMessageType("viam.app.v1.ServiceConfig",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"namespace",kind:"scalar",T:9},{no:3,name:"type",kind:"scalar",T:9},{no:4,name:"attributes",kind:"message",T:p},{no:5,name:"depends_on",kind:"scalar",T:9,repeated:!0},{no:6,name:"model",kind:"scalar",T:9},{no:9,name:"api",kind:"scalar",T:9},{no:10,name:"service_configs",kind:"message",T:qa,repeated:!0},{no:11,name:"log_configuration",kind:"message",T:La}]),ad=s.makeMessageType("viam.app.v1.NetworkConfig",()=>[{no:1,name:"fqdn",kind:"scalar",T:9},{no:2,name:"bind_address",kind:"scalar",T:9},{no:3,name:"tls_cert_file",kind:"scalar",T:9},{no:4,name:"tls_key_file",kind:"scalar",T:9},{no:5,name:"sessions",kind:"message",T:td},{no:6,name:"traffic_tunnel_endpoints",kind:"message",T:sd,repeated:!0},{no:7,name:"no_tls",kind:"scalar",T:8}]),td=s.makeMessageType("viam.app.v1.SessionsConfig",()=>[{no:1,name:"heartbeat_window",kind:"message",T:J}]),sd=s.makeMessageType("viam.app.v1.TrafficTunnelEndpoint",()=>[{no:1,name:"port",kind:"scalar",T:5},{no:2,name:"connection_timeout",kind:"message",T:J}]),od=s.makeMessageType("viam.app.v1.AuthConfig",()=>[{no:1,name:"handlers",kind:"message",T:md,repeated:!0},{no:2,name:"tls_auth_entities",kind:"scalar",T:9,repeated:!0},{no:3,name:"external_auth_config",kind:"message",T:rd,opt:!0}]),id=s.makeMessageType("viam.app.v1.JWKSFile",()=>[{no:1,name:"json",kind:"message",T:p}]),rd=s.makeMessageType("viam.app.v1.ExternalAuthConfig",()=>[{no:1,name:"jwks",kind:"message",T:id}]),md=s.makeMessageType("viam.app.v1.AuthHandlerConfig",()=>[{no:1,name:"type",kind:"enum",T:s.getEnumType(po)},{no:5,name:"config",kind:"message",T:p}]),go=s.makeMessageType("viam.app.v1.Frame",()=>[{no:1,name:"parent",kind:"scalar",T:9},{no:2,name:"translation",kind:"message",T:cd},{no:3,name:"orientation",kind:"message",T:ld},{no:4,name:"geometry",kind:"message",T:an}]),La=s.makeMessageType("viam.app.v1.LogConfiguration",()=>[{no:1,name:"level",kind:"scalar",T:9}]),cd=s.makeMessageType("viam.app.v1.Translation",()=>[{no:1,name:"x",kind:"scalar",T:1},{no:2,name:"y",kind:"scalar",T:1},{no:3,name:"z",kind:"scalar",T:1}]),ld=s.makeMessageType("viam.app.v1.Orientation",()=>[{no:1,name:"no_orientation",kind:"message",T:dd,oneof:"type"},{no:2,name:"vector_radians",kind:"message",T:pd,oneof:"type"},{no:3,name:"vector_degrees",kind:"message",T:ud,oneof:"type"},{no:4,name:"euler_angles",kind:"message",T:gd,oneof:"type"},{no:5,name:"axis_angles",kind:"message",T:Td,oneof:"type"},{no:6,name:"quaternion",kind:"message",T:kd,oneof:"type"}]),dd=s.makeMessageType("viam.app.v1.Orientation.NoOrientation",[],{localName:"Orientation_NoOrientation"}),pd=s.makeMessageType("viam.app.v1.Orientation.OrientationVectorRadians",()=>[{no:1,name:"theta",kind:"scalar",T:1},{no:2,name:"x",kind:"scalar",T:1},{no:3,name:"y",kind:"scalar",T:1},{no:4,name:"z",kind:"scalar",T:1}],{localName:"Orientation_OrientationVectorRadians"}),ud=s.makeMessageType("viam.app.v1.Orientation.OrientationVectorDegrees",()=>[{no:1,name:"theta",kind:"scalar",T:1},{no:2,name:"x",kind:"scalar",T:1},{no:3,name:"y",kind:"scalar",T:1},{no:4,name:"z",kind:"scalar",T:1}],{localName:"Orientation_OrientationVectorDegrees"}),gd=s.makeMessageType("viam.app.v1.Orientation.EulerAngles",()=>[{no:1,name:"roll",kind:"scalar",T:1},{no:2,name:"pitch",kind:"scalar",T:1},{no:3,name:"yaw",kind:"scalar",T:1}],{localName:"Orientation_EulerAngles"}),Td=s.makeMessageType("viam.app.v1.Orientation.AxisAngles",()=>[{no:1,name:"theta",kind:"scalar",T:1},{no:2,name:"x",kind:"scalar",T:1},{no:3,name:"y",kind:"scalar",T:1},{no:4,name:"z",kind:"scalar",T:1}],{localName:"Orientation_AxisAngles"}),kd=s.makeMessageType("viam.app.v1.Orientation.Quaternion",()=>[{no:1,name:"w",kind:"scalar",T:1},{no:2,name:"x",kind:"scalar",T:1},{no:3,name:"y",kind:"scalar",T:1},{no:4,name:"z",kind:"scalar",T:1}],{localName:"Orientation_Quaternion"}),yd=s.makeMessageType("viam.app.v1.RemoteConfig",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"address",kind:"scalar",T:9},{no:3,name:"frame",kind:"message",T:go},{no:4,name:"auth",kind:"message",T:vd},{no:5,name:"managed_by",kind:"scalar",T:9},{no:6,name:"insecure",kind:"scalar",T:8},{no:7,name:"connection_check_interval",kind:"message",T:J},{no:8,name:"reconnect_interval",kind:"message",T:J},{no:9,name:"service_configs",kind:"message",T:qa,repeated:!0},{no:10,name:"secret",kind:"scalar",T:9},{no:11,name:"prefix",kind:"scalar",T:9}]),vd=s.makeMessageType("viam.app.v1.RemoteAuth",()=>[{no:1,name:"credentials",kind:"message",T:hd},{no:2,name:"entity",kind:"scalar",T:9}]),hd=s.makeMessageType("viam.app.v1.RemoteAuth.Credentials",()=>[{no:1,name:"type",kind:"enum",T:s.getEnumType(po)},{no:2,name:"payload",kind:"scalar",T:9}],{localName:"RemoteAuth_Credentials"}),fd=s.makeMessageType("viam.app.v1.AgentInfo",()=>[{no:1,name:"host",kind:"scalar",T:9},{no:2,name:"os",kind:"scalar",T:9},{no:3,name:"ips",kind:"scalar",T:9,repeated:!0},{no:4,name:"version",kind:"scalar",T:9},{no:5,name:"git_revision",kind:"scalar",T:9},{no:6,name:"platform",kind:"scalar",T:9,opt:!0},{no:7,name:"platform_tags",kind:"scalar",T:9,repeated:!0}]),MS=s.makeMessageType("viam.app.v1.ConfigRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"agent_info",kind:"message",T:fd,opt:!0}]),ES=s.makeMessageType("viam.app.v1.ConfigResponse",()=>[{no:1,name:"config",kind:"message",T:Hl}]),wS=s.makeMessageType("viam.app.v1.CertificateRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),CS=s.makeMessageType("viam.app.v1.CertificateResponse",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"tls_certificate",kind:"scalar",T:9},{no:3,name:"tls_private_key",kind:"scalar",T:9}]),NS=s.makeMessageType("viam.app.v1.LogRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"logs",kind:"message",T:Ln,repeated:!0}]),PS=s.makeMessageType("viam.app.v1.LogResponse",[]),DS=s.makeMessageType("viam.app.v1.NeedsRestartRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),AS=s.makeMessageType("viam.app.v1.NeedsRestartResponse",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"must_restart",kind:"scalar",T:8},{no:3,name:"restart_check_interval",kind:"message",T:J}]),Rd=s.makeMessageType("viam.app.v1.ModuleConfig",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"path",kind:"scalar",T:9},{no:3,name:"log_level",kind:"scalar",T:9},{no:4,name:"type",kind:"scalar",T:9},{no:5,name:"module_id",kind:"scalar",T:9},{no:6,name:"env",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:7,name:"status",kind:"message",T:Ua},{no:8,name:"first_run_timeout",kind:"message",T:J},{no:9,name:"tcp_mode",kind:"scalar",T:8}]),_d=s.makeMessageType("viam.app.v1.PackageConfig",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"package",kind:"scalar",T:9},{no:3,name:"version",kind:"scalar",T:9},{no:4,name:"type",kind:"scalar",T:9},{no:5,name:"status",kind:"message",T:Ua}]),Sd=s.makeMessageType("viam.app.v1.MaintenanceConfig",()=>[{no:1,name:"sensor_name",kind:"message",T:z},{no:2,name:"maintenance_allowed_key",kind:"scalar",T:9}]),US=Object.freeze(Object.defineProperty({__proto__:null,AgentInfo:fd,AppValidationStatus:Ua,AuthConfig:od,AuthHandlerConfig:md,CertificateRequest:wS,CertificateResponse:CS,CloudConfig:Zl,ComponentConfig:uo,ConfigRequest:MS,ConfigResponse:ES,CredentialsType:po,ExternalAuthConfig:rd,Frame:go,JWKSFile:id,JobConfig:Kl,LocationSecret:Ql,LogConfiguration:La,LogPatternConfig:jl,LogRequest:NS,LogResponse:PS,MaintenanceConfig:Sd,ModuleConfig:Rd,NeedsRestartRequest:DS,NeedsRestartResponse:AS,NetworkConfig:ad,Orientation:ld,Orientation_AxisAngles:Td,Orientation_EulerAngles:gd,Orientation_NoOrientation:dd,Orientation_OrientationVectorDegrees:ud,Orientation_OrientationVectorRadians:pd,Orientation_Quaternion:kd,PackageConfig:_d,ProcessConfig:ed,RemoteAuth:vd,RemoteAuth_Credentials:hd,RemoteConfig:yd,ResourceLevelServiceConfig:qa,RobotConfig:Hl,ServiceConfig:nd,SessionsConfig:td,TracingConfig:Xl,TrafficTunnelEndpoint:sd,Translation:cd},Symbol.toStringTag,{value:"Module"})),To=s.makeMessageType("viam.service.discovery.v1.DiscoverResourcesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Id=s.makeMessageType("viam.service.discovery.v1.DiscoverResourcesResponse",()=>[{no:1,name:"discoveries",kind:"message",T:uo,repeated:!0}]),qS=Object.freeze(Object.defineProperty({__proto__:null,DiscoverResourcesRequest:To,DiscoverResourcesResponse:Id},Symbol.toStringTag,{value:"Module"})),Od={typeName:"viam.service.discovery.v1.DiscoveryService",methods:{discoverResources:{name:"DiscoverResources",I:To,O:Id,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary}}},bd=s.makeEnum("viam.service.motion.v1.PlanState",[{no:0,name:"PLAN_STATE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"PLAN_STATE_IN_PROGRESS",localName:"IN_PROGRESS"},{no:2,name:"PLAN_STATE_STOPPED",localName:"STOPPED"},{no:3,name:"PLAN_STATE_SUCCEEDED",localName:"SUCCEEDED"},{no:4,name:"PLAN_STATE_FAILED",localName:"FAILED"}]),ko=s.makeMessageType("viam.service.motion.v1.MoveRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"destination",kind:"message",T:He},{no:3,name:"component_name_deprecated",kind:"message",T:z},{no:4,name:"world_state",kind:"message",T:Zr,opt:!0},{no:5,name:"constraints",kind:"message",T:Ud,opt:!0},{no:6,name:"component_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Md=s.makeMessageType("viam.service.motion.v1.MoveResponse",()=>[{no:1,name:"success",kind:"scalar",T:8}]),yo=s.makeMessageType("viam.service.motion.v1.MoveOnMapRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"destination",kind:"message",T:Te},{no:3,name:"component_name_deprecated",kind:"message",T:z},{no:4,name:"slam_service_name_deprecated",kind:"message",T:z},{no:5,name:"motion_configuration",kind:"message",T:vo,opt:!0},{no:6,name:"obstacles",kind:"message",T:an,repeated:!0},{no:7,name:"component_name",kind:"scalar",T:9},{no:8,name:"slam_service_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Ed=s.makeMessageType("viam.service.motion.v1.MoveOnMapResponse",()=>[{no:1,name:"execution_id",kind:"scalar",T:9}]),wd=s.makeMessageType("viam.service.motion.v1.ObstacleDetector",()=>[{no:1,name:"vision_service_deprecated",kind:"message",T:z},{no:2,name:"camera_deprecated",kind:"message",T:z},{no:3,name:"vision_service",kind:"scalar",T:9},{no:4,name:"camera",kind:"scalar",T:9}]),vo=s.makeMessageType("viam.service.motion.v1.MotionConfiguration",()=>[{no:1,name:"obstacle_detectors",kind:"message",T:wd,repeated:!0},{no:2,name:"position_polling_frequency_hz",kind:"scalar",T:1,opt:!0},{no:3,name:"obstacle_polling_frequency_hz",kind:"scalar",T:1,opt:!0},{no:4,name:"plan_deviation_m",kind:"scalar",T:1,opt:!0},{no:5,name:"linear_m_per_sec",kind:"scalar",T:1,opt:!0},{no:6,name:"angular_degs_per_sec",kind:"scalar",T:1,opt:!0}]),ho=s.makeMessageType("viam.service.motion.v1.MoveOnGlobeRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"destination",kind:"message",T:je},{no:3,name:"heading",kind:"scalar",T:1,opt:!0},{no:4,name:"component_name_deprecated",kind:"message",T:z},{no:5,name:"movement_sensor_name_deprecated",kind:"message",T:z},{no:6,name:"obstacles",kind:"message",T:Na,repeated:!0},{no:7,name:"motion_configuration",kind:"message",T:vo,opt:!0},{no:8,name:"bounding_regions",kind:"message",T:Na,repeated:!0},{no:9,name:"component_name",kind:"scalar",T:9},{no:10,name:"movement_sensor_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Cd=s.makeMessageType("viam.service.motion.v1.MoveOnGlobeResponse",()=>[{no:1,name:"execution_id",kind:"scalar",T:9}]),fo=s.makeMessageType("viam.service.motion.v1.GetPoseRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"component_name_deprecated",kind:"message",T:z},{no:3,name:"destination_frame",kind:"scalar",T:9},{no:4,name:"supplemental_transforms",kind:"message",T:xe,repeated:!0},{no:5,name:"component_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Nd=s.makeMessageType("viam.service.motion.v1.GetPoseResponse",()=>[{no:1,name:"pose",kind:"message",T:He}]),Ro=s.makeMessageType("viam.service.motion.v1.StopPlanRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"component_name_deprecated",kind:"message",T:z},{no:3,name:"component_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Pd=s.makeMessageType("viam.service.motion.v1.StopPlanResponse",[]),_o=s.makeMessageType("viam.service.motion.v1.ListPlanStatusesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"only_active_plans",kind:"scalar",T:8},{no:99,name:"extra",kind:"message",T:p}]),Dd=s.makeMessageType("viam.service.motion.v1.ListPlanStatusesResponse",()=>[{no:1,name:"plan_statuses_with_ids",kind:"message",T:xd,repeated:!0}]),So=s.makeMessageType("viam.service.motion.v1.GetPlanRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"component_name_deprecated",kind:"message",T:z},{no:3,name:"last_plan_only",kind:"scalar",T:8},{no:4,name:"execution_id",kind:"scalar",T:9,opt:!0},{no:5,name:"component_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Ad=s.makeMessageType("viam.service.motion.v1.GetPlanResponse",()=>[{no:1,name:"current_plan_with_status",kind:"message",T:Io},{no:2,name:"replan_history",kind:"message",T:Io,repeated:!0}]),Ud=s.makeMessageType("viam.service.motion.v1.Constraints",()=>[{no:1,name:"linear_constraint",kind:"message",T:qd,repeated:!0},{no:2,name:"orientation_constraint",kind:"message",T:Gd,repeated:!0},{no:3,name:"collision_specification",kind:"message",T:Bd,repeated:!0},{no:4,name:"pseudolinear_constraint",kind:"message",T:Ld,repeated:!0}]),qd=s.makeMessageType("viam.service.motion.v1.LinearConstraint",()=>[{no:1,name:"line_tolerance_mm",kind:"scalar",T:2,opt:!0},{no:2,name:"orientation_tolerance_degs",kind:"scalar",T:2,opt:!0}]),Ld=s.makeMessageType("viam.service.motion.v1.PseudolinearConstraint",()=>[{no:1,name:"line_tolerance_factor",kind:"scalar",T:2,opt:!0},{no:2,name:"orientation_tolerance_factor",kind:"scalar",T:2,opt:!0}]),Gd=s.makeMessageType("viam.service.motion.v1.OrientationConstraint",()=>[{no:1,name:"orientation_tolerance_degs",kind:"scalar",T:2,opt:!0}]),Bd=s.makeMessageType("viam.service.motion.v1.CollisionSpecification",()=>[{no:1,name:"allows",kind:"message",T:Fd,repeated:!0}]),Fd=s.makeMessageType("viam.service.motion.v1.CollisionSpecification.AllowedFrameCollisions",()=>[{no:1,name:"frame1",kind:"scalar",T:9},{no:2,name:"frame2",kind:"scalar",T:9}],{localName:"CollisionSpecification_AllowedFrameCollisions"}),Io=s.makeMessageType("viam.service.motion.v1.PlanWithStatus",()=>[{no:1,name:"plan",kind:"message",T:Jd},{no:2,name:"status",kind:"message",T:Ga},{no:3,name:"status_history",kind:"message",T:Ga,repeated:!0}]),xd=s.makeMessageType("viam.service.motion.v1.PlanStatusWithID",()=>[{no:1,name:"plan_id",kind:"scalar",T:9},{no:2,name:"component_name_deprecated",kind:"message",T:z},{no:3,name:"execution_id",kind:"scalar",T:9},{no:4,name:"status",kind:"message",T:Ga},{no:5,name:"component_name",kind:"scalar",T:9}]),Ga=s.makeMessageType("viam.service.motion.v1.PlanStatus",()=>[{no:1,name:"state",kind:"enum",T:s.getEnumType(bd)},{no:2,name:"timestamp",kind:"message",T:_},{no:3,name:"reason",kind:"scalar",T:9,opt:!0}]),Jd=s.makeMessageType("viam.service.motion.v1.Plan",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"component_name_deprecated",kind:"message",T:z},{no:3,name:"execution_id",kind:"scalar",T:9},{no:4,name:"steps",kind:"message",T:zd,repeated:!0},{no:5,name:"component_name",kind:"scalar",T:9}]),zd=s.makeMessageType("viam.service.motion.v1.PlanStep",()=>[{no:1,name:"step",kind:"map",K:9,V:{kind:"message",T:Vd}}]),Vd=s.makeMessageType("viam.service.motion.v1.ComponentState",()=>[{no:1,name:"pose",kind:"message",T:Te}]),$d=Object.freeze(Object.defineProperty({__proto__:null,CollisionSpecification:Bd,CollisionSpecification_AllowedFrameCollisions:Fd,ComponentState:Vd,Constraints:Ud,GetPlanRequest:So,GetPlanResponse:Ad,GetPoseRequest:fo,GetPoseResponse:Nd,LinearConstraint:qd,ListPlanStatusesRequest:_o,ListPlanStatusesResponse:Dd,MotionConfiguration:vo,MoveOnGlobeRequest:ho,MoveOnGlobeResponse:Cd,MoveOnMapRequest:yo,MoveOnMapResponse:Ed,MoveRequest:ko,MoveResponse:Md,ObstacleDetector:wd,OrientationConstraint:Gd,Plan:Jd,PlanState:bd,PlanStatus:Ga,PlanStatusWithID:xd,PlanStep:zd,PlanWithStatus:Io,PseudolinearConstraint:Ld,StopPlanRequest:Ro,StopPlanResponse:Pd},Symbol.toStringTag,{value:"Module"})),Yd={typeName:"viam.service.motion.v1.MotionService",methods:{move:{name:"Move",I:ko,O:Md,kind:m.Unary},moveOnMap:{name:"MoveOnMap",I:yo,O:Ed,kind:m.Unary},moveOnGlobe:{name:"MoveOnGlobe",I:ho,O:Cd,kind:m.Unary},getPose:{name:"GetPose",I:fo,O:Nd,kind:m.Unary},stopPlan:{name:"StopPlan",I:Ro,O:Pd,kind:m.Unary},listPlanStatuses:{name:"ListPlanStatuses",I:_o,O:Dd,kind:m.Unary},getPlan:{name:"GetPlan",I:So,O:Ad,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary}}},Wd=s.makeEnum("viam.service.navigation.v1.MapType",[{no:0,name:"MAP_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MAP_TYPE_NONE",localName:"NONE"},{no:2,name:"MAP_TYPE_GPS",localName:"GPS"}]),Oo=s.makeEnum("viam.service.navigation.v1.Mode",[{no:0,name:"MODE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MODE_MANUAL",localName:"MANUAL"},{no:2,name:"MODE_WAYPOINT",localName:"WAYPOINT"},{no:3,name:"MODE_EXPLORE",localName:"EXPLORE"}]),bo=s.makeMessageType("viam.service.navigation.v1.GetModeRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Hd=s.makeMessageType("viam.service.navigation.v1.GetModeResponse",()=>[{no:1,name:"mode",kind:"enum",T:s.getEnumType(Oo)}]),Mo=s.makeMessageType("viam.service.navigation.v1.SetModeRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"mode",kind:"enum",T:s.getEnumType(Oo)},{no:99,name:"extra",kind:"message",T:p}]),jd=s.makeMessageType("viam.service.navigation.v1.SetModeResponse",[]),Kd=s.makeMessageType("viam.service.navigation.v1.Waypoint",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"location",kind:"message",T:je}]),Eo=s.makeMessageType("viam.service.navigation.v1.GetLocationRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Xd=s.makeMessageType("viam.service.navigation.v1.GetLocationResponse",()=>[{no:1,name:"location",kind:"message",T:je},{no:2,name:"compass_heading",kind:"scalar",T:1}]),wo=s.makeMessageType("viam.service.navigation.v1.GetWaypointsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Qd=s.makeMessageType("viam.service.navigation.v1.GetWaypointsResponse",()=>[{no:1,name:"waypoints",kind:"message",T:Kd,repeated:!0}]),Co=s.makeMessageType("viam.service.navigation.v1.AddWaypointRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"location",kind:"message",T:je},{no:99,name:"extra",kind:"message",T:p}]),Zd=s.makeMessageType("viam.service.navigation.v1.AddWaypointResponse",[]),No=s.makeMessageType("viam.service.navigation.v1.RemoveWaypointRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"id",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),ep=s.makeMessageType("viam.service.navigation.v1.RemoveWaypointResponse",[]),Po=s.makeMessageType("viam.service.navigation.v1.GetObstaclesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),np=s.makeMessageType("viam.service.navigation.v1.GetObstaclesResponse",()=>[{no:1,name:"obstacles",kind:"message",T:Na,repeated:!0}]),ap=s.makeMessageType("viam.service.navigation.v1.Path",()=>[{no:1,name:"destination_waypoint_id",kind:"scalar",T:9},{no:2,name:"geopoints",kind:"message",T:je,repeated:!0}]),Do=s.makeMessageType("viam.service.navigation.v1.GetPathsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),tp=s.makeMessageType("viam.service.navigation.v1.GetPathsResponse",()=>[{no:1,name:"paths",kind:"message",T:ap,repeated:!0}]),Ao=s.makeMessageType("viam.service.navigation.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),sp=s.makeMessageType("viam.service.navigation.v1.GetPropertiesResponse",()=>[{no:1,name:"map_type",kind:"enum",T:s.getEnumType(Wd)}]),op=Object.freeze(Object.defineProperty({__proto__:null,AddWaypointRequest:Co,AddWaypointResponse:Zd,GetLocationRequest:Eo,GetLocationResponse:Xd,GetModeRequest:bo,GetModeResponse:Hd,GetObstaclesRequest:Po,GetObstaclesResponse:np,GetPathsRequest:Do,GetPathsResponse:tp,GetPropertiesRequest:Ao,GetPropertiesResponse:sp,GetWaypointsRequest:wo,GetWaypointsResponse:Qd,MapType:Wd,Mode:Oo,Path:ap,RemoveWaypointRequest:No,RemoveWaypointResponse:ep,SetModeRequest:Mo,SetModeResponse:jd,Waypoint:Kd},Symbol.toStringTag,{value:"Module"})),ip={typeName:"viam.service.navigation.v1.NavigationService",methods:{getMode:{name:"GetMode",I:bo,O:Hd,kind:m.Unary},setMode:{name:"SetMode",I:Mo,O:jd,kind:m.Unary},getLocation:{name:"GetLocation",I:Eo,O:Xd,kind:m.Unary},getWaypoints:{name:"GetWaypoints",I:wo,O:Qd,kind:m.Unary},addWaypoint:{name:"AddWaypoint",I:Co,O:Zd,kind:m.Unary},removeWaypoint:{name:"RemoveWaypoint",I:No,O:ep,kind:m.Unary},getObstacles:{name:"GetObstacles",I:Po,O:np,kind:m.Unary},getPaths:{name:"GetPaths",I:Do,O:tp,kind:m.Unary},getProperties:{name:"GetProperties",I:Ao,O:sp,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary}}},rp=s.makeEnum("viam.service.slam.v1.MappingMode",[{no:0,name:"MAPPING_MODE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MAPPING_MODE_CREATE_NEW_MAP",localName:"CREATE_NEW_MAP"},{no:2,name:"MAPPING_MODE_LOCALIZE_ONLY",localName:"LOCALIZE_ONLY"},{no:3,name:"MAPPING_MODE_UPDATE_EXISTING_MAP",localName:"UPDATE_EXISTING_MAP"}]),mp=s.makeEnum("viam.service.slam.v1.SensorType",[{no:0,name:"SENSOR_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"SENSOR_TYPE_CAMERA",localName:"CAMERA"},{no:2,name:"SENSOR_TYPE_MOVEMENT_SENSOR",localName:"MOVEMENT_SENSOR"}]),Uo=s.makeMessageType("viam.service.slam.v1.GetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),cp=s.makeMessageType("viam.service.slam.v1.GetPositionResponse",()=>[{no:1,name:"pose",kind:"message",T:Te}]),qo=s.makeMessageType("viam.service.slam.v1.GetPointCloudMapRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"return_edited_map",kind:"scalar",T:8,opt:!0}]),lp=s.makeMessageType("viam.service.slam.v1.GetPointCloudMapResponse",()=>[{no:1,name:"point_cloud_pcd_chunk",kind:"scalar",T:12}]),Lo=s.makeMessageType("viam.service.slam.v1.GetInternalStateRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),dp=s.makeMessageType("viam.service.slam.v1.GetInternalStateResponse",()=>[{no:1,name:"internal_state_chunk",kind:"scalar",T:12}]),Go=s.makeMessageType("viam.service.slam.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),pp=s.makeMessageType("viam.service.slam.v1.GetPropertiesResponse",()=>[{no:1,name:"cloud_slam",kind:"scalar",T:8},{no:2,name:"mapping_mode",kind:"enum",T:s.getEnumType(rp)},{no:3,name:"internal_state_file_type",kind:"scalar",T:9,opt:!0},{no:4,name:"sensor_info",kind:"message",T:up,repeated:!0}]),up=s.makeMessageType("viam.service.slam.v1.SensorInfo",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:s.getEnumType(mp)}]),gp=Object.freeze(Object.defineProperty({__proto__:null,GetInternalStateRequest:Lo,GetInternalStateResponse:dp,GetPointCloudMapRequest:qo,GetPointCloudMapResponse:lp,GetPositionRequest:Uo,GetPositionResponse:cp,GetPropertiesRequest:Go,GetPropertiesResponse:pp,MappingMode:rp,SensorInfo:up,SensorType:mp},Symbol.toStringTag,{value:"Module"})),Tp={typeName:"viam.service.slam.v1.SLAMService",methods:{getPosition:{name:"GetPosition",I:Uo,O:cp,kind:m.Unary},getPointCloudMap:{name:"GetPointCloudMap",I:qo,O:lp,kind:m.ServerStreaming},getInternalState:{name:"GetInternalState",I:Lo,O:dp,kind:m.ServerStreaming},getProperties:{name:"GetProperties",I:Go,O:pp,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary}}},kp=s.makeEnum("viam.app.data.v1.Order",[{no:0,name:"ORDER_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"ORDER_DESCENDING",localName:"DESCENDING"},{no:2,name:"ORDER_ASCENDING",localName:"ASCENDING"}]),yp=s.makeEnum("viam.app.data.v1.TagsFilterType",[{no:0,name:"TAGS_FILTER_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"TAGS_FILTER_TYPE_MATCH_BY_OR",localName:"MATCH_BY_OR"},{no:2,name:"TAGS_FILTER_TYPE_TAGGED",localName:"TAGGED"},{no:3,name:"TAGS_FILTER_TYPE_UNTAGGED",localName:"UNTAGGED"}]),sn=s.makeEnum("viam.app.data.v1.TabularDataSourceType",[{no:0,name:"TABULAR_DATA_SOURCE_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"TABULAR_DATA_SOURCE_TYPE_STANDARD",localName:"STANDARD"},{no:2,name:"TABULAR_DATA_SOURCE_TYPE_HOT_STORAGE",localName:"HOT_STORAGE"},{no:3,name:"TABULAR_DATA_SOURCE_TYPE_PIPELINE_SINK",localName:"PIPELINE_SINK"}]),Jn=s.makeEnum("viam.app.data.v1.IndexableCollection",[{no:0,name:"INDEXABLE_COLLECTION_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"INDEXABLE_COLLECTION_HOT_STORE",localName:"HOT_STORE"},{no:2,name:"INDEXABLE_COLLECTION_PIPELINE_SINK",localName:"PIPELINE_SINK"}]),vp=s.makeEnum("viam.app.data.v1.IndexCreator",[{no:0,name:"INDEX_CREATOR_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"INDEX_CREATOR_VIAM",localName:"VIAM"},{no:2,name:"INDEX_CREATOR_CUSTOMER",localName:"CUSTOMER"}]),Bo=s.makeMessageType("viam.app.data.v1.DataRequest",()=>[{no:1,name:"filter",kind:"message",T:Ke},{no:2,name:"limit",kind:"scalar",T:4},{no:3,name:"last",kind:"scalar",T:9},{no:4,name:"sort_order",kind:"enum",T:s.getEnumType(kp)}]),Ke=s.makeMessageType("viam.app.data.v1.Filter",()=>[{no:1,name:"component_name",kind:"scalar",T:9},{no:2,name:"component_type",kind:"scalar",T:9},{no:4,name:"method",kind:"scalar",T:9},{no:6,name:"robot_name",kind:"scalar",T:9},{no:7,name:"robot_id",kind:"scalar",T:9},{no:8,name:"part_name",kind:"scalar",T:9},{no:9,name:"part_id",kind:"scalar",T:9},{no:10,name:"location_ids",kind:"scalar",T:9,repeated:!0},{no:11,name:"organization_ids",kind:"scalar",T:9,repeated:!0},{no:12,name:"mime_type",kind:"scalar",T:9,repeated:!0},{no:13,name:"interval",kind:"message",T:zn},{no:14,name:"tags_filter",kind:"message",T:Ba},{no:15,name:"bbox_labels",kind:"scalar",T:9,repeated:!0},{no:16,name:"dataset_id",kind:"scalar",T:9}]),Ba=s.makeMessageType("viam.app.data.v1.TagsFilter",()=>[{no:1,name:"type",kind:"enum",T:s.getEnumType(yp)},{no:2,name:"tags",kind:"scalar",T:9,repeated:!0}]),Fa=s.makeMessageType("viam.app.data.v1.CaptureMetadata",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"location_id",kind:"scalar",T:9},{no:3,name:"robot_name",kind:"scalar",T:9},{no:4,name:"robot_id",kind:"scalar",T:9},{no:5,name:"part_name",kind:"scalar",T:9},{no:6,name:"part_id",kind:"scalar",T:9},{no:7,name:"component_type",kind:"scalar",T:9},{no:9,name:"component_name",kind:"scalar",T:9},{no:10,name:"method_name",kind:"scalar",T:9},{no:11,name:"method_parameters",kind:"map",K:9,V:{kind:"message",T:Z}},{no:12,name:"tags",kind:"scalar",T:9,repeated:!0},{no:13,name:"mime_type",kind:"scalar",T:9}]),zn=s.makeMessageType("viam.app.data.v1.CaptureInterval",()=>[{no:1,name:"start",kind:"message",T:_},{no:2,name:"end",kind:"message",T:_}]),hp=s.makeMessageType("viam.app.data.v1.TabularDataByFilterRequest",()=>[{no:1,name:"data_request",kind:"message",T:Bo},{no:2,name:"count_only",kind:"scalar",T:8},{no:3,name:"include_internal_data",kind:"scalar",T:8}]),fp=s.makeMessageType("viam.app.data.v1.TabularDataByFilterResponse",()=>[{no:1,name:"metadata",kind:"message",T:Fa,repeated:!0},{no:2,name:"data",kind:"message",T:Rp,repeated:!0},{no:3,name:"count",kind:"scalar",T:4},{no:4,name:"last",kind:"scalar",T:9},{no:5,name:"total_size_bytes",kind:"scalar",T:4}]),Rp=s.makeMessageType("viam.app.data.v1.TabularData",()=>[{no:1,name:"data",kind:"message",T:p},{no:2,name:"metadata_index",kind:"scalar",T:13},{no:3,name:"time_requested",kind:"message",T:_},{no:4,name:"time_received",kind:"message",T:_}]),_p=s.makeMessageType("viam.app.data.v1.TabularDataBySQLRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"sql_query",kind:"scalar",T:9}]),Sp=s.makeMessageType("viam.app.data.v1.TabularDataBySQLResponse",()=>[{no:2,name:"raw_data",kind:"scalar",T:12,repeated:!0}]),Fo=s.makeMessageType("viam.app.data.v1.TabularDataSource",()=>[{no:1,name:"type",kind:"enum",T:s.getEnumType(sn)},{no:2,name:"pipeline_id",kind:"scalar",T:9,opt:!0}]),Ip=s.makeMessageType("viam.app.data.v1.TabularDataByMQLRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:3,name:"mql_binary",kind:"scalar",T:12,repeated:!0},{no:4,name:"use_recent_data",kind:"scalar",T:8,opt:!0},{no:6,name:"data_source",kind:"message",T:Fo,opt:!0},{no:7,name:"query_prefix_name",kind:"scalar",T:9,opt:!0}]),Op=s.makeMessageType("viam.app.data.v1.TabularDataByMQLResponse",()=>[{no:2,name:"raw_data",kind:"scalar",T:12,repeated:!0}]),bp=s.makeMessageType("viam.app.data.v1.ExportTabularDataRequest",()=>[{no:1,name:"part_id",kind:"scalar",T:9},{no:2,name:"resource_name",kind:"scalar",T:9},{no:3,name:"resource_subtype",kind:"scalar",T:9},{no:4,name:"method_name",kind:"scalar",T:9},{no:5,name:"interval",kind:"message",T:zn},{no:6,name:"additional_parameters",kind:"message",T:p,opt:!0}]),Mp=s.makeMessageType("viam.app.data.v1.ExportTabularDataResponse",()=>[{no:1,name:"part_id",kind:"scalar",T:9},{no:2,name:"resource_name",kind:"scalar",T:9},{no:3,name:"resource_subtype",kind:"scalar",T:9},{no:4,name:"method_name",kind:"scalar",T:9},{no:5,name:"time_captured",kind:"message",T:_},{no:6,name:"organization_id",kind:"scalar",T:9},{no:7,name:"location_id",kind:"scalar",T:9},{no:8,name:"robot_name",kind:"scalar",T:9},{no:9,name:"robot_id",kind:"scalar",T:9},{no:10,name:"part_name",kind:"scalar",T:9},{no:11,name:"method_parameters",kind:"message",T:p},{no:12,name:"tags",kind:"scalar",T:9,repeated:!0},{no:13,name:"payload",kind:"message",T:p}]),Ep=s.makeMessageType("viam.app.data.v1.GetLatestTabularDataRequest",()=>[{no:1,name:"part_id",kind:"scalar",T:9},{no:2,name:"resource_name",kind:"scalar",T:9},{no:3,name:"method_name",kind:"scalar",T:9},{no:4,name:"resource_subtype",kind:"scalar",T:9},{no:5,name:"additional_parameters",kind:"message",T:p,opt:!0}]),wp=s.makeMessageType("viam.app.data.v1.GetLatestTabularDataResponse",()=>[{no:1,name:"time_captured",kind:"message",T:_},{no:2,name:"time_synced",kind:"message",T:_},{no:3,name:"payload",kind:"message",T:p}]),xo=s.makeMessageType("viam.app.data.v1.BinaryData",()=>[{no:1,name:"binary",kind:"scalar",T:12},{no:2,name:"metadata",kind:"message",T:qp}]),Cp=s.makeMessageType("viam.app.data.v1.BinaryDataByFilterRequest",()=>[{no:1,name:"data_request",kind:"message",T:Bo},{no:2,name:"include_binary",kind:"scalar",T:8},{no:3,name:"count_only",kind:"scalar",T:8},{no:4,name:"include_internal_data",kind:"scalar",T:8}]),Np=s.makeMessageType("viam.app.data.v1.BinaryDataByFilterResponse",()=>[{no:1,name:"data",kind:"message",T:xo,repeated:!0},{no:2,name:"count",kind:"scalar",T:4},{no:3,name:"last",kind:"scalar",T:9},{no:4,name:"total_size_bytes",kind:"scalar",T:4}]),ye=s.makeMessageType("viam.app.data.v1.BinaryID",()=>[{no:1,name:"file_id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9},{no:3,name:"location_id",kind:"scalar",T:9}]),Pp=s.makeMessageType("viam.app.data.v1.BinaryDataByIDsRequest",()=>[{no:2,name:"include_binary",kind:"scalar",T:8},{no:3,name:"binary_ids",kind:"message",T:ye,repeated:!0},{no:4,name:"binary_data_ids",kind:"scalar",T:9,repeated:!0}]),Dp=s.makeMessageType("viam.app.data.v1.BinaryDataByIDsResponse",()=>[{no:1,name:"data",kind:"message",T:xo,repeated:!0},{no:2,name:"count",kind:"scalar",T:4}]),Ap=s.makeMessageType("viam.app.data.v1.BoundingBox",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"label",kind:"scalar",T:9},{no:3,name:"x_min_normalized",kind:"scalar",T:1},{no:4,name:"y_min_normalized",kind:"scalar",T:1},{no:5,name:"x_max_normalized",kind:"scalar",T:1},{no:6,name:"y_max_normalized",kind:"scalar",T:1},{no:7,name:"confidence",kind:"scalar",T:1,opt:!0}]),Up=s.makeMessageType("viam.app.data.v1.Classification",()=>[{no:3,name:"id",kind:"scalar",T:9},{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"confidence",kind:"scalar",T:1,opt:!0}]),xa=s.makeMessageType("viam.app.data.v1.Annotations",()=>[{no:1,name:"bboxes",kind:"message",T:Ap,repeated:!0},{no:2,name:"classifications",kind:"message",T:Up,repeated:!0}]),qp=s.makeMessageType("viam.app.data.v1.BinaryMetadata",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"capture_metadata",kind:"message",T:Fa},{no:3,name:"time_requested",kind:"message",T:_},{no:4,name:"time_received",kind:"message",T:_},{no:5,name:"file_name",kind:"scalar",T:9},{no:6,name:"file_ext",kind:"scalar",T:9},{no:7,name:"uri",kind:"scalar",T:9},{no:8,name:"annotations",kind:"message",T:xa},{no:9,name:"dataset_ids",kind:"scalar",T:9,repeated:!0},{no:10,name:"binary_data_id",kind:"scalar",T:9},{no:11,name:"file_size_bytes",kind:"scalar",T:4}]),Lp=s.makeMessageType("viam.app.data.v1.DeleteTabularFilter",()=>[{no:1,name:"location_ids",kind:"scalar",T:9,repeated:!0},{no:2,name:"robot_id",kind:"scalar",T:9},{no:3,name:"part_id",kind:"scalar",T:9},{no:4,name:"component_type",kind:"scalar",T:9},{no:5,name:"component_name",kind:"scalar",T:9},{no:6,name:"method",kind:"scalar",T:9},{no:7,name:"tags_filter",kind:"message",T:Ba}]),Gp=s.makeMessageType("viam.app.data.v1.DeleteTabularDataRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"delete_older_than_days",kind:"scalar",T:13},{no:3,name:"filter",kind:"message",T:Lp,opt:!0}]),Bp=s.makeMessageType("viam.app.data.v1.DeleteTabularDataResponse",()=>[{no:1,name:"deleted_count",kind:"scalar",T:4}]),Fp=s.makeMessageType("viam.app.data.v1.DeleteBinaryDataByFilterRequest",()=>[{no:1,name:"filter",kind:"message",T:Ke},{no:2,name:"include_internal_data",kind:"scalar",T:8}]),xp=s.makeMessageType("viam.app.data.v1.DeleteBinaryDataByFilterResponse",()=>[{no:1,name:"deleted_count",kind:"scalar",T:4}]),Jp=s.makeMessageType("viam.app.data.v1.DeleteBinaryDataByIDsRequest",()=>[{no:2,name:"binary_ids",kind:"message",T:ye,repeated:!0},{no:3,name:"binary_data_ids",kind:"scalar",T:9,repeated:!0}]),zp=s.makeMessageType("viam.app.data.v1.DeleteBinaryDataByIDsResponse",()=>[{no:1,name:"deleted_count",kind:"scalar",T:4}]),Vp=s.makeMessageType("viam.app.data.v1.AddTagsToBinaryDataByIDsRequest",()=>[{no:3,name:"binary_ids",kind:"message",T:ye,repeated:!0},{no:4,name:"binary_data_ids",kind:"scalar",T:9,repeated:!0},{no:2,name:"tags",kind:"scalar",T:9,repeated:!0}]),$p=s.makeMessageType("viam.app.data.v1.AddTagsToBinaryDataByIDsResponse",[]),Yp=s.makeMessageType("viam.app.data.v1.AddTagsToBinaryDataByFilterRequest",()=>[{no:1,name:"filter",kind:"message",T:Ke},{no:2,name:"tags",kind:"scalar",T:9,repeated:!0}]),Wp=s.makeMessageType("viam.app.data.v1.AddTagsToBinaryDataByFilterResponse",[]),Hp=s.makeMessageType("viam.app.data.v1.RemoveTagsFromBinaryDataByIDsRequest",()=>[{no:3,name:"binary_ids",kind:"message",T:ye,repeated:!0},{no:4,name:"binary_data_ids",kind:"scalar",T:9,repeated:!0},{no:2,name:"tags",kind:"scalar",T:9,repeated:!0}]),jp=s.makeMessageType("viam.app.data.v1.RemoveTagsFromBinaryDataByIDsResponse",()=>[{no:1,name:"deleted_count",kind:"scalar",T:4}]),Kp=s.makeMessageType("viam.app.data.v1.RemoveTagsFromBinaryDataByFilterRequest",()=>[{no:1,name:"filter",kind:"message",T:Ke},{no:2,name:"tags",kind:"scalar",T:9,repeated:!0}]),Xp=s.makeMessageType("viam.app.data.v1.RemoveTagsFromBinaryDataByFilterResponse",()=>[{no:1,name:"deleted_count",kind:"scalar",T:4}]),Qp=s.makeMessageType("viam.app.data.v1.TagsByFilterRequest",()=>[{no:1,name:"filter",kind:"message",T:Ke}]),Zp=s.makeMessageType("viam.app.data.v1.TagsByFilterResponse",()=>[{no:1,name:"tags",kind:"scalar",T:9,repeated:!0}]),eu=s.makeMessageType("viam.app.data.v1.AddBoundingBoxToImageByIDRequest",()=>[{no:7,name:"binary_id",kind:"message",T:ye},{no:8,name:"binary_data_id",kind:"scalar",T:9},{no:2,name:"label",kind:"scalar",T:9},{no:3,name:"x_min_normalized",kind:"scalar",T:1},{no:4,name:"y_min_normalized",kind:"scalar",T:1},{no:5,name:"x_max_normalized",kind:"scalar",T:1},{no:6,name:"y_max_normalized",kind:"scalar",T:1},{no:9,name:"confidence",kind:"scalar",T:1,opt:!0}]),nu=s.makeMessageType("viam.app.data.v1.AddBoundingBoxToImageByIDResponse",()=>[{no:1,name:"bbox_id",kind:"scalar",T:9}]),au=s.makeMessageType("viam.app.data.v1.RemoveBoundingBoxFromImageByIDRequest",()=>[{no:3,name:"binary_id",kind:"message",T:ye},{no:4,name:"binary_data_id",kind:"scalar",T:9},{no:2,name:"bbox_id",kind:"scalar",T:9}]),tu=s.makeMessageType("viam.app.data.v1.RemoveBoundingBoxFromImageByIDResponse",[]),su=s.makeMessageType("viam.app.data.v1.UpdateBoundingBoxRequest",()=>[{no:1,name:"binary_id",kind:"message",T:ye},{no:8,name:"binary_data_id",kind:"scalar",T:9},{no:2,name:"bbox_id",kind:"scalar",T:9},{no:3,name:"label",kind:"scalar",T:9,opt:!0},{no:4,name:"x_min_normalized",kind:"scalar",T:1,opt:!0},{no:5,name:"y_min_normalized",kind:"scalar",T:1,opt:!0},{no:6,name:"x_max_normalized",kind:"scalar",T:1,opt:!0},{no:7,name:"y_max_normalized",kind:"scalar",T:1,opt:!0},{no:9,name:"confidence",kind:"scalar",T:1,opt:!0}]),ou=s.makeMessageType("viam.app.data.v1.UpdateBoundingBoxResponse",[]),iu=s.makeMessageType("viam.app.data.v1.BoundingBoxLabelsByFilterRequest",()=>[{no:1,name:"filter",kind:"message",T:Ke}]),ru=s.makeMessageType("viam.app.data.v1.BoundingBoxLabelsByFilterResponse",()=>[{no:1,name:"labels",kind:"scalar",T:9,repeated:!0}]),mu=s.makeMessageType("viam.app.data.v1.ConfigureDatabaseUserRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"password",kind:"scalar",T:9}]),cu=s.makeMessageType("viam.app.data.v1.ConfigureDatabaseUserResponse",[]),lu=s.makeMessageType("viam.app.data.v1.GetDatabaseConnectionRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),du=s.makeMessageType("viam.app.data.v1.GetDatabaseConnectionResponse",()=>[{no:1,name:"hostname",kind:"scalar",T:9},{no:2,name:"mongodb_uri",kind:"scalar",T:9},{no:3,name:"has_database_user",kind:"scalar",T:8}]),pu=s.makeMessageType("viam.app.data.v1.AddBinaryDataToDatasetByIDsRequest",()=>[{no:1,name:"binary_ids",kind:"message",T:ye,repeated:!0},{no:3,name:"binary_data_ids",kind:"scalar",T:9,repeated:!0},{no:2,name:"dataset_id",kind:"scalar",T:9}]),uu=s.makeMessageType("viam.app.data.v1.AddBinaryDataToDatasetByIDsResponse",[]),gu=s.makeMessageType("viam.app.data.v1.RemoveBinaryDataFromDatasetByIDsRequest",()=>[{no:1,name:"binary_ids",kind:"message",T:ye,repeated:!0},{no:3,name:"binary_data_ids",kind:"scalar",T:9,repeated:!0},{no:2,name:"dataset_id",kind:"scalar",T:9}]),Tu=s.makeMessageType("viam.app.data.v1.RemoveBinaryDataFromDatasetByIDsResponse",[]),ku=s.makeMessageType("viam.app.data.v1.CreateIndexRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"collection_type",kind:"enum",T:s.getEnumType(Jn)},{no:3,name:"pipeline_name",kind:"scalar",T:9,opt:!0},{no:4,name:"index_spec",kind:"scalar",T:12,repeated:!0}]),yu=s.makeMessageType("viam.app.data.v1.CreateIndexResponse",[]),vu=s.makeMessageType("viam.app.data.v1.DeleteIndexRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"collection_type",kind:"enum",T:s.getEnumType(Jn)},{no:3,name:"pipeline_name",kind:"scalar",T:9,opt:!0},{no:4,name:"index_name",kind:"scalar",T:9}]),hu=s.makeMessageType("viam.app.data.v1.DeleteIndexResponse",[]),fu=s.makeMessageType("viam.app.data.v1.ListIndexesRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"collection_type",kind:"enum",T:s.getEnumType(Jn)},{no:3,name:"pipeline_name",kind:"scalar",T:9,opt:!0}]),Ru=s.makeMessageType("viam.app.data.v1.ListIndexesResponse",()=>[{no:1,name:"indexes",kind:"message",T:_u,repeated:!0}]),_u=s.makeMessageType("viam.app.data.v1.Index",()=>[{no:1,name:"collection_type",kind:"enum",T:s.getEnumType(Jn)},{no:2,name:"pipeline_name",kind:"scalar",T:9,opt:!0},{no:3,name:"index_name",kind:"scalar",T:9},{no:4,name:"index_spec",kind:"scalar",T:12,repeated:!0},{no:5,name:"created_by",kind:"enum",T:s.getEnumType(vp)}]),Su=s.makeMessageType("viam.app.data.v1.CreateSavedQueryRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"mql_binary",kind:"scalar",T:12,repeated:!0}]),Iu=s.makeMessageType("viam.app.data.v1.CreateSavedQueryResponse",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Jo=s.makeMessageType("viam.app.data.v1.Query",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"mql_binary",kind:"scalar",T:12,repeated:!0},{no:5,name:"created_on",kind:"message",T:_},{no:6,name:"updated_at",kind:"message",T:_}]),Ou=s.makeMessageType("viam.app.data.v1.DeleteSavedQueryRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),bu=s.makeMessageType("viam.app.data.v1.DeleteSavedQueryResponse",[]),Mu=s.makeMessageType("viam.app.data.v1.GetSavedQueryRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Eu=s.makeMessageType("viam.app.data.v1.GetSavedQueryResponse",()=>[{no:1,name:"saved_query",kind:"message",T:Jo}]),wu=s.makeMessageType("viam.app.data.v1.UpdateSavedQueryRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"mql_binary",kind:"scalar",T:12,repeated:!0}]),Cu=s.makeMessageType("viam.app.data.v1.UpdateSavedQueryResponse",[]),Nu=s.makeMessageType("viam.app.data.v1.ListSavedQueriesRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"limit",kind:"scalar",T:3}]),Pu=s.makeMessageType("viam.app.data.v1.ListSavedQueriesResponse",()=>[{no:1,name:"queries",kind:"message",T:Jo,repeated:!0}]),Du=s.makeMessageType("viam.app.data.v1.CreateBinaryDataSignedURLRequest",()=>[{no:1,name:"binary_data_id",kind:"scalar",T:9},{no:2,name:"expiration_minutes",kind:"scalar",T:13,opt:!0}]),Au=s.makeMessageType("viam.app.data.v1.CreateBinaryDataSignedURLResponse",()=>[{no:1,name:"signed_url",kind:"scalar",T:9},{no:2,name:"expires_at",kind:"message",T:_}]),Ja=s.makeMessageType("viam.app.data.v1.SequenceResourceFilter",()=>[{no:1,name:"part_id",kind:"scalar",T:9},{no:2,name:"resource_name",kind:"scalar",T:9},{no:3,name:"method_name",kind:"scalar",T:9}]),zo=s.makeMessageType("viam.app.data.v1.Sequence",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9},{no:3,name:"sequence_tags",kind:"scalar",T:9,repeated:!0},{no:4,name:"created_at",kind:"message",T:_},{no:5,name:"updated_at",kind:"message",T:_},{no:6,name:"start_time",kind:"message",T:_},{no:7,name:"end_time",kind:"message",T:_},{no:8,name:"resources",kind:"message",T:Ja,repeated:!0}]),Uu=s.makeMessageType("viam.app.data.v1.CreateSequenceRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"resources",kind:"message",T:Ja,repeated:!0},{no:3,name:"sequence_tags",kind:"scalar",T:9,repeated:!0},{no:4,name:"start_time",kind:"message",T:_},{no:5,name:"end_time",kind:"message",T:_}]),qu=s.makeMessageType("viam.app.data.v1.CreateSequenceResponse",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Lu=s.makeMessageType("viam.app.data.v1.GetSequenceRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Gu=s.makeMessageType("viam.app.data.v1.GetSequenceResponse",()=>[{no:1,name:"sequence",kind:"message",T:zo}]),Bu=s.makeMessageType("viam.app.data.v1.UpdateSequenceRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"resources",kind:"message",T:Ja,repeated:!0},{no:3,name:"sequence_tags",kind:"scalar",T:9,repeated:!0},{no:4,name:"start_time",kind:"message",T:_},{no:5,name:"end_time",kind:"message",T:_},{no:6,name:"field_mask",kind:"message",T:pe}]),Fu=s.makeMessageType("viam.app.data.v1.UpdateSequenceResponse",[]),xu=s.makeMessageType("viam.app.data.v1.DeleteSequenceRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Ju=s.makeMessageType("viam.app.data.v1.DeleteSequenceResponse",[]),zu=s.makeMessageType("viam.app.data.v1.ListSequencesRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"page_token",kind:"scalar",T:9},{no:3,name:"page_size",kind:"scalar",T:13}]),Vu=s.makeMessageType("viam.app.data.v1.ListSequencesResponse",()=>[{no:1,name:"sequences",kind:"message",T:zo,repeated:!0},{no:2,name:"next_page_token",kind:"scalar",T:9}]),LS=Object.freeze(Object.defineProperty({__proto__:null,AddBinaryDataToDatasetByIDsRequest:pu,AddBinaryDataToDatasetByIDsResponse:uu,AddBoundingBoxToImageByIDRequest:eu,AddBoundingBoxToImageByIDResponse:nu,AddTagsToBinaryDataByFilterRequest:Yp,AddTagsToBinaryDataByFilterResponse:Wp,AddTagsToBinaryDataByIDsRequest:Vp,AddTagsToBinaryDataByIDsResponse:$p,Annotations:xa,BinaryData:xo,BinaryDataByFilterRequest:Cp,BinaryDataByFilterResponse:Np,BinaryDataByIDsRequest:Pp,BinaryDataByIDsResponse:Dp,BinaryID:ye,BinaryMetadata:qp,BoundingBox:Ap,BoundingBoxLabelsByFilterRequest:iu,BoundingBoxLabelsByFilterResponse:ru,CaptureInterval:zn,CaptureMetadata:Fa,Classification:Up,ConfigureDatabaseUserRequest:mu,ConfigureDatabaseUserResponse:cu,CreateBinaryDataSignedURLRequest:Du,CreateBinaryDataSignedURLResponse:Au,CreateIndexRequest:ku,CreateIndexResponse:yu,CreateSavedQueryRequest:Su,CreateSavedQueryResponse:Iu,CreateSequenceRequest:Uu,CreateSequenceResponse:qu,DataRequest:Bo,DeleteBinaryDataByFilterRequest:Fp,DeleteBinaryDataByFilterResponse:xp,DeleteBinaryDataByIDsRequest:Jp,DeleteBinaryDataByIDsResponse:zp,DeleteIndexRequest:vu,DeleteIndexResponse:hu,DeleteSavedQueryRequest:Ou,DeleteSavedQueryResponse:bu,DeleteSequenceRequest:xu,DeleteSequenceResponse:Ju,DeleteTabularDataRequest:Gp,DeleteTabularDataResponse:Bp,DeleteTabularFilter:Lp,ExportTabularDataRequest:bp,ExportTabularDataResponse:Mp,Filter:Ke,GetDatabaseConnectionRequest:lu,GetDatabaseConnectionResponse:du,GetLatestTabularDataRequest:Ep,GetLatestTabularDataResponse:wp,GetSavedQueryRequest:Mu,GetSavedQueryResponse:Eu,GetSequenceRequest:Lu,GetSequenceResponse:Gu,Index:_u,IndexCreator:vp,IndexableCollection:Jn,ListIndexesRequest:fu,ListIndexesResponse:Ru,ListSavedQueriesRequest:Nu,ListSavedQueriesResponse:Pu,ListSequencesRequest:zu,ListSequencesResponse:Vu,Order:kp,Query:Jo,RemoveBinaryDataFromDatasetByIDsRequest:gu,RemoveBinaryDataFromDatasetByIDsResponse:Tu,RemoveBoundingBoxFromImageByIDRequest:au,RemoveBoundingBoxFromImageByIDResponse:tu,RemoveTagsFromBinaryDataByFilterRequest:Kp,RemoveTagsFromBinaryDataByFilterResponse:Xp,RemoveTagsFromBinaryDataByIDsRequest:Hp,RemoveTagsFromBinaryDataByIDsResponse:jp,Sequence:zo,SequenceResourceFilter:Ja,TabularData:Rp,TabularDataByFilterRequest:hp,TabularDataByFilterResponse:fp,TabularDataByMQLRequest:Ip,TabularDataByMQLResponse:Op,TabularDataBySQLRequest:_p,TabularDataBySQLResponse:Sp,TabularDataSource:Fo,TabularDataSourceType:sn,TagsByFilterRequest:Qp,TagsByFilterResponse:Zp,TagsFilter:Ba,TagsFilterType:yp,UpdateBoundingBoxRequest:su,UpdateBoundingBoxResponse:ou,UpdateSavedQueryRequest:wu,UpdateSavedQueryResponse:Cu,UpdateSequenceRequest:Bu,UpdateSequenceResponse:Fu},Symbol.toStringTag,{value:"Module"})),Vo=s.makeMessageType("viam.component.camera.v1.GetImagesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"filter_source_names",kind:"scalar",T:9,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),$u=s.makeMessageType("viam.component.camera.v1.GetImagesResponse",()=>[{no:1,name:"images",kind:"message",T:$o,repeated:!0},{no:84260,name:"response_metadata",kind:"message",T:em}]),$o=s.makeMessageType("viam.component.camera.v1.Image",()=>[{no:1,name:"source_name",kind:"scalar",T:9},{no:3,name:"image",kind:"scalar",T:12},{no:4,name:"mime_type",kind:"scalar",T:9},{no:5,name:"annotations",kind:"message",T:xa}]),Yo=s.makeMessageType("viam.component.camera.v1.GetPointCloudRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"mime_type",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Yu=s.makeMessageType("viam.component.camera.v1.GetPointCloudResponse",()=>[{no:1,name:"mime_type",kind:"scalar",T:9},{no:2,name:"point_cloud",kind:"scalar",T:12}]),Wu=s.makeMessageType("viam.component.camera.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),Hu=s.makeMessageType("viam.component.camera.v1.GetPropertiesResponse",()=>[{no:1,name:"supports_pcd",kind:"scalar",T:8},{no:2,name:"intrinsic_parameters",kind:"message",T:Xu},{no:3,name:"distortion_parameters",kind:"message",T:Qu},{no:4,name:"mime_types",kind:"scalar",T:9,repeated:!0},{no:5,name:"frame_rate",kind:"scalar",T:2,opt:!0},{no:6,name:"extrinsic_parameters",kind:"message",T:Zu}]),GS=s.makeMessageType("viam.component.camera.v1.Webcams",()=>[{no:1,name:"webcams",kind:"message",T:ju,repeated:!0}]),ju=s.makeMessageType("viam.component.camera.v1.Webcam",()=>[{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"status",kind:"scalar",T:9},{no:3,name:"properties",kind:"message",T:Ku,repeated:!0},{no:4,name:"name",kind:"scalar",T:9},{no:5,name:"id",kind:"scalar",T:9}]),Ku=s.makeMessageType("viam.component.camera.v1.Property",()=>[{no:1,name:"width_px",kind:"scalar",T:5},{no:2,name:"height_px",kind:"scalar",T:5},{no:3,name:"frame_format",kind:"scalar",T:9},{no:4,name:"frame_rate",kind:"scalar",T:2}]),Xu=s.makeMessageType("viam.component.camera.v1.IntrinsicParameters",()=>[{no:1,name:"width_px",kind:"scalar",T:13},{no:2,name:"height_px",kind:"scalar",T:13},{no:3,name:"focal_x_px",kind:"scalar",T:1},{no:4,name:"focal_y_px",kind:"scalar",T:1},{no:5,name:"center_x_px",kind:"scalar",T:1},{no:6,name:"center_y_px",kind:"scalar",T:1}]),Qu=s.makeMessageType("viam.component.camera.v1.DistortionParameters",()=>[{no:1,name:"model",kind:"scalar",T:9},{no:2,name:"parameters",kind:"scalar",T:1,repeated:!0}]),Zu=s.makeMessageType("viam.component.camera.v1.ExtrinsicParameters",()=>[{no:1,name:"translation",kind:"message",T:ke},{no:2,name:"orientation",kind:"message",T:Dt}]),BS=Object.freeze(Object.defineProperty({__proto__:null,DistortionParameters:Qu,ExtrinsicParameters:Zu,GetImagesRequest:Vo,GetImagesResponse:$u,GetPointCloudRequest:Yo,GetPointCloudResponse:Yu,GetPropertiesRequest:Wu,GetPropertiesResponse:Hu,Image:$o,IntrinsicParameters:Xu,Property:Ku,Webcam:ju,Webcams:GS},Symbol.toStringTag,{value:"Module"})),Wo=s.makeMessageType("viam.service.vision.v1.GetDetectionsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"image",kind:"scalar",T:12},{no:3,name:"width",kind:"scalar",T:3},{no:4,name:"height",kind:"scalar",T:3},{no:5,name:"mime_type",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),eg=s.makeMessageType("viam.service.vision.v1.GetDetectionsResponse",()=>[{no:1,name:"detections",kind:"message",T:za,repeated:!0}]),Ho=s.makeMessageType("viam.service.vision.v1.GetDetectionsFromCameraRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"camera_name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),ng=s.makeMessageType("viam.service.vision.v1.GetDetectionsFromCameraResponse",()=>[{no:1,name:"detections",kind:"message",T:za,repeated:!0}]),za=s.makeMessageType("viam.service.vision.v1.Detection",()=>[{no:1,name:"x_min",kind:"scalar",T:3,opt:!0},{no:2,name:"y_min",kind:"scalar",T:3,opt:!0},{no:3,name:"x_max",kind:"scalar",T:3,opt:!0},{no:4,name:"y_max",kind:"scalar",T:3,opt:!0},{no:5,name:"confidence",kind:"scalar",T:1},{no:6,name:"class_name",kind:"scalar",T:9},{no:7,name:"x_min_normalized",kind:"scalar",T:1,opt:!0},{no:8,name:"y_min_normalized",kind:"scalar",T:1,opt:!0},{no:9,name:"x_max_normalized",kind:"scalar",T:1,opt:!0},{no:10,name:"y_max_normalized",kind:"scalar",T:1,opt:!0}]),jo=s.makeMessageType("viam.service.vision.v1.GetClassificationsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"image",kind:"scalar",T:12},{no:3,name:"width",kind:"scalar",T:5},{no:4,name:"height",kind:"scalar",T:5},{no:5,name:"mime_type",kind:"scalar",T:9},{no:6,name:"n",kind:"scalar",T:5},{no:99,name:"extra",kind:"message",T:p}]),ag=s.makeMessageType("viam.service.vision.v1.GetClassificationsResponse",()=>[{no:1,name:"classifications",kind:"message",T:Va,repeated:!0}]),Ko=s.makeMessageType("viam.service.vision.v1.GetClassificationsFromCameraRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"camera_name",kind:"scalar",T:9},{no:3,name:"n",kind:"scalar",T:5},{no:99,name:"extra",kind:"message",T:p}]),tg=s.makeMessageType("viam.service.vision.v1.GetClassificationsFromCameraResponse",()=>[{no:1,name:"classifications",kind:"message",T:Va,repeated:!0}]),Va=s.makeMessageType("viam.service.vision.v1.Classification",()=>[{no:1,name:"class_name",kind:"scalar",T:9},{no:2,name:"confidence",kind:"scalar",T:1}]),Xo=s.makeMessageType("viam.service.vision.v1.GetObjectPointCloudsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"camera_name",kind:"scalar",T:9},{no:3,name:"mime_type",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),sg=s.makeMessageType("viam.service.vision.v1.GetObjectPointCloudsResponse",()=>[{no:1,name:"mime_type",kind:"scalar",T:9},{no:2,name:"objects",kind:"message",T:Ut,repeated:!0}]),Qo=s.makeMessageType("viam.service.vision.v1.GetPropertiesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Zo=s.makeMessageType("viam.service.vision.v1.CaptureAllFromCameraRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"camera_name",kind:"scalar",T:9},{no:3,name:"return_image",kind:"scalar",T:8},{no:4,name:"return_classifications",kind:"scalar",T:8},{no:5,name:"return_detections",kind:"scalar",T:8},{no:6,name:"return_object_point_clouds",kind:"scalar",T:8},{no:99,name:"extra",kind:"message",T:p}]),og=s.makeMessageType("viam.service.vision.v1.CaptureAllFromCameraResponse",()=>[{no:1,name:"image",kind:"message",T:$o},{no:2,name:"detections",kind:"message",T:za,repeated:!0},{no:3,name:"classifications",kind:"message",T:Va,repeated:!0},{no:4,name:"objects",kind:"message",T:Ut,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),ig=s.makeMessageType("viam.service.vision.v1.GetPropertiesResponse",()=>[{no:1,name:"classifications_supported",kind:"scalar",T:8},{no:2,name:"detections_supported",kind:"scalar",T:8},{no:3,name:"object_point_clouds_supported",kind:"scalar",T:8}]),rg=Object.freeze(Object.defineProperty({__proto__:null,CaptureAllFromCameraRequest:Zo,CaptureAllFromCameraResponse:og,Classification:Va,Detection:za,GetClassificationsFromCameraRequest:Ko,GetClassificationsFromCameraResponse:tg,GetClassificationsRequest:jo,GetClassificationsResponse:ag,GetDetectionsFromCameraRequest:Ho,GetDetectionsFromCameraResponse:ng,GetDetectionsRequest:Wo,GetDetectionsResponse:eg,GetObjectPointCloudsRequest:Xo,GetObjectPointCloudsResponse:sg,GetPropertiesRequest:Qo,GetPropertiesResponse:ig},Symbol.toStringTag,{value:"Module"})),mg={typeName:"viam.service.vision.v1.VisionService",methods:{getDetectionsFromCamera:{name:"GetDetectionsFromCamera",I:Ho,O:ng,kind:m.Unary},getDetections:{name:"GetDetections",I:Wo,O:eg,kind:m.Unary},getClassificationsFromCamera:{name:"GetClassificationsFromCamera",I:Ko,O:tg,kind:m.Unary},getClassifications:{name:"GetClassifications",I:jo,O:ag,kind:m.Unary},getObjectPointClouds:{name:"GetObjectPointClouds",I:Xo,O:sg,kind:m.Unary},getProperties:{name:"GetProperties",I:Qo,O:ig,kind:m.Unary},captureAllFromCamera:{name:"CaptureAllFromCamera",I:Zo,O:og,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary}}},FS=new Blob([`self.onmessage = function(e) {
|
|
5
5
|
setTimeout(() => self.postMessage(""), e.data);
|
|
6
|
-
};`],{type:"text/javascript"});class
|
|
6
|
+
};`],{type:"text/javascript"});class xS{constructor(e,n,t=1e4){this.deferredTransport=e,this.onDisconnect=n,this.heartbeatIntervalMs=t}connecting;get client(){const e=this.deferredTransport();return X(lo,e)}heartbeat(){let e;const n=async()=>{try{await this.client.getOperations({})}catch{this.onDisconnect();return}e?e.postMessage(this.heartbeatIntervalMs):setTimeout(()=>{n().catch(console.error)},this.heartbeatIntervalMs)};if(globalThis.Worker!==void 0){const t=window.URL.createObjectURL(FS);e=new Worker(t),URL.revokeObjectURL(t),e.addEventListener("message",()=>{n().catch(console.error)})}n().catch(console.error)}async start(){this.connecting&&await this.connecting,this.connecting=new Promise((e,n)=>{(async()=>{await this.client.getOperations({})})().then(e).catch(n).finally(()=>{this.connecting=void 0})});try{await this.connecting}finally{this.connecting=void 0}this.heartbeat()}}const $a=s.makeMessageType("grpc.reflection.v1.ServerReflectionRequest",()=>[{no:1,name:"host",kind:"scalar",T:9},{no:3,name:"file_by_filename",kind:"scalar",T:9,oneof:"message_request"},{no:4,name:"file_containing_symbol",kind:"scalar",T:9,oneof:"message_request"},{no:5,name:"file_containing_extension",kind:"message",T:JS,oneof:"message_request"},{no:6,name:"all_extension_numbers_of_type",kind:"scalar",T:9,oneof:"message_request"},{no:7,name:"list_services",kind:"scalar",T:9,oneof:"message_request"}]),JS=s.makeMessageType("grpc.reflection.v1.ExtensionRequest",()=>[{no:1,name:"containing_type",kind:"scalar",T:9},{no:2,name:"extension_number",kind:"scalar",T:5}]),zS=s.makeMessageType("grpc.reflection.v1.ServerReflectionResponse",()=>[{no:1,name:"valid_host",kind:"scalar",T:9},{no:2,name:"original_request",kind:"message",T:$a},{no:4,name:"file_descriptor_response",kind:"message",T:VS,oneof:"message_response"},{no:5,name:"all_extension_numbers_response",kind:"message",T:$S,oneof:"message_response"},{no:6,name:"list_services_response",kind:"message",T:YS,oneof:"message_response"},{no:7,name:"error_response",kind:"message",T:HS,oneof:"message_response"}]),VS=s.makeMessageType("grpc.reflection.v1.FileDescriptorResponse",()=>[{no:1,name:"file_descriptor_proto",kind:"scalar",T:12,repeated:!0}]),$S=s.makeMessageType("grpc.reflection.v1.ExtensionNumberResponse",()=>[{no:1,name:"base_type_name",kind:"scalar",T:9},{no:2,name:"extension_number",kind:"scalar",T:5,repeated:!0}]),YS=s.makeMessageType("grpc.reflection.v1.ListServiceResponse",()=>[{no:1,name:"service",kind:"message",T:WS,repeated:!0}]),WS=s.makeMessageType("grpc.reflection.v1.ServiceResponse",()=>[{no:1,name:"name",kind:"scalar",T:9}]),HS=s.makeMessageType("grpc.reflection.v1.ErrorResponse",()=>[{no:1,name:"error_code",kind:"scalar",T:5},{no:2,name:"error_message",kind:"scalar",T:9}]),jS={typeName:"grpc.reflection.v1.ServerReflection",methods:{serverReflectionInfo:{name:"ServerReflectionInfo",I:$a,O:zS,kind:m.BiDiStreaming}}};class KS{constructor(e,n){this.deferredTransport=e,this.sessionManager=n}async getSessionMetadata(){try{return await this.sessionManager.getSessionMetadata()}catch(e){throw e instanceof C&&e.code===g.Code.InvalidArgument&&e.message==="SESSION_EXPIRED"&&this.sessionManager.reset(),e}}async unary(e,n,t,o,i,r,c){const l=Un(i),d=`/${e.typeName}/${n.name}`;for(const[u,h]of Bn)l.set(u,h);if(on.heartbeatMonitoredMethods[d]??!1){const u=await this.getSessionMetadata();for(const[h,I]of u)l.set(h,I)}return this.deferredTransport().unary(e,n,t,o,l,r,c)}async stream(e,n,t,o,i,r,c){const l=Un(i),d=`/${e.typeName}/${n.name}`;for(const[u,h]of Bn)l.set(u,h);if(on.heartbeatMonitoredMethods[d]??!1){const u=await this.getSessionMetadata();for(const[h,I]of u)l.set(h,I)}return this.deferredTransport().stream(e,n,t,o,l,r,c)}}const XS=new Blob([`self.onmessage = function(e) {
|
|
7
7
|
setTimeout(() => self.postMessage(""), e.data);
|
|
8
|
-
};`],{type:"text/javascript"});class sn{constructor(e,n){this.deferredTransport=n,this.host=e??"",this.transport=new IS(this.deferredTransport,this)}static heartbeatMonitoredMethods={};transport;currentSessionID="";sessionsSupported;heartbeatIntervalMs;host="";starting;get client(){const e=this.deferredTransport();return X(oo,e)}get sessionID(){return this.currentSessionID}setHost(e){this.host=e}getSessionMetadataInner(){const e=new Headers;return this.sessionsSupported&&this.currentSessionID!==""&&e.set("viam-sid",this.currentSessionID),e}reset(){this.starting||(this.sessionsSupported=void 0)}backgroundHeartbeat=!0;async heartbeat(){if(!this.sessionsSupported||this.currentSessionID==="")return;for(;this.starting;)await this.starting;let e;const n=async()=>{const t=new no({id:this.currentSessionID});try{await this.client.sendSessionHeartbeat(t)}catch(o){if(o instanceof C&&o.code===g.Code.Unimplemented){console.error("sessions unsupported; will not try again"),this.sessionsSupported=!1;return}if(o instanceof pe||o instanceof C&&o.rawMessage==="closed"){this.reset();return}}e?e.postMessage(this.heartbeatIntervalMs):setTimeout(()=>{n().catch(console.error)},this.heartbeatIntervalMs)};if(this.backgroundHeartbeat&&globalThis.Worker!==void 0){const t=window.URL.createObjectURL(bS);e=new Worker(t),URL.revokeObjectURL(t),e.addEventListener("message",()=>{n().catch(console.error)})}n().catch(console.error)}async getSessionMetadata(){for(;this.starting;)await this.starting;return this.sessionsSupported!==void 0?this.getSessionMetadataInner():(this.starting=new Promise((e,n)=>{(async()=>{const t=new eo;this.currentSessionID!==""&&(t.resume=this.currentSessionID);let o;try{o=await this.client.startSession(t)}catch(r){if(r instanceof C&&r.code===g.Code.Unimplemented){console.error("sessions unsupported; will not try again"),this.sessionsSupported=!1;return}throw r}const{heartbeatWindow:i}=o;if(!i)throw new Error("expected heartbeat window in response to start session");this.sessionsSupported=!0,this.currentSessionID=o.id,this.heartbeatIntervalMs=(Number(i.seconds)*1e3+i.nanos/1e6)/5,await this.applyHeartbeatMonitoredMethods(),e(),this.heartbeat().catch(console.error)})().then(e).catch(n).finally(()=>{this.starting=void 0})}),await this.starting,this.getSessionMetadataInner())}async applyHeartbeatMonitoredMethods(){try{const e=X(SS,this.transport),n=new Ja({host:this.host,messageRequest:{case:"listServices",value:""}}),t=e.serverReflectionInfo(ct([n]),{timeoutMs:1e4});for await(const o of t){const i=o.messageResponse.value.service.map(c=>new Ja({messageRequest:{case:"fileContainingSymbol",value:c.name}})),r=e.serverReflectionInfo(ct(i),{timeoutMs:1e4});for await(const c of r)for(const d of c.messageResponse.value.fileDescriptorProto){const l=ie.fromBinary(d);for(const u of l.service)for(const h of u.method)sn.heartbeatMonitoredMethods[`/${l.package}.${u.name}/${h.name}`]=sn.hasHeartbeatOption(h.options)}}}catch{sn.heartbeatMonitoredMethods={"/viam.component.arm.v1.ArmService/MoveToPosition":!0,"/viam.component.arm.v1.ArmService/MoveToJointPositions":!0,"/viam.component.arm.v1.ArmService/MoveThroughJointPositions":!0,"/viam.component.base.v1.BaseService/MoveStraight":!0,"/viam.component.base.v1.BaseService/Spin":!0,"/viam.component.base.v1.BaseService/SetPower":!0,"/viam.component.base.v1.BaseService/SetVelocity":!0,"/viam.component.gantry.v1.GantryService/MoveToPosition":!0,"/viam.component.gripper.v1.GripperService/Open":!0,"/viam.component.gripper.v1.GripperService/Grab":!0,"/viam.component.motor.v1.MotorService/SetPower":!0,"/viam.component.motor.v1.MotorService/GoFor":!0,"/viam.component.motor.v1.MotorService/GoTo":!0,"/viam.component.motor.v1.MotorService/SetRPM":!0,"/viam.component.servo.v1.ServoService/Move":!0}}}static hasHeartbeatOption(e){if(!e)return!1;const n=new Li(e.toBinary());for(;n.pos<n.len;){const t=n.tag(),[o]=t;if(o===jr.field.no)return!0;n.string()}return!1}}const OS=s.makeEnum("viam.service.mlmodel.v1.LabelType",[{no:0,name:"LABEL_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"LABEL_TYPE_TENSOR_VALUE",localName:"TENSOR_VALUE"},{no:2,name:"LABEL_TYPE_TENSOR_AXIS",localName:"TENSOR_AXIS"}]),Vu=s.makeMessageType("viam.service.mlmodel.v1.InferRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:3,name:"input_tensors",kind:"message",T:Wu},{no:99,name:"extra",kind:"message",T:p}]),ES=s.makeMessageType("viam.service.mlmodel.v1.InferResponse",()=>[{no:3,name:"output_tensors",kind:"message",T:Wu}]),$u=s.makeMessageType("viam.service.mlmodel.v1.MetadataRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),MS=s.makeMessageType("viam.service.mlmodel.v1.MetadataResponse",()=>[{no:1,name:"metadata",kind:"message",T:wS}]),wS=s.makeMessageType("viam.service.mlmodel.v1.Metadata",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"description",kind:"scalar",T:9},{no:4,name:"input_info",kind:"message",T:Yu,repeated:!0},{no:5,name:"output_info",kind:"message",T:Yu,repeated:!0}]),Yu=s.makeMessageType("viam.service.mlmodel.v1.TensorInfo",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"description",kind:"scalar",T:9},{no:3,name:"data_type",kind:"scalar",T:9},{no:4,name:"shape",kind:"scalar",T:5,repeated:!0},{no:5,name:"associated_files",kind:"message",T:CS,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),CS=s.makeMessageType("viam.service.mlmodel.v1.File",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"description",kind:"scalar",T:9},{no:3,name:"label_type",kind:"enum",T:s.getEnumType(OS)}]),NS=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataInt8",()=>[{no:1,name:"data",kind:"scalar",T:12}]),PS=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataUInt8",()=>[{no:1,name:"data",kind:"scalar",T:12}]),DS=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataInt16",()=>[{no:1,name:"data",kind:"scalar",T:7,repeated:!0}]),AS=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataUInt16",()=>[{no:1,name:"data",kind:"scalar",T:7,repeated:!0}]),US=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataInt32",()=>[{no:1,name:"data",kind:"scalar",T:15,repeated:!0}]),qS=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataUInt32",()=>[{no:1,name:"data",kind:"scalar",T:7,repeated:!0}]),LS=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataInt64",()=>[{no:1,name:"data",kind:"scalar",T:16,repeated:!0}]),GS=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataUInt64",()=>[{no:1,name:"data",kind:"scalar",T:6,repeated:!0}]),BS=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataFloat",()=>[{no:1,name:"data",kind:"scalar",T:2,repeated:!0}]),FS=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataDouble",()=>[{no:1,name:"data",kind:"scalar",T:1,repeated:!0}]),xS=s.makeMessageType("viam.service.mlmodel.v1.FlatTensor",()=>[{no:1,name:"shape",kind:"scalar",T:6,repeated:!0},{no:2,name:"int8_tensor",kind:"message",T:NS,oneof:"tensor"},{no:3,name:"uint8_tensor",kind:"message",T:PS,oneof:"tensor"},{no:4,name:"int16_tensor",kind:"message",T:DS,oneof:"tensor"},{no:5,name:"uint16_tensor",kind:"message",T:AS,oneof:"tensor"},{no:6,name:"int32_tensor",kind:"message",T:US,oneof:"tensor"},{no:7,name:"uint32_tensor",kind:"message",T:qS,oneof:"tensor"},{no:8,name:"int64_tensor",kind:"message",T:LS,oneof:"tensor"},{no:9,name:"uint64_tensor",kind:"message",T:GS,oneof:"tensor"},{no:10,name:"float_tensor",kind:"message",T:BS,oneof:"tensor"},{no:11,name:"double_tensor",kind:"message",T:FS,oneof:"tensor"}]),Wu=s.makeMessageType("viam.service.mlmodel.v1.FlatTensors",()=>[{no:1,name:"tensors",kind:"map",K:9,V:{kind:"message",T:xS}}]),Hu={typeName:"viam.service.mlmodel.v1.MLModelService",methods:{infer:{name:"Infer",I:Vu,O:ES,kind:m.Unary},metadata:{name:"Metadata",I:$u,O:MS,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary}}},ju=s.makeEnum("viam.service.worldstatestore.v1.TransformChangeType",[{no:0,name:"TRANSFORM_CHANGE_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"TRANSFORM_CHANGE_TYPE_ADDED",localName:"ADDED"},{no:2,name:"TRANSFORM_CHANGE_TYPE_REMOVED",localName:"REMOVED"},{no:3,name:"TRANSFORM_CHANGE_TYPE_UPDATED",localName:"UPDATED"}]),Ku=s.makeMessageType("viam.service.worldstatestore.v1.ListUUIDsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),JS=s.makeMessageType("viam.service.worldstatestore.v1.ListUUIDsResponse",()=>[{no:1,name:"uuids",kind:"scalar",T:12,repeated:!0}]),Xu=s.makeMessageType("viam.service.worldstatestore.v1.GetTransformRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"uuid",kind:"scalar",T:12},{no:99,name:"extra",kind:"message",T:p}]),zS=s.makeMessageType("viam.service.worldstatestore.v1.GetTransformResponse",()=>[{no:2,name:"transform",kind:"message",T:Fe}]),Qu=s.makeMessageType("viam.service.worldstatestore.v1.StreamTransformChangesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),VS=s.makeMessageType("viam.service.worldstatestore.v1.StreamTransformChangesResponse",()=>[{no:1,name:"change_type",kind:"enum",T:s.getEnumType(ju)},{no:2,name:"transform",kind:"message",T:Fe},{no:3,name:"updated_fields",kind:"message",T:Ge}]),Zu={typeName:"viam.service.worldstatestore.v1.WorldStateStoreService",methods:{listUUIDs:{name:"ListUUIDs",I:Ku,O:JS,kind:m.Unary},getTransform:{name:"GetTransform",I:Xu,O:zS,kind:m.Unary},streamTransformChanges:{name:"StreamTransformChanges",I:Qu,O:VS,kind:m.ServerStreaming},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary}}},$S=(a,e)=>{if(a==null)throw new Error(e)},yn="Dial operation aborted",YS=a=>{const e=a;return typeof e.signalingAddress!="string"?!1:!e.iceServers||Array.isArray(e.iceServers)},eg=a=>a>0&&Number.isInteger(a),ng=a=>{if(a instanceof C&&[g.Code.Canceled,g.Code.InvalidArgument,g.Code.NotFound,g.Code.AlreadyExists,g.Code.PermissionDenied,g.Code.FailedPrecondition,g.Code.OutOfRange,g.Code.Unimplemented,g.Code.Unauthenticated].includes(a.code))return!1;if(a instanceof Error){const e=a.message.toLowerCase();if(e.includes("invalid")||e.includes("configuration")||e.includes("cannot dial"))return!1}return!0},WS=a=>{if(a.credentials&&Gn(a.credentials))try{a.credentials.authEntity=new URL(a.credentials.authEntity).host}catch(e){if(!(e instanceof TypeError))throw e}if(a.reconnectMaxAttempts!==void 0&&!eg(a.reconnectMaxAttempts))throw new Error(`Value of max reconnect attempts (${a.reconnectMaxAttempts}) should be a positive integer`);if(a.reconnectMaxWait!==void 0&&!eg(a.reconnectMaxWait))throw new Error(`Value of max reconnect wait (${a.reconnectMaxWait}) should be a positive integer`)},ag=a=>{if(a instanceof Error&&a.message===yn)throw a};class Ke extends Qr{serviceHost="";webrtcOptions={enabled:!1,host:"",signalingAddress:"",rtcConfig:{}};directOptions={};sessionOptions={disabled:!1};gRPCConnectionManager;sessionManager;peerConn;dataChannel;transport;connecting;connectResolve;dialing;currentDialAbortSignal;savedCreds;closed;robotServiceClient;armServiceClient;baseServiceClient;boardServiceClient;encoderServiceClient;gantryServiceClient;genericServiceClient;gripperServiceClient;mlModelServiceClient;movementSensorServiceClient;powerSensorServiceClient;inputControllerServiceClient;motorServiceClient;navigationServiceClient;discoveryServiceClient;motionServiceClient;visionServiceClient;servoServiceClient;slamServiceClient;worldStateStoreServiceClient;currentRetryAttempt=0;isReconnecting=!1;onICEConnectionStateChange;onDataChannelClose;onTrack;constructor(e,n,t,o){super(),e!==void 0&&(this.serviceHost=e),n&&(this.webrtcOptions=n),o&&(this.directOptions=o),t&&(this.sessionOptions=t),this.gRPCConnectionManager=new TS(()=>{if(!this.transport)throw new Error(Ke.notConnectedYetStr);return this.transport},()=>{this.onDisconnect()}),this.sessionManager=new sn(this.serviceHost,()=>{if(!this.transport)throw new Error(Ke.notConnectedYetStr);return this.transport});for(const i of Object.values(K))this.on(i,()=>{this.emit("connectionstatechange",{eventType:i})});this.closed=!1}cleanupEventListeners(){this.peerConn&&this.onICEConnectionStateChange&&(this.peerConn.removeEventListener("iceconnectionstatechange",this.onICEConnectionStateChange),this.onICEConnectionStateChange=void 0),this.peerConn&&this.onTrack&&(this.peerConn.removeEventListener("track",this.onTrack),this.onTrack=void 0),this.dataChannel&&this.onDataChannelClose&&(this.dataChannel.removeEventListener("close",this.onDataChannelClose),this.onDataChannelClose=void 0)}onDisconnect(e){if(this.noReconnect!==void 0&&this.noReconnect){this.emit(K.DISCONNECTED,e??{});return}if(this.closed){this.emit(K.DISCONNECTED,e??{});return}this.isReconnecting=!0,this.emit(K.RECONNECTING,{event:e??{}}),console.debug("Connection closed, will try to reconnect");const n={retry:(t,o)=>(console.debug(`Failed to connect, attempt ${o} with backoff`,t),this.currentRetryAttempt=o,this.closed?!1:ng(t)?!0:this.shouldRetryOnError?.()?(console.debug("Non-retryable error encountered, but shouldRetryOnError returned true",t),!0):(console.debug("Non-retryable error encountered, stopping reconnection attempts",t),!1))};this.reconnectMaxWait!==void 0&&(n.maxDelay=this.reconnectMaxWait),this.reconnectMaxAttempts!==void 0&&(n.numOfAttempts=this.reconnectMaxAttempts),this.currentRetryAttempt=0,Rt(async()=>this.connect(),n).then(()=>{this.isReconnecting=!1,console.debug("Reconnected successfully!")}).catch(t=>{this.isReconnecting=!1,console.debug(`Reconnection failed after ${this.currentRetryAttempt} attempt(s)`,t),this.emit(K.RECONNECTION_FAILED,{error:t,attempts:this.currentRetryAttempt})})}get noReconnect(){return this.webrtcOptions.noReconnect??this.directOptions.noReconnect}get reconnectMaxAttempts(){return this.webrtcOptions.reconnectMaxAttempts??this.directOptions.reconnectMaxAttempts}get reconnectMaxWait(){return this.webrtcOptions.reconnectMaxWait??this.directOptions.reconnectMaxWait}get shouldRetryOnError(){return this.webrtcOptions.shouldRetryOnError??this.directOptions.shouldRetryOnError}get sessionId(){return this.sessionManager.sessionID}static notConnectedYetStr="not connected yet";get robotService(){if(!this.robotServiceClient)throw new Error(Ke.notConnectedYetStr);return this.robotServiceClient}get armService(){return this.armServiceClient??=this.createServiceClient(cm),this.armServiceClient}get baseService(){return this.baseServiceClient??=this.createServiceClient(vm),this.baseServiceClient}get boardService(){return this.boardServiceClient??=this.createServiceClient(Pm),this.boardServiceClient}get encoderService(){return this.encoderServiceClient??=this.createServiceClient(Lm),this.encoderServiceClient}get gantryService(){return this.gantryServiceClient??=this.createServiceClient(Vm),this.gantryServiceClient}get genericService(){return this.genericServiceClient??=this.createServiceClient(ys),this.genericServiceClient}get gripperService(){return this.gripperServiceClient??=this.createServiceClient(Km),this.gripperServiceClient}get mlModelService(){return this.mlModelServiceClient??=this.createServiceClient(Hu),this.mlModelServiceClient}get movementSensorService(){return this.movementSensorServiceClient??=this.createServiceClient(Oc),this.movementSensorServiceClient}get powerSensorService(){return this.powerSensorServiceClient??=this.createServiceClient(Cc),this.powerSensorServiceClient}get inputControllerService(){return this.inputControllerServiceClient??=this.createServiceClient(oc),this.inputControllerServiceClient}get motorService(){return this.motorServiceClient??=this.createServiceClient(kc),this.motorServiceClient}get navigationService(){return this.navigationServiceClient??=this.createServiceClient(Xd),this.navigationServiceClient}get discoveryService(){return this.discoveryServiceClient??=this.createServiceClient(kd),this.discoveryServiceClient}get motionService(){return this.motionServiceClient??=this.createServiceClient(Ld),this.motionServiceClient}get visionService(){return this.visionServiceClient??=this.createServiceClient(zu),this.visionServiceClient}get servoService(){return this.servoServiceClient??=this.createServiceClient(Uc),this.servoServiceClient}get slamService(){return this.slamServiceClient??=this.createServiceClient(ip),this.slamServiceClient}get worldStateStoreService(){return this.worldStateStoreServiceClient??=this.createServiceClient(Zu),this.worldStateStoreServiceClient}createServiceClient(e){return $S(this.clientTransport,Ke.notConnectedYetStr),X(e,this.clientTransport)}get peerConnection(){return this.peerConn}get clientTransport(){return this.sessionOptions.disabled?this.transport:this.sessionManager.transport}async dialWebRTC(e,n){if(n?.abort===!0)throw new Error(yn);return this.emit(K.DIALING,{method:"webrtc",attempt:this.currentRetryAttempt}),this.serviceHost=e.serviceHost??e.host,this.sessionManager.setHost(this.serviceHost),this.webrtcOptions.enabled=!0,this.webrtcOptions.host=e.host,this.webrtcOptions.signalingAddress=e.signalingAddress,this.webrtcOptions.rtcConfig.iceServers=e.iceServers??[],this.webrtcOptions.noReconnect=e.noReconnect,this.webrtcOptions.reconnectMaxWait=e.reconnectMaxWait,this.webrtcOptions.reconnectMaxAttempts=e.reconnectMaxAttempts,this.webrtcOptions.shouldRetryOnError=e.shouldRetryOnError,this.webrtcOptions.forceRelay=e.forceRelay,this.webrtcOptions.forceP2P=e.forceP2P,this.webrtcOptions.turnUri=e.turnUri,this.webrtcOptions.turnScheme=e.turnScheme,this.webrtcOptions.turnTransport=e.turnTransport,this.webrtcOptions.turnPort=e.turnPort,this.webrtcOptions.signalingInsecure=e.signalingInsecure,this.sessionOptions.disabled=e.disableSessions??!1,await this.connect({priority:e.priority,dialTimeoutMs:e.dialTimeoutMs??e.dialTimeout??Lt,creds:e.credentials,extraHeaders:e.extraHeaders}),this}async dialDirect(e,n){if(n?.abort===!0)throw new Error(yn);if(this.emit(K.DIALING,{method:"grpc",attempt:this.currentRetryAttempt}),!e.host.includes("local"))throw new Error(`cannot dial "${e.host}" directly, please use a local url instead.`);return this.serviceHost=e.host,this.sessionManager.setHost(this.serviceHost),this.webrtcOptions.enabled=!1,this.directOptions.noReconnect=e.noReconnect,this.directOptions.reconnectMaxWait=e.reconnectMaxWait,this.directOptions.reconnectMaxAttempts=e.reconnectMaxAttempts,this.directOptions.shouldRetryOnError=e.shouldRetryOnError,this.sessionOptions.disabled=e.disableSessions??!1,await this.connect({creds:e.credentials,dialTimeoutMs:e.dialTimeoutMs??e.dialTimeout??Lt,extraHeaders:e.extraHeaders}),this}resetDialing(e){this.dialing===e&&(this.dialing=void 0,this.currentDialAbortSignal=void 0)}async dial(e){WS(e),this.dialing&&this.currentDialAbortSignal&&(console.debug("Aborting previous dial attempt due to new dial call"),this.currentDialAbortSignal.abort=!0,this.dialing.catch(()=>{console.debug("Ignored abort error from previous dial")})),this.currentDialAbortSignal={abort:!1};const n=this.performDial(e,this.currentDialAbortSignal,e.reconnectAbortSignal??{abort:!1});this.dialing=n;try{const t=await n;return this.resetDialing(n),t}catch(t){if(this.resetDialing(n),t instanceof Error&&t.message===yn)return console.debug(yn),this;throw t}}createBackOffOpts({abort:e},{abort:n}){return{retry:(t,o)=>{if(e||n)throw new Error(yn);return console.debug(`Failed to connect, attempt ${o} with backoff`,t),this.currentRetryAttempt=o,this.closed?!1:ng(t)?!0:(console.debug("Non-retryable error encountered, stopping connection attempts",t),!1)}}}async tryWebRTCDial(e,n,t){try{return{dialer:await Rt(async()=>this.dialWebRTC(e,n),t)}}catch(o){ag(o);const i=o instanceof Error?o:new Error(String(o));return console.debug("Failed to connect via WebRTC",i),this.emit(K.DISCONNECTED,{error:i}),{dialer:this,error:i}}}async tryDirectDial(e,n,t){try{return{dialer:await Rt(async()=>this.dialDirect(e,n),t)}}catch(o){ag(o);const i=o instanceof Error?o:new Error(String(o));return console.debug("Failed to connect via gRPC",i),this.emit(K.DISCONNECTED,{error:i}),{dialer:this,error:i}}}async performDial(e,n,t){const o=this.createBackOffOpts(n,t??{abort:!1});e.reconnectMaxWait!==void 0&&(o.maxDelay=e.reconnectMaxWait),o.numOfAttempts=e.noReconnect?1:e.reconnectMaxAttempts,this.currentRetryAttempt=0;const i=[],r=YS(e),c=r?2:1,d=n.abort||t?.abort===!0;if(r&&!d){const{dialer:u,error:h}=await this.tryWebRTCDial(e,n,o);if(!h)return u;i.push(h)}if(this.currentRetryAttempt=0,!(n.abort||t?.abort===!0)){const{dialer:u,error:h}=await this.tryDirectDial(e,n,o);if(!h)return u;i.push(h)}if(i.length===c)throw new Error("Failed to connect via all methods",{cause:i});return this}async disconnect(){for(this.emit(K.DISCONNECTING,{}),this.currentDialAbortSignal&&this.dialing&&(this.currentDialAbortSignal.abort=!0,this.dialing.catch(()=>{console.debug("Ignored abort error from previous dial")}),this.resetDialing(this.dialing));this.connecting;)await this.connecting;this.cleanupEventListeners(),this.peerConn&&(this.peerConn.close(),this.peerConn=void 0),this.dataChannel&&(this.dataChannel.close(),this.dataChannel=void 0),this.sessionManager.reset(),this.closed=!0,this.emit(K.DISCONNECTED,{})}isConnected(){return this.peerConn?.iceConnectionState==="connected"}async connect({creds:e=this.savedCreds,priority:n,dialTimeout:t,dialTimeoutMs:o,extraHeaders:i}={}){if(this.isReconnecting||this.emit(K.CONNECTING,{}),this.closed=!1,this.connecting){for(;this.connecting!==void 0;)await this.connecting;return}this.connecting=new Promise(r=>{this.connectResolve=r}),this.peerConn&&(this.peerConn.close(),this.peerConn=void 0),this.dataChannel&&(this.dataChannel.close(),this.dataChannel=void 0),(!e||e!==this.savedCreds||this.sessionOptions.disabled)&&this.sessionManager.reset();try{const r=new Headers(Ln);if(i)for(const[l,u]of Object.entries(i))if(l==="viam_client"&&r.has("viam_client")){const I=r.get("viam_client").replace("typescript;",`typescript(${u});`);r.set("viam_client",I)}else r.set(l,u);const c={webrtcOptions:{disableTrickleICE:!1,rtcConfig:this.webrtcOptions.rtcConfig,forceRelay:this.webrtcOptions.forceRelay,forceP2P:this.webrtcOptions.forceP2P,turnUri:this.webrtcOptions.turnUri,turnScheme:this.webrtcOptions.turnScheme,turnTransport:this.webrtcOptions.turnTransport,turnPort:this.webrtcOptions.turnPort,signalingInsecure:this.webrtcOptions.signalingInsecure},dialTimeoutMs:o??t??Lt,extraHeaders:r};if(e&&(Gn(e)?c.credentials=e:c.accessToken=e.payload),n!==void 0&&c.webrtcOptions&&(c.webrtcOptions.additionalSdpFields={"x-priority":n}),this.savedCreds=e,this.webrtcOptions.enabled){c.webrtcOptions&&(c.webrtcOptions.signalingCredentials=c.credentials);const l=this.webrtcOptions.signalingAddress||this.serviceHost,u=await k_(l,this.webrtcOptions.host,c,this.serviceHost!==""&&l!==this.serviceHost);this.peerConn=u.peerConnection,this.dataChannel=u.dataChannel,this.cleanupEventListeners(),this.onICEConnectionStateChange=()=>{this.peerConn?.iceConnectionState==="closed"&&this.onDisconnect()},this.peerConn.addEventListener("iceconnectionstatechange",this.onICEConnectionStateChange),this.onDataChannelClose=h=>this.onDisconnect(h),this.dataChannel.addEventListener("close",this.onDataChannelClose),this.transport=u.transport,this.onTrack=h=>{const[I]=h.streams;if(!I)throw this.emit("track",h),new Error("expected event stream to exist");const R=I.id.replaceAll("+",":");Object.defineProperty(I,"id",{value:R}),this.emit("track",h)},this.peerConn.addEventListener("track",this.onTrack)}else this.transport=await Oa(this.serviceHost,c),await this.gRPCConnectionManager.start();const d=this.sessionOptions.disabled?this.transport:this.sessionManager.transport;this.robotServiceClient=X(oo,d),this.emit(K.CONNECTED,{})}catch(r){throw this.isReconnecting||this.emit(K.DISCONNECTED,{}),r}finally{this.connectResolve?.(),this.connectResolve=void 0,this.connecting=void 0}}async getSessions(){return(await this.robotService.getSessions({})).sessions}async getOperations(){return(await this.robotService.getOperations({})).operations}async cancelOperation(e){await this.robotService.cancelOperation({id:e})}async blockForOperation(e){await this.robotService.blockForOperation({id:e})}async stopAll(){await this.robotService.stopAll({})}async frameSystemConfig(e){return(await this.robotService.frameSystemConfig({supplementalTransforms:e})).frameSystemConfigs}async transformPose(e,n,t,o){const i=new Ks({source:e,destination:n,supplementalTransforms:t}),c=(await this.robotService.transformPose(i,o)).pose;if(!c)throw new Error("no pose");return c}async transformPCD(e,n,t){const o=new Xs({pointCloudPcd:e,source:n,destination:t});return(await this.robotService.transformPCD(o)).pointCloudPcd}async getModelsFromModules(){const e=new Qs({});return(await this.robotService.getModelsFromModules(e)).models}async getCloudMetadata(){return this.robotService.getCloudMetadata({})}async resourceNames(){return(await this.robotService.resourceNames({})).resources}async resourceRPCSubtypes(){return(await this.robotService.resourceRPCSubtypes({})).resourceRpcSubtypes}async getMachineStatus(){return this.robotService.getMachineStatus({})}async getVersion(){return this.robotService.getVersion({})}async restartModule(e,n){const t=new to;e!==void 0&&(t.idOrName.case="moduleId",t.idOrName.value=e),n!==void 0&&(t.idOrName.case="moduleName",t.idOrName.value=n),await this.robotService.restartModule(t)}async getPose(e,n,t){const o=new so({componentName:e,destinationFrame:n,supplementalTransforms:t}),r=(await this.robotService.getPose(o)).pose;if(!r)throw new Error("no pose");return r}}const tg=async a=>{const e=await new Ke().dial(a);if(e.isConnected())return e;throw new Error("Failed to connect to robot")},za=s.makeEnum("viam.app.packages.v1.PackageType",[{no:0,name:"PACKAGE_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"PACKAGE_TYPE_ARCHIVE",localName:"ARCHIVE"},{no:2,name:"PACKAGE_TYPE_ML_MODEL",localName:"ML_MODEL"},{no:3,name:"PACKAGE_TYPE_MODULE",localName:"MODULE"},{no:4,name:"PACKAGE_TYPE_SLAM_MAP",localName:"SLAM_MAP"},{no:5,name:"PACKAGE_TYPE_ML_TRAINING",localName:"ML_TRAINING"}]),Xe=s.makeEnum("viam.app.mltraining.v1.ModelType",[{no:0,name:"MODEL_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MODEL_TYPE_SINGLE_LABEL_CLASSIFICATION",localName:"SINGLE_LABEL_CLASSIFICATION"},{no:2,name:"MODEL_TYPE_MULTI_LABEL_CLASSIFICATION",localName:"MULTI_LABEL_CLASSIFICATION"},{no:3,name:"MODEL_TYPE_OBJECT_DETECTION",localName:"OBJECT_DETECTION"}]),on=s.makeEnum("viam.app.mltraining.v1.ModelFramework",[{no:0,name:"MODEL_FRAMEWORK_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MODEL_FRAMEWORK_TFLITE",localName:"TFLITE"},{no:2,name:"MODEL_FRAMEWORK_TENSORFLOW",localName:"TENSORFLOW"},{no:3,name:"MODEL_FRAMEWORK_PYTORCH",localName:"PYTORCH"},{no:4,name:"MODEL_FRAMEWORK_ONNX",localName:"ONNX"}]),Va=s.makeEnum("viam.app.mltraining.v1.TrainingStatus",[{no:0,name:"TRAINING_STATUS_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"TRAINING_STATUS_PENDING",localName:"PENDING"},{no:2,name:"TRAINING_STATUS_IN_PROGRESS",localName:"IN_PROGRESS"},{no:3,name:"TRAINING_STATUS_COMPLETED",localName:"COMPLETED"},{no:4,name:"TRAINING_STATUS_FAILED",localName:"FAILED"},{no:5,name:"TRAINING_STATUS_CANCELED",localName:"CANCELED"},{no:6,name:"TRAINING_STATUS_CANCELING",localName:"CANCELING"}]),sg=s.makeMessageType("viam.app.mltraining.v1.SubmitTrainingJobRequest",()=>[{no:7,name:"dataset_id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9},{no:3,name:"model_name",kind:"scalar",T:9},{no:4,name:"model_version",kind:"scalar",T:9},{no:5,name:"model_type",kind:"enum",T:s.getEnumType(Xe)},{no:8,name:"model_framework",kind:"enum",T:s.getEnumType(on)},{no:6,name:"tags",kind:"scalar",T:9,repeated:!0}]),og=s.makeMessageType("viam.app.mltraining.v1.SubmitTrainingJobResponse",()=>[{no:1,name:"id",kind:"scalar",T:9}]),ig=s.makeMessageType("viam.app.mltraining.v1.SubmitCustomTrainingJobRequest",()=>[{no:1,name:"dataset_id",kind:"scalar",T:9},{no:2,name:"registry_item_id",kind:"scalar",T:9},{no:6,name:"registry_item_version",kind:"scalar",T:9},{no:3,name:"organization_id",kind:"scalar",T:9},{no:4,name:"model_name",kind:"scalar",T:9},{no:5,name:"model_version",kind:"scalar",T:9},{no:7,name:"arguments",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:8,name:"container_version",kind:"scalar",T:9}]),rg=s.makeMessageType("viam.app.mltraining.v1.SubmitCustomTrainingJobResponse",()=>[{no:1,name:"id",kind:"scalar",T:9}]),mg=s.makeMessageType("viam.app.mltraining.v1.GetTrainingJobRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),cg=s.makeMessageType("viam.app.mltraining.v1.GetTrainingJobResponse",()=>[{no:1,name:"metadata",kind:"message",T:Ho}]),lg=s.makeMessageType("viam.app.mltraining.v1.ListTrainingJobsRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"status",kind:"enum",T:s.getEnumType(Va)}]),dg=s.makeMessageType("viam.app.mltraining.v1.ListTrainingJobsResponse",()=>[{no:1,name:"jobs",kind:"message",T:Ho,repeated:!0}]),Ho=s.makeMessageType("viam.app.mltraining.v1.TrainingJobMetadata",()=>[{no:7,name:"id",kind:"scalar",T:9},{no:11,name:"dataset_id",kind:"scalar",T:9},{no:12,name:"organization_id",kind:"scalar",T:9},{no:13,name:"model_name",kind:"scalar",T:9},{no:14,name:"model_version",kind:"scalar",T:9},{no:15,name:"model_type",kind:"enum",T:s.getEnumType(Xe)},{no:17,name:"model_framework",kind:"enum",T:s.getEnumType(on)},{no:18,name:"is_custom_job",kind:"scalar",T:8},{no:19,name:"registry_item_id",kind:"scalar",T:9},{no:20,name:"registry_item_version",kind:"scalar",T:9},{no:2,name:"status",kind:"enum",T:s.getEnumType(Va)},{no:8,name:"error_status",kind:"message",T:gn},{no:3,name:"created_on",kind:"message",T:S},{no:4,name:"last_modified",kind:"message",T:S},{no:9,name:"training_started",kind:"message",T:S},{no:10,name:"training_ended",kind:"message",T:S},{no:5,name:"synced_model_id",kind:"scalar",T:9},{no:16,name:"tags",kind:"scalar",T:9,repeated:!0},{no:21,name:"arguments",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:22,name:"container_version",kind:"scalar",T:9}]),pg=s.makeMessageType("viam.app.mltraining.v1.CancelTrainingJobRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),ug=s.makeMessageType("viam.app.mltraining.v1.CancelTrainingJobResponse",[]),gg=s.makeMessageType("viam.app.mltraining.v1.DeleteCompletedTrainingJobRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Tg=s.makeMessageType("viam.app.mltraining.v1.DeleteCompletedTrainingJobResponse",[]),kg=s.makeMessageType("viam.app.mltraining.v1.TrainingJobLogEntry",()=>[{no:1,name:"level",kind:"scalar",T:9},{no:2,name:"time",kind:"message",T:S},{no:3,name:"message",kind:"scalar",T:9}]),yg=s.makeMessageType("viam.app.mltraining.v1.GetTrainingJobLogsRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"page_token",kind:"scalar",T:9,opt:!0}]),vg=s.makeMessageType("viam.app.mltraining.v1.GetTrainingJobLogsResponse",()=>[{no:1,name:"logs",kind:"message",T:kg,repeated:!0},{no:2,name:"next_page_token",kind:"scalar",T:9}]),hg=s.makeMessageType("viam.app.mltraining.v1.ListSupportedContainersRequest",[]),fg=s.makeMessageType("viam.app.mltraining.v1.ListSupportedContainersResponse",()=>[{no:1,name:"container_map",kind:"map",K:9,V:{kind:"message",T:Rg}}]),Rg=s.makeMessageType("viam.app.mltraining.v1.Container",()=>[{no:1,name:"key",kind:"scalar",T:9},{no:2,name:"uri",kind:"scalar",T:9},{no:3,name:"framework",kind:"scalar",T:9},{no:4,name:"description",kind:"scalar",T:9},{no:5,name:"eol",kind:"message",T:S}]),HS=Object.freeze(Object.defineProperty({__proto__:null,CancelTrainingJobRequest:pg,CancelTrainingJobResponse:ug,Container:Rg,DeleteCompletedTrainingJobRequest:gg,DeleteCompletedTrainingJobResponse:Tg,GetTrainingJobLogsRequest:yg,GetTrainingJobLogsResponse:vg,GetTrainingJobRequest:mg,GetTrainingJobResponse:cg,ListSupportedContainersRequest:hg,ListSupportedContainersResponse:fg,ListTrainingJobsRequest:lg,ListTrainingJobsResponse:dg,ModelFramework:on,ModelType:Xe,SubmitCustomTrainingJobRequest:ig,SubmitCustomTrainingJobResponse:rg,SubmitTrainingJobRequest:sg,SubmitTrainingJobResponse:og,TrainingJobLogEntry:kg,TrainingJobMetadata:Ho,TrainingStatus:Va},Symbol.toStringTag,{value:"Module"})),$a=s.makeEnum("viam.app.v1.OnlineState",[{no:0,name:"ONLINE_STATE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"ONLINE_STATE_ONLINE",localName:"ONLINE"},{no:2,name:"ONLINE_STATE_OFFLINE",localName:"OFFLINE"},{no:3,name:"ONLINE_STATE_AWAITING_SETUP",localName:"AWAITING_SETUP"}]),_g=s.makeEnum("viam.app.v1.AuthenticationType",[{no:0,name:"AUTHENTICATION_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"AUTHENTICATION_TYPE_WEB_OAUTH",localName:"WEB_OAUTH"},{no:2,name:"AUTHENTICATION_TYPE_API_KEY",localName:"API_KEY"},{no:3,name:"AUTHENTICATION_TYPE_ROBOT_PART_SECRET",localName:"ROBOT_PART_SECRET"},{no:4,name:"AUTHENTICATION_TYPE_LOCATION_SECRET",localName:"LOCATION_SECRET"}]),Jn=s.makeEnum("viam.app.v1.FragmentVisibility",[{no:0,name:"FRAGMENT_VISIBILITY_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"FRAGMENT_VISIBILITY_PRIVATE",localName:"PRIVATE"},{no:2,name:"FRAGMENT_VISIBILITY_PUBLIC",localName:"PUBLIC"},{no:3,name:"FRAGMENT_VISIBILITY_PUBLIC_UNLISTED",localName:"PUBLIC_UNLISTED"}]),Sg=s.makeEnum("viam.app.v1.FragmentErrorType",[{no:0,name:"FRAGMENT_ERROR_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"FRAGMENT_ERROR_TYPE_NO_ACCESS",localName:"NO_ACCESS"},{no:2,name:"FRAGMENT_ERROR_TYPE_NESTING_LIMIT_EXCEEDED",localName:"NESTING_LIMIT_EXCEEDED"},{no:3,name:"FRAGMENT_ERROR_TYPE_CHILD_ID_INVALID",localName:"CHILD_ID_INVALID"},{no:4,name:"FRAGMENT_ERROR_TYPE_CYCLE_DETECTED",localName:"CYCLE_DETECTED"}]),Ya=s.makeEnum("viam.app.v1.ModuleSourceType",[{no:0,name:"MODULE_SOURCE_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MODULE_SOURCE_TYPE_EXTERNAL",localName:"EXTERNAL"},{no:2,name:"MODULE_SOURCE_TYPE_VIAM_HOSTED",localName:"VIAM_HOSTED"}]),Wa=s.makeEnum("viam.app.v1.ModuleLanguage",[{no:0,name:"MODULE_LANGUAGE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MODULE_LANGUAGE_GOLANG",localName:"GOLANG"},{no:2,name:"MODULE_LANGUAGE_PYTHON",localName:"PYTHON"},{no:3,name:"MODULE_LANGUAGE_CPP",localName:"CPP"}]),Ig=s.makeEnum("viam.app.v1.RegistryItemStatus",[{no:0,name:"REGISTRY_ITEM_STATUS_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"REGISTRY_ITEM_STATUS_PUBLISHED",localName:"PUBLISHED"},{no:2,name:"REGISTRY_ITEM_STATUS_IN_DEVELOPMENT",localName:"IN_DEVELOPMENT"}]),vn=s.makeEnum("viam.app.v1.Visibility",[{no:0,name:"VISIBILITY_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"VISIBILITY_PRIVATE",localName:"PRIVATE"},{no:2,name:"VISIBILITY_PUBLIC",localName:"PUBLIC"},{no:3,name:"VISIBILITY_PUBLIC_UNLISTED",localName:"PUBLIC_UNLISTED"}]),bg=s.makeEnum("viam.app.v1.AppType",[{no:0,name:"APP_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"APP_TYPE_SINGLE_MACHINE",localName:"SINGLE_MACHINE"},{no:2,name:"APP_TYPE_MULTI_MACHINE",localName:"MULTI_MACHINE"}]),Og=s.makeEnum("viam.app.v1.ClientAuthentication",[{no:0,name:"CLIENT_AUTHENTICATION_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"CLIENT_AUTHENTICATION_REQUIRED",localName:"REQUIRED"},{no:2,name:"CLIENT_AUTHENTICATION_NOT_REQUIRED",localName:"NOT_REQUIRED"},{no:3,name:"CLIENT_AUTHENTICATION_NOT_REQUIRED_WHEN_USING_PKCE",localName:"NOT_REQUIRED_WHEN_USING_PKCE"}]),Eg=s.makeEnum("viam.app.v1.PKCE",[{no:0,name:"PKCE_UNSPECIFIED"},{no:1,name:"PKCE_REQUIRED"},{no:2,name:"PKCE_NOT_REQUIRED"},{no:3,name:"PKCE_NOT_REQUIRED_WHEN_USING_CLIENT_AUTHENTICATION"}]),Mg=s.makeEnum("viam.app.v1.URLValidation",[{no:0,name:"URL_VALIDATION_UNSPECIFIED"},{no:1,name:"URL_VALIDATION_EXACT_MATCH"},{no:2,name:"URL_VALIDATION_ALLOW_WILDCARDS"}]),wg=s.makeEnum("viam.app.v1.EnabledGrant",[{no:0,name:"ENABLED_GRANT_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"ENABLED_GRANT_AUTHORIZATION_CODE",localName:"AUTHORIZATION_CODE"},{no:2,name:"ENABLED_GRANT_IMPLICIT",localName:"IMPLICIT"},{no:3,name:"ENABLED_GRANT_PASSWORD",localName:"PASSWORD"},{no:4,name:"ENABLED_GRANT_REFRESH_TOKEN",localName:"REFRESH_TOKEN"},{no:5,name:"ENABLED_GRANT_DEVICE_CODE",localName:"DEVICE_CODE"}]),hn=s.makeMessageType("viam.app.v1.Robot",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"location",kind:"scalar",T:9},{no:4,name:"last_access",kind:"message",T:S},{no:5,name:"created_on",kind:"message",T:S},{no:6,name:"online_state",kind:"enum",T:s.getEnumType($a)},{no:7,name:"seconds_since_online",kind:"scalar",T:3}]),rn=s.makeMessageType("viam.app.v1.RobotPart",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:10,name:"dns_name",kind:"scalar",T:9},{no:3,name:"secret",kind:"scalar",T:9},{no:4,name:"robot",kind:"scalar",T:9},{no:12,name:"location_id",kind:"scalar",T:9},{no:5,name:"robot_config",kind:"message",T:p},{no:6,name:"last_access",kind:"message",T:S},{no:7,name:"user_supplied_info",kind:"message",T:p},{no:8,name:"main_part",kind:"scalar",T:8},{no:9,name:"fqdn",kind:"scalar",T:9},{no:11,name:"local_fqdn",kind:"scalar",T:9},{no:13,name:"created_on",kind:"message",T:S},{no:14,name:"secrets",kind:"message",T:Qo,repeated:!0},{no:15,name:"last_updated",kind:"message",T:S},{no:16,name:"online_state",kind:"enum",T:s.getEnumType($a)},{no:17,name:"seconds_since_online",kind:"scalar",T:3},{no:18,name:"robot_config_json",kind:"scalar",T:9,opt:!0}]),Cg=s.makeMessageType("viam.app.v1.RobotPartHistoryEntry",()=>[{no:1,name:"part",kind:"scalar",T:9},{no:2,name:"robot",kind:"scalar",T:9},{no:3,name:"when",kind:"message",T:S},{no:4,name:"old",kind:"message",T:rn},{no:5,name:"edited_by",kind:"message",T:jo}]),jo=s.makeMessageType("viam.app.v1.AuthenticatorInfo",()=>[{no:1,name:"type",kind:"enum",T:s.getEnumType(_g)},{no:2,name:"value",kind:"scalar",T:9},{no:3,name:"is_deactivated",kind:"scalar",T:8}]),Ng=s.makeMessageType("viam.app.v1.ListOrganizationsRequest",[]),fn=s.makeMessageType("viam.app.v1.Organization",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"created_on",kind:"message",T:S},{no:4,name:"public_namespace",kind:"scalar",T:9},{no:5,name:"default_region",kind:"scalar",T:9},{no:6,name:"cid",kind:"scalar",T:9,opt:!0},{no:7,name:"default_fragments",kind:"message",T:Ko,opt:!0}]),Pg=s.makeMessageType("viam.app.v1.OrganizationMember",()=>[{no:1,name:"user_id",kind:"scalar",T:9},{no:2,name:"emails",kind:"scalar",T:9,repeated:!0},{no:3,name:"date_added",kind:"message",T:S},{no:4,name:"last_login",kind:"message",T:S,opt:!0},{no:5,name:"last_access",kind:"message",T:S,opt:!0}]),Dg=s.makeMessageType("viam.app.v1.ListOrganizationsResponse",()=>[{no:1,name:"organizations",kind:"message",T:fn,repeated:!0}]),zn=s.makeMessageType("viam.app.v1.OrganizationInvite",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"email",kind:"scalar",T:9},{no:3,name:"created_on",kind:"message",T:S},{no:4,name:"authorizations",kind:"message",T:ne,repeated:!0}]),Ag=s.makeMessageType("viam.app.v1.CreateOrganizationRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),Ug=s.makeMessageType("viam.app.v1.CreateOrganizationResponse",()=>[{no:1,name:"organization",kind:"message",T:fn}]),qg=s.makeMessageType("viam.app.v1.GetOrganizationRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),Lg=s.makeMessageType("viam.app.v1.GetOrganizationResponse",()=>[{no:1,name:"organization",kind:"message",T:fn}]),Gg=s.makeMessageType("viam.app.v1.GetOrganizationNamespaceAvailabilityRequest",()=>[{no:1,name:"public_namespace",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9}]),Bg=s.makeMessageType("viam.app.v1.GetOrganizationNamespaceAvailabilityResponse",()=>[{no:1,name:"available",kind:"scalar",T:8}]),Ko=s.makeMessageType("viam.app.v1.FragmentImportList",()=>[{no:1,name:"fragments",kind:"message",T:Mk,repeated:!0}]),Fg=s.makeMessageType("viam.app.v1.UpdateOrganizationRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9,opt:!0},{no:3,name:"public_namespace",kind:"scalar",T:9,opt:!0},{no:4,name:"region",kind:"scalar",T:9,opt:!0},{no:5,name:"cid",kind:"scalar",T:9,opt:!0},{no:6,name:"default_fragments",kind:"message",T:Ko,opt:!0}]),xg=s.makeMessageType("viam.app.v1.UpdateOrganizationResponse",()=>[{no:1,name:"organization",kind:"message",T:fn}]),Jg=s.makeMessageType("viam.app.v1.UpdateOrganizationNamespaceRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"new_public_namespace",kind:"scalar",T:9}]),zg=s.makeMessageType("viam.app.v1.UpdateOrganizationNamespaceResponse",()=>[{no:1,name:"organization",kind:"message",T:fn}]),Vg=s.makeMessageType("viam.app.v1.DeleteOrganizationRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),$g=s.makeMessageType("viam.app.v1.DeleteOrganizationResponse",[]),Yg=s.makeMessageType("viam.app.v1.GetOrganizationMetadataRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),Wg=s.makeMessageType("viam.app.v1.GetOrganizationMetadataResponse",()=>[{no:1,name:"data",kind:"message",T:p}]),Hg=s.makeMessageType("viam.app.v1.UpdateOrganizationMetadataRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"data",kind:"message",T:p}]),jg=s.makeMessageType("viam.app.v1.UpdateOrganizationMetadataResponse",[]),Kg=s.makeMessageType("viam.app.v1.ListOrganizationMembersRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),Xg=s.makeMessageType("viam.app.v1.ListOrganizationMembersResponse",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"members",kind:"message",T:Pg,repeated:!0},{no:3,name:"invites",kind:"message",T:zn,repeated:!0}]),Qg=s.makeMessageType("viam.app.v1.CreateOrganizationInviteRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"email",kind:"scalar",T:9},{no:3,name:"authorizations",kind:"message",T:ne,repeated:!0},{no:4,name:"send_email_invite",kind:"scalar",T:8,opt:!0}]),Zg=s.makeMessageType("viam.app.v1.CreateOrganizationInviteResponse",()=>[{no:1,name:"invite",kind:"message",T:zn}]),eT=s.makeMessageType("viam.app.v1.UpdateOrganizationInviteAuthorizationsRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"email",kind:"scalar",T:9},{no:3,name:"add_authorizations",kind:"message",T:ne,repeated:!0},{no:4,name:"remove_authorizations",kind:"message",T:ne,repeated:!0}]),nT=s.makeMessageType("viam.app.v1.UpdateOrganizationInviteAuthorizationsResponse",()=>[{no:1,name:"invite",kind:"message",T:zn}]),aT=s.makeMessageType("viam.app.v1.DeleteOrganizationInviteRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"email",kind:"scalar",T:9}]),tT=s.makeMessageType("viam.app.v1.DeleteOrganizationInviteResponse",[]),sT=s.makeMessageType("viam.app.v1.ResendOrganizationInviteRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"email",kind:"scalar",T:9},{no:3,name:"send_email_invite",kind:"scalar",T:8,opt:!0}]),oT=s.makeMessageType("viam.app.v1.ResendOrganizationInviteResponse",()=>[{no:1,name:"invite",kind:"message",T:zn}]),iT=s.makeMessageType("viam.app.v1.DeleteOrganizationMemberRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"user_id",kind:"scalar",T:9}]),rT=s.makeMessageType("viam.app.v1.DeleteOrganizationMemberResponse",[]),Ha=s.makeMessageType("viam.app.v1.BillingAddress",()=>[{no:1,name:"address_line_1",kind:"scalar",T:9},{no:2,name:"address_line_2",kind:"scalar",T:9,opt:!0},{no:3,name:"city",kind:"scalar",T:9},{no:4,name:"state",kind:"scalar",T:9},{no:5,name:"zipcode",kind:"scalar",T:9},{no:6,name:"country",kind:"scalar",T:9}]),mT=s.makeMessageType("viam.app.v1.EnableBillingServiceRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"billing_address",kind:"message",T:Ha}]),cT=s.makeMessageType("viam.app.v1.EnableBillingServiceResponse",[]),lT=s.makeMessageType("viam.app.v1.UpdateBillingServiceRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"billing_address",kind:"message",T:Ha}]),dT=s.makeMessageType("viam.app.v1.UpdateBillingServiceResponse",[]),pT=s.makeMessageType("viam.app.v1.GetBillingServiceConfigRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),uT=s.makeMessageType("viam.app.v1.GetBillingServiceConfigResponse",()=>[{no:1,name:"billing_address",kind:"message",T:Ha},{no:2,name:"support_email",kind:"scalar",T:9},{no:3,name:"logo_url",kind:"scalar",T:9},{no:4,name:"billing_dashboard_url",kind:"scalar",T:9}]),gT=s.makeMessageType("viam.app.v1.DisableBillingServiceRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),TT=s.makeMessageType("viam.app.v1.DisableBillingServiceResponse",[]),kT=s.makeMessageType("viam.app.v1.OrganizationSetSupportEmailRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"email",kind:"scalar",T:9}]),yT=s.makeMessageType("viam.app.v1.OrganizationSetSupportEmailResponse",[]),vT=s.makeMessageType("viam.app.v1.OrganizationGetSupportEmailRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),hT=s.makeMessageType("viam.app.v1.OrganizationGetSupportEmailResponse",()=>[{no:1,name:"email",kind:"scalar",T:9}]),Xo=s.makeMessageType("viam.app.v1.OrganizationIdentity",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),fT=s.makeMessageType("viam.app.v1.LocationOrganization",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"primary",kind:"scalar",T:8}]),ja=s.makeMessageType("viam.app.v1.LocationAuth",()=>[{no:1,name:"secret",kind:"scalar",T:9},{no:2,name:"location_id",kind:"scalar",T:9},{no:3,name:"secrets",kind:"message",T:Qo,repeated:!0}]),RT=s.makeMessageType("viam.app.v1.StorageConfig",()=>[{no:1,name:"region",kind:"scalar",T:9}]),Vn=s.makeMessageType("viam.app.v1.Location",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:4,name:"parent_location_id",kind:"scalar",T:9},{no:5,name:"auth",kind:"message",T:ja},{no:6,name:"organizations",kind:"message",T:fT,repeated:!0},{no:3,name:"created_on",kind:"message",T:S},{no:7,name:"robot_count",kind:"scalar",T:5},{no:8,name:"config",kind:"message",T:RT},{no:9,name:"primary_org_identity",kind:"message",T:Xo,opt:!0}]),Qo=s.makeMessageType("viam.app.v1.SharedSecret",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"secret",kind:"scalar",T:9},{no:3,name:"created_on",kind:"message",T:S},{no:4,name:"state",kind:"enum",T:s.getEnumType(_T)}]),_T=s.makeEnum("viam.app.v1.SharedSecret.State",[{no:0,name:"STATE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"STATE_ENABLED",localName:"ENABLED"},{no:2,name:"STATE_DISABLED",localName:"DISABLED"}]),ST=s.makeMessageType("viam.app.v1.CreateLocationRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"parent_location_id",kind:"scalar",T:9,opt:!0}]),IT=s.makeMessageType("viam.app.v1.CreateLocationResponse",()=>[{no:1,name:"location",kind:"message",T:Vn}]),bT=s.makeMessageType("viam.app.v1.GetLocationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),OT=s.makeMessageType("viam.app.v1.GetLocationResponse",()=>[{no:1,name:"location",kind:"message",T:Vn}]),ET=s.makeMessageType("viam.app.v1.UpdateLocationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9,opt:!0},{no:3,name:"parent_location_id",kind:"scalar",T:9,opt:!0},{no:4,name:"region",kind:"scalar",T:9,opt:!0}]),MT=s.makeMessageType("viam.app.v1.UpdateLocationResponse",()=>[{no:1,name:"location",kind:"message",T:Vn}]),wT=s.makeMessageType("viam.app.v1.DeleteLocationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),CT=s.makeMessageType("viam.app.v1.DeleteLocationResponse",[]),NT=s.makeMessageType("viam.app.v1.GetLocationMetadataRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),PT=s.makeMessageType("viam.app.v1.GetLocationMetadataResponse",()=>[{no:1,name:"data",kind:"message",T:p}]),DT=s.makeMessageType("viam.app.v1.UpdateLocationMetadataRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9},{no:2,name:"data",kind:"message",T:p}]),AT=s.makeMessageType("viam.app.v1.UpdateLocationMetadataResponse",[]),UT=s.makeMessageType("viam.app.v1.GetOrganizationsWithAccessToLocationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),qT=s.makeMessageType("viam.app.v1.GetOrganizationsWithAccessToLocationResponse",()=>[{no:1,name:"organization_identities",kind:"message",T:Xo,repeated:!0}]),LT=s.makeMessageType("viam.app.v1.ListLocationsRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),GT=s.makeMessageType("viam.app.v1.ShareLocationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9}]),BT=s.makeMessageType("viam.app.v1.ShareLocationResponse",[]),FT=s.makeMessageType("viam.app.v1.UnshareLocationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9}]),xT=s.makeMessageType("viam.app.v1.UnshareLocationResponse",[]),JT=s.makeMessageType("viam.app.v1.ListLocationsResponse",()=>[{no:1,name:"locations",kind:"message",T:Vn,repeated:!0}]),zT=s.makeMessageType("viam.app.v1.CreateLocationSecretRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),VT=s.makeMessageType("viam.app.v1.CreateLocationSecretResponse",()=>[{no:1,name:"auth",kind:"message",T:ja}]),$T=s.makeMessageType("viam.app.v1.DeleteLocationSecretRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9},{no:2,name:"secret_id",kind:"scalar",T:9}]),YT=s.makeMessageType("viam.app.v1.DeleteLocationSecretResponse",[]),WT=s.makeMessageType("viam.app.v1.LocationAuthRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),HT=s.makeMessageType("viam.app.v1.LocationAuthResponse",()=>[{no:1,name:"auth",kind:"message",T:ja}]),jT=s.makeMessageType("viam.app.v1.GetRobotRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),KT=s.makeMessageType("viam.app.v1.GetRoverRentalRobotsRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),XT=s.makeMessageType("viam.app.v1.RoverRentalRobot",()=>[{no:1,name:"robot_id",kind:"scalar",T:9},{no:2,name:"location_id",kind:"scalar",T:9},{no:3,name:"robot_name",kind:"scalar",T:9},{no:4,name:"robot_main_part_id",kind:"scalar",T:9}]),QT=s.makeMessageType("viam.app.v1.GetRoverRentalRobotsResponse",()=>[{no:1,name:"robots",kind:"message",T:XT,repeated:!0}]),ZT=s.makeMessageType("viam.app.v1.GetRobotResponse",()=>[{no:1,name:"robot",kind:"message",T:hn}]),ek=s.makeMessageType("viam.app.v1.GetRobotPartsRequest",()=>[{no:1,name:"robot_id",kind:"scalar",T:9}]),nk=s.makeMessageType("viam.app.v1.GetRobotPartsResponse",()=>[{no:1,name:"parts",kind:"message",T:rn,repeated:!0}]),ak=s.makeMessageType("viam.app.v1.GetRobotPartRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),tk=s.makeMessageType("viam.app.v1.GetRobotPartResponse",()=>[{no:1,name:"part",kind:"message",T:rn},{no:2,name:"config_json",kind:"scalar",T:9}]),sk=s.makeMessageType("viam.app.v1.GetRobotPartByNameAndLocationRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"location_id",kind:"scalar",T:9}]),ok=s.makeMessageType("viam.app.v1.GetRobotPartByNameAndLocationResponse",()=>[{no:1,name:"part",kind:"message",T:rn}]),ik=s.makeMessageType("viam.app.v1.GetRobotPartLogsRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"errors_only",kind:"scalar",T:8},{no:3,name:"filter",kind:"scalar",T:9,opt:!0},{no:4,name:"page_token",kind:"scalar",T:9,opt:!0},{no:5,name:"levels",kind:"scalar",T:9,repeated:!0},{no:6,name:"start",kind:"message",T:S,opt:!0},{no:7,name:"end",kind:"message",T:S,opt:!0},{no:8,name:"limit",kind:"scalar",T:3,opt:!0},{no:9,name:"source",kind:"scalar",T:9,opt:!0},{no:10,name:"user_facing_only",kind:"scalar",T:8,opt:!0}]),rk=s.makeMessageType("viam.app.v1.GetRobotPartLogsResponse",()=>[{no:1,name:"logs",kind:"message",T:Un,repeated:!0},{no:2,name:"next_page_token",kind:"scalar",T:9}]),mk=s.makeMessageType("viam.app.v1.TailRobotPartLogsRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"errors_only",kind:"scalar",T:8},{no:3,name:"filter",kind:"scalar",T:9,opt:!0}]),ck=s.makeMessageType("viam.app.v1.TailRobotPartLogsResponse",()=>[{no:1,name:"logs",kind:"message",T:Un,repeated:!0}]),lk=s.makeMessageType("viam.app.v1.GetRobotPartHistoryRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"page_token",kind:"scalar",T:9,opt:!0},{no:3,name:"page_limit",kind:"scalar",T:3,opt:!0},{no:4,name:"start",kind:"message",T:S,opt:!0},{no:5,name:"end",kind:"message",T:S,opt:!0}]),dk=s.makeMessageType("viam.app.v1.GetRobotPartHistoryResponse",()=>[{no:1,name:"history",kind:"message",T:Cg,repeated:!0},{no:2,name:"next_page_token",kind:"scalar",T:9}]),pk=s.makeMessageType("viam.app.v1.UpdateRobotPartRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"robot_config",kind:"message",T:p},{no:4,name:"last_known_update",kind:"message",T:S,opt:!0},{no:5,name:"robot_config_json",kind:"scalar",T:9,opt:!0}]),uk=s.makeMessageType("viam.app.v1.UpdateRobotPartResponse",()=>[{no:1,name:"part",kind:"message",T:rn}]),gk=s.makeMessageType("viam.app.v1.NewRobotPartRequest",()=>[{no:1,name:"robot_id",kind:"scalar",T:9},{no:2,name:"part_name",kind:"scalar",T:9}]),Tk=s.makeMessageType("viam.app.v1.NewRobotPartResponse",()=>[{no:1,name:"part_id",kind:"scalar",T:9}]),kk=s.makeMessageType("viam.app.v1.DeleteRobotPartRequest",()=>[{no:1,name:"part_id",kind:"scalar",T:9}]),yk=s.makeMessageType("viam.app.v1.GetRobotPartMetadataRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),vk=s.makeMessageType("viam.app.v1.GetRobotPartMetadataResponse",()=>[{no:1,name:"data",kind:"message",T:p}]),hk=s.makeMessageType("viam.app.v1.UpdateRobotPartMetadataRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"data",kind:"message",T:p}]),fk=s.makeMessageType("viam.app.v1.UpdateRobotPartMetadataResponse",[]),Rk=s.makeMessageType("viam.app.v1.GetRobotAPIKeysRequest",()=>[{no:1,name:"robot_id",kind:"scalar",T:9}]),_k=s.makeMessageType("viam.app.v1.APIKey",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"key",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"created_on",kind:"message",T:S}]),Sk=s.makeMessageType("viam.app.v1.GetRobotAPIKeysResponse",()=>[{no:1,name:"api_keys",kind:"message",T:ii,repeated:!0}]),Ik=s.makeMessageType("viam.app.v1.DeleteRobotPartResponse",[]),Qe=s.makeMessageType("viam.app.v1.Fragment",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"fragment",kind:"message",T:p},{no:4,name:"organization_owner",kind:"scalar",T:9},{no:5,name:"public",kind:"scalar",T:8},{no:6,name:"created_on",kind:"message",T:S},{no:7,name:"organization_name",kind:"scalar",T:9},{no:9,name:"robot_part_count",kind:"scalar",T:5},{no:10,name:"organization_count",kind:"scalar",T:5},{no:11,name:"only_used_by_owner",kind:"scalar",T:8},{no:12,name:"visibility",kind:"enum",T:s.getEnumType(Jn)},{no:13,name:"last_updated",kind:"message",T:S},{no:14,name:"revision",kind:"scalar",T:9}]),bk=s.makeMessageType("viam.app.v1.FragmentHistoryEntry",()=>[{no:1,name:"fragment",kind:"scalar",T:9},{no:2,name:"edited_on",kind:"message",T:S},{no:3,name:"old",kind:"message",T:Qe},{no:4,name:"edited_by",kind:"message",T:jo},{no:5,name:"revision",kind:"scalar",T:9},{no:6,name:"config",kind:"message",T:p}]),Ok=s.makeMessageType("viam.app.v1.FragmentRevision",()=>[{no:1,name:"revision",kind:"scalar",T:9},{no:2,name:"created_at",kind:"message",T:S}]),Ka=s.makeMessageType("viam.app.v1.FragmentTag",()=>[{no:1,name:"tag",kind:"scalar",T:9},{no:2,name:"revision",kind:"scalar",T:9}]),Ek=s.makeMessageType("viam.app.v1.FragmentError",()=>[{no:1,name:"error_type",kind:"enum",T:s.getEnumType(Sg)},{no:2,name:"fragment_id",kind:"scalar",T:9},{no:3,name:"detail",kind:"scalar",T:9}]),Xa=s.makeMessageType("viam.app.v1.FragmentUsage",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9},{no:2,name:"organizations",kind:"scalar",T:5},{no:3,name:"machines",kind:"scalar",T:5},{no:4,name:"machines_in_current_org",kind:"scalar",T:5},{no:5,name:"version",kind:"scalar",T:9,opt:!0}]),Mk=s.makeMessageType("viam.app.v1.FragmentImport",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"prefix",kind:"scalar",T:9,opt:!0},{no:4,name:"variables",kind:"map",K:9,V:{kind:"scalar",T:9}}]),Zo=s.makeMessageType("viam.app.v1.ResolvedFragment",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9},{no:2,name:"resolved_config",kind:"message",T:p},{no:3,name:"error",kind:"message",T:Ek},{no:4,name:"revision",kind:"scalar",T:9}]),wk=s.makeMessageType("viam.app.v1.ListFragmentsRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"show_public",kind:"scalar",T:8},{no:3,name:"fragment_visibility",kind:"enum",T:s.getEnumType(Jn),repeated:!0}]),Ck=s.makeMessageType("viam.app.v1.ListFragmentsResponse",()=>[{no:1,name:"fragments",kind:"message",T:Qe,repeated:!0},{no:2,name:"fragment_usages",kind:"message",T:Xa,repeated:!0}]),Nk=s.makeMessageType("viam.app.v1.GetFragmentRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"current_organization_id",kind:"scalar",T:9},{no:3,name:"version",kind:"scalar",T:9,opt:!0}]),Pk=s.makeMessageType("viam.app.v1.GetFragmentResponse",()=>[{no:1,name:"fragment",kind:"message",T:Qe},{no:2,name:"fragment_usage",kind:"message",T:Xa},{no:3,name:"revisions",kind:"message",T:Ok,repeated:!0},{no:4,name:"tags",kind:"message",T:Ka,repeated:!0}]),Dk=s.makeMessageType("viam.app.v1.CreateFragmentRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"config",kind:"message",T:p},{no:3,name:"organization_id",kind:"scalar",T:9},{no:4,name:"visibility",kind:"enum",T:s.getEnumType(Jn),opt:!0}]),Ak=s.makeMessageType("viam.app.v1.CreateFragmentResponse",()=>[{no:1,name:"fragment",kind:"message",T:Qe}]),Uk=s.makeMessageType("viam.app.v1.UpdateFragmentRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"config",kind:"message",T:p},{no:4,name:"public",kind:"scalar",T:8,opt:!0},{no:5,name:"visibility",kind:"enum",T:s.getEnumType(Jn),opt:!0},{no:6,name:"last_known_update",kind:"message",T:S,opt:!0}]),qk=s.makeMessageType("viam.app.v1.UpdateFragmentResponse",()=>[{no:1,name:"fragment",kind:"message",T:Qe}]),Lk=s.makeMessageType("viam.app.v1.DeleteFragmentRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Gk=s.makeMessageType("viam.app.v1.DeleteFragmentResponse",[]),Bk=s.makeMessageType("viam.app.v1.GetFragmentHistoryRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"page_token",kind:"scalar",T:9,opt:!0},{no:3,name:"page_limit",kind:"scalar",T:3,opt:!0}]),Fk=s.makeMessageType("viam.app.v1.GetFragmentHistoryResponse",()=>[{no:1,name:"history",kind:"message",T:bk,repeated:!0},{no:2,name:"next_page_token",kind:"scalar",T:9}]),xk=s.makeMessageType("viam.app.v1.GetFragmentUsageRequest",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9}]),Jk=s.makeMessageType("viam.app.v1.GetFragmentUsageResponse",()=>[{no:1,name:"version_usages",kind:"message",T:Xa,repeated:!0}]),zk=s.makeMessageType("viam.app.v1.SetFragmentTagRequest",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9},{no:2,name:"tag",kind:"scalar",T:9},{no:3,name:"revision",kind:"scalar",T:9}]),Vk=s.makeMessageType("viam.app.v1.SetFragmentTagResponse",()=>[{no:1,name:"tags",kind:"message",T:Ka,repeated:!0}]),$k=s.makeMessageType("viam.app.v1.DeleteFragmentTagRequest",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9},{no:2,name:"tag",kind:"scalar",T:9}]),Yk=s.makeMessageType("viam.app.v1.DeleteFragmentTagResponse",()=>[{no:1,name:"tags",kind:"message",T:Ka,repeated:!0}]),Wk=s.makeMessageType("viam.app.v1.ListRobotsRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),Hk=s.makeMessageType("viam.app.v1.ListRobotsForLocationsRequest",()=>[{no:1,name:"location_ids",kind:"scalar",T:9,repeated:!0}]),jk=s.makeMessageType("viam.app.v1.ListRobotsForOrgRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),ei=s.makeMessageType("viam.app.v1.AdditionalFragment",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9,opt:!0}]),Kk=s.makeMessageType("viam.app.v1.ListNestedFragmentsRequest",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9,opt:!0},{no:2,name:"additional_fragments",kind:"message",T:ei,repeated:!0}]),Xk=s.makeMessageType("viam.app.v1.ListNestedFragmentsResponse",()=>[{no:1,name:"fragments",kind:"message",T:Qe,repeated:!0},{no:2,name:"resolved_fragments",kind:"message",T:Zo,repeated:!0}]),Qk=s.makeMessageType("viam.app.v1.ListMachineFragmentsRequest",()=>[{no:1,name:"machine_id",kind:"scalar",T:9},{no:2,name:"additional_fragment_ids",kind:"scalar",T:9,repeated:!0},{no:3,name:"additional_fragments",kind:"message",T:ei,repeated:!0}]),Zk=s.makeMessageType("viam.app.v1.ListMachineFragmentsResponse",()=>[{no:1,name:"fragments",kind:"message",T:Qe,repeated:!0},{no:2,name:"resolved_fragments",kind:"message",T:Zo,repeated:!0}]),ni=s.makeMessageType("viam.app.v1.ListMachineSummariesRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"fragment_ids",kind:"scalar",T:9,repeated:!0},{no:3,name:"location_ids",kind:"scalar",T:9,repeated:!0},{no:4,name:"limit",kind:"scalar",T:5,opt:!0}]),ey=s.makeMessageType("viam.app.v1.ListMachineSummariesResponse",()=>[{no:1,name:"location_summaries",kind:"message",T:ny,repeated:!0}]),ny=s.makeMessageType("viam.app.v1.LocationSummary",()=>[{no:1,name:"location_id",kind:"scalar",T:9},{no:2,name:"location_name",kind:"scalar",T:9},{no:3,name:"machine_summaries",kind:"message",T:ay,repeated:!0}]),ay=s.makeMessageType("viam.app.v1.MachineSummary",()=>[{no:1,name:"machine_id",kind:"scalar",T:9},{no:2,name:"machine_name",kind:"scalar",T:9},{no:3,name:"part_summaries",kind:"message",T:iy,repeated:!0}]),ty=s.makeMessageType("viam.app.v1.FragmentSummary",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9}]),sy=s.makeMessageType("viam.app.v1.ViamServerVersion",()=>[{no:1,name:"major",kind:"scalar",T:9,oneof:"version"},{no:2,name:"minor",kind:"scalar",T:9,oneof:"version"}]),oy=s.makeMessageType("viam.app.v1.ViamAgentVersion",()=>[{no:1,name:"major",kind:"scalar",T:9,oneof:"version"},{no:2,name:"minor",kind:"scalar",T:9,oneof:"version"}]),iy=s.makeMessageType("viam.app.v1.PartSummary",()=>[{no:1,name:"part_id",kind:"scalar",T:9},{no:2,name:"part_name",kind:"scalar",T:9},{no:11,name:"is_main_part",kind:"scalar",T:8},{no:12,name:"online_state",kind:"enum",T:s.getEnumType($a)},{no:13,name:"seconds_since_online",kind:"scalar",T:3},{no:14,name:"last_access",kind:"message",T:S,opt:!0},{no:3,name:"last_online",kind:"message",T:S,opt:!0},{no:4,name:"viam_server_version",kind:"message",T:sy,opt:!0},{no:5,name:"viam_agent_version",kind:"message",T:oy,opt:!0},{no:6,name:"os",kind:"scalar",T:9,opt:!0},{no:7,name:"platform",kind:"scalar",T:9,opt:!0},{no:8,name:"public_ip_address",kind:"scalar",T:9,opt:!0},{no:10,name:"dns_name",kind:"scalar",T:9,opt:!0},{no:9,name:"fragments",kind:"message",T:ty,repeated:!0}]),ry=s.makeMessageType("viam.app.v1.ListRobotsResponse",()=>[{no:1,name:"robots",kind:"message",T:hn,repeated:!0}]),my=s.makeMessageType("viam.app.v1.ListRobotsForLocationsResponse",()=>[{no:1,name:"robots",kind:"message",T:hn,repeated:!0}]),cy=s.makeMessageType("viam.app.v1.ListRobotsForOrgResponse",()=>[{no:1,name:"robots",kind:"message",T:hn,repeated:!0}]),ly=s.makeMessageType("viam.app.v1.NewRobotRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"location",kind:"scalar",T:9}]),dy=s.makeMessageType("viam.app.v1.NewRobotResponse",()=>[{no:1,name:"id",kind:"scalar",T:9}]),py=s.makeMessageType("viam.app.v1.UpdateRobotRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"location",kind:"scalar",T:9}]),uy=s.makeMessageType("viam.app.v1.UpdateRobotResponse",()=>[{no:1,name:"robot",kind:"message",T:hn}]),gy=s.makeMessageType("viam.app.v1.DeleteRobotRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Ty=s.makeMessageType("viam.app.v1.DeleteRobotResponse",[]),ky=s.makeMessageType("viam.app.v1.GetRobotMetadataRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),yy=s.makeMessageType("viam.app.v1.GetRobotMetadataResponse",()=>[{no:1,name:"data",kind:"message",T:p}]),vy=s.makeMessageType("viam.app.v1.UpdateRobotMetadataRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"data",kind:"message",T:p}]),hy=s.makeMessageType("viam.app.v1.UpdateRobotMetadataResponse",[]),fy=s.makeMessageType("viam.app.v1.MarkPartAsMainRequest",()=>[{no:1,name:"part_id",kind:"scalar",T:9}]),Ry=s.makeMessageType("viam.app.v1.MarkPartAsMainResponse",[]),_y=s.makeMessageType("viam.app.v1.MarkPartForRestartRequest",()=>[{no:1,name:"part_id",kind:"scalar",T:9}]),Sy=s.makeMessageType("viam.app.v1.MarkPartForRestartResponse",[]),Iy=s.makeMessageType("viam.app.v1.CreateRobotPartSecretRequest",()=>[{no:1,name:"part_id",kind:"scalar",T:9}]),by=s.makeMessageType("viam.app.v1.CreateRobotPartSecretResponse",()=>[{no:1,name:"part",kind:"message",T:rn}]),Oy=s.makeMessageType("viam.app.v1.DeleteRobotPartSecretRequest",()=>[{no:1,name:"part_id",kind:"scalar",T:9},{no:2,name:"secret_id",kind:"scalar",T:9}]),Ey=s.makeMessageType("viam.app.v1.DeleteRobotPartSecretResponse",[]),ne=s.makeMessageType("viam.app.v1.Authorization",()=>[{no:1,name:"authorization_type",kind:"scalar",T:9},{no:2,name:"authorization_id",kind:"scalar",T:9},{no:3,name:"resource_type",kind:"scalar",T:9},{no:4,name:"resource_id",kind:"scalar",T:9},{no:5,name:"identity_id",kind:"scalar",T:9},{no:6,name:"organization_id",kind:"scalar",T:9},{no:7,name:"identity_type",kind:"scalar",T:9}]),My=s.makeMessageType("viam.app.v1.AddRoleRequest",()=>[{no:1,name:"authorization",kind:"message",T:ne}]),wy=s.makeMessageType("viam.app.v1.AddRoleResponse",[]),Cy=s.makeMessageType("viam.app.v1.RemoveRoleRequest",()=>[{no:1,name:"authorization",kind:"message",T:ne}]),Ny=s.makeMessageType("viam.app.v1.RemoveRoleResponse",[]),Py=s.makeMessageType("viam.app.v1.ChangeRoleRequest",()=>[{no:1,name:"old_authorization",kind:"message",T:ne},{no:2,name:"new_authorization",kind:"message",T:ne}]),Dy=s.makeMessageType("viam.app.v1.ChangeRoleResponse",[]),Ay=s.makeMessageType("viam.app.v1.ListAuthorizationsRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"resource_ids",kind:"scalar",T:9,repeated:!0}]),Uy=s.makeMessageType("viam.app.v1.ListAuthorizationsResponse",()=>[{no:1,name:"authorizations",kind:"message",T:ne,repeated:!0}]),qy=s.makeMessageType("viam.app.v1.CheckPermissionsRequest",()=>[{no:1,name:"permissions",kind:"message",T:ai,repeated:!0}]),ai=s.makeMessageType("viam.app.v1.AuthorizedPermissions",()=>[{no:1,name:"resource_type",kind:"scalar",T:9},{no:2,name:"resource_id",kind:"scalar",T:9},{no:3,name:"permissions",kind:"scalar",T:9,repeated:!0}]),Ly=s.makeMessageType("viam.app.v1.CheckPermissionsResponse",()=>[{no:1,name:"authorized_permissions",kind:"message",T:ai,repeated:!0}]),Gy=s.makeMessageType("viam.app.v1.ModuleVersion",()=>[{no:1,name:"version",kind:"scalar",T:9},{no:2,name:"files",kind:"message",T:si,repeated:!0},{no:3,name:"models",kind:"message",T:cn,repeated:!0},{no:4,name:"entrypoint",kind:"scalar",T:9},{no:5,name:"first_run",kind:"scalar",T:9,opt:!0},{no:6,name:"markdown_description",kind:"scalar",T:9,opt:!0},{no:7,name:"apps",kind:"message",T:mn,repeated:!0}]),By=s.makeMessageType("viam.app.v1.ModuleMetadata",()=>[{no:1,name:"models",kind:"message",T:cn,repeated:!0},{no:2,name:"versions",kind:"message",T:Gy,repeated:!0},{no:3,name:"entrypoint",kind:"scalar",T:9},{no:4,name:"first_run",kind:"scalar",T:9,opt:!0},{no:5,name:"markdown_description",kind:"scalar",T:9,opt:!0},{no:6,name:"apps",kind:"message",T:mn,repeated:!0},{no:7,name:"source_type",kind:"enum",T:s.getEnumType(Ya),opt:!0},{no:8,name:"language",kind:"enum",T:s.getEnumType(Wa),opt:!0}]),Fy=s.makeMessageType("viam.app.v1.MLModelVersion",()=>[{no:1,name:"version",kind:"scalar",T:9},{no:2,name:"created_on",kind:"message",T:S}]),xy=s.makeMessageType("viam.app.v1.MLModelMetadata",()=>[{no:1,name:"versions",kind:"scalar",T:9,repeated:!0},{no:2,name:"model_type",kind:"enum",T:s.getEnumType(Xe)},{no:3,name:"model_framework",kind:"enum",T:s.getEnumType(on)},{no:4,name:"detailed_versions",kind:"message",T:Fy,repeated:!0}]),Jy=s.makeMessageType("viam.app.v1.MLTrainingVersion",()=>[{no:1,name:"version",kind:"scalar",T:9},{no:2,name:"created_on",kind:"message",T:S}]),zy=s.makeMessageType("viam.app.v1.MLTrainingMetadata",()=>[{no:5,name:"versions",kind:"message",T:Jy,repeated:!0},{no:2,name:"model_type",kind:"enum",T:s.getEnumType(Xe)},{no:3,name:"model_framework",kind:"enum",T:s.getEnumType(on)},{no:4,name:"draft",kind:"scalar",T:8}]),Qa=s.makeMessageType("viam.app.v1.RegistryItem",()=>[{no:1,name:"item_id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9},{no:3,name:"public_namespace",kind:"scalar",T:9},{no:4,name:"name",kind:"scalar",T:9},{no:5,name:"type",kind:"enum",T:s.getEnumType(za)},{no:6,name:"visibility",kind:"enum",T:s.getEnumType(vn)},{no:7,name:"url",kind:"scalar",T:9},{no:8,name:"description",kind:"scalar",T:9},{no:9,name:"total_robot_usage",kind:"scalar",T:3},{no:13,name:"total_external_robot_usage",kind:"scalar",T:3},{no:10,name:"total_organization_usage",kind:"scalar",T:3},{no:14,name:"total_external_organization_usage",kind:"scalar",T:3},{no:11,name:"module_metadata",kind:"message",T:By,oneof:"metadata"},{no:12,name:"ml_model_metadata",kind:"message",T:xy,oneof:"metadata"},{no:18,name:"ml_training_metadata",kind:"message",T:zy,oneof:"metadata"},{no:15,name:"created_at",kind:"message",T:S},{no:16,name:"updated_at",kind:"message",T:S}]),Vy=s.makeMessageType("viam.app.v1.GetRegistryItemRequest",()=>[{no:1,name:"item_id",kind:"scalar",T:9},{no:2,name:"include_markdown_documentation",kind:"scalar",T:8,opt:!0}]),$y=s.makeMessageType("viam.app.v1.GetRegistryItemResponse",()=>[{no:1,name:"item",kind:"message",T:Qa}]),Yy=s.makeMessageType("viam.app.v1.CreateRegistryItemRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"type",kind:"enum",T:s.getEnumType(za)}]),Wy=s.makeMessageType("viam.app.v1.CreateRegistryItemResponse",[]),Hy=s.makeMessageType("viam.app.v1.UpdateRegistryItemRequest",()=>[{no:1,name:"item_id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:s.getEnumType(za)},{no:3,name:"description",kind:"scalar",T:9},{no:4,name:"visibility",kind:"enum",T:s.getEnumType(vn)},{no:5,name:"url",kind:"scalar",T:9,opt:!0},{no:6,name:"update_module_metadata",kind:"message",T:cv,oneof:"metadata"},{no:7,name:"update_ml_model_metadata",kind:"message",T:lv,oneof:"metadata"},{no:8,name:"update_ml_training_metadata",kind:"message",T:dv,oneof:"metadata"},{no:9,name:"markdown_description",kind:"scalar",T:9,opt:!0}]),jy=s.makeMessageType("viam.app.v1.UpdateRegistryItemResponse",[]),Ky=s.makeMessageType("viam.app.v1.ListRegistryItemsRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9,opt:!0},{no:2,name:"types",kind:"enum",T:s.getEnumType(za),repeated:!0},{no:3,name:"visibilities",kind:"enum",T:s.getEnumType(vn),repeated:!0},{no:4,name:"platforms",kind:"scalar",T:9,repeated:!0},{no:5,name:"statuses",kind:"enum",T:s.getEnumType(Ig),repeated:!0},{no:6,name:"search_term",kind:"scalar",T:9,opt:!0},{no:7,name:"page_token",kind:"scalar",T:9,opt:!0},{no:8,name:"public_namespaces",kind:"scalar",T:9,repeated:!0},{no:9,name:"include_markdown_documentation",kind:"scalar",T:8,opt:!0},{no:10,name:"module_source_types",kind:"enum",T:s.getEnumType(Ya),repeated:!0},{no:11,name:"module_languages",kind:"enum",T:s.getEnumType(Wa),repeated:!0}]),Xy=s.makeMessageType("viam.app.v1.ListRegistryItemsResponse",()=>[{no:1,name:"items",kind:"message",T:Qa,repeated:!0}]),Qy=s.makeMessageType("viam.app.v1.DeleteRegistryItemRequest",()=>[{no:1,name:"item_id",kind:"scalar",T:9}]),Zy=s.makeMessageType("viam.app.v1.DeleteRegistryItemResponse",[]),ev=s.makeMessageType("viam.app.v1.RenameRegistryItemRequest",()=>[{no:1,name:"item_id",kind:"scalar",T:9},{no:2,name:"new_name",kind:"scalar",T:9}]),nv=s.makeMessageType("viam.app.v1.RenameRegistryItemResponse",()=>[{no:1,name:"item",kind:"message",T:Qa}]),av=s.makeMessageType("viam.app.v1.TransferRegistryItemRequest",()=>[{no:1,name:"item_id",kind:"scalar",T:9},{no:2,name:"new_public_namespace",kind:"scalar",T:9}]),tv=s.makeMessageType("viam.app.v1.TransferRegistryItemResponse",[]),sv=s.makeMessageType("viam.app.v1.CreateModuleRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),ov=s.makeMessageType("viam.app.v1.CreateModuleResponse",()=>[{no:1,name:"module_id",kind:"scalar",T:9},{no:2,name:"url",kind:"scalar",T:9}]),iv=s.makeMessageType("viam.app.v1.UpdateModuleRequest",()=>[{no:1,name:"module_id",kind:"scalar",T:9},{no:2,name:"visibility",kind:"enum",T:s.getEnumType(vn)},{no:3,name:"url",kind:"scalar",T:9},{no:4,name:"description",kind:"scalar",T:9},{no:5,name:"models",kind:"message",T:cn,repeated:!0},{no:6,name:"entrypoint",kind:"scalar",T:9},{no:7,name:"first_run",kind:"scalar",T:9,opt:!0},{no:8,name:"apps",kind:"message",T:mn,repeated:!0},{no:9,name:"markdown_description",kind:"scalar",T:9,opt:!0}]),rv=s.makeMessageType("viam.app.v1.AllowedOrgIDs",()=>[{no:1,name:"ids",kind:"scalar",T:9,repeated:!0}]),mn=s.makeMessageType("viam.app.v1.App",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"entrypoint",kind:"scalar",T:9},{no:4,name:"fragment_ids",kind:"scalar",T:9,repeated:!0},{no:5,name:"logo_path",kind:"scalar",T:9,opt:!0},{no:6,name:"customizations",kind:"message",T:mh},{no:7,name:"allowed_org_ids",kind:"message",T:rv,opt:!0}]),mv=s.makeMessageType("viam.app.v1.UpdateModuleResponse",()=>[{no:1,name:"url",kind:"scalar",T:9}]),cv=s.makeMessageType("viam.app.v1.UpdateModuleMetadata",()=>[{no:1,name:"models",kind:"message",T:cn,repeated:!0},{no:2,name:"entrypoint",kind:"scalar",T:9},{no:3,name:"apps",kind:"message",T:mn,repeated:!0},{no:4,name:"source_type",kind:"enum",T:s.getEnumType(Ya),opt:!0},{no:5,name:"language",kind:"enum",T:s.getEnumType(Wa),opt:!0}]),lv=s.makeMessageType("viam.app.v1.UpdateMLModelMetadata",()=>[{no:1,name:"model_type",kind:"enum",T:s.getEnumType(Xe)},{no:2,name:"model_framework",kind:"enum",T:s.getEnumType(on)}]),dv=s.makeMessageType("viam.app.v1.UpdateMLTrainingMetadata",()=>[{no:1,name:"model_type",kind:"enum",T:s.getEnumType(Xe)},{no:2,name:"model_framework",kind:"enum",T:s.getEnumType(on)},{no:3,name:"draft",kind:"scalar",T:8}]),cn=s.makeMessageType("viam.app.v1.Model",()=>[{no:1,name:"api",kind:"scalar",T:9},{no:2,name:"model",kind:"scalar",T:9},{no:3,name:"markdown_documentation",kind:"scalar",T:9,opt:!0},{no:4,name:"description",kind:"scalar",T:9,opt:!0},{no:5,name:"supported_hardware",kind:"scalar",T:9,repeated:!0}]),pv=s.makeMessageType("viam.app.v1.ModuleFileInfo",()=>[{no:1,name:"module_id",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"platform",kind:"scalar",T:9},{no:5,name:"platform_tags",kind:"scalar",T:9,repeated:!0}]),uv=s.makeMessageType("viam.app.v1.UploadModuleFileRequest",()=>[{no:1,name:"module_file_info",kind:"message",T:pv,oneof:"module_file"},{no:2,name:"file",kind:"scalar",T:12,oneof:"module_file"}]),gv=s.makeMessageType("viam.app.v1.UploadModuleFileResponse",()=>[{no:1,name:"url",kind:"scalar",T:9}]),Tv=s.makeMessageType("viam.app.v1.GetModuleRequest",()=>[{no:1,name:"module_id",kind:"scalar",T:9},{no:2,name:"include_markdown_documentation",kind:"scalar",T:8,opt:!0}]),kv=s.makeMessageType("viam.app.v1.GetModuleResponse",()=>[{no:1,name:"module",kind:"message",T:ti}]),ti=s.makeMessageType("viam.app.v1.Module",()=>[{no:1,name:"module_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"visibility",kind:"enum",T:s.getEnumType(vn)},{no:4,name:"versions",kind:"message",T:yv,repeated:!0},{no:5,name:"url",kind:"scalar",T:9},{no:6,name:"description",kind:"scalar",T:9},{no:7,name:"models",kind:"message",T:cn,repeated:!0},{no:8,name:"total_robot_usage",kind:"scalar",T:3},{no:9,name:"total_organization_usage",kind:"scalar",T:3},{no:10,name:"organization_id",kind:"scalar",T:9},{no:11,name:"entrypoint",kind:"scalar",T:9},{no:12,name:"public_namespace",kind:"scalar",T:9},{no:13,name:"first_run",kind:"scalar",T:9,opt:!0},{no:14,name:"markdown_description",kind:"scalar",T:9,opt:!0},{no:15,name:"apps",kind:"message",T:mn,repeated:!0}]),yv=s.makeMessageType("viam.app.v1.VersionHistory",()=>[{no:1,name:"version",kind:"scalar",T:9},{no:2,name:"files",kind:"message",T:si,repeated:!0},{no:3,name:"models",kind:"message",T:cn,repeated:!0},{no:4,name:"entrypoint",kind:"scalar",T:9},{no:5,name:"first_run",kind:"scalar",T:9,opt:!0},{no:6,name:"markdown_description",kind:"scalar",T:9,opt:!0},{no:7,name:"apps",kind:"message",T:mn,repeated:!0}]),si=s.makeMessageType("viam.app.v1.Uploads",()=>[{no:1,name:"platform",kind:"scalar",T:9},{no:2,name:"uploaded_at",kind:"message",T:S}]),vv=s.makeMessageType("viam.app.v1.ListModulesRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9,opt:!0},{no:2,name:"include_markdown_documentation",kind:"scalar",T:8,opt:!0}]),hv=s.makeMessageType("viam.app.v1.ListModulesResponse",()=>[{no:1,name:"modules",kind:"message",T:ti,repeated:!0}]),fv=s.makeMessageType("viam.app.v1.GetUserIDByEmailRequest",()=>[{no:1,name:"email",kind:"scalar",T:9}]),Rv=s.makeMessageType("viam.app.v1.GetUserIDByEmailResponse",()=>[{no:1,name:"user_id",kind:"scalar",T:9}]),_v=s.makeMessageType("viam.app.v1.ListOrganizationsByUserRequest",()=>[{no:1,name:"user_id",kind:"scalar",T:9}]),oi=s.makeMessageType("viam.app.v1.OrgDetails",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"org_name",kind:"scalar",T:9},{no:3,name:"org_cid",kind:"scalar",T:9,opt:!0},{no:4,name:"public_namespace",kind:"scalar",T:9,opt:!0},{no:5,name:"billing_tier",kind:"scalar",T:9,opt:!0}]),Sv=s.makeMessageType("viam.app.v1.ListOrganizationsByUserResponse",()=>[{no:1,name:"orgs",kind:"message",T:oi,repeated:!0}]),Iv=s.makeMessageType("viam.app.v1.SearchOrganizationsRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9,opt:!0},{no:2,name:"org_name",kind:"scalar",T:9,opt:!0},{no:3,name:"cid",kind:"scalar",T:9,opt:!0},{no:4,name:"public_namespace",kind:"scalar",T:9,opt:!0}]),bv=s.makeMessageType("viam.app.v1.SearchOrganizationsResponse",()=>[{no:1,name:"organizations",kind:"message",T:oi,repeated:!0}]),Ov=s.makeMessageType("viam.app.v1.CreateKeyRequest",()=>[{no:1,name:"authorizations",kind:"message",T:ne,repeated:!0},{no:2,name:"name",kind:"scalar",T:9}]),Ev=s.makeMessageType("viam.app.v1.CreateKeyResponse",()=>[{no:1,name:"key",kind:"scalar",T:9},{no:2,name:"id",kind:"scalar",T:9}]),Mv=s.makeMessageType("viam.app.v1.DeleteKeyRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),wv=s.makeMessageType("viam.app.v1.DeleteKeyResponse",[]),Cv=s.makeMessageType("viam.app.v1.RenameKeyRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),Nv=s.makeMessageType("viam.app.v1.RenameKeyResponse",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),Pv=s.makeMessageType("viam.app.v1.AuthorizationDetails",()=>[{no:1,name:"authorization_type",kind:"scalar",T:9},{no:2,name:"authorization_id",kind:"scalar",T:9},{no:3,name:"resource_type",kind:"scalar",T:9},{no:4,name:"resource_id",kind:"scalar",T:9},{no:5,name:"org_id",kind:"scalar",T:9}]),ii=s.makeMessageType("viam.app.v1.APIKeyWithAuthorizations",()=>[{no:1,name:"api_key",kind:"message",T:_k},{no:2,name:"authorizations",kind:"message",T:Pv,repeated:!0}]),Dv=s.makeMessageType("viam.app.v1.ListKeysRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),Av=s.makeMessageType("viam.app.v1.ListKeysResponse",()=>[{no:1,name:"api_keys",kind:"message",T:ii,repeated:!0}]),Uv=s.makeMessageType("viam.app.v1.RotateKeyRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),qv=s.makeMessageType("viam.app.v1.RotateKeyResponse",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"key",kind:"scalar",T:9}]),Lv=s.makeMessageType("viam.app.v1.CreateKeyFromExistingKeyAuthorizationsRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Gv=s.makeMessageType("viam.app.v1.CreateKeyFromExistingKeyAuthorizationsResponse",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"key",kind:"scalar",T:9}]),Bv=s.makeMessageType("viam.app.v1.GetAppContentRequest",()=>[{no:1,name:"public_namespace",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),Fv=s.makeMessageType("viam.app.v1.GetAppContentResponse",()=>[{no:1,name:"blob_path",kind:"scalar",T:9},{no:2,name:"entrypoint",kind:"scalar",T:9},{no:3,name:"app_type",kind:"enum",T:s.getEnumType(bg)},{no:4,name:"public",kind:"scalar",T:8}]),xv=s.makeMessageType("viam.app.v1.OrganizationSetLogoRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"logo",kind:"scalar",T:12}]),Jv=s.makeMessageType("viam.app.v1.OrganizationSetLogoResponse",[]),zv=s.makeMessageType("viam.app.v1.OrganizationGetLogoRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),Vv=s.makeMessageType("viam.app.v1.OrganizationGetLogoResponse",()=>[{no:1,name:"url",kind:"scalar",T:9}]),$v=s.makeMessageType("viam.app.v1.EnableAuthServiceRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),Yv=s.makeMessageType("viam.app.v1.EnableAuthServiceResponse",[]),Wv=s.makeMessageType("viam.app.v1.DisableAuthServiceRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),Hv=s.makeMessageType("viam.app.v1.DisableAuthServiceResponse",[]),jv=s.makeMessageType("viam.app.v1.CreateOAuthAppRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"client_name",kind:"scalar",T:9},{no:3,name:"oauth_config",kind:"message",T:Za}]),Kv=s.makeMessageType("viam.app.v1.CreateOAuthAppResponse",()=>[{no:1,name:"client_id",kind:"scalar",T:9},{no:2,name:"client_secret",kind:"scalar",T:9}]),Xv=s.makeMessageType("viam.app.v1.ReadOAuthAppRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"client_id",kind:"scalar",T:9}]),Qv=s.makeMessageType("viam.app.v1.ReadOAuthAppResponse",()=>[{no:1,name:"client_name",kind:"scalar",T:9},{no:2,name:"client_secret",kind:"scalar",T:9},{no:3,name:"oauth_config",kind:"message",T:Za}]),Zv=s.makeMessageType("viam.app.v1.UpdateOAuthAppRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"client_id",kind:"scalar",T:9},{no:3,name:"client_name",kind:"scalar",T:9},{no:4,name:"oauth_config",kind:"message",T:Za}]),eh=s.makeMessageType("viam.app.v1.UpdateOAuthAppResponse",[]),nh=s.makeMessageType("viam.app.v1.DeleteOAuthAppRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"client_id",kind:"scalar",T:9}]),ah=s.makeMessageType("viam.app.v1.DeleteOAuthAppResponse",[]),th=s.makeMessageType("viam.app.v1.ListOAuthAppsRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),sh=s.makeMessageType("viam.app.v1.ListOAuthAppsResponse",()=>[{no:1,name:"client_ids",kind:"scalar",T:9,repeated:!0}]),Za=s.makeMessageType("viam.app.v1.OAuthConfig",()=>[{no:1,name:"client_authentication",kind:"enum",T:s.getEnumType(Og)},{no:2,name:"pkce",kind:"enum",T:s.getEnumType(Eg)},{no:3,name:"url_validation",kind:"enum",T:s.getEnumType(Mg)},{no:4,name:"origin_uris",kind:"scalar",T:9,repeated:!0},{no:5,name:"redirect_uris",kind:"scalar",T:9,repeated:!0},{no:6,name:"logout_uri",kind:"scalar",T:9},{no:7,name:"enabled_grants",kind:"enum",T:s.getEnumType(wg),repeated:!0},{no:8,name:"invite_redirect_uri",kind:"scalar",T:9}]),oh=s.makeMessageType("viam.app.v1.GetAppBrandingRequest",()=>[{no:1,name:"public_namespace",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),ih=s.makeMessageType("viam.app.v1.TextOverrides",()=>[{no:1,name:"fields",kind:"map",K:9,V:{kind:"scalar",T:9}}]),rh=s.makeMessageType("viam.app.v1.GetAppBrandingResponse",()=>[{no:1,name:"logo_path",kind:"scalar",T:9,opt:!0},{no:2,name:"text_customizations",kind:"map",K:9,V:{kind:"message",T:ih}},{no:3,name:"fragment_ids",kind:"scalar",T:9,repeated:!0},{no:4,name:"allowed_org_ids",kind:"scalar",T:9,repeated:!0}]),mh=s.makeMessageType("viam.app.v1.AppCustomizations",()=>[{no:1,name:"machine_picker",kind:"message",T:ch}]),ch=s.makeMessageType("viam.app.v1.MachinePickerCustomizations",()=>[{no:1,name:"heading",kind:"scalar",T:9,opt:!0},{no:2,name:"subheading",kind:"scalar",T:9,opt:!0}]),lh=s.makeMessageType("viam.app.v1.UploadDevicePushTokenRequest",()=>[{no:1,name:"app_id",kind:"scalar",T:9},{no:2,name:"device_token",kind:"scalar",T:9},{no:3,name:"device_uuid",kind:"scalar",T:9}]),dh=s.makeMessageType("viam.app.v1.UploadDevicePushTokenResponse",[]),ph=s.makeMessageType("viam.app.v1.DeleteDevicePushTokenRequest",()=>[{no:1,name:"app_id",kind:"scalar",T:9},{no:2,name:"device_uuid",kind:"scalar",T:9}]),uh=s.makeMessageType("viam.app.v1.DeleteDevicePushTokenResponse",[]),gh=s.makeMessageType("viam.app.v1.GetDevicePushTokensRequest",()=>[{no:1,name:"app_id",kind:"scalar",T:9}]),Th=s.makeMessageType("viam.app.v1.GetDevicePushTokensResponse",()=>[{no:1,name:"device_tokens",kind:"scalar",T:9,repeated:!0}]),kh=s.makeMessageType("viam.app.v1.SetFirebaseConfigRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"app_id",kind:"scalar",T:9},{no:3,name:"config_json",kind:"scalar",T:9}]),yh=s.makeMessageType("viam.app.v1.SetFirebaseConfigResponse",[]),vh=s.makeMessageType("viam.app.v1.GetFirebaseConfigRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),hh=s.makeMessageType("viam.app.v1.GetFirebaseConfigResponse",()=>[{no:1,name:"app_id",kind:"scalar",T:9}]),fh=s.makeMessageType("viam.app.v1.DeleteFirebaseConfigRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"app_id",kind:"scalar",T:9}]),Rh=s.makeMessageType("viam.app.v1.DeleteFirebaseConfigResponse",[]),jS=Object.freeze(Object.defineProperty({__proto__:null,APIKey:_k,APIKeyWithAuthorizations:ii,AddRoleRequest:My,AddRoleResponse:wy,AdditionalFragment:ei,AllowedOrgIDs:rv,App:mn,AppCustomizations:mh,AppType:bg,AuthenticationType:_g,AuthenticatorInfo:jo,Authorization:ne,AuthorizationDetails:Pv,AuthorizedPermissions:ai,BillingAddress:Ha,ChangeRoleRequest:Py,ChangeRoleResponse:Dy,CheckPermissionsRequest:qy,CheckPermissionsResponse:Ly,ClientAuthentication:Og,CreateFragmentRequest:Dk,CreateFragmentResponse:Ak,CreateKeyFromExistingKeyAuthorizationsRequest:Lv,CreateKeyFromExistingKeyAuthorizationsResponse:Gv,CreateKeyRequest:Ov,CreateKeyResponse:Ev,CreateLocationRequest:ST,CreateLocationResponse:IT,CreateLocationSecretRequest:zT,CreateLocationSecretResponse:VT,CreateModuleRequest:sv,CreateModuleResponse:ov,CreateOAuthAppRequest:jv,CreateOAuthAppResponse:Kv,CreateOrganizationInviteRequest:Qg,CreateOrganizationInviteResponse:Zg,CreateOrganizationRequest:Ag,CreateOrganizationResponse:Ug,CreateRegistryItemRequest:Yy,CreateRegistryItemResponse:Wy,CreateRobotPartSecretRequest:Iy,CreateRobotPartSecretResponse:by,DeleteDevicePushTokenRequest:ph,DeleteDevicePushTokenResponse:uh,DeleteFirebaseConfigRequest:fh,DeleteFirebaseConfigResponse:Rh,DeleteFragmentRequest:Lk,DeleteFragmentResponse:Gk,DeleteFragmentTagRequest:$k,DeleteFragmentTagResponse:Yk,DeleteKeyRequest:Mv,DeleteKeyResponse:wv,DeleteLocationRequest:wT,DeleteLocationResponse:CT,DeleteLocationSecretRequest:$T,DeleteLocationSecretResponse:YT,DeleteOAuthAppRequest:nh,DeleteOAuthAppResponse:ah,DeleteOrganizationInviteRequest:aT,DeleteOrganizationInviteResponse:tT,DeleteOrganizationMemberRequest:iT,DeleteOrganizationMemberResponse:rT,DeleteOrganizationRequest:Vg,DeleteOrganizationResponse:$g,DeleteRegistryItemRequest:Qy,DeleteRegistryItemResponse:Zy,DeleteRobotPartRequest:kk,DeleteRobotPartResponse:Ik,DeleteRobotPartSecretRequest:Oy,DeleteRobotPartSecretResponse:Ey,DeleteRobotRequest:gy,DeleteRobotResponse:Ty,DisableAuthServiceRequest:Wv,DisableAuthServiceResponse:Hv,DisableBillingServiceRequest:gT,DisableBillingServiceResponse:TT,EnableAuthServiceRequest:$v,EnableAuthServiceResponse:Yv,EnableBillingServiceRequest:mT,EnableBillingServiceResponse:cT,EnabledGrant:wg,Fragment:Qe,FragmentError:Ek,FragmentErrorType:Sg,FragmentHistoryEntry:bk,FragmentImport:Mk,FragmentImportList:Ko,FragmentRevision:Ok,FragmentSummary:ty,FragmentTag:Ka,FragmentUsage:Xa,FragmentVisibility:Jn,GetAppBrandingRequest:oh,GetAppBrandingResponse:rh,GetAppContentRequest:Bv,GetAppContentResponse:Fv,GetBillingServiceConfigRequest:pT,GetBillingServiceConfigResponse:uT,GetDevicePushTokensRequest:gh,GetDevicePushTokensResponse:Th,GetFirebaseConfigRequest:vh,GetFirebaseConfigResponse:hh,GetFragmentHistoryRequest:Bk,GetFragmentHistoryResponse:Fk,GetFragmentRequest:Nk,GetFragmentResponse:Pk,GetFragmentUsageRequest:xk,GetFragmentUsageResponse:Jk,GetLocationMetadataRequest:NT,GetLocationMetadataResponse:PT,GetLocationRequest:bT,GetLocationResponse:OT,GetModuleRequest:Tv,GetModuleResponse:kv,GetOrganizationMetadataRequest:Yg,GetOrganizationMetadataResponse:Wg,GetOrganizationNamespaceAvailabilityRequest:Gg,GetOrganizationNamespaceAvailabilityResponse:Bg,GetOrganizationRequest:qg,GetOrganizationResponse:Lg,GetOrganizationsWithAccessToLocationRequest:UT,GetOrganizationsWithAccessToLocationResponse:qT,GetRegistryItemRequest:Vy,GetRegistryItemResponse:$y,GetRobotAPIKeysRequest:Rk,GetRobotAPIKeysResponse:Sk,GetRobotMetadataRequest:ky,GetRobotMetadataResponse:yy,GetRobotPartByNameAndLocationRequest:sk,GetRobotPartByNameAndLocationResponse:ok,GetRobotPartHistoryRequest:lk,GetRobotPartHistoryResponse:dk,GetRobotPartLogsRequest:ik,GetRobotPartLogsResponse:rk,GetRobotPartMetadataRequest:yk,GetRobotPartMetadataResponse:vk,GetRobotPartRequest:ak,GetRobotPartResponse:tk,GetRobotPartsRequest:ek,GetRobotPartsResponse:nk,GetRobotRequest:jT,GetRobotResponse:ZT,GetRoverRentalRobotsRequest:KT,GetRoverRentalRobotsResponse:QT,GetUserIDByEmailRequest:fv,GetUserIDByEmailResponse:Rv,ListAuthorizationsRequest:Ay,ListAuthorizationsResponse:Uy,ListFragmentsRequest:wk,ListFragmentsResponse:Ck,ListKeysRequest:Dv,ListKeysResponse:Av,ListLocationsRequest:LT,ListLocationsResponse:JT,ListMachineFragmentsRequest:Qk,ListMachineFragmentsResponse:Zk,ListMachineSummariesRequest:ni,ListMachineSummariesResponse:ey,ListModulesRequest:vv,ListModulesResponse:hv,ListNestedFragmentsRequest:Kk,ListNestedFragmentsResponse:Xk,ListOAuthAppsRequest:th,ListOAuthAppsResponse:sh,ListOrganizationMembersRequest:Kg,ListOrganizationMembersResponse:Xg,ListOrganizationsByUserRequest:_v,ListOrganizationsByUserResponse:Sv,ListOrganizationsRequest:Ng,ListOrganizationsResponse:Dg,ListRegistryItemsRequest:Ky,ListRegistryItemsResponse:Xy,ListRobotsForLocationsRequest:Hk,ListRobotsForLocationsResponse:my,ListRobotsForOrgRequest:jk,ListRobotsForOrgResponse:cy,ListRobotsRequest:Wk,ListRobotsResponse:ry,Location:Vn,LocationAuth:ja,LocationAuthRequest:WT,LocationAuthResponse:HT,LocationOrganization:fT,LocationSummary:ny,MLModelMetadata:xy,MLModelVersion:Fy,MLTrainingMetadata:zy,MLTrainingVersion:Jy,MachinePickerCustomizations:ch,MachineSummary:ay,MarkPartAsMainRequest:fy,MarkPartAsMainResponse:Ry,MarkPartForRestartRequest:_y,MarkPartForRestartResponse:Sy,Model:cn,Module:ti,ModuleFileInfo:pv,ModuleLanguage:Wa,ModuleMetadata:By,ModuleSourceType:Ya,ModuleVersion:Gy,NewRobotPartRequest:gk,NewRobotPartResponse:Tk,NewRobotRequest:ly,NewRobotResponse:dy,OAuthConfig:Za,OnlineState:$a,OrgDetails:oi,Organization:fn,OrganizationGetLogoRequest:zv,OrganizationGetLogoResponse:Vv,OrganizationGetSupportEmailRequest:vT,OrganizationGetSupportEmailResponse:hT,OrganizationIdentity:Xo,OrganizationInvite:zn,OrganizationMember:Pg,OrganizationSetLogoRequest:xv,OrganizationSetLogoResponse:Jv,OrganizationSetSupportEmailRequest:kT,OrganizationSetSupportEmailResponse:yT,PKCE:Eg,PartSummary:iy,ReadOAuthAppRequest:Xv,ReadOAuthAppResponse:Qv,RegistryItem:Qa,RegistryItemStatus:Ig,RemoveRoleRequest:Cy,RemoveRoleResponse:Ny,RenameKeyRequest:Cv,RenameKeyResponse:Nv,RenameRegistryItemRequest:ev,RenameRegistryItemResponse:nv,ResendOrganizationInviteRequest:sT,ResendOrganizationInviteResponse:oT,ResolvedFragment:Zo,Robot:hn,RobotPart:rn,RobotPartHistoryEntry:Cg,RotateKeyRequest:Uv,RotateKeyResponse:qv,RoverRentalRobot:XT,SearchOrganizationsRequest:Iv,SearchOrganizationsResponse:bv,SetFirebaseConfigRequest:kh,SetFirebaseConfigResponse:yh,SetFragmentTagRequest:zk,SetFragmentTagResponse:Vk,ShareLocationRequest:GT,ShareLocationResponse:BT,SharedSecret:Qo,SharedSecret_State:_T,StorageConfig:RT,TailRobotPartLogsRequest:mk,TailRobotPartLogsResponse:ck,TextOverrides:ih,TransferRegistryItemRequest:av,TransferRegistryItemResponse:tv,URLValidation:Mg,UnshareLocationRequest:FT,UnshareLocationResponse:xT,UpdateBillingServiceRequest:lT,UpdateBillingServiceResponse:dT,UpdateFragmentRequest:Uk,UpdateFragmentResponse:qk,UpdateLocationMetadataRequest:DT,UpdateLocationMetadataResponse:AT,UpdateLocationRequest:ET,UpdateLocationResponse:MT,UpdateMLModelMetadata:lv,UpdateMLTrainingMetadata:dv,UpdateModuleMetadata:cv,UpdateModuleRequest:iv,UpdateModuleResponse:mv,UpdateOAuthAppRequest:Zv,UpdateOAuthAppResponse:eh,UpdateOrganizationInviteAuthorizationsRequest:eT,UpdateOrganizationInviteAuthorizationsResponse:nT,UpdateOrganizationMetadataRequest:Hg,UpdateOrganizationMetadataResponse:jg,UpdateOrganizationNamespaceRequest:Jg,UpdateOrganizationNamespaceResponse:zg,UpdateOrganizationRequest:Fg,UpdateOrganizationResponse:xg,UpdateRegistryItemRequest:Hy,UpdateRegistryItemResponse:jy,UpdateRobotMetadataRequest:vy,UpdateRobotMetadataResponse:hy,UpdateRobotPartMetadataRequest:hk,UpdateRobotPartMetadataResponse:fk,UpdateRobotPartRequest:pk,UpdateRobotPartResponse:uk,UpdateRobotRequest:py,UpdateRobotResponse:uy,UploadDevicePushTokenRequest:lh,UploadDevicePushTokenResponse:dh,UploadModuleFileRequest:uv,UploadModuleFileResponse:gv,Uploads:si,VersionHistory:yv,ViamAgentVersion:oy,ViamServerVersion:sy,Visibility:vn},Symbol.toStringTag,{value:"Module"})),KS={typeName:"viam.app.v1.AppService",methods:{getUserIDByEmail:{name:"GetUserIDByEmail",I:fv,O:Rv,kind:m.Unary},createOrganization:{name:"CreateOrganization",I:Ag,O:Ug,kind:m.Unary},listOrganizations:{name:"ListOrganizations",I:Ng,O:Dg,kind:m.Unary},getOrganizationsWithAccessToLocation:{name:"GetOrganizationsWithAccessToLocation",I:UT,O:qT,kind:m.Unary},listOrganizationsByUser:{name:"ListOrganizationsByUser",I:_v,O:Sv,kind:m.Unary},searchOrganizations:{name:"SearchOrganizations",I:Iv,O:bv,kind:m.Unary},getOrganization:{name:"GetOrganization",I:qg,O:Lg,kind:m.Unary},getOrganizationNamespaceAvailability:{name:"GetOrganizationNamespaceAvailability",I:Gg,O:Bg,kind:m.Unary},updateOrganization:{name:"UpdateOrganization",I:Fg,O:xg,kind:m.Unary},updateOrganizationNamespace:{name:"UpdateOrganizationNamespace",I:Jg,O:zg,kind:m.Unary},deleteOrganization:{name:"DeleteOrganization",I:Vg,O:$g,kind:m.Unary},getOrganizationMetadata:{name:"GetOrganizationMetadata",I:Yg,O:Wg,kind:m.Unary},updateOrganizationMetadata:{name:"UpdateOrganizationMetadata",I:Hg,O:jg,kind:m.Unary},listOrganizationMembers:{name:"ListOrganizationMembers",I:Kg,O:Xg,kind:m.Unary},createOrganizationInvite:{name:"CreateOrganizationInvite",I:Qg,O:Zg,kind:m.Unary},updateOrganizationInviteAuthorizations:{name:"UpdateOrganizationInviteAuthorizations",I:eT,O:nT,kind:m.Unary},deleteOrganizationMember:{name:"DeleteOrganizationMember",I:iT,O:rT,kind:m.Unary},deleteOrganizationInvite:{name:"DeleteOrganizationInvite",I:aT,O:tT,kind:m.Unary},resendOrganizationInvite:{name:"ResendOrganizationInvite",I:sT,O:oT,kind:m.Unary},enableBillingService:{name:"EnableBillingService",I:mT,O:cT,kind:m.Unary},disableBillingService:{name:"DisableBillingService",I:gT,O:TT,kind:m.Unary},updateBillingService:{name:"UpdateBillingService",I:lT,O:dT,kind:m.Unary},getBillingServiceConfig:{name:"GetBillingServiceConfig",I:pT,O:uT,kind:m.Unary},organizationSetSupportEmail:{name:"OrganizationSetSupportEmail",I:kT,O:yT,kind:m.Unary},organizationGetSupportEmail:{name:"OrganizationGetSupportEmail",I:vT,O:hT,kind:m.Unary},organizationSetLogo:{name:"OrganizationSetLogo",I:xv,O:Jv,kind:m.Unary},organizationGetLogo:{name:"OrganizationGetLogo",I:zv,O:Vv,kind:m.Unary},enableAuthService:{name:"EnableAuthService",I:$v,O:Yv,kind:m.Unary},disableAuthService:{name:"DisableAuthService",I:Wv,O:Hv,kind:m.Unary},createOAuthApp:{name:"CreateOAuthApp",I:jv,O:Kv,kind:m.Unary},readOAuthApp:{name:"ReadOAuthApp",I:Xv,O:Qv,kind:m.Unary},updateOAuthApp:{name:"UpdateOAuthApp",I:Zv,O:eh,kind:m.Unary},deleteOAuthApp:{name:"DeleteOAuthApp",I:nh,O:ah,kind:m.Unary},listOAuthApps:{name:"ListOAuthApps",I:th,O:sh,kind:m.Unary},createLocation:{name:"CreateLocation",I:ST,O:IT,kind:m.Unary},getLocation:{name:"GetLocation",I:bT,O:OT,kind:m.Unary},updateLocation:{name:"UpdateLocation",I:ET,O:MT,kind:m.Unary},deleteLocation:{name:"DeleteLocation",I:wT,O:CT,kind:m.Unary},getLocationMetadata:{name:"GetLocationMetadata",I:NT,O:PT,kind:m.Unary},updateLocationMetadata:{name:"UpdateLocationMetadata",I:DT,O:AT,kind:m.Unary},listLocations:{name:"ListLocations",I:LT,O:JT,kind:m.Unary},shareLocation:{name:"ShareLocation",I:GT,O:BT,kind:m.Unary},unshareLocation:{name:"UnshareLocation",I:FT,O:xT,kind:m.Unary},locationAuth:{name:"LocationAuth",I:WT,O:HT,kind:m.Unary},createLocationSecret:{name:"CreateLocationSecret",I:zT,O:VT,kind:m.Unary},deleteLocationSecret:{name:"DeleteLocationSecret",I:$T,O:YT,kind:m.Unary},getRobot:{name:"GetRobot",I:jT,O:ZT,kind:m.Unary},getRobotMetadata:{name:"GetRobotMetadata",I:ky,O:yy,kind:m.Unary},updateRobotMetadata:{name:"UpdateRobotMetadata",I:vy,O:hy,kind:m.Unary},getRoverRentalRobots:{name:"GetRoverRentalRobots",I:KT,O:QT,kind:m.Unary},getRobotParts:{name:"GetRobotParts",I:ek,O:nk,kind:m.Unary},getRobotPart:{name:"GetRobotPart",I:ak,O:tk,kind:m.Unary},getRobotPartByNameAndLocation:{name:"GetRobotPartByNameAndLocation",I:sk,O:ok,kind:m.Unary},getRobotPartLogs:{name:"GetRobotPartLogs",I:ik,O:rk,kind:m.Unary},tailRobotPartLogs:{name:"TailRobotPartLogs",I:mk,O:ck,kind:m.ServerStreaming},getRobotPartHistory:{name:"GetRobotPartHistory",I:lk,O:dk,kind:m.Unary},updateRobotPart:{name:"UpdateRobotPart",I:pk,O:uk,kind:m.Unary},newRobotPart:{name:"NewRobotPart",I:gk,O:Tk,kind:m.Unary},deleteRobotPart:{name:"DeleteRobotPart",I:kk,O:Ik,kind:m.Unary},getRobotPartMetadata:{name:"GetRobotPartMetadata",I:yk,O:vk,kind:m.Unary},updateRobotPartMetadata:{name:"UpdateRobotPartMetadata",I:hk,O:fk,kind:m.Unary},getRobotAPIKeys:{name:"GetRobotAPIKeys",I:Rk,O:Sk,kind:m.Unary},markPartAsMain:{name:"MarkPartAsMain",I:fy,O:Ry,kind:m.Unary},markPartForRestart:{name:"MarkPartForRestart",I:_y,O:Sy,kind:m.Unary},createRobotPartSecret:{name:"CreateRobotPartSecret",I:Iy,O:by,kind:m.Unary},deleteRobotPartSecret:{name:"DeleteRobotPartSecret",I:Oy,O:Ey,kind:m.Unary},listRobots:{name:"ListRobots",I:Wk,O:ry,kind:m.Unary},listRobotsForLocations:{name:"ListRobotsForLocations",I:Hk,O:my,kind:m.Unary},listRobotsForOrg:{name:"ListRobotsForOrg",I:jk,O:cy,kind:m.Unary},newRobot:{name:"NewRobot",I:ly,O:dy,kind:m.Unary},updateRobot:{name:"UpdateRobot",I:py,O:uy,kind:m.Unary},deleteRobot:{name:"DeleteRobot",I:gy,O:Ty,kind:m.Unary},listFragments:{name:"ListFragments",I:wk,O:Ck,kind:m.Unary},getFragment:{name:"GetFragment",I:Nk,O:Pk,kind:m.Unary},createFragment:{name:"CreateFragment",I:Dk,O:Ak,kind:m.Unary},updateFragment:{name:"UpdateFragment",I:Uk,O:qk,kind:m.Unary},deleteFragment:{name:"DeleteFragment",I:Lk,O:Gk,kind:m.Unary},listNestedFragments:{name:"ListNestedFragments",I:Kk,O:Xk,kind:m.Unary},listMachineFragments:{name:"ListMachineFragments",I:Qk,O:Zk,kind:m.Unary},listMachineSummaries:{name:"ListMachineSummaries",I:ni,O:ey,kind:m.Unary},getFragmentHistory:{name:"GetFragmentHistory",I:Bk,O:Fk,kind:m.Unary},getFragmentUsage:{name:"GetFragmentUsage",I:xk,O:Jk,kind:m.Unary},setFragmentTag:{name:"SetFragmentTag",I:zk,O:Vk,kind:m.Unary},deleteFragmentTag:{name:"DeleteFragmentTag",I:$k,O:Yk,kind:m.Unary},addRole:{name:"AddRole",I:My,O:wy,kind:m.Unary},removeRole:{name:"RemoveRole",I:Cy,O:Ny,kind:m.Unary},changeRole:{name:"ChangeRole",I:Py,O:Dy,kind:m.Unary},listAuthorizations:{name:"ListAuthorizations",I:Ay,O:Uy,kind:m.Unary},checkPermissions:{name:"CheckPermissions",I:qy,O:Ly,kind:m.Unary},getRegistryItem:{name:"GetRegistryItem",I:Vy,O:$y,kind:m.Unary},createRegistryItem:{name:"CreateRegistryItem",I:Yy,O:Wy,kind:m.Unary},updateRegistryItem:{name:"UpdateRegistryItem",I:Hy,O:jy,kind:m.Unary},listRegistryItems:{name:"ListRegistryItems",I:Ky,O:Xy,kind:m.Unary},deleteRegistryItem:{name:"DeleteRegistryItem",I:Qy,O:Zy,kind:m.Unary},renameRegistryItem:{name:"RenameRegistryItem",I:ev,O:nv,kind:m.Unary},transferRegistryItem:{name:"TransferRegistryItem",I:av,O:tv,kind:m.Unary},createModule:{name:"CreateModule",I:sv,O:ov,kind:m.Unary},updateModule:{name:"UpdateModule",I:iv,O:mv,kind:m.Unary},uploadModuleFile:{name:"UploadModuleFile",I:uv,O:gv,kind:m.ClientStreaming},getModule:{name:"GetModule",I:Tv,O:kv,kind:m.Unary},listModules:{name:"ListModules",I:vv,O:hv,kind:m.Unary},createKey:{name:"CreateKey",I:Ov,O:Ev,kind:m.Unary},deleteKey:{name:"DeleteKey",I:Mv,O:wv,kind:m.Unary},listKeys:{name:"ListKeys",I:Dv,O:Av,kind:m.Unary},renameKey:{name:"RenameKey",I:Cv,O:Nv,kind:m.Unary},rotateKey:{name:"RotateKey",I:Uv,O:qv,kind:m.Unary},createKeyFromExistingKeyAuthorizations:{name:"CreateKeyFromExistingKeyAuthorizations",I:Lv,O:Gv,kind:m.Unary},getAppContent:{name:"GetAppContent",I:Bv,O:Fv,kind:m.Unary},getAppBranding:{name:"GetAppBranding",I:oh,O:rh,kind:m.Unary},uploadDevicePushToken:{name:"UploadDevicePushToken",I:lh,O:dh,kind:m.Unary},deleteDevicePushToken:{name:"DeleteDevicePushToken",I:ph,O:uh,kind:m.Unary},getDevicePushTokens:{name:"GetDevicePushTokens",I:gh,O:Th,kind:m.Unary},setFirebaseConfig:{name:"SetFirebaseConfig",I:kh,O:yh,kind:m.Unary},getFirebaseConfig:{name:"GetFirebaseConfig",I:vh,O:hh,kind:m.Unary},deleteFirebaseConfig:{name:"DeleteFirebaseConfig",I:fh,O:Rh,kind:m.Unary}}},_h=(a,e,n,t,o,i)=>new ne({authorizationType:"role",identityId:e,identityType:o,authorizationId:`${t}_${n}`,resourceType:t,organizationId:a,resourceId:i});class XS{client;constructor(e){this.client=X(KS,e)}async getUserIDByEmail(e){return(await this.client.getUserIDByEmail({email:e})).userId}async createOrganization(e){return(await this.client.createOrganization({name:e})).organization}async listOrganizations(){return(await this.client.listOrganizations({})).organizations}async getOrganizationsWithAccessToLocation(e){return(await this.client.getOrganizationsWithAccessToLocation({locationId:e})).organizationIdentities}async listOrganizationsByUser(e){return(await this.client.listOrganizationsByUser({userId:e})).orgs}async getOrganization(e){return(await this.client.getOrganization({organizationId:e})).organization}async getOrganizationNamespaceAvailability(e){return(await this.client.getOrganizationNamespaceAvailability({publicNamespace:e})).available}async updateOrganization(e,n,t,o,i,r){return(await this.client.updateOrganization({organizationId:e,name:n,publicNamespace:t,region:o,cid:i,defaultFragments:r})).organization}async deleteOrganization(e){await this.client.deleteOrganization({organizationId:e})}async listOrganizationMembers(e){return this.client.listOrganizationMembers({organizationId:e})}async createOrganizationInvite(e,n,t,o=!0){return(await this.client.createOrganizationInvite({organizationId:e,email:n,authorizations:t,sendEmailInvite:o})).invite}async updateOrganizationInviteAuthorizations(e,n,t,o){return(await this.client.updateOrganizationInviteAuthorizations({organizationId:e,email:n,addAuthorizations:t,removeAuthorizations:o})).invite}async deleteOrganizationMember(e,n){await this.client.deleteOrganizationMember({organizationId:e,userId:n})}async deleteOrganizationInvite(e,n){await this.client.deleteOrganizationInvite({organizationId:e,email:n})}async resendOrganizationInvite(e,n){return(await this.client.resendOrganizationInvite({organizationId:e,email:n})).invite}async createLocation(e,n,t){return(await this.client.createLocation({organizationId:e,name:n,parentLocationId:t})).location}async getLocation(e){return(await this.client.getLocation({locationId:e})).location}async updateLocation(e,n,t,o){return(await this.client.updateLocation({locationId:e,name:n,parentLocationId:t,region:o})).location}async deleteLocation(e){await this.client.deleteLocation({locationId:e})}async listLocations(e){return(await this.client.listLocations({organizationId:e})).locations}async shareLocation(e,n){await this.client.shareLocation({organizationId:e,locationId:n})}async unshareLocation(e,n){await this.client.unshareLocation({organizationId:e,locationId:n})}async locationAuth(e){return(await this.client.locationAuth({locationId:e})).auth}async createLocationSecret(e){return(await this.client.createLocationSecret({locationId:e})).auth}async deleteLocationSecret(e,n){await this.client.deleteLocationSecret({locationId:e,secretId:n})}async getRobot(e){return(await this.client.getRobot({id:e})).robot}async getRoverRentalRobots(e){return(await this.client.getRoverRentalRobots({orgId:e})).robots}async getRobotParts(e){return(await this.client.getRobotParts({robotId:e})).parts}async getRobotPart(e){return this.client.getRobotPart({id:e})}async getRobotPartByNameAndLocation(e,n){return this.client.getRobotPartByNameAndLocation({name:e,locationId:n})}async getRobotPartLogs(e,n,t,o,i,r=""){return this.client.getRobotPartLogs({id:e,filter:n,levels:t,pageToken:r,start:o?S.fromDate(o):void 0,end:i?S.fromDate(i):void 0})}async tailRobotPartLogs(e,n,t,o=!0){const i=this.client.tailRobotPartLogs({id:e,errorsOnly:o,filter:t});for await(const r of i)for(const c of r.logs)n.push(c)}async getRobotPartHistory(e){return(await this.client.getRobotPartHistory({id:e})).history}async updateRobotPart(e,n,t){return(await this.client.updateRobotPart({id:e,name:n,robotConfig:t})).part}async newRobotPart(e,n){return(await this.client.newRobotPart({robotId:e,partName:n})).partId}async deleteRobotPart(e){await this.client.deleteRobotPart({partId:e})}async getRobotAPIKeys(e){return(await this.client.getRobotAPIKeys({robotId:e})).apiKeys}async markPartAsMain(e){await this.client.markPartAsMain({partId:e})}async markPartForRestart(e){await this.client.markPartForRestart({partId:e})}async createRobotPartSecret(e){return(await this.client.createRobotPartSecret({partId:e})).part}async deleteRobotPartSecret(e,n){await this.client.deleteRobotPartSecret({partId:e,secretId:n})}async listRobots(e){return(await this.client.listRobots({locationId:e})).robots}async newRobot(e,n){return(await this.client.newRobot({name:n,location:e})).id}async updateRobot(e,n,t){return(await this.client.updateRobot({id:e,location:n,name:t})).robot}async deleteRobot(e){await this.client.deleteRobot({id:e})}async listFragments(e,n=!0,t=[]){return(await this.client.listFragments({organizationId:e,showPublic:n,fragmentVisibility:t})).fragments}async getFragment(e){return(await this.client.getFragment({id:e})).fragment}async createFragment(e,n,t){return(await this.client.createFragment({organizationId:e,name:n,config:t})).fragment}async updateFragment(e,n,t,o,i){return(await this.client.updateFragment({id:e,name:n,config:t,public:o,visibility:i})).fragment}async deleteFragment(e){await this.client.deleteFragment({id:e})}async listMachineFragments(e,n){return(await this.client.listMachineFragments({machineId:e,additionalFragmentIds:n})).fragments}async addRole(e,n,t,o,i){await this.client.addRole({authorization:_h(e,n,t,o,"",i)})}async removeRole(e,n,t,o,i){await this.client.removeRole({authorization:_h(e,n,t,o,"",i)})}async changeRole(e,n){await this.client.changeRole({oldAuthorization:e,newAuthorization:n})}async listAuthorizations(e,n){return(await this.client.listAuthorizations({organizationId:e,resourceIds:n})).authorizations}async checkPermissions(e){return(await this.client.checkPermissions({permissions:e})).authorizedPermissions}async getRegistryItem(e){return(await this.client.getRegistryItem({itemId:e})).item}async createRegistryItem(e,n,t){await this.client.createRegistryItem({organizationId:e,name:n,type:t})}async updateRegistryItem(e,n,t,o){await this.client.updateRegistryItem({itemId:e,type:n,description:t,visibility:o})}async listRegistryItems(e,n,t,o,i,r,c){const d={organizationId:e,types:n,visibilities:t,platforms:o,statuses:i,searchTerm:r,pageToken:c};return(await this.client.listRegistryItems(d)).items}async deleteRegistryItem(e){await this.client.deleteRegistryItem({itemId:e})}async createModule(e,n){return this.client.createModule({organizationId:e,name:n})}async updateModule(e,n,t,o,i,r){return(await this.client.updateModule({moduleId:e,visibility:n,url:t,description:o,models:i,entrypoint:r})).url}async getModule(e){return(await this.client.getModule({moduleId:e})).module}async listModules(e){return(await this.client.listModules({organizationId:e})).modules}async createKey(e,n){return this.client.createKey({name:n,authorizations:e})}async deleteKey(e){return this.client.deleteKey({id:e})}async listKeys(e){return(await this.client.listKeys({orgId:e})).apiKeys}async rotateKey(e){return this.client.rotateKey({id:e})}async createKeyFromExistingKeyAuthorizations(e){return this.client.createKeyFromExistingKeyAuthorizations({id:e})}async getAppContent(e,n){return this.client.getAppContent({publicNamespace:e,name:n})}async getOrganizationMetadata(e){return(await this.client.getOrganizationMetadata({organizationId:e})).toJson().data??{}}async updateOrganizationMetadata(e,n){await this.client.updateOrganizationMetadata({organizationId:e,data:p.fromJson(n)})}async getLocationMetadata(e){return(await this.client.getLocationMetadata({locationId:e})).toJson().data??{}}async updateLocationMetadata(e,n){await this.client.updateLocationMetadata({locationId:e,data:p.fromJson(n)})}async getRobotMetadata(e){return(await this.client.getRobotMetadata({id:e})).toJson().data??{}}async updateRobotMetadata(e,n){await this.client.updateRobotMetadata({id:e,data:p.fromJson(n)})}async getRobotPartMetadata(e){return(await this.client.getRobotPartMetadata({id:e})).toJson().data??{}}async updateRobotPartMetadata(e,n){await this.client.updateRobotPartMetadata({id:e,data:p.fromJson(n)})}async getAppBranding(e,n){return this.client.getAppBranding({publicNamespace:e,name:n})}async listMachineSummaries(e,n,t,o){const i=new ni({organizationId:e,fragmentIds:n,locationIds:t,limit:o});return(await this.client.listMachineSummaries(i)).locationSummaries}}const Sh=s.makeEnum("viam.app.v1.PaymentMethodType",[{no:0,name:"PAYMENT_METHOD_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"PAYMENT_METHOD_TYPE_CARD",localName:"CARD"},{no:2,name:"PAYMENT_METHOD_TYPE_USBANKACCOUNT",localName:"USBANKACCOUNT"}]),Ih=s.makeEnum("viam.app.v1.UsageCostType",[{no:0,name:"USAGE_COST_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"USAGE_COST_TYPE_DATA_UPLOAD",localName:"DATA_UPLOAD"},{no:2,name:"USAGE_COST_TYPE_DATA_EGRESS",localName:"DATA_EGRESS"},{no:3,name:"USAGE_COST_TYPE_REMOTE_CONTROL",localName:"REMOTE_CONTROL"},{no:4,name:"USAGE_COST_TYPE_STANDARD_COMPUTE",localName:"STANDARD_COMPUTE"},{no:5,name:"USAGE_COST_TYPE_CLOUD_STORAGE",localName:"CLOUD_STORAGE"},{no:6,name:"USAGE_COST_TYPE_BINARY_DATA_CLOUD_STORAGE",localName:"BINARY_DATA_CLOUD_STORAGE"},{no:7,name:"USAGE_COST_TYPE_OTHER_CLOUD_STORAGE",localName:"OTHER_CLOUD_STORAGE"},{no:8,name:"USAGE_COST_TYPE_PER_MACHINE",localName:"PER_MACHINE"},{no:9,name:"USAGE_COST_TYPE_TRIGGER_NOTIFICATION",localName:"TRIGGER_NOTIFICATION"},{no:10,name:"USAGE_COST_TYPE_TABULAR_DATA_CLOUD_STORAGE",localName:"TABULAR_DATA_CLOUD_STORAGE"},{no:11,name:"USAGE_COST_TYPE_CONFIG_HISTORY_CLOUD_STORAGE",localName:"CONFIG_HISTORY_CLOUD_STORAGE"},{no:12,name:"USAGE_COST_TYPE_LOGS_CLOUD_STORAGE",localName:"LOGS_CLOUD_STORAGE"},{no:13,name:"USAGE_COST_TYPE_TRAINING_LOGS_CLOUD_STORAGE",localName:"TRAINING_LOGS_CLOUD_STORAGE"},{no:14,name:"USAGE_COST_TYPE_PACKAGES_CLOUD_STORAGE",localName:"PACKAGES_CLOUD_STORAGE"},{no:15,name:"USAGE_COST_TYPE_BINARY_DATA_UPLOAD",localName:"BINARY_DATA_UPLOAD"},{no:16,name:"USAGE_COST_TYPE_TABULAR_DATA_UPLOAD",localName:"TABULAR_DATA_UPLOAD"},{no:17,name:"USAGE_COST_TYPE_LOGS_UPLOAD",localName:"LOGS_UPLOAD"},{no:18,name:"USAGE_COST_TYPE_BINARY_DATA_EGRESS",localName:"BINARY_DATA_EGRESS"},{no:19,name:"USAGE_COST_TYPE_TABULAR_DATA_EGRESS",localName:"TABULAR_DATA_EGRESS"},{no:20,name:"USAGE_COST_TYPE_LOGS_EGRESS",localName:"LOGS_EGRESS"},{no:21,name:"USAGE_COST_TYPE_TRAINING_LOGS_EGRESS",localName:"TRAINING_LOGS_EGRESS"},{no:22,name:"USAGE_COST_TYPE_TABULAR_DATA_DATABASE_CLOUD_STORAGE",localName:"TABULAR_DATA_DATABASE_CLOUD_STORAGE"},{no:23,name:"USAGE_COST_TYPE_TABULAR_DATA_DATABASE_COMPUTE",localName:"TABULAR_DATA_DATABASE_COMPUTE"},{no:24,name:"USAGE_COST_TYPE_BINARY_DATA_CROSS_REGION_EGRESS",localName:"BINARY_DATA_CROSS_REGION_EGRESS"},{no:25,name:"USAGE_COST_TYPE_PIPELINE_SINK_CLOUD_STORAGE",localName:"PIPELINE_SINK_CLOUD_STORAGE"},{no:26,name:"USAGE_COST_TYPE_PIPELINE_SINK_COMPUTE",localName:"PIPELINE_SINK_COMPUTE"}]),bh=s.makeEnum("viam.app.v1.SourceType",[{no:0,name:"SOURCE_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"SOURCE_TYPE_ORG",localName:"ORG"},{no:2,name:"SOURCE_TYPE_FRAGMENT",localName:"FRAGMENT"}]),Oh=s.makeMessageType("viam.app.v1.InvoiceSummary",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"invoice_date",kind:"message",T:S},{no:3,name:"invoice_amount",kind:"scalar",T:1},{no:4,name:"status",kind:"scalar",T:9},{no:5,name:"due_date",kind:"message",T:S},{no:6,name:"paid_date",kind:"message",T:S}]),Eh=s.makeMessageType("viam.app.v1.PaymentMethodCard",()=>[{no:1,name:"brand",kind:"scalar",T:9},{no:2,name:"last_four_digits",kind:"scalar",T:9}]),Mh=s.makeMessageType("viam.app.v1.VerificationInfo",()=>[{no:1,name:"arrival_date",kind:"scalar",T:3},{no:2,name:"hosted_verification_page_url",kind:"scalar",T:9}]),wh=s.makeMessageType("viam.app.v1.PaymentMethodUSBankAccount",()=>[{no:1,name:"bank_name",kind:"scalar",T:9},{no:2,name:"last_four_digits_account_number",kind:"scalar",T:9},{no:3,name:"routing_number",kind:"scalar",T:9},{no:4,name:"account_type",kind:"scalar",T:9},{no:5,name:"verification_info",kind:"message",T:Mh,opt:!0}]),Ch=s.makeMessageType("viam.app.v1.GetCurrentMonthUsageRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),Nh=s.makeMessageType("viam.app.v1.UsageCost",()=>[{no:1,name:"resource_type",kind:"enum",T:s.getEnumType(Ih)},{no:2,name:"cost",kind:"scalar",T:1}]),Ph=s.makeMessageType("viam.app.v1.ResourceUsageCostsBySource",()=>[{no:1,name:"source_type",kind:"enum",T:s.getEnumType(bh)},{no:2,name:"resource_usage_costs",kind:"message",T:Dh},{no:3,name:"tier_name",kind:"scalar",T:9}]),Dh=s.makeMessageType("viam.app.v1.ResourceUsageCosts",()=>[{no:1,name:"usage_costs",kind:"message",T:Nh,repeated:!0},{no:2,name:"discount",kind:"scalar",T:1},{no:3,name:"total_with_discount",kind:"scalar",T:1},{no:4,name:"total_without_discount",kind:"scalar",T:1}]),Ah=s.makeMessageType("viam.app.v1.GetCurrentMonthUsageResponse",()=>[{no:1,name:"start_date",kind:"message",T:S},{no:2,name:"end_date",kind:"message",T:S},{no:14,name:"resource_usage_costs_by_source",kind:"message",T:Ph,repeated:!0},{no:15,name:"subtotal",kind:"scalar",T:1},{no:3,name:"cloud_storage_usage_cost",kind:"scalar",T:1},{no:4,name:"data_upload_usage_cost",kind:"scalar",T:1},{no:5,name:"data_egres_usage_cost",kind:"scalar",T:1},{no:6,name:"remote_control_usage_cost",kind:"scalar",T:1},{no:7,name:"standard_compute_usage_cost",kind:"scalar",T:1},{no:8,name:"discount_amount",kind:"scalar",T:1},{no:9,name:"total_usage_with_discount",kind:"scalar",T:1},{no:10,name:"total_usage_without_discount",kind:"scalar",T:1},{no:11,name:"per_machine_usage_cost",kind:"scalar",T:1},{no:12,name:"binary_data_cloud_storage_usage_cost",kind:"scalar",T:1},{no:13,name:"other_cloud_storage_usage_cost",kind:"scalar",T:1}]),Uh=s.makeMessageType("viam.app.v1.GetOrgBillingInformationRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),qh=s.makeMessageType("viam.app.v1.GetOrgBillingInformationResponse",()=>[{no:1,name:"type",kind:"enum",T:s.getEnumType(Sh)},{no:2,name:"billing_email",kind:"scalar",T:9},{no:3,name:"method",kind:"message",T:Eh,opt:!0},{no:4,name:"billing_tier",kind:"scalar",T:9,opt:!0},{no:5,name:"method_us_bank_account",kind:"message",T:wh,opt:!0}]),Lh=s.makeMessageType("viam.app.v1.GetInvoicesSummaryRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),Gh=s.makeMessageType("viam.app.v1.GetInvoicesSummaryResponse",()=>[{no:1,name:"outstanding_balance",kind:"scalar",T:1},{no:2,name:"invoices",kind:"message",T:Oh,repeated:!0}]),Bh=s.makeMessageType("viam.app.v1.GetInvoicePdfRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"org_id",kind:"scalar",T:9}]),Fh=s.makeMessageType("viam.app.v1.GetInvoicePdfResponse",()=>[{no:1,name:"chunk",kind:"scalar",T:12}]),xh=s.makeMessageType("viam.app.v1.SendPaymentRequiredEmailRequest",()=>[{no:1,name:"customer_org_id",kind:"scalar",T:9},{no:2,name:"billing_owner_org_id",kind:"scalar",T:9}]),Jh=s.makeMessageType("viam.app.v1.SendPaymentRequiredEmailResponse",[]),zh=s.makeMessageType("viam.app.v1.GetAvailableBillingTiersRequest",[]),Vh=s.makeMessageType("viam.app.v1.GetAvailableBillingTiersResponse",()=>[{no:1,name:"tiers",kind:"scalar",T:9,repeated:!0}]),$h=s.makeMessageType("viam.app.v1.UpdateOrganizationBillingTierRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"billing_tier",kind:"scalar",T:9}]),Yh=s.makeMessageType("viam.app.v1.UpdateOrganizationBillingTierResponse",[]),Wh=s.makeMessageType("viam.app.v1.GetLocationBillingOrganizationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),Hh=s.makeMessageType("viam.app.v1.GetLocationBillingOrganizationResponse",()=>[{no:1,name:"billing_organization_id",kind:"scalar",T:9}]),jh=s.makeMessageType("viam.app.v1.UpdateLocationBillingOrganizationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9},{no:2,name:"billing_organization_id",kind:"scalar",T:9}]),Kh=s.makeMessageType("viam.app.v1.UpdateLocationBillingOrganizationResponse",[]),Xh=s.makeMessageType("viam.app.v1.ChargeOrganizationRequest",()=>[{no:1,name:"org_id_to_charge",kind:"scalar",T:9},{no:2,name:"description",kind:"scalar",T:9,opt:!0},{no:3,name:"subtotal",kind:"scalar",T:1},{no:4,name:"tax",kind:"scalar",T:1},{no:5,name:"org_id_for_branding",kind:"scalar",T:9,opt:!0},{no:6,name:"disable_confirmation_email",kind:"scalar",T:8}]),Qh=s.makeMessageType("viam.app.v1.ChargeOrganizationResponse",()=>[{no:1,name:"invoice_id",kind:"scalar",T:9}]),Zh=s.makeMessageType("viam.app.v1.CreateInvoiceAndChargeImmediatelyRequest",()=>[{no:1,name:"org_id_to_charge",kind:"scalar",T:9},{no:2,name:"amount",kind:"scalar",T:1},{no:3,name:"description",kind:"scalar",T:9,opt:!0},{no:4,name:"org_id_for_branding",kind:"scalar",T:9,opt:!0},{no:5,name:"disable_email",kind:"scalar",T:8}]),ef=s.makeMessageType("viam.app.v1.CreateInvoiceAndChargeImmediatelyResponse",()=>[{no:1,name:"invoice_id",kind:"scalar",T:9}]),QS=Object.freeze(Object.defineProperty({__proto__:null,ChargeOrganizationRequest:Xh,ChargeOrganizationResponse:Qh,CreateInvoiceAndChargeImmediatelyRequest:Zh,CreateInvoiceAndChargeImmediatelyResponse:ef,GetAvailableBillingTiersRequest:zh,GetAvailableBillingTiersResponse:Vh,GetCurrentMonthUsageRequest:Ch,GetCurrentMonthUsageResponse:Ah,GetInvoicePdfRequest:Bh,GetInvoicePdfResponse:Fh,GetInvoicesSummaryRequest:Lh,GetInvoicesSummaryResponse:Gh,GetLocationBillingOrganizationRequest:Wh,GetLocationBillingOrganizationResponse:Hh,GetOrgBillingInformationRequest:Uh,GetOrgBillingInformationResponse:qh,InvoiceSummary:Oh,PaymentMethodCard:Eh,PaymentMethodType:Sh,PaymentMethodUSBankAccount:wh,ResourceUsageCosts:Dh,ResourceUsageCostsBySource:Ph,SendPaymentRequiredEmailRequest:xh,SendPaymentRequiredEmailResponse:Jh,SourceType:bh,UpdateLocationBillingOrganizationRequest:jh,UpdateLocationBillingOrganizationResponse:Kh,UpdateOrganizationBillingTierRequest:$h,UpdateOrganizationBillingTierResponse:Yh,UsageCost:Nh,UsageCostType:Ih,VerificationInfo:Mh},Symbol.toStringTag,{value:"Module"})),ZS={typeName:"viam.app.v1.BillingService",methods:{getCurrentMonthUsage:{name:"GetCurrentMonthUsage",I:Ch,O:Ah,kind:m.Unary},getOrgBillingInformation:{name:"GetOrgBillingInformation",I:Uh,O:qh,kind:m.Unary},getInvoicesSummary:{name:"GetInvoicesSummary",I:Lh,O:Gh,kind:m.Unary},getInvoicePdf:{name:"GetInvoicePdf",I:Bh,O:Fh,kind:m.ServerStreaming},sendPaymentRequiredEmail:{name:"SendPaymentRequiredEmail",I:xh,O:Jh,kind:m.Unary},getAvailableBillingTiers:{name:"GetAvailableBillingTiers",I:zh,O:Vh,kind:m.Unary},updateOrganizationBillingTier:{name:"UpdateOrganizationBillingTier",I:$h,O:Yh,kind:m.Unary},getLocationBillingOrganization:{name:"GetLocationBillingOrganization",I:Wh,O:Hh,kind:m.Unary},updateLocationBillingOrganization:{name:"UpdateLocationBillingOrganization",I:jh,O:Kh,kind:m.Unary},chargeOrganization:{name:"ChargeOrganization",I:Xh,O:Qh,kind:m.Unary},createInvoiceAndChargeImmediately:{name:"CreateInvoiceAndChargeImmediately",I:Zh,O:ef,kind:m.Unary}}};class eI{client;constructor(e){this.client=X(ZS,e)}async getCurrentMonthUsage(e){const n=await this.client.getCurrentMonthUsage({orgId:e});return n.start=n.startDate?.toDate(),n.end=n.endDate?.toDate(),n}async getOrgBillingInformation(e){return this.client.getOrgBillingInformation({orgId:e})}async getInvoicesSummary(e){return this.client.getInvoicesSummary({orgId:e})}async getInvoicePdf(e,n){const t=this.client.getInvoicePdf({id:e,orgId:n}),o=[];for await(const i of t)o.push(i.chunk);return nI(o)}}const nI=a=>{const e=a.reduce((o,i)=>o+i.length,0),n=new Uint8Array(e);let t=0;for(const o of a)n.set(o,t),t+=o.length;return n};var nf={},af={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),function(e){var n=function(){function y(f){this._id=new Uint8Array(f)}return y.prototype.buffer=function(){return this._id},y}();e.UUID=n;var t=function(){function y(f){this._id=new Uint8Array(f)}return y.prototype.buffer=function(){return this._id},y}();e.ObjectId=t;var o=function(){function y(f){this._time=typeof f!="string"?new Uint8Array(f||R(Date.now())):R(+new Date(f))}return y.prototype.buffer=function(){return this._time},y.prototype.fromString=function(f){this._time=R(+new Date(f))},y.prototype.toNumber=function(){return b(this._time)},y.prototype.toDate=function(){return new Date(b(this._time))},y}();e.UTC=o;function i(y){var f=5;for(var k in y)f+=r(k,y[k]);return f}function r(y,f){var k=1;if(y&&(k+=V(y)+1),f==null)return k;switch(f.constructor){case String:return k+4+V(f)+1;case Number:return Math.floor(f)===f&&f<=2147483647&&f>=-2147483647?k+4:k+8;case Boolean:return k+1;case Array:case Object:return k+i(f);case Int8Array:case Uint8Array:return k+5+f.byteLength;case Date:case o:return k+8;case n:return k+5+16;case t:return k+12;default:return 0}}function c(y){var f=new Uint8Array(i(y));return d(y,f),f}e.serialize=c;function d(y,f,k){if(k===void 0&&(k=0),k+=u(f.length,f,k),y.constructor===Array)for(var v=0,E=y.length;v<E;v++)k=h(v.toString(),y[v],f,k);else for(var O in y)k=h(O,y[O],f,k);return f[k++]=0,k}function l(y,f,k){var v=w(y),E=v.length;return f.set(v,k),f[k+E++]=0,E}function u(y,f,k){return f[k++]=y&255,f[k++]=y>>>8&255,f[k++]=y>>>16&255,f[k++]=y>>>24&255,4}function h(y,f,k,v){if(f==null)return k[v++]=10,v+=l(y,k,v),v;switch(f.constructor){case String:k[v++]=2,v+=l(y,k,v);var E=l(f,k,v+4);return v+=u(E,k,v),v+E;case Number:if(Math.floor(f)===f)f<=2147483647&&f>=-2147483647?(k[v++]=16,v+=l(y,k,v),v+=u(f,k,v)):(k[v++]=18,v+=l(y,k,v),k.set(R(f),v),v+=8);else{k[v++]=1,v+=l(y,k,v);var O=new Float64Array([f]),se=new Uint8Array(O.buffer);k.set(se,v),v+=8}return v;case Boolean:return k[v++]=8,v+=l(y,k,v),k[v++]=f?1:0,v;case Array:case Object:k[v++]=f.constructor===Array?4:3,v+=l(y,k,v);var B=d(f,k,v);return u(B-v,k,v),B;case Int8Array:case Uint8Array:return k[v++]=5,v+=l(y,k,v),v+=u(f.byteLength,k,v),k[v++]=0,k.set(f,v),v+=f.byteLength,v;case Date:return k[v++]=9,v+=l(y,k,v),k.set(R(f.getTime()),v),v+=8,v;case o:return k[v++]=9,v+=l(y,k,v),k.set(f.buffer(),v),v+=8,v;case n:return k[v++]=5,v+=l(y,k,v),v+=u(16,k,v),k[v++]=4,k.set(f.buffer(),v),v+=16,v;case t:return k[v++]=7,v+=l(y,k,v),k.set(f.buffer(),v),v+=12,v;case RegExp:return k[v++]=11,v+=l(y,k,v),v+=l(f.source,k,v),f.global&&(k[v++]=115),f.ignoreCase&&(k[v++]=105),f.multiline&&(k[v++]=109),k[v++]=0,v;default:return v}}function I(y,f,k,v){if(f===void 0&&(f=!1),k===void 0&&(k=0),v===void 0&&(v=!1),!(y.length<5)){var E=y[k++]|y[k++]<<8|y[k++]<<16|y[k++]<<24;if(!(E<5||E>y.length)&&y[y.length-1]===0){for(var O=v?[]:{};;){var se=y[k++];if(se===0)break;for(var B=k;y[B]!==0&&B<y.length;B++);if(B>=y.length-1)return;var Y=N(y.subarray(k,B));switch(v&&(Y=parseInt(Y)),k=++B,se){case 1:O[Y]=new Float64Array(y.slice(k,k+=8).buffer)[0];break;case 2:E=y[k++]|y[k++]<<8|y[k++]<<16|y[k++]<<24,O[Y]=N(y.subarray(k,k+=E-1)),k++;break;case 3:E=y[k]|y[k+1]<<8|y[k+2]<<16|y[k+3]<<24,O[Y]=I(y,f,k,!1),k+=E;break;case 4:E=y[k]|y[k+1]<<8|y[k+2]<<16|y[k+3]<<24,O[Y]=I(y,f,k,!0),k+=E;break;case 5:if(E=y[k++]|y[k++]<<8|y[k++]<<16|y[k++]<<24,y[k++]===4){if(E!==16)return;O[Y]=new n(y.subarray(k,k+=E))}else O[Y]=y.slice(k,k+=E);break;case 6:O[Y]=null;break;case 7:O[Y]=new t(y.subarray(k,k+=12));break;case 8:O[Y]=y[k++]===1;break;case 9:O[Y]=f?new o(y.subarray(k,k+=8)):new Date(b(y.subarray(k,k+=8)));break;case 10:O[Y]=null;break;case 11:for(B=k;B<y.length&&y[B++]!==0;);if(B>=y.length)return;var Ii=N(y.subarray(k,B));for(k=B;B<y.length&&y[B++]!==0;);if(B>=y.length)return;var bi=N(y.subarray(k,B));k=B,O[Y]=new RegExp(Ii,bi);break;case 16:O[Y]=y[k++]|y[k++]<<8|y[k++]<<16|y[k++]<<24;break;case 18:O[Y]=b(y.subarray(k,k+=8));break;default:return}}return O}}}e.deserialize=I;function R(y){var f=new Uint8Array(8);if(Math.floor(y)===y){var k=4294967296,v=y%k|0,E=y/k|0;y<0&&(v=~(-y%k)|0,E=~(-y/k)|0,v=v+1&4294967295,v||E++);var O=0;f[O++]=v&255,f[O++]=v>>>8&255,f[O++]=v>>>16&255,f[O++]=v>>>24&255,f[O++]=E&255,f[O++]=E>>>8&255,f[O++]=E>>>16&255,f[O]=E>>>24&255}else{var se=new Float64Array([y]),B=new Uint8Array(se.buffer);f.set(B)}return f}function b(y,f){f===void 0&&(f=0);var k=4294967296,v=y[f++]|y[f++]<<8|y[f++]<<16|y[f++]<<24,E=y[f++]|y[f++]<<8|y[f++]<<16|y[f]<<24;return E*k+(v>=0?v:k+v)}function w(y){y=y.replace(/\r\n/g,`
|
|
9
|
-
`);for(var f=[],k=0,v=0,E=y.length;v<E;v++){var O=y.charCodeAt(v);O<128?f[k++]=O:O<2048?(f[k++]=O>>>6|192,f[k++]=O&63|128):(f[k++]=O>>>12|224,f[k++]=O>>>6&63|128,f[k++]=O&63|128)}return new Uint8Array(f)}function N(y){for(var f="",k=y.length,v=0,E,O,se;v<k;)E=y[v],E<128?(f+=String.fromCharCode(E),v++):E>191&&E<224?(O=y[v+1],f+=String.fromCharCode((E&31)<<6|O&63),v+=2):(O=y[v+1],se=y[v+2],f+=String.fromCharCode((E&15)<<12|(O&63)<<6|se&63),v+=3);return f}function V(y){return encodeURI(y).split(/%..|./).length-1}}(a.BSON||(a.BSON={}))})(af),Object.defineProperty(nf,"__esModule",{value:!0});var aI=af,$n=nf.BSON=aI.BSON;const tI={typeName:"viam.app.data.v1.DataService",methods:{tabularDataByFilter:{name:"TabularDataByFilter",I:lp,O:dp,kind:m.Unary},tabularDataBySQL:{name:"TabularDataBySQL",I:up,O:gp,kind:m.Unary},tabularDataByMQL:{name:"TabularDataByMQL",I:Tp,O:kp,kind:m.Unary},exportTabularData:{name:"ExportTabularData",I:yp,O:vp,kind:m.ServerStreaming},getLatestTabularData:{name:"GetLatestTabularData",I:hp,O:fp,kind:m.Unary},binaryDataByFilter:{name:"BinaryDataByFilter",I:Rp,O:_p,kind:m.Unary},binaryDataByIDs:{name:"BinaryDataByIDs",I:Sp,O:Ip,kind:m.Unary},deleteTabularData:{name:"DeleteTabularData",I:wp,O:Cp,kind:m.Unary},deleteBinaryDataByFilter:{name:"DeleteBinaryDataByFilter",I:Np,O:Pp,kind:m.Unary},deleteBinaryDataByIDs:{name:"DeleteBinaryDataByIDs",I:Dp,O:Ap,kind:m.Unary},addTagsToBinaryDataByIDs:{name:"AddTagsToBinaryDataByIDs",I:Up,O:qp,kind:m.Unary},addTagsToBinaryDataByFilter:{name:"AddTagsToBinaryDataByFilter",I:Lp,O:Gp,kind:m.Unary},removeTagsFromBinaryDataByIDs:{name:"RemoveTagsFromBinaryDataByIDs",I:Bp,O:Fp,kind:m.Unary},removeTagsFromBinaryDataByFilter:{name:"RemoveTagsFromBinaryDataByFilter",I:xp,O:Jp,kind:m.Unary},tagsByFilter:{name:"TagsByFilter",I:zp,O:Vp,kind:m.Unary},addBoundingBoxToImageByID:{name:"AddBoundingBoxToImageByID",I:$p,O:Yp,kind:m.Unary},removeBoundingBoxFromImageByID:{name:"RemoveBoundingBoxFromImageByID",I:Wp,O:Hp,kind:m.Unary},boundingBoxLabelsByFilter:{name:"BoundingBoxLabelsByFilter",I:Xp,O:Qp,kind:m.Unary},updateBoundingBox:{name:"UpdateBoundingBox",I:jp,O:Kp,kind:m.Unary},getDatabaseConnection:{name:"GetDatabaseConnection",I:nu,O:au,kind:m.Unary},configureDatabaseUser:{name:"ConfigureDatabaseUser",I:Zp,O:eu,kind:m.Unary},addBinaryDataToDatasetByIDs:{name:"AddBinaryDataToDatasetByIDs",I:tu,O:su,kind:m.Unary},removeBinaryDataFromDatasetByIDs:{name:"RemoveBinaryDataFromDatasetByIDs",I:ou,O:iu,kind:m.Unary},createIndex:{name:"CreateIndex",I:ru,O:mu,kind:m.Unary},listIndexes:{name:"ListIndexes",I:du,O:pu,kind:m.Unary},deleteIndex:{name:"DeleteIndex",I:cu,O:lu,kind:m.Unary},createSavedQuery:{name:"CreateSavedQuery",I:gu,O:Tu,kind:m.Unary},updateSavedQuery:{name:"UpdateSavedQuery",I:fu,O:Ru,kind:m.Unary},getSavedQuery:{name:"GetSavedQuery",I:vu,O:hu,kind:m.Unary},deleteSavedQuery:{name:"DeleteSavedQuery",I:ku,O:yu,kind:m.Unary},listSavedQueries:{name:"ListSavedQueries",I:_u,O:Su,kind:m.Unary},createBinaryDataSignedURL:{name:"CreateBinaryDataSignedURL",I:Iu,O:bu,kind:m.Unary}}},sI=s.makeEnum("viam.app.datapipelines.v1.DataPipelineRunStatus",[{no:0,name:"DATA_PIPELINE_RUN_STATUS_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"DATA_PIPELINE_RUN_STATUS_SCHEDULED",localName:"SCHEDULED"},{no:2,name:"DATA_PIPELINE_RUN_STATUS_STARTED",localName:"STARTED"},{no:3,name:"DATA_PIPELINE_RUN_STATUS_COMPLETED",localName:"COMPLETED"},{no:4,name:"DATA_PIPELINE_RUN_STATUS_FAILED",localName:"FAILED"}]),tf=s.makeMessageType("viam.app.datapipelines.v1.DataPipeline",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"mql_binary",kind:"scalar",T:12,repeated:!0},{no:5,name:"schedule",kind:"scalar",T:9},{no:6,name:"enabled",kind:"scalar",T:8},{no:7,name:"created_on",kind:"message",T:S},{no:8,name:"updated_at",kind:"message",T:S},{no:9,name:"data_source_type",kind:"enum",T:s.getEnumType(tn),opt:!0}]),oI=s.makeMessageType("viam.app.datapipelines.v1.GetDataPipelineRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),iI=s.makeMessageType("viam.app.datapipelines.v1.GetDataPipelineResponse",()=>[{no:1,name:"data_pipeline",kind:"message",T:tf}]),rI=s.makeMessageType("viam.app.datapipelines.v1.ListDataPipelinesRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),mI=s.makeMessageType("viam.app.datapipelines.v1.ListDataPipelinesResponse",()=>[{no:1,name:"data_pipelines",kind:"message",T:tf,repeated:!0}]),cI=s.makeMessageType("viam.app.datapipelines.v1.CreateDataPipelineRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"mql_binary",kind:"scalar",T:12,repeated:!0},{no:4,name:"schedule",kind:"scalar",T:9},{no:5,name:"enable_backfill",kind:"scalar",T:8,opt:!0},{no:6,name:"data_source_type",kind:"enum",T:s.getEnumType(tn),opt:!0}]),lI=s.makeMessageType("viam.app.datapipelines.v1.CreateDataPipelineResponse",()=>[{no:1,name:"id",kind:"scalar",T:9}]),dI=s.makeMessageType("viam.app.datapipelines.v1.RenameDataPipelineRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),pI=s.makeMessageType("viam.app.datapipelines.v1.RenameDataPipelineResponse",[]),uI=s.makeMessageType("viam.app.datapipelines.v1.DeleteDataPipelineRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),gI=s.makeMessageType("viam.app.datapipelines.v1.DeleteDataPipelineResponse",[]),TI=s.makeMessageType("viam.app.datapipelines.v1.EnableDataPipelineRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),kI=s.makeMessageType("viam.app.datapipelines.v1.EnableDataPipelineResponse",[]),yI=s.makeMessageType("viam.app.datapipelines.v1.DisableDataPipelineRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),vI=s.makeMessageType("viam.app.datapipelines.v1.DisableDataPipelineResponse",[]),hI=s.makeMessageType("viam.app.datapipelines.v1.ListDataPipelineRunsRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"page_size",kind:"scalar",T:13},{no:3,name:"page_token",kind:"scalar",T:9}]),fI=s.makeMessageType("viam.app.datapipelines.v1.ListDataPipelineRunsResponse",()=>[{no:1,name:"pipeline_id",kind:"scalar",T:9},{no:2,name:"runs",kind:"message",T:RI,repeated:!0},{no:3,name:"next_page_token",kind:"scalar",T:9}]),RI=s.makeMessageType("viam.app.datapipelines.v1.DataPipelineRun",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"start_time",kind:"message",T:S},{no:3,name:"end_time",kind:"message",T:S},{no:4,name:"data_start_time",kind:"message",T:S},{no:5,name:"data_end_time",kind:"message",T:S},{no:6,name:"status",kind:"enum",T:s.getEnumType(sI)},{no:7,name:"error_message",kind:"scalar",T:9}]),_I={typeName:"viam.app.datapipelines.v1.DataPipelinesService",methods:{getDataPipeline:{name:"GetDataPipeline",I:oI,O:iI,kind:m.Unary},listDataPipelines:{name:"ListDataPipelines",I:rI,O:mI,kind:m.Unary},createDataPipeline:{name:"CreateDataPipeline",I:cI,O:lI,kind:m.Unary},renameDataPipeline:{name:"RenameDataPipeline",I:dI,O:pI,kind:m.Unary},deleteDataPipeline:{name:"DeleteDataPipeline",I:uI,O:gI,kind:m.Unary},enableDataPipeline:{name:"EnableDataPipeline",I:TI,O:kI,kind:m.Unary},disableDataPipeline:{name:"DisableDataPipeline",I:yI,O:vI,kind:m.Unary},listDataPipelineRuns:{name:"ListDataPipelineRuns",I:hI,O:fI,kind:m.Unary}}},sf=s.makeMessageType("viam.app.dataset.v1.Dataset",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"organization_id",kind:"scalar",T:9},{no:4,name:"time_created",kind:"message",T:S}]),SI=s.makeMessageType("viam.app.dataset.v1.CreateDatasetRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9}]),II=s.makeMessageType("viam.app.dataset.v1.CreateDatasetResponse",()=>[{no:1,name:"id",kind:"scalar",T:9}]),bI=s.makeMessageType("viam.app.dataset.v1.DeleteDatasetRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),OI=s.makeMessageType("viam.app.dataset.v1.DeleteDatasetResponse",[]),EI=s.makeMessageType("viam.app.dataset.v1.RenameDatasetRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),MI=s.makeMessageType("viam.app.dataset.v1.RenameDatasetResponse",[]),wI=s.makeMessageType("viam.app.dataset.v1.ListDatasetsByOrganizationIDRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),CI=s.makeMessageType("viam.app.dataset.v1.ListDatasetsByOrganizationIDResponse",()=>[{no:1,name:"datasets",kind:"message",T:sf,repeated:!0}]),NI=s.makeMessageType("viam.app.dataset.v1.ListDatasetsByIDsRequest",()=>[{no:1,name:"ids",kind:"scalar",T:9,repeated:!0}]),PI=s.makeMessageType("viam.app.dataset.v1.ListDatasetsByIDsResponse",()=>[{no:1,name:"datasets",kind:"message",T:sf,repeated:!0}]),DI=s.makeMessageType("viam.app.dataset.v1.MergeDatasetsRequest",()=>[{no:1,name:"dataset_ids",kind:"scalar",T:9,repeated:!0},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"organization_id",kind:"scalar",T:9}]),AI=s.makeMessageType("viam.app.dataset.v1.MergeDatasetsResponse",()=>[{no:1,name:"dataset_id",kind:"scalar",T:9}]),UI={typeName:"viam.app.dataset.v1.DatasetService",methods:{createDataset:{name:"CreateDataset",I:SI,O:II,kind:m.Unary},deleteDataset:{name:"DeleteDataset",I:bI,O:OI,kind:m.Unary},renameDataset:{name:"RenameDataset",I:EI,O:MI,kind:m.Unary},listDatasetsByOrganizationID:{name:"ListDatasetsByOrganizationID",I:wI,O:CI,kind:m.Unary},listDatasetsByIDs:{name:"ListDatasetsByIDs",I:NI,O:PI,kind:m.Unary},mergeDatasets:{name:"MergeDatasets",I:DI,O:AI,kind:m.Unary}}},of=s.makeEnum("viam.app.datasync.v1.MimeType",[{no:0,name:"MIME_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MIME_TYPE_IMAGE_JPEG",localName:"IMAGE_JPEG"},{no:2,name:"MIME_TYPE_IMAGE_PNG",localName:"IMAGE_PNG"},{no:3,name:"MIME_TYPE_APPLICATION_PCD",localName:"APPLICATION_PCD"},{no:4,name:"MIME_TYPE_VIDEO_MP4",localName:"VIDEO_MP4"}]),et=s.makeEnum("viam.app.datasync.v1.DataType",[{no:0,name:"DATA_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"DATA_TYPE_BINARY_SENSOR",localName:"BINARY_SENSOR"},{no:2,name:"DATA_TYPE_TABULAR_SENSOR",localName:"TABULAR_SENSOR"},{no:3,name:"DATA_TYPE_FILE",localName:"FILE"}]),ri=s.makeMessageType("viam.app.datasync.v1.DataCaptureUploadRequest",()=>[{no:1,name:"metadata",kind:"message",T:Rn},{no:2,name:"sensor_contents",kind:"message",T:li,repeated:!0}]),qI=s.makeMessageType("viam.app.datasync.v1.DataCaptureUploadResponse",()=>[{no:1,name:"file_id",kind:"scalar",T:9},{no:2,name:"binary_data_id",kind:"scalar",T:9}]),mi=s.makeMessageType("viam.app.datasync.v1.FileUploadRequest",()=>[{no:1,name:"metadata",kind:"message",T:Rn,oneof:"upload_packet"},{no:2,name:"file_contents",kind:"message",T:rf,oneof:"upload_packet"}]),LI=s.makeMessageType("viam.app.datasync.v1.FileUploadResponse",()=>[{no:1,name:"file_id",kind:"scalar",T:9},{no:2,name:"binary_data_id",kind:"scalar",T:9}]),GI=s.makeMessageType("viam.app.datasync.v1.StreamingDataCaptureUploadRequest",()=>[{no:1,name:"metadata",kind:"message",T:FI,oneof:"upload_packet"},{no:2,name:"data",kind:"scalar",T:12,oneof:"upload_packet"}]),BI=s.makeMessageType("viam.app.datasync.v1.StreamingDataCaptureUploadResponse",()=>[{no:1,name:"file_id",kind:"scalar",T:9},{no:2,name:"binary_data_id",kind:"scalar",T:9}]),ci=s.makeMessageType("viam.app.datasync.v1.SensorMetadata",()=>[{no:1,name:"time_requested",kind:"message",T:S},{no:2,name:"time_received",kind:"message",T:S},{no:3,name:"mime_type",kind:"enum",T:s.getEnumType(of)},{no:4,name:"annotations",kind:"message",T:Ba}]),li=s.makeMessageType("viam.app.datasync.v1.SensorData",()=>[{no:1,name:"metadata",kind:"message",T:ci},{no:2,name:"struct",kind:"message",T:p,oneof:"data"},{no:3,name:"binary",kind:"scalar",T:12,oneof:"data"}]),rf=s.makeMessageType("viam.app.datasync.v1.FileData",()=>[{no:1,name:"data",kind:"scalar",T:12}]),Rn=s.makeMessageType("viam.app.datasync.v1.UploadMetadata",()=>[{no:1,name:"part_id",kind:"scalar",T:9},{no:2,name:"component_type",kind:"scalar",T:9},{no:3,name:"component_name",kind:"scalar",T:9},{no:5,name:"method_name",kind:"scalar",T:9},{no:6,name:"type",kind:"enum",T:s.getEnumType(et)},{no:8,name:"method_parameters",kind:"map",K:9,V:{kind:"message",T:Z}},{no:7,name:"file_name",kind:"scalar",T:9},{no:9,name:"file_extension",kind:"scalar",T:9},{no:14,name:"file_create_time",kind:"message",T:S},{no:15,name:"file_modify_time",kind:"message",T:S},{no:10,name:"tags",kind:"scalar",T:9,repeated:!0},{no:12,name:"dataset_ids",kind:"scalar",T:9,repeated:!0},{no:13,name:"mime_type",kind:"scalar",T:9}]),FI=s.makeMessageType("viam.app.datasync.v1.DataCaptureUploadMetadata",()=>[{no:1,name:"upload_metadata",kind:"message",T:Rn},{no:2,name:"sensor_metadata",kind:"message",T:ci}]),xI={typeName:"viam.app.datasync.v1.DataSyncService",methods:{dataCaptureUpload:{name:"DataCaptureUpload",I:ri,O:qI,kind:m.Unary},fileUpload:{name:"FileUpload",I:mi,O:LI,kind:m.ClientStreaming},streamingDataCaptureUpload:{name:"StreamingDataCaptureUpload",I:GI,O:BI,kind:m.ClientStreaming}}},xe=()=>{console.warn("The BinaryID type is deprecated and will be removed in a future release. Please migrate to the BinaryDataId field instead.")};class Yn{dataClient;datasetClient;dataSyncClient;dataPipelinesClient;static UPLOAD_CHUNK_SIZE=1024*64;constructor(e){this.dataClient=X(tI,e),this.datasetClient=X(UI,e),this.dataSyncClient=X(xI,e),this.dataPipelinesClient=X(_I,e)}async exportTabularData(e,n,t,o,i,r,c){const d=new xn;i&&(d.start=S.fromDate(i)),r&&(d.end=S.fromDate(r));let l;c&&(l=p.fromJson(c));const u={partId:e,resourceName:n,resourceSubtype:t,methodName:o,interval:d,additionalParameters:l},h=this.dataClient.exportTabularData(u),I=[];for await(const R of h)I.push({partId:R.partId,resourceName:R.resourceName,resourceSubtype:R.resourceSubtype,methodName:R.methodName,timeCaptured:R.timeCaptured.toDate(),organizationId:R.organizationId,locationId:R.locationId,robotName:R.robotName,robotId:R.robotId,partName:R.partName,methodParameters:R.methodParameters.toJson(),tags:R.tags,payload:R.payload.toJson()});return I}async tabularDataBySQL(e,n){return(await this.dataClient.tabularDataBySQL({organizationId:e,sqlQuery:n})).rawData.map(o=>$n.deserialize(o))}async tabularDataByMQL(e,n,t,o,i){const r=n[0]instanceof Uint8Array?n:n.map(l=>$n.serialize(l));let c=o;return t&&(!c||c.type===tn.UNSPECIFIED)&&(c=new Uo({type:tn.HOT_STORAGE})),(await this.dataClient.tabularDataByMQL({organizationId:e,mqlBinary:r,dataSource:c,queryPrefixName:i})).rawData.map(l=>$n.deserialize(l))}async tabularDataByFilter(e,n,t,o="",i=!1,r=!1){const d={dataRequest:{filter:e,limit:n===void 0?void 0:BigInt(n),sortOrder:t,last:o},countOnly:i,includeInternalData:r},l=await this.dataClient.tabularDataByFilter(d),u=l.metadata.length,h=[];return h.push(...l.data.map(I=>{const R=I.metadataIndex,b=u!==0&&R>=u?new Ga:l.metadata[R];return{data:I.data?.toJson(),metadata:b,timeRequested:I.timeRequested?.toDate(),timeReceived:I.timeRequested?.toDate()}})),{data:h,count:l.count,last:l.last}}async binaryDataByFilter(e,n,t,o="",i=!0,r=!1,c=!1){const l={dataRequest:{filter:e,limit:n===void 0?void 0:BigInt(n),sortOrder:t,last:o},includeBinary:i,countOnly:r,includeInternalData:c},u=await this.dataClient.binaryDataByFilter(l);return{data:u.data,count:u.count,last:u.last}}async binaryDataByIds(e,n=!0){return Array.isArray(e)&&typeof e[0]=="string"?(await this.dataClient.binaryDataByIDs({binaryDataIds:e,includeBinary:n})).data:(xe(),(await this.dataClient.binaryDataByIDs({binaryIds:e,includeBinary:n})).data)}async createBinaryDataSignedURL(e,n){return(await this.dataClient.createBinaryDataSignedURL({binaryDataId:e,expirationMinutes:n})).signedUrl}async deleteTabularData(e,n,t){return(await this.dataClient.deleteTabularData({organizationId:e,deleteOlderThanDays:n,filter:t})).deletedCount}async deleteBinaryDataByFilter(e,n=!0){return(await this.dataClient.deleteBinaryDataByFilter({filter:e,includeInternalData:n})).deletedCount}async deleteBinaryDataByIds(e){return Array.isArray(e)&&typeof e[0]=="string"?(await this.dataClient.deleteBinaryDataByIDs({binaryDataIds:e})).deletedCount:(xe(),(await this.dataClient.deleteBinaryDataByIDs({binaryIds:e})).deletedCount)}async addTagsToBinaryDataByIds(e,n){if(Array.isArray(n)&&typeof n[0]=="string"){await this.dataClient.addTagsToBinaryDataByIDs({tags:e,binaryDataIds:n});return}xe(),await this.dataClient.addTagsToBinaryDataByIDs({tags:e,binaryIds:n})}async addTagsToBinaryDataByFilter(e,n){await this.dataClient.addTagsToBinaryDataByFilter({tags:e,filter:n})}async removeTagsFromBinaryDataByIds(e,n){return Array.isArray(n)&&typeof n[0]=="string"?(await this.dataClient.removeTagsFromBinaryDataByIDs({tags:e,binaryDataIds:n})).deletedCount:(xe(),(await this.dataClient.removeTagsFromBinaryDataByIDs({tags:e,binaryIds:n})).deletedCount)}async removeTagsFromBinaryDataByFilter(e,n){return(await this.dataClient.removeTagsFromBinaryDataByFilter({tags:e,filter:n})).deletedCount}async tagsByFilter(e){return(await this.dataClient.tagsByFilter({filter:e})).tags}async addBoundingBoxToImageById(e,n,t,o,i,r,c){return typeof e=="string"?(await this.dataClient.addBoundingBoxToImageByID({binaryDataId:e,label:n,xMinNormalized:t,yMinNormalized:o,xMaxNormalized:i,yMaxNormalized:r,confidence:c})).bboxId:(xe(),(await this.dataClient.addBoundingBoxToImageByID({binaryId:e,label:n,xMinNormalized:t,yMinNormalized:o,xMaxNormalized:i,yMaxNormalized:r,confidence:c})).bboxId)}async removeBoundingBoxFromImageById(e,n){if(typeof e=="string"){await this.dataClient.removeBoundingBoxFromImageByID({binaryDataId:e,bboxId:n});return}xe(),await this.dataClient.removeBoundingBoxFromImageByID({binaryId:e,bboxId:n})}async updateBoundingBox(e,n,t,o,i,r,c,d){if(typeof e=="string"){await this.dataClient.updateBoundingBox({binaryDataId:e,bboxId:n,label:t,xMinNormalized:o,yMinNormalized:i,xMaxNormalized:r,yMaxNormalized:c,confidence:d});return}xe(),await this.dataClient.updateBoundingBox({binaryId:e,bboxId:n,label:t,xMinNormalized:o,yMinNormalized:i,xMaxNormalized:r,yMaxNormalized:c,confidence:d})}async boundingBoxLabelsByFilter(e){return(await this.dataClient.boundingBoxLabelsByFilter({filter:e})).labels}async configureDatabaseUser(e,n){await this.dataClient.configureDatabaseUser({organizationId:e,password:n})}async getDatabaseConnection(e){return(await this.dataClient.getDatabaseConnection({organizationId:e})).hostname}async addBinaryDataToDatasetByIds(e,n){if(Array.isArray(e)&&typeof e[0]=="string"){await this.dataClient.addBinaryDataToDatasetByIDs({binaryDataIds:e,datasetId:n});return}xe(),await this.dataClient.addBinaryDataToDatasetByIDs({binaryIds:e,datasetId:n})}async removeBinaryDataFromDatasetByIds(e,n){if(Array.isArray(e)&&typeof e[0]=="string"){await this.dataClient.removeBinaryDataFromDatasetByIDs({binaryDataIds:e,datasetId:n});return}xe(),await this.dataClient.removeBinaryDataFromDatasetByIDs({binaryIds:e,datasetId:n})}async createDataset(e,n){return(await this.datasetClient.createDataset({name:e,organizationId:n})).id}async deleteDataset(e){await this.datasetClient.deleteDataset({id:e})}async renameDataset(e,n){await this.datasetClient.renameDataset({id:e,name:n})}async listDatasetsByOrganizationID(e){return(await this.datasetClient.listDatasetsByOrganizationID({organizationId:e})).datasets.map(t=>({created:t.timeCreated?.toDate(),...t}))}async listDatasetsByIds(e){return(await this.datasetClient.listDatasetsByIDs({ids:e})).datasets.map(t=>({created:t.timeCreated?.toDate(),...t}))}async tabularDataCaptureUpload(e,n,t,o,i,r,c){if(r.length!==e.length)throw new Error("dataRequestTimes and data lengths must be equal.");const d=new Rn({partId:n,componentType:t,componentName:o,methodName:i,type:et.TABULAR_SENSOR,tags:c}),l=[];for(const[I,R]of e.entries()){const b=new ci,w=r[I];w&&(b.timeRequested=S.fromDate(w[0]),b.timeReceived=S.fromDate(w[1])),l.push(new li({metadata:b,data:{case:"struct",value:p.fromJson(R)}}))}const u=new ri({metadata:d,sensorContents:l});return(await this.dataSyncClient.dataCaptureUpload(u)).fileId}async binaryDataCaptureUpload(e,n,t,o,i,r,c){const d=new Rn({partId:n,componentType:t,componentName:o,methodName:i,type:et.BINARY_SENSOR,tags:c?.tags,fileExtension:c?.fileExtension??"",datasetIds:c?.datasetIds,mimeType:c?.mimeType??""}),l=new li({metadata:{timeRequested:S.fromDate(r[0]),timeReceived:S.fromDate(r[1])},data:{case:"binary",value:e}}),u=new ri({metadata:d,sensorContents:[l]});return(await this.dataSyncClient.dataCaptureUpload(u)).binaryDataId}async fileUpload(e,n,t){const o=new Rn({partId:n,type:et.FILE,...t});return(await this.dataSyncClient.fileUpload(Yn.fileUploadRequests(o,e))).binaryDataId}static async*fileUploadRequests(e,n){yield new mi({uploadPacket:{case:"metadata",value:e}});for(let t=0;t<n.length;t+=Yn.UPLOAD_CHUNK_SIZE){let o=t+Yn.UPLOAD_CHUNK_SIZE;o>n.length&&(o=n.length),yield new mi({uploadPacket:{case:"fileContents",value:new rf({data:n.slice(t,o)})}})}}static createFilter(e){const n=new je(e);if(e.startTime??e.endTime){const o=new xn;e.startTime&&(o.start=S.fromDate(e.startTime)),e.endTime&&(o.end=S.fromDate(e.endTime)),n.interval=o}const t=new La;return e.tags&&(t.tags=e.tags,n.tagsFilter=t),n}async getLatestTabularData(e,n,t,o,i){let r;i&&(r=p.fromJson(i));const c=await this.dataClient.getLatestTabularData({partId:e,resourceName:n,resourceSubtype:t,methodName:o,additionalParameters:r});return!c.payload||!c.timeCaptured||!c.timeSynced?null:[c.timeCaptured.toDate(),c.timeSynced.toDate(),c.payload.toJson()]}async listDataPipelines(e){return(await this.dataPipelinesClient.listDataPipelines({organizationId:e})).dataPipelines}async getDataPipeline(e){return(await this.dataPipelinesClient.getDataPipeline({id:e})).dataPipeline??null}async createDataPipeline(e,n,t,o,i,r){const c=t[0]instanceof Uint8Array?t:t.map(u=>$n.serialize(u)),d=r??tn.STANDARD;return(await this.dataPipelinesClient.createDataPipeline({organizationId:e,name:n,mqlBinary:c,schedule:o,enableBackfill:i,dataSourceType:d})).id}async deleteDataPipeline(e){await this.dataPipelinesClient.deleteDataPipeline({id:e})}async listDataPipelineRuns(e,n){const t=await this.dataPipelinesClient.listDataPipelineRuns({id:e,pageSize:n});return new nt(this.dataPipelinesClient,e,t.runs,n,t.nextPageToken)}async createIndex(e,n,t,o){await this.dataClient.createIndex({organizationId:e,collectionType:n,indexSpec:[$n.serialize(t)],pipelineName:o})}async listIndexes(e,n,t){return(await this.dataClient.listIndexes({organizationId:e,collectionType:n,pipelineName:t})).indexes}async deleteIndex(e,n,t,o){await this.dataClient.deleteIndex({organizationId:e,collectionType:n,indexName:t,pipelineName:o})}}class nt{constructor(e,n,t=[],o,i){this.dataPipelinesClient=e,this.pipelineId=n,this.runs=t,this.pageSize=o,this.nextPageToken=i}async nextPage(){if(this.nextPageToken===void 0||this.nextPageToken==="")return new nt(this.dataPipelinesClient,this.pipelineId,[],this.pageSize,"");const e=await this.dataPipelinesClient.listDataPipelineRuns({id:this.pipelineId,pageSize:this.pageSize,pageToken:this.nextPageToken});return new nt(this.dataPipelinesClient,this.pipelineId,e.runs,this.pageSize,e.nextPageToken)}}const JI={typeName:"viam.app.mltraining.v1.MLTrainingService",methods:{submitTrainingJob:{name:"SubmitTrainingJob",I:sg,O:og,kind:m.Unary},submitCustomTrainingJob:{name:"SubmitCustomTrainingJob",I:ig,O:rg,kind:m.Unary},getTrainingJob:{name:"GetTrainingJob",I:mg,O:cg,kind:m.Unary},listTrainingJobs:{name:"ListTrainingJobs",I:lg,O:dg,kind:m.Unary},cancelTrainingJob:{name:"CancelTrainingJob",I:pg,O:ug,kind:m.Unary},deleteCompletedTrainingJob:{name:"DeleteCompletedTrainingJob",I:gg,O:Tg,kind:m.Unary},getTrainingJobLogs:{name:"GetTrainingJobLogs",I:yg,O:vg,kind:m.Unary},listSupportedContainers:{name:"ListSupportedContainers",I:hg,O:fg,kind:m.Unary}}};class zI{client;constructor(e){this.client=X(JI,e)}async submitTrainingJob(e,n,t,o,i,r){return(await this.client.submitTrainingJob({organizationId:e,datasetId:n,modelName:t,modelVersion:o,modelType:i,tags:r})).id}async submitCustomTrainingJob(e,n,t,o,i,r){return(await this.client.submitCustomTrainingJob({organizationId:e,datasetId:n,registryItemId:t,registryItemVersion:o,modelName:i,modelVersion:r})).id}async getTrainingJob(e){return(await this.client.getTrainingJob({id:e})).metadata}async listTrainingJobs(e,n){return(await this.client.listTrainingJobs({organizationId:e,status:n})).jobs}async cancelTrainingJob(e){return await this.client.cancelTrainingJob({id:e}),null}async deleteCompletedTrainingJob(e){return await this.client.deleteCompletedTrainingJob({id:e}),null}}const mf=s.makeMessageType("viam.provisioning.v1.ExitProvisioningRequest",[]),cf=s.makeMessageType("viam.provisioning.v1.ExitProvisioningResponse",[]),lf=s.makeMessageType("viam.provisioning.v1.GetSmartMachineStatusRequest",[]),df=s.makeMessageType("viam.provisioning.v1.GetSmartMachineStatusResponse",()=>[{no:1,name:"provisioning_info",kind:"message",T:vf},{no:2,name:"has_smart_machine_credentials",kind:"scalar",T:8},{no:3,name:"is_online",kind:"scalar",T:8},{no:4,name:"latest_connection_attempt",kind:"message",T:di},{no:5,name:"errors",kind:"scalar",T:9,repeated:!0},{no:6,name:"agent_version",kind:"scalar",T:9}]),pf=s.makeMessageType("viam.provisioning.v1.SetNetworkCredentialsRequest",()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"ssid",kind:"scalar",T:9},{no:3,name:"psk",kind:"scalar",T:9}]),uf=s.makeMessageType("viam.provisioning.v1.SetNetworkCredentialsResponse",[]),gf=s.makeMessageType("viam.provisioning.v1.SetSmartMachineCredentialsRequest",()=>[{no:1,name:"cloud",kind:"message",T:pi}]),Tf=s.makeMessageType("viam.provisioning.v1.SetSmartMachineCredentialsResponse",[]),kf=s.makeMessageType("viam.provisioning.v1.GetNetworkListRequest",[]),yf=s.makeMessageType("viam.provisioning.v1.GetNetworkListResponse",()=>[{no:1,name:"networks",kind:"message",T:di,repeated:!0}]),vf=s.makeMessageType("viam.provisioning.v1.ProvisioningInfo",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9},{no:2,name:"model",kind:"scalar",T:9},{no:3,name:"manufacturer",kind:"scalar",T:9}]),di=s.makeMessageType("viam.provisioning.v1.NetworkInfo",()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"ssid",kind:"scalar",T:9},{no:3,name:"security",kind:"scalar",T:9},{no:4,name:"signal",kind:"scalar",T:5},{no:5,name:"connected",kind:"scalar",T:8},{no:6,name:"last_error",kind:"scalar",T:9}]),pi=s.makeMessageType("viam.provisioning.v1.CloudConfig",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"secret",kind:"scalar",T:9},{no:3,name:"app_address",kind:"scalar",T:9},{no:4,name:"api_key",kind:"message",T:hf}]),hf=s.makeMessageType("viam.provisioning.v1.APIKey",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"key",kind:"scalar",T:9}]),VI=Object.freeze(Object.defineProperty({__proto__:null,APIKey:hf,CloudConfig:pi,ExitProvisioningRequest:mf,ExitProvisioningResponse:cf,GetNetworkListRequest:kf,GetNetworkListResponse:yf,GetSmartMachineStatusRequest:lf,GetSmartMachineStatusResponse:df,NetworkInfo:di,ProvisioningInfo:vf,SetNetworkCredentialsRequest:pf,SetNetworkCredentialsResponse:uf,SetSmartMachineCredentialsRequest:gf,SetSmartMachineCredentialsResponse:Tf},Symbol.toStringTag,{value:"Module"})),$I={typeName:"viam.provisioning.v1.ProvisioningService",methods:{getSmartMachineStatus:{name:"GetSmartMachineStatus",I:lf,O:df,kind:m.Unary},setNetworkCredentials:{name:"SetNetworkCredentials",I:pf,O:uf,kind:m.Unary},setSmartMachineCredentials:{name:"SetSmartMachineCredentials",I:gf,O:Tf,kind:m.Unary},getNetworkList:{name:"GetNetworkList",I:kf,O:yf,kind:m.Unary},exitProvisioning:{name:"ExitProvisioning",I:mf,O:cf,kind:m.Unary}}};class YI{client;constructor(e){this.client=X($I,e)}async getSmartMachineStatus(){return this.client.getSmartMachineStatus({})}async setNetworkCredentials(e,n,t){await this.client.setNetworkCredentials({type:e,ssid:n,psk:t})}async setSmartMachineCredentials(e){await this.client.setSmartMachineCredentials({cloud:e})}async getNetworkList(){return(await this.client.getNetworkList({})).networks}}const WI=async({serviceHost:a="https://app.viam.com",credentials:e})=>{const n=await w_(a,e);return new HI(n,e)};class HI{transport;credentials;dataClient;appClient;mlTrainingClient;provisioningClient;billingClient;constructor(e,n){this.transport=e,this.credentials=n,this.dataClient=new Yn(this.transport),this.appClient=new XS(this.transport),this.mlTrainingClient=new zI(this.transport),this.provisioningClient=new YI(this.transport),this.billingClient=new eI(this.transport)}async getRobotSecretFromHost(e){const t=e.split(".viam.")[0]?.split(".");if(t!==void 0){const o=t.at(-1);if(o===void 0)return;const i=e.split(".").at(0);if(i!==void 0)return(await this.appClient.getRobotPartByNameAndLocation(i,o)).part?.secret}}async connectToMachine({host:e=void 0,id:n=void 0}){if(e===void 0&&n===void 0)throw new Error("Either a machine address or ID must be provided");let t=e,o;if(n!==void 0&&e===void 0){const c=(await this.appClient.getRobotParts(n)).find(d=>d.mainPart);if(!c)throw new Error(`Could not find a main part for the machine with UUID: ${n}`);t=c.fqdn,o=c.secret}if(t===void 0||t==="")throw new Error("Host was not provided and could not be obtained from the machine ID");let i=this.credentials;return Gn(i)||(o===void 0&&(o=await this.getRobotSecretFromHost(t)),i=o===void 0?i:{type:"robot-secret",payload:o,authEntity:t}),tg({host:t,credentials:i,signalingAddress:"https://app.viam.com:443",reconnectMaxAttempts:1})}}const{JointPositions:jI}=mm;class KI{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(cm),this.name=n,this.options=t}async getEndPosition(e={},n=this.callOptions){const t=new Gt({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const i=(await this.client.getEndPosition(t,n)).pose;if(!i)throw new Error("no pose");return i}async getGeometries(e={},n=this.callOptions){return Xr(this.client.getGeometries,this.name,p.fromJson(e),n)}async getKinematics(e={},n=this.callOptions){return Kr(this.client.getKinematics,this.name,p.fromJson(e),n)}async get3DModels(e={},n=this.callOptions){const t=new Dt({name:this.name,extra:p.fromJson(e)});return(await this.client.get3DModels(t,n)).models}async moveToPosition(e,n={},t=this.callOptions){const o=new Ft({name:this.name,to:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.moveToPosition(o,t)}async moveToJointPositions(e,n={},t=this.callOptions){const o=new Tn({values:e}),i=new xt({name:this.name,positions:o,extra:p.fromJson(n)});this.options.requestLogger?.(i),await this.client.moveToJointPositions(i,t)}async getJointPositions(e={},n=this.callOptions){const t=new Bt({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const i=(await this.client.getJointPositions(t,n)).positions;if(!i)throw new Error("no pose");return i}async stop(e={},n=this.callOptions){const t=new Jt({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t),await this.client.stop(t,n)}async isMoving(e=this.callOptions){const n=new zt({name:this.name});return this.options.requestLogger?.(n),(await this.client.isMoving(n,e)).isMoving}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const ff=s.makeMessageType("viam.component.audioin.v1.GetAudioRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"duration_seconds",kind:"scalar",T:2},{no:3,name:"codec",kind:"scalar",T:9},{no:4,name:"request_id",kind:"scalar",T:9},{no:5,name:"previous_timestamp_nanoseconds",kind:"scalar",T:3},{no:99,name:"extra",kind:"message",T:p}]),XI=s.makeMessageType("viam.component.audioin.v1.GetAudioResponse",()=>[{no:1,name:"audio",kind:"message",T:QI},{no:2,name:"request_id",kind:"scalar",T:9}]),QI=s.makeMessageType("viam.component.audioin.v1.AudioChunk",()=>[{no:1,name:"audio_data",kind:"scalar",T:12},{no:2,name:"audio_info",kind:"message",T:At},{no:3,name:"start_timestamp_nanoseconds",kind:"scalar",T:3},{no:4,name:"end_timestamp_nanoseconds",kind:"scalar",T:3},{no:5,name:"sequence",kind:"scalar",T:5}]),ZI={typeName:"viam.component.audioin.v1.AudioInService",methods:{getAudio:{name:"GetAudio",I:ff,O:XI,kind:m.ServerStreaming},getProperties:{name:"GetProperties",I:qn,O:Ut,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary}}};class eb{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(ZI),this.name=n,this.options=t}async*getAudio(e,n,t=0n,o={},i=this.callOptions){const r=new ff({name:this.name,codec:e,durationSeconds:n,previousTimestampNanoseconds:t,extra:p.fromJson(o)});this.options.requestLogger?.(r);const c=this.client.getAudio(r,i);for await(const d of c)d.audio&&(yield{audioData:d.audio.audioData,audioInfo:d.audio.audioInfo,startTimeNs:d.audio.startTimestampNanoseconds,endTimeNs:d.audio.endTimestampNanoseconds,sequence:d.audio.sequence,requestID:d.requestId})}async getProperties(e={},n=this.callOptions){const t=new qn({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const o=await this.client.getProperties(t,n);return{supportedCodecs:o.supportedCodecs,sampleRateHz:o.sampleRateHz,numChannels:o.numChannels}}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const nb={MP3:"mp3",PCM16:"pcm16",PCM32:"pcm32",PCM32_FLOAT:"pcm32_float",AAC:"aac",OPUS:"opus",FLAC:"flac",WAV:"wav"},Rf=s.makeMessageType("viam.component.audioout.v1.PlayRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"audio_data",kind:"scalar",T:12},{no:3,name:"audio_info",kind:"message",T:At},{no:99,name:"extra",kind:"message",T:p}]),ab={typeName:"viam.component.audioout.v1.AudioOutService",methods:{play:{name:"Play",I:Rf,O:s.makeMessageType("viam.component.audioout.v1.PlayResponse",[]),kind:m.Unary},getProperties:{name:"GetProperties",I:qn,O:Ut,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary}}};class tb{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(ab),this.name=n,this.options=t}async play(e,n,t={},o=this.callOptions){const i=new Rf({name:this.name,audioData:e,audioInfo:n,extra:p.fromJson(t)});this.options.requestLogger?.(i),await this.client.play(i,o)}async getProperties(e={},n=this.callOptions){const t=new qn({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const o=await this.client.getProperties(t,n);return{supportedCodecs:o.supportedCodecs,sampleRateHz:o.sampleRateHz,numChannels:o.numChannels}}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const{GetPropertiesResponse:sb}=ym;class ob{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(vm),this.name=n,this.options=t}async getGeometries(e={},n=this.callOptions){const t=new F({name:this.name,extra:p.fromJson(e)});return(await this.client.getGeometries(t,n)).geometries}async moveStraight(e,n,t={},o=this.callOptions){const i=new Vt({name:this.name,mmPerSec:n,distanceMm:e?BigInt(e):void 0,extra:p.fromJson(t)});this.options.requestLogger?.(i),await this.client.moveStraight(i,o)}async spin(e,n,t={},o=this.callOptions){const i=new $t({name:this.name,angleDeg:e,degsPerSec:n,extra:p.fromJson(t)});this.options.requestLogger?.(i),await this.client.spin(i,o)}async setPower(e,n,t={},o=this.callOptions){const i=new Wt({name:this.name,linear:e,angular:n,extra:p.fromJson(t)});this.options.requestLogger?.(i),await this.client.setPower(i,o)}async setVelocity(e,n,t={},o=this.callOptions){const i=new Ht({name:this.name,linear:e,angular:n,extra:p.fromJson(t)});this.options.requestLogger?.(i),await this.client.setVelocity(i,o)}async stop(e={},n=this.callOptions){const t=new Yt({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t),await this.client.stop(t,n)}async isMoving(e=this.callOptions){const n=new jt({name:this.name});return this.options.requestLogger?.(n),(await this.client.isMoving(n,e)).isMoving}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}async getProperties(e={},n=this.callOptions){const t=new Pa({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),this.client.getProperties(t,n)}}const{ReadAnalogReaderResponse:ib,PowerMode:rb}=Nm;class mb{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(Pm),this.name=n,this.options=t}async setGPIO(e,n,t={},o=this.callOptions){const i=new Kt({name:this.name,pin:e,high:n,extra:p.fromJson(t)});this.options.requestLogger?.(i),await this.client.setGPIO(i,o)}async getGPIO(e,n={},t=this.callOptions){const o=new Xt({name:this.name,pin:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),(await this.client.getGPIO(o,t)).high}async getPWM(e,n={},t=this.callOptions){const o=new Qt({name:this.name,pin:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),(await this.client.pWM(o,t)).dutyCyclePct}async setPWM(e,n,t={},o=this.callOptions){const i=new Zt({name:this.name,pin:e,dutyCyclePct:n,extra:p.fromJson(t)});this.options.requestLogger?.(i),await this.client.setPWM(i,o)}async getPWMFrequency(e,n={},t=this.callOptions){const o=new es({name:this.name,pin:e,extra:p.fromJson(n)});this.options.requestLogger?.(o);const i=await this.client.pWMFrequency(o,t);return Number(i.frequencyHz)}async setPWMFrequency(e,n,t={},o=this.callOptions){const i=new ns({name:this.name,pin:e,frequencyHz:n?BigInt(n):void 0,extra:p.fromJson(t)});this.options.requestLogger?.(i),await this.client.setPWMFrequency(i,o)}async readAnalogReader(e,n={},t=this.callOptions){const o=new as({boardName:this.name,analogReaderName:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),this.client.readAnalogReader(o,t)}async writeAnalog(e,n,t={},o=this.callOptions){const i=new ts({name:this.name,pin:e,value:n,extra:p.fromJson(t)});this.options.requestLogger?.(i),await this.client.writeAnalog(i,o)}async getDigitalInterruptValue(e,n={},t=this.callOptions){const o=new ss({boardName:this.name,digitalInterruptName:e,extra:p.fromJson(n)});this.options.requestLogger?.(o);const i=await this.client.getDigitalInterruptValue(o,t);return Number(i.value)}async streamTicks(e,n,t={},o=this.callOptions){const i=new os({name:this.name,pinNames:e,extra:p.fromJson(t)});this.options.requestLogger?.(i);const r=this.client.streamTicks(i,o);for await(const c of r)n.push({pinName:c.pinName,high:c.high,time:c.time?Number(c.time):0})}async setPowerMode(e,n,t={},o=this.callOptions){const i=new is({name:this.name,powerMode:e,duration:n,extra:p.fromJson(t)});this.options.requestLogger?.(i),await this.client.setPowerMode(i,o)}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const ui=s.makeMessageType("viam.component.button.v1.PushRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),_f=s.makeMessageType("viam.component.button.v1.PushResponse",[]),cb=Object.freeze(Object.defineProperty({__proto__:null,PushRequest:ui,PushResponse:_f},Symbol.toStringTag,{value:"Module"})),lb={typeName:"viam.component.button.v1.ButtonService",methods:{push:{name:"Push",I:ui,O:_f,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary}}};class db{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(lb),this.name=n,this.options=t}async push(e={},n=this.callOptions){const t=new ui({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t),await this.client.push(t,n)}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const pb={typeName:"viam.component.camera.v1.CameraService",methods:{getImages:{name:"GetImages",I:Go,O:Ou,kind:m.Unary},getPointCloud:{name:"GetPointCloud",I:Fo,O:Eu,kind:m.Unary},getProperties:{name:"GetProperties",I:Mu,O:wu,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary}}},ub="pointcloud/pcd";class gb{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(pb),this.name=n,this.options=t}async getGeometries(e={},n=this.callOptions){const t=new F({name:this.name,extra:p.fromJson(e)});return(await this.client.getGeometries(t,n)).geometries}async getImages(e=[],n={},t=this.callOptions){const o=new Go({name:this.name,filterSourceNames:e,extra:p.fromJson(n)});this.options.requestLogger?.(o);const i=await this.client.getImages(o,t),r=i.images.map(d=>({sourceName:d.sourceName,image:d.image,mimeType:d.mimeType})),c={capturedAt:i.responseMetadata?.capturedAt??new S};return{images:r,metadata:c}}async getPointCloud(e={},n=this.callOptions){const t=new Fo({name:this.name,mimeType:ub,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.getPointCloud(t,n)).pointCloud}async getProperties(e=this.callOptions){const n=new Pa({name:this.name});return this.options.requestLogger?.(n),this.client.getProperties(n,e)}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}class Tb{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(kd),this.name=n,this.options=t}async discoverResources(e={},n=this.callOptions){const t=new co({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.discoverResources(t,n)).discoveries}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const{GetPropertiesResponse:kb,PositionType:Sf}=qm;class yb{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(Lm),this.name=n,this.options=t}async resetPosition(e={},n=this.callOptions){const t=new cs({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t),await this.client.resetPosition(t,n)}async getProperties(e={},n=this.callOptions){const t=new ls({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),this.client.getProperties(t,n)}async getPosition(e=Sf.UNSPECIFIED,n={},t=this.callOptions){const o=new ms({name:this.name,positionType:e,extra:p.fromJson(n)});this.options.requestLogger?.(o);const i=await this.client.getPosition(o,t);return[i.value,i.positionType]}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}class vb{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(Vm),this.name=n,this.options=t}async getGeometries(e={},n=this.callOptions){return Xr(this.client.getGeometries,this.name,p.fromJson(e),n)}async getKinematics(e={},n=this.callOptions){return Kr(this.client.getKinematics,this.name,p.fromJson(e),n)}async getPosition(e={},n=this.callOptions){const t=new ds({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.getPosition(t,n)).positionsMm}async moveToPosition(e,n,t={},o=this.callOptions){const i=new ps({name:this.name,positionsMm:e,speedsMmPerSec:n,extra:p.fromJson(t)});this.options.requestLogger?.(i),await this.client.moveToPosition(i,o)}async home(e={},n=this.callOptions){const t=new us({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.home(t,n)).homed}async getLengths(e={},n=this.callOptions){const t=new gs({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.getLengths(t,n)).lengthsMm}async stop(e={},n=this.callOptions){const t=new Ts({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t),await this.client.stop(t,n)}async isMoving(e=this.callOptions){const n=new ks({name:this.name});return this.options.requestLogger?.(n),(await this.client.isMoving(n,e)).isMoving}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const{Capsule:hb,GeoGeometry:fb,GeoPoint:Rb,GeometriesInFrame:_b,Geometry:Sb,Orientation:Ib,PointCloud:bb,Pose:Ob,PoseInFrame:Eb,RectangularPrism:Mb,ResourceName:wb,Sphere:Cb,Transform:Nb,Vector3:Pb,WorldState:Db}=qt,If=a=>{const{latitude:e,longitude:n}=a;return!(typeof e!="number"||typeof n!="number"||Number.isNaN(e)||Number.isNaN(n))};class Ab{client;options;name;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(Hu),this.name=n,this.options=t}async metadata(e={},n=this.callOptions){const t=new $u({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),this.client.metadata(t,n)}async infer(e,n={},t=this.callOptions){const o=new Vu({name:this.name,inputTensors:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),this.client.infer(o,t)}}class Ub{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(kc),this.name=n,this.options=t}async setPower(e,n={},t=this.callOptions){const o=new bs({name:this.name,powerPct:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.setPower(o,t)}async goFor(e,n,t={},o=this.callOptions){const i=new Os({name:this.name,rpm:e,revolutions:n,extra:p.fromJson(t)});this.options.requestLogger?.(i),await this.client.goFor(i,o)}async goTo(e,n,t={},o=this.callOptions){const i=new Es({name:this.name,rpm:e,positionRevolutions:n,extra:p.fromJson(t)});this.options.requestLogger?.(i),await this.client.goTo(i,o)}async setRPM(e,n={},t=this.callOptions){const o=new Ms({name:this.name,rpm:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.setRPM(o,t)}async resetZeroPosition(e,n={},t=this.callOptions){const o=new ws({name:this.name,offset:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.resetZeroPosition(o,t)}async stop(e={},n=this.callOptions){const t=new Ns({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t),await this.client.stop(t,n)}async getProperties(e={},n=this.callOptions){const t=new Ds({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),{positionReporting:(await this.client.getProperties(t,n)).positionReporting}}async getPosition(e={},n=this.callOptions){const t=new Cs({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.getPosition(t,n)).position}async isPowered(e={},n=this.callOptions){const t=new Ps({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const o=await this.client.isPowered(t,n);return[o.isOn,o.powerPct]}async isMoving(e=this.callOptions){const n=new As({name:this.name});return this.options.requestLogger?.(n),(await this.client.isMoving(n,e)).isMoving}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}class qb{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(Oc),this.name=n,this.options=t}async getLinearVelocity(e={},n=this.callOptions){const t=new Us({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const i=(await this.client.getLinearVelocity(t,n)).linearVelocity;if(!i)throw new Error("no linear velocity");return i}async getAngularVelocity(e={},n=this.callOptions){const t=new qs({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const i=(await this.client.getAngularVelocity(t,n)).angularVelocity;if(!i)throw new Error("no angular velocity");return i}async getCompassHeading(e={},n=this.callOptions){const t=new Ls({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.getCompassHeading(t,n)).value}async getOrientation(e={},n=this.callOptions){const t=new Gs({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const i=(await this.client.getOrientation(t,n)).orientation;if(!i)throw new Error("no orientation");return i}async getPosition(e={},n=this.callOptions){const t=new Bs({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),this.client.getPosition(t,n)}async getProperties(e={},n=this.callOptions){const t=new Fs({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),this.client.getProperties(t,n)}async getAccuracy(e={},n=this.callOptions){const t=new xs({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),this.client.getAccuracy(t,n)}async getLinearAcceleration(e={},n=this.callOptions){const t=new Js({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const i=(await this.client.getLinearAcceleration(t,n)).linearAcceleration;if(!i)throw new Error("no linear acceleration");return i}async getReadings(e={},n=this.callOptions){const t=new an({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const o=await this.client.getReadings(t,n),i={};for(const r of Object.keys(o.readings)){const c=o.readings[r];c&&(i[r]=c.toJson())}return i}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const{GetAccuracyResponse:Lb,GetPositionResponse:Gb,GetPropertiesResponse:Bb}=bc;class Fb{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(Cc),this.name=n,this.options=t}async getVoltage(e={},n=this.callOptions){const t=new zs({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const o=await this.client.getVoltage(t,n);return[o.volts,o.isAc]}async getCurrent(e={},n=this.callOptions){const t=new Vs({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const o=await this.client.getCurrent(t,n);return[o.amperes,o.isAc]}async getPower(e={},n=this.callOptions){const t=new $s({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.getPower(t,n)).watts}async getReadings(e={},n=this.callOptions){const t=new an({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const o=await this.client.getReadings(t,n),i={};for(const r of Object.keys(o.readings)){const c=o.readings[r];c&&(i[r]=c.toJson())}return i}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const bf={typeName:"viam.component.sensor.v1.SensorService",methods:{getReadings:{name:"GetReadings",I:an,O:Na,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary}}},xb=Object.freeze(Object.defineProperty({__proto__:null,SensorService:bf},Symbol.toStringTag,{value:"Module"}));class Jb{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(bf),this.name=n,this.options=t}async getReadings(e={},n=this.callOptions){const t=new an({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const o=await this.client.getReadings(t,n),i={};for(const r of Object.keys(o.readings)){const c=o.readings[r];c&&(i[r]=c.toJson())}return i}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const Of=s.makeMessageType("proto.stream.v1.ListStreamsRequest",[]),Ef=s.makeMessageType("proto.stream.v1.ListStreamsResponse",()=>[{no:1,name:"names",kind:"scalar",T:9,repeated:!0}]),gi=s.makeMessageType("proto.stream.v1.AddStreamRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),Mf=s.makeMessageType("proto.stream.v1.AddStreamResponse",[]),Ti=s.makeMessageType("proto.stream.v1.RemoveStreamRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),wf=s.makeMessageType("proto.stream.v1.RemoveStreamResponse",[]),ki=s.makeMessageType("proto.stream.v1.Resolution",()=>[{no:1,name:"width",kind:"scalar",T:5},{no:2,name:"height",kind:"scalar",T:5}]),yi=s.makeMessageType("proto.stream.v1.GetStreamOptionsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),Cf=s.makeMessageType("proto.stream.v1.GetStreamOptionsResponse",()=>[{no:1,name:"resolutions",kind:"message",T:ki,repeated:!0}]),at=s.makeMessageType("proto.stream.v1.SetStreamOptionsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"resolution",kind:"message",T:ki}]),Nf=s.makeMessageType("proto.stream.v1.SetStreamOptionsResponse",[]),zb=Object.freeze(Object.defineProperty({__proto__:null,AddStreamRequest:gi,AddStreamResponse:Mf,GetStreamOptionsRequest:yi,GetStreamOptionsResponse:Cf,ListStreamsRequest:Of,ListStreamsResponse:Ef,RemoveStreamRequest:Ti,RemoveStreamResponse:wf,Resolution:ki,SetStreamOptionsRequest:at,SetStreamOptionsResponse:Nf},Symbol.toStringTag,{value:"Module"})),Vb={typeName:"proto.stream.v1.StreamService",methods:{listStreams:{name:"ListStreams",I:Of,O:Ef,kind:m.Unary},addStream:{name:"AddStream",I:gi,O:Mf,kind:m.Unary},getStreamOptions:{name:"GetStreamOptions",I:yi,O:Cf,kind:m.Unary},setStreamOptions:{name:"SetStreamOptions",I:at,O:Nf,kind:m.Unary},removeStream:{name:"RemoveStream",I:Ti,O:wf,kind:m.Unary}}},Wn=a=>a.replaceAll(":","+");class $b extends Qr{client;options;streams;constructor(e,n={}){super(),this.client=e.createServiceClient(Vb),this.options=n,this.streams=new Set,e.on("track",t=>{this.emit("track",t)}),e.on(K.CONNECTED,()=>{for(const t of this.streams.values())this.add(t)})}async add(e){const n=new gi({name:Wn(e)});this.options.requestLogger?.(n);try{await this.client.addStream(n),this.streams.add(e)}catch{n.name=e,this.options.requestLogger?.(n),await this.client.addStream(n),this.streams.add(e)}}async remove(e){const n=new Ti({name:Wn(e)});this.options.requestLogger?.(n);try{await this.client.removeStream(n),this.streams.delete(e)}catch{n.name=e,this.options.requestLogger?.(n),await this.client.removeStream(n),this.streams.delete(e)}}async getOptions(e){const n=async i=>{const r=new yi({name:i});this.options.requestLogger?.(r);try{return(await this.client.getStreamOptions(r)).resolutions}catch{return[]}},t=Wn(e);let o=await n(t);return o.length>0||(o=await n(e)),o}async setOptions(e,n,t){const o=new at({name:Wn(e),resolution:{width:n,height:t}});this.options.requestLogger?.(o);try{await this.client.setStreamOptions(o)}catch{o.name=e,this.options.requestLogger?.(o),await this.client.setStreamOptions(o)}}async resetOptions(e){const n=new at({name:Wn(e)});this.options.requestLogger?.(n);try{await this.client.setStreamOptions(n)}catch{n.name=e,this.options.requestLogger?.(n),await this.client.setStreamOptions(n)}}STREAM_TIMEOUT=5e3;getStream=async e=>{const n=new Promise((t,o)=>{const i=r=>{const[c]=r.streams;c?c.id===e&&(this.off("track",i),t(c)):(this.off("track",i),o(new Error("Received track event with no streams")))};this.on("track",i),setTimeout(()=>{this.off("track",i),o(new Error(`Did not receive a stream after ${this.STREAM_TIMEOUT} ms`))},this.STREAM_TIMEOUT)});return await this.add(e),n}}const vi=s.makeMessageType("viam.component.switch.v1.SetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"position",kind:"scalar",T:13},{no:99,name:"extra",kind:"message",T:p}]),Pf=s.makeMessageType("viam.component.switch.v1.SetPositionResponse",[]),hi=s.makeMessageType("viam.component.switch.v1.GetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Df=s.makeMessageType("viam.component.switch.v1.GetPositionResponse",()=>[{no:1,name:"position",kind:"scalar",T:13}]),fi=s.makeMessageType("viam.component.switch.v1.GetNumberOfPositionsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Af=s.makeMessageType("viam.component.switch.v1.GetNumberOfPositionsResponse",()=>[{no:1,name:"number_of_positions",kind:"scalar",T:13},{no:2,name:"labels",kind:"scalar",T:9,repeated:!0}]),Yb=Object.freeze(Object.defineProperty({__proto__:null,GetNumberOfPositionsRequest:fi,GetNumberOfPositionsResponse:Af,GetPositionRequest:hi,GetPositionResponse:Df,SetPositionRequest:vi,SetPositionResponse:Pf},Symbol.toStringTag,{value:"Module"})),Wb={typeName:"viam.component.switch.v1.SwitchService",methods:{setPosition:{name:"SetPosition",I:vi,O:Pf,kind:m.Unary},getPosition:{name:"GetPosition",I:hi,O:Df,kind:m.Unary},getNumberOfPositions:{name:"GetNumberOfPositions",I:fi,O:Af,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary}}};class Hb{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(Wb),this.name=n,this.options=t}async setPosition(e,n={},t=this.callOptions){const o=new vi({name:this.name,position:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.setPosition(o,t)}async getPosition(e={},n=this.callOptions){const t=new hi({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.getPosition(t,n)).position}async getNumberOfPositions(e={},n=this.callOptions){const t=new fi({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const o=await this.client.getNumberOfPositions(t,n);if(o.labels.length>0&&o.labels.length!==o.numberOfPositions)throw new Error("the number of labels does not match the number of positions");return[o.numberOfPositions,o.labels]}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}let jb=class{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(ys),this.name=n,this.options=t}async getGeometries(e={},n=this.callOptions){const t=new F({name:this.name,extra:p.fromJson(e)});return(await this.client.getGeometries(t,n)).geometries}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}};const Kb={typeName:"viam.component.posetracker.v1.PoseTrackerService",methods:{getPoses:{name:"GetPoses",I:s.makeMessageType("viam.component.posetracker.v1.GetPosesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"body_names",kind:"scalar",T:9,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),O:s.makeMessageType("viam.component.posetracker.v1.GetPosesResponse",()=>[{no:1,name:"body_poses",kind:"map",K:9,V:{kind:"message",T:We}}]),kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary}}};class Xb{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(Kb),this.name=n,this.options=t}async getGeometries(e={},n=this.callOptions){const t=new F({name:this.name,extra:p.fromJson(e)});return(await this.client.getGeometries(t,n)).geometries}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}class Qb{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(Km),this.name=n,this.options=t}async getGeometries(e={},n=this.callOptions){const t=new F({name:this.name,extra:p.fromJson(e)});return(await this.client.getGeometries(t,n)).geometries}async open(e={},n=this.callOptions){const t=new vs({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t),await this.client.open(t,n)}async grab(e={},n=this.callOptions){const t=new hs({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t),await this.client.grab(t,n)}async stop(e={},n=this.callOptions){const t=new fs({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t),await this.client.stop(t,n)}async isMoving(e=this.callOptions){const n=new Rs({name:this.name});return this.options.requestLogger?.(n),(await this.client.isMoving(n,e)).isMoving}async isHoldingSomething(e={},n=this.callOptions){const t=new _s({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.isHoldingSomething(t,n)).isHoldingSomething}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}class Zb{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(oc),this.name=n,this.options=t}async getEvents(e={},n=this.callOptions){const t=new Ss({controller:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.getEvents(t,n)).events}async triggerEvent(e,n={},t=this.callOptions){const o=new Is({controller:this.name,event:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.triggerEvent(o,t)}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const{Event:eO}=sc,{CollisionSpecification:nO,Constraints:aO,LinearConstraint:tO,ListPlanStatusesResponse:sO,MotionConfiguration:oO,ObstacleDetector:iO,OrientationConstraint:rO}=qd;class mO{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(Ld),this.name=n,this.options=t}async move(e,n,t,o,i={},r=this.callOptions){const c=new lo({name:this.name,destination:e,componentName:n,worldState:t,constraints:o,extra:p.fromJson(i)});return this.options.requestLogger?.(c),(await this.client.move(c,r)).success}async moveOnMap(e,n,t,o,i,r={},c=this.callOptions){const d=new po({name:this.name,destination:e,componentName:n,slamServiceName:t,motionConfiguration:o,obstacles:i,extra:p.fromJson(r)});return this.options.requestLogger?.(d),(await this.client.moveOnMap(d,c)).executionId}async moveOnGlobe(e,n,t,o,i,r,c,d={},l=this.callOptions){const u=new go({name:this.name,destination:e,componentName:n,movementSensorName:t,heading:o,obstacles:i,boundingRegions:c,motionConfiguration:r,extra:p.fromJson(d)});return this.options.requestLogger?.(u),(await this.client.moveOnGlobe(u,l)).executionId}async stopPlan(e,n={},t=this.callOptions){const o=new ko({name:this.name,componentName:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),await this.client.stopPlan(o,t),null}async getPlan(e,n,t,o={},i=this.callOptions){const r=new vo({name:this.name,componentName:e,lastPlanOnly:n,executionId:t,extra:p.fromJson(o)});return this.options.requestLogger?.(r),this.client.getPlan(r,i)}async listPlanStatuses(e,n={},t=this.callOptions){const o=new yo({name:this.name,onlyActivePlans:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),this.client.listPlanStatuses(o,t)}async getPose(e,n,t,o={},i=this.callOptions){const r=new To({name:this.name,componentName:e,destinationFrame:n,supplementalTransforms:t,extra:p.fromJson(o)});this.options.requestLogger?.(r);const d=(await this.client.getPose(r,i)).pose;if(!d)throw new Error("no pose");return d}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const Ri=s.makeMessageType("viam.service.datamanager.v1.SyncRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Uf=s.makeMessageType("viam.service.datamanager.v1.SyncResponse",[]),_i=s.makeMessageType("viam.service.datamanager.v1.UploadBinaryDataToDatasetsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"binary_data",kind:"scalar",T:12},{no:3,name:"tags",kind:"scalar",T:9,repeated:!0},{no:4,name:"dataset_ids",kind:"scalar",T:9,repeated:!0},{no:5,name:"mime_type",kind:"enum",T:s.getEnumType(of)},{no:99,name:"extra",kind:"message",T:p}]),qf=s.makeMessageType("viam.service.datamanager.v1.UploadBinaryDataToDatasetsResponse",[]),cO=Object.freeze(Object.defineProperty({__proto__:null,SyncRequest:Ri,SyncResponse:Uf,UploadBinaryDataToDatasetsRequest:_i,UploadBinaryDataToDatasetsResponse:qf},Symbol.toStringTag,{value:"Module"})),lO={typeName:"viam.service.datamanager.v1.DataManagerService",methods:{sync:{name:"Sync",I:Ri,O:Uf,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},uploadBinaryDataToDatasets:{name:"UploadBinaryDataToDatasets",I:_i,O:qf,kind:m.Unary}}};class dO{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(lO),this.name=n,this.options=t}async sync(e={},n=this.callOptions){const t=new Ri({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t),await this.client.sync(t,n)}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}async uploadBinaryDataToDatasets(e,n,t,o,i={},r=this.callOptions){const c=new _i({name:this.name,binaryData:e,tags:n,datasetIds:t,mimeType:o,extra:p.fromJson(i)});this.options.requestLogger?.(c),await this.client.uploadBinaryDataToDatasets(c,r)}}class pO{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(Xd),this.name=n,this.options=t}async getMode(e={},n=this.callOptions){const t=new Ro({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.getMode(t,n)).mode}async setMode(e,n={},t=this.callOptions){const o=new _o({name:this.name,mode:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.setMode(o,t)}async getLocation(e={},n=this.callOptions){const t=new So({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const o=await this.client.getLocation(t,n);if(!o.location)throw new Error("no location");if(!If(o.location))throw new Error("invalid location");return o}async getWayPoints(e={},n=this.callOptions){const t=new Io({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.getWaypoints(t,n)).waypoints}async addWayPoint(e,n={},t=this.callOptions){const o=new bo({name:this.name,location:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.addWaypoint(o,t)}async removeWayPoint(e,n={},t=this.callOptions){const o=new Oo({name:this.name,id:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.removeWaypoint(o,t)}async getObstacles(e={},n=this.callOptions){const t=new Eo({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.getObstacles(t,n)).obstacles}async getPaths(e={},n=this.callOptions){const t=new Mo({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.getPaths(t,n)).paths}async getProperties(e=this.callOptions){const n=new wo({name:this.name});return this.options.requestLogger?.(n),this.client.getProperties(n,e)}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const{GetLocationResponse:uO,GetPropertiesResponse:gO,Path:TO,Waypoint:kO}=Kd;class yO{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(Uc),this.name=n,this.options=t}async move(e,n={},t=this.callOptions){const o=new Ys({name:this.name,angleDeg:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.move(o,t)}async getPosition(e={},n=this.callOptions){const t=new Ws({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.getPosition(t,n)).positionDeg}async stop(e={},n=this.callOptions){const t=new Hs({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t),await this.client.stop(t,n)}async isMoving(e=this.callOptions){const n=new js({name:this.name});return this.options.requestLogger?.(n),(await this.client.isMoving(n,e)).isMoving}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}class vO{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(ip),this.name=n,this.options=t}async getPosition(e=this.callOptions){const n=new Co({name:this.name});return this.options.requestLogger?.(n),this.client.getPosition(n,e)}async getPointCloudMap(e,n=this.callOptions){const t=new No({name:this.name,returnEditedMap:e});this.options.requestLogger?.(t);const o=[],i=this.client.getPointCloudMap(t,n);for await(const r of i)o.push(r.pointCloudPcdChunk);return Lf(o)}async getInternalState(e=this.callOptions){const n=new Po({name:this.name});this.options.requestLogger?.(n);const t=[],o=this.client.getInternalState(n,e);for await(const i of o)t.push(i.internalStateChunk);return Lf(t)}async getProperties(e=this.callOptions){const n=new Do({name:this.name});return this.options.requestLogger?.(n),this.client.getProperties(n,e)}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const Lf=a=>{const e=a.reduce((o,i)=>o+i.length,0),n=new Uint8Array(e);let t=0;for(const o of a)n.set(o,t),t+=o.length;return n},{GetPositionResponse:hO,GetPropertiesResponse:fO}=op;class RO{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(zu),this.name=n,this.options=t}async getDetectionsFromCamera(e,n={},t=this.callOptions){const o=new Jo({name:this.name,cameraName:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),(await this.client.getDetectionsFromCamera(o,t)).detections}async getDetections(e,n,t,o,i={},r=this.callOptions){const c=new xo({name:this.name,image:e,width:n?BigInt(n):void 0,height:t?BigInt(t):void 0,mimeType:o,extra:p.fromJson(i)});return this.options.requestLogger?.(c),(await this.client.getDetections(c,r)).detections}async getClassificationsFromCamera(e,n,t={},o=this.callOptions){const i=new Vo({name:this.name,cameraName:e,n,extra:p.fromJson(t)});return this.options.requestLogger?.(i),(await this.client.getClassificationsFromCamera(i,o)).classifications}async getClassifications(e,n,t,o,i,r={},c=this.callOptions){const d=new zo({name:this.name,image:e,width:n,height:t,mimeType:o,n:i,extra:p.fromJson(r)});return this.options.requestLogger?.(d),(await this.client.getClassifications(d,c)).classifications}async getObjectPointClouds(e,n={},t=this.callOptions){const o=new $o({name:this.name,cameraName:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),(await this.client.getObjectPointClouds(o,t)).objects}async getProperties(e={},n=this.callOptions){const t=new Yo({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const o=await this.client.getProperties(t,n);return{classificationsSupported:o.classificationsSupported,detectionsSupported:o.detectionsSupported,objectPointCloudsSupported:o.objectPointCloudsSupported}}async captureAllFromCamera(e,{returnImage:n,returnClassifications:t,returnDetections:o,returnObjectPointClouds:i},r={},c=this.callOptions){const d=new Wo({name:this.name,cameraName:e,returnImage:n,returnClassifications:t,returnDetections:o,returnObjectPointClouds:i,extra:p.fromJson(r)});this.options.requestLogger?.(d);const l=await this.client.captureAllFromCamera(d,c);return{image:l.image,classifications:l.classifications,detections:l.detections,objectPointClouds:l.objects,extra:l.extra}}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const{Classification:_O,Detection:SO}=Ju,{PointCloudObject:IO}=qt,Gf=a=>Ia.UuidTool.toString([...a]),bO=a=>new Uint8Array(Ia.UuidTool.toBytes(a)),Si=a=>({...a,uuidString:Gf(a.uuid)});class OO{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(Zu),this.name=n,this.options=t}async listUUIDs(e={},n=this.callOptions){const t=new Ku({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.listUUIDs(t,n)).uuids.map(i=>Gf(i))}async getTransform(e,n={},t=this.callOptions){const o=new Xu({name:this.name,uuid:bO(e),extra:p.fromJson(n)});this.options.requestLogger?.(o);const i=await this.client.getTransform(o,t);if(!i.transform)throw new Error("No transform returned from server");return Si(i.transform)}async*streamTransformChanges(e={},n=this.callOptions){const t=new Qu({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const o=this.client.streamTransformChanges(t,n);for await(const i of o)i.transform&&(yield{...i,transform:Si(i.transform)})}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const Bf=s.makeMessageType("viam.service.video.v1.GetVideoRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"start_timestamp",kind:"message",T:S},{no:3,name:"end_timestamp",kind:"message",T:S},{no:4,name:"video_codec",kind:"scalar",T:9},{no:5,name:"video_container",kind:"scalar",T:9},{no:6,name:"request_id",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),EO={typeName:"viam.service.video.v1.VideoService",methods:{getVideo:{name:"GetVideo",I:Bf,O:s.makeMessageType("viam.service.video.v1.GetVideoResponse",()=>[{no:1,name:"video_data",kind:"scalar",T:12},{no:2,name:"video_container",kind:"scalar",T:9},{no:3,name:"request_id",kind:"scalar",T:9}]),kind:m.ServerStreaming},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary}}},Ff=a=>S.fromDate(a),MO=()=>crypto.randomUUID();class wO{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(EO),this.name=n,this.options=t}async*getVideo(e,n,t="",o="",i={},r=this.callOptions){const c=new Bf({name:this.name,startTimestamp:e?Ff(e):void 0,endTimestamp:n?Ff(n):void 0,videoCodec:t,videoContainer:o,requestId:MO(),extra:p.fromJson(i)});this.options.requestLogger?.(c);const d=this.client.getVideo(c,r);for await(const l of d)yield l}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const xf={typeName:"viam.service.generic.v1.GenericService",methods:{doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary}}},CO=Object.freeze(Object.defineProperty({__proto__:null,GenericService:xf},Symbol.toStringTag,{value:"Module"}));class NO{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(xf),this.name=n,this.options=t}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const PO="0.69.0";g.AnalogValue=ib,g.ArmClient=KI,g.ArmJointPositions=jI,g.AudioCodec=nb,g.AudioInClient=eb,g.AudioOutClient=tb,g.BaseClient=ob,g.BaseProperties=sb,g.BoardClient=mb,g.ButtonClient=db,g.CameraClient=gb,g.Capsule=hb,g.Classification=_O,g.Client=Ke,g.CloudConfig=pi,g.CollisionSpecification=nO,g.ConnectError=C,g.ConnectionClosedError=pe,g.Constraints=aO,g.DataManagerClient=dO,g.Detection=SO,g.DiscoveryClient=Tb,g.Duration=J,g.EncoderClient=yb,g.EncoderPositionType=Sf,g.EncoderProperties=kb,g.GantryClient=vb,g.GenericComponentClient=jb,g.GenericServiceClient=NO,g.GeoGeometry=fb,g.GeoPoint=Rb,g.GeometriesInFrame=_b,g.Geometry=Sb,g.GripperClient=Qb,g.InputControllerClient=Zb,g.InputControllerEvent=eO,g.LinearConstraint=tO,g.ListPlanStatusesResponse=sO,g.MLModelClient=Ab,g.MachineConnectionEvent=K,g.ModelType=Xe,g.MotionClient=mO,g.MotionConfiguration=oO,g.MotorClient=Ub,g.MovementSensorAccuracy=Lb,g.MovementSensorClient=qb,g.MovementSensorPosition=Gb,g.MovementSensorProperties=Bb,g.NavigationClient=pO,g.NavigationPosition=uO,g.NavigationProperties=gO,g.ObstacleDetector=iO,g.Orientation=Ib,g.OrientationConstraint=rO,g.Path=TO,g.PointCloud=bb,g.PointCloudObject=IO,g.Pose=Ob,g.PoseInFrame=Eb,g.PoseTrackerClient=Xb,g.PowerMode=rb,g.PowerSensorClient=Fb,g.RectangularPrism=Mb,g.ResourceName=wb,g.RobotClient=Ke,g.SensorClient=Jb,g.ServoClient=yO,g.SlamClient=vO,g.SlamPosition=hO,g.SlamProperties=fO,g.Sphere=Cb,g.StreamClient=$b,g.Struct=p,g.SwitchClient=Hb,g.Timestamp=S,g.TrainingStatus=Va,g.Transform=Nb,g.TransformChangeType=ju,g.Vector3=Pb,g.VideoClient=wO,g.VisionClient=RO,g.Waypoint=kO,g.WorldState=Db,g.WorldStateStoreClient=OO,g.addMetadata=E_,g.appApi=jS,g.appRobotApi=cS,g.armApi=mm,g.baseApi=ym,g.billingApi=QS,g.boardApi=Nm,g.buttonApi=cb,g.cameraApi=uS,g.commonApi=qt,g.createRobotClient=tg,g.createViamClient=WI,g.dataApi=dS,g.dataManagerApi=cO,g.deleteMetadata=M_,g.disableDebugLogging=O_,g.discoveryApi=lS,g.doCommandFromClient=q,g.enableDebugLogging=b_,g.encoderApi=qm,g.gantryApi=D_,g.genericComponentApi=A_,g.genericServiceApi=CO,g.getStatusFromClient=L,g.gripperApi=U_,g.inputControllerApi=sc,g.isValidGeoPoint=If,g.mlTrainingApi=HS,g.motionApi=qd,g.motorApi=L_,g.movementSensorApi=bc,g.navigationApi=Kd,g.powerSensorApi=G_,g.provisioningApi=VI,g.robotApi=eS,g.sensorApi=xb,g.servoApi=F_,g.slamApi=op,g.streamApi=zb,g.switchApi=Yb,g.transformWithUUID=Si,g.version=PO,g.visionApi=Ju,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});
|
|
8
|
+
};`],{type:"text/javascript"});class on{constructor(e,n){this.deferredTransport=n,this.host=e??"",this.transport=new KS(this.deferredTransport,this)}static heartbeatMonitoredMethods={};transport;currentSessionID="";sessionsSupported;heartbeatIntervalMs;host="";starting;get client(){const e=this.deferredTransport();return X(lo,e)}get sessionID(){return this.currentSessionID}setHost(e){this.host=e}getSessionMetadataInner(){const e=new Headers;return this.sessionsSupported&&this.currentSessionID!==""&&e.set("viam-sid",this.currentSessionID),e}reset(){this.starting||(this.sessionsSupported=void 0)}backgroundHeartbeat=!0;async heartbeat(){if(!this.sessionsSupported||this.currentSessionID==="")return;for(;this.starting;)await this.starting;let e;const n=async()=>{const t=new io({id:this.currentSessionID});try{await this.client.sendSessionHeartbeat(t)}catch(o){if(o instanceof C&&o.code===g.Code.Unimplemented){console.error("sessions unsupported; will not try again"),this.sessionsSupported=!1;return}if(o instanceof ge||o instanceof C&&o.rawMessage==="closed"){this.reset();return}}e?e.postMessage(this.heartbeatIntervalMs):setTimeout(()=>{n().catch(console.error)},this.heartbeatIntervalMs)};if(this.backgroundHeartbeat&&globalThis.Worker!==void 0){const t=window.URL.createObjectURL(XS);e=new Worker(t),URL.revokeObjectURL(t),e.addEventListener("message",()=>{n().catch(console.error)})}n().catch(console.error)}async getSessionMetadata(){for(;this.starting;)await this.starting;return this.sessionsSupported!==void 0?this.getSessionMetadataInner():(this.starting=new Promise((e,n)=>{(async()=>{const t=new oo;this.currentSessionID!==""&&(t.resume=this.currentSessionID);let o;try{o=await this.client.startSession(t)}catch(r){if(r instanceof C&&r.code===g.Code.Unimplemented){console.error("sessions unsupported; will not try again"),this.sessionsSupported=!1;return}throw r}const{heartbeatWindow:i}=o;if(!i)throw new Error("expected heartbeat window in response to start session");this.sessionsSupported=!0,this.currentSessionID=o.id,this.heartbeatIntervalMs=(Number(i.seconds)*1e3+i.nanos/1e6)/5,await this.applyHeartbeatMonitoredMethods(),e(),this.heartbeat().catch(console.error)})().then(e).catch(n).finally(()=>{this.starting=void 0})}),await this.starting,this.getSessionMetadataInner())}async applyHeartbeatMonitoredMethods(){try{const e=X(jS,this.transport),n=new $a({host:this.host,messageRequest:{case:"listServices",value:""}}),t=e.serverReflectionInfo(pt([n]),{timeoutMs:1e4});for await(const o of t){const i=o.messageResponse.value.service.map(c=>new $a({messageRequest:{case:"fileContainingSymbol",value:c.name}})),r=e.serverReflectionInfo(pt(i),{timeoutMs:1e4});for await(const c of r)for(const l of c.messageResponse.value.fileDescriptorProto){const d=re.fromBinary(l);for(const u of d.service)for(const h of u.method)on.heartbeatMonitoredMethods[`/${d.package}.${u.name}/${h.name}`]=on.hasHeartbeatOption(h.options)}}}catch{on.heartbeatMonitoredMethods={"/viam.component.arm.v1.ArmService/MoveToPosition":!0,"/viam.component.arm.v1.ArmService/MoveToJointPositions":!0,"/viam.component.arm.v1.ArmService/MoveThroughJointPositions":!0,"/viam.component.base.v1.BaseService/MoveStraight":!0,"/viam.component.base.v1.BaseService/Spin":!0,"/viam.component.base.v1.BaseService/SetPower":!0,"/viam.component.base.v1.BaseService/SetVelocity":!0,"/viam.component.gantry.v1.GantryService/MoveToPosition":!0,"/viam.component.gripper.v1.GripperService/Open":!0,"/viam.component.gripper.v1.GripperService/Grab":!0,"/viam.component.motor.v1.MotorService/SetPower":!0,"/viam.component.motor.v1.MotorService/GoFor":!0,"/viam.component.motor.v1.MotorService/GoTo":!0,"/viam.component.motor.v1.MotorService/SetRPM":!0,"/viam.component.servo.v1.ServoService/Move":!0}}}static hasHeartbeatOption(e){if(!e)return!1;const n=new zi(e.toBinary());for(;n.pos<n.len;){const t=n.tag(),[o]=t;if(o===am.field.no)return!0;n.string()}return!1}}const QS=s.makeEnum("viam.service.mlmodel.v1.LabelType",[{no:0,name:"LABEL_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"LABEL_TYPE_TENSOR_VALUE",localName:"TENSOR_VALUE"},{no:2,name:"LABEL_TYPE_TENSOR_AXIS",localName:"TENSOR_AXIS"}]),cg=s.makeMessageType("viam.service.mlmodel.v1.InferRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:3,name:"input_tensors",kind:"message",T:pg},{no:99,name:"extra",kind:"message",T:p}]),ZS=s.makeMessageType("viam.service.mlmodel.v1.InferResponse",()=>[{no:3,name:"output_tensors",kind:"message",T:pg}]),lg=s.makeMessageType("viam.service.mlmodel.v1.MetadataRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),eI=s.makeMessageType("viam.service.mlmodel.v1.MetadataResponse",()=>[{no:1,name:"metadata",kind:"message",T:nI}]),nI=s.makeMessageType("viam.service.mlmodel.v1.Metadata",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"description",kind:"scalar",T:9},{no:4,name:"input_info",kind:"message",T:dg,repeated:!0},{no:5,name:"output_info",kind:"message",T:dg,repeated:!0}]),dg=s.makeMessageType("viam.service.mlmodel.v1.TensorInfo",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"description",kind:"scalar",T:9},{no:3,name:"data_type",kind:"scalar",T:9},{no:4,name:"shape",kind:"scalar",T:5,repeated:!0},{no:5,name:"associated_files",kind:"message",T:aI,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),aI=s.makeMessageType("viam.service.mlmodel.v1.File",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"description",kind:"scalar",T:9},{no:3,name:"label_type",kind:"enum",T:s.getEnumType(QS)}]),tI=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataInt8",()=>[{no:1,name:"data",kind:"scalar",T:12}]),sI=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataUInt8",()=>[{no:1,name:"data",kind:"scalar",T:12}]),oI=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataInt16",()=>[{no:1,name:"data",kind:"scalar",T:7,repeated:!0}]),iI=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataUInt16",()=>[{no:1,name:"data",kind:"scalar",T:7,repeated:!0}]),rI=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataInt32",()=>[{no:1,name:"data",kind:"scalar",T:15,repeated:!0}]),mI=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataUInt32",()=>[{no:1,name:"data",kind:"scalar",T:7,repeated:!0}]),cI=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataInt64",()=>[{no:1,name:"data",kind:"scalar",T:16,repeated:!0}]),lI=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataUInt64",()=>[{no:1,name:"data",kind:"scalar",T:6,repeated:!0}]),dI=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataFloat",()=>[{no:1,name:"data",kind:"scalar",T:2,repeated:!0}]),pI=s.makeMessageType("viam.service.mlmodel.v1.FlatTensorDataDouble",()=>[{no:1,name:"data",kind:"scalar",T:1,repeated:!0}]),uI=s.makeMessageType("viam.service.mlmodel.v1.FlatTensor",()=>[{no:1,name:"shape",kind:"scalar",T:6,repeated:!0},{no:2,name:"int8_tensor",kind:"message",T:tI,oneof:"tensor"},{no:3,name:"uint8_tensor",kind:"message",T:sI,oneof:"tensor"},{no:4,name:"int16_tensor",kind:"message",T:oI,oneof:"tensor"},{no:5,name:"uint16_tensor",kind:"message",T:iI,oneof:"tensor"},{no:6,name:"int32_tensor",kind:"message",T:rI,oneof:"tensor"},{no:7,name:"uint32_tensor",kind:"message",T:mI,oneof:"tensor"},{no:8,name:"int64_tensor",kind:"message",T:cI,oneof:"tensor"},{no:9,name:"uint64_tensor",kind:"message",T:lI,oneof:"tensor"},{no:10,name:"float_tensor",kind:"message",T:dI,oneof:"tensor"},{no:11,name:"double_tensor",kind:"message",T:pI,oneof:"tensor"}]),pg=s.makeMessageType("viam.service.mlmodel.v1.FlatTensors",()=>[{no:1,name:"tensors",kind:"map",K:9,V:{kind:"message",T:uI}}]),ug={typeName:"viam.service.mlmodel.v1.MLModelService",methods:{infer:{name:"Infer",I:cg,O:ZS,kind:m.Unary},metadata:{name:"Metadata",I:lg,O:eI,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary}}},gg=s.makeEnum("viam.service.worldstatestore.v1.TransformChangeType",[{no:0,name:"TRANSFORM_CHANGE_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"TRANSFORM_CHANGE_TYPE_ADDED",localName:"ADDED"},{no:2,name:"TRANSFORM_CHANGE_TYPE_REMOVED",localName:"REMOVED"},{no:3,name:"TRANSFORM_CHANGE_TYPE_UPDATED",localName:"UPDATED"}]),Tg=s.makeMessageType("viam.service.worldstatestore.v1.ListUUIDsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),gI=s.makeMessageType("viam.service.worldstatestore.v1.ListUUIDsResponse",()=>[{no:1,name:"uuids",kind:"scalar",T:12,repeated:!0}]),kg=s.makeMessageType("viam.service.worldstatestore.v1.GetTransformRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"uuid",kind:"scalar",T:12},{no:99,name:"extra",kind:"message",T:p}]),TI=s.makeMessageType("viam.service.worldstatestore.v1.GetTransformResponse",()=>[{no:2,name:"transform",kind:"message",T:xe}]),yg=s.makeMessageType("viam.service.worldstatestore.v1.StreamTransformChangesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),kI=s.makeMessageType("viam.service.worldstatestore.v1.StreamTransformChangesResponse",()=>[{no:1,name:"change_type",kind:"enum",T:s.getEnumType(gg)},{no:2,name:"transform",kind:"message",T:xe},{no:3,name:"updated_fields",kind:"message",T:pe}]),vg={typeName:"viam.service.worldstatestore.v1.WorldStateStoreService",methods:{listUUIDs:{name:"ListUUIDs",I:Tg,O:gI,kind:m.Unary},getTransform:{name:"GetTransform",I:kg,O:TI,kind:m.Unary},streamTransformChanges:{name:"StreamTransformChanges",I:yg,O:kI,kind:m.ServerStreaming},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary}}},yI=(a,e)=>{if(a==null)throw new Error(e)},vn="Dial operation aborted",vI=a=>{const e=a;return typeof e.signalingAddress!="string"?!1:!e.iceServers||Array.isArray(e.iceServers)},hg=a=>a>0&&Number.isInteger(a),fg=a=>{if(a instanceof C&&[g.Code.Canceled,g.Code.InvalidArgument,g.Code.NotFound,g.Code.AlreadyExists,g.Code.PermissionDenied,g.Code.FailedPrecondition,g.Code.OutOfRange,g.Code.Unimplemented,g.Code.Unauthenticated].includes(a.code))return!1;if(a instanceof Error){const e=a.message.toLowerCase();if(e.includes("invalid")||e.includes("configuration")||e.includes("cannot dial"))return!1}return!0},hI=a=>{if(a.credentials&&Fn(a.credentials))try{a.credentials.authEntity=new URL(a.credentials.authEntity).host}catch(e){if(!(e instanceof TypeError))throw e}if(a.reconnectMaxAttempts!==void 0&&!hg(a.reconnectMaxAttempts))throw new Error(`Value of max reconnect attempts (${a.reconnectMaxAttempts}) should be a positive integer`);if(a.reconnectMaxWait!==void 0&&!hg(a.reconnectMaxWait))throw new Error(`Value of max reconnect wait (${a.reconnectMaxWait}) should be a positive integer`)},Rg=a=>{if(a instanceof Error&&a.message===vn)throw a};class Xe extends om{serviceHost="";webrtcOptions={enabled:!1,host:"",signalingAddress:"",rtcConfig:{}};directOptions={};sessionOptions={disabled:!1};gRPCConnectionManager;sessionManager;peerConn;dataChannel;transport;connecting;connectResolve;dialing;currentDialAbortSignal;savedCreds;closed;robotServiceClient;armServiceClient;baseServiceClient;boardServiceClient;encoderServiceClient;gantryServiceClient;genericServiceClient;gripperServiceClient;mlModelServiceClient;movementSensorServiceClient;powerSensorServiceClient;inputControllerServiceClient;motorServiceClient;navigationServiceClient;discoveryServiceClient;motionServiceClient;visionServiceClient;servoServiceClient;slamServiceClient;worldStateStoreServiceClient;currentRetryAttempt=0;isReconnecting=!1;connectionId;onICEConnectionStateChange;onDataChannelClose;onTrack;constructor(e,n,t,o){super(),e!==void 0&&(this.serviceHost=e),n&&(this.webrtcOptions=n),o&&(this.directOptions=o),t&&(this.sessionOptions=t),this.gRPCConnectionManager=new xS(()=>{if(!this.transport)throw new Error(Xe.notConnectedYetStr);return this.transport},()=>{this.onDisconnect()}),this.sessionManager=new on(this.serviceHost,()=>{if(!this.transport)throw new Error(Xe.notConnectedYetStr);return this.transport});for(const i of Object.values(K))this.on(i,()=>{this.emit("connectionstatechange",{eventType:i})});this.closed=!1}cleanupEventListeners(){this.peerConn&&this.onICEConnectionStateChange&&(this.peerConn.removeEventListener("iceconnectionstatechange",this.onICEConnectionStateChange),this.onICEConnectionStateChange=void 0),this.peerConn&&this.onTrack&&(this.peerConn.removeEventListener("track",this.onTrack),this.onTrack=void 0),this.dataChannel&&this.onDataChannelClose&&(this.dataChannel.removeEventListener("close",this.onDataChannelClose),this.onDataChannelClose=void 0)}onDisconnect(e){if(this.noReconnect!==void 0&&this.noReconnect){this.emit(K.DISCONNECTED,e??{});return}if(this.closed){this.emit(K.DISCONNECTED,e??{});return}this.isReconnecting=!0,this.emit(K.RECONNECTING,{event:e??{}}),console.debug("Connection closed, will try to reconnect");const n={retry:(t,o)=>(console.debug(`Failed to connect, attempt ${o} with backoff`,t),this.currentRetryAttempt=o,this.closed?!1:fg(t)?!0:this.shouldRetryOnError?.()?(console.debug("Non-retryable error encountered, but shouldRetryOnError returned true",t),!0):(console.debug("Non-retryable error encountered, stopping reconnection attempts",t),!1))};this.reconnectMaxWait!==void 0&&(n.maxDelay=this.reconnectMaxWait),this.reconnectMaxAttempts!==void 0&&(n.numOfAttempts=this.reconnectMaxAttempts),this.currentRetryAttempt=0,It(async()=>this.connect(),n).then(()=>{this.isReconnecting=!1,console.debug("Reconnected successfully!")}).catch(t=>{this.isReconnecting=!1,console.debug(`Reconnection failed after ${this.currentRetryAttempt} attempt(s)`,t),this.emit(K.RECONNECTION_FAILED,{error:t,attempts:this.currentRetryAttempt})})}get noReconnect(){return this.webrtcOptions.noReconnect??this.directOptions.noReconnect}get reconnectMaxAttempts(){return this.webrtcOptions.reconnectMaxAttempts??this.directOptions.reconnectMaxAttempts}get reconnectMaxWait(){return this.webrtcOptions.reconnectMaxWait??this.directOptions.reconnectMaxWait}get shouldRetryOnError(){return this.webrtcOptions.shouldRetryOnError??this.directOptions.shouldRetryOnError}get sessionId(){return this.sessionManager.sessionID}static notConnectedYetStr="not connected yet";get robotService(){if(!this.robotServiceClient)throw new Error(Xe.notConnectedYetStr);return this.robotServiceClient}get armService(){return this.armServiceClient??=this.createServiceClient(km),this.armServiceClient}get baseService(){return this.baseServiceClient??=this.createServiceClient(Om),this.baseServiceClient}get boardService(){return this.boardServiceClient??=this.createServiceClient(Bm),this.boardServiceClient}get encoderService(){return this.encoderServiceClient??=this.createServiceClient(Vm),this.encoderServiceClient}get gantryService(){return this.gantryServiceClient??=this.createServiceClient(Xm),this.gantryServiceClient}get genericService(){return this.genericServiceClient??=this.createServiceClient(fs),this.genericServiceClient}get gripperService(){return this.gripperServiceClient??=this.createServiceClient(oc),this.gripperServiceClient}get mlModelService(){return this.mlModelServiceClient??=this.createServiceClient(ug),this.mlModelServiceClient}get movementSensorService(){return this.movementSensorServiceClient??=this.createServiceClient(Uc),this.movementSensorServiceClient}get powerSensorService(){return this.powerSensorServiceClient??=this.createServiceClient(Bc),this.powerSensorServiceClient}get inputControllerService(){return this.inputControllerServiceClient??=this.createServiceClient(gc),this.inputControllerServiceClient}get motorService(){return this.motorServiceClient??=this.createServiceClient(Oc),this.motorServiceClient}get navigationService(){return this.navigationServiceClient??=this.createServiceClient(ip),this.navigationServiceClient}get discoveryService(){return this.discoveryServiceClient??=this.createServiceClient(Od),this.discoveryServiceClient}get motionService(){return this.motionServiceClient??=this.createServiceClient(Yd),this.motionServiceClient}get visionService(){return this.visionServiceClient??=this.createServiceClient(mg),this.visionServiceClient}get servoService(){return this.servoServiceClient??=this.createServiceClient(Vc),this.servoServiceClient}get slamService(){return this.slamServiceClient??=this.createServiceClient(Tp),this.slamServiceClient}get worldStateStoreService(){return this.worldStateStoreServiceClient??=this.createServiceClient(vg),this.worldStateStoreServiceClient}createServiceClient(e){return yI(this.clientTransport,Xe.notConnectedYetStr),X(e,this.clientTransport)}get peerConnection(){return this.peerConn}get clientTransport(){return this.sessionOptions.disabled?this.transport:this.sessionManager.transport}async dialWebRTC(e,n){if(n?.abort===!0)throw new Error(vn);return this.emit(K.DIALING,{method:"webrtc",attempt:this.currentRetryAttempt}),this.serviceHost=e.serviceHost??e.host,this.sessionManager.setHost(this.serviceHost),this.webrtcOptions.enabled=!0,this.webrtcOptions.host=e.host,this.webrtcOptions.signalingAddress=e.signalingAddress,this.webrtcOptions.rtcConfig.iceServers=e.iceServers??[],this.webrtcOptions.noReconnect=e.noReconnect,this.webrtcOptions.reconnectMaxWait=e.reconnectMaxWait,this.webrtcOptions.reconnectMaxAttempts=e.reconnectMaxAttempts,this.webrtcOptions.shouldRetryOnError=e.shouldRetryOnError,this.webrtcOptions.forceRelay=e.forceRelay,this.webrtcOptions.forceP2P=e.forceP2P,this.webrtcOptions.turnUri=e.turnUri,this.webrtcOptions.turnScheme=e.turnScheme,this.webrtcOptions.turnTransport=e.turnTransport,this.webrtcOptions.turnPort=e.turnPort,this.webrtcOptions.signalingInsecure=e.signalingInsecure,this.sessionOptions.disabled=e.disableSessions??!1,await this.connect({priority:e.priority,dialTimeoutMs:e.dialTimeoutMs??e.dialTimeout??Ft,creds:e.credentials,extraHeaders:e.extraHeaders}),this}async dialDirect(e,n){if(n?.abort===!0)throw new Error(vn);if(this.emit(K.DIALING,{method:"grpc",attempt:this.currentRetryAttempt}),!e.host.includes("local"))throw new Error(`cannot dial "${e.host}" directly, please use a local url instead.`);return this.serviceHost=e.host,this.sessionManager.setHost(this.serviceHost),this.webrtcOptions.enabled=!1,this.directOptions.noReconnect=e.noReconnect,this.directOptions.reconnectMaxWait=e.reconnectMaxWait,this.directOptions.reconnectMaxAttempts=e.reconnectMaxAttempts,this.directOptions.shouldRetryOnError=e.shouldRetryOnError,this.sessionOptions.disabled=e.disableSessions??!1,await this.connect({creds:e.credentials,dialTimeoutMs:e.dialTimeoutMs??e.dialTimeout??Ft,extraHeaders:e.extraHeaders}),this}resetDialing(e){this.dialing===e&&(this.dialing=void 0,this.currentDialAbortSignal=void 0)}async dial(e){hI(e),this.dialing&&this.currentDialAbortSignal&&(console.debug("Aborting previous dial attempt due to new dial call"),this.currentDialAbortSignal.abort=!0,this.dialing.catch(()=>{console.debug("Ignored abort error from previous dial")})),this.currentDialAbortSignal={abort:!1};const n=this.performDial(e,this.currentDialAbortSignal,e.reconnectAbortSignal??{abort:!1});this.dialing=n;try{const t=await n;return this.resetDialing(n),t}catch(t){if(this.resetDialing(n),t instanceof Error&&t.message===vn)return console.debug(vn),this;throw t}}createBackOffOpts({abort:e},{abort:n}){return{retry:(t,o)=>{if(e||n)throw new Error(vn);return console.debug(`Failed to connect, attempt ${o} with backoff`,t),this.currentRetryAttempt=o,this.closed?!1:fg(t)?!0:(console.debug("Non-retryable error encountered, stopping connection attempts",t),!1)}}}async tryWebRTCDial(e,n,t){try{return{dialer:await It(async()=>this.dialWebRTC(e,n),t)}}catch(o){Rg(o);const i=o instanceof Error?o:new Error(String(o));return console.debug("Failed to connect via WebRTC",i),this.emit(K.DISCONNECTED,{error:i}),{dialer:this,error:i}}}async tryDirectDial(e,n,t){try{return{dialer:await It(async()=>this.dialDirect(e,n),t)}}catch(o){Rg(o);const i=o instanceof Error?o:new Error(String(o));return console.debug("Failed to connect via gRPC",i),this.emit(K.DISCONNECTED,{error:i}),{dialer:this,error:i}}}async performDial(e,n,t){const o=this.createBackOffOpts(n,t??{abort:!1});e.reconnectMaxWait!==void 0&&(o.maxDelay=e.reconnectMaxWait),o.numOfAttempts=e.noReconnect?1:e.reconnectMaxAttempts,this.currentRetryAttempt=0;const i=[],r=vI(e),c=r?2:1,l=n.abort||t?.abort===!0;if(r&&!l){const{dialer:u,error:h}=await this.tryWebRTCDial(e,n,o);if(!h)return u;i.push(h)}if(this.currentRetryAttempt=0,!(n.abort||t?.abort===!0)){const{dialer:u,error:h}=await this.tryDirectDial(e,n,o);if(!h)return u;i.push(h)}if(i.length===c)throw new Error("Failed to connect via all methods",{cause:i});return this}async disconnect(){for(ne("client_closed",{connectionId:this.connectionId}),this.emit(K.DISCONNECTING,{}),this.currentDialAbortSignal&&this.dialing&&(this.currentDialAbortSignal.abort=!0,this.dialing.catch(()=>{console.debug("Ignored abort error from previous dial")}),this.resetDialing(this.dialing));this.connecting;)await this.connecting;this.cleanupEventListeners(),this.peerConn&&(this.peerConn.close(),this.peerConn=void 0),this.dataChannel&&(this.dataChannel.close(),this.dataChannel=void 0),this.sessionManager.reset(),this.closed=!0,this.emit(K.DISCONNECTED,{})}isConnected(){return this.peerConn?.iceConnectionState==="connected"}async connect({creds:e=this.savedCreds,priority:n,dialTimeout:t,dialTimeoutMs:o,extraHeaders:i}={}){if(this.isReconnecting||this.emit(K.CONNECTING,{}),this.closed=!1,this.connecting){for(;this.connecting!==void 0;)await this.connecting;return}const r=Dn.UuidTool.newUuid();this.connecting=new Promise(c=>{this.connectResolve=c}),this.peerConn&&(this.peerConn.close(),this.peerConn=void 0),this.dataChannel&&(this.dataChannel.close(),this.dataChannel=void 0),(!e||e!==this.savedCreds||this.sessionOptions.disabled)&&this.sessionManager.reset();try{ne("dial_started",{connectionId:r,method:this.webrtcOptions.enabled?"webrtc":"grpc",host:this.serviceHost,attempt:this.currentRetryAttempt});const c=new Headers(Bn);if(i)for(const[u,h]of Object.entries(i))if(u==="viam_client"&&c.has("viam_client")){const R=c.get("viam_client").replace("typescript;",`typescript(${h});`);c.set("viam_client",R)}else c.set(u,h);const l={webrtcOptions:{disableTrickleICE:!1,rtcConfig:this.webrtcOptions.rtcConfig,forceRelay:this.webrtcOptions.forceRelay,forceP2P:this.webrtcOptions.forceP2P,turnUri:this.webrtcOptions.turnUri,turnScheme:this.webrtcOptions.turnScheme,turnTransport:this.webrtcOptions.turnTransport,turnPort:this.webrtcOptions.turnPort,signalingInsecure:this.webrtcOptions.signalingInsecure},dialTimeoutMs:o??t??Ft,extraHeaders:c};if(e&&(Fn(e)?l.credentials=e:l.accessToken=e.payload),n!==void 0&&l.webrtcOptions&&(l.webrtcOptions.additionalSdpFields={"x-priority":n}),this.savedCreds=e,this.webrtcOptions.enabled){l.webrtcOptions&&(l.webrtcOptions.signalingCredentials=l.credentials);const u=this.webrtcOptions.signalingAddress||this.serviceHost,h=await x_(u,this.webrtcOptions.host,l,this.serviceHost!==""&&u!==this.serviceHost);this.peerConn=h.peerConnection,this.dataChannel=h.dataChannel,this.connectionId=r,this.cleanupEventListeners(),this.onICEConnectionStateChange=()=>{const I=this.peerConn?.iceConnectionState;I==="disconnected"&&ne("ice_disconnected",{connectionId:this.connectionId}),I==="closed"&&this.onDisconnect()},this.peerConn.addEventListener("iceconnectionstatechange",this.onICEConnectionStateChange),this.onDataChannelClose=I=>this.onDisconnect(I),this.dataChannel.addEventListener("close",this.onDataChannelClose),this.transport=Vr(h.transport,r),this.onTrack=I=>{const[R]=I.streams;if(!R)throw this.emit("track",I),new Error("expected event stream to exist");const O=R.id.replaceAll("+",":");Object.defineProperty(R,"id",{value:O}),this.emit("track",I)},this.peerConn.addEventListener("track",this.onTrack)}else this.connectionId=r,this.transport=Vr(await Ea(this.serviceHost,l),r),await this.gRPCConnectionManager.start();const d=this.sessionOptions.disabled?this.transport:this.sessionManager.transport;this.robotServiceClient=X(lo,d),ne("dial_success",{connectionId:r,method:this.webrtcOptions.enabled?"webrtc":"grpc",host:this.serviceHost}),this.emit(K.CONNECTED,{})}catch(c){throw ne("dial_failed",{connectionId:r,method:this.webrtcOptions.enabled?"webrtc":"grpc",host:this.serviceHost,error:c instanceof Error?c.message:String(c)}),this.isReconnecting||this.emit(K.DISCONNECTED,{}),c}finally{this.connectResolve?.(),this.connectResolve=void 0,this.connecting=void 0}}async getSessions(){return(await this.robotService.getSessions({})).sessions}async getOperations(){return(await this.robotService.getOperations({})).operations}async cancelOperation(e){await this.robotService.cancelOperation({id:e})}async blockForOperation(e){await this.robotService.blockForOperation({id:e})}async stopAll(){await this.robotService.stopAll({})}async frameSystemConfig(e){return(await this.robotService.frameSystemConfig({supplementalTransforms:e})).frameSystemConfigs}async transformPose(e,n,t,o){const i=new no({source:e,destination:n,supplementalTransforms:t}),c=(await this.robotService.transformPose(i,o)).pose;if(!c)throw new Error("no pose");return c}async transformPCD(e,n,t){const o=new ao({pointCloudPcd:e,source:n,destination:t});return(await this.robotService.transformPCD(o)).pointCloudPcd}async getModelsFromModules(){const e=new to({});return(await this.robotService.getModelsFromModules(e)).models}async getCloudMetadata(){return this.robotService.getCloudMetadata({})}async resourceNames(){return(await this.robotService.resourceNames({})).resources}async resourceRPCSubtypes(){return(await this.robotService.resourceRPCSubtypes({})).resourceRpcSubtypes}async getMachineStatus(){return this.robotService.getMachineStatus({})}async getVersion(){return this.robotService.getVersion({})}async restartModule(e,n){const t=new mo;e!==void 0&&(t.idOrName.case="moduleId",t.idOrName.value=e),n!==void 0&&(t.idOrName.case="moduleName",t.idOrName.value=n),await this.robotService.restartModule(t)}async getPose(e,n,t){const o=new co({componentName:e,destinationFrame:n,supplementalTransforms:t}),r=(await this.robotService.getPose(o)).pose;if(!r)throw new Error("no pose");return r}}const _g=async a=>{const e=await new Xe().dial(a);if(e.isConnected())return e;throw new Error("Failed to connect to robot")},Ya=s.makeEnum("viam.app.packages.v1.PackageType",[{no:0,name:"PACKAGE_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"PACKAGE_TYPE_ARCHIVE",localName:"ARCHIVE"},{no:2,name:"PACKAGE_TYPE_ML_MODEL",localName:"ML_MODEL"},{no:3,name:"PACKAGE_TYPE_MODULE",localName:"MODULE"},{no:4,name:"PACKAGE_TYPE_SLAM_MAP",localName:"SLAM_MAP"},{no:5,name:"PACKAGE_TYPE_ML_TRAINING",localName:"ML_TRAINING"}]),Qe=s.makeEnum("viam.app.mltraining.v1.ModelType",[{no:0,name:"MODEL_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MODEL_TYPE_SINGLE_LABEL_CLASSIFICATION",localName:"SINGLE_LABEL_CLASSIFICATION"},{no:2,name:"MODEL_TYPE_MULTI_LABEL_CLASSIFICATION",localName:"MULTI_LABEL_CLASSIFICATION"},{no:3,name:"MODEL_TYPE_OBJECT_DETECTION",localName:"OBJECT_DETECTION"}]),rn=s.makeEnum("viam.app.mltraining.v1.ModelFramework",[{no:0,name:"MODEL_FRAMEWORK_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MODEL_FRAMEWORK_TFLITE",localName:"TFLITE"},{no:2,name:"MODEL_FRAMEWORK_TENSORFLOW",localName:"TENSORFLOW"},{no:3,name:"MODEL_FRAMEWORK_PYTORCH",localName:"PYTORCH"},{no:4,name:"MODEL_FRAMEWORK_ONNX",localName:"ONNX"}]),Wa=s.makeEnum("viam.app.mltraining.v1.TrainingStatus",[{no:0,name:"TRAINING_STATUS_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"TRAINING_STATUS_PENDING",localName:"PENDING"},{no:2,name:"TRAINING_STATUS_IN_PROGRESS",localName:"IN_PROGRESS"},{no:3,name:"TRAINING_STATUS_COMPLETED",localName:"COMPLETED"},{no:4,name:"TRAINING_STATUS_FAILED",localName:"FAILED"},{no:5,name:"TRAINING_STATUS_CANCELED",localName:"CANCELED"},{no:6,name:"TRAINING_STATUS_CANCELING",localName:"CANCELING"}]),Sg=s.makeMessageType("viam.app.mltraining.v1.SubmitTrainingJobRequest",()=>[{no:7,name:"dataset_id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9},{no:3,name:"model_name",kind:"scalar",T:9},{no:4,name:"model_version",kind:"scalar",T:9},{no:5,name:"model_type",kind:"enum",T:s.getEnumType(Qe)},{no:8,name:"model_framework",kind:"enum",T:s.getEnumType(rn)},{no:6,name:"tags",kind:"scalar",T:9,repeated:!0}]),Ig=s.makeMessageType("viam.app.mltraining.v1.SubmitTrainingJobResponse",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Og=s.makeMessageType("viam.app.mltraining.v1.SubmitCustomTrainingJobRequest",()=>[{no:1,name:"dataset_id",kind:"scalar",T:9},{no:2,name:"registry_item_id",kind:"scalar",T:9},{no:6,name:"registry_item_version",kind:"scalar",T:9},{no:3,name:"organization_id",kind:"scalar",T:9},{no:4,name:"model_name",kind:"scalar",T:9},{no:5,name:"model_version",kind:"scalar",T:9},{no:7,name:"arguments",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:8,name:"container_version",kind:"scalar",T:9}]),bg=s.makeMessageType("viam.app.mltraining.v1.SubmitCustomTrainingJobResponse",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Mg=s.makeMessageType("viam.app.mltraining.v1.GetTrainingJobRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Eg=s.makeMessageType("viam.app.mltraining.v1.GetTrainingJobResponse",()=>[{no:1,name:"metadata",kind:"message",T:ei}]),wg=s.makeMessageType("viam.app.mltraining.v1.ListTrainingJobsRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"status",kind:"enum",T:s.getEnumType(Wa)}]),Cg=s.makeMessageType("viam.app.mltraining.v1.ListTrainingJobsResponse",()=>[{no:1,name:"jobs",kind:"message",T:ei,repeated:!0}]),ei=s.makeMessageType("viam.app.mltraining.v1.TrainingJobMetadata",()=>[{no:7,name:"id",kind:"scalar",T:9},{no:11,name:"dataset_id",kind:"scalar",T:9},{no:12,name:"organization_id",kind:"scalar",T:9},{no:13,name:"model_name",kind:"scalar",T:9},{no:14,name:"model_version",kind:"scalar",T:9},{no:15,name:"model_type",kind:"enum",T:s.getEnumType(Qe)},{no:17,name:"model_framework",kind:"enum",T:s.getEnumType(rn)},{no:18,name:"is_custom_job",kind:"scalar",T:8},{no:19,name:"registry_item_id",kind:"scalar",T:9},{no:20,name:"registry_item_version",kind:"scalar",T:9},{no:2,name:"status",kind:"enum",T:s.getEnumType(Wa)},{no:8,name:"error_status",kind:"message",T:Tn},{no:3,name:"created_on",kind:"message",T:_},{no:4,name:"last_modified",kind:"message",T:_},{no:9,name:"training_started",kind:"message",T:_},{no:10,name:"training_ended",kind:"message",T:_},{no:5,name:"synced_model_id",kind:"scalar",T:9},{no:16,name:"tags",kind:"scalar",T:9,repeated:!0},{no:21,name:"arguments",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:22,name:"container_version",kind:"scalar",T:9}]),Ng=s.makeMessageType("viam.app.mltraining.v1.CancelTrainingJobRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Pg=s.makeMessageType("viam.app.mltraining.v1.CancelTrainingJobResponse",[]),Dg=s.makeMessageType("viam.app.mltraining.v1.DeleteCompletedTrainingJobRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Ag=s.makeMessageType("viam.app.mltraining.v1.DeleteCompletedTrainingJobResponse",[]),Ug=s.makeMessageType("viam.app.mltraining.v1.TrainingJobLogEntry",()=>[{no:1,name:"level",kind:"scalar",T:9},{no:2,name:"time",kind:"message",T:_},{no:3,name:"message",kind:"scalar",T:9}]),qg=s.makeMessageType("viam.app.mltraining.v1.GetTrainingJobLogsRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"page_token",kind:"scalar",T:9,opt:!0}]),Lg=s.makeMessageType("viam.app.mltraining.v1.GetTrainingJobLogsResponse",()=>[{no:1,name:"logs",kind:"message",T:Ug,repeated:!0},{no:2,name:"next_page_token",kind:"scalar",T:9}]),Gg=s.makeMessageType("viam.app.mltraining.v1.ListSupportedContainersRequest",[]),Bg=s.makeMessageType("viam.app.mltraining.v1.ListSupportedContainersResponse",()=>[{no:1,name:"container_map",kind:"map",K:9,V:{kind:"message",T:Fg}}]),Fg=s.makeMessageType("viam.app.mltraining.v1.Container",()=>[{no:1,name:"key",kind:"scalar",T:9},{no:2,name:"uri",kind:"scalar",T:9},{no:3,name:"framework",kind:"scalar",T:9},{no:4,name:"description",kind:"scalar",T:9},{no:5,name:"eol",kind:"message",T:_}]),fI=Object.freeze(Object.defineProperty({__proto__:null,CancelTrainingJobRequest:Ng,CancelTrainingJobResponse:Pg,Container:Fg,DeleteCompletedTrainingJobRequest:Dg,DeleteCompletedTrainingJobResponse:Ag,GetTrainingJobLogsRequest:qg,GetTrainingJobLogsResponse:Lg,GetTrainingJobRequest:Mg,GetTrainingJobResponse:Eg,ListSupportedContainersRequest:Gg,ListSupportedContainersResponse:Bg,ListTrainingJobsRequest:wg,ListTrainingJobsResponse:Cg,ModelFramework:rn,ModelType:Qe,SubmitCustomTrainingJobRequest:Og,SubmitCustomTrainingJobResponse:bg,SubmitTrainingJobRequest:Sg,SubmitTrainingJobResponse:Ig,TrainingJobLogEntry:Ug,TrainingJobMetadata:ei,TrainingStatus:Wa},Symbol.toStringTag,{value:"Module"})),Ha=s.makeEnum("viam.app.v1.OnlineState",[{no:0,name:"ONLINE_STATE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"ONLINE_STATE_ONLINE",localName:"ONLINE"},{no:2,name:"ONLINE_STATE_OFFLINE",localName:"OFFLINE"},{no:3,name:"ONLINE_STATE_AWAITING_SETUP",localName:"AWAITING_SETUP"}]),xg=s.makeEnum("viam.app.v1.AuthenticationType",[{no:0,name:"AUTHENTICATION_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"AUTHENTICATION_TYPE_WEB_OAUTH",localName:"WEB_OAUTH"},{no:2,name:"AUTHENTICATION_TYPE_API_KEY",localName:"API_KEY"},{no:3,name:"AUTHENTICATION_TYPE_ROBOT_PART_SECRET",localName:"ROBOT_PART_SECRET"},{no:4,name:"AUTHENTICATION_TYPE_LOCATION_SECRET",localName:"LOCATION_SECRET"}]),Vn=s.makeEnum("viam.app.v1.FragmentVisibility",[{no:0,name:"FRAGMENT_VISIBILITY_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"FRAGMENT_VISIBILITY_PRIVATE",localName:"PRIVATE"},{no:2,name:"FRAGMENT_VISIBILITY_PUBLIC",localName:"PUBLIC"},{no:3,name:"FRAGMENT_VISIBILITY_PUBLIC_UNLISTED",localName:"PUBLIC_UNLISTED"}]),Jg=s.makeEnum("viam.app.v1.FragmentErrorType",[{no:0,name:"FRAGMENT_ERROR_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"FRAGMENT_ERROR_TYPE_NO_ACCESS",localName:"NO_ACCESS"},{no:2,name:"FRAGMENT_ERROR_TYPE_NESTING_LIMIT_EXCEEDED",localName:"NESTING_LIMIT_EXCEEDED"},{no:3,name:"FRAGMENT_ERROR_TYPE_CHILD_ID_INVALID",localName:"CHILD_ID_INVALID"},{no:4,name:"FRAGMENT_ERROR_TYPE_CYCLE_DETECTED",localName:"CYCLE_DETECTED"}]),ja=s.makeEnum("viam.app.v1.ModuleSourceType",[{no:0,name:"MODULE_SOURCE_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MODULE_SOURCE_TYPE_EXTERNAL",localName:"EXTERNAL"},{no:2,name:"MODULE_SOURCE_TYPE_VIAM_HOSTED",localName:"VIAM_HOSTED"}]),Ka=s.makeEnum("viam.app.v1.ModuleLanguage",[{no:0,name:"MODULE_LANGUAGE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MODULE_LANGUAGE_GOLANG",localName:"GOLANG"},{no:2,name:"MODULE_LANGUAGE_PYTHON",localName:"PYTHON"},{no:3,name:"MODULE_LANGUAGE_CPP",localName:"CPP"}]),zg=s.makeEnum("viam.app.v1.RegistryItemStatus",[{no:0,name:"REGISTRY_ITEM_STATUS_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"REGISTRY_ITEM_STATUS_PUBLISHED",localName:"PUBLISHED"},{no:2,name:"REGISTRY_ITEM_STATUS_IN_DEVELOPMENT",localName:"IN_DEVELOPMENT"}]),hn=s.makeEnum("viam.app.v1.Visibility",[{no:0,name:"VISIBILITY_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"VISIBILITY_PRIVATE",localName:"PRIVATE"},{no:2,name:"VISIBILITY_PUBLIC",localName:"PUBLIC"},{no:3,name:"VISIBILITY_PUBLIC_UNLISTED",localName:"PUBLIC_UNLISTED"}]),Vg=s.makeEnum("viam.app.v1.AppType",[{no:0,name:"APP_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"APP_TYPE_SINGLE_MACHINE",localName:"SINGLE_MACHINE"},{no:2,name:"APP_TYPE_MULTI_MACHINE",localName:"MULTI_MACHINE"}]),$g=s.makeEnum("viam.app.v1.ClientAuthentication",[{no:0,name:"CLIENT_AUTHENTICATION_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"CLIENT_AUTHENTICATION_REQUIRED",localName:"REQUIRED"},{no:2,name:"CLIENT_AUTHENTICATION_NOT_REQUIRED",localName:"NOT_REQUIRED"},{no:3,name:"CLIENT_AUTHENTICATION_NOT_REQUIRED_WHEN_USING_PKCE",localName:"NOT_REQUIRED_WHEN_USING_PKCE"}]),Yg=s.makeEnum("viam.app.v1.PKCE",[{no:0,name:"PKCE_UNSPECIFIED"},{no:1,name:"PKCE_REQUIRED"},{no:2,name:"PKCE_NOT_REQUIRED"},{no:3,name:"PKCE_NOT_REQUIRED_WHEN_USING_CLIENT_AUTHENTICATION"}]),Wg=s.makeEnum("viam.app.v1.URLValidation",[{no:0,name:"URL_VALIDATION_UNSPECIFIED"},{no:1,name:"URL_VALIDATION_EXACT_MATCH"},{no:2,name:"URL_VALIDATION_ALLOW_WILDCARDS"}]),Hg=s.makeEnum("viam.app.v1.EnabledGrant",[{no:0,name:"ENABLED_GRANT_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"ENABLED_GRANT_AUTHORIZATION_CODE",localName:"AUTHORIZATION_CODE"},{no:2,name:"ENABLED_GRANT_IMPLICIT",localName:"IMPLICIT"},{no:3,name:"ENABLED_GRANT_PASSWORD",localName:"PASSWORD"},{no:4,name:"ENABLED_GRANT_REFRESH_TOKEN",localName:"REFRESH_TOKEN"},{no:5,name:"ENABLED_GRANT_DEVICE_CODE",localName:"DEVICE_CODE"}]),fn=s.makeMessageType("viam.app.v1.Robot",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"location",kind:"scalar",T:9},{no:4,name:"last_access",kind:"message",T:_},{no:5,name:"created_on",kind:"message",T:_},{no:6,name:"online_state",kind:"enum",T:s.getEnumType(Ha)},{no:7,name:"seconds_since_online",kind:"scalar",T:3}]),mn=s.makeMessageType("viam.app.v1.RobotPart",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:10,name:"dns_name",kind:"scalar",T:9},{no:3,name:"secret",kind:"scalar",T:9},{no:4,name:"robot",kind:"scalar",T:9},{no:12,name:"location_id",kind:"scalar",T:9},{no:5,name:"robot_config",kind:"message",T:p},{no:6,name:"last_access",kind:"message",T:_},{no:7,name:"user_supplied_info",kind:"message",T:p},{no:8,name:"main_part",kind:"scalar",T:8},{no:9,name:"fqdn",kind:"scalar",T:9},{no:11,name:"local_fqdn",kind:"scalar",T:9},{no:13,name:"created_on",kind:"message",T:_},{no:14,name:"secrets",kind:"message",T:si,repeated:!0},{no:15,name:"last_updated",kind:"message",T:_},{no:16,name:"online_state",kind:"enum",T:s.getEnumType(Ha)},{no:17,name:"seconds_since_online",kind:"scalar",T:3},{no:18,name:"robot_config_json",kind:"scalar",T:9,opt:!0}]),jg=s.makeMessageType("viam.app.v1.RobotPartHistoryEntry",()=>[{no:1,name:"part",kind:"scalar",T:9},{no:2,name:"robot",kind:"scalar",T:9},{no:3,name:"when",kind:"message",T:_},{no:4,name:"old",kind:"message",T:mn},{no:5,name:"edited_by",kind:"message",T:ni}]),ni=s.makeMessageType("viam.app.v1.AuthenticatorInfo",()=>[{no:1,name:"type",kind:"enum",T:s.getEnumType(xg)},{no:2,name:"value",kind:"scalar",T:9},{no:3,name:"is_deactivated",kind:"scalar",T:8}]),Kg=s.makeMessageType("viam.app.v1.ListOrganizationsRequest",[]),Rn=s.makeMessageType("viam.app.v1.Organization",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"created_on",kind:"message",T:_},{no:4,name:"public_namespace",kind:"scalar",T:9},{no:5,name:"default_region",kind:"scalar",T:9},{no:6,name:"cid",kind:"scalar",T:9,opt:!0},{no:7,name:"default_fragments",kind:"message",T:ai,opt:!0}]),Xg=s.makeMessageType("viam.app.v1.OrganizationMember",()=>[{no:1,name:"user_id",kind:"scalar",T:9},{no:2,name:"emails",kind:"scalar",T:9,repeated:!0},{no:3,name:"date_added",kind:"message",T:_},{no:4,name:"last_login",kind:"message",T:_,opt:!0},{no:5,name:"last_access",kind:"message",T:_,opt:!0}]),Qg=s.makeMessageType("viam.app.v1.ListOrganizationsResponse",()=>[{no:1,name:"organizations",kind:"message",T:Rn,repeated:!0}]),$n=s.makeMessageType("viam.app.v1.OrganizationInvite",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"email",kind:"scalar",T:9},{no:3,name:"created_on",kind:"message",T:_},{no:4,name:"authorizations",kind:"message",T:ae,repeated:!0}]),Zg=s.makeMessageType("viam.app.v1.CreateOrganizationRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),eT=s.makeMessageType("viam.app.v1.CreateOrganizationResponse",()=>[{no:1,name:"organization",kind:"message",T:Rn}]),nT=s.makeMessageType("viam.app.v1.GetOrganizationRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),aT=s.makeMessageType("viam.app.v1.GetOrganizationResponse",()=>[{no:1,name:"organization",kind:"message",T:Rn}]),tT=s.makeMessageType("viam.app.v1.GetOrganizationNamespaceAvailabilityRequest",()=>[{no:1,name:"public_namespace",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9}]),sT=s.makeMessageType("viam.app.v1.GetOrganizationNamespaceAvailabilityResponse",()=>[{no:1,name:"available",kind:"scalar",T:8}]),ai=s.makeMessageType("viam.app.v1.FragmentImportList",()=>[{no:1,name:"fragments",kind:"message",T:Wk,repeated:!0}]),oT=s.makeMessageType("viam.app.v1.UpdateOrganizationRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9,opt:!0},{no:3,name:"public_namespace",kind:"scalar",T:9,opt:!0},{no:4,name:"region",kind:"scalar",T:9,opt:!0},{no:5,name:"cid",kind:"scalar",T:9,opt:!0},{no:6,name:"default_fragments",kind:"message",T:ai,opt:!0}]),iT=s.makeMessageType("viam.app.v1.UpdateOrganizationResponse",()=>[{no:1,name:"organization",kind:"message",T:Rn}]),rT=s.makeMessageType("viam.app.v1.UpdateOrganizationNamespaceRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"new_public_namespace",kind:"scalar",T:9}]),mT=s.makeMessageType("viam.app.v1.UpdateOrganizationNamespaceResponse",()=>[{no:1,name:"organization",kind:"message",T:Rn}]),cT=s.makeMessageType("viam.app.v1.DeleteOrganizationRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),lT=s.makeMessageType("viam.app.v1.DeleteOrganizationResponse",[]),dT=s.makeMessageType("viam.app.v1.GetOrganizationMetadataRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),pT=s.makeMessageType("viam.app.v1.GetOrganizationMetadataResponse",()=>[{no:1,name:"data",kind:"message",T:p}]),uT=s.makeMessageType("viam.app.v1.UpdateOrganizationMetadataRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"data",kind:"message",T:p}]),gT=s.makeMessageType("viam.app.v1.UpdateOrganizationMetadataResponse",[]),TT=s.makeMessageType("viam.app.v1.ListOrganizationMembersRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),kT=s.makeMessageType("viam.app.v1.ListOrganizationMembersResponse",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"members",kind:"message",T:Xg,repeated:!0},{no:3,name:"invites",kind:"message",T:$n,repeated:!0}]),yT=s.makeMessageType("viam.app.v1.CreateOrganizationInviteRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"email",kind:"scalar",T:9},{no:3,name:"authorizations",kind:"message",T:ae,repeated:!0},{no:4,name:"send_email_invite",kind:"scalar",T:8,opt:!0}]),vT=s.makeMessageType("viam.app.v1.CreateOrganizationInviteResponse",()=>[{no:1,name:"invite",kind:"message",T:$n}]),hT=s.makeMessageType("viam.app.v1.UpdateOrganizationInviteAuthorizationsRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"email",kind:"scalar",T:9},{no:3,name:"add_authorizations",kind:"message",T:ae,repeated:!0},{no:4,name:"remove_authorizations",kind:"message",T:ae,repeated:!0}]),fT=s.makeMessageType("viam.app.v1.UpdateOrganizationInviteAuthorizationsResponse",()=>[{no:1,name:"invite",kind:"message",T:$n}]),RT=s.makeMessageType("viam.app.v1.DeleteOrganizationInviteRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"email",kind:"scalar",T:9}]),_T=s.makeMessageType("viam.app.v1.DeleteOrganizationInviteResponse",[]),ST=s.makeMessageType("viam.app.v1.ResendOrganizationInviteRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"email",kind:"scalar",T:9},{no:3,name:"send_email_invite",kind:"scalar",T:8,opt:!0}]),IT=s.makeMessageType("viam.app.v1.ResendOrganizationInviteResponse",()=>[{no:1,name:"invite",kind:"message",T:$n}]),OT=s.makeMessageType("viam.app.v1.DeleteOrganizationMemberRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"user_id",kind:"scalar",T:9}]),bT=s.makeMessageType("viam.app.v1.DeleteOrganizationMemberResponse",[]),Xa=s.makeMessageType("viam.app.v1.BillingAddress",()=>[{no:1,name:"address_line_1",kind:"scalar",T:9},{no:2,name:"address_line_2",kind:"scalar",T:9,opt:!0},{no:3,name:"city",kind:"scalar",T:9},{no:4,name:"state",kind:"scalar",T:9},{no:5,name:"zipcode",kind:"scalar",T:9},{no:6,name:"country",kind:"scalar",T:9}]),MT=s.makeMessageType("viam.app.v1.EnableBillingServiceRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"billing_address",kind:"message",T:Xa}]),ET=s.makeMessageType("viam.app.v1.EnableBillingServiceResponse",[]),wT=s.makeMessageType("viam.app.v1.UpdateBillingServiceRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"billing_address",kind:"message",T:Xa}]),CT=s.makeMessageType("viam.app.v1.UpdateBillingServiceResponse",[]),NT=s.makeMessageType("viam.app.v1.GetBillingServiceConfigRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),PT=s.makeMessageType("viam.app.v1.GetBillingServiceConfigResponse",()=>[{no:1,name:"billing_address",kind:"message",T:Xa},{no:2,name:"support_email",kind:"scalar",T:9},{no:3,name:"logo_url",kind:"scalar",T:9},{no:4,name:"billing_dashboard_url",kind:"scalar",T:9}]),DT=s.makeMessageType("viam.app.v1.DisableBillingServiceRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),AT=s.makeMessageType("viam.app.v1.DisableBillingServiceResponse",[]),UT=s.makeMessageType("viam.app.v1.OrganizationSetSupportEmailRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"email",kind:"scalar",T:9}]),qT=s.makeMessageType("viam.app.v1.OrganizationSetSupportEmailResponse",[]),LT=s.makeMessageType("viam.app.v1.OrganizationGetSupportEmailRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),GT=s.makeMessageType("viam.app.v1.OrganizationGetSupportEmailResponse",()=>[{no:1,name:"email",kind:"scalar",T:9}]),ti=s.makeMessageType("viam.app.v1.OrganizationIdentity",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),BT=s.makeMessageType("viam.app.v1.LocationOrganization",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"primary",kind:"scalar",T:8}]),Qa=s.makeMessageType("viam.app.v1.LocationAuth",()=>[{no:1,name:"secret",kind:"scalar",T:9},{no:2,name:"location_id",kind:"scalar",T:9},{no:3,name:"secrets",kind:"message",T:si,repeated:!0}]),FT=s.makeMessageType("viam.app.v1.StorageConfig",()=>[{no:1,name:"region",kind:"scalar",T:9}]),Yn=s.makeMessageType("viam.app.v1.Location",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:4,name:"parent_location_id",kind:"scalar",T:9},{no:5,name:"auth",kind:"message",T:Qa},{no:6,name:"organizations",kind:"message",T:BT,repeated:!0},{no:3,name:"created_on",kind:"message",T:_},{no:7,name:"robot_count",kind:"scalar",T:5},{no:8,name:"config",kind:"message",T:FT},{no:9,name:"primary_org_identity",kind:"message",T:ti,opt:!0}]),si=s.makeMessageType("viam.app.v1.SharedSecret",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"secret",kind:"scalar",T:9},{no:3,name:"created_on",kind:"message",T:_},{no:4,name:"state",kind:"enum",T:s.getEnumType(xT)}]),xT=s.makeEnum("viam.app.v1.SharedSecret.State",[{no:0,name:"STATE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"STATE_ENABLED",localName:"ENABLED"},{no:2,name:"STATE_DISABLED",localName:"DISABLED"}]),JT=s.makeMessageType("viam.app.v1.CreateLocationRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"parent_location_id",kind:"scalar",T:9,opt:!0}]),zT=s.makeMessageType("viam.app.v1.CreateLocationResponse",()=>[{no:1,name:"location",kind:"message",T:Yn}]),VT=s.makeMessageType("viam.app.v1.GetLocationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),$T=s.makeMessageType("viam.app.v1.GetLocationResponse",()=>[{no:1,name:"location",kind:"message",T:Yn}]),YT=s.makeMessageType("viam.app.v1.UpdateLocationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9,opt:!0},{no:3,name:"parent_location_id",kind:"scalar",T:9,opt:!0},{no:4,name:"region",kind:"scalar",T:9,opt:!0}]),WT=s.makeMessageType("viam.app.v1.UpdateLocationResponse",()=>[{no:1,name:"location",kind:"message",T:Yn}]),HT=s.makeMessageType("viam.app.v1.DeleteLocationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),jT=s.makeMessageType("viam.app.v1.DeleteLocationResponse",[]),KT=s.makeMessageType("viam.app.v1.GetLocationMetadataRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),XT=s.makeMessageType("viam.app.v1.GetLocationMetadataResponse",()=>[{no:1,name:"data",kind:"message",T:p}]),QT=s.makeMessageType("viam.app.v1.UpdateLocationMetadataRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9},{no:2,name:"data",kind:"message",T:p}]),ZT=s.makeMessageType("viam.app.v1.UpdateLocationMetadataResponse",[]),ek=s.makeMessageType("viam.app.v1.GetOrganizationsWithAccessToLocationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),nk=s.makeMessageType("viam.app.v1.GetOrganizationsWithAccessToLocationResponse",()=>[{no:1,name:"organization_identities",kind:"message",T:ti,repeated:!0}]),ak=s.makeMessageType("viam.app.v1.ListLocationsRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),tk=s.makeMessageType("viam.app.v1.ShareLocationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9}]),sk=s.makeMessageType("viam.app.v1.ShareLocationResponse",[]),ok=s.makeMessageType("viam.app.v1.UnshareLocationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9}]),ik=s.makeMessageType("viam.app.v1.UnshareLocationResponse",[]),rk=s.makeMessageType("viam.app.v1.ListLocationsResponse",()=>[{no:1,name:"locations",kind:"message",T:Yn,repeated:!0}]),mk=s.makeMessageType("viam.app.v1.CreateLocationSecretRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),ck=s.makeMessageType("viam.app.v1.CreateLocationSecretResponse",()=>[{no:1,name:"auth",kind:"message",T:Qa}]),lk=s.makeMessageType("viam.app.v1.DeleteLocationSecretRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9},{no:2,name:"secret_id",kind:"scalar",T:9}]),dk=s.makeMessageType("viam.app.v1.DeleteLocationSecretResponse",[]),pk=s.makeMessageType("viam.app.v1.LocationAuthRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),uk=s.makeMessageType("viam.app.v1.LocationAuthResponse",()=>[{no:1,name:"auth",kind:"message",T:Qa}]),gk=s.makeMessageType("viam.app.v1.GetRobotRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Tk=s.makeMessageType("viam.app.v1.GetRoverRentalRobotsRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),kk=s.makeMessageType("viam.app.v1.RoverRentalRobot",()=>[{no:1,name:"robot_id",kind:"scalar",T:9},{no:2,name:"location_id",kind:"scalar",T:9},{no:3,name:"robot_name",kind:"scalar",T:9},{no:4,name:"robot_main_part_id",kind:"scalar",T:9}]),yk=s.makeMessageType("viam.app.v1.GetRoverRentalRobotsResponse",()=>[{no:1,name:"robots",kind:"message",T:kk,repeated:!0}]),vk=s.makeMessageType("viam.app.v1.GetRobotResponse",()=>[{no:1,name:"robot",kind:"message",T:fn}]),hk=s.makeMessageType("viam.app.v1.GetRobotPartsRequest",()=>[{no:1,name:"robot_id",kind:"scalar",T:9}]),fk=s.makeMessageType("viam.app.v1.GetRobotPartsResponse",()=>[{no:1,name:"parts",kind:"message",T:mn,repeated:!0}]),Rk=s.makeMessageType("viam.app.v1.GetRobotPartRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),_k=s.makeMessageType("viam.app.v1.GetRobotPartResponse",()=>[{no:1,name:"part",kind:"message",T:mn},{no:2,name:"config_json",kind:"scalar",T:9}]),Sk=s.makeMessageType("viam.app.v1.GetRobotPartByNameAndLocationRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"location_id",kind:"scalar",T:9}]),Ik=s.makeMessageType("viam.app.v1.GetRobotPartByNameAndLocationResponse",()=>[{no:1,name:"part",kind:"message",T:mn}]),Ok=s.makeMessageType("viam.app.v1.GetRobotPartLogsRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"errors_only",kind:"scalar",T:8},{no:3,name:"filter",kind:"scalar",T:9,opt:!0},{no:4,name:"page_token",kind:"scalar",T:9,opt:!0},{no:5,name:"levels",kind:"scalar",T:9,repeated:!0},{no:6,name:"start",kind:"message",T:_,opt:!0},{no:7,name:"end",kind:"message",T:_,opt:!0},{no:8,name:"limit",kind:"scalar",T:3,opt:!0},{no:9,name:"source",kind:"scalar",T:9,opt:!0},{no:10,name:"user_facing_only",kind:"scalar",T:8,opt:!0}]),bk=s.makeMessageType("viam.app.v1.GetRobotPartLogsResponse",()=>[{no:1,name:"logs",kind:"message",T:Ln,repeated:!0},{no:2,name:"next_page_token",kind:"scalar",T:9}]),Mk=s.makeMessageType("viam.app.v1.TailRobotPartLogsRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"errors_only",kind:"scalar",T:8},{no:3,name:"filter",kind:"scalar",T:9,opt:!0}]),Ek=s.makeMessageType("viam.app.v1.TailRobotPartLogsResponse",()=>[{no:1,name:"logs",kind:"message",T:Ln,repeated:!0}]),wk=s.makeMessageType("viam.app.v1.GetRobotPartHistoryRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"page_token",kind:"scalar",T:9,opt:!0},{no:3,name:"page_limit",kind:"scalar",T:3,opt:!0},{no:4,name:"start",kind:"message",T:_,opt:!0},{no:5,name:"end",kind:"message",T:_,opt:!0}]),Ck=s.makeMessageType("viam.app.v1.GetRobotPartHistoryResponse",()=>[{no:1,name:"history",kind:"message",T:jg,repeated:!0},{no:2,name:"next_page_token",kind:"scalar",T:9}]),Nk=s.makeMessageType("viam.app.v1.UpdateRobotPartRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"robot_config",kind:"message",T:p},{no:4,name:"last_known_update",kind:"message",T:_,opt:!0},{no:5,name:"robot_config_json",kind:"scalar",T:9,opt:!0}]),Pk=s.makeMessageType("viam.app.v1.UpdateRobotPartResponse",()=>[{no:1,name:"part",kind:"message",T:mn}]),Dk=s.makeMessageType("viam.app.v1.NewRobotPartRequest",()=>[{no:1,name:"robot_id",kind:"scalar",T:9},{no:2,name:"part_name",kind:"scalar",T:9}]),Ak=s.makeMessageType("viam.app.v1.NewRobotPartResponse",()=>[{no:1,name:"part_id",kind:"scalar",T:9}]),Uk=s.makeMessageType("viam.app.v1.DeleteRobotPartRequest",()=>[{no:1,name:"part_id",kind:"scalar",T:9}]),qk=s.makeMessageType("viam.app.v1.GetRobotPartMetadataRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Lk=s.makeMessageType("viam.app.v1.GetRobotPartMetadataResponse",()=>[{no:1,name:"data",kind:"message",T:p}]),Gk=s.makeMessageType("viam.app.v1.UpdateRobotPartMetadataRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"data",kind:"message",T:p}]),Bk=s.makeMessageType("viam.app.v1.UpdateRobotPartMetadataResponse",[]),Fk=s.makeMessageType("viam.app.v1.GetRobotAPIKeysRequest",()=>[{no:1,name:"robot_id",kind:"scalar",T:9}]),xk=s.makeMessageType("viam.app.v1.APIKey",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"key",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"created_on",kind:"message",T:_}]),Jk=s.makeMessageType("viam.app.v1.GetRobotAPIKeysResponse",()=>[{no:1,name:"api_keys",kind:"message",T:pi,repeated:!0}]),zk=s.makeMessageType("viam.app.v1.DeleteRobotPartResponse",[]),Ze=s.makeMessageType("viam.app.v1.Fragment",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"fragment",kind:"message",T:p},{no:4,name:"organization_owner",kind:"scalar",T:9},{no:5,name:"public",kind:"scalar",T:8},{no:6,name:"created_on",kind:"message",T:_},{no:7,name:"organization_name",kind:"scalar",T:9},{no:9,name:"robot_part_count",kind:"scalar",T:5},{no:10,name:"organization_count",kind:"scalar",T:5},{no:11,name:"only_used_by_owner",kind:"scalar",T:8},{no:12,name:"visibility",kind:"enum",T:s.getEnumType(Vn)},{no:13,name:"last_updated",kind:"message",T:_},{no:14,name:"revision",kind:"scalar",T:9}]),Vk=s.makeMessageType("viam.app.v1.FragmentHistoryEntry",()=>[{no:1,name:"fragment",kind:"scalar",T:9},{no:2,name:"edited_on",kind:"message",T:_},{no:3,name:"old",kind:"message",T:Ze},{no:4,name:"edited_by",kind:"message",T:ni},{no:5,name:"revision",kind:"scalar",T:9},{no:6,name:"config",kind:"message",T:p}]),$k=s.makeMessageType("viam.app.v1.FragmentRevision",()=>[{no:1,name:"revision",kind:"scalar",T:9},{no:2,name:"created_at",kind:"message",T:_}]),Za=s.makeMessageType("viam.app.v1.FragmentTag",()=>[{no:1,name:"tag",kind:"scalar",T:9},{no:2,name:"revision",kind:"scalar",T:9}]),Yk=s.makeMessageType("viam.app.v1.FragmentError",()=>[{no:1,name:"error_type",kind:"enum",T:s.getEnumType(Jg)},{no:2,name:"fragment_id",kind:"scalar",T:9},{no:3,name:"detail",kind:"scalar",T:9}]),et=s.makeMessageType("viam.app.v1.FragmentUsage",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9},{no:2,name:"organizations",kind:"scalar",T:5},{no:3,name:"machines",kind:"scalar",T:5},{no:4,name:"machines_in_current_org",kind:"scalar",T:5},{no:5,name:"version",kind:"scalar",T:9,opt:!0}]),Wk=s.makeMessageType("viam.app.v1.FragmentImport",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"prefix",kind:"scalar",T:9,opt:!0},{no:4,name:"variables",kind:"map",K:9,V:{kind:"scalar",T:9}}]),oi=s.makeMessageType("viam.app.v1.ResolvedFragment",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9},{no:2,name:"resolved_config",kind:"message",T:p},{no:3,name:"error",kind:"message",T:Yk},{no:4,name:"revision",kind:"scalar",T:9}]),Hk=s.makeMessageType("viam.app.v1.ListFragmentsRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"show_public",kind:"scalar",T:8},{no:3,name:"fragment_visibility",kind:"enum",T:s.getEnumType(Vn),repeated:!0}]),jk=s.makeMessageType("viam.app.v1.ListFragmentsResponse",()=>[{no:1,name:"fragments",kind:"message",T:Ze,repeated:!0},{no:2,name:"fragment_usages",kind:"message",T:et,repeated:!0}]),Kk=s.makeMessageType("viam.app.v1.GetFragmentRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"current_organization_id",kind:"scalar",T:9},{no:3,name:"version",kind:"scalar",T:9,opt:!0}]),Xk=s.makeMessageType("viam.app.v1.GetFragmentResponse",()=>[{no:1,name:"fragment",kind:"message",T:Ze},{no:2,name:"fragment_usage",kind:"message",T:et},{no:3,name:"revisions",kind:"message",T:$k,repeated:!0},{no:4,name:"tags",kind:"message",T:Za,repeated:!0}]),Qk=s.makeMessageType("viam.app.v1.CreateFragmentRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"config",kind:"message",T:p},{no:3,name:"organization_id",kind:"scalar",T:9},{no:4,name:"visibility",kind:"enum",T:s.getEnumType(Vn),opt:!0}]),Zk=s.makeMessageType("viam.app.v1.CreateFragmentResponse",()=>[{no:1,name:"fragment",kind:"message",T:Ze}]),ey=s.makeMessageType("viam.app.v1.UpdateFragmentRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"config",kind:"message",T:p},{no:4,name:"public",kind:"scalar",T:8,opt:!0},{no:5,name:"visibility",kind:"enum",T:s.getEnumType(Vn),opt:!0},{no:6,name:"last_known_update",kind:"message",T:_,opt:!0}]),ny=s.makeMessageType("viam.app.v1.UpdateFragmentResponse",()=>[{no:1,name:"fragment",kind:"message",T:Ze}]),ay=s.makeMessageType("viam.app.v1.DeleteFragmentRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),ty=s.makeMessageType("viam.app.v1.DeleteFragmentResponse",[]),sy=s.makeMessageType("viam.app.v1.GetFragmentHistoryRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"page_token",kind:"scalar",T:9,opt:!0},{no:3,name:"page_limit",kind:"scalar",T:3,opt:!0}]),oy=s.makeMessageType("viam.app.v1.GetFragmentHistoryResponse",()=>[{no:1,name:"history",kind:"message",T:Vk,repeated:!0},{no:2,name:"next_page_token",kind:"scalar",T:9}]),iy=s.makeMessageType("viam.app.v1.GetFragmentUsageRequest",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9}]),ry=s.makeMessageType("viam.app.v1.GetFragmentUsageResponse",()=>[{no:1,name:"version_usages",kind:"message",T:et,repeated:!0}]),my=s.makeMessageType("viam.app.v1.SetFragmentTagRequest",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9},{no:2,name:"tag",kind:"scalar",T:9},{no:3,name:"revision",kind:"scalar",T:9}]),cy=s.makeMessageType("viam.app.v1.SetFragmentTagResponse",()=>[{no:1,name:"tags",kind:"message",T:Za,repeated:!0}]),ly=s.makeMessageType("viam.app.v1.DeleteFragmentTagRequest",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9},{no:2,name:"tag",kind:"scalar",T:9}]),dy=s.makeMessageType("viam.app.v1.DeleteFragmentTagResponse",()=>[{no:1,name:"tags",kind:"message",T:Za,repeated:!0}]),py=s.makeMessageType("viam.app.v1.ListRobotsRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),uy=s.makeMessageType("viam.app.v1.ListRobotsForLocationsRequest",()=>[{no:1,name:"location_ids",kind:"scalar",T:9,repeated:!0}]),gy=s.makeMessageType("viam.app.v1.ListRobotsForOrgRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),ii=s.makeMessageType("viam.app.v1.AdditionalFragment",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9,opt:!0}]),Ty=s.makeMessageType("viam.app.v1.ListNestedFragmentsRequest",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9,opt:!0},{no:2,name:"additional_fragments",kind:"message",T:ii,repeated:!0}]),ky=s.makeMessageType("viam.app.v1.ListNestedFragmentsResponse",()=>[{no:1,name:"fragments",kind:"message",T:Ze,repeated:!0},{no:2,name:"resolved_fragments",kind:"message",T:oi,repeated:!0}]),yy=s.makeMessageType("viam.app.v1.ListMachineFragmentsRequest",()=>[{no:1,name:"machine_id",kind:"scalar",T:9},{no:2,name:"additional_fragment_ids",kind:"scalar",T:9,repeated:!0},{no:3,name:"additional_fragments",kind:"message",T:ii,repeated:!0}]),vy=s.makeMessageType("viam.app.v1.ListMachineFragmentsResponse",()=>[{no:1,name:"fragments",kind:"message",T:Ze,repeated:!0},{no:2,name:"resolved_fragments",kind:"message",T:oi,repeated:!0}]),ri=s.makeMessageType("viam.app.v1.ListMachineSummariesRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"fragment_ids",kind:"scalar",T:9,repeated:!0},{no:3,name:"location_ids",kind:"scalar",T:9,repeated:!0},{no:4,name:"limit",kind:"scalar",T:5,opt:!0}]),hy=s.makeMessageType("viam.app.v1.ListMachineSummariesResponse",()=>[{no:1,name:"location_summaries",kind:"message",T:fy,repeated:!0}]),fy=s.makeMessageType("viam.app.v1.LocationSummary",()=>[{no:1,name:"location_id",kind:"scalar",T:9},{no:2,name:"location_name",kind:"scalar",T:9},{no:3,name:"machine_summaries",kind:"message",T:Ry,repeated:!0}]),Ry=s.makeMessageType("viam.app.v1.MachineSummary",()=>[{no:1,name:"machine_id",kind:"scalar",T:9},{no:2,name:"machine_name",kind:"scalar",T:9},{no:3,name:"part_summaries",kind:"message",T:Oy,repeated:!0}]),_y=s.makeMessageType("viam.app.v1.FragmentSummary",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9}]),Sy=s.makeMessageType("viam.app.v1.ViamServerVersion",()=>[{no:1,name:"major",kind:"scalar",T:9,oneof:"version"},{no:2,name:"minor",kind:"scalar",T:9,oneof:"version"}]),Iy=s.makeMessageType("viam.app.v1.ViamAgentVersion",()=>[{no:1,name:"major",kind:"scalar",T:9,oneof:"version"},{no:2,name:"minor",kind:"scalar",T:9,oneof:"version"}]),Oy=s.makeMessageType("viam.app.v1.PartSummary",()=>[{no:1,name:"part_id",kind:"scalar",T:9},{no:2,name:"part_name",kind:"scalar",T:9},{no:11,name:"is_main_part",kind:"scalar",T:8},{no:12,name:"online_state",kind:"enum",T:s.getEnumType(Ha)},{no:13,name:"seconds_since_online",kind:"scalar",T:3},{no:14,name:"last_access",kind:"message",T:_,opt:!0},{no:3,name:"last_online",kind:"message",T:_,opt:!0},{no:4,name:"viam_server_version",kind:"message",T:Sy,opt:!0},{no:5,name:"viam_agent_version",kind:"message",T:Iy,opt:!0},{no:6,name:"os",kind:"scalar",T:9,opt:!0},{no:7,name:"platform",kind:"scalar",T:9,opt:!0},{no:8,name:"public_ip_address",kind:"scalar",T:9,opt:!0},{no:10,name:"dns_name",kind:"scalar",T:9,opt:!0},{no:9,name:"fragments",kind:"message",T:_y,repeated:!0}]),by=s.makeMessageType("viam.app.v1.ListRobotsResponse",()=>[{no:1,name:"robots",kind:"message",T:fn,repeated:!0}]),My=s.makeMessageType("viam.app.v1.ListRobotsForLocationsResponse",()=>[{no:1,name:"robots",kind:"message",T:fn,repeated:!0}]),Ey=s.makeMessageType("viam.app.v1.ListRobotsForOrgResponse",()=>[{no:1,name:"robots",kind:"message",T:fn,repeated:!0}]),wy=s.makeMessageType("viam.app.v1.NewRobotRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"location",kind:"scalar",T:9}]),Cy=s.makeMessageType("viam.app.v1.NewRobotResponse",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Ny=s.makeMessageType("viam.app.v1.UpdateRobotRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"location",kind:"scalar",T:9}]),Py=s.makeMessageType("viam.app.v1.UpdateRobotResponse",()=>[{no:1,name:"robot",kind:"message",T:fn}]),Dy=s.makeMessageType("viam.app.v1.DeleteRobotRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Ay=s.makeMessageType("viam.app.v1.DeleteRobotResponse",[]),Uy=s.makeMessageType("viam.app.v1.GetRobotMetadataRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),qy=s.makeMessageType("viam.app.v1.GetRobotMetadataResponse",()=>[{no:1,name:"data",kind:"message",T:p}]),Ly=s.makeMessageType("viam.app.v1.UpdateRobotMetadataRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"data",kind:"message",T:p}]),Gy=s.makeMessageType("viam.app.v1.UpdateRobotMetadataResponse",[]),By=s.makeMessageType("viam.app.v1.MarkPartAsMainRequest",()=>[{no:1,name:"part_id",kind:"scalar",T:9}]),Fy=s.makeMessageType("viam.app.v1.MarkPartAsMainResponse",[]),xy=s.makeMessageType("viam.app.v1.MarkPartForRestartRequest",()=>[{no:1,name:"part_id",kind:"scalar",T:9}]),Jy=s.makeMessageType("viam.app.v1.MarkPartForRestartResponse",[]),zy=s.makeMessageType("viam.app.v1.CreateRobotPartSecretRequest",()=>[{no:1,name:"part_id",kind:"scalar",T:9}]),Vy=s.makeMessageType("viam.app.v1.CreateRobotPartSecretResponse",()=>[{no:1,name:"part",kind:"message",T:mn}]),$y=s.makeMessageType("viam.app.v1.DeleteRobotPartSecretRequest",()=>[{no:1,name:"part_id",kind:"scalar",T:9},{no:2,name:"secret_id",kind:"scalar",T:9}]),Yy=s.makeMessageType("viam.app.v1.DeleteRobotPartSecretResponse",[]),ae=s.makeMessageType("viam.app.v1.Authorization",()=>[{no:1,name:"authorization_type",kind:"scalar",T:9},{no:2,name:"authorization_id",kind:"scalar",T:9},{no:3,name:"resource_type",kind:"scalar",T:9},{no:4,name:"resource_id",kind:"scalar",T:9},{no:5,name:"identity_id",kind:"scalar",T:9},{no:6,name:"organization_id",kind:"scalar",T:9},{no:7,name:"identity_type",kind:"scalar",T:9}]),Wy=s.makeMessageType("viam.app.v1.AddRoleRequest",()=>[{no:1,name:"authorization",kind:"message",T:ae}]),Hy=s.makeMessageType("viam.app.v1.AddRoleResponse",[]),jy=s.makeMessageType("viam.app.v1.RemoveRoleRequest",()=>[{no:1,name:"authorization",kind:"message",T:ae}]),Ky=s.makeMessageType("viam.app.v1.RemoveRoleResponse",[]),Xy=s.makeMessageType("viam.app.v1.ChangeRoleRequest",()=>[{no:1,name:"old_authorization",kind:"message",T:ae},{no:2,name:"new_authorization",kind:"message",T:ae}]),Qy=s.makeMessageType("viam.app.v1.ChangeRoleResponse",[]),Zy=s.makeMessageType("viam.app.v1.ListAuthorizationsRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"resource_ids",kind:"scalar",T:9,repeated:!0}]),ev=s.makeMessageType("viam.app.v1.ListAuthorizationsResponse",()=>[{no:1,name:"authorizations",kind:"message",T:ae,repeated:!0}]),nv=s.makeMessageType("viam.app.v1.CheckPermissionsRequest",()=>[{no:1,name:"permissions",kind:"message",T:mi,repeated:!0}]),mi=s.makeMessageType("viam.app.v1.AuthorizedPermissions",()=>[{no:1,name:"resource_type",kind:"scalar",T:9},{no:2,name:"resource_id",kind:"scalar",T:9},{no:3,name:"permissions",kind:"scalar",T:9,repeated:!0}]),av=s.makeMessageType("viam.app.v1.CheckPermissionsResponse",()=>[{no:1,name:"authorized_permissions",kind:"message",T:mi,repeated:!0}]),tv=s.makeMessageType("viam.app.v1.ModuleVersion",()=>[{no:1,name:"version",kind:"scalar",T:9},{no:2,name:"files",kind:"message",T:li,repeated:!0},{no:3,name:"models",kind:"message",T:ln,repeated:!0},{no:4,name:"entrypoint",kind:"scalar",T:9},{no:5,name:"first_run",kind:"scalar",T:9,opt:!0},{no:6,name:"markdown_description",kind:"scalar",T:9,opt:!0},{no:7,name:"apps",kind:"message",T:cn,repeated:!0}]),sv=s.makeMessageType("viam.app.v1.ModuleMetadata",()=>[{no:1,name:"models",kind:"message",T:ln,repeated:!0},{no:2,name:"versions",kind:"message",T:tv,repeated:!0},{no:3,name:"entrypoint",kind:"scalar",T:9},{no:4,name:"first_run",kind:"scalar",T:9,opt:!0},{no:5,name:"markdown_description",kind:"scalar",T:9,opt:!0},{no:6,name:"apps",kind:"message",T:cn,repeated:!0},{no:7,name:"source_type",kind:"enum",T:s.getEnumType(ja),opt:!0},{no:8,name:"language",kind:"enum",T:s.getEnumType(Ka),opt:!0}]),ov=s.makeMessageType("viam.app.v1.MLModelVersion",()=>[{no:1,name:"version",kind:"scalar",T:9},{no:2,name:"created_on",kind:"message",T:_}]),iv=s.makeMessageType("viam.app.v1.MLModelMetadata",()=>[{no:1,name:"versions",kind:"scalar",T:9,repeated:!0},{no:2,name:"model_type",kind:"enum",T:s.getEnumType(Qe)},{no:3,name:"model_framework",kind:"enum",T:s.getEnumType(rn)},{no:4,name:"detailed_versions",kind:"message",T:ov,repeated:!0}]),rv=s.makeMessageType("viam.app.v1.MLTrainingVersion",()=>[{no:1,name:"version",kind:"scalar",T:9},{no:2,name:"created_on",kind:"message",T:_}]),mv=s.makeMessageType("viam.app.v1.MLTrainingMetadata",()=>[{no:5,name:"versions",kind:"message",T:rv,repeated:!0},{no:2,name:"model_type",kind:"enum",T:s.getEnumType(Qe)},{no:3,name:"model_framework",kind:"enum",T:s.getEnumType(rn)},{no:4,name:"draft",kind:"scalar",T:8}]),nt=s.makeMessageType("viam.app.v1.RegistryItem",()=>[{no:1,name:"item_id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9},{no:3,name:"public_namespace",kind:"scalar",T:9},{no:4,name:"name",kind:"scalar",T:9},{no:5,name:"type",kind:"enum",T:s.getEnumType(Ya)},{no:6,name:"visibility",kind:"enum",T:s.getEnumType(hn)},{no:7,name:"url",kind:"scalar",T:9},{no:8,name:"description",kind:"scalar",T:9},{no:9,name:"total_robot_usage",kind:"scalar",T:3},{no:13,name:"total_external_robot_usage",kind:"scalar",T:3},{no:10,name:"total_organization_usage",kind:"scalar",T:3},{no:14,name:"total_external_organization_usage",kind:"scalar",T:3},{no:11,name:"module_metadata",kind:"message",T:sv,oneof:"metadata"},{no:12,name:"ml_model_metadata",kind:"message",T:iv,oneof:"metadata"},{no:18,name:"ml_training_metadata",kind:"message",T:mv,oneof:"metadata"},{no:15,name:"created_at",kind:"message",T:_},{no:16,name:"updated_at",kind:"message",T:_}]),cv=s.makeMessageType("viam.app.v1.GetRegistryItemRequest",()=>[{no:1,name:"item_id",kind:"scalar",T:9},{no:2,name:"include_markdown_documentation",kind:"scalar",T:8,opt:!0}]),lv=s.makeMessageType("viam.app.v1.GetRegistryItemResponse",()=>[{no:1,name:"item",kind:"message",T:nt}]),dv=s.makeMessageType("viam.app.v1.CreateRegistryItemRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"type",kind:"enum",T:s.getEnumType(Ya)}]),pv=s.makeMessageType("viam.app.v1.CreateRegistryItemResponse",[]),uv=s.makeMessageType("viam.app.v1.UpdateRegistryItemRequest",()=>[{no:1,name:"item_id",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:s.getEnumType(Ya)},{no:3,name:"description",kind:"scalar",T:9},{no:4,name:"visibility",kind:"enum",T:s.getEnumType(hn)},{no:5,name:"url",kind:"scalar",T:9,opt:!0},{no:6,name:"update_module_metadata",kind:"message",T:Ev,oneof:"metadata"},{no:7,name:"update_ml_model_metadata",kind:"message",T:wv,oneof:"metadata"},{no:8,name:"update_ml_training_metadata",kind:"message",T:Cv,oneof:"metadata"},{no:9,name:"markdown_description",kind:"scalar",T:9,opt:!0}]),gv=s.makeMessageType("viam.app.v1.UpdateRegistryItemResponse",[]),Tv=s.makeMessageType("viam.app.v1.ListRegistryItemsRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9,opt:!0},{no:2,name:"types",kind:"enum",T:s.getEnumType(Ya),repeated:!0},{no:3,name:"visibilities",kind:"enum",T:s.getEnumType(hn),repeated:!0},{no:4,name:"platforms",kind:"scalar",T:9,repeated:!0},{no:5,name:"statuses",kind:"enum",T:s.getEnumType(zg),repeated:!0},{no:6,name:"search_term",kind:"scalar",T:9,opt:!0},{no:7,name:"page_token",kind:"scalar",T:9,opt:!0},{no:8,name:"public_namespaces",kind:"scalar",T:9,repeated:!0},{no:9,name:"include_markdown_documentation",kind:"scalar",T:8,opt:!0},{no:10,name:"module_source_types",kind:"enum",T:s.getEnumType(ja),repeated:!0},{no:11,name:"module_languages",kind:"enum",T:s.getEnumType(Ka),repeated:!0}]),kv=s.makeMessageType("viam.app.v1.ListRegistryItemsResponse",()=>[{no:1,name:"items",kind:"message",T:nt,repeated:!0}]),yv=s.makeMessageType("viam.app.v1.DeleteRegistryItemRequest",()=>[{no:1,name:"item_id",kind:"scalar",T:9}]),vv=s.makeMessageType("viam.app.v1.DeleteRegistryItemResponse",[]),hv=s.makeMessageType("viam.app.v1.RenameRegistryItemRequest",()=>[{no:1,name:"item_id",kind:"scalar",T:9},{no:2,name:"new_name",kind:"scalar",T:9}]),fv=s.makeMessageType("viam.app.v1.RenameRegistryItemResponse",()=>[{no:1,name:"item",kind:"message",T:nt}]),Rv=s.makeMessageType("viam.app.v1.TransferRegistryItemRequest",()=>[{no:1,name:"item_id",kind:"scalar",T:9},{no:2,name:"new_public_namespace",kind:"scalar",T:9}]),_v=s.makeMessageType("viam.app.v1.TransferRegistryItemResponse",[]),Sv=s.makeMessageType("viam.app.v1.CreateModuleRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),Iv=s.makeMessageType("viam.app.v1.CreateModuleResponse",()=>[{no:1,name:"module_id",kind:"scalar",T:9},{no:2,name:"url",kind:"scalar",T:9}]),Ov=s.makeMessageType("viam.app.v1.UpdateModuleRequest",()=>[{no:1,name:"module_id",kind:"scalar",T:9},{no:2,name:"visibility",kind:"enum",T:s.getEnumType(hn)},{no:3,name:"url",kind:"scalar",T:9},{no:4,name:"description",kind:"scalar",T:9},{no:5,name:"models",kind:"message",T:ln,repeated:!0},{no:6,name:"entrypoint",kind:"scalar",T:9},{no:7,name:"first_run",kind:"scalar",T:9,opt:!0},{no:8,name:"apps",kind:"message",T:cn,repeated:!0},{no:9,name:"markdown_description",kind:"scalar",T:9,opt:!0}]),bv=s.makeMessageType("viam.app.v1.AllowedOrgIDs",()=>[{no:1,name:"ids",kind:"scalar",T:9,repeated:!0}]),cn=s.makeMessageType("viam.app.v1.App",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"type",kind:"scalar",T:9},{no:3,name:"entrypoint",kind:"scalar",T:9},{no:4,name:"fragment_ids",kind:"scalar",T:9,repeated:!0},{no:5,name:"logo_path",kind:"scalar",T:9,opt:!0},{no:6,name:"customizations",kind:"message",T:wh},{no:7,name:"allowed_org_ids",kind:"message",T:bv,opt:!0}]),Mv=s.makeMessageType("viam.app.v1.UpdateModuleResponse",()=>[{no:1,name:"url",kind:"scalar",T:9}]),Ev=s.makeMessageType("viam.app.v1.UpdateModuleMetadata",()=>[{no:1,name:"models",kind:"message",T:ln,repeated:!0},{no:2,name:"entrypoint",kind:"scalar",T:9},{no:3,name:"apps",kind:"message",T:cn,repeated:!0},{no:4,name:"source_type",kind:"enum",T:s.getEnumType(ja),opt:!0},{no:5,name:"language",kind:"enum",T:s.getEnumType(Ka),opt:!0}]),wv=s.makeMessageType("viam.app.v1.UpdateMLModelMetadata",()=>[{no:1,name:"model_type",kind:"enum",T:s.getEnumType(Qe)},{no:2,name:"model_framework",kind:"enum",T:s.getEnumType(rn)}]),Cv=s.makeMessageType("viam.app.v1.UpdateMLTrainingMetadata",()=>[{no:1,name:"model_type",kind:"enum",T:s.getEnumType(Qe)},{no:2,name:"model_framework",kind:"enum",T:s.getEnumType(rn)},{no:3,name:"draft",kind:"scalar",T:8}]),ln=s.makeMessageType("viam.app.v1.Model",()=>[{no:1,name:"api",kind:"scalar",T:9},{no:2,name:"model",kind:"scalar",T:9},{no:3,name:"markdown_documentation",kind:"scalar",T:9,opt:!0},{no:4,name:"description",kind:"scalar",T:9,opt:!0},{no:5,name:"supported_hardware",kind:"scalar",T:9,repeated:!0}]),Nv=s.makeMessageType("viam.app.v1.ModuleFileInfo",()=>[{no:1,name:"module_id",kind:"scalar",T:9},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"platform",kind:"scalar",T:9},{no:5,name:"platform_tags",kind:"scalar",T:9,repeated:!0}]),Pv=s.makeMessageType("viam.app.v1.UploadModuleFileRequest",()=>[{no:1,name:"module_file_info",kind:"message",T:Nv,oneof:"module_file"},{no:2,name:"file",kind:"scalar",T:12,oneof:"module_file"}]),Dv=s.makeMessageType("viam.app.v1.UploadModuleFileResponse",()=>[{no:1,name:"url",kind:"scalar",T:9}]),Av=s.makeMessageType("viam.app.v1.GetModuleRequest",()=>[{no:1,name:"module_id",kind:"scalar",T:9},{no:2,name:"include_markdown_documentation",kind:"scalar",T:8,opt:!0}]),Uv=s.makeMessageType("viam.app.v1.GetModuleResponse",()=>[{no:1,name:"module",kind:"message",T:ci}]),ci=s.makeMessageType("viam.app.v1.Module",()=>[{no:1,name:"module_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"visibility",kind:"enum",T:s.getEnumType(hn)},{no:4,name:"versions",kind:"message",T:qv,repeated:!0},{no:5,name:"url",kind:"scalar",T:9},{no:6,name:"description",kind:"scalar",T:9},{no:7,name:"models",kind:"message",T:ln,repeated:!0},{no:8,name:"total_robot_usage",kind:"scalar",T:3},{no:9,name:"total_organization_usage",kind:"scalar",T:3},{no:10,name:"organization_id",kind:"scalar",T:9},{no:11,name:"entrypoint",kind:"scalar",T:9},{no:12,name:"public_namespace",kind:"scalar",T:9},{no:13,name:"first_run",kind:"scalar",T:9,opt:!0},{no:14,name:"markdown_description",kind:"scalar",T:9,opt:!0},{no:15,name:"apps",kind:"message",T:cn,repeated:!0}]),qv=s.makeMessageType("viam.app.v1.VersionHistory",()=>[{no:1,name:"version",kind:"scalar",T:9},{no:2,name:"files",kind:"message",T:li,repeated:!0},{no:3,name:"models",kind:"message",T:ln,repeated:!0},{no:4,name:"entrypoint",kind:"scalar",T:9},{no:5,name:"first_run",kind:"scalar",T:9,opt:!0},{no:6,name:"markdown_description",kind:"scalar",T:9,opt:!0},{no:7,name:"apps",kind:"message",T:cn,repeated:!0}]),li=s.makeMessageType("viam.app.v1.Uploads",()=>[{no:1,name:"platform",kind:"scalar",T:9},{no:2,name:"uploaded_at",kind:"message",T:_}]),Lv=s.makeMessageType("viam.app.v1.ListModulesRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9,opt:!0},{no:2,name:"include_markdown_documentation",kind:"scalar",T:8,opt:!0}]),Gv=s.makeMessageType("viam.app.v1.ListModulesResponse",()=>[{no:1,name:"modules",kind:"message",T:ci,repeated:!0}]),Bv=s.makeMessageType("viam.app.v1.GetUserIDByEmailRequest",()=>[{no:1,name:"email",kind:"scalar",T:9}]),Fv=s.makeMessageType("viam.app.v1.GetUserIDByEmailResponse",()=>[{no:1,name:"user_id",kind:"scalar",T:9}]),xv=s.makeMessageType("viam.app.v1.ListOrganizationsByUserRequest",()=>[{no:1,name:"user_id",kind:"scalar",T:9}]),di=s.makeMessageType("viam.app.v1.OrgDetails",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"org_name",kind:"scalar",T:9},{no:3,name:"org_cid",kind:"scalar",T:9,opt:!0},{no:4,name:"public_namespace",kind:"scalar",T:9,opt:!0},{no:5,name:"billing_tier",kind:"scalar",T:9,opt:!0}]),Jv=s.makeMessageType("viam.app.v1.ListOrganizationsByUserResponse",()=>[{no:1,name:"orgs",kind:"message",T:di,repeated:!0}]),zv=s.makeMessageType("viam.app.v1.SearchOrganizationsRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9,opt:!0},{no:2,name:"org_name",kind:"scalar",T:9,opt:!0},{no:3,name:"cid",kind:"scalar",T:9,opt:!0},{no:4,name:"public_namespace",kind:"scalar",T:9,opt:!0}]),Vv=s.makeMessageType("viam.app.v1.SearchOrganizationsResponse",()=>[{no:1,name:"organizations",kind:"message",T:di,repeated:!0}]),$v=s.makeMessageType("viam.app.v1.CreateKeyRequest",()=>[{no:1,name:"authorizations",kind:"message",T:ae,repeated:!0},{no:2,name:"name",kind:"scalar",T:9}]),Yv=s.makeMessageType("viam.app.v1.CreateKeyResponse",()=>[{no:1,name:"key",kind:"scalar",T:9},{no:2,name:"id",kind:"scalar",T:9}]),Wv=s.makeMessageType("viam.app.v1.DeleteKeyRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),Hv=s.makeMessageType("viam.app.v1.DeleteKeyResponse",[]),jv=s.makeMessageType("viam.app.v1.RenameKeyRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),Kv=s.makeMessageType("viam.app.v1.RenameKeyResponse",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),Xv=s.makeMessageType("viam.app.v1.AuthorizationDetails",()=>[{no:1,name:"authorization_type",kind:"scalar",T:9},{no:2,name:"authorization_id",kind:"scalar",T:9},{no:3,name:"resource_type",kind:"scalar",T:9},{no:4,name:"resource_id",kind:"scalar",T:9},{no:5,name:"org_id",kind:"scalar",T:9}]),pi=s.makeMessageType("viam.app.v1.APIKeyWithAuthorizations",()=>[{no:1,name:"api_key",kind:"message",T:xk},{no:2,name:"authorizations",kind:"message",T:Xv,repeated:!0}]),Qv=s.makeMessageType("viam.app.v1.ListKeysRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),Zv=s.makeMessageType("viam.app.v1.ListKeysResponse",()=>[{no:1,name:"api_keys",kind:"message",T:pi,repeated:!0}]),eh=s.makeMessageType("viam.app.v1.RotateKeyRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),nh=s.makeMessageType("viam.app.v1.RotateKeyResponse",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"key",kind:"scalar",T:9}]),ah=s.makeMessageType("viam.app.v1.CreateKeyFromExistingKeyAuthorizationsRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),th=s.makeMessageType("viam.app.v1.CreateKeyFromExistingKeyAuthorizationsResponse",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"key",kind:"scalar",T:9}]),sh=s.makeMessageType("viam.app.v1.GetAppContentRequest",()=>[{no:1,name:"public_namespace",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),oh=s.makeMessageType("viam.app.v1.GetAppContentResponse",()=>[{no:1,name:"blob_path",kind:"scalar",T:9},{no:2,name:"entrypoint",kind:"scalar",T:9},{no:3,name:"app_type",kind:"enum",T:s.getEnumType(Vg)},{no:4,name:"public",kind:"scalar",T:8}]),ih=s.makeMessageType("viam.app.v1.OrganizationSetLogoRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"logo",kind:"scalar",T:12}]),rh=s.makeMessageType("viam.app.v1.OrganizationSetLogoResponse",[]),mh=s.makeMessageType("viam.app.v1.OrganizationGetLogoRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),ch=s.makeMessageType("viam.app.v1.OrganizationGetLogoResponse",()=>[{no:1,name:"url",kind:"scalar",T:9}]),lh=s.makeMessageType("viam.app.v1.EnableAuthServiceRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),dh=s.makeMessageType("viam.app.v1.EnableAuthServiceResponse",[]),ph=s.makeMessageType("viam.app.v1.DisableAuthServiceRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),uh=s.makeMessageType("viam.app.v1.DisableAuthServiceResponse",[]),gh=s.makeMessageType("viam.app.v1.CreateOAuthAppRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"client_name",kind:"scalar",T:9},{no:3,name:"oauth_config",kind:"message",T:at}]),Th=s.makeMessageType("viam.app.v1.CreateOAuthAppResponse",()=>[{no:1,name:"client_id",kind:"scalar",T:9},{no:2,name:"client_secret",kind:"scalar",T:9}]),kh=s.makeMessageType("viam.app.v1.ReadOAuthAppRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"client_id",kind:"scalar",T:9}]),yh=s.makeMessageType("viam.app.v1.ReadOAuthAppResponse",()=>[{no:1,name:"client_name",kind:"scalar",T:9},{no:2,name:"client_secret",kind:"scalar",T:9},{no:3,name:"oauth_config",kind:"message",T:at}]),vh=s.makeMessageType("viam.app.v1.UpdateOAuthAppRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"client_id",kind:"scalar",T:9},{no:3,name:"client_name",kind:"scalar",T:9},{no:4,name:"oauth_config",kind:"message",T:at}]),hh=s.makeMessageType("viam.app.v1.UpdateOAuthAppResponse",[]),fh=s.makeMessageType("viam.app.v1.DeleteOAuthAppRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"client_id",kind:"scalar",T:9}]),Rh=s.makeMessageType("viam.app.v1.DeleteOAuthAppResponse",[]),_h=s.makeMessageType("viam.app.v1.ListOAuthAppsRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),Sh=s.makeMessageType("viam.app.v1.ListOAuthAppsResponse",()=>[{no:1,name:"client_ids",kind:"scalar",T:9,repeated:!0}]),Ih=s.makeMessageType("viam.app.v1.CreateOAuthAppUserRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"application_id",kind:"scalar",T:9},{no:3,name:"email",kind:"scalar",T:9},{no:4,name:"first_name",kind:"scalar",T:9},{no:5,name:"last_name",kind:"scalar",T:9},{no:6,name:"password",kind:"scalar",T:9}]),Oh=s.makeMessageType("viam.app.v1.CreateOAuthAppUserResponse",()=>[{no:1,name:"auth_token",kind:"scalar",T:9},{no:2,name:"registration_id",kind:"scalar",T:9},{no:3,name:"user_id",kind:"scalar",T:9},{no:4,name:"refresh_token",kind:"scalar",T:9}]),at=s.makeMessageType("viam.app.v1.OAuthConfig",()=>[{no:1,name:"client_authentication",kind:"enum",T:s.getEnumType($g)},{no:2,name:"pkce",kind:"enum",T:s.getEnumType(Yg)},{no:3,name:"url_validation",kind:"enum",T:s.getEnumType(Wg)},{no:4,name:"origin_uris",kind:"scalar",T:9,repeated:!0},{no:5,name:"redirect_uris",kind:"scalar",T:9,repeated:!0},{no:6,name:"logout_uri",kind:"scalar",T:9},{no:7,name:"enabled_grants",kind:"enum",T:s.getEnumType(Hg),repeated:!0},{no:8,name:"invite_redirect_uri",kind:"scalar",T:9}]),bh=s.makeMessageType("viam.app.v1.GetAppBrandingRequest",()=>[{no:1,name:"public_namespace",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),Mh=s.makeMessageType("viam.app.v1.TextOverrides",()=>[{no:1,name:"fields",kind:"map",K:9,V:{kind:"scalar",T:9}}]),Eh=s.makeMessageType("viam.app.v1.GetAppBrandingResponse",()=>[{no:1,name:"logo_path",kind:"scalar",T:9,opt:!0},{no:2,name:"text_customizations",kind:"map",K:9,V:{kind:"message",T:Mh}},{no:3,name:"fragment_ids",kind:"scalar",T:9,repeated:!0},{no:4,name:"allowed_org_ids",kind:"scalar",T:9,repeated:!0}]),wh=s.makeMessageType("viam.app.v1.AppCustomizations",()=>[{no:1,name:"machine_picker",kind:"message",T:Ch}]),Ch=s.makeMessageType("viam.app.v1.MachinePickerCustomizations",()=>[{no:1,name:"heading",kind:"scalar",T:9,opt:!0},{no:2,name:"subheading",kind:"scalar",T:9,opt:!0}]),Nh=s.makeMessageType("viam.app.v1.UploadDevicePushTokenRequest",()=>[{no:1,name:"app_id",kind:"scalar",T:9},{no:2,name:"device_token",kind:"scalar",T:9},{no:3,name:"device_uuid",kind:"scalar",T:9}]),Ph=s.makeMessageType("viam.app.v1.UploadDevicePushTokenResponse",[]),Dh=s.makeMessageType("viam.app.v1.DeleteDevicePushTokenRequest",()=>[{no:1,name:"app_id",kind:"scalar",T:9},{no:2,name:"device_uuid",kind:"scalar",T:9}]),Ah=s.makeMessageType("viam.app.v1.DeleteDevicePushTokenResponse",[]),Uh=s.makeMessageType("viam.app.v1.GetDevicePushTokensRequest",()=>[{no:1,name:"app_id",kind:"scalar",T:9}]),qh=s.makeMessageType("viam.app.v1.GetDevicePushTokensResponse",()=>[{no:1,name:"device_tokens",kind:"scalar",T:9,repeated:!0}]),Lh=s.makeMessageType("viam.app.v1.SetFirebaseConfigRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"app_id",kind:"scalar",T:9},{no:3,name:"config_json",kind:"scalar",T:9}]),Gh=s.makeMessageType("viam.app.v1.SetFirebaseConfigResponse",[]),Bh=s.makeMessageType("viam.app.v1.GetFirebaseConfigRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),Fh=s.makeMessageType("viam.app.v1.GetFirebaseConfigResponse",()=>[{no:1,name:"app_id",kind:"scalar",T:9}]),xh=s.makeMessageType("viam.app.v1.DeleteFirebaseConfigRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9},{no:2,name:"app_id",kind:"scalar",T:9}]),Jh=s.makeMessageType("viam.app.v1.DeleteFirebaseConfigResponse",[]),RI=Object.freeze(Object.defineProperty({__proto__:null,APIKey:xk,APIKeyWithAuthorizations:pi,AddRoleRequest:Wy,AddRoleResponse:Hy,AdditionalFragment:ii,AllowedOrgIDs:bv,App:cn,AppCustomizations:wh,AppType:Vg,AuthenticationType:xg,AuthenticatorInfo:ni,Authorization:ae,AuthorizationDetails:Xv,AuthorizedPermissions:mi,BillingAddress:Xa,ChangeRoleRequest:Xy,ChangeRoleResponse:Qy,CheckPermissionsRequest:nv,CheckPermissionsResponse:av,ClientAuthentication:$g,CreateFragmentRequest:Qk,CreateFragmentResponse:Zk,CreateKeyFromExistingKeyAuthorizationsRequest:ah,CreateKeyFromExistingKeyAuthorizationsResponse:th,CreateKeyRequest:$v,CreateKeyResponse:Yv,CreateLocationRequest:JT,CreateLocationResponse:zT,CreateLocationSecretRequest:mk,CreateLocationSecretResponse:ck,CreateModuleRequest:Sv,CreateModuleResponse:Iv,CreateOAuthAppRequest:gh,CreateOAuthAppResponse:Th,CreateOAuthAppUserRequest:Ih,CreateOAuthAppUserResponse:Oh,CreateOrganizationInviteRequest:yT,CreateOrganizationInviteResponse:vT,CreateOrganizationRequest:Zg,CreateOrganizationResponse:eT,CreateRegistryItemRequest:dv,CreateRegistryItemResponse:pv,CreateRobotPartSecretRequest:zy,CreateRobotPartSecretResponse:Vy,DeleteDevicePushTokenRequest:Dh,DeleteDevicePushTokenResponse:Ah,DeleteFirebaseConfigRequest:xh,DeleteFirebaseConfigResponse:Jh,DeleteFragmentRequest:ay,DeleteFragmentResponse:ty,DeleteFragmentTagRequest:ly,DeleteFragmentTagResponse:dy,DeleteKeyRequest:Wv,DeleteKeyResponse:Hv,DeleteLocationRequest:HT,DeleteLocationResponse:jT,DeleteLocationSecretRequest:lk,DeleteLocationSecretResponse:dk,DeleteOAuthAppRequest:fh,DeleteOAuthAppResponse:Rh,DeleteOrganizationInviteRequest:RT,DeleteOrganizationInviteResponse:_T,DeleteOrganizationMemberRequest:OT,DeleteOrganizationMemberResponse:bT,DeleteOrganizationRequest:cT,DeleteOrganizationResponse:lT,DeleteRegistryItemRequest:yv,DeleteRegistryItemResponse:vv,DeleteRobotPartRequest:Uk,DeleteRobotPartResponse:zk,DeleteRobotPartSecretRequest:$y,DeleteRobotPartSecretResponse:Yy,DeleteRobotRequest:Dy,DeleteRobotResponse:Ay,DisableAuthServiceRequest:ph,DisableAuthServiceResponse:uh,DisableBillingServiceRequest:DT,DisableBillingServiceResponse:AT,EnableAuthServiceRequest:lh,EnableAuthServiceResponse:dh,EnableBillingServiceRequest:MT,EnableBillingServiceResponse:ET,EnabledGrant:Hg,Fragment:Ze,FragmentError:Yk,FragmentErrorType:Jg,FragmentHistoryEntry:Vk,FragmentImport:Wk,FragmentImportList:ai,FragmentRevision:$k,FragmentSummary:_y,FragmentTag:Za,FragmentUsage:et,FragmentVisibility:Vn,GetAppBrandingRequest:bh,GetAppBrandingResponse:Eh,GetAppContentRequest:sh,GetAppContentResponse:oh,GetBillingServiceConfigRequest:NT,GetBillingServiceConfigResponse:PT,GetDevicePushTokensRequest:Uh,GetDevicePushTokensResponse:qh,GetFirebaseConfigRequest:Bh,GetFirebaseConfigResponse:Fh,GetFragmentHistoryRequest:sy,GetFragmentHistoryResponse:oy,GetFragmentRequest:Kk,GetFragmentResponse:Xk,GetFragmentUsageRequest:iy,GetFragmentUsageResponse:ry,GetLocationMetadataRequest:KT,GetLocationMetadataResponse:XT,GetLocationRequest:VT,GetLocationResponse:$T,GetModuleRequest:Av,GetModuleResponse:Uv,GetOrganizationMetadataRequest:dT,GetOrganizationMetadataResponse:pT,GetOrganizationNamespaceAvailabilityRequest:tT,GetOrganizationNamespaceAvailabilityResponse:sT,GetOrganizationRequest:nT,GetOrganizationResponse:aT,GetOrganizationsWithAccessToLocationRequest:ek,GetOrganizationsWithAccessToLocationResponse:nk,GetRegistryItemRequest:cv,GetRegistryItemResponse:lv,GetRobotAPIKeysRequest:Fk,GetRobotAPIKeysResponse:Jk,GetRobotMetadataRequest:Uy,GetRobotMetadataResponse:qy,GetRobotPartByNameAndLocationRequest:Sk,GetRobotPartByNameAndLocationResponse:Ik,GetRobotPartHistoryRequest:wk,GetRobotPartHistoryResponse:Ck,GetRobotPartLogsRequest:Ok,GetRobotPartLogsResponse:bk,GetRobotPartMetadataRequest:qk,GetRobotPartMetadataResponse:Lk,GetRobotPartRequest:Rk,GetRobotPartResponse:_k,GetRobotPartsRequest:hk,GetRobotPartsResponse:fk,GetRobotRequest:gk,GetRobotResponse:vk,GetRoverRentalRobotsRequest:Tk,GetRoverRentalRobotsResponse:yk,GetUserIDByEmailRequest:Bv,GetUserIDByEmailResponse:Fv,ListAuthorizationsRequest:Zy,ListAuthorizationsResponse:ev,ListFragmentsRequest:Hk,ListFragmentsResponse:jk,ListKeysRequest:Qv,ListKeysResponse:Zv,ListLocationsRequest:ak,ListLocationsResponse:rk,ListMachineFragmentsRequest:yy,ListMachineFragmentsResponse:vy,ListMachineSummariesRequest:ri,ListMachineSummariesResponse:hy,ListModulesRequest:Lv,ListModulesResponse:Gv,ListNestedFragmentsRequest:Ty,ListNestedFragmentsResponse:ky,ListOAuthAppsRequest:_h,ListOAuthAppsResponse:Sh,ListOrganizationMembersRequest:TT,ListOrganizationMembersResponse:kT,ListOrganizationsByUserRequest:xv,ListOrganizationsByUserResponse:Jv,ListOrganizationsRequest:Kg,ListOrganizationsResponse:Qg,ListRegistryItemsRequest:Tv,ListRegistryItemsResponse:kv,ListRobotsForLocationsRequest:uy,ListRobotsForLocationsResponse:My,ListRobotsForOrgRequest:gy,ListRobotsForOrgResponse:Ey,ListRobotsRequest:py,ListRobotsResponse:by,Location:Yn,LocationAuth:Qa,LocationAuthRequest:pk,LocationAuthResponse:uk,LocationOrganization:BT,LocationSummary:fy,MLModelMetadata:iv,MLModelVersion:ov,MLTrainingMetadata:mv,MLTrainingVersion:rv,MachinePickerCustomizations:Ch,MachineSummary:Ry,MarkPartAsMainRequest:By,MarkPartAsMainResponse:Fy,MarkPartForRestartRequest:xy,MarkPartForRestartResponse:Jy,Model:ln,Module:ci,ModuleFileInfo:Nv,ModuleLanguage:Ka,ModuleMetadata:sv,ModuleSourceType:ja,ModuleVersion:tv,NewRobotPartRequest:Dk,NewRobotPartResponse:Ak,NewRobotRequest:wy,NewRobotResponse:Cy,OAuthConfig:at,OnlineState:Ha,OrgDetails:di,Organization:Rn,OrganizationGetLogoRequest:mh,OrganizationGetLogoResponse:ch,OrganizationGetSupportEmailRequest:LT,OrganizationGetSupportEmailResponse:GT,OrganizationIdentity:ti,OrganizationInvite:$n,OrganizationMember:Xg,OrganizationSetLogoRequest:ih,OrganizationSetLogoResponse:rh,OrganizationSetSupportEmailRequest:UT,OrganizationSetSupportEmailResponse:qT,PKCE:Yg,PartSummary:Oy,ReadOAuthAppRequest:kh,ReadOAuthAppResponse:yh,RegistryItem:nt,RegistryItemStatus:zg,RemoveRoleRequest:jy,RemoveRoleResponse:Ky,RenameKeyRequest:jv,RenameKeyResponse:Kv,RenameRegistryItemRequest:hv,RenameRegistryItemResponse:fv,ResendOrganizationInviteRequest:ST,ResendOrganizationInviteResponse:IT,ResolvedFragment:oi,Robot:fn,RobotPart:mn,RobotPartHistoryEntry:jg,RotateKeyRequest:eh,RotateKeyResponse:nh,RoverRentalRobot:kk,SearchOrganizationsRequest:zv,SearchOrganizationsResponse:Vv,SetFirebaseConfigRequest:Lh,SetFirebaseConfigResponse:Gh,SetFragmentTagRequest:my,SetFragmentTagResponse:cy,ShareLocationRequest:tk,ShareLocationResponse:sk,SharedSecret:si,SharedSecret_State:xT,StorageConfig:FT,TailRobotPartLogsRequest:Mk,TailRobotPartLogsResponse:Ek,TextOverrides:Mh,TransferRegistryItemRequest:Rv,TransferRegistryItemResponse:_v,URLValidation:Wg,UnshareLocationRequest:ok,UnshareLocationResponse:ik,UpdateBillingServiceRequest:wT,UpdateBillingServiceResponse:CT,UpdateFragmentRequest:ey,UpdateFragmentResponse:ny,UpdateLocationMetadataRequest:QT,UpdateLocationMetadataResponse:ZT,UpdateLocationRequest:YT,UpdateLocationResponse:WT,UpdateMLModelMetadata:wv,UpdateMLTrainingMetadata:Cv,UpdateModuleMetadata:Ev,UpdateModuleRequest:Ov,UpdateModuleResponse:Mv,UpdateOAuthAppRequest:vh,UpdateOAuthAppResponse:hh,UpdateOrganizationInviteAuthorizationsRequest:hT,UpdateOrganizationInviteAuthorizationsResponse:fT,UpdateOrganizationMetadataRequest:uT,UpdateOrganizationMetadataResponse:gT,UpdateOrganizationNamespaceRequest:rT,UpdateOrganizationNamespaceResponse:mT,UpdateOrganizationRequest:oT,UpdateOrganizationResponse:iT,UpdateRegistryItemRequest:uv,UpdateRegistryItemResponse:gv,UpdateRobotMetadataRequest:Ly,UpdateRobotMetadataResponse:Gy,UpdateRobotPartMetadataRequest:Gk,UpdateRobotPartMetadataResponse:Bk,UpdateRobotPartRequest:Nk,UpdateRobotPartResponse:Pk,UpdateRobotRequest:Ny,UpdateRobotResponse:Py,UploadDevicePushTokenRequest:Nh,UploadDevicePushTokenResponse:Ph,UploadModuleFileRequest:Pv,UploadModuleFileResponse:Dv,Uploads:li,VersionHistory:qv,ViamAgentVersion:Iy,ViamServerVersion:Sy,Visibility:hn},Symbol.toStringTag,{value:"Module"})),_I={typeName:"viam.app.v1.AppService",methods:{getUserIDByEmail:{name:"GetUserIDByEmail",I:Bv,O:Fv,kind:m.Unary},createOrganization:{name:"CreateOrganization",I:Zg,O:eT,kind:m.Unary},listOrganizations:{name:"ListOrganizations",I:Kg,O:Qg,kind:m.Unary},getOrganizationsWithAccessToLocation:{name:"GetOrganizationsWithAccessToLocation",I:ek,O:nk,kind:m.Unary},listOrganizationsByUser:{name:"ListOrganizationsByUser",I:xv,O:Jv,kind:m.Unary},searchOrganizations:{name:"SearchOrganizations",I:zv,O:Vv,kind:m.Unary},getOrganization:{name:"GetOrganization",I:nT,O:aT,kind:m.Unary},getOrganizationNamespaceAvailability:{name:"GetOrganizationNamespaceAvailability",I:tT,O:sT,kind:m.Unary},updateOrganization:{name:"UpdateOrganization",I:oT,O:iT,kind:m.Unary},updateOrganizationNamespace:{name:"UpdateOrganizationNamespace",I:rT,O:mT,kind:m.Unary},deleteOrganization:{name:"DeleteOrganization",I:cT,O:lT,kind:m.Unary},getOrganizationMetadata:{name:"GetOrganizationMetadata",I:dT,O:pT,kind:m.Unary},updateOrganizationMetadata:{name:"UpdateOrganizationMetadata",I:uT,O:gT,kind:m.Unary},listOrganizationMembers:{name:"ListOrganizationMembers",I:TT,O:kT,kind:m.Unary},createOrganizationInvite:{name:"CreateOrganizationInvite",I:yT,O:vT,kind:m.Unary},updateOrganizationInviteAuthorizations:{name:"UpdateOrganizationInviteAuthorizations",I:hT,O:fT,kind:m.Unary},deleteOrganizationMember:{name:"DeleteOrganizationMember",I:OT,O:bT,kind:m.Unary},deleteOrganizationInvite:{name:"DeleteOrganizationInvite",I:RT,O:_T,kind:m.Unary},resendOrganizationInvite:{name:"ResendOrganizationInvite",I:ST,O:IT,kind:m.Unary},enableBillingService:{name:"EnableBillingService",I:MT,O:ET,kind:m.Unary},disableBillingService:{name:"DisableBillingService",I:DT,O:AT,kind:m.Unary},updateBillingService:{name:"UpdateBillingService",I:wT,O:CT,kind:m.Unary},getBillingServiceConfig:{name:"GetBillingServiceConfig",I:NT,O:PT,kind:m.Unary},organizationSetSupportEmail:{name:"OrganizationSetSupportEmail",I:UT,O:qT,kind:m.Unary},organizationGetSupportEmail:{name:"OrganizationGetSupportEmail",I:LT,O:GT,kind:m.Unary},organizationSetLogo:{name:"OrganizationSetLogo",I:ih,O:rh,kind:m.Unary},organizationGetLogo:{name:"OrganizationGetLogo",I:mh,O:ch,kind:m.Unary},enableAuthService:{name:"EnableAuthService",I:lh,O:dh,kind:m.Unary},disableAuthService:{name:"DisableAuthService",I:ph,O:uh,kind:m.Unary},createOAuthApp:{name:"CreateOAuthApp",I:gh,O:Th,kind:m.Unary},readOAuthApp:{name:"ReadOAuthApp",I:kh,O:yh,kind:m.Unary},updateOAuthApp:{name:"UpdateOAuthApp",I:vh,O:hh,kind:m.Unary},deleteOAuthApp:{name:"DeleteOAuthApp",I:fh,O:Rh,kind:m.Unary},listOAuthApps:{name:"ListOAuthApps",I:_h,O:Sh,kind:m.Unary},createOAuthAppUser:{name:"CreateOAuthAppUser",I:Ih,O:Oh,kind:m.Unary},createLocation:{name:"CreateLocation",I:JT,O:zT,kind:m.Unary},getLocation:{name:"GetLocation",I:VT,O:$T,kind:m.Unary},updateLocation:{name:"UpdateLocation",I:YT,O:WT,kind:m.Unary},deleteLocation:{name:"DeleteLocation",I:HT,O:jT,kind:m.Unary},getLocationMetadata:{name:"GetLocationMetadata",I:KT,O:XT,kind:m.Unary},updateLocationMetadata:{name:"UpdateLocationMetadata",I:QT,O:ZT,kind:m.Unary},listLocations:{name:"ListLocations",I:ak,O:rk,kind:m.Unary},shareLocation:{name:"ShareLocation",I:tk,O:sk,kind:m.Unary},unshareLocation:{name:"UnshareLocation",I:ok,O:ik,kind:m.Unary},locationAuth:{name:"LocationAuth",I:pk,O:uk,kind:m.Unary},createLocationSecret:{name:"CreateLocationSecret",I:mk,O:ck,kind:m.Unary},deleteLocationSecret:{name:"DeleteLocationSecret",I:lk,O:dk,kind:m.Unary},getRobot:{name:"GetRobot",I:gk,O:vk,kind:m.Unary},getRobotMetadata:{name:"GetRobotMetadata",I:Uy,O:qy,kind:m.Unary},updateRobotMetadata:{name:"UpdateRobotMetadata",I:Ly,O:Gy,kind:m.Unary},getRoverRentalRobots:{name:"GetRoverRentalRobots",I:Tk,O:yk,kind:m.Unary},getRobotParts:{name:"GetRobotParts",I:hk,O:fk,kind:m.Unary},getRobotPart:{name:"GetRobotPart",I:Rk,O:_k,kind:m.Unary},getRobotPartByNameAndLocation:{name:"GetRobotPartByNameAndLocation",I:Sk,O:Ik,kind:m.Unary},getRobotPartLogs:{name:"GetRobotPartLogs",I:Ok,O:bk,kind:m.Unary},tailRobotPartLogs:{name:"TailRobotPartLogs",I:Mk,O:Ek,kind:m.ServerStreaming},getRobotPartHistory:{name:"GetRobotPartHistory",I:wk,O:Ck,kind:m.Unary},updateRobotPart:{name:"UpdateRobotPart",I:Nk,O:Pk,kind:m.Unary},newRobotPart:{name:"NewRobotPart",I:Dk,O:Ak,kind:m.Unary},deleteRobotPart:{name:"DeleteRobotPart",I:Uk,O:zk,kind:m.Unary},getRobotPartMetadata:{name:"GetRobotPartMetadata",I:qk,O:Lk,kind:m.Unary},updateRobotPartMetadata:{name:"UpdateRobotPartMetadata",I:Gk,O:Bk,kind:m.Unary},getRobotAPIKeys:{name:"GetRobotAPIKeys",I:Fk,O:Jk,kind:m.Unary},markPartAsMain:{name:"MarkPartAsMain",I:By,O:Fy,kind:m.Unary},markPartForRestart:{name:"MarkPartForRestart",I:xy,O:Jy,kind:m.Unary},createRobotPartSecret:{name:"CreateRobotPartSecret",I:zy,O:Vy,kind:m.Unary},deleteRobotPartSecret:{name:"DeleteRobotPartSecret",I:$y,O:Yy,kind:m.Unary},listRobots:{name:"ListRobots",I:py,O:by,kind:m.Unary},listRobotsForLocations:{name:"ListRobotsForLocations",I:uy,O:My,kind:m.Unary},listRobotsForOrg:{name:"ListRobotsForOrg",I:gy,O:Ey,kind:m.Unary},newRobot:{name:"NewRobot",I:wy,O:Cy,kind:m.Unary},updateRobot:{name:"UpdateRobot",I:Ny,O:Py,kind:m.Unary},deleteRobot:{name:"DeleteRobot",I:Dy,O:Ay,kind:m.Unary},listFragments:{name:"ListFragments",I:Hk,O:jk,kind:m.Unary},getFragment:{name:"GetFragment",I:Kk,O:Xk,kind:m.Unary},createFragment:{name:"CreateFragment",I:Qk,O:Zk,kind:m.Unary},updateFragment:{name:"UpdateFragment",I:ey,O:ny,kind:m.Unary},deleteFragment:{name:"DeleteFragment",I:ay,O:ty,kind:m.Unary},listNestedFragments:{name:"ListNestedFragments",I:Ty,O:ky,kind:m.Unary},listMachineFragments:{name:"ListMachineFragments",I:yy,O:vy,kind:m.Unary},listMachineSummaries:{name:"ListMachineSummaries",I:ri,O:hy,kind:m.Unary},getFragmentHistory:{name:"GetFragmentHistory",I:sy,O:oy,kind:m.Unary},getFragmentUsage:{name:"GetFragmentUsage",I:iy,O:ry,kind:m.Unary},setFragmentTag:{name:"SetFragmentTag",I:my,O:cy,kind:m.Unary},deleteFragmentTag:{name:"DeleteFragmentTag",I:ly,O:dy,kind:m.Unary},addRole:{name:"AddRole",I:Wy,O:Hy,kind:m.Unary},removeRole:{name:"RemoveRole",I:jy,O:Ky,kind:m.Unary},changeRole:{name:"ChangeRole",I:Xy,O:Qy,kind:m.Unary},listAuthorizations:{name:"ListAuthorizations",I:Zy,O:ev,kind:m.Unary},checkPermissions:{name:"CheckPermissions",I:nv,O:av,kind:m.Unary},getRegistryItem:{name:"GetRegistryItem",I:cv,O:lv,kind:m.Unary},createRegistryItem:{name:"CreateRegistryItem",I:dv,O:pv,kind:m.Unary},updateRegistryItem:{name:"UpdateRegistryItem",I:uv,O:gv,kind:m.Unary},listRegistryItems:{name:"ListRegistryItems",I:Tv,O:kv,kind:m.Unary},deleteRegistryItem:{name:"DeleteRegistryItem",I:yv,O:vv,kind:m.Unary},renameRegistryItem:{name:"RenameRegistryItem",I:hv,O:fv,kind:m.Unary},transferRegistryItem:{name:"TransferRegistryItem",I:Rv,O:_v,kind:m.Unary},createModule:{name:"CreateModule",I:Sv,O:Iv,kind:m.Unary},updateModule:{name:"UpdateModule",I:Ov,O:Mv,kind:m.Unary},uploadModuleFile:{name:"UploadModuleFile",I:Pv,O:Dv,kind:m.ClientStreaming},getModule:{name:"GetModule",I:Av,O:Uv,kind:m.Unary},listModules:{name:"ListModules",I:Lv,O:Gv,kind:m.Unary},createKey:{name:"CreateKey",I:$v,O:Yv,kind:m.Unary},deleteKey:{name:"DeleteKey",I:Wv,O:Hv,kind:m.Unary},listKeys:{name:"ListKeys",I:Qv,O:Zv,kind:m.Unary},renameKey:{name:"RenameKey",I:jv,O:Kv,kind:m.Unary},rotateKey:{name:"RotateKey",I:eh,O:nh,kind:m.Unary},createKeyFromExistingKeyAuthorizations:{name:"CreateKeyFromExistingKeyAuthorizations",I:ah,O:th,kind:m.Unary},getAppContent:{name:"GetAppContent",I:sh,O:oh,kind:m.Unary},getAppBranding:{name:"GetAppBranding",I:bh,O:Eh,kind:m.Unary},uploadDevicePushToken:{name:"UploadDevicePushToken",I:Nh,O:Ph,kind:m.Unary},deleteDevicePushToken:{name:"DeleteDevicePushToken",I:Dh,O:Ah,kind:m.Unary},getDevicePushTokens:{name:"GetDevicePushTokens",I:Uh,O:qh,kind:m.Unary},setFirebaseConfig:{name:"SetFirebaseConfig",I:Lh,O:Gh,kind:m.Unary},getFirebaseConfig:{name:"GetFirebaseConfig",I:Bh,O:Fh,kind:m.Unary},deleteFirebaseConfig:{name:"DeleteFirebaseConfig",I:xh,O:Jh,kind:m.Unary}}},zh=(a,e,n,t,o,i)=>new ae({authorizationType:"role",identityId:e,identityType:o,authorizationId:`${t}_${n}`,resourceType:t,organizationId:a,resourceId:i});class SI{client;constructor(e){this.client=X(_I,e)}async getUserIDByEmail(e){return(await this.client.getUserIDByEmail({email:e})).userId}async createOrganization(e){return(await this.client.createOrganization({name:e})).organization}async listOrganizations(){return(await this.client.listOrganizations({})).organizations}async getOrganizationsWithAccessToLocation(e){return(await this.client.getOrganizationsWithAccessToLocation({locationId:e})).organizationIdentities}async listOrganizationsByUser(e){return(await this.client.listOrganizationsByUser({userId:e})).orgs}async getOrganization(e){return(await this.client.getOrganization({organizationId:e})).organization}async getOrganizationNamespaceAvailability(e){return(await this.client.getOrganizationNamespaceAvailability({publicNamespace:e})).available}async updateOrganization(e,n,t,o,i,r){return(await this.client.updateOrganization({organizationId:e,name:n,publicNamespace:t,region:o,cid:i,defaultFragments:r})).organization}async deleteOrganization(e){await this.client.deleteOrganization({organizationId:e})}async listOrganizationMembers(e){return this.client.listOrganizationMembers({organizationId:e})}async createOrganizationInvite(e,n,t,o=!0){return(await this.client.createOrganizationInvite({organizationId:e,email:n,authorizations:t,sendEmailInvite:o})).invite}async updateOrganizationInviteAuthorizations(e,n,t,o){return(await this.client.updateOrganizationInviteAuthorizations({organizationId:e,email:n,addAuthorizations:t,removeAuthorizations:o})).invite}async deleteOrganizationMember(e,n){await this.client.deleteOrganizationMember({organizationId:e,userId:n})}async deleteOrganizationInvite(e,n){await this.client.deleteOrganizationInvite({organizationId:e,email:n})}async resendOrganizationInvite(e,n){return(await this.client.resendOrganizationInvite({organizationId:e,email:n})).invite}async createLocation(e,n,t){return(await this.client.createLocation({organizationId:e,name:n,parentLocationId:t})).location}async getLocation(e){return(await this.client.getLocation({locationId:e})).location}async updateLocation(e,n,t,o){return(await this.client.updateLocation({locationId:e,name:n,parentLocationId:t,region:o})).location}async deleteLocation(e){await this.client.deleteLocation({locationId:e})}async listLocations(e){return(await this.client.listLocations({organizationId:e})).locations}async shareLocation(e,n){await this.client.shareLocation({organizationId:e,locationId:n})}async unshareLocation(e,n){await this.client.unshareLocation({organizationId:e,locationId:n})}async locationAuth(e){return(await this.client.locationAuth({locationId:e})).auth}async createLocationSecret(e){return(await this.client.createLocationSecret({locationId:e})).auth}async deleteLocationSecret(e,n){await this.client.deleteLocationSecret({locationId:e,secretId:n})}async getRobot(e){return(await this.client.getRobot({id:e})).robot}async getRoverRentalRobots(e){return(await this.client.getRoverRentalRobots({orgId:e})).robots}async getRobotParts(e){return(await this.client.getRobotParts({robotId:e})).parts}async getRobotPart(e){return this.client.getRobotPart({id:e})}async getRobotPartByNameAndLocation(e,n){return this.client.getRobotPartByNameAndLocation({name:e,locationId:n})}async getRobotPartLogs(e,n,t,o,i,r=""){return this.client.getRobotPartLogs({id:e,filter:n,levels:t,pageToken:r,start:o?_.fromDate(o):void 0,end:i?_.fromDate(i):void 0})}async tailRobotPartLogs(e,n,t,o=!0){const i=this.client.tailRobotPartLogs({id:e,errorsOnly:o,filter:t});for await(const r of i)for(const c of r.logs)n.push(c)}async getRobotPartHistory(e){return(await this.client.getRobotPartHistory({id:e})).history}async updateRobotPart(e,n,t){return(await this.client.updateRobotPart({id:e,name:n,robotConfig:t})).part}async newRobotPart(e,n){return(await this.client.newRobotPart({robotId:e,partName:n})).partId}async deleteRobotPart(e){await this.client.deleteRobotPart({partId:e})}async getRobotAPIKeys(e){return(await this.client.getRobotAPIKeys({robotId:e})).apiKeys}async markPartAsMain(e){await this.client.markPartAsMain({partId:e})}async markPartForRestart(e){await this.client.markPartForRestart({partId:e})}async createRobotPartSecret(e){return(await this.client.createRobotPartSecret({partId:e})).part}async deleteRobotPartSecret(e,n){await this.client.deleteRobotPartSecret({partId:e,secretId:n})}async listRobots(e){return(await this.client.listRobots({locationId:e})).robots}async newRobot(e,n){return(await this.client.newRobot({name:n,location:e})).id}async updateRobot(e,n,t){return(await this.client.updateRobot({id:e,location:n,name:t})).robot}async deleteRobot(e){await this.client.deleteRobot({id:e})}async listFragments(e,n=!0,t=[]){return(await this.client.listFragments({organizationId:e,showPublic:n,fragmentVisibility:t})).fragments}async getFragment(e){return(await this.client.getFragment({id:e})).fragment}async createFragment(e,n,t){return(await this.client.createFragment({organizationId:e,name:n,config:t})).fragment}async updateFragment(e,n,t,o,i){return(await this.client.updateFragment({id:e,name:n,config:t,public:o,visibility:i})).fragment}async deleteFragment(e){await this.client.deleteFragment({id:e})}async listMachineFragments(e,n){return(await this.client.listMachineFragments({machineId:e,additionalFragmentIds:n})).fragments}async addRole(e,n,t,o,i){await this.client.addRole({authorization:zh(e,n,t,o,"",i)})}async removeRole(e,n,t,o,i){await this.client.removeRole({authorization:zh(e,n,t,o,"",i)})}async changeRole(e,n){await this.client.changeRole({oldAuthorization:e,newAuthorization:n})}async listAuthorizations(e,n){return(await this.client.listAuthorizations({organizationId:e,resourceIds:n})).authorizations}async checkPermissions(e){return(await this.client.checkPermissions({permissions:e})).authorizedPermissions}async getRegistryItem(e){return(await this.client.getRegistryItem({itemId:e})).item}async createRegistryItem(e,n,t){await this.client.createRegistryItem({organizationId:e,name:n,type:t})}async updateRegistryItem(e,n,t,o){await this.client.updateRegistryItem({itemId:e,type:n,description:t,visibility:o})}async listRegistryItems(e,n,t,o,i,r,c){const l={organizationId:e,types:n,visibilities:t,platforms:o,statuses:i,searchTerm:r,pageToken:c};return(await this.client.listRegistryItems(l)).items}async deleteRegistryItem(e){await this.client.deleteRegistryItem({itemId:e})}async createModule(e,n){return this.client.createModule({organizationId:e,name:n})}async updateModule(e,n,t,o,i,r){return(await this.client.updateModule({moduleId:e,visibility:n,url:t,description:o,models:i,entrypoint:r})).url}async getModule(e){return(await this.client.getModule({moduleId:e})).module}async listModules(e){return(await this.client.listModules({organizationId:e})).modules}async createKey(e,n){return this.client.createKey({name:n,authorizations:e})}async deleteKey(e){return this.client.deleteKey({id:e})}async listKeys(e){return(await this.client.listKeys({orgId:e})).apiKeys}async rotateKey(e){return this.client.rotateKey({id:e})}async createKeyFromExistingKeyAuthorizations(e){return this.client.createKeyFromExistingKeyAuthorizations({id:e})}async getAppContent(e,n){return this.client.getAppContent({publicNamespace:e,name:n})}async getOrganizationMetadata(e){return(await this.client.getOrganizationMetadata({organizationId:e})).toJson().data??{}}async updateOrganizationMetadata(e,n){await this.client.updateOrganizationMetadata({organizationId:e,data:p.fromJson(n)})}async getLocationMetadata(e){return(await this.client.getLocationMetadata({locationId:e})).toJson().data??{}}async updateLocationMetadata(e,n){await this.client.updateLocationMetadata({locationId:e,data:p.fromJson(n)})}async getRobotMetadata(e){return(await this.client.getRobotMetadata({id:e})).toJson().data??{}}async updateRobotMetadata(e,n){await this.client.updateRobotMetadata({id:e,data:p.fromJson(n)})}async getRobotPartMetadata(e){return(await this.client.getRobotPartMetadata({id:e})).toJson().data??{}}async updateRobotPartMetadata(e,n){await this.client.updateRobotPartMetadata({id:e,data:p.fromJson(n)})}async getAppBranding(e,n){return this.client.getAppBranding({publicNamespace:e,name:n})}async listMachineSummaries(e,n,t,o){const i=new ri({organizationId:e,fragmentIds:n,locationIds:t,limit:o});return(await this.client.listMachineSummaries(i)).locationSummaries}async createOAuthAppUser(e,n,t,o,i,r){return this.client.createOAuthAppUser({orgId:e,applicationId:n,email:t,firstName:o,lastName:i,password:r})}}const Vh=s.makeEnum("viam.app.v1.PaymentMethodType",[{no:0,name:"PAYMENT_METHOD_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"PAYMENT_METHOD_TYPE_CARD",localName:"CARD"},{no:2,name:"PAYMENT_METHOD_TYPE_USBANKACCOUNT",localName:"USBANKACCOUNT"}]),$h=s.makeEnum("viam.app.v1.UsageCostType",[{no:0,name:"USAGE_COST_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"USAGE_COST_TYPE_DATA_UPLOAD",localName:"DATA_UPLOAD"},{no:2,name:"USAGE_COST_TYPE_DATA_EGRESS",localName:"DATA_EGRESS"},{no:3,name:"USAGE_COST_TYPE_REMOTE_CONTROL",localName:"REMOTE_CONTROL"},{no:4,name:"USAGE_COST_TYPE_STANDARD_COMPUTE",localName:"STANDARD_COMPUTE"},{no:5,name:"USAGE_COST_TYPE_CLOUD_STORAGE",localName:"CLOUD_STORAGE"},{no:6,name:"USAGE_COST_TYPE_BINARY_DATA_CLOUD_STORAGE",localName:"BINARY_DATA_CLOUD_STORAGE"},{no:7,name:"USAGE_COST_TYPE_OTHER_CLOUD_STORAGE",localName:"OTHER_CLOUD_STORAGE"},{no:8,name:"USAGE_COST_TYPE_PER_MACHINE",localName:"PER_MACHINE"},{no:9,name:"USAGE_COST_TYPE_TRIGGER_NOTIFICATION",localName:"TRIGGER_NOTIFICATION"},{no:10,name:"USAGE_COST_TYPE_TABULAR_DATA_CLOUD_STORAGE",localName:"TABULAR_DATA_CLOUD_STORAGE"},{no:11,name:"USAGE_COST_TYPE_CONFIG_HISTORY_CLOUD_STORAGE",localName:"CONFIG_HISTORY_CLOUD_STORAGE"},{no:12,name:"USAGE_COST_TYPE_LOGS_CLOUD_STORAGE",localName:"LOGS_CLOUD_STORAGE"},{no:13,name:"USAGE_COST_TYPE_TRAINING_LOGS_CLOUD_STORAGE",localName:"TRAINING_LOGS_CLOUD_STORAGE"},{no:14,name:"USAGE_COST_TYPE_PACKAGES_CLOUD_STORAGE",localName:"PACKAGES_CLOUD_STORAGE"},{no:15,name:"USAGE_COST_TYPE_BINARY_DATA_UPLOAD",localName:"BINARY_DATA_UPLOAD"},{no:16,name:"USAGE_COST_TYPE_TABULAR_DATA_UPLOAD",localName:"TABULAR_DATA_UPLOAD"},{no:17,name:"USAGE_COST_TYPE_LOGS_UPLOAD",localName:"LOGS_UPLOAD"},{no:18,name:"USAGE_COST_TYPE_BINARY_DATA_EGRESS",localName:"BINARY_DATA_EGRESS"},{no:19,name:"USAGE_COST_TYPE_TABULAR_DATA_EGRESS",localName:"TABULAR_DATA_EGRESS"},{no:20,name:"USAGE_COST_TYPE_LOGS_EGRESS",localName:"LOGS_EGRESS"},{no:21,name:"USAGE_COST_TYPE_TRAINING_LOGS_EGRESS",localName:"TRAINING_LOGS_EGRESS"},{no:22,name:"USAGE_COST_TYPE_TABULAR_DATA_DATABASE_CLOUD_STORAGE",localName:"TABULAR_DATA_DATABASE_CLOUD_STORAGE"},{no:23,name:"USAGE_COST_TYPE_TABULAR_DATA_DATABASE_COMPUTE",localName:"TABULAR_DATA_DATABASE_COMPUTE"},{no:24,name:"USAGE_COST_TYPE_BINARY_DATA_CROSS_REGION_EGRESS",localName:"BINARY_DATA_CROSS_REGION_EGRESS"},{no:25,name:"USAGE_COST_TYPE_PIPELINE_SINK_CLOUD_STORAGE",localName:"PIPELINE_SINK_CLOUD_STORAGE"},{no:26,name:"USAGE_COST_TYPE_PIPELINE_SINK_COMPUTE",localName:"PIPELINE_SINK_COMPUTE"}]),Yh=s.makeEnum("viam.app.v1.SourceType",[{no:0,name:"SOURCE_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"SOURCE_TYPE_ORG",localName:"ORG"},{no:2,name:"SOURCE_TYPE_FRAGMENT",localName:"FRAGMENT"}]),Wh=s.makeMessageType("viam.app.v1.InvoiceSummary",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"invoice_date",kind:"message",T:_},{no:3,name:"invoice_amount",kind:"scalar",T:1},{no:4,name:"status",kind:"scalar",T:9},{no:5,name:"due_date",kind:"message",T:_},{no:6,name:"paid_date",kind:"message",T:_},{no:7,name:"last_payment_failure_reason",kind:"scalar",T:9},{no:8,name:"last_payment_failure_at",kind:"message",T:_}]),Hh=s.makeMessageType("viam.app.v1.PaymentMethodCard",()=>[{no:1,name:"brand",kind:"scalar",T:9},{no:2,name:"last_four_digits",kind:"scalar",T:9}]),jh=s.makeMessageType("viam.app.v1.VerificationInfo",()=>[{no:1,name:"arrival_date",kind:"scalar",T:3},{no:2,name:"hosted_verification_page_url",kind:"scalar",T:9}]),Kh=s.makeMessageType("viam.app.v1.PaymentMethodUSBankAccount",()=>[{no:1,name:"bank_name",kind:"scalar",T:9},{no:2,name:"last_four_digits_account_number",kind:"scalar",T:9},{no:3,name:"routing_number",kind:"scalar",T:9},{no:4,name:"account_type",kind:"scalar",T:9},{no:5,name:"verification_info",kind:"message",T:jh,opt:!0}]),Xh=s.makeMessageType("viam.app.v1.GetCurrentMonthUsageRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),Qh=s.makeMessageType("viam.app.v1.UsageCost",()=>[{no:1,name:"resource_type",kind:"enum",T:s.getEnumType($h)},{no:2,name:"cost",kind:"scalar",T:1}]),Zh=s.makeMessageType("viam.app.v1.ResourceUsageCostsBySource",()=>[{no:1,name:"source_type",kind:"enum",T:s.getEnumType(Yh)},{no:2,name:"resource_usage_costs",kind:"message",T:ef},{no:3,name:"tier_name",kind:"scalar",T:9}]),ef=s.makeMessageType("viam.app.v1.ResourceUsageCosts",()=>[{no:1,name:"usage_costs",kind:"message",T:Qh,repeated:!0},{no:2,name:"discount",kind:"scalar",T:1},{no:3,name:"total_with_discount",kind:"scalar",T:1},{no:4,name:"total_without_discount",kind:"scalar",T:1}]),nf=s.makeMessageType("viam.app.v1.GetCurrentMonthUsageResponse",()=>[{no:1,name:"start_date",kind:"message",T:_},{no:2,name:"end_date",kind:"message",T:_},{no:14,name:"resource_usage_costs_by_source",kind:"message",T:Zh,repeated:!0},{no:15,name:"subtotal",kind:"scalar",T:1},{no:3,name:"cloud_storage_usage_cost",kind:"scalar",T:1},{no:4,name:"data_upload_usage_cost",kind:"scalar",T:1},{no:5,name:"data_egres_usage_cost",kind:"scalar",T:1},{no:6,name:"remote_control_usage_cost",kind:"scalar",T:1},{no:7,name:"standard_compute_usage_cost",kind:"scalar",T:1},{no:8,name:"discount_amount",kind:"scalar",T:1},{no:9,name:"total_usage_with_discount",kind:"scalar",T:1},{no:10,name:"total_usage_without_discount",kind:"scalar",T:1},{no:11,name:"per_machine_usage_cost",kind:"scalar",T:1},{no:12,name:"binary_data_cloud_storage_usage_cost",kind:"scalar",T:1},{no:13,name:"other_cloud_storage_usage_cost",kind:"scalar",T:1}]),af=s.makeMessageType("viam.app.v1.GetOrgBillingInformationRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),tf=s.makeMessageType("viam.app.v1.GetOrgBillingInformationResponse",()=>[{no:1,name:"type",kind:"enum",T:s.getEnumType(Vh)},{no:2,name:"billing_email",kind:"scalar",T:9},{no:3,name:"method",kind:"message",T:Hh,opt:!0},{no:4,name:"billing_tier",kind:"scalar",T:9,opt:!0},{no:5,name:"method_us_bank_account",kind:"message",T:Kh,opt:!0}]),sf=s.makeMessageType("viam.app.v1.GetInvoicesSummaryRequest",()=>[{no:1,name:"org_id",kind:"scalar",T:9}]),of=s.makeMessageType("viam.app.v1.GetInvoicesSummaryResponse",()=>[{no:1,name:"outstanding_balance",kind:"scalar",T:1},{no:2,name:"invoices",kind:"message",T:Wh,repeated:!0}]),rf=s.makeMessageType("viam.app.v1.GetInvoicePdfRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"org_id",kind:"scalar",T:9}]),mf=s.makeMessageType("viam.app.v1.GetInvoicePdfResponse",()=>[{no:1,name:"chunk",kind:"scalar",T:12}]),cf=s.makeMessageType("viam.app.v1.SendPaymentRequiredEmailRequest",()=>[{no:1,name:"customer_org_id",kind:"scalar",T:9},{no:2,name:"billing_owner_org_id",kind:"scalar",T:9}]),lf=s.makeMessageType("viam.app.v1.SendPaymentRequiredEmailResponse",[]),df=s.makeMessageType("viam.app.v1.GetAvailableBillingTiersRequest",[]),pf=s.makeMessageType("viam.app.v1.GetAvailableBillingTiersResponse",()=>[{no:1,name:"tiers",kind:"scalar",T:9,repeated:!0}]),uf=s.makeMessageType("viam.app.v1.UpdateOrganizationBillingTierRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"billing_tier",kind:"scalar",T:9}]),gf=s.makeMessageType("viam.app.v1.UpdateOrganizationBillingTierResponse",[]),Tf=s.makeMessageType("viam.app.v1.GetLocationBillingOrganizationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9}]),kf=s.makeMessageType("viam.app.v1.GetLocationBillingOrganizationResponse",()=>[{no:1,name:"billing_organization_id",kind:"scalar",T:9}]),yf=s.makeMessageType("viam.app.v1.UpdateLocationBillingOrganizationRequest",()=>[{no:1,name:"location_id",kind:"scalar",T:9},{no:2,name:"billing_organization_id",kind:"scalar",T:9}]),vf=s.makeMessageType("viam.app.v1.UpdateLocationBillingOrganizationResponse",[]),hf=s.makeMessageType("viam.app.v1.ChargeOrganizationRequest",()=>[{no:1,name:"org_id_to_charge",kind:"scalar",T:9},{no:2,name:"description",kind:"scalar",T:9,opt:!0},{no:3,name:"subtotal",kind:"scalar",T:1},{no:4,name:"tax",kind:"scalar",T:1},{no:5,name:"org_id_for_branding",kind:"scalar",T:9,opt:!0},{no:6,name:"disable_confirmation_email",kind:"scalar",T:8}]),ff=s.makeMessageType("viam.app.v1.ChargeOrganizationResponse",()=>[{no:1,name:"invoice_id",kind:"scalar",T:9}]),Rf=s.makeMessageType("viam.app.v1.CreateInvoiceAndChargeImmediatelyRequest",()=>[{no:1,name:"org_id_to_charge",kind:"scalar",T:9},{no:2,name:"amount",kind:"scalar",T:1},{no:3,name:"description",kind:"scalar",T:9,opt:!0},{no:4,name:"org_id_for_branding",kind:"scalar",T:9,opt:!0},{no:5,name:"disable_email",kind:"scalar",T:8}]),_f=s.makeMessageType("viam.app.v1.CreateInvoiceAndChargeImmediatelyResponse",()=>[{no:1,name:"invoice_id",kind:"scalar",T:9}]),II=Object.freeze(Object.defineProperty({__proto__:null,ChargeOrganizationRequest:hf,ChargeOrganizationResponse:ff,CreateInvoiceAndChargeImmediatelyRequest:Rf,CreateInvoiceAndChargeImmediatelyResponse:_f,GetAvailableBillingTiersRequest:df,GetAvailableBillingTiersResponse:pf,GetCurrentMonthUsageRequest:Xh,GetCurrentMonthUsageResponse:nf,GetInvoicePdfRequest:rf,GetInvoicePdfResponse:mf,GetInvoicesSummaryRequest:sf,GetInvoicesSummaryResponse:of,GetLocationBillingOrganizationRequest:Tf,GetLocationBillingOrganizationResponse:kf,GetOrgBillingInformationRequest:af,GetOrgBillingInformationResponse:tf,InvoiceSummary:Wh,PaymentMethodCard:Hh,PaymentMethodType:Vh,PaymentMethodUSBankAccount:Kh,ResourceUsageCosts:ef,ResourceUsageCostsBySource:Zh,SendPaymentRequiredEmailRequest:cf,SendPaymentRequiredEmailResponse:lf,SourceType:Yh,UpdateLocationBillingOrganizationRequest:yf,UpdateLocationBillingOrganizationResponse:vf,UpdateOrganizationBillingTierRequest:uf,UpdateOrganizationBillingTierResponse:gf,UsageCost:Qh,UsageCostType:$h,VerificationInfo:jh},Symbol.toStringTag,{value:"Module"})),OI={typeName:"viam.app.v1.BillingService",methods:{getCurrentMonthUsage:{name:"GetCurrentMonthUsage",I:Xh,O:nf,kind:m.Unary},getOrgBillingInformation:{name:"GetOrgBillingInformation",I:af,O:tf,kind:m.Unary},getInvoicesSummary:{name:"GetInvoicesSummary",I:sf,O:of,kind:m.Unary},getInvoicePdf:{name:"GetInvoicePdf",I:rf,O:mf,kind:m.ServerStreaming},sendPaymentRequiredEmail:{name:"SendPaymentRequiredEmail",I:cf,O:lf,kind:m.Unary},getAvailableBillingTiers:{name:"GetAvailableBillingTiers",I:df,O:pf,kind:m.Unary},updateOrganizationBillingTier:{name:"UpdateOrganizationBillingTier",I:uf,O:gf,kind:m.Unary},getLocationBillingOrganization:{name:"GetLocationBillingOrganization",I:Tf,O:kf,kind:m.Unary},updateLocationBillingOrganization:{name:"UpdateLocationBillingOrganization",I:yf,O:vf,kind:m.Unary},chargeOrganization:{name:"ChargeOrganization",I:hf,O:ff,kind:m.Unary},createInvoiceAndChargeImmediately:{name:"CreateInvoiceAndChargeImmediately",I:Rf,O:_f,kind:m.Unary}}};class bI{client;constructor(e){this.client=X(OI,e)}async getCurrentMonthUsage(e){const n=await this.client.getCurrentMonthUsage({orgId:e});return n.start=n.startDate?.toDate(),n.end=n.endDate?.toDate(),n}async getOrgBillingInformation(e){return this.client.getOrgBillingInformation({orgId:e})}async getInvoicesSummary(e){return this.client.getInvoicesSummary({orgId:e})}async getInvoicePdf(e,n){const t=this.client.getInvoicePdf({id:e,orgId:n}),o=[];for await(const i of t)o.push(i.chunk);return MI(o)}}const MI=a=>{const e=a.reduce((o,i)=>o+i.length,0),n=new Uint8Array(e);let t=0;for(const o of a)n.set(o,t),t+=o.length;return n};var Sf={},If={};(function(a){Object.defineProperty(a,"__esModule",{value:!0}),function(e){var n=function(){function y(f){this._id=new Uint8Array(f)}return y.prototype.buffer=function(){return this._id},y}();e.UUID=n;var t=function(){function y(f){this._id=new Uint8Array(f)}return y.prototype.buffer=function(){return this._id},y}();e.ObjectId=t;var o=function(){function y(f){this._time=typeof f!="string"?new Uint8Array(f||R(Date.now())):R(+new Date(f))}return y.prototype.buffer=function(){return this._time},y.prototype.fromString=function(f){this._time=R(+new Date(f))},y.prototype.toNumber=function(){return O(this._time)},y.prototype.toDate=function(){return new Date(O(this._time))},y}();e.UTC=o;function i(y){var f=5;for(var k in y)f+=r(k,y[k]);return f}function r(y,f){var k=1;if(y&&(k+=V(y)+1),f==null)return k;switch(f.constructor){case String:return k+4+V(f)+1;case Number:return Math.floor(f)===f&&f<=2147483647&&f>=-2147483647?k+4:k+8;case Boolean:return k+1;case Array:case Object:return k+i(f);case Int8Array:case Uint8Array:return k+5+f.byteLength;case Date:case o:return k+8;case n:return k+5+16;case t:return k+12;default:return 0}}function c(y){var f=new Uint8Array(i(y));return l(y,f),f}e.serialize=c;function l(y,f,k){if(k===void 0&&(k=0),k+=u(f.length,f,k),y.constructor===Array)for(var v=0,E=y.length;v<E;v++)k=h(v.toString(),y[v],f,k);else for(var M in y)k=h(M,y[M],f,k);return f[k++]=0,k}function d(y,f,k){var v=b(y),E=v.length;return f.set(v,k),f[k+E++]=0,E}function u(y,f,k){return f[k++]=y&255,f[k++]=y>>>8&255,f[k++]=y>>>16&255,f[k++]=y>>>24&255,4}function h(y,f,k,v){if(f==null)return k[v++]=10,v+=d(y,k,v),v;switch(f.constructor){case String:k[v++]=2,v+=d(y,k,v);var E=d(f,k,v+4);return v+=u(E,k,v),v+E;case Number:if(Math.floor(f)===f)f<=2147483647&&f>=-2147483647?(k[v++]=16,v+=d(y,k,v),v+=u(f,k,v)):(k[v++]=18,v+=d(y,k,v),k.set(R(f),v),v+=8);else{k[v++]=1,v+=d(y,k,v);var M=new Float64Array([f]),oe=new Uint8Array(M.buffer);k.set(oe,v),v+=8}return v;case Boolean:return k[v++]=8,v+=d(y,k,v),k[v++]=f?1:0,v;case Array:case Object:k[v++]=f.constructor===Array?4:3,v+=d(y,k,v);var B=l(f,k,v);return u(B-v,k,v),B;case Int8Array:case Uint8Array:return k[v++]=5,v+=d(y,k,v),v+=u(f.byteLength,k,v),k[v++]=0,k.set(f,v),v+=f.byteLength,v;case Date:return k[v++]=9,v+=d(y,k,v),k.set(R(f.getTime()),v),v+=8,v;case o:return k[v++]=9,v+=d(y,k,v),k.set(f.buffer(),v),v+=8,v;case n:return k[v++]=5,v+=d(y,k,v),v+=u(16,k,v),k[v++]=4,k.set(f.buffer(),v),v+=16,v;case t:return k[v++]=7,v+=d(y,k,v),k.set(f.buffer(),v),v+=12,v;case RegExp:return k[v++]=11,v+=d(y,k,v),v+=d(f.source,k,v),f.global&&(k[v++]=115),f.ignoreCase&&(k[v++]=105),f.multiline&&(k[v++]=109),k[v++]=0,v;default:return v}}function I(y,f,k,v){if(f===void 0&&(f=!1),k===void 0&&(k=0),v===void 0&&(v=!1),!(y.length<5)){var E=y[k++]|y[k++]<<8|y[k++]<<16|y[k++]<<24;if(!(E<5||E>y.length)&&y[y.length-1]===0){for(var M=v?[]:{};;){var oe=y[k++];if(oe===0)break;for(var B=k;y[B]!==0&&B<y.length;B++);if(B>=y.length-1)return;var Y=N(y.subarray(k,B));switch(v&&(Y=parseInt(Y)),k=++B,oe){case 1:M[Y]=new Float64Array(y.slice(k,k+=8).buffer)[0];break;case 2:E=y[k++]|y[k++]<<8|y[k++]<<16|y[k++]<<24,M[Y]=N(y.subarray(k,k+=E-1)),k++;break;case 3:E=y[k]|y[k+1]<<8|y[k+2]<<16|y[k+3]<<24,M[Y]=I(y,f,k,!1),k+=E;break;case 4:E=y[k]|y[k+1]<<8|y[k+2]<<16|y[k+3]<<24,M[Y]=I(y,f,k,!0),k+=E;break;case 5:if(E=y[k++]|y[k++]<<8|y[k++]<<16|y[k++]<<24,y[k++]===4){if(E!==16)return;M[Y]=new n(y.subarray(k,k+=E))}else M[Y]=y.slice(k,k+=E);break;case 6:M[Y]=null;break;case 7:M[Y]=new t(y.subarray(k,k+=12));break;case 8:M[Y]=y[k++]===1;break;case 9:M[Y]=f?new o(y.subarray(k,k+=8)):new Date(O(y.subarray(k,k+=8)));break;case 10:M[Y]=null;break;case 11:for(B=k;B<y.length&&y[B++]!==0;);if(B>=y.length)return;var Ci=N(y.subarray(k,B));for(k=B;B<y.length&&y[B++]!==0;);if(B>=y.length)return;var Ni=N(y.subarray(k,B));k=B,M[Y]=new RegExp(Ci,Ni);break;case 16:M[Y]=y[k++]|y[k++]<<8|y[k++]<<16|y[k++]<<24;break;case 18:M[Y]=O(y.subarray(k,k+=8));break;default:return}}return M}}}e.deserialize=I;function R(y){var f=new Uint8Array(8);if(Math.floor(y)===y){var k=4294967296,v=y%k|0,E=y/k|0;y<0&&(v=~(-y%k)|0,E=~(-y/k)|0,v=v+1&4294967295,v||E++);var M=0;f[M++]=v&255,f[M++]=v>>>8&255,f[M++]=v>>>16&255,f[M++]=v>>>24&255,f[M++]=E&255,f[M++]=E>>>8&255,f[M++]=E>>>16&255,f[M]=E>>>24&255}else{var oe=new Float64Array([y]),B=new Uint8Array(oe.buffer);f.set(B)}return f}function O(y,f){f===void 0&&(f=0);var k=4294967296,v=y[f++]|y[f++]<<8|y[f++]<<16|y[f++]<<24,E=y[f++]|y[f++]<<8|y[f++]<<16|y[f]<<24;return E*k+(v>=0?v:k+v)}function b(y){y=y.replace(/\r\n/g,`
|
|
9
|
+
`);for(var f=[],k=0,v=0,E=y.length;v<E;v++){var M=y.charCodeAt(v);M<128?f[k++]=M:M<2048?(f[k++]=M>>>6|192,f[k++]=M&63|128):(f[k++]=M>>>12|224,f[k++]=M>>>6&63|128,f[k++]=M&63|128)}return new Uint8Array(f)}function N(y){for(var f="",k=y.length,v=0,E,M,oe;v<k;)E=y[v],E<128?(f+=String.fromCharCode(E),v++):E>191&&E<224?(M=y[v+1],f+=String.fromCharCode((E&31)<<6|M&63),v+=2):(M=y[v+1],oe=y[v+2],f+=String.fromCharCode((E&15)<<12|(M&63)<<6|oe&63),v+=3);return f}function V(y){return encodeURI(y).split(/%..|./).length-1}}(a.BSON||(a.BSON={}))})(If),Object.defineProperty(Sf,"__esModule",{value:!0});var EI=If,Wn=Sf.BSON=EI.BSON;const wI={typeName:"viam.app.data.v1.DataService",methods:{tabularDataByFilter:{name:"TabularDataByFilter",I:hp,O:fp,kind:m.Unary},tabularDataBySQL:{name:"TabularDataBySQL",I:_p,O:Sp,kind:m.Unary},tabularDataByMQL:{name:"TabularDataByMQL",I:Ip,O:Op,kind:m.Unary},exportTabularData:{name:"ExportTabularData",I:bp,O:Mp,kind:m.ServerStreaming},getLatestTabularData:{name:"GetLatestTabularData",I:Ep,O:wp,kind:m.Unary},binaryDataByFilter:{name:"BinaryDataByFilter",I:Cp,O:Np,kind:m.Unary},binaryDataByIDs:{name:"BinaryDataByIDs",I:Pp,O:Dp,kind:m.Unary},deleteTabularData:{name:"DeleteTabularData",I:Gp,O:Bp,kind:m.Unary},deleteBinaryDataByFilter:{name:"DeleteBinaryDataByFilter",I:Fp,O:xp,kind:m.Unary},deleteBinaryDataByIDs:{name:"DeleteBinaryDataByIDs",I:Jp,O:zp,kind:m.Unary},addTagsToBinaryDataByIDs:{name:"AddTagsToBinaryDataByIDs",I:Vp,O:$p,kind:m.Unary},addTagsToBinaryDataByFilter:{name:"AddTagsToBinaryDataByFilter",I:Yp,O:Wp,kind:m.Unary},removeTagsFromBinaryDataByIDs:{name:"RemoveTagsFromBinaryDataByIDs",I:Hp,O:jp,kind:m.Unary},removeTagsFromBinaryDataByFilter:{name:"RemoveTagsFromBinaryDataByFilter",I:Kp,O:Xp,kind:m.Unary},tagsByFilter:{name:"TagsByFilter",I:Qp,O:Zp,kind:m.Unary},addBoundingBoxToImageByID:{name:"AddBoundingBoxToImageByID",I:eu,O:nu,kind:m.Unary},removeBoundingBoxFromImageByID:{name:"RemoveBoundingBoxFromImageByID",I:au,O:tu,kind:m.Unary},boundingBoxLabelsByFilter:{name:"BoundingBoxLabelsByFilter",I:iu,O:ru,kind:m.Unary},updateBoundingBox:{name:"UpdateBoundingBox",I:su,O:ou,kind:m.Unary},getDatabaseConnection:{name:"GetDatabaseConnection",I:lu,O:du,kind:m.Unary},configureDatabaseUser:{name:"ConfigureDatabaseUser",I:mu,O:cu,kind:m.Unary},addBinaryDataToDatasetByIDs:{name:"AddBinaryDataToDatasetByIDs",I:pu,O:uu,kind:m.Unary},removeBinaryDataFromDatasetByIDs:{name:"RemoveBinaryDataFromDatasetByIDs",I:gu,O:Tu,kind:m.Unary},createIndex:{name:"CreateIndex",I:ku,O:yu,kind:m.Unary},listIndexes:{name:"ListIndexes",I:fu,O:Ru,kind:m.Unary},deleteIndex:{name:"DeleteIndex",I:vu,O:hu,kind:m.Unary},createSavedQuery:{name:"CreateSavedQuery",I:Su,O:Iu,kind:m.Unary},updateSavedQuery:{name:"UpdateSavedQuery",I:wu,O:Cu,kind:m.Unary},getSavedQuery:{name:"GetSavedQuery",I:Mu,O:Eu,kind:m.Unary},deleteSavedQuery:{name:"DeleteSavedQuery",I:Ou,O:bu,kind:m.Unary},listSavedQueries:{name:"ListSavedQueries",I:Nu,O:Pu,kind:m.Unary},createBinaryDataSignedURL:{name:"CreateBinaryDataSignedURL",I:Du,O:Au,kind:m.Unary},createSequence:{name:"CreateSequence",I:Uu,O:qu,kind:m.Unary},getSequence:{name:"GetSequence",I:Lu,O:Gu,kind:m.Unary},updateSequence:{name:"UpdateSequence",I:Bu,O:Fu,kind:m.Unary},deleteSequence:{name:"DeleteSequence",I:xu,O:Ju,kind:m.Unary},listSequences:{name:"ListSequences",I:zu,O:Vu,kind:m.Unary}}},CI=s.makeEnum("viam.app.datapipelines.v1.DataPipelineRunStatus",[{no:0,name:"DATA_PIPELINE_RUN_STATUS_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"DATA_PIPELINE_RUN_STATUS_SCHEDULED",localName:"SCHEDULED"},{no:2,name:"DATA_PIPELINE_RUN_STATUS_STARTED",localName:"STARTED"},{no:3,name:"DATA_PIPELINE_RUN_STATUS_COMPLETED",localName:"COMPLETED"},{no:4,name:"DATA_PIPELINE_RUN_STATUS_FAILED",localName:"FAILED"}]),Of=s.makeMessageType("viam.app.datapipelines.v1.DataPipeline",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"mql_binary",kind:"scalar",T:12,repeated:!0},{no:5,name:"schedule",kind:"scalar",T:9},{no:6,name:"enabled",kind:"scalar",T:8},{no:7,name:"created_on",kind:"message",T:_},{no:8,name:"updated_at",kind:"message",T:_},{no:9,name:"data_source_type",kind:"enum",T:s.getEnumType(sn),opt:!0}]),NI=s.makeMessageType("viam.app.datapipelines.v1.GetDataPipelineRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),PI=s.makeMessageType("viam.app.datapipelines.v1.GetDataPipelineResponse",()=>[{no:1,name:"data_pipeline",kind:"message",T:Of}]),DI=s.makeMessageType("viam.app.datapipelines.v1.ListDataPipelinesRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),AI=s.makeMessageType("viam.app.datapipelines.v1.ListDataPipelinesResponse",()=>[{no:1,name:"data_pipelines",kind:"message",T:Of,repeated:!0}]),UI=s.makeMessageType("viam.app.datapipelines.v1.CreateDataPipelineRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"mql_binary",kind:"scalar",T:12,repeated:!0},{no:4,name:"schedule",kind:"scalar",T:9},{no:5,name:"enable_backfill",kind:"scalar",T:8,opt:!0},{no:6,name:"data_source_type",kind:"enum",T:s.getEnumType(sn),opt:!0}]),qI=s.makeMessageType("viam.app.datapipelines.v1.CreateDataPipelineResponse",()=>[{no:1,name:"id",kind:"scalar",T:9}]),LI=s.makeMessageType("viam.app.datapipelines.v1.RenameDataPipelineRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),GI=s.makeMessageType("viam.app.datapipelines.v1.RenameDataPipelineResponse",[]),BI=s.makeMessageType("viam.app.datapipelines.v1.DeleteDataPipelineRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),FI=s.makeMessageType("viam.app.datapipelines.v1.DeleteDataPipelineResponse",[]),xI=s.makeMessageType("viam.app.datapipelines.v1.EnableDataPipelineRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),JI=s.makeMessageType("viam.app.datapipelines.v1.EnableDataPipelineResponse",[]),zI=s.makeMessageType("viam.app.datapipelines.v1.DisableDataPipelineRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),VI=s.makeMessageType("viam.app.datapipelines.v1.DisableDataPipelineResponse",[]),$I=s.makeMessageType("viam.app.datapipelines.v1.ListDataPipelineRunsRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"page_size",kind:"scalar",T:13},{no:3,name:"page_token",kind:"scalar",T:9}]),YI=s.makeMessageType("viam.app.datapipelines.v1.ListDataPipelineRunsResponse",()=>[{no:1,name:"pipeline_id",kind:"scalar",T:9},{no:2,name:"runs",kind:"message",T:WI,repeated:!0},{no:3,name:"next_page_token",kind:"scalar",T:9}]),WI=s.makeMessageType("viam.app.datapipelines.v1.DataPipelineRun",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"start_time",kind:"message",T:_},{no:3,name:"end_time",kind:"message",T:_},{no:4,name:"data_start_time",kind:"message",T:_},{no:5,name:"data_end_time",kind:"message",T:_},{no:6,name:"status",kind:"enum",T:s.getEnumType(CI)},{no:7,name:"error_message",kind:"scalar",T:9}]),HI={typeName:"viam.app.datapipelines.v1.DataPipelinesService",methods:{getDataPipeline:{name:"GetDataPipeline",I:NI,O:PI,kind:m.Unary},listDataPipelines:{name:"ListDataPipelines",I:DI,O:AI,kind:m.Unary},createDataPipeline:{name:"CreateDataPipeline",I:UI,O:qI,kind:m.Unary},renameDataPipeline:{name:"RenameDataPipeline",I:LI,O:GI,kind:m.Unary},deleteDataPipeline:{name:"DeleteDataPipeline",I:BI,O:FI,kind:m.Unary},enableDataPipeline:{name:"EnableDataPipeline",I:xI,O:JI,kind:m.Unary},disableDataPipeline:{name:"DisableDataPipeline",I:zI,O:VI,kind:m.Unary},listDataPipelineRuns:{name:"ListDataPipelineRuns",I:$I,O:YI,kind:m.Unary}}},bf=s.makeMessageType("viam.app.dataset.v1.Dataset",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"organization_id",kind:"scalar",T:9},{no:4,name:"time_created",kind:"message",T:_}]),jI=s.makeMessageType("viam.app.dataset.v1.CreateDatasetRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"organization_id",kind:"scalar",T:9}]),KI=s.makeMessageType("viam.app.dataset.v1.CreateDatasetResponse",()=>[{no:1,name:"id",kind:"scalar",T:9}]),XI=s.makeMessageType("viam.app.dataset.v1.DeleteDatasetRequest",()=>[{no:1,name:"id",kind:"scalar",T:9}]),QI=s.makeMessageType("viam.app.dataset.v1.DeleteDatasetResponse",[]),ZI=s.makeMessageType("viam.app.dataset.v1.RenameDatasetRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9}]),eO=s.makeMessageType("viam.app.dataset.v1.RenameDatasetResponse",[]),nO=s.makeMessageType("viam.app.dataset.v1.ListDatasetsByOrganizationIDRequest",()=>[{no:1,name:"organization_id",kind:"scalar",T:9}]),aO=s.makeMessageType("viam.app.dataset.v1.ListDatasetsByOrganizationIDResponse",()=>[{no:1,name:"datasets",kind:"message",T:bf,repeated:!0}]),tO=s.makeMessageType("viam.app.dataset.v1.ListDatasetsByIDsRequest",()=>[{no:1,name:"ids",kind:"scalar",T:9,repeated:!0}]),sO=s.makeMessageType("viam.app.dataset.v1.ListDatasetsByIDsResponse",()=>[{no:1,name:"datasets",kind:"message",T:bf,repeated:!0}]),oO=s.makeMessageType("viam.app.dataset.v1.MergeDatasetsRequest",()=>[{no:1,name:"dataset_ids",kind:"scalar",T:9,repeated:!0},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"organization_id",kind:"scalar",T:9}]),iO=s.makeMessageType("viam.app.dataset.v1.MergeDatasetsResponse",()=>[{no:1,name:"dataset_id",kind:"scalar",T:9}]),rO={typeName:"viam.app.dataset.v1.DatasetService",methods:{createDataset:{name:"CreateDataset",I:jI,O:KI,kind:m.Unary},deleteDataset:{name:"DeleteDataset",I:XI,O:QI,kind:m.Unary},renameDataset:{name:"RenameDataset",I:ZI,O:eO,kind:m.Unary},listDatasetsByOrganizationID:{name:"ListDatasetsByOrganizationID",I:nO,O:aO,kind:m.Unary},listDatasetsByIDs:{name:"ListDatasetsByIDs",I:tO,O:sO,kind:m.Unary},mergeDatasets:{name:"MergeDatasets",I:oO,O:iO,kind:m.Unary}}},Mf=s.makeEnum("viam.app.datasync.v1.MimeType",[{no:0,name:"MIME_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"MIME_TYPE_IMAGE_JPEG",localName:"IMAGE_JPEG"},{no:2,name:"MIME_TYPE_IMAGE_PNG",localName:"IMAGE_PNG"},{no:3,name:"MIME_TYPE_APPLICATION_PCD",localName:"APPLICATION_PCD"},{no:4,name:"MIME_TYPE_VIDEO_MP4",localName:"VIDEO_MP4"}]),tt=s.makeEnum("viam.app.datasync.v1.DataType",[{no:0,name:"DATA_TYPE_UNSPECIFIED",localName:"UNSPECIFIED"},{no:1,name:"DATA_TYPE_BINARY_SENSOR",localName:"BINARY_SENSOR"},{no:2,name:"DATA_TYPE_TABULAR_SENSOR",localName:"TABULAR_SENSOR"},{no:3,name:"DATA_TYPE_FILE",localName:"FILE"}]),ui=s.makeMessageType("viam.app.datasync.v1.DataCaptureUploadRequest",()=>[{no:1,name:"metadata",kind:"message",T:_n},{no:2,name:"sensor_contents",kind:"message",T:ki,repeated:!0}]),mO=s.makeMessageType("viam.app.datasync.v1.DataCaptureUploadResponse",()=>[{no:1,name:"file_id",kind:"scalar",T:9},{no:2,name:"binary_data_id",kind:"scalar",T:9}]),gi=s.makeMessageType("viam.app.datasync.v1.FileUploadRequest",()=>[{no:1,name:"metadata",kind:"message",T:_n,oneof:"upload_packet"},{no:2,name:"file_contents",kind:"message",T:Ef,oneof:"upload_packet"}]),cO=s.makeMessageType("viam.app.datasync.v1.FileUploadResponse",()=>[{no:1,name:"file_id",kind:"scalar",T:9},{no:2,name:"binary_data_id",kind:"scalar",T:9}]),lO=s.makeMessageType("viam.app.datasync.v1.StreamingDataCaptureUploadRequest",()=>[{no:1,name:"metadata",kind:"message",T:pO,oneof:"upload_packet"},{no:2,name:"data",kind:"scalar",T:12,oneof:"upload_packet"}]),dO=s.makeMessageType("viam.app.datasync.v1.StreamingDataCaptureUploadResponse",()=>[{no:1,name:"file_id",kind:"scalar",T:9},{no:2,name:"binary_data_id",kind:"scalar",T:9}]),Ti=s.makeMessageType("viam.app.datasync.v1.SensorMetadata",()=>[{no:1,name:"time_requested",kind:"message",T:_},{no:2,name:"time_received",kind:"message",T:_},{no:3,name:"mime_type",kind:"enum",T:s.getEnumType(Mf)},{no:4,name:"annotations",kind:"message",T:xa}]),ki=s.makeMessageType("viam.app.datasync.v1.SensorData",()=>[{no:1,name:"metadata",kind:"message",T:Ti},{no:2,name:"struct",kind:"message",T:p,oneof:"data"},{no:3,name:"binary",kind:"scalar",T:12,oneof:"data"}]),Ef=s.makeMessageType("viam.app.datasync.v1.FileData",()=>[{no:1,name:"data",kind:"scalar",T:12}]),_n=s.makeMessageType("viam.app.datasync.v1.UploadMetadata",()=>[{no:1,name:"part_id",kind:"scalar",T:9},{no:2,name:"component_type",kind:"scalar",T:9},{no:3,name:"component_name",kind:"scalar",T:9},{no:5,name:"method_name",kind:"scalar",T:9},{no:6,name:"type",kind:"enum",T:s.getEnumType(tt)},{no:8,name:"method_parameters",kind:"map",K:9,V:{kind:"message",T:Z}},{no:7,name:"file_name",kind:"scalar",T:9},{no:9,name:"file_extension",kind:"scalar",T:9},{no:14,name:"file_create_time",kind:"message",T:_},{no:15,name:"file_modify_time",kind:"message",T:_},{no:10,name:"tags",kind:"scalar",T:9,repeated:!0},{no:12,name:"dataset_ids",kind:"scalar",T:9,repeated:!0},{no:13,name:"mime_type",kind:"scalar",T:9}]),pO=s.makeMessageType("viam.app.datasync.v1.DataCaptureUploadMetadata",()=>[{no:1,name:"upload_metadata",kind:"message",T:_n},{no:2,name:"sensor_metadata",kind:"message",T:Ti}]),uO={typeName:"viam.app.datasync.v1.DataSyncService",methods:{dataCaptureUpload:{name:"DataCaptureUpload",I:ui,O:mO,kind:m.Unary},fileUpload:{name:"FileUpload",I:gi,O:cO,kind:m.ClientStreaming},streamingDataCaptureUpload:{name:"StreamingDataCaptureUpload",I:lO,O:dO,kind:m.ClientStreaming}}},Je=()=>{console.warn("The BinaryID type is deprecated and will be removed in a future release. Please migrate to the BinaryDataId field instead.")};class Hn{dataClient;datasetClient;dataSyncClient;dataPipelinesClient;static UPLOAD_CHUNK_SIZE=1024*64;constructor(e){this.dataClient=X(wI,e),this.datasetClient=X(rO,e),this.dataSyncClient=X(uO,e),this.dataPipelinesClient=X(HI,e)}async exportTabularData(e,n,t,o,i,r,c){const l=new zn;i&&(l.start=_.fromDate(i)),r&&(l.end=_.fromDate(r));let d;c&&(d=p.fromJson(c));const u={partId:e,resourceName:n,resourceSubtype:t,methodName:o,interval:l,additionalParameters:d},h=this.dataClient.exportTabularData(u),I=[];for await(const R of h)I.push({partId:R.partId,resourceName:R.resourceName,resourceSubtype:R.resourceSubtype,methodName:R.methodName,timeCaptured:R.timeCaptured.toDate(),organizationId:R.organizationId,locationId:R.locationId,robotName:R.robotName,robotId:R.robotId,partName:R.partName,methodParameters:R.methodParameters.toJson(),tags:R.tags,payload:R.payload.toJson()});return I}async tabularDataBySQL(e,n){return(await this.dataClient.tabularDataBySQL({organizationId:e,sqlQuery:n})).rawData.map(o=>Wn.deserialize(o))}async tabularDataByMQL(e,n,t,o,i){const r=n[0]instanceof Uint8Array?n:n.map(d=>Wn.serialize(d));let c=o;return t&&(!c||c.type===sn.UNSPECIFIED)&&(c=new Fo({type:sn.HOT_STORAGE})),(await this.dataClient.tabularDataByMQL({organizationId:e,mqlBinary:r,dataSource:c,queryPrefixName:i})).rawData.map(d=>Wn.deserialize(d))}async tabularDataByFilter(e,n,t,o="",i=!1,r=!1){const l={dataRequest:{filter:e,limit:n===void 0?void 0:BigInt(n),sortOrder:t,last:o},countOnly:i,includeInternalData:r},d=await this.dataClient.tabularDataByFilter(l),u=d.metadata.length,h=[];return h.push(...d.data.map(I=>{const R=I.metadataIndex,O=u!==0&&R>=u?new Fa:d.metadata[R];return{data:I.data?.toJson(),metadata:O,timeRequested:I.timeRequested?.toDate(),timeReceived:I.timeRequested?.toDate()}})),{data:h,count:d.count,last:d.last}}async binaryDataByFilter(e,n,t,o="",i=!0,r=!1,c=!1){const d={dataRequest:{filter:e,limit:n===void 0?void 0:BigInt(n),sortOrder:t,last:o},includeBinary:i,countOnly:r,includeInternalData:c},u=await this.dataClient.binaryDataByFilter(d);return{data:u.data,count:u.count,last:u.last}}async binaryDataByIds(e,n=!0){return Array.isArray(e)&&typeof e[0]=="string"?(await this.dataClient.binaryDataByIDs({binaryDataIds:e,includeBinary:n})).data:(Je(),(await this.dataClient.binaryDataByIDs({binaryIds:e,includeBinary:n})).data)}async createBinaryDataSignedURL(e,n){return(await this.dataClient.createBinaryDataSignedURL({binaryDataId:e,expirationMinutes:n})).signedUrl}async deleteTabularData(e,n,t){return(await this.dataClient.deleteTabularData({organizationId:e,deleteOlderThanDays:n,filter:t})).deletedCount}async deleteBinaryDataByFilter(e,n=!0){return(await this.dataClient.deleteBinaryDataByFilter({filter:e,includeInternalData:n})).deletedCount}async deleteBinaryDataByIds(e){return Array.isArray(e)&&typeof e[0]=="string"?(await this.dataClient.deleteBinaryDataByIDs({binaryDataIds:e})).deletedCount:(Je(),(await this.dataClient.deleteBinaryDataByIDs({binaryIds:e})).deletedCount)}async addTagsToBinaryDataByIds(e,n){if(Array.isArray(n)&&typeof n[0]=="string"){await this.dataClient.addTagsToBinaryDataByIDs({tags:e,binaryDataIds:n});return}Je(),await this.dataClient.addTagsToBinaryDataByIDs({tags:e,binaryIds:n})}async addTagsToBinaryDataByFilter(e,n){await this.dataClient.addTagsToBinaryDataByFilter({tags:e,filter:n})}async removeTagsFromBinaryDataByIds(e,n){return Array.isArray(n)&&typeof n[0]=="string"?(await this.dataClient.removeTagsFromBinaryDataByIDs({tags:e,binaryDataIds:n})).deletedCount:(Je(),(await this.dataClient.removeTagsFromBinaryDataByIDs({tags:e,binaryIds:n})).deletedCount)}async removeTagsFromBinaryDataByFilter(e,n){return(await this.dataClient.removeTagsFromBinaryDataByFilter({tags:e,filter:n})).deletedCount}async tagsByFilter(e){return(await this.dataClient.tagsByFilter({filter:e})).tags}async addBoundingBoxToImageById(e,n,t,o,i,r,c){return typeof e=="string"?(await this.dataClient.addBoundingBoxToImageByID({binaryDataId:e,label:n,xMinNormalized:t,yMinNormalized:o,xMaxNormalized:i,yMaxNormalized:r,confidence:c})).bboxId:(Je(),(await this.dataClient.addBoundingBoxToImageByID({binaryId:e,label:n,xMinNormalized:t,yMinNormalized:o,xMaxNormalized:i,yMaxNormalized:r,confidence:c})).bboxId)}async removeBoundingBoxFromImageById(e,n){if(typeof e=="string"){await this.dataClient.removeBoundingBoxFromImageByID({binaryDataId:e,bboxId:n});return}Je(),await this.dataClient.removeBoundingBoxFromImageByID({binaryId:e,bboxId:n})}async updateBoundingBox(e,n,t,o,i,r,c,l){if(typeof e=="string"){await this.dataClient.updateBoundingBox({binaryDataId:e,bboxId:n,label:t,xMinNormalized:o,yMinNormalized:i,xMaxNormalized:r,yMaxNormalized:c,confidence:l});return}Je(),await this.dataClient.updateBoundingBox({binaryId:e,bboxId:n,label:t,xMinNormalized:o,yMinNormalized:i,xMaxNormalized:r,yMaxNormalized:c,confidence:l})}async boundingBoxLabelsByFilter(e){return(await this.dataClient.boundingBoxLabelsByFilter({filter:e})).labels}async configureDatabaseUser(e,n){await this.dataClient.configureDatabaseUser({organizationId:e,password:n})}async getDatabaseConnection(e){return(await this.dataClient.getDatabaseConnection({organizationId:e})).hostname}async addBinaryDataToDatasetByIds(e,n){if(Array.isArray(e)&&typeof e[0]=="string"){await this.dataClient.addBinaryDataToDatasetByIDs({binaryDataIds:e,datasetId:n});return}Je(),await this.dataClient.addBinaryDataToDatasetByIDs({binaryIds:e,datasetId:n})}async removeBinaryDataFromDatasetByIds(e,n){if(Array.isArray(e)&&typeof e[0]=="string"){await this.dataClient.removeBinaryDataFromDatasetByIDs({binaryDataIds:e,datasetId:n});return}Je(),await this.dataClient.removeBinaryDataFromDatasetByIDs({binaryIds:e,datasetId:n})}async createDataset(e,n){return(await this.datasetClient.createDataset({name:e,organizationId:n})).id}async deleteDataset(e){await this.datasetClient.deleteDataset({id:e})}async renameDataset(e,n){await this.datasetClient.renameDataset({id:e,name:n})}async listDatasetsByOrganizationID(e){return(await this.datasetClient.listDatasetsByOrganizationID({organizationId:e})).datasets.map(t=>({created:t.timeCreated?.toDate(),...t}))}async listDatasetsByIds(e){return(await this.datasetClient.listDatasetsByIDs({ids:e})).datasets.map(t=>({created:t.timeCreated?.toDate(),...t}))}async tabularDataCaptureUpload(e,n,t,o,i,r,c){if(r.length!==e.length)throw new Error("dataRequestTimes and data lengths must be equal.");const l=new _n({partId:n,componentType:t,componentName:o,methodName:i,type:tt.TABULAR_SENSOR,tags:c}),d=[];for(const[I,R]of e.entries()){const O=new Ti,b=r[I];b&&(O.timeRequested=_.fromDate(b[0]),O.timeReceived=_.fromDate(b[1])),d.push(new ki({metadata:O,data:{case:"struct",value:p.fromJson(R)}}))}const u=new ui({metadata:l,sensorContents:d});return(await this.dataSyncClient.dataCaptureUpload(u)).fileId}async binaryDataCaptureUpload(e,n,t,o,i,r,c){const l=new _n({partId:n,componentType:t,componentName:o,methodName:i,type:tt.BINARY_SENSOR,tags:c?.tags,fileExtension:c?.fileExtension??"",datasetIds:c?.datasetIds,mimeType:c?.mimeType??""}),d=new ki({metadata:{timeRequested:_.fromDate(r[0]),timeReceived:_.fromDate(r[1])},data:{case:"binary",value:e}}),u=new ui({metadata:l,sensorContents:[d]});return(await this.dataSyncClient.dataCaptureUpload(u)).binaryDataId}async fileUpload(e,n,t){const o=new _n({partId:n,type:tt.FILE,...t});return(await this.dataSyncClient.fileUpload(Hn.fileUploadRequests(o,e))).binaryDataId}static async*fileUploadRequests(e,n){yield new gi({uploadPacket:{case:"metadata",value:e}});for(let t=0;t<n.length;t+=Hn.UPLOAD_CHUNK_SIZE){let o=t+Hn.UPLOAD_CHUNK_SIZE;o>n.length&&(o=n.length),yield new gi({uploadPacket:{case:"fileContents",value:new Ef({data:n.slice(t,o)})}})}}static createFilter(e){const n=new Ke(e);if(e.startTime??e.endTime){const o=new zn;e.startTime&&(o.start=_.fromDate(e.startTime)),e.endTime&&(o.end=_.fromDate(e.endTime)),n.interval=o}const t=new Ba;return e.tags&&(t.tags=e.tags,n.tagsFilter=t),n}async getLatestTabularData(e,n,t,o,i){let r;i&&(r=p.fromJson(i));const c=await this.dataClient.getLatestTabularData({partId:e,resourceName:n,resourceSubtype:t,methodName:o,additionalParameters:r});return!c.payload||!c.timeCaptured||!c.timeSynced?null:[c.timeCaptured.toDate(),c.timeSynced.toDate(),c.payload.toJson()]}async listDataPipelines(e){return(await this.dataPipelinesClient.listDataPipelines({organizationId:e})).dataPipelines}async getDataPipeline(e){return(await this.dataPipelinesClient.getDataPipeline({id:e})).dataPipeline??null}async createDataPipeline(e,n,t,o,i,r){const c=t[0]instanceof Uint8Array?t:t.map(u=>Wn.serialize(u)),l=r??sn.STANDARD;return(await this.dataPipelinesClient.createDataPipeline({organizationId:e,name:n,mqlBinary:c,schedule:o,enableBackfill:i,dataSourceType:l})).id}async deleteDataPipeline(e){await this.dataPipelinesClient.deleteDataPipeline({id:e})}async listDataPipelineRuns(e,n){const t=await this.dataPipelinesClient.listDataPipelineRuns({id:e,pageSize:n});return new st(this.dataPipelinesClient,e,t.runs,n,t.nextPageToken)}async createIndex(e,n,t,o){await this.dataClient.createIndex({organizationId:e,collectionType:n,indexSpec:[Wn.serialize(t)],pipelineName:o})}async listIndexes(e,n,t){return(await this.dataClient.listIndexes({organizationId:e,collectionType:n,pipelineName:t})).indexes}async deleteIndex(e,n,t,o){await this.dataClient.deleteIndex({organizationId:e,collectionType:n,indexName:t,pipelineName:o})}async createSequence(e,n,t,o,i){return(await this.dataClient.createSequence({organizationId:e,resources:n,sequenceTags:t,startTime:o?_.fromDate(o):void 0,endTime:i?_.fromDate(i):void 0})).id}async getSequence(e){const n=await this.dataClient.getSequence({id:e});if(!n.sequence)throw new Error("no sequence returned");return n.sequence}async updateSequence(e,n,t,o,i,r){await this.dataClient.updateSequence({id:e,resources:n,sequenceTags:t,startTime:o?_.fromDate(o):void 0,endTime:i?_.fromDate(i):void 0,fieldMask:r})}async deleteSequence(e){await this.dataClient.deleteSequence({id:e})}async listSequences(e,n,t){const o=await this.dataClient.listSequences({organizationId:e,pageToken:n,pageSize:t});return{sequences:o.sequences,nextPageToken:o.nextPageToken}}}class st{constructor(e,n,t=[],o,i){this.dataPipelinesClient=e,this.pipelineId=n,this.runs=t,this.pageSize=o,this.nextPageToken=i}async nextPage(){if(this.nextPageToken===void 0||this.nextPageToken==="")return new st(this.dataPipelinesClient,this.pipelineId,[],this.pageSize,"");const e=await this.dataPipelinesClient.listDataPipelineRuns({id:this.pipelineId,pageSize:this.pageSize,pageToken:this.nextPageToken});return new st(this.dataPipelinesClient,this.pipelineId,e.runs,this.pageSize,e.nextPageToken)}}const gO={typeName:"viam.app.mltraining.v1.MLTrainingService",methods:{submitTrainingJob:{name:"SubmitTrainingJob",I:Sg,O:Ig,kind:m.Unary},submitCustomTrainingJob:{name:"SubmitCustomTrainingJob",I:Og,O:bg,kind:m.Unary},getTrainingJob:{name:"GetTrainingJob",I:Mg,O:Eg,kind:m.Unary},listTrainingJobs:{name:"ListTrainingJobs",I:wg,O:Cg,kind:m.Unary},cancelTrainingJob:{name:"CancelTrainingJob",I:Ng,O:Pg,kind:m.Unary},deleteCompletedTrainingJob:{name:"DeleteCompletedTrainingJob",I:Dg,O:Ag,kind:m.Unary},getTrainingJobLogs:{name:"GetTrainingJobLogs",I:qg,O:Lg,kind:m.Unary},listSupportedContainers:{name:"ListSupportedContainers",I:Gg,O:Bg,kind:m.Unary}}};class TO{client;constructor(e){this.client=X(gO,e)}async submitTrainingJob(e,n,t,o,i,r){return(await this.client.submitTrainingJob({organizationId:e,datasetId:n,modelName:t,modelVersion:o,modelType:i,tags:r})).id}async submitCustomTrainingJob(e,n,t,o,i,r){return(await this.client.submitCustomTrainingJob({organizationId:e,datasetId:n,registryItemId:t,registryItemVersion:o,modelName:i,modelVersion:r})).id}async getTrainingJob(e){return(await this.client.getTrainingJob({id:e})).metadata}async listTrainingJobs(e,n){return(await this.client.listTrainingJobs({organizationId:e,status:n})).jobs}async cancelTrainingJob(e){return await this.client.cancelTrainingJob({id:e}),null}async deleteCompletedTrainingJob(e){return await this.client.deleteCompletedTrainingJob({id:e}),null}}const wf=s.makeMessageType("viam.provisioning.v1.ExitProvisioningRequest",[]),Cf=s.makeMessageType("viam.provisioning.v1.ExitProvisioningResponse",[]),Nf=s.makeMessageType("viam.provisioning.v1.GetSmartMachineStatusRequest",[]),Pf=s.makeMessageType("viam.provisioning.v1.GetSmartMachineStatusResponse",()=>[{no:1,name:"provisioning_info",kind:"message",T:Bf},{no:2,name:"has_smart_machine_credentials",kind:"scalar",T:8},{no:3,name:"is_online",kind:"scalar",T:8},{no:4,name:"latest_connection_attempt",kind:"message",T:yi},{no:5,name:"errors",kind:"scalar",T:9,repeated:!0},{no:6,name:"agent_version",kind:"scalar",T:9}]),Df=s.makeMessageType("viam.provisioning.v1.SetNetworkCredentialsRequest",()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"ssid",kind:"scalar",T:9},{no:3,name:"psk",kind:"scalar",T:9}]),Af=s.makeMessageType("viam.provisioning.v1.SetNetworkCredentialsResponse",[]),Uf=s.makeMessageType("viam.provisioning.v1.SetSmartMachineCredentialsRequest",()=>[{no:1,name:"cloud",kind:"message",T:vi}]),qf=s.makeMessageType("viam.provisioning.v1.SetSmartMachineCredentialsResponse",[]),Lf=s.makeMessageType("viam.provisioning.v1.GetNetworkListRequest",[]),Gf=s.makeMessageType("viam.provisioning.v1.GetNetworkListResponse",()=>[{no:1,name:"networks",kind:"message",T:yi,repeated:!0}]),Bf=s.makeMessageType("viam.provisioning.v1.ProvisioningInfo",()=>[{no:1,name:"fragment_id",kind:"scalar",T:9},{no:2,name:"model",kind:"scalar",T:9},{no:3,name:"manufacturer",kind:"scalar",T:9}]),yi=s.makeMessageType("viam.provisioning.v1.NetworkInfo",()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"ssid",kind:"scalar",T:9},{no:3,name:"security",kind:"scalar",T:9},{no:4,name:"signal",kind:"scalar",T:5},{no:5,name:"connected",kind:"scalar",T:8},{no:6,name:"last_error",kind:"scalar",T:9}]),vi=s.makeMessageType("viam.provisioning.v1.CloudConfig",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"secret",kind:"scalar",T:9},{no:3,name:"app_address",kind:"scalar",T:9},{no:4,name:"api_key",kind:"message",T:Ff}]),Ff=s.makeMessageType("viam.provisioning.v1.APIKey",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"key",kind:"scalar",T:9}]),kO=Object.freeze(Object.defineProperty({__proto__:null,APIKey:Ff,CloudConfig:vi,ExitProvisioningRequest:wf,ExitProvisioningResponse:Cf,GetNetworkListRequest:Lf,GetNetworkListResponse:Gf,GetSmartMachineStatusRequest:Nf,GetSmartMachineStatusResponse:Pf,NetworkInfo:yi,ProvisioningInfo:Bf,SetNetworkCredentialsRequest:Df,SetNetworkCredentialsResponse:Af,SetSmartMachineCredentialsRequest:Uf,SetSmartMachineCredentialsResponse:qf},Symbol.toStringTag,{value:"Module"})),yO={typeName:"viam.provisioning.v1.ProvisioningService",methods:{getSmartMachineStatus:{name:"GetSmartMachineStatus",I:Nf,O:Pf,kind:m.Unary},setNetworkCredentials:{name:"SetNetworkCredentials",I:Df,O:Af,kind:m.Unary},setSmartMachineCredentials:{name:"SetSmartMachineCredentials",I:Uf,O:qf,kind:m.Unary},getNetworkList:{name:"GetNetworkList",I:Lf,O:Gf,kind:m.Unary},exitProvisioning:{name:"ExitProvisioning",I:wf,O:Cf,kind:m.Unary}}};class vO{client;constructor(e){this.client=X(yO,e)}async getSmartMachineStatus(){return this.client.getSmartMachineStatus({})}async setNetworkCredentials(e,n,t){await this.client.setNetworkCredentials({type:e,ssid:n,psk:t})}async setSmartMachineCredentials(e){await this.client.setSmartMachineCredentials({cloud:e})}async getNetworkList(){return(await this.client.getNetworkList({})).networks}}const hO=async({serviceHost:a="https://app.viam.com",credentials:e})=>{const n=await nS(a,e);return new fO(n,e)};class fO{transport;credentials;dataClient;appClient;mlTrainingClient;provisioningClient;billingClient;constructor(e,n){this.transport=e,this.credentials=n,this.dataClient=new Hn(this.transport),this.appClient=new SI(this.transport),this.mlTrainingClient=new TO(this.transport),this.provisioningClient=new vO(this.transport),this.billingClient=new bI(this.transport)}async getRobotSecretFromHost(e){const t=e.split(".viam.")[0]?.split(".");if(t!==void 0){const o=t.at(-1);if(o===void 0)return;const i=e.split(".").at(0);if(i!==void 0)return(await this.appClient.getRobotPartByNameAndLocation(i,o)).part?.secret}}async connectToMachine({host:e=void 0,id:n=void 0}){if(e===void 0&&n===void 0)throw new Error("Either a machine address or ID must be provided");let t=e,o;if(n!==void 0&&e===void 0){const c=(await this.appClient.getRobotParts(n)).find(l=>l.mainPart);if(!c)throw new Error(`Could not find a main part for the machine with UUID: ${n}`);t=c.fqdn,o=c.secret}if(t===void 0||t==="")throw new Error("Host was not provided and could not be obtained from the machine ID");let i=this.credentials;return Fn(i)||(o===void 0&&(o=await this.getRobotSecretFromHost(t)),i=o===void 0?i:{type:"robot-secret",payload:o,authEntity:t}),_g({host:t,credentials:i,signalingAddress:"https://app.viam.com:443",reconnectMaxAttempts:1})}}const{JointPositions:RO}=Tm;class _O{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(km),this.name=n,this.options=t}async getEndPosition(e={},n=this.callOptions){const t=new xt({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const i=(await this.client.getEndPosition(t,n)).pose;if(!i)throw new Error("no pose");return i}async getGeometries(e={},n=this.callOptions){return sm(this.client.getGeometries,this.name,p.fromJson(e),n)}async getKinematics(e={},n=this.callOptions){return tm(this.client.getKinematics,this.name,p.fromJson(e),n)}async get3DModels(e={},n=this.callOptions){const t=new qt({name:this.name,extra:p.fromJson(e)});return(await this.client.get3DModels(t,n)).models}async moveToPosition(e,n={},t=this.callOptions){const o=new zt({name:this.name,to:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.moveToPosition(o,t)}async moveToJointPositions(e,n={},t=this.callOptions){const o=new kn({values:e}),i=new Vt({name:this.name,positions:o,extra:p.fromJson(n)});this.options.requestLogger?.(i),await this.client.moveToJointPositions(i,t)}async getJointPositions(e={},n=this.callOptions){const t=new Jt({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const i=(await this.client.getJointPositions(t,n)).positions;if(!i)throw new Error("no pose");return i}async stop(e={},n=this.callOptions){const t=new $t({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t),await this.client.stop(t,n)}async isMoving(e=this.callOptions){const n=new Yt({name:this.name});return this.options.requestLogger?.(n),(await this.client.isMoving(n,e)).isMoving}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const xf=s.makeMessageType("viam.component.audioin.v1.GetAudioRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"duration_seconds",kind:"scalar",T:2},{no:3,name:"codec",kind:"scalar",T:9},{no:4,name:"request_id",kind:"scalar",T:9},{no:5,name:"previous_timestamp_nanoseconds",kind:"scalar",T:3},{no:99,name:"extra",kind:"message",T:p}]),SO=s.makeMessageType("viam.component.audioin.v1.GetAudioResponse",()=>[{no:1,name:"audio",kind:"message",T:IO},{no:2,name:"request_id",kind:"scalar",T:9}]),IO=s.makeMessageType("viam.component.audioin.v1.AudioChunk",()=>[{no:1,name:"audio_data",kind:"scalar",T:12},{no:2,name:"audio_info",kind:"message",T:Lt},{no:3,name:"start_timestamp_nanoseconds",kind:"scalar",T:3},{no:4,name:"end_timestamp_nanoseconds",kind:"scalar",T:3},{no:5,name:"sequence",kind:"scalar",T:5}]),OO={typeName:"viam.component.audioin.v1.AudioInService",methods:{getAudio:{name:"GetAudio",I:xf,O:SO,kind:m.ServerStreaming},getProperties:{name:"GetProperties",I:Gn,O:Gt,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary}}};class bO{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(OO),this.name=n,this.options=t}async*getAudio(e,n,t=0n,o={},i=this.callOptions){const r=new xf({name:this.name,codec:e,durationSeconds:n,previousTimestampNanoseconds:t,extra:p.fromJson(o)});this.options.requestLogger?.(r);const c=this.client.getAudio(r,i);for await(const l of c)l.audio&&(yield{audioData:l.audio.audioData,audioInfo:l.audio.audioInfo,startTimeNs:l.audio.startTimestampNanoseconds,endTimeNs:l.audio.endTimestampNanoseconds,sequence:l.audio.sequence,requestID:l.requestId})}async getProperties(e={},n=this.callOptions){const t=new Gn({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const o=await this.client.getProperties(t,n);return{supportedCodecs:o.supportedCodecs,sampleRateHz:o.sampleRateHz,numChannels:o.numChannels}}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const MO={MP3:"mp3",PCM16:"pcm16",PCM32:"pcm32",PCM32_FLOAT:"pcm32_float",AAC:"aac",OPUS:"opus",FLAC:"flac",WAV:"wav"},Jf=s.makeMessageType("viam.component.audioout.v1.PlayRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"audio_data",kind:"scalar",T:12},{no:3,name:"audio_info",kind:"message",T:Lt},{no:99,name:"extra",kind:"message",T:p}]),EO={typeName:"viam.component.audioout.v1.AudioOutService",methods:{play:{name:"Play",I:Jf,O:s.makeMessageType("viam.component.audioout.v1.PlayResponse",[]),kind:m.Unary},getProperties:{name:"GetProperties",I:Gn,O:Gt,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary}}};class wO{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(EO),this.name=n,this.options=t}async play(e,n,t={},o=this.callOptions){const i=new Jf({name:this.name,audioData:e,audioInfo:n,extra:p.fromJson(t)});this.options.requestLogger?.(i),await this.client.play(i,o)}async getProperties(e={},n=this.callOptions){const t=new Gn({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const o=await this.client.getProperties(t,n);return{supportedCodecs:o.supportedCodecs,sampleRateHz:o.sampleRateHz,numChannels:o.numChannels}}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const{GetPropertiesResponse:CO}=Im;class NO{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(Om),this.name=n,this.options=t}async getGeometries(e={},n=this.callOptions){const t=new F({name:this.name,extra:p.fromJson(e)});return(await this.client.getGeometries(t,n)).geometries}async moveStraight(e,n,t={},o=this.callOptions){const i=new Wt({name:this.name,mmPerSec:n,distanceMm:e?BigInt(e):void 0,extra:p.fromJson(t)});this.options.requestLogger?.(i),await this.client.moveStraight(i,o)}async spin(e,n,t={},o=this.callOptions){const i=new Ht({name:this.name,angleDeg:e,degsPerSec:n,extra:p.fromJson(t)});this.options.requestLogger?.(i),await this.client.spin(i,o)}async setPower(e,n,t={},o=this.callOptions){const i=new Kt({name:this.name,linear:e,angular:n,extra:p.fromJson(t)});this.options.requestLogger?.(i),await this.client.setPower(i,o)}async setVelocity(e,n,t={},o=this.callOptions){const i=new Xt({name:this.name,linear:e,angular:n,extra:p.fromJson(t)});this.options.requestLogger?.(i),await this.client.setVelocity(i,o)}async stop(e={},n=this.callOptions){const t=new jt({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t),await this.client.stop(t,n)}async isMoving(e=this.callOptions){const n=new Qt({name:this.name});return this.options.requestLogger?.(n),(await this.client.isMoving(n,e)).isMoving}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}async getProperties(e={},n=this.callOptions){const t=new Aa({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),this.client.getProperties(t,n)}}const{ReadAnalogReaderResponse:PO,PowerMode:DO}=Gm;class AO{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(Bm),this.name=n,this.options=t}async setGPIO(e,n,t={},o=this.callOptions){const i=new Zt({name:this.name,pin:e,high:n,extra:p.fromJson(t)});this.options.requestLogger?.(i),await this.client.setGPIO(i,o)}async getGPIO(e,n={},t=this.callOptions){const o=new es({name:this.name,pin:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),(await this.client.getGPIO(o,t)).high}async getPWM(e,n={},t=this.callOptions){const o=new ns({name:this.name,pin:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),(await this.client.pWM(o,t)).dutyCyclePct}async setPWM(e,n,t={},o=this.callOptions){const i=new as({name:this.name,pin:e,dutyCyclePct:n,extra:p.fromJson(t)});this.options.requestLogger?.(i),await this.client.setPWM(i,o)}async getPWMFrequency(e,n={},t=this.callOptions){const o=new ts({name:this.name,pin:e,extra:p.fromJson(n)});this.options.requestLogger?.(o);const i=await this.client.pWMFrequency(o,t);return Number(i.frequencyHz)}async setPWMFrequency(e,n,t={},o=this.callOptions){const i=new ss({name:this.name,pin:e,frequencyHz:n?BigInt(n):void 0,extra:p.fromJson(t)});this.options.requestLogger?.(i),await this.client.setPWMFrequency(i,o)}async readAnalogReader(e,n={},t=this.callOptions){const o=new os({boardName:this.name,analogReaderName:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),this.client.readAnalogReader(o,t)}async writeAnalog(e,n,t={},o=this.callOptions){const i=new is({name:this.name,pin:e,value:n,extra:p.fromJson(t)});this.options.requestLogger?.(i),await this.client.writeAnalog(i,o)}async getDigitalInterruptValue(e,n={},t=this.callOptions){const o=new rs({boardName:this.name,digitalInterruptName:e,extra:p.fromJson(n)});this.options.requestLogger?.(o);const i=await this.client.getDigitalInterruptValue(o,t);return Number(i.value)}async streamTicks(e,n,t={},o=this.callOptions){const i=new ms({name:this.name,pinNames:e,extra:p.fromJson(t)});this.options.requestLogger?.(i);const r=this.client.streamTicks(i,o);for await(const c of r)n.push({pinName:c.pinName,high:c.high,time:c.time?Number(c.time):0})}async setPowerMode(e,n,t={},o=this.callOptions){const i=new cs({name:this.name,powerMode:e,duration:n,extra:p.fromJson(t)});this.options.requestLogger?.(i),await this.client.setPowerMode(i,o)}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const hi=s.makeMessageType("viam.component.button.v1.PushRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),zf=s.makeMessageType("viam.component.button.v1.PushResponse",[]),UO=Object.freeze(Object.defineProperty({__proto__:null,PushRequest:hi,PushResponse:zf},Symbol.toStringTag,{value:"Module"})),qO={typeName:"viam.component.button.v1.ButtonService",methods:{push:{name:"Push",I:hi,O:zf,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary}}};class LO{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(qO),this.name=n,this.options=t}async push(e={},n=this.callOptions){const t=new hi({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t),await this.client.push(t,n)}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const GO={typeName:"viam.component.camera.v1.CameraService",methods:{getImages:{name:"GetImages",I:Vo,O:$u,kind:m.Unary},getPointCloud:{name:"GetPointCloud",I:Yo,O:Yu,kind:m.Unary},getProperties:{name:"GetProperties",I:Wu,O:Hu,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary}}},BO="pointcloud/pcd";class FO{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(GO),this.name=n,this.options=t}async getGeometries(e={},n=this.callOptions){const t=new F({name:this.name,extra:p.fromJson(e)});return(await this.client.getGeometries(t,n)).geometries}async getImages(e=[],n={},t=this.callOptions){const o=new Vo({name:this.name,filterSourceNames:e,extra:p.fromJson(n)});this.options.requestLogger?.(o);const i=await this.client.getImages(o,t),r=i.images.map(l=>({sourceName:l.sourceName,image:l.image,mimeType:l.mimeType})),c={capturedAt:i.responseMetadata?.capturedAt??new _};return{images:r,metadata:c}}async getPointCloud(e={},n=this.callOptions){const t=new Yo({name:this.name,mimeType:BO,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.getPointCloud(t,n)).pointCloud}async getProperties(e=this.callOptions){const n=new Aa({name:this.name});return this.options.requestLogger?.(n),this.client.getProperties(n,e)}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}class xO{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(Od),this.name=n,this.options=t}async discoverResources(e={},n=this.callOptions){const t=new To({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.discoverResources(t,n)).discoveries}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const{GetPropertiesResponse:JO,PositionType:Vf}=zm;class zO{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(Vm),this.name=n,this.options=t}async resetPosition(e={},n=this.callOptions){const t=new ps({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t),await this.client.resetPosition(t,n)}async getProperties(e={},n=this.callOptions){const t=new us({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),this.client.getProperties(t,n)}async getPosition(e=Vf.UNSPECIFIED,n={},t=this.callOptions){const o=new ds({name:this.name,positionType:e,extra:p.fromJson(n)});this.options.requestLogger?.(o);const i=await this.client.getPosition(o,t);return[i.value,i.positionType]}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}class VO{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(Xm),this.name=n,this.options=t}async getGeometries(e={},n=this.callOptions){return sm(this.client.getGeometries,this.name,p.fromJson(e),n)}async getKinematics(e={},n=this.callOptions){return tm(this.client.getKinematics,this.name,p.fromJson(e),n)}async getPosition(e={},n=this.callOptions){const t=new gs({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.getPosition(t,n)).positionsMm}async moveToPosition(e,n,t={},o=this.callOptions){const i=new Ts({name:this.name,positionsMm:e,speedsMmPerSec:n,extra:p.fromJson(t)});this.options.requestLogger?.(i),await this.client.moveToPosition(i,o)}async home(e={},n=this.callOptions){const t=new ks({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.home(t,n)).homed}async getLengths(e={},n=this.callOptions){const t=new ys({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.getLengths(t,n)).lengthsMm}async stop(e={},n=this.callOptions){const t=new vs({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t),await this.client.stop(t,n)}async isMoving(e=this.callOptions){const n=new hs({name:this.name});return this.options.requestLogger?.(n),(await this.client.isMoving(n,e)).isMoving}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const{Capsule:$O,GeoGeometry:YO,GeoPoint:WO,GeometriesInFrame:HO,Geometry:jO,Orientation:KO,PointCloud:XO,Pose:QO,PoseInFrame:ZO,RectangularPrism:eb,ResourceName:nb,Sphere:ab,Transform:tb,Vector3:sb,WorldState:ob}=Bt,$f=a=>{const{latitude:e,longitude:n}=a;return!(typeof e!="number"||typeof n!="number"||Number.isNaN(e)||Number.isNaN(n))};class ib{client;options;name;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(ug),this.name=n,this.options=t}async metadata(e={},n=this.callOptions){const t=new lg({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),this.client.metadata(t,n)}async infer(e,n={},t=this.callOptions){const o=new cg({name:this.name,inputTensors:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),this.client.infer(o,t)}}class rb{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(Oc),this.name=n,this.options=t}async setPower(e,n={},t=this.callOptions){const o=new Cs({name:this.name,powerPct:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.setPower(o,t)}async goFor(e,n,t={},o=this.callOptions){const i=new Ns({name:this.name,rpm:e,revolutions:n,extra:p.fromJson(t)});this.options.requestLogger?.(i),await this.client.goFor(i,o)}async goTo(e,n,t={},o=this.callOptions){const i=new Ps({name:this.name,rpm:e,positionRevolutions:n,extra:p.fromJson(t)});this.options.requestLogger?.(i),await this.client.goTo(i,o)}async setRPM(e,n={},t=this.callOptions){const o=new Ds({name:this.name,rpm:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.setRPM(o,t)}async resetZeroPosition(e,n={},t=this.callOptions){const o=new As({name:this.name,offset:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.resetZeroPosition(o,t)}async stop(e={},n=this.callOptions){const t=new qs({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t),await this.client.stop(t,n)}async getProperties(e={},n=this.callOptions){const t=new Gs({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),{positionReporting:(await this.client.getProperties(t,n)).positionReporting}}async getPosition(e={},n=this.callOptions){const t=new Us({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.getPosition(t,n)).position}async isPowered(e={},n=this.callOptions){const t=new Ls({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const o=await this.client.isPowered(t,n);return[o.isOn,o.powerPct]}async isMoving(e=this.callOptions){const n=new Bs({name:this.name});return this.options.requestLogger?.(n),(await this.client.isMoving(n,e)).isMoving}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}class mb{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(Uc),this.name=n,this.options=t}async getLinearVelocity(e={},n=this.callOptions){const t=new Fs({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const i=(await this.client.getLinearVelocity(t,n)).linearVelocity;if(!i)throw new Error("no linear velocity");return i}async getAngularVelocity(e={},n=this.callOptions){const t=new xs({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const i=(await this.client.getAngularVelocity(t,n)).angularVelocity;if(!i)throw new Error("no angular velocity");return i}async getCompassHeading(e={},n=this.callOptions){const t=new Js({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.getCompassHeading(t,n)).value}async getOrientation(e={},n=this.callOptions){const t=new zs({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const i=(await this.client.getOrientation(t,n)).orientation;if(!i)throw new Error("no orientation");return i}async getPosition(e={},n=this.callOptions){const t=new Vs({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),this.client.getPosition(t,n)}async getProperties(e={},n=this.callOptions){const t=new $s({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),this.client.getProperties(t,n)}async getAccuracy(e={},n=this.callOptions){const t=new Ys({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),this.client.getAccuracy(t,n)}async getLinearAcceleration(e={},n=this.callOptions){const t=new Ws({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const i=(await this.client.getLinearAcceleration(t,n)).linearAcceleration;if(!i)throw new Error("no linear acceleration");return i}async getReadings(e={},n=this.callOptions){const t=new tn({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const o=await this.client.getReadings(t,n),i={};for(const r of Object.keys(o.readings)){const c=o.readings[r];c&&(i[r]=c.toJson())}return i}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const{GetAccuracyResponse:cb,GetPositionResponse:lb,GetPropertiesResponse:db}=Ac;class pb{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(Bc),this.name=n,this.options=t}async getVoltage(e={},n=this.callOptions){const t=new Hs({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const o=await this.client.getVoltage(t,n);return[o.volts,o.isAc]}async getCurrent(e={},n=this.callOptions){const t=new js({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const o=await this.client.getCurrent(t,n);return[o.amperes,o.isAc]}async getPower(e={},n=this.callOptions){const t=new Ks({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.getPower(t,n)).watts}async getReadings(e={},n=this.callOptions){const t=new tn({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const o=await this.client.getReadings(t,n),i={};for(const r of Object.keys(o.readings)){const c=o.readings[r];c&&(i[r]=c.toJson())}return i}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const Yf={typeName:"viam.component.sensor.v1.SensorService",methods:{getReadings:{name:"GetReadings",I:tn,O:Da,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary}}},ub=Object.freeze(Object.defineProperty({__proto__:null,SensorService:Yf},Symbol.toStringTag,{value:"Module"}));class gb{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(Yf),this.name=n,this.options=t}async getReadings(e={},n=this.callOptions){const t=new tn({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const o=await this.client.getReadings(t,n),i={};for(const r of Object.keys(o.readings)){const c=o.readings[r];c&&(i[r]=c.toJson())}return i}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const Wf=s.makeMessageType("proto.stream.v1.ListStreamsRequest",[]),Hf=s.makeMessageType("proto.stream.v1.ListStreamsResponse",()=>[{no:1,name:"names",kind:"scalar",T:9,repeated:!0}]),fi=s.makeMessageType("proto.stream.v1.AddStreamRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),jf=s.makeMessageType("proto.stream.v1.AddStreamResponse",[]),Ri=s.makeMessageType("proto.stream.v1.RemoveStreamRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),Kf=s.makeMessageType("proto.stream.v1.RemoveStreamResponse",[]),_i=s.makeMessageType("proto.stream.v1.Resolution",()=>[{no:1,name:"width",kind:"scalar",T:5},{no:2,name:"height",kind:"scalar",T:5}]),Si=s.makeMessageType("proto.stream.v1.GetStreamOptionsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9}]),Xf=s.makeMessageType("proto.stream.v1.GetStreamOptionsResponse",()=>[{no:1,name:"resolutions",kind:"message",T:_i,repeated:!0}]),ot=s.makeMessageType("proto.stream.v1.SetStreamOptionsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"resolution",kind:"message",T:_i}]),Qf=s.makeMessageType("proto.stream.v1.SetStreamOptionsResponse",[]),Tb=Object.freeze(Object.defineProperty({__proto__:null,AddStreamRequest:fi,AddStreamResponse:jf,GetStreamOptionsRequest:Si,GetStreamOptionsResponse:Xf,ListStreamsRequest:Wf,ListStreamsResponse:Hf,RemoveStreamRequest:Ri,RemoveStreamResponse:Kf,Resolution:_i,SetStreamOptionsRequest:ot,SetStreamOptionsResponse:Qf},Symbol.toStringTag,{value:"Module"})),kb={typeName:"proto.stream.v1.StreamService",methods:{listStreams:{name:"ListStreams",I:Wf,O:Hf,kind:m.Unary},addStream:{name:"AddStream",I:fi,O:jf,kind:m.Unary},getStreamOptions:{name:"GetStreamOptions",I:Si,O:Xf,kind:m.Unary},setStreamOptions:{name:"SetStreamOptions",I:ot,O:Qf,kind:m.Unary},removeStream:{name:"RemoveStream",I:Ri,O:Kf,kind:m.Unary}}},jn=a=>a.replaceAll(":","+");class yb extends om{client;options;streams;constructor(e,n={}){super(),this.client=e.createServiceClient(kb),this.options=n,this.streams=new Set,e.on("track",t=>{this.emit("track",t)}),e.on(K.CONNECTED,()=>{for(const t of this.streams.values())this.add(t)})}async add(e){const n=new fi({name:jn(e)});this.options.requestLogger?.(n);try{await this.client.addStream(n),this.streams.add(e)}catch{n.name=e,this.options.requestLogger?.(n),await this.client.addStream(n),this.streams.add(e)}}async remove(e){const n=new Ri({name:jn(e)});this.options.requestLogger?.(n);try{await this.client.removeStream(n),this.streams.delete(e)}catch{n.name=e,this.options.requestLogger?.(n),await this.client.removeStream(n),this.streams.delete(e)}}async getOptions(e){const n=async i=>{const r=new Si({name:i});this.options.requestLogger?.(r);try{return(await this.client.getStreamOptions(r)).resolutions}catch{return[]}},t=jn(e);let o=await n(t);return o.length>0||(o=await n(e)),o}async setOptions(e,n,t){const o=new ot({name:jn(e),resolution:{width:n,height:t}});this.options.requestLogger?.(o);try{await this.client.setStreamOptions(o)}catch{o.name=e,this.options.requestLogger?.(o),await this.client.setStreamOptions(o)}}async resetOptions(e){const n=new ot({name:jn(e)});this.options.requestLogger?.(n);try{await this.client.setStreamOptions(n)}catch{n.name=e,this.options.requestLogger?.(n),await this.client.setStreamOptions(n)}}STREAM_TIMEOUT=5e3;getStream=async e=>{const n=new Promise((t,o)=>{const i=r=>{const[c]=r.streams;c?c.id===e&&(this.off("track",i),t(c)):(this.off("track",i),o(new Error("Received track event with no streams")))};this.on("track",i),setTimeout(()=>{this.off("track",i),o(new Error(`Did not receive a stream after ${this.STREAM_TIMEOUT} ms`))},this.STREAM_TIMEOUT)});return await this.add(e),n}}const Ii=s.makeMessageType("viam.component.switch.v1.SetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"position",kind:"scalar",T:13},{no:99,name:"extra",kind:"message",T:p}]),Zf=s.makeMessageType("viam.component.switch.v1.SetPositionResponse",[]),Oi=s.makeMessageType("viam.component.switch.v1.GetPositionRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),eR=s.makeMessageType("viam.component.switch.v1.GetPositionResponse",()=>[{no:1,name:"position",kind:"scalar",T:13}]),bi=s.makeMessageType("viam.component.switch.v1.GetNumberOfPositionsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),nR=s.makeMessageType("viam.component.switch.v1.GetNumberOfPositionsResponse",()=>[{no:1,name:"number_of_positions",kind:"scalar",T:13},{no:2,name:"labels",kind:"scalar",T:9,repeated:!0}]),vb=Object.freeze(Object.defineProperty({__proto__:null,GetNumberOfPositionsRequest:bi,GetNumberOfPositionsResponse:nR,GetPositionRequest:Oi,GetPositionResponse:eR,SetPositionRequest:Ii,SetPositionResponse:Zf},Symbol.toStringTag,{value:"Module"})),hb={typeName:"viam.component.switch.v1.SwitchService",methods:{setPosition:{name:"SetPosition",I:Ii,O:Zf,kind:m.Unary},getPosition:{name:"GetPosition",I:Oi,O:eR,kind:m.Unary},getNumberOfPositions:{name:"GetNumberOfPositions",I:bi,O:nR,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary}}};class fb{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(hb),this.name=n,this.options=t}async setPosition(e,n={},t=this.callOptions){const o=new Ii({name:this.name,position:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.setPosition(o,t)}async getPosition(e={},n=this.callOptions){const t=new Oi({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.getPosition(t,n)).position}async getNumberOfPositions(e={},n=this.callOptions){const t=new bi({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const o=await this.client.getNumberOfPositions(t,n);if(o.labels.length>0&&o.labels.length!==o.numberOfPositions)throw new Error("the number of labels does not match the number of positions");return[o.numberOfPositions,o.labels]}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}let Rb=class{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(fs),this.name=n,this.options=t}async getGeometries(e={},n=this.callOptions){const t=new F({name:this.name,extra:p.fromJson(e)});return(await this.client.getGeometries(t,n)).geometries}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}};const _b={typeName:"viam.component.posetracker.v1.PoseTrackerService",methods:{getPoses:{name:"GetPoses",I:s.makeMessageType("viam.component.posetracker.v1.GetPosesRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"body_names",kind:"scalar",T:9,repeated:!0},{no:99,name:"extra",kind:"message",T:p}]),O:s.makeMessageType("viam.component.posetracker.v1.GetPosesResponse",()=>[{no:1,name:"body_poses",kind:"map",K:9,V:{kind:"message",T:He}}]),kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},getGeometries:{name:"GetGeometries",I:F,O:j,kind:m.Unary}}};class Sb{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(_b),this.name=n,this.options=t}async getGeometries(e={},n=this.callOptions){const t=new F({name:this.name,extra:p.fromJson(e)});return(await this.client.getGeometries(t,n)).geometries}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}class Ib{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(oc),this.name=n,this.options=t}async getGeometries(e={},n=this.callOptions){const t=new F({name:this.name,extra:p.fromJson(e)});return(await this.client.getGeometries(t,n)).geometries}async open(e={},n=this.callOptions){const t=new Rs({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t),await this.client.open(t,n)}async grab(e={},n=this.callOptions){const t=new _s({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t),await this.client.grab(t,n)}async stop(e={},n=this.callOptions){const t=new Ss({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t),await this.client.stop(t,n)}async isMoving(e=this.callOptions){const n=new Is({name:this.name});return this.options.requestLogger?.(n),(await this.client.isMoving(n,e)).isMoving}async isHoldingSomething(e={},n=this.callOptions){const t=new Os({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.isHoldingSomething(t,n)).isHoldingSomething}async getCurrentInputs(e={},n=this.callOptions){const t=new bs({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.getCurrentInputs(t,n)).values}async goToInputs(e,n={},t=this.callOptions){const o=new Ms({name:this.name,values:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.goToInputs(o,t)}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}class Ob{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(gc),this.name=n,this.options=t}async getEvents(e={},n=this.callOptions){const t=new Es({controller:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.getEvents(t,n)).events}async triggerEvent(e,n={},t=this.callOptions){const o=new ws({controller:this.name,event:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.triggerEvent(o,t)}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const{Event:bb}=uc,{CollisionSpecification:Mb,Constraints:Eb,LinearConstraint:wb,ListPlanStatusesResponse:Cb,MotionConfiguration:Nb,ObstacleDetector:Pb,OrientationConstraint:Db}=$d;class Ab{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(Yd),this.name=n,this.options=t}async move(e,n,t,o,i={},r=this.callOptions){const c=new ko({name:this.name,destination:e,componentName:n,worldState:t,constraints:o,extra:p.fromJson(i)});return this.options.requestLogger?.(c),(await this.client.move(c,r)).success}async moveOnMap(e,n,t,o,i,r={},c=this.callOptions){const l=new yo({name:this.name,destination:e,componentName:n,slamServiceName:t,motionConfiguration:o,obstacles:i,extra:p.fromJson(r)});return this.options.requestLogger?.(l),(await this.client.moveOnMap(l,c)).executionId}async moveOnGlobe(e,n,t,o,i,r,c,l={},d=this.callOptions){const u=new ho({name:this.name,destination:e,componentName:n,movementSensorName:t,heading:o,obstacles:i,boundingRegions:c,motionConfiguration:r,extra:p.fromJson(l)});return this.options.requestLogger?.(u),(await this.client.moveOnGlobe(u,d)).executionId}async stopPlan(e,n={},t=this.callOptions){const o=new Ro({name:this.name,componentName:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),await this.client.stopPlan(o,t),null}async getPlan(e,n,t,o={},i=this.callOptions){const r=new So({name:this.name,componentName:e,lastPlanOnly:n,executionId:t,extra:p.fromJson(o)});return this.options.requestLogger?.(r),this.client.getPlan(r,i)}async listPlanStatuses(e,n={},t=this.callOptions){const o=new _o({name:this.name,onlyActivePlans:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),this.client.listPlanStatuses(o,t)}async getPose(e,n,t,o={},i=this.callOptions){const r=new fo({name:this.name,componentName:e,destinationFrame:n,supplementalTransforms:t,extra:p.fromJson(o)});this.options.requestLogger?.(r);const l=(await this.client.getPose(r,i)).pose;if(!l)throw new Error("no pose");return l}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const Mi=s.makeMessageType("viam.service.datamanager.v1.SyncRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),aR=s.makeMessageType("viam.service.datamanager.v1.SyncResponse",[]),Ei=s.makeMessageType("viam.service.datamanager.v1.UploadBinaryDataToDatasetsRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"binary_data",kind:"scalar",T:12},{no:3,name:"tags",kind:"scalar",T:9,repeated:!0},{no:4,name:"dataset_ids",kind:"scalar",T:9,repeated:!0},{no:5,name:"mime_type",kind:"enum",T:s.getEnumType(Mf)},{no:99,name:"extra",kind:"message",T:p}]),tR=s.makeMessageType("viam.service.datamanager.v1.UploadBinaryDataToDatasetsResponse",[]),Ub=Object.freeze(Object.defineProperty({__proto__:null,SyncRequest:Mi,SyncResponse:aR,UploadBinaryDataToDatasetsRequest:Ei,UploadBinaryDataToDatasetsResponse:tR},Symbol.toStringTag,{value:"Module"})),qb={typeName:"viam.service.datamanager.v1.DataManagerService",methods:{sync:{name:"Sync",I:Mi,O:aR,kind:m.Unary},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary},uploadBinaryDataToDatasets:{name:"UploadBinaryDataToDatasets",I:Ei,O:tR,kind:m.Unary}}};class Lb{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(qb),this.name=n,this.options=t}async sync(e={},n=this.callOptions){const t=new Mi({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t),await this.client.sync(t,n)}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}async uploadBinaryDataToDatasets(e,n,t,o,i={},r=this.callOptions){const c=new Ei({name:this.name,binaryData:e,tags:n,datasetIds:t,mimeType:o,extra:p.fromJson(i)});this.options.requestLogger?.(c),await this.client.uploadBinaryDataToDatasets(c,r)}}class Gb{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(ip),this.name=n,this.options=t}async getMode(e={},n=this.callOptions){const t=new bo({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.getMode(t,n)).mode}async setMode(e,n={},t=this.callOptions){const o=new Mo({name:this.name,mode:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.setMode(o,t)}async getLocation(e={},n=this.callOptions){const t=new Eo({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const o=await this.client.getLocation(t,n);if(!o.location)throw new Error("no location");if(!$f(o.location))throw new Error("invalid location");return o}async getWayPoints(e={},n=this.callOptions){const t=new wo({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.getWaypoints(t,n)).waypoints}async addWayPoint(e,n={},t=this.callOptions){const o=new Co({name:this.name,location:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.addWaypoint(o,t)}async removeWayPoint(e,n={},t=this.callOptions){const o=new No({name:this.name,id:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.removeWaypoint(o,t)}async getObstacles(e={},n=this.callOptions){const t=new Po({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.getObstacles(t,n)).obstacles}async getPaths(e={},n=this.callOptions){const t=new Do({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.getPaths(t,n)).paths}async getProperties(e=this.callOptions){const n=new Ao({name:this.name});return this.options.requestLogger?.(n),this.client.getProperties(n,e)}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const{GetLocationResponse:Bb,GetPropertiesResponse:Fb,Path:xb,Waypoint:Jb}=op;class zb{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(Vc),this.name=n,this.options=t}async move(e,n={},t=this.callOptions){const o=new Xs({name:this.name,angleDeg:e,extra:p.fromJson(n)});this.options.requestLogger?.(o),await this.client.move(o,t)}async getPosition(e={},n=this.callOptions){const t=new Qs({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.getPosition(t,n)).positionDeg}async stop(e={},n=this.callOptions){const t=new Zs({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t),await this.client.stop(t,n)}async isMoving(e=this.callOptions){const n=new eo({name:this.name});return this.options.requestLogger?.(n),(await this.client.isMoving(n,e)).isMoving}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}class Vb{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(Tp),this.name=n,this.options=t}async getPosition(e=this.callOptions){const n=new Uo({name:this.name});return this.options.requestLogger?.(n),this.client.getPosition(n,e)}async getPointCloudMap(e,n=this.callOptions){const t=new qo({name:this.name,returnEditedMap:e});this.options.requestLogger?.(t);const o=[],i=this.client.getPointCloudMap(t,n);for await(const r of i)o.push(r.pointCloudPcdChunk);return sR(o)}async getInternalState(e=this.callOptions){const n=new Lo({name:this.name});this.options.requestLogger?.(n);const t=[],o=this.client.getInternalState(n,e);for await(const i of o)t.push(i.internalStateChunk);return sR(t)}async getProperties(e=this.callOptions){const n=new Go({name:this.name});return this.options.requestLogger?.(n),this.client.getProperties(n,e)}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const sR=a=>{const e=a.reduce((o,i)=>o+i.length,0),n=new Uint8Array(e);let t=0;for(const o of a)n.set(o,t),t+=o.length;return n},{GetPositionResponse:$b,GetPropertiesResponse:Yb}=gp;class Wb{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(mg),this.name=n,this.options=t}async getDetectionsFromCamera(e,n={},t=this.callOptions){const o=new Ho({name:this.name,cameraName:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),(await this.client.getDetectionsFromCamera(o,t)).detections}async getDetections(e,n,t,o,i={},r=this.callOptions){const c=new Wo({name:this.name,image:e,width:n?BigInt(n):void 0,height:t?BigInt(t):void 0,mimeType:o,extra:p.fromJson(i)});return this.options.requestLogger?.(c),(await this.client.getDetections(c,r)).detections}async getClassificationsFromCamera(e,n,t={},o=this.callOptions){const i=new Ko({name:this.name,cameraName:e,n,extra:p.fromJson(t)});return this.options.requestLogger?.(i),(await this.client.getClassificationsFromCamera(i,o)).classifications}async getClassifications(e,n,t,o,i,r={},c=this.callOptions){const l=new jo({name:this.name,image:e,width:n,height:t,mimeType:o,n:i,extra:p.fromJson(r)});return this.options.requestLogger?.(l),(await this.client.getClassifications(l,c)).classifications}async getObjectPointClouds(e,n={},t=this.callOptions){const o=new Xo({name:this.name,cameraName:e,extra:p.fromJson(n)});return this.options.requestLogger?.(o),(await this.client.getObjectPointClouds(o,t)).objects}async getProperties(e={},n=this.callOptions){const t=new Qo({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const o=await this.client.getProperties(t,n);return{classificationsSupported:o.classificationsSupported,detectionsSupported:o.detectionsSupported,objectPointCloudsSupported:o.objectPointCloudsSupported}}async captureAllFromCamera(e,{returnImage:n,returnClassifications:t,returnDetections:o,returnObjectPointClouds:i},r={},c=this.callOptions){const l=new Zo({name:this.name,cameraName:e,returnImage:n,returnClassifications:t,returnDetections:o,returnObjectPointClouds:i,extra:p.fromJson(r)});this.options.requestLogger?.(l);const d=await this.client.captureAllFromCamera(l,c);return{image:d.image,classifications:d.classifications,detections:d.detections,objectPointClouds:d.objects,extra:d.extra}}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const{Classification:Hb,Detection:jb}=rg,{PointCloudObject:Kb}=Bt,oR=a=>Dn.UuidTool.toString([...a]),Xb=a=>new Uint8Array(Dn.UuidTool.toBytes(a)),wi=a=>({...a,uuidString:oR(a.uuid)});class Qb{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(vg),this.name=n,this.options=t}async listUUIDs(e={},n=this.callOptions){const t=new Tg({name:this.name,extra:p.fromJson(e)});return this.options.requestLogger?.(t),(await this.client.listUUIDs(t,n)).uuids.map(i=>oR(i))}async getTransform(e,n={},t=this.callOptions){const o=new kg({name:this.name,uuid:Xb(e),extra:p.fromJson(n)});this.options.requestLogger?.(o);const i=await this.client.getTransform(o,t);if(!i.transform)throw new Error("No transform returned from server");return wi(i.transform)}async*streamTransformChanges(e={},n=this.callOptions){const t=new yg({name:this.name,extra:p.fromJson(e)});this.options.requestLogger?.(t);const o=this.client.streamTransformChanges(t,n);for await(const i of o)i.transform&&(yield{...i,transform:wi(i.transform)})}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const iR=s.makeMessageType("viam.service.video.v1.GetVideoRequest",()=>[{no:1,name:"name",kind:"scalar",T:9},{no:2,name:"start_timestamp",kind:"message",T:_},{no:3,name:"end_timestamp",kind:"message",T:_},{no:4,name:"video_codec",kind:"scalar",T:9},{no:5,name:"video_container",kind:"scalar",T:9},{no:6,name:"request_id",kind:"scalar",T:9},{no:99,name:"extra",kind:"message",T:p}]),Zb={typeName:"viam.service.video.v1.VideoService",methods:{getVideo:{name:"GetVideo",I:iR,O:s.makeMessageType("viam.service.video.v1.GetVideoResponse",()=>[{no:1,name:"video_data",kind:"scalar",T:12},{no:2,name:"video_container",kind:"scalar",T:9},{no:3,name:"request_id",kind:"scalar",T:9}]),kind:m.ServerStreaming},doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary}}},rR=a=>_.fromDate(a),eM=()=>crypto.randomUUID();class nM{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(Zb),this.name=n,this.options=t}async*getVideo(e,n,t="",o="",i={},r=this.callOptions){const c=new iR({name:this.name,startTimestamp:e?rR(e):void 0,endTimestamp:n?rR(n):void 0,videoCodec:t,videoContainer:o,requestId:eM(),extra:p.fromJson(i)});this.options.requestLogger?.(c);const l=this.client.getVideo(c,r);for await(const d of l)yield d}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const mR={typeName:"viam.service.generic.v1.GenericService",methods:{doCommand:{name:"DoCommand",I:D,O:U,kind:m.Unary},getStatus:{name:"GetStatus",I:P,O:A,kind:m.Unary}}},aM=Object.freeze(Object.defineProperty({__proto__:null,GenericService:mR},Symbol.toStringTag,{value:"Module"}));class tM{client;name;options;callOptions={headers:{}};constructor(e,n,t={}){this.client=e.createServiceClient(mR),this.name=n,this.options=t}async getStatus(e=this.callOptions){return L(this.client.getStatus,this.name,this.options,e)}async doCommand(e,n=this.callOptions){return q(this.client.doCommand,this.name,e,this.options,n)}}const sM="0.72.0";g.AnalogValue=PO,g.ArmClient=_O,g.ArmJointPositions=RO,g.AudioCodec=MO,g.AudioInClient=bO,g.AudioOutClient=wO,g.BaseClient=NO,g.BaseProperties=CO,g.BoardClient=AO,g.ButtonClient=LO,g.CameraClient=FO,g.Capsule=$O,g.Classification=Hb,g.Client=Xe,g.CloudConfig=vi,g.CollisionSpecification=Mb,g.ConnectError=C,g.ConnectionClosedError=ge,g.Constraints=Eb,g.DataManagerClient=Lb,g.Detection=jb,g.DiscoveryClient=xO,g.Duration=J,g.EncoderClient=zO,g.EncoderPositionType=Vf,g.EncoderProperties=JO,g.GantryClient=VO,g.GenericComponentClient=Rb,g.GenericServiceClient=tM,g.GeoGeometry=YO,g.GeoPoint=WO,g.GeometriesInFrame=HO,g.Geometry=jO,g.GripperClient=Ib,g.InputControllerClient=Ob,g.InputControllerEvent=bb,g.LinearConstraint=wb,g.ListPlanStatusesResponse=Cb,g.MLModelClient=ib,g.MachineConnectionEvent=K,g.ModelType=Qe,g.MotionClient=Ab,g.MotionConfiguration=Nb,g.MotorClient=rb,g.MovementSensorAccuracy=cb,g.MovementSensorClient=mb,g.MovementSensorPosition=lb,g.MovementSensorProperties=db,g.NavigationClient=Gb,g.NavigationPosition=Bb,g.NavigationProperties=Fb,g.ObstacleDetector=Pb,g.Orientation=KO,g.OrientationConstraint=Db,g.Path=xb,g.PointCloud=XO,g.PointCloudObject=Kb,g.Pose=QO,g.PoseInFrame=ZO,g.PoseTrackerClient=Sb,g.PowerMode=DO,g.PowerSensorClient=pb,g.RectangularPrism=eb,g.ResourceName=nb,g.RobotClient=Xe,g.SensorClient=gb,g.ServoClient=zb,g.SlamClient=Vb,g.SlamPosition=$b,g.SlamProperties=Yb,g.Sphere=ab,g.StreamClient=yb,g.Struct=p,g.SwitchClient=fb,g.Timestamp=_,g.TrainingStatus=Wa,g.Transform=tb,g.TransformChangeType=gg,g.Vector3=sb,g.VideoClient=nM,g.VisionClient=Wb,g.Waypoint=Jb,g.WorldState=ob,g.WorldStateStoreClient=Qb,g.addMetadata=Z_,g.appApi=RI,g.appRobotApi=US,g.armApi=Tm,g.baseApi=Im,g.billingApi=II,g.boardApi=Gm,g.buttonApi=UO,g.cameraApi=BS,g.commonApi=Bt,g.createConsoleLogWriter=__,g.createRobotClient=_g,g.createViamClient=hO,g.dataApi=LS,g.dataManagerApi=Ub,g.deleteMetadata=eS,g.disableDebugLogging=Q_,g.discoveryApi=qS,g.doCommandFromClient=q,g.enableDebugLogging=X_,g.encoderApi=zm,g.gantryApi=oS,g.genericComponentApi=iS,g.genericServiceApi=aM,g.getStatusFromClient=L,g.gripperApi=rS,g.inputControllerApi=uc,g.isValidGeoPoint=$f,g.mlTrainingApi=fI,g.motionApi=$d,g.motorApi=cS,g.movementSensorApi=Ac,g.navigationApi=op,g.powerSensorApi=lS,g.provisioningApi=kO,g.robotApi=bS,g.sensorApi=ub,g.servoApi=pS,g.setDebugLogWriter=h_,g.slamApi=gp,g.streamApi=Tb,g.switchApi=vb,g.transformWithUUID=wi,g.version=sM,g.visionApi=rg,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});
|