@spatius/avatarkit 1.3.4 → 1.3.5-beta.1
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/{AvatarDownloader-CavxMpAz.js → AvatarDownloader-BLERPef7.js} +55 -8
- package/dist/{AvatarSDK-BMjjoYiZ.js → AvatarSDK-DCYDBMwd.js} +5 -2357
- package/dist/{OpusCodec-Cib3mtQ2.js → OpusCodec-BYwstcZb.js} +1 -1
- package/dist/{OpusDecoderProxy-Dz21UtCz.js → OpusDecoderProxy-DW_SVYwd.js} +3 -3
- package/dist/{OpusEncoderProxy-BiX90p4q.js → OpusEncoderProxy-CQrj6ZjY.js} +3 -3
- package/dist/{StreamingAudioPlayer-D5_x6veD.js → StreamingAudioPlayer-BORop_1T.js} +2 -2
- package/dist/assets/{AvatarDownloader-DkReeoUZ.js → AvatarDownloader-DImd24mo.js} +53 -6
- package/dist/assets/{AvatarSDK-DX8_-oyi.js → AvatarSDK-vQTYP0IB.js} +14 -5
- package/dist/assets/{OpusDecoderWorker.worker-BAd4MYA3.js → OpusDecoderWorker.worker-DkKhJmGs.js} +1 -1
- package/dist/assets/{OpusEncoderWorker.worker-DdhFHkno.js → OpusEncoderWorker.worker-Bu8QRO55.js} +1 -1
- package/dist/assets/{logger-__jZD7QG.js → logger-CnIdJBOF.js} +1 -1
- package/dist/core/AvatarController.d.ts +17 -0
- package/dist/{error-utils-B76Nf6d6.js → error-utils-CX5P3vnW.js} +1 -1
- package/dist/index.js +57 -16
- package/dist/internal-telemetry.d.ts +20 -1
- package/dist/internal-telemetry.js +30 -5
- package/dist/{logger-B_tTFAYq.js → logger-BCrlTIt2.js} +1 -1
- package/dist/{otel-trace-DmmQrXv-.js → otel-trace-D2py5nQo.js} +2403 -7
- package/dist/{pwa-cache-manager-BxeZI1BU.js → pwa-cache-manager-C7su6HpW.js} +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,2365 @@
|
|
|
1
|
-
import { $ as trace, A as createResource, B as isTimeInput, D as createLegacyOtlpBrowserExportDelegate, F as BindOnceFuture, G as ATTR_EXCEPTION_STACKTRACE, H as millisToHrTime, I as ExportResultCode, J as getNumberFromEnv, K as ATTR_EXCEPTION_TYPE, L as addHrTimes, M as OTLPExporterBase, N as defaultResource, O as JSON_ENCODER, P as resourceFromAttributes, Q as suppressTracing, R as hrTime, T as resolveSdkVersion, U as otperformance, V as isTimeInputHrTime, W as ATTR_EXCEPTION_MESSAGE, X as globalErrorHandler, Y as getStringFromEnv, Z as isTracingSuppressed, _t as OTEL_TRACES_ENDPOINT, a as clientContextFields, at as TraceFlags, ct as ROOT_CONTEXT, dt as getGlobal, et as diag$1, ft as registerGlobal, ht as OTEL_PASSWORD, it as INVALID_SPAN_CONTEXT, j as toAttributes, k as createInstrumentationScope, lt as createContextKey, nt as isSpanContextValid, ot as ContextAPI, pt as unregisterGlobal, q as ATTR_SERVICE_NAME, rt as isValidTraceId, st as createNoopMeter, t as logger, tt as context, ut as DiagAPI, vt as OTEL_TRACES_STREAM_NAME, w as getSdkPackage, xt as idManager, y as observeExporter, yt as OTEL_USERNAME, z as hrTimeDuration } from "./logger-
|
|
1
|
+
import { $ as trace, A as createResource, B as isTimeInput, D as createLegacyOtlpBrowserExportDelegate, F as BindOnceFuture, G as ATTR_EXCEPTION_STACKTRACE, H as millisToHrTime, I as ExportResultCode, J as getNumberFromEnv, K as ATTR_EXCEPTION_TYPE, L as addHrTimes, M as OTLPExporterBase, N as defaultResource, O as JSON_ENCODER, P as resourceFromAttributes, Q as suppressTracing, R as hrTime, T as resolveSdkVersion, U as otperformance, V as isTimeInputHrTime, W as ATTR_EXCEPTION_MESSAGE, X as globalErrorHandler, Y as getStringFromEnv, Z as isTracingSuppressed, _t as OTEL_TRACES_ENDPOINT, a as clientContextFields, at as TraceFlags, ct as ROOT_CONTEXT, dt as getGlobal, et as diag$1, ft as registerGlobal, ht as OTEL_PASSWORD, it as INVALID_SPAN_CONTEXT, j as toAttributes, k as createInstrumentationScope, lt as createContextKey, nt as isSpanContextValid, ot as ContextAPI, pt as unregisterGlobal, q as ATTR_SERVICE_NAME, rt as isValidTraceId, st as createNoopMeter, t as logger, tt as context, ut as DiagAPI, vt as OTEL_TRACES_STREAM_NAME, w as getSdkPackage, xt as idManager, y as observeExporter, yt as OTEL_USERNAME, z as hrTimeDuration } from "./logger-BCrlTIt2.js";
|
|
2
|
+
//#region node_modules/.pnpm/@bufbuild+protobuf@2.10.1/node_modules/@bufbuild/protobuf/dist/esm/wire/varint.js
|
|
3
|
+
/**
|
|
4
|
+
* Read a 64 bit varint as two JS numbers.
|
|
5
|
+
*
|
|
6
|
+
* Returns tuple:
|
|
7
|
+
* [0]: low bits
|
|
8
|
+
* [1]: high bits
|
|
9
|
+
*
|
|
10
|
+
* Copyright 2008 Google Inc. All rights reserved.
|
|
11
|
+
*
|
|
12
|
+
* See https://github.com/protocolbuffers/protobuf/blob/8a71927d74a4ce34efe2d8769fda198f52d20d12/js/experimental/runtime/kernel/buffer_decoder.js#L175
|
|
13
|
+
*/
|
|
14
|
+
function varint64read() {
|
|
15
|
+
let lowBits = 0;
|
|
16
|
+
let highBits = 0;
|
|
17
|
+
for (let shift = 0; shift < 28; shift += 7) {
|
|
18
|
+
let b = this.buf[this.pos++];
|
|
19
|
+
lowBits |= (b & 127) << shift;
|
|
20
|
+
if ((b & 128) == 0) {
|
|
21
|
+
this.assertBounds();
|
|
22
|
+
return [lowBits, highBits];
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
let middleByte = this.buf[this.pos++];
|
|
26
|
+
lowBits |= (middleByte & 15) << 28;
|
|
27
|
+
highBits = (middleByte & 112) >> 4;
|
|
28
|
+
if ((middleByte & 128) == 0) {
|
|
29
|
+
this.assertBounds();
|
|
30
|
+
return [lowBits, highBits];
|
|
31
|
+
}
|
|
32
|
+
for (let shift = 3; shift <= 31; shift += 7) {
|
|
33
|
+
let b = this.buf[this.pos++];
|
|
34
|
+
highBits |= (b & 127) << shift;
|
|
35
|
+
if ((b & 128) == 0) {
|
|
36
|
+
this.assertBounds();
|
|
37
|
+
return [lowBits, highBits];
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
throw new Error("invalid varint");
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Write a 64 bit varint, given as two JS numbers, to the given bytes array.
|
|
44
|
+
*
|
|
45
|
+
* Copyright 2008 Google Inc. All rights reserved.
|
|
46
|
+
*
|
|
47
|
+
* See https://github.com/protocolbuffers/protobuf/blob/8a71927d74a4ce34efe2d8769fda198f52d20d12/js/experimental/runtime/kernel/writer.js#L344
|
|
48
|
+
*/
|
|
49
|
+
function varint64write(lo, hi, bytes) {
|
|
50
|
+
for (let i = 0; i < 28; i = i + 7) {
|
|
51
|
+
const shift = lo >>> i;
|
|
52
|
+
const hasNext = !(shift >>> 7 == 0 && hi == 0);
|
|
53
|
+
const byte = (hasNext ? shift | 128 : shift) & 255;
|
|
54
|
+
bytes.push(byte);
|
|
55
|
+
if (!hasNext) return;
|
|
56
|
+
}
|
|
57
|
+
const splitBits = lo >>> 28 & 15 | (hi & 7) << 4;
|
|
58
|
+
const hasMoreBits = !(hi >> 3 == 0);
|
|
59
|
+
bytes.push((hasMoreBits ? splitBits | 128 : splitBits) & 255);
|
|
60
|
+
if (!hasMoreBits) return;
|
|
61
|
+
for (let i = 3; i < 31; i = i + 7) {
|
|
62
|
+
const shift = hi >>> i;
|
|
63
|
+
const hasNext = !(shift >>> 7 == 0);
|
|
64
|
+
const byte = (hasNext ? shift | 128 : shift) & 255;
|
|
65
|
+
bytes.push(byte);
|
|
66
|
+
if (!hasNext) return;
|
|
67
|
+
}
|
|
68
|
+
bytes.push(hi >>> 31 & 1);
|
|
69
|
+
}
|
|
70
|
+
var TWO_PWR_32_DBL = 4294967296;
|
|
71
|
+
/**
|
|
72
|
+
* Parse decimal string of 64 bit integer value as two JS numbers.
|
|
73
|
+
*
|
|
74
|
+
* Copyright 2008 Google Inc. All rights reserved.
|
|
75
|
+
*
|
|
76
|
+
* See https://github.com/protocolbuffers/protobuf-javascript/blob/a428c58273abad07c66071d9753bc4d1289de426/experimental/runtime/int64.js#L10
|
|
77
|
+
*/
|
|
78
|
+
function int64FromString(dec) {
|
|
79
|
+
const minus = dec[0] === "-";
|
|
80
|
+
if (minus) dec = dec.slice(1);
|
|
81
|
+
const base = 1e6;
|
|
82
|
+
let lowBits = 0;
|
|
83
|
+
let highBits = 0;
|
|
84
|
+
function add1e6digit(begin, end) {
|
|
85
|
+
const digit1e6 = Number(dec.slice(begin, end));
|
|
86
|
+
highBits *= base;
|
|
87
|
+
lowBits = lowBits * base + digit1e6;
|
|
88
|
+
if (lowBits >= TWO_PWR_32_DBL) {
|
|
89
|
+
highBits = highBits + (lowBits / TWO_PWR_32_DBL | 0);
|
|
90
|
+
lowBits = lowBits % TWO_PWR_32_DBL;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
add1e6digit(-24, -18);
|
|
94
|
+
add1e6digit(-18, -12);
|
|
95
|
+
add1e6digit(-12, -6);
|
|
96
|
+
add1e6digit(-6);
|
|
97
|
+
return minus ? negate(lowBits, highBits) : newBits(lowBits, highBits);
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Losslessly converts a 64-bit signed integer in 32:32 split representation
|
|
101
|
+
* into a decimal string.
|
|
102
|
+
*
|
|
103
|
+
* Copyright 2008 Google Inc. All rights reserved.
|
|
104
|
+
*
|
|
105
|
+
* See https://github.com/protocolbuffers/protobuf-javascript/blob/a428c58273abad07c66071d9753bc4d1289de426/experimental/runtime/int64.js#L10
|
|
106
|
+
*/
|
|
107
|
+
function int64ToString(lo, hi) {
|
|
108
|
+
let bits = newBits(lo, hi);
|
|
109
|
+
const negative = bits.hi & 2147483648;
|
|
110
|
+
if (negative) bits = negate(bits.lo, bits.hi);
|
|
111
|
+
const result = uInt64ToString(bits.lo, bits.hi);
|
|
112
|
+
return negative ? "-" + result : result;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Losslessly converts a 64-bit unsigned integer in 32:32 split representation
|
|
116
|
+
* into a decimal string.
|
|
117
|
+
*
|
|
118
|
+
* Copyright 2008 Google Inc. All rights reserved.
|
|
119
|
+
*
|
|
120
|
+
* See https://github.com/protocolbuffers/protobuf-javascript/blob/a428c58273abad07c66071d9753bc4d1289de426/experimental/runtime/int64.js#L10
|
|
121
|
+
*/
|
|
122
|
+
function uInt64ToString(lo, hi) {
|
|
123
|
+
({lo, hi} = toUnsigned(lo, hi));
|
|
124
|
+
if (hi <= 2097151) return String(TWO_PWR_32_DBL * hi + lo);
|
|
125
|
+
const low = lo & 16777215;
|
|
126
|
+
const mid = (lo >>> 24 | hi << 8) & 16777215;
|
|
127
|
+
const high = hi >> 16 & 65535;
|
|
128
|
+
let digitA = low + mid * 6777216 + high * 6710656;
|
|
129
|
+
let digitB = mid + high * 8147497;
|
|
130
|
+
let digitC = high * 2;
|
|
131
|
+
const base = 1e7;
|
|
132
|
+
if (digitA >= base) {
|
|
133
|
+
digitB += Math.floor(digitA / base);
|
|
134
|
+
digitA %= base;
|
|
135
|
+
}
|
|
136
|
+
if (digitB >= base) {
|
|
137
|
+
digitC += Math.floor(digitB / base);
|
|
138
|
+
digitB %= base;
|
|
139
|
+
}
|
|
140
|
+
return digitC.toString() + decimalFrom1e7WithLeadingZeros(digitB) + decimalFrom1e7WithLeadingZeros(digitA);
|
|
141
|
+
}
|
|
142
|
+
function toUnsigned(lo, hi) {
|
|
143
|
+
return {
|
|
144
|
+
lo: lo >>> 0,
|
|
145
|
+
hi: hi >>> 0
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
function newBits(lo, hi) {
|
|
149
|
+
return {
|
|
150
|
+
lo: lo | 0,
|
|
151
|
+
hi: hi | 0
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Returns two's compliment negation of input.
|
|
156
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators#Signed_32-bit_integers
|
|
157
|
+
*/
|
|
158
|
+
function negate(lowBits, highBits) {
|
|
159
|
+
highBits = ~highBits;
|
|
160
|
+
if (lowBits) lowBits = ~lowBits + 1;
|
|
161
|
+
else highBits += 1;
|
|
162
|
+
return newBits(lowBits, highBits);
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Returns decimal representation of digit1e7 with leading zeros.
|
|
166
|
+
*/
|
|
167
|
+
var decimalFrom1e7WithLeadingZeros = (digit1e7) => {
|
|
168
|
+
const partial = String(digit1e7);
|
|
169
|
+
return "0000000".slice(partial.length) + partial;
|
|
170
|
+
};
|
|
171
|
+
/**
|
|
172
|
+
* Write a 32 bit varint, signed or unsigned. Same as `varint64write(0, value, bytes)`
|
|
173
|
+
*
|
|
174
|
+
* Copyright 2008 Google Inc. All rights reserved.
|
|
175
|
+
*
|
|
176
|
+
* See https://github.com/protocolbuffers/protobuf/blob/1b18833f4f2a2f681f4e4a25cdf3b0a43115ec26/js/binary/encoder.js#L144
|
|
177
|
+
*/
|
|
178
|
+
function varint32write(value, bytes) {
|
|
179
|
+
if (value >= 0) {
|
|
180
|
+
while (value > 127) {
|
|
181
|
+
bytes.push(value & 127 | 128);
|
|
182
|
+
value = value >>> 7;
|
|
183
|
+
}
|
|
184
|
+
bytes.push(value);
|
|
185
|
+
} else {
|
|
186
|
+
for (let i = 0; i < 9; i++) {
|
|
187
|
+
bytes.push(value & 127 | 128);
|
|
188
|
+
value = value >> 7;
|
|
189
|
+
}
|
|
190
|
+
bytes.push(1);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Read an unsigned 32 bit varint.
|
|
195
|
+
*
|
|
196
|
+
* See https://github.com/protocolbuffers/protobuf/blob/8a71927d74a4ce34efe2d8769fda198f52d20d12/js/experimental/runtime/kernel/buffer_decoder.js#L220
|
|
197
|
+
*/
|
|
198
|
+
function varint32read() {
|
|
199
|
+
let b = this.buf[this.pos++];
|
|
200
|
+
let result = b & 127;
|
|
201
|
+
if ((b & 128) == 0) {
|
|
202
|
+
this.assertBounds();
|
|
203
|
+
return result;
|
|
204
|
+
}
|
|
205
|
+
b = this.buf[this.pos++];
|
|
206
|
+
result |= (b & 127) << 7;
|
|
207
|
+
if ((b & 128) == 0) {
|
|
208
|
+
this.assertBounds();
|
|
209
|
+
return result;
|
|
210
|
+
}
|
|
211
|
+
b = this.buf[this.pos++];
|
|
212
|
+
result |= (b & 127) << 14;
|
|
213
|
+
if ((b & 128) == 0) {
|
|
214
|
+
this.assertBounds();
|
|
215
|
+
return result;
|
|
216
|
+
}
|
|
217
|
+
b = this.buf[this.pos++];
|
|
218
|
+
result |= (b & 127) << 21;
|
|
219
|
+
if ((b & 128) == 0) {
|
|
220
|
+
this.assertBounds();
|
|
221
|
+
return result;
|
|
222
|
+
}
|
|
223
|
+
b = this.buf[this.pos++];
|
|
224
|
+
result |= (b & 15) << 28;
|
|
225
|
+
for (let readBytes = 5; (b & 128) !== 0 && readBytes < 10; readBytes++) b = this.buf[this.pos++];
|
|
226
|
+
if ((b & 128) != 0) throw new Error("invalid varint");
|
|
227
|
+
this.assertBounds();
|
|
228
|
+
return result >>> 0;
|
|
229
|
+
}
|
|
230
|
+
//#endregion
|
|
231
|
+
//#region node_modules/.pnpm/@bufbuild+protobuf@2.10.1/node_modules/@bufbuild/protobuf/dist/esm/proto-int64.js
|
|
232
|
+
/**
|
|
233
|
+
* Int64Support for the current environment.
|
|
234
|
+
*/
|
|
235
|
+
var protoInt64 = /*@__PURE__*/ makeInt64Support();
|
|
236
|
+
function makeInt64Support() {
|
|
237
|
+
const dv = /* @__PURE__ */ new DataView(/* @__PURE__ */ new ArrayBuffer(8));
|
|
238
|
+
if (typeof BigInt === "function" && typeof dv.getBigInt64 === "function" && typeof dv.getBigUint64 === "function" && typeof dv.setBigInt64 === "function" && typeof dv.setBigUint64 === "function" && (!!globalThis.Deno || typeof process != "object" || typeof process.env != "object" || process.env.BUF_BIGINT_DISABLE !== "1")) {
|
|
239
|
+
const MIN = BigInt("-9223372036854775808");
|
|
240
|
+
const MAX = BigInt("9223372036854775807");
|
|
241
|
+
const UMIN = BigInt("0");
|
|
242
|
+
const UMAX = BigInt("18446744073709551615");
|
|
243
|
+
return {
|
|
244
|
+
zero: BigInt(0),
|
|
245
|
+
supported: true,
|
|
246
|
+
parse(value) {
|
|
247
|
+
const bi = typeof value == "bigint" ? value : BigInt(value);
|
|
248
|
+
if (bi > MAX || bi < MIN) throw new Error(`invalid int64: ${value}`);
|
|
249
|
+
return bi;
|
|
250
|
+
},
|
|
251
|
+
uParse(value) {
|
|
252
|
+
const bi = typeof value == "bigint" ? value : BigInt(value);
|
|
253
|
+
if (bi > UMAX || bi < UMIN) throw new Error(`invalid uint64: ${value}`);
|
|
254
|
+
return bi;
|
|
255
|
+
},
|
|
256
|
+
enc(value) {
|
|
257
|
+
dv.setBigInt64(0, this.parse(value), true);
|
|
258
|
+
return {
|
|
259
|
+
lo: dv.getInt32(0, true),
|
|
260
|
+
hi: dv.getInt32(4, true)
|
|
261
|
+
};
|
|
262
|
+
},
|
|
263
|
+
uEnc(value) {
|
|
264
|
+
dv.setBigInt64(0, this.uParse(value), true);
|
|
265
|
+
return {
|
|
266
|
+
lo: dv.getInt32(0, true),
|
|
267
|
+
hi: dv.getInt32(4, true)
|
|
268
|
+
};
|
|
269
|
+
},
|
|
270
|
+
dec(lo, hi) {
|
|
271
|
+
dv.setInt32(0, lo, true);
|
|
272
|
+
dv.setInt32(4, hi, true);
|
|
273
|
+
return dv.getBigInt64(0, true);
|
|
274
|
+
},
|
|
275
|
+
uDec(lo, hi) {
|
|
276
|
+
dv.setInt32(0, lo, true);
|
|
277
|
+
dv.setInt32(4, hi, true);
|
|
278
|
+
return dv.getBigUint64(0, true);
|
|
279
|
+
}
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
return {
|
|
283
|
+
zero: "0",
|
|
284
|
+
supported: false,
|
|
285
|
+
parse(value) {
|
|
286
|
+
if (typeof value != "string") value = value.toString();
|
|
287
|
+
assertInt64String(value);
|
|
288
|
+
return value;
|
|
289
|
+
},
|
|
290
|
+
uParse(value) {
|
|
291
|
+
if (typeof value != "string") value = value.toString();
|
|
292
|
+
assertUInt64String(value);
|
|
293
|
+
return value;
|
|
294
|
+
},
|
|
295
|
+
enc(value) {
|
|
296
|
+
if (typeof value != "string") value = value.toString();
|
|
297
|
+
assertInt64String(value);
|
|
298
|
+
return int64FromString(value);
|
|
299
|
+
},
|
|
300
|
+
uEnc(value) {
|
|
301
|
+
if (typeof value != "string") value = value.toString();
|
|
302
|
+
assertUInt64String(value);
|
|
303
|
+
return int64FromString(value);
|
|
304
|
+
},
|
|
305
|
+
dec(lo, hi) {
|
|
306
|
+
return int64ToString(lo, hi);
|
|
307
|
+
},
|
|
308
|
+
uDec(lo, hi) {
|
|
309
|
+
return uInt64ToString(lo, hi);
|
|
310
|
+
}
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
function assertInt64String(value) {
|
|
314
|
+
if (!/^-?[0-9]+$/.test(value)) throw new Error("invalid int64: " + value);
|
|
315
|
+
}
|
|
316
|
+
function assertUInt64String(value) {
|
|
317
|
+
if (!/^[0-9]+$/.test(value)) throw new Error("invalid uint64: " + value);
|
|
318
|
+
}
|
|
319
|
+
//#endregion
|
|
320
|
+
//#region node_modules/.pnpm/@bufbuild+protobuf@2.10.1/node_modules/@bufbuild/protobuf/dist/esm/wire/text-encoding.js
|
|
321
|
+
var symbol = Symbol.for("@bufbuild/protobuf/text-encoding");
|
|
322
|
+
function getTextEncoding() {
|
|
323
|
+
if (globalThis[symbol] == void 0) {
|
|
324
|
+
const te = new globalThis.TextEncoder();
|
|
325
|
+
const td = new globalThis.TextDecoder();
|
|
326
|
+
globalThis[symbol] = {
|
|
327
|
+
encodeUtf8(text) {
|
|
328
|
+
return te.encode(text);
|
|
329
|
+
},
|
|
330
|
+
decodeUtf8(bytes) {
|
|
331
|
+
return td.decode(bytes);
|
|
332
|
+
},
|
|
333
|
+
checkUtf8(text) {
|
|
334
|
+
try {
|
|
335
|
+
return true;
|
|
336
|
+
} catch (_) {
|
|
337
|
+
return false;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
return globalThis[symbol];
|
|
343
|
+
}
|
|
344
|
+
//#endregion
|
|
345
|
+
//#region node_modules/.pnpm/@bufbuild+protobuf@2.10.1/node_modules/@bufbuild/protobuf/dist/esm/wire/binary-encoding.js
|
|
346
|
+
/**
|
|
347
|
+
* Protobuf binary format wire types.
|
|
348
|
+
*
|
|
349
|
+
* A wire type provides just enough information to find the length of the
|
|
350
|
+
* following value.
|
|
351
|
+
*
|
|
352
|
+
* See https://developers.google.com/protocol-buffers/docs/encoding#structure
|
|
353
|
+
*/
|
|
354
|
+
var WireType;
|
|
355
|
+
(function(WireType) {
|
|
356
|
+
/**
|
|
357
|
+
* Used for int32, int64, uint32, uint64, sint32, sint64, bool, enum
|
|
358
|
+
*/
|
|
359
|
+
WireType[WireType["Varint"] = 0] = "Varint";
|
|
360
|
+
/**
|
|
361
|
+
* Used for fixed64, sfixed64, double.
|
|
362
|
+
* Always 8 bytes with little-endian byte order.
|
|
363
|
+
*/
|
|
364
|
+
WireType[WireType["Bit64"] = 1] = "Bit64";
|
|
365
|
+
/**
|
|
366
|
+
* Used for string, bytes, embedded messages, packed repeated fields
|
|
367
|
+
*
|
|
368
|
+
* Only repeated numeric types (types which use the varint, 32-bit,
|
|
369
|
+
* or 64-bit wire types) can be packed. In proto3, such fields are
|
|
370
|
+
* packed by default.
|
|
371
|
+
*/
|
|
372
|
+
WireType[WireType["LengthDelimited"] = 2] = "LengthDelimited";
|
|
373
|
+
/**
|
|
374
|
+
* Start of a tag-delimited aggregate, such as a proto2 group, or a message
|
|
375
|
+
* in editions with message_encoding = DELIMITED.
|
|
376
|
+
*/
|
|
377
|
+
WireType[WireType["StartGroup"] = 3] = "StartGroup";
|
|
378
|
+
/**
|
|
379
|
+
* End of a tag-delimited aggregate.
|
|
380
|
+
*/
|
|
381
|
+
WireType[WireType["EndGroup"] = 4] = "EndGroup";
|
|
382
|
+
/**
|
|
383
|
+
* Used for fixed32, sfixed32, float.
|
|
384
|
+
* Always 4 bytes with little-endian byte order.
|
|
385
|
+
*/
|
|
386
|
+
WireType[WireType["Bit32"] = 5] = "Bit32";
|
|
387
|
+
})(WireType || (WireType = {}));
|
|
388
|
+
var BinaryWriter = class {
|
|
389
|
+
constructor(encodeUtf8 = getTextEncoding().encodeUtf8) {
|
|
390
|
+
this.encodeUtf8 = encodeUtf8;
|
|
391
|
+
/**
|
|
392
|
+
* Previous fork states.
|
|
393
|
+
*/
|
|
394
|
+
this.stack = [];
|
|
395
|
+
this.chunks = [];
|
|
396
|
+
this.buf = [];
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* Return all bytes written and reset this writer.
|
|
400
|
+
*/
|
|
401
|
+
finish() {
|
|
402
|
+
if (this.buf.length) {
|
|
403
|
+
this.chunks.push(new Uint8Array(this.buf));
|
|
404
|
+
this.buf = [];
|
|
405
|
+
}
|
|
406
|
+
let len = 0;
|
|
407
|
+
for (let i = 0; i < this.chunks.length; i++) len += this.chunks[i].length;
|
|
408
|
+
let bytes = new Uint8Array(len);
|
|
409
|
+
let offset = 0;
|
|
410
|
+
for (let i = 0; i < this.chunks.length; i++) {
|
|
411
|
+
bytes.set(this.chunks[i], offset);
|
|
412
|
+
offset += this.chunks[i].length;
|
|
413
|
+
}
|
|
414
|
+
this.chunks = [];
|
|
415
|
+
return bytes;
|
|
416
|
+
}
|
|
417
|
+
/**
|
|
418
|
+
* Start a new fork for length-delimited data like a message
|
|
419
|
+
* or a packed repeated field.
|
|
420
|
+
*
|
|
421
|
+
* Must be joined later with `join()`.
|
|
422
|
+
*/
|
|
423
|
+
fork() {
|
|
424
|
+
this.stack.push({
|
|
425
|
+
chunks: this.chunks,
|
|
426
|
+
buf: this.buf
|
|
427
|
+
});
|
|
428
|
+
this.chunks = [];
|
|
429
|
+
this.buf = [];
|
|
430
|
+
return this;
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
* Join the last fork. Write its length and bytes, then
|
|
434
|
+
* return to the previous state.
|
|
435
|
+
*/
|
|
436
|
+
join() {
|
|
437
|
+
let chunk = this.finish();
|
|
438
|
+
let prev = this.stack.pop();
|
|
439
|
+
if (!prev) throw new Error("invalid state, fork stack empty");
|
|
440
|
+
this.chunks = prev.chunks;
|
|
441
|
+
this.buf = prev.buf;
|
|
442
|
+
this.uint32(chunk.byteLength);
|
|
443
|
+
return this.raw(chunk);
|
|
444
|
+
}
|
|
445
|
+
/**
|
|
446
|
+
* Writes a tag (field number and wire type).
|
|
447
|
+
*
|
|
448
|
+
* Equivalent to `uint32( (fieldNo << 3 | type) >>> 0 )`.
|
|
449
|
+
*
|
|
450
|
+
* Generated code should compute the tag ahead of time and call `uint32()`.
|
|
451
|
+
*/
|
|
452
|
+
tag(fieldNo, type) {
|
|
453
|
+
return this.uint32((fieldNo << 3 | type) >>> 0);
|
|
454
|
+
}
|
|
455
|
+
/**
|
|
456
|
+
* Write a chunk of raw bytes.
|
|
457
|
+
*/
|
|
458
|
+
raw(chunk) {
|
|
459
|
+
if (this.buf.length) {
|
|
460
|
+
this.chunks.push(new Uint8Array(this.buf));
|
|
461
|
+
this.buf = [];
|
|
462
|
+
}
|
|
463
|
+
this.chunks.push(chunk);
|
|
464
|
+
return this;
|
|
465
|
+
}
|
|
466
|
+
/**
|
|
467
|
+
* Write a `uint32` value, an unsigned 32 bit varint.
|
|
468
|
+
*/
|
|
469
|
+
uint32(value) {
|
|
470
|
+
assertUInt32(value);
|
|
471
|
+
while (value > 127) {
|
|
472
|
+
this.buf.push(value & 127 | 128);
|
|
473
|
+
value = value >>> 7;
|
|
474
|
+
}
|
|
475
|
+
this.buf.push(value);
|
|
476
|
+
return this;
|
|
477
|
+
}
|
|
478
|
+
/**
|
|
479
|
+
* Write a `int32` value, a signed 32 bit varint.
|
|
480
|
+
*/
|
|
481
|
+
int32(value) {
|
|
482
|
+
assertInt32(value);
|
|
483
|
+
varint32write(value, this.buf);
|
|
484
|
+
return this;
|
|
485
|
+
}
|
|
486
|
+
/**
|
|
487
|
+
* Write a `bool` value, a variant.
|
|
488
|
+
*/
|
|
489
|
+
bool(value) {
|
|
490
|
+
this.buf.push(value ? 1 : 0);
|
|
491
|
+
return this;
|
|
492
|
+
}
|
|
493
|
+
/**
|
|
494
|
+
* Write a `bytes` value, length-delimited arbitrary data.
|
|
495
|
+
*/
|
|
496
|
+
bytes(value) {
|
|
497
|
+
this.uint32(value.byteLength);
|
|
498
|
+
return this.raw(value);
|
|
499
|
+
}
|
|
500
|
+
/**
|
|
501
|
+
* Write a `string` value, length-delimited data converted to UTF-8 text.
|
|
502
|
+
*/
|
|
503
|
+
string(value) {
|
|
504
|
+
let chunk = this.encodeUtf8(value);
|
|
505
|
+
this.uint32(chunk.byteLength);
|
|
506
|
+
return this.raw(chunk);
|
|
507
|
+
}
|
|
508
|
+
/**
|
|
509
|
+
* Write a `float` value, 32-bit floating point number.
|
|
510
|
+
*/
|
|
511
|
+
float(value) {
|
|
512
|
+
assertFloat32(value);
|
|
513
|
+
let chunk = /* @__PURE__ */ new Uint8Array(4);
|
|
514
|
+
new DataView(chunk.buffer).setFloat32(0, value, true);
|
|
515
|
+
return this.raw(chunk);
|
|
516
|
+
}
|
|
517
|
+
/**
|
|
518
|
+
* Write a `double` value, a 64-bit floating point number.
|
|
519
|
+
*/
|
|
520
|
+
double(value) {
|
|
521
|
+
let chunk = /* @__PURE__ */ new Uint8Array(8);
|
|
522
|
+
new DataView(chunk.buffer).setFloat64(0, value, true);
|
|
523
|
+
return this.raw(chunk);
|
|
524
|
+
}
|
|
525
|
+
/**
|
|
526
|
+
* Write a `fixed32` value, an unsigned, fixed-length 32-bit integer.
|
|
527
|
+
*/
|
|
528
|
+
fixed32(value) {
|
|
529
|
+
assertUInt32(value);
|
|
530
|
+
let chunk = /* @__PURE__ */ new Uint8Array(4);
|
|
531
|
+
new DataView(chunk.buffer).setUint32(0, value, true);
|
|
532
|
+
return this.raw(chunk);
|
|
533
|
+
}
|
|
534
|
+
/**
|
|
535
|
+
* Write a `sfixed32` value, a signed, fixed-length 32-bit integer.
|
|
536
|
+
*/
|
|
537
|
+
sfixed32(value) {
|
|
538
|
+
assertInt32(value);
|
|
539
|
+
let chunk = /* @__PURE__ */ new Uint8Array(4);
|
|
540
|
+
new DataView(chunk.buffer).setInt32(0, value, true);
|
|
541
|
+
return this.raw(chunk);
|
|
542
|
+
}
|
|
543
|
+
/**
|
|
544
|
+
* Write a `sint32` value, a signed, zigzag-encoded 32-bit varint.
|
|
545
|
+
*/
|
|
546
|
+
sint32(value) {
|
|
547
|
+
assertInt32(value);
|
|
548
|
+
value = (value << 1 ^ value >> 31) >>> 0;
|
|
549
|
+
varint32write(value, this.buf);
|
|
550
|
+
return this;
|
|
551
|
+
}
|
|
552
|
+
/**
|
|
553
|
+
* Write a `fixed64` value, a signed, fixed-length 64-bit integer.
|
|
554
|
+
*/
|
|
555
|
+
sfixed64(value) {
|
|
556
|
+
let chunk = /* @__PURE__ */ new Uint8Array(8), view = new DataView(chunk.buffer), tc = protoInt64.enc(value);
|
|
557
|
+
view.setInt32(0, tc.lo, true);
|
|
558
|
+
view.setInt32(4, tc.hi, true);
|
|
559
|
+
return this.raw(chunk);
|
|
560
|
+
}
|
|
561
|
+
/**
|
|
562
|
+
* Write a `fixed64` value, an unsigned, fixed-length 64 bit integer.
|
|
563
|
+
*/
|
|
564
|
+
fixed64(value) {
|
|
565
|
+
let chunk = /* @__PURE__ */ new Uint8Array(8), view = new DataView(chunk.buffer), tc = protoInt64.uEnc(value);
|
|
566
|
+
view.setInt32(0, tc.lo, true);
|
|
567
|
+
view.setInt32(4, tc.hi, true);
|
|
568
|
+
return this.raw(chunk);
|
|
569
|
+
}
|
|
570
|
+
/**
|
|
571
|
+
* Write a `int64` value, a signed 64-bit varint.
|
|
572
|
+
*/
|
|
573
|
+
int64(value) {
|
|
574
|
+
let tc = protoInt64.enc(value);
|
|
575
|
+
varint64write(tc.lo, tc.hi, this.buf);
|
|
576
|
+
return this;
|
|
577
|
+
}
|
|
578
|
+
/**
|
|
579
|
+
* Write a `sint64` value, a signed, zig-zag-encoded 64-bit varint.
|
|
580
|
+
*/
|
|
581
|
+
sint64(value) {
|
|
582
|
+
const tc = protoInt64.enc(value), sign = tc.hi >> 31;
|
|
583
|
+
varint64write(tc.lo << 1 ^ sign, (tc.hi << 1 | tc.lo >>> 31) ^ sign, this.buf);
|
|
584
|
+
return this;
|
|
585
|
+
}
|
|
586
|
+
/**
|
|
587
|
+
* Write a `uint64` value, an unsigned 64-bit varint.
|
|
588
|
+
*/
|
|
589
|
+
uint64(value) {
|
|
590
|
+
const tc = protoInt64.uEnc(value);
|
|
591
|
+
varint64write(tc.lo, tc.hi, this.buf);
|
|
592
|
+
return this;
|
|
593
|
+
}
|
|
594
|
+
};
|
|
595
|
+
var BinaryReader = class {
|
|
596
|
+
constructor(buf, decodeUtf8 = getTextEncoding().decodeUtf8) {
|
|
597
|
+
this.decodeUtf8 = decodeUtf8;
|
|
598
|
+
this.varint64 = varint64read;
|
|
599
|
+
/**
|
|
600
|
+
* Read a `uint32` field, an unsigned 32 bit varint.
|
|
601
|
+
*/
|
|
602
|
+
this.uint32 = varint32read;
|
|
603
|
+
this.buf = buf;
|
|
604
|
+
this.len = buf.length;
|
|
605
|
+
this.pos = 0;
|
|
606
|
+
this.view = new DataView(buf.buffer, buf.byteOffset, buf.byteLength);
|
|
607
|
+
}
|
|
608
|
+
/**
|
|
609
|
+
* Reads a tag - field number and wire type.
|
|
610
|
+
*/
|
|
611
|
+
tag() {
|
|
612
|
+
let tag = this.uint32(), fieldNo = tag >>> 3, wireType = tag & 7;
|
|
613
|
+
if (fieldNo <= 0 || wireType < 0 || wireType > 5) throw new Error("illegal tag: field no " + fieldNo + " wire type " + wireType);
|
|
614
|
+
return [fieldNo, wireType];
|
|
615
|
+
}
|
|
616
|
+
/**
|
|
617
|
+
* Skip one element and return the skipped data.
|
|
618
|
+
*
|
|
619
|
+
* When skipping StartGroup, provide the tags field number to check for
|
|
620
|
+
* matching field number in the EndGroup tag.
|
|
621
|
+
*/
|
|
622
|
+
skip(wireType, fieldNo) {
|
|
623
|
+
let start = this.pos;
|
|
624
|
+
switch (wireType) {
|
|
625
|
+
case WireType.Varint:
|
|
626
|
+
while (this.buf[this.pos++] & 128);
|
|
627
|
+
break;
|
|
628
|
+
case WireType.Bit64: this.pos += 4;
|
|
629
|
+
case WireType.Bit32:
|
|
630
|
+
this.pos += 4;
|
|
631
|
+
break;
|
|
632
|
+
case WireType.LengthDelimited:
|
|
633
|
+
let len = this.uint32();
|
|
634
|
+
this.pos += len;
|
|
635
|
+
break;
|
|
636
|
+
case WireType.StartGroup:
|
|
637
|
+
for (;;) {
|
|
638
|
+
const [fn, wt] = this.tag();
|
|
639
|
+
if (wt === WireType.EndGroup) {
|
|
640
|
+
if (fieldNo !== void 0 && fn !== fieldNo) throw new Error("invalid end group tag");
|
|
641
|
+
break;
|
|
642
|
+
}
|
|
643
|
+
this.skip(wt, fn);
|
|
644
|
+
}
|
|
645
|
+
break;
|
|
646
|
+
default: throw new Error("cant skip wire type " + wireType);
|
|
647
|
+
}
|
|
648
|
+
this.assertBounds();
|
|
649
|
+
return this.buf.subarray(start, this.pos);
|
|
650
|
+
}
|
|
651
|
+
/**
|
|
652
|
+
* Throws error if position in byte array is out of range.
|
|
653
|
+
*/
|
|
654
|
+
assertBounds() {
|
|
655
|
+
if (this.pos > this.len) throw new RangeError("premature EOF");
|
|
656
|
+
}
|
|
657
|
+
/**
|
|
658
|
+
* Read a `int32` field, a signed 32 bit varint.
|
|
659
|
+
*/
|
|
660
|
+
int32() {
|
|
661
|
+
return this.uint32() | 0;
|
|
662
|
+
}
|
|
663
|
+
/**
|
|
664
|
+
* Read a `sint32` field, a signed, zigzag-encoded 32-bit varint.
|
|
665
|
+
*/
|
|
666
|
+
sint32() {
|
|
667
|
+
let zze = this.uint32();
|
|
668
|
+
return zze >>> 1 ^ -(zze & 1);
|
|
669
|
+
}
|
|
670
|
+
/**
|
|
671
|
+
* Read a `int64` field, a signed 64-bit varint.
|
|
672
|
+
*/
|
|
673
|
+
int64() {
|
|
674
|
+
return protoInt64.dec(...this.varint64());
|
|
675
|
+
}
|
|
676
|
+
/**
|
|
677
|
+
* Read a `uint64` field, an unsigned 64-bit varint.
|
|
678
|
+
*/
|
|
679
|
+
uint64() {
|
|
680
|
+
return protoInt64.uDec(...this.varint64());
|
|
681
|
+
}
|
|
682
|
+
/**
|
|
683
|
+
* Read a `sint64` field, a signed, zig-zag-encoded 64-bit varint.
|
|
684
|
+
*/
|
|
685
|
+
sint64() {
|
|
686
|
+
let [lo, hi] = this.varint64();
|
|
687
|
+
let s = -(lo & 1);
|
|
688
|
+
lo = (lo >>> 1 | (hi & 1) << 31) ^ s;
|
|
689
|
+
hi = hi >>> 1 ^ s;
|
|
690
|
+
return protoInt64.dec(lo, hi);
|
|
691
|
+
}
|
|
692
|
+
/**
|
|
693
|
+
* Read a `bool` field, a variant.
|
|
694
|
+
*/
|
|
695
|
+
bool() {
|
|
696
|
+
let [lo, hi] = this.varint64();
|
|
697
|
+
return lo !== 0 || hi !== 0;
|
|
698
|
+
}
|
|
699
|
+
/**
|
|
700
|
+
* Read a `fixed32` field, an unsigned, fixed-length 32-bit integer.
|
|
701
|
+
*/
|
|
702
|
+
fixed32() {
|
|
703
|
+
return this.view.getUint32((this.pos += 4) - 4, true);
|
|
704
|
+
}
|
|
705
|
+
/**
|
|
706
|
+
* Read a `sfixed32` field, a signed, fixed-length 32-bit integer.
|
|
707
|
+
*/
|
|
708
|
+
sfixed32() {
|
|
709
|
+
return this.view.getInt32((this.pos += 4) - 4, true);
|
|
710
|
+
}
|
|
711
|
+
/**
|
|
712
|
+
* Read a `fixed64` field, an unsigned, fixed-length 64 bit integer.
|
|
713
|
+
*/
|
|
714
|
+
fixed64() {
|
|
715
|
+
return protoInt64.uDec(this.sfixed32(), this.sfixed32());
|
|
716
|
+
}
|
|
717
|
+
/**
|
|
718
|
+
* Read a `fixed64` field, a signed, fixed-length 64-bit integer.
|
|
719
|
+
*/
|
|
720
|
+
sfixed64() {
|
|
721
|
+
return protoInt64.dec(this.sfixed32(), this.sfixed32());
|
|
722
|
+
}
|
|
723
|
+
/**
|
|
724
|
+
* Read a `float` field, 32-bit floating point number.
|
|
725
|
+
*/
|
|
726
|
+
float() {
|
|
727
|
+
return this.view.getFloat32((this.pos += 4) - 4, true);
|
|
728
|
+
}
|
|
729
|
+
/**
|
|
730
|
+
* Read a `double` field, a 64-bit floating point number.
|
|
731
|
+
*/
|
|
732
|
+
double() {
|
|
733
|
+
return this.view.getFloat64((this.pos += 8) - 8, true);
|
|
734
|
+
}
|
|
735
|
+
/**
|
|
736
|
+
* Read a `bytes` field, length-delimited arbitrary data.
|
|
737
|
+
*/
|
|
738
|
+
bytes() {
|
|
739
|
+
let len = this.uint32(), start = this.pos;
|
|
740
|
+
this.pos += len;
|
|
741
|
+
this.assertBounds();
|
|
742
|
+
return this.buf.subarray(start, start + len);
|
|
743
|
+
}
|
|
744
|
+
/**
|
|
745
|
+
* Read a `string` field, length-delimited data converted to UTF-8 text.
|
|
746
|
+
*/
|
|
747
|
+
string() {
|
|
748
|
+
return this.decodeUtf8(this.bytes());
|
|
749
|
+
}
|
|
750
|
+
};
|
|
751
|
+
/**
|
|
752
|
+
* Assert a valid signed protobuf 32-bit integer as a number or string.
|
|
753
|
+
*/
|
|
754
|
+
function assertInt32(arg) {
|
|
755
|
+
if (typeof arg == "string") arg = Number(arg);
|
|
756
|
+
else if (typeof arg != "number") throw new Error("invalid int32: " + typeof arg);
|
|
757
|
+
if (!Number.isInteger(arg) || arg > 2147483647 || arg < -2147483648) throw new Error("invalid int32: " + arg);
|
|
758
|
+
}
|
|
759
|
+
/**
|
|
760
|
+
* Assert a valid unsigned protobuf 32-bit integer as a number or string.
|
|
761
|
+
*/
|
|
762
|
+
function assertUInt32(arg) {
|
|
763
|
+
if (typeof arg == "string") arg = Number(arg);
|
|
764
|
+
else if (typeof arg != "number") throw new Error("invalid uint32: " + typeof arg);
|
|
765
|
+
if (!Number.isInteger(arg) || arg > 4294967295 || arg < 0) throw new Error("invalid uint32: " + arg);
|
|
766
|
+
}
|
|
767
|
+
/**
|
|
768
|
+
* Assert a valid protobuf float value as a number or string.
|
|
769
|
+
*/
|
|
770
|
+
function assertFloat32(arg) {
|
|
771
|
+
if (typeof arg == "string") {
|
|
772
|
+
const o = arg;
|
|
773
|
+
arg = Number(arg);
|
|
774
|
+
if (Number.isNaN(arg) && o !== "NaN") throw new Error("invalid float32: " + o);
|
|
775
|
+
} else if (typeof arg != "number") throw new Error("invalid float32: " + typeof arg);
|
|
776
|
+
if (Number.isFinite(arg) && (arg > 34028234663852886e22 || arg < -34028234663852886e22)) throw new Error("invalid float32: " + arg);
|
|
777
|
+
}
|
|
778
|
+
//#endregion
|
|
779
|
+
//#region generated/google/protobuf/struct.ts
|
|
780
|
+
function nullValueFromJSON(object) {
|
|
781
|
+
switch (object) {
|
|
782
|
+
case 0:
|
|
783
|
+
case "NULL_VALUE": return 0;
|
|
784
|
+
default: return -1;
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
function nullValueToJSON(object) {
|
|
788
|
+
switch (object) {
|
|
789
|
+
case 0: return "NULL_VALUE";
|
|
790
|
+
default: return "UNRECOGNIZED";
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
function createBaseStruct() {
|
|
794
|
+
return { fields: {} };
|
|
795
|
+
}
|
|
796
|
+
var Struct = {
|
|
797
|
+
encode(message, writer = new BinaryWriter()) {
|
|
798
|
+
globalThis.Object.entries(message.fields).forEach(([key, value]) => {
|
|
799
|
+
if (value !== void 0) Struct_FieldsEntry.encode({
|
|
800
|
+
key,
|
|
801
|
+
value
|
|
802
|
+
}, writer.uint32(10).fork()).join();
|
|
803
|
+
});
|
|
804
|
+
return writer;
|
|
805
|
+
},
|
|
806
|
+
decode(input, length) {
|
|
807
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
808
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
809
|
+
const message = createBaseStruct();
|
|
810
|
+
while (reader.pos < end) {
|
|
811
|
+
const tag = reader.uint32();
|
|
812
|
+
switch (tag >>> 3) {
|
|
813
|
+
case 1: {
|
|
814
|
+
if (tag !== 10) break;
|
|
815
|
+
const entry1 = Struct_FieldsEntry.decode(reader, reader.uint32());
|
|
816
|
+
if (entry1.value !== void 0) message.fields[entry1.key] = entry1.value;
|
|
817
|
+
continue;
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
821
|
+
reader.skip(tag & 7);
|
|
822
|
+
}
|
|
823
|
+
return message;
|
|
824
|
+
},
|
|
825
|
+
fromJSON(object) {
|
|
826
|
+
return { fields: isObject$2(object.fields) ? globalThis.Object.entries(object.fields).reduce((acc, [key, value]) => {
|
|
827
|
+
acc[key] = value;
|
|
828
|
+
return acc;
|
|
829
|
+
}, {}) : {} };
|
|
830
|
+
},
|
|
831
|
+
toJSON(message) {
|
|
832
|
+
const obj = {};
|
|
833
|
+
if (message.fields) {
|
|
834
|
+
const entries = globalThis.Object.entries(message.fields);
|
|
835
|
+
if (entries.length > 0) {
|
|
836
|
+
obj.fields = {};
|
|
837
|
+
entries.forEach(([k, v]) => {
|
|
838
|
+
obj.fields[k] = v;
|
|
839
|
+
});
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
return obj;
|
|
843
|
+
},
|
|
844
|
+
create(base) {
|
|
845
|
+
return Struct.fromPartial(base ?? {});
|
|
846
|
+
},
|
|
847
|
+
fromPartial(object) {
|
|
848
|
+
const message = createBaseStruct();
|
|
849
|
+
message.fields = globalThis.Object.entries(object.fields ?? {}).reduce((acc, [key, value]) => {
|
|
850
|
+
if (value !== void 0) acc[key] = value;
|
|
851
|
+
return acc;
|
|
852
|
+
}, {});
|
|
853
|
+
return message;
|
|
854
|
+
},
|
|
855
|
+
wrap(object) {
|
|
856
|
+
const struct = createBaseStruct();
|
|
857
|
+
if (object !== void 0) for (const key of globalThis.Object.keys(object)) struct.fields[key] = object[key];
|
|
858
|
+
return struct;
|
|
859
|
+
},
|
|
860
|
+
unwrap(message) {
|
|
861
|
+
const object = {};
|
|
862
|
+
if (message.fields) for (const key of globalThis.Object.keys(message.fields)) object[key] = message.fields[key];
|
|
863
|
+
return object;
|
|
864
|
+
}
|
|
865
|
+
};
|
|
866
|
+
function createBaseStruct_FieldsEntry() {
|
|
867
|
+
return {
|
|
868
|
+
key: "",
|
|
869
|
+
value: void 0
|
|
870
|
+
};
|
|
871
|
+
}
|
|
872
|
+
var Struct_FieldsEntry = {
|
|
873
|
+
encode(message, writer = new BinaryWriter()) {
|
|
874
|
+
if (message.key !== "") writer.uint32(10).string(message.key);
|
|
875
|
+
if (message.value !== void 0) Value.encode(Value.wrap(message.value), writer.uint32(18).fork()).join();
|
|
876
|
+
return writer;
|
|
877
|
+
},
|
|
878
|
+
decode(input, length) {
|
|
879
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
880
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
881
|
+
const message = createBaseStruct_FieldsEntry();
|
|
882
|
+
while (reader.pos < end) {
|
|
883
|
+
const tag = reader.uint32();
|
|
884
|
+
switch (tag >>> 3) {
|
|
885
|
+
case 1:
|
|
886
|
+
if (tag !== 10) break;
|
|
887
|
+
message.key = reader.string();
|
|
888
|
+
continue;
|
|
889
|
+
case 2:
|
|
890
|
+
if (tag !== 18) break;
|
|
891
|
+
message.value = Value.unwrap(Value.decode(reader, reader.uint32()));
|
|
892
|
+
continue;
|
|
893
|
+
}
|
|
894
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
895
|
+
reader.skip(tag & 7);
|
|
896
|
+
}
|
|
897
|
+
return message;
|
|
898
|
+
},
|
|
899
|
+
fromJSON(object) {
|
|
900
|
+
return {
|
|
901
|
+
key: isSet$1(object.key) ? globalThis.String(object.key) : "",
|
|
902
|
+
value: isSet$1(object?.value) ? object.value : void 0
|
|
903
|
+
};
|
|
904
|
+
},
|
|
905
|
+
toJSON(message) {
|
|
906
|
+
const obj = {};
|
|
907
|
+
if (message.key !== "") obj.key = message.key;
|
|
908
|
+
if (message.value !== void 0) obj.value = message.value;
|
|
909
|
+
return obj;
|
|
910
|
+
},
|
|
911
|
+
create(base) {
|
|
912
|
+
return Struct_FieldsEntry.fromPartial(base ?? {});
|
|
913
|
+
},
|
|
914
|
+
fromPartial(object) {
|
|
915
|
+
const message = createBaseStruct_FieldsEntry();
|
|
916
|
+
message.key = object.key ?? "";
|
|
917
|
+
message.value = object.value ?? void 0;
|
|
918
|
+
return message;
|
|
919
|
+
}
|
|
920
|
+
};
|
|
921
|
+
function createBaseValue() {
|
|
922
|
+
return {
|
|
923
|
+
nullValue: void 0,
|
|
924
|
+
numberValue: void 0,
|
|
925
|
+
stringValue: void 0,
|
|
926
|
+
boolValue: void 0,
|
|
927
|
+
structValue: void 0,
|
|
928
|
+
listValue: void 0
|
|
929
|
+
};
|
|
930
|
+
}
|
|
931
|
+
var Value = {
|
|
932
|
+
encode(message, writer = new BinaryWriter()) {
|
|
933
|
+
if (message.nullValue !== void 0) writer.uint32(8).int32(message.nullValue);
|
|
934
|
+
if (message.numberValue !== void 0) writer.uint32(17).double(message.numberValue);
|
|
935
|
+
if (message.stringValue !== void 0) writer.uint32(26).string(message.stringValue);
|
|
936
|
+
if (message.boolValue !== void 0) writer.uint32(32).bool(message.boolValue);
|
|
937
|
+
if (message.structValue !== void 0) Struct.encode(Struct.wrap(message.structValue), writer.uint32(42).fork()).join();
|
|
938
|
+
if (message.listValue !== void 0) ListValue.encode(ListValue.wrap(message.listValue), writer.uint32(50).fork()).join();
|
|
939
|
+
return writer;
|
|
940
|
+
},
|
|
941
|
+
decode(input, length) {
|
|
942
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
943
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
944
|
+
const message = createBaseValue();
|
|
945
|
+
while (reader.pos < end) {
|
|
946
|
+
const tag = reader.uint32();
|
|
947
|
+
switch (tag >>> 3) {
|
|
948
|
+
case 1:
|
|
949
|
+
if (tag !== 8) break;
|
|
950
|
+
message.nullValue = reader.int32();
|
|
951
|
+
continue;
|
|
952
|
+
case 2:
|
|
953
|
+
if (tag !== 17) break;
|
|
954
|
+
message.numberValue = reader.double();
|
|
955
|
+
continue;
|
|
956
|
+
case 3:
|
|
957
|
+
if (tag !== 26) break;
|
|
958
|
+
message.stringValue = reader.string();
|
|
959
|
+
continue;
|
|
960
|
+
case 4:
|
|
961
|
+
if (tag !== 32) break;
|
|
962
|
+
message.boolValue = reader.bool();
|
|
963
|
+
continue;
|
|
964
|
+
case 5:
|
|
965
|
+
if (tag !== 42) break;
|
|
966
|
+
message.structValue = Struct.unwrap(Struct.decode(reader, reader.uint32()));
|
|
967
|
+
continue;
|
|
968
|
+
case 6:
|
|
969
|
+
if (tag !== 50) break;
|
|
970
|
+
message.listValue = ListValue.unwrap(ListValue.decode(reader, reader.uint32()));
|
|
971
|
+
continue;
|
|
972
|
+
}
|
|
973
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
974
|
+
reader.skip(tag & 7);
|
|
975
|
+
}
|
|
976
|
+
return message;
|
|
977
|
+
},
|
|
978
|
+
fromJSON(object) {
|
|
979
|
+
return {
|
|
980
|
+
nullValue: isSet$1(object.nullValue) ? nullValueFromJSON(object.nullValue) : isSet$1(object.null_value) ? nullValueFromJSON(object.null_value) : void 0,
|
|
981
|
+
numberValue: isSet$1(object.numberValue) ? globalThis.Number(object.numberValue) : isSet$1(object.number_value) ? globalThis.Number(object.number_value) : void 0,
|
|
982
|
+
stringValue: isSet$1(object.stringValue) ? globalThis.String(object.stringValue) : isSet$1(object.string_value) ? globalThis.String(object.string_value) : void 0,
|
|
983
|
+
boolValue: isSet$1(object.boolValue) ? globalThis.Boolean(object.boolValue) : isSet$1(object.bool_value) ? globalThis.Boolean(object.bool_value) : void 0,
|
|
984
|
+
structValue: isObject$2(object.structValue) ? object.structValue : isObject$2(object.struct_value) ? object.struct_value : void 0,
|
|
985
|
+
listValue: globalThis.Array.isArray(object.listValue) ? [...object.listValue] : globalThis.Array.isArray(object.list_value) ? [...object.list_value] : void 0
|
|
986
|
+
};
|
|
987
|
+
},
|
|
988
|
+
toJSON(message) {
|
|
989
|
+
const obj = {};
|
|
990
|
+
if (message.nullValue !== void 0) obj.nullValue = nullValueToJSON(message.nullValue);
|
|
991
|
+
if (message.numberValue !== void 0) obj.numberValue = message.numberValue;
|
|
992
|
+
if (message.stringValue !== void 0) obj.stringValue = message.stringValue;
|
|
993
|
+
if (message.boolValue !== void 0) obj.boolValue = message.boolValue;
|
|
994
|
+
if (message.structValue !== void 0) obj.structValue = message.structValue;
|
|
995
|
+
if (message.listValue !== void 0) obj.listValue = message.listValue;
|
|
996
|
+
return obj;
|
|
997
|
+
},
|
|
998
|
+
create(base) {
|
|
999
|
+
return Value.fromPartial(base ?? {});
|
|
1000
|
+
},
|
|
1001
|
+
fromPartial(object) {
|
|
1002
|
+
const message = createBaseValue();
|
|
1003
|
+
message.nullValue = object.nullValue ?? void 0;
|
|
1004
|
+
message.numberValue = object.numberValue ?? void 0;
|
|
1005
|
+
message.stringValue = object.stringValue ?? void 0;
|
|
1006
|
+
message.boolValue = object.boolValue ?? void 0;
|
|
1007
|
+
message.structValue = object.structValue ?? void 0;
|
|
1008
|
+
message.listValue = object.listValue ?? void 0;
|
|
1009
|
+
return message;
|
|
1010
|
+
},
|
|
1011
|
+
wrap(value) {
|
|
1012
|
+
const result = createBaseValue();
|
|
1013
|
+
if (value === null) result.nullValue = 0;
|
|
1014
|
+
else if (typeof value === "boolean") result.boolValue = value;
|
|
1015
|
+
else if (typeof value === "number") result.numberValue = value;
|
|
1016
|
+
else if (typeof value === "string") result.stringValue = value;
|
|
1017
|
+
else if (globalThis.Array.isArray(value)) result.listValue = value;
|
|
1018
|
+
else if (typeof value === "object") result.structValue = value;
|
|
1019
|
+
else if (typeof value !== "undefined") throw new globalThis.Error("Unsupported any value type: " + typeof value);
|
|
1020
|
+
return result;
|
|
1021
|
+
},
|
|
1022
|
+
unwrap(message) {
|
|
1023
|
+
if (message.stringValue !== void 0) return message.stringValue;
|
|
1024
|
+
else if (message?.numberValue !== void 0) return message.numberValue;
|
|
1025
|
+
else if (message?.boolValue !== void 0) return message.boolValue;
|
|
1026
|
+
else if (message?.structValue !== void 0) return message.structValue;
|
|
1027
|
+
else if (message?.listValue !== void 0) return message.listValue;
|
|
1028
|
+
else if (message?.nullValue !== void 0) return null;
|
|
1029
|
+
}
|
|
1030
|
+
};
|
|
1031
|
+
function createBaseListValue() {
|
|
1032
|
+
return { values: [] };
|
|
1033
|
+
}
|
|
1034
|
+
var ListValue = {
|
|
1035
|
+
encode(message, writer = new BinaryWriter()) {
|
|
1036
|
+
for (const v of message.values) Value.encode(Value.wrap(v), writer.uint32(10).fork()).join();
|
|
1037
|
+
return writer;
|
|
1038
|
+
},
|
|
1039
|
+
decode(input, length) {
|
|
1040
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1041
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
1042
|
+
const message = createBaseListValue();
|
|
1043
|
+
while (reader.pos < end) {
|
|
1044
|
+
const tag = reader.uint32();
|
|
1045
|
+
switch (tag >>> 3) {
|
|
1046
|
+
case 1:
|
|
1047
|
+
if (tag !== 10) break;
|
|
1048
|
+
message.values.push(Value.unwrap(Value.decode(reader, reader.uint32())));
|
|
1049
|
+
continue;
|
|
1050
|
+
}
|
|
1051
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
1052
|
+
reader.skip(tag & 7);
|
|
1053
|
+
}
|
|
1054
|
+
return message;
|
|
1055
|
+
},
|
|
1056
|
+
fromJSON(object) {
|
|
1057
|
+
return { values: globalThis.Array.isArray(object?.values) ? [...object.values] : [] };
|
|
1058
|
+
},
|
|
1059
|
+
toJSON(message) {
|
|
1060
|
+
const obj = {};
|
|
1061
|
+
if (message.values?.length) obj.values = message.values;
|
|
1062
|
+
return obj;
|
|
1063
|
+
},
|
|
1064
|
+
create(base) {
|
|
1065
|
+
return ListValue.fromPartial(base ?? {});
|
|
1066
|
+
},
|
|
1067
|
+
fromPartial(object) {
|
|
1068
|
+
const message = createBaseListValue();
|
|
1069
|
+
message.values = object.values?.map((e) => e) || [];
|
|
1070
|
+
return message;
|
|
1071
|
+
},
|
|
1072
|
+
wrap(array) {
|
|
1073
|
+
const result = createBaseListValue();
|
|
1074
|
+
result.values = array ?? [];
|
|
1075
|
+
return result;
|
|
1076
|
+
},
|
|
1077
|
+
unwrap(message) {
|
|
1078
|
+
if (message?.hasOwnProperty("values") && globalThis.Array.isArray(message.values)) return message.values;
|
|
1079
|
+
else return message;
|
|
1080
|
+
}
|
|
1081
|
+
};
|
|
1082
|
+
function isObject$2(value) {
|
|
1083
|
+
return typeof value === "object" && value !== null;
|
|
1084
|
+
}
|
|
1085
|
+
function isSet$1(value) {
|
|
1086
|
+
return value !== null && value !== void 0;
|
|
1087
|
+
}
|
|
1088
|
+
//#endregion
|
|
1089
|
+
//#region generated/driveningress/v2/driveningress.ts
|
|
1090
|
+
var MessageType = /* @__PURE__ */ function(MessageType) {
|
|
1091
|
+
MessageType[MessageType["MESSAGE_UNSPECIFIED"] = 0] = "MESSAGE_UNSPECIFIED";
|
|
1092
|
+
/** MESSAGE_CLIENT_CONFIGURE_SESSION - 协商会话参数 */
|
|
1093
|
+
MessageType[MessageType["MESSAGE_CLIENT_CONFIGURE_SESSION"] = 1] = "MESSAGE_CLIENT_CONFIGURE_SESSION";
|
|
1094
|
+
/** MESSAGE_SERVER_CONFIRM_SESSION - 确认协商成功 */
|
|
1095
|
+
MessageType[MessageType["MESSAGE_SERVER_CONFIRM_SESSION"] = 2] = "MESSAGE_SERVER_CONFIRM_SESSION";
|
|
1096
|
+
MessageType[MessageType["MESSAGE_CLIENT_AUDIO_INPUT"] = 3] = "MESSAGE_CLIENT_AUDIO_INPUT";
|
|
1097
|
+
MessageType[MessageType["MESSAGE_SERVER_ERROR"] = 4] = "MESSAGE_SERVER_ERROR";
|
|
1098
|
+
MessageType[MessageType["MESSAGE_SERVER_RESPONSE_ANIMATION"] = 5] = "MESSAGE_SERVER_RESPONSE_ANIMATION";
|
|
1099
|
+
/** MESSAGE_CLIENT_DRIVEN_CONFIG - 驱动配置消息 */
|
|
1100
|
+
MessageType[MessageType["MESSAGE_CLIENT_DRIVEN_CONFIG"] = 6] = "MESSAGE_CLIENT_DRIVEN_CONFIG";
|
|
1101
|
+
/** MESSAGE_CLIENT_INTERRUPT - 打断 */
|
|
1102
|
+
MessageType[MessageType["MESSAGE_CLIENT_INTERRUPT"] = 7] = "MESSAGE_CLIENT_INTERRUPT";
|
|
1103
|
+
MessageType[MessageType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
1104
|
+
return MessageType;
|
|
1105
|
+
}({});
|
|
1106
|
+
function messageTypeFromJSON(object) {
|
|
1107
|
+
switch (object) {
|
|
1108
|
+
case 0:
|
|
1109
|
+
case "MESSAGE_UNSPECIFIED": return 0;
|
|
1110
|
+
case 1:
|
|
1111
|
+
case "MESSAGE_CLIENT_CONFIGURE_SESSION": return 1;
|
|
1112
|
+
case 2:
|
|
1113
|
+
case "MESSAGE_SERVER_CONFIRM_SESSION": return 2;
|
|
1114
|
+
case 3:
|
|
1115
|
+
case "MESSAGE_CLIENT_AUDIO_INPUT": return 3;
|
|
1116
|
+
case 4:
|
|
1117
|
+
case "MESSAGE_SERVER_ERROR": return 4;
|
|
1118
|
+
case 5:
|
|
1119
|
+
case "MESSAGE_SERVER_RESPONSE_ANIMATION": return 5;
|
|
1120
|
+
case 6:
|
|
1121
|
+
case "MESSAGE_CLIENT_DRIVEN_CONFIG": return 6;
|
|
1122
|
+
case 7:
|
|
1123
|
+
case "MESSAGE_CLIENT_INTERRUPT": return 7;
|
|
1124
|
+
default: return -1;
|
|
1125
|
+
}
|
|
1126
|
+
}
|
|
1127
|
+
function messageTypeToJSON(object) {
|
|
1128
|
+
switch (object) {
|
|
1129
|
+
case 0: return "MESSAGE_UNSPECIFIED";
|
|
1130
|
+
case 1: return "MESSAGE_CLIENT_CONFIGURE_SESSION";
|
|
1131
|
+
case 2: return "MESSAGE_SERVER_CONFIRM_SESSION";
|
|
1132
|
+
case 3: return "MESSAGE_CLIENT_AUDIO_INPUT";
|
|
1133
|
+
case 4: return "MESSAGE_SERVER_ERROR";
|
|
1134
|
+
case 5: return "MESSAGE_SERVER_RESPONSE_ANIMATION";
|
|
1135
|
+
case 6: return "MESSAGE_CLIENT_DRIVEN_CONFIG";
|
|
1136
|
+
case 7: return "MESSAGE_CLIENT_INTERRUPT";
|
|
1137
|
+
default: return "UNRECOGNIZED";
|
|
1138
|
+
}
|
|
1139
|
+
}
|
|
1140
|
+
var AudioFormat = /* @__PURE__ */ function(AudioFormat) {
|
|
1141
|
+
AudioFormat[AudioFormat["AUDIO_FORMAT_PCM_S16LE"] = 0] = "AUDIO_FORMAT_PCM_S16LE";
|
|
1142
|
+
AudioFormat[AudioFormat["AUDIO_FORMAT_OGG_OPUS"] = 1] = "AUDIO_FORMAT_OGG_OPUS";
|
|
1143
|
+
AudioFormat[AudioFormat["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
1144
|
+
return AudioFormat;
|
|
1145
|
+
}({});
|
|
1146
|
+
function audioFormatFromJSON(object) {
|
|
1147
|
+
switch (object) {
|
|
1148
|
+
case 0:
|
|
1149
|
+
case "AUDIO_FORMAT_PCM_S16LE": return 0;
|
|
1150
|
+
case 1:
|
|
1151
|
+
case "AUDIO_FORMAT_OGG_OPUS": return 1;
|
|
1152
|
+
default: return -1;
|
|
1153
|
+
}
|
|
1154
|
+
}
|
|
1155
|
+
function audioFormatToJSON(object) {
|
|
1156
|
+
switch (object) {
|
|
1157
|
+
case 0: return "AUDIO_FORMAT_PCM_S16LE";
|
|
1158
|
+
case 1: return "AUDIO_FORMAT_OGG_OPUS";
|
|
1159
|
+
default: return "UNRECOGNIZED";
|
|
1160
|
+
}
|
|
1161
|
+
}
|
|
1162
|
+
var TransportCompression = /* @__PURE__ */ function(TransportCompression) {
|
|
1163
|
+
TransportCompression[TransportCompression["TRANSPORT_COMPRESSION_NONE"] = 0] = "TRANSPORT_COMPRESSION_NONE";
|
|
1164
|
+
TransportCompression[TransportCompression["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
1165
|
+
return TransportCompression;
|
|
1166
|
+
}({});
|
|
1167
|
+
function transportCompressionFromJSON(object) {
|
|
1168
|
+
switch (object) {
|
|
1169
|
+
case 0:
|
|
1170
|
+
case "TRANSPORT_COMPRESSION_NONE": return 0;
|
|
1171
|
+
default: return -1;
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1174
|
+
function transportCompressionToJSON(object) {
|
|
1175
|
+
switch (object) {
|
|
1176
|
+
case 0: return "TRANSPORT_COMPRESSION_NONE";
|
|
1177
|
+
default: return "UNRECOGNIZED";
|
|
1178
|
+
}
|
|
1179
|
+
}
|
|
1180
|
+
/** EgressType specifies how animation and audio data should be delivered */
|
|
1181
|
+
var EgressType = /* @__PURE__ */ function(EgressType) {
|
|
1182
|
+
/** EGRESS_TYPE_UNSPECIFIED - Default: return animation data via WebSocket */
|
|
1183
|
+
EgressType[EgressType["EGRESS_TYPE_UNSPECIFIED"] = 0] = "EGRESS_TYPE_UNSPECIFIED";
|
|
1184
|
+
/** EGRESS_TYPE_LIVEKIT - Stream to LiveKit room via egress service */
|
|
1185
|
+
EgressType[EgressType["EGRESS_TYPE_LIVEKIT"] = 1] = "EGRESS_TYPE_LIVEKIT";
|
|
1186
|
+
/** EGRESS_TYPE_AGORA - Stream to Agora channel via egress service */
|
|
1187
|
+
EgressType[EgressType["EGRESS_TYPE_AGORA"] = 2] = "EGRESS_TYPE_AGORA";
|
|
1188
|
+
EgressType[EgressType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
1189
|
+
return EgressType;
|
|
1190
|
+
}({});
|
|
1191
|
+
function egressTypeFromJSON(object) {
|
|
1192
|
+
switch (object) {
|
|
1193
|
+
case 0:
|
|
1194
|
+
case "EGRESS_TYPE_UNSPECIFIED": return 0;
|
|
1195
|
+
case 1:
|
|
1196
|
+
case "EGRESS_TYPE_LIVEKIT": return 1;
|
|
1197
|
+
case 2:
|
|
1198
|
+
case "EGRESS_TYPE_AGORA": return 2;
|
|
1199
|
+
default: return -1;
|
|
1200
|
+
}
|
|
1201
|
+
}
|
|
1202
|
+
function egressTypeToJSON(object) {
|
|
1203
|
+
switch (object) {
|
|
1204
|
+
case 0: return "EGRESS_TYPE_UNSPECIFIED";
|
|
1205
|
+
case 1: return "EGRESS_TYPE_LIVEKIT";
|
|
1206
|
+
case 2: return "EGRESS_TYPE_AGORA";
|
|
1207
|
+
default: return "UNRECOGNIZED";
|
|
1208
|
+
}
|
|
1209
|
+
}
|
|
1210
|
+
function createBaseLiveKitEgressConfig() {
|
|
1211
|
+
return {
|
|
1212
|
+
url: "",
|
|
1213
|
+
apiKey: "",
|
|
1214
|
+
apiSecret: "",
|
|
1215
|
+
roomName: "",
|
|
1216
|
+
publisherId: "",
|
|
1217
|
+
extraAttributes: {},
|
|
1218
|
+
idleTimeout: 0,
|
|
1219
|
+
apiToken: ""
|
|
1220
|
+
};
|
|
1221
|
+
}
|
|
1222
|
+
var LiveKitEgressConfig = {
|
|
1223
|
+
encode(message, writer = new BinaryWriter()) {
|
|
1224
|
+
if (message.url !== "") writer.uint32(10).string(message.url);
|
|
1225
|
+
if (message.apiKey !== "") writer.uint32(18).string(message.apiKey);
|
|
1226
|
+
if (message.apiSecret !== "") writer.uint32(26).string(message.apiSecret);
|
|
1227
|
+
if (message.roomName !== "") writer.uint32(34).string(message.roomName);
|
|
1228
|
+
if (message.publisherId !== "") writer.uint32(42).string(message.publisherId);
|
|
1229
|
+
globalThis.Object.entries(message.extraAttributes).forEach(([key, value]) => {
|
|
1230
|
+
LiveKitEgressConfig_ExtraAttributesEntry.encode({
|
|
1231
|
+
key,
|
|
1232
|
+
value
|
|
1233
|
+
}, writer.uint32(50).fork()).join();
|
|
1234
|
+
});
|
|
1235
|
+
if (message.idleTimeout !== 0) writer.uint32(56).int32(message.idleTimeout);
|
|
1236
|
+
if (message.apiToken !== "") writer.uint32(66).string(message.apiToken);
|
|
1237
|
+
return writer;
|
|
1238
|
+
},
|
|
1239
|
+
decode(input, length) {
|
|
1240
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1241
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
1242
|
+
const message = createBaseLiveKitEgressConfig();
|
|
1243
|
+
while (reader.pos < end) {
|
|
1244
|
+
const tag = reader.uint32();
|
|
1245
|
+
switch (tag >>> 3) {
|
|
1246
|
+
case 1:
|
|
1247
|
+
if (tag !== 10) break;
|
|
1248
|
+
message.url = reader.string();
|
|
1249
|
+
continue;
|
|
1250
|
+
case 2:
|
|
1251
|
+
if (tag !== 18) break;
|
|
1252
|
+
message.apiKey = reader.string();
|
|
1253
|
+
continue;
|
|
1254
|
+
case 3:
|
|
1255
|
+
if (tag !== 26) break;
|
|
1256
|
+
message.apiSecret = reader.string();
|
|
1257
|
+
continue;
|
|
1258
|
+
case 4:
|
|
1259
|
+
if (tag !== 34) break;
|
|
1260
|
+
message.roomName = reader.string();
|
|
1261
|
+
continue;
|
|
1262
|
+
case 5:
|
|
1263
|
+
if (tag !== 42) break;
|
|
1264
|
+
message.publisherId = reader.string();
|
|
1265
|
+
continue;
|
|
1266
|
+
case 6: {
|
|
1267
|
+
if (tag !== 50) break;
|
|
1268
|
+
const entry6 = LiveKitEgressConfig_ExtraAttributesEntry.decode(reader, reader.uint32());
|
|
1269
|
+
if (entry6.value !== void 0) message.extraAttributes[entry6.key] = entry6.value;
|
|
1270
|
+
continue;
|
|
1271
|
+
}
|
|
1272
|
+
case 7:
|
|
1273
|
+
if (tag !== 56) break;
|
|
1274
|
+
message.idleTimeout = reader.int32();
|
|
1275
|
+
continue;
|
|
1276
|
+
case 8:
|
|
1277
|
+
if (tag !== 66) break;
|
|
1278
|
+
message.apiToken = reader.string();
|
|
1279
|
+
continue;
|
|
1280
|
+
}
|
|
1281
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
1282
|
+
reader.skip(tag & 7);
|
|
1283
|
+
}
|
|
1284
|
+
return message;
|
|
1285
|
+
},
|
|
1286
|
+
fromJSON(object) {
|
|
1287
|
+
return {
|
|
1288
|
+
url: isSet(object.url) ? globalThis.String(object.url) : "",
|
|
1289
|
+
apiKey: isSet(object.apiKey) ? globalThis.String(object.apiKey) : isSet(object.api_key) ? globalThis.String(object.api_key) : "",
|
|
1290
|
+
apiSecret: isSet(object.apiSecret) ? globalThis.String(object.apiSecret) : isSet(object.api_secret) ? globalThis.String(object.api_secret) : "",
|
|
1291
|
+
roomName: isSet(object.roomName) ? globalThis.String(object.roomName) : isSet(object.room_name) ? globalThis.String(object.room_name) : "",
|
|
1292
|
+
publisherId: isSet(object.publisherId) ? globalThis.String(object.publisherId) : isSet(object.publisher_id) ? globalThis.String(object.publisher_id) : "",
|
|
1293
|
+
extraAttributes: isObject$1(object.extraAttributes) ? globalThis.Object.entries(object.extraAttributes).reduce((acc, [key, value]) => {
|
|
1294
|
+
acc[key] = globalThis.String(value);
|
|
1295
|
+
return acc;
|
|
1296
|
+
}, {}) : isObject$1(object.extra_attributes) ? globalThis.Object.entries(object.extra_attributes).reduce((acc, [key, value]) => {
|
|
1297
|
+
acc[key] = globalThis.String(value);
|
|
1298
|
+
return acc;
|
|
1299
|
+
}, {}) : {},
|
|
1300
|
+
idleTimeout: isSet(object.idleTimeout) ? globalThis.Number(object.idleTimeout) : isSet(object.idle_timeout) ? globalThis.Number(object.idle_timeout) : 0,
|
|
1301
|
+
apiToken: isSet(object.apiToken) ? globalThis.String(object.apiToken) : isSet(object.api_token) ? globalThis.String(object.api_token) : ""
|
|
1302
|
+
};
|
|
1303
|
+
},
|
|
1304
|
+
toJSON(message) {
|
|
1305
|
+
const obj = {};
|
|
1306
|
+
if (message.url !== "") obj.url = message.url;
|
|
1307
|
+
if (message.apiKey !== "") obj.apiKey = message.apiKey;
|
|
1308
|
+
if (message.apiSecret !== "") obj.apiSecret = message.apiSecret;
|
|
1309
|
+
if (message.roomName !== "") obj.roomName = message.roomName;
|
|
1310
|
+
if (message.publisherId !== "") obj.publisherId = message.publisherId;
|
|
1311
|
+
if (message.extraAttributes) {
|
|
1312
|
+
const entries = globalThis.Object.entries(message.extraAttributes);
|
|
1313
|
+
if (entries.length > 0) {
|
|
1314
|
+
obj.extraAttributes = {};
|
|
1315
|
+
entries.forEach(([k, v]) => {
|
|
1316
|
+
obj.extraAttributes[k] = v;
|
|
1317
|
+
});
|
|
1318
|
+
}
|
|
1319
|
+
}
|
|
1320
|
+
if (message.idleTimeout !== 0) obj.idleTimeout = Math.round(message.idleTimeout);
|
|
1321
|
+
if (message.apiToken !== "") obj.apiToken = message.apiToken;
|
|
1322
|
+
return obj;
|
|
1323
|
+
},
|
|
1324
|
+
create(base) {
|
|
1325
|
+
return LiveKitEgressConfig.fromPartial(base ?? {});
|
|
1326
|
+
},
|
|
1327
|
+
fromPartial(object) {
|
|
1328
|
+
const message = createBaseLiveKitEgressConfig();
|
|
1329
|
+
message.url = object.url ?? "";
|
|
1330
|
+
message.apiKey = object.apiKey ?? "";
|
|
1331
|
+
message.apiSecret = object.apiSecret ?? "";
|
|
1332
|
+
message.roomName = object.roomName ?? "";
|
|
1333
|
+
message.publisherId = object.publisherId ?? "";
|
|
1334
|
+
message.extraAttributes = globalThis.Object.entries(object.extraAttributes ?? {}).reduce((acc, [key, value]) => {
|
|
1335
|
+
if (value !== void 0) acc[key] = globalThis.String(value);
|
|
1336
|
+
return acc;
|
|
1337
|
+
}, {});
|
|
1338
|
+
message.idleTimeout = object.idleTimeout ?? 0;
|
|
1339
|
+
message.apiToken = object.apiToken ?? "";
|
|
1340
|
+
return message;
|
|
1341
|
+
}
|
|
1342
|
+
};
|
|
1343
|
+
function createBaseLiveKitEgressConfig_ExtraAttributesEntry() {
|
|
1344
|
+
return {
|
|
1345
|
+
key: "",
|
|
1346
|
+
value: ""
|
|
1347
|
+
};
|
|
1348
|
+
}
|
|
1349
|
+
var LiveKitEgressConfig_ExtraAttributesEntry = {
|
|
1350
|
+
encode(message, writer = new BinaryWriter()) {
|
|
1351
|
+
if (message.key !== "") writer.uint32(10).string(message.key);
|
|
1352
|
+
if (message.value !== "") writer.uint32(18).string(message.value);
|
|
1353
|
+
return writer;
|
|
1354
|
+
},
|
|
1355
|
+
decode(input, length) {
|
|
1356
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1357
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
1358
|
+
const message = createBaseLiveKitEgressConfig_ExtraAttributesEntry();
|
|
1359
|
+
while (reader.pos < end) {
|
|
1360
|
+
const tag = reader.uint32();
|
|
1361
|
+
switch (tag >>> 3) {
|
|
1362
|
+
case 1:
|
|
1363
|
+
if (tag !== 10) break;
|
|
1364
|
+
message.key = reader.string();
|
|
1365
|
+
continue;
|
|
1366
|
+
case 2:
|
|
1367
|
+
if (tag !== 18) break;
|
|
1368
|
+
message.value = reader.string();
|
|
1369
|
+
continue;
|
|
1370
|
+
}
|
|
1371
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
1372
|
+
reader.skip(tag & 7);
|
|
1373
|
+
}
|
|
1374
|
+
return message;
|
|
1375
|
+
},
|
|
1376
|
+
fromJSON(object) {
|
|
1377
|
+
return {
|
|
1378
|
+
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
1379
|
+
value: isSet(object.value) ? globalThis.String(object.value) : ""
|
|
1380
|
+
};
|
|
1381
|
+
},
|
|
1382
|
+
toJSON(message) {
|
|
1383
|
+
const obj = {};
|
|
1384
|
+
if (message.key !== "") obj.key = message.key;
|
|
1385
|
+
if (message.value !== "") obj.value = message.value;
|
|
1386
|
+
return obj;
|
|
1387
|
+
},
|
|
1388
|
+
create(base) {
|
|
1389
|
+
return LiveKitEgressConfig_ExtraAttributesEntry.fromPartial(base ?? {});
|
|
1390
|
+
},
|
|
1391
|
+
fromPartial(object) {
|
|
1392
|
+
const message = createBaseLiveKitEgressConfig_ExtraAttributesEntry();
|
|
1393
|
+
message.key = object.key ?? "";
|
|
1394
|
+
message.value = object.value ?? "";
|
|
1395
|
+
return message;
|
|
1396
|
+
}
|
|
1397
|
+
};
|
|
1398
|
+
function createBaseAgoraEgressConfig() {
|
|
1399
|
+
return {
|
|
1400
|
+
channelName: "",
|
|
1401
|
+
token: "",
|
|
1402
|
+
uid: 0,
|
|
1403
|
+
publisherId: ""
|
|
1404
|
+
};
|
|
1405
|
+
}
|
|
1406
|
+
var AgoraEgressConfig = {
|
|
1407
|
+
encode(message, writer = new BinaryWriter()) {
|
|
1408
|
+
if (message.channelName !== "") writer.uint32(10).string(message.channelName);
|
|
1409
|
+
if (message.token !== "") writer.uint32(18).string(message.token);
|
|
1410
|
+
if (message.uid !== 0) writer.uint32(24).uint32(message.uid);
|
|
1411
|
+
if (message.publisherId !== "") writer.uint32(34).string(message.publisherId);
|
|
1412
|
+
return writer;
|
|
1413
|
+
},
|
|
1414
|
+
decode(input, length) {
|
|
1415
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1416
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
1417
|
+
const message = createBaseAgoraEgressConfig();
|
|
1418
|
+
while (reader.pos < end) {
|
|
1419
|
+
const tag = reader.uint32();
|
|
1420
|
+
switch (tag >>> 3) {
|
|
1421
|
+
case 1:
|
|
1422
|
+
if (tag !== 10) break;
|
|
1423
|
+
message.channelName = reader.string();
|
|
1424
|
+
continue;
|
|
1425
|
+
case 2:
|
|
1426
|
+
if (tag !== 18) break;
|
|
1427
|
+
message.token = reader.string();
|
|
1428
|
+
continue;
|
|
1429
|
+
case 3:
|
|
1430
|
+
if (tag !== 24) break;
|
|
1431
|
+
message.uid = reader.uint32();
|
|
1432
|
+
continue;
|
|
1433
|
+
case 4:
|
|
1434
|
+
if (tag !== 34) break;
|
|
1435
|
+
message.publisherId = reader.string();
|
|
1436
|
+
continue;
|
|
1437
|
+
}
|
|
1438
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
1439
|
+
reader.skip(tag & 7);
|
|
1440
|
+
}
|
|
1441
|
+
return message;
|
|
1442
|
+
},
|
|
1443
|
+
fromJSON(object) {
|
|
1444
|
+
return {
|
|
1445
|
+
channelName: isSet(object.channelName) ? globalThis.String(object.channelName) : isSet(object.channel_name) ? globalThis.String(object.channel_name) : "",
|
|
1446
|
+
token: isSet(object.token) ? globalThis.String(object.token) : "",
|
|
1447
|
+
uid: isSet(object.uid) ? globalThis.Number(object.uid) : 0,
|
|
1448
|
+
publisherId: isSet(object.publisherId) ? globalThis.String(object.publisherId) : isSet(object.publisher_id) ? globalThis.String(object.publisher_id) : ""
|
|
1449
|
+
};
|
|
1450
|
+
},
|
|
1451
|
+
toJSON(message) {
|
|
1452
|
+
const obj = {};
|
|
1453
|
+
if (message.channelName !== "") obj.channelName = message.channelName;
|
|
1454
|
+
if (message.token !== "") obj.token = message.token;
|
|
1455
|
+
if (message.uid !== 0) obj.uid = Math.round(message.uid);
|
|
1456
|
+
if (message.publisherId !== "") obj.publisherId = message.publisherId;
|
|
1457
|
+
return obj;
|
|
1458
|
+
},
|
|
1459
|
+
create(base) {
|
|
1460
|
+
return AgoraEgressConfig.fromPartial(base ?? {});
|
|
1461
|
+
},
|
|
1462
|
+
fromPartial(object) {
|
|
1463
|
+
const message = createBaseAgoraEgressConfig();
|
|
1464
|
+
message.channelName = object.channelName ?? "";
|
|
1465
|
+
message.token = object.token ?? "";
|
|
1466
|
+
message.uid = object.uid ?? 0;
|
|
1467
|
+
message.publisherId = object.publisherId ?? "";
|
|
1468
|
+
return message;
|
|
1469
|
+
}
|
|
1470
|
+
};
|
|
1471
|
+
function createBaseDrivenIngressConfig() {
|
|
1472
|
+
return {
|
|
1473
|
+
shapeNpy: /* @__PURE__ */ new Uint8Array(0),
|
|
1474
|
+
styleNpy: /* @__PURE__ */ new Uint8Array(0),
|
|
1475
|
+
drivenServerUrl: "",
|
|
1476
|
+
modelSettings: void 0,
|
|
1477
|
+
encoderStartFrame: 0
|
|
1478
|
+
};
|
|
1479
|
+
}
|
|
1480
|
+
var DrivenIngressConfig = {
|
|
1481
|
+
encode(message, writer = new BinaryWriter()) {
|
|
1482
|
+
if (message.shapeNpy.length !== 0) writer.uint32(10).bytes(message.shapeNpy);
|
|
1483
|
+
if (message.styleNpy.length !== 0) writer.uint32(18).bytes(message.styleNpy);
|
|
1484
|
+
if (message.drivenServerUrl !== "") writer.uint32(26).string(message.drivenServerUrl);
|
|
1485
|
+
if (message.modelSettings !== void 0) Struct.encode(Struct.wrap(message.modelSettings), writer.uint32(34).fork()).join();
|
|
1486
|
+
if (message.encoderStartFrame !== 0) writer.uint32(40).int32(message.encoderStartFrame);
|
|
1487
|
+
return writer;
|
|
1488
|
+
},
|
|
1489
|
+
decode(input, length) {
|
|
1490
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1491
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
1492
|
+
const message = createBaseDrivenIngressConfig();
|
|
1493
|
+
while (reader.pos < end) {
|
|
1494
|
+
const tag = reader.uint32();
|
|
1495
|
+
switch (tag >>> 3) {
|
|
1496
|
+
case 1:
|
|
1497
|
+
if (tag !== 10) break;
|
|
1498
|
+
message.shapeNpy = reader.bytes();
|
|
1499
|
+
continue;
|
|
1500
|
+
case 2:
|
|
1501
|
+
if (tag !== 18) break;
|
|
1502
|
+
message.styleNpy = reader.bytes();
|
|
1503
|
+
continue;
|
|
1504
|
+
case 3:
|
|
1505
|
+
if (tag !== 26) break;
|
|
1506
|
+
message.drivenServerUrl = reader.string();
|
|
1507
|
+
continue;
|
|
1508
|
+
case 4:
|
|
1509
|
+
if (tag !== 34) break;
|
|
1510
|
+
message.modelSettings = Struct.unwrap(Struct.decode(reader, reader.uint32()));
|
|
1511
|
+
continue;
|
|
1512
|
+
case 5:
|
|
1513
|
+
if (tag !== 40) break;
|
|
1514
|
+
message.encoderStartFrame = reader.int32();
|
|
1515
|
+
continue;
|
|
1516
|
+
}
|
|
1517
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
1518
|
+
reader.skip(tag & 7);
|
|
1519
|
+
}
|
|
1520
|
+
return message;
|
|
1521
|
+
},
|
|
1522
|
+
fromJSON(object) {
|
|
1523
|
+
return {
|
|
1524
|
+
shapeNpy: isSet(object.shapeNpy) ? bytesFromBase64(object.shapeNpy) : isSet(object.shape_npy) ? bytesFromBase64(object.shape_npy) : /* @__PURE__ */ new Uint8Array(0),
|
|
1525
|
+
styleNpy: isSet(object.styleNpy) ? bytesFromBase64(object.styleNpy) : isSet(object.style_npy) ? bytesFromBase64(object.style_npy) : /* @__PURE__ */ new Uint8Array(0),
|
|
1526
|
+
drivenServerUrl: isSet(object.drivenServerUrl) ? globalThis.String(object.drivenServerUrl) : isSet(object.driven_server_url) ? globalThis.String(object.driven_server_url) : "",
|
|
1527
|
+
modelSettings: isObject$1(object.modelSettings) ? object.modelSettings : isObject$1(object.model_settings) ? object.model_settings : void 0,
|
|
1528
|
+
encoderStartFrame: isSet(object.encoderStartFrame) ? globalThis.Number(object.encoderStartFrame) : isSet(object.encoder_start_frame) ? globalThis.Number(object.encoder_start_frame) : 0
|
|
1529
|
+
};
|
|
1530
|
+
},
|
|
1531
|
+
toJSON(message) {
|
|
1532
|
+
const obj = {};
|
|
1533
|
+
if (message.shapeNpy.length !== 0) obj.shapeNpy = base64FromBytes(message.shapeNpy);
|
|
1534
|
+
if (message.styleNpy.length !== 0) obj.styleNpy = base64FromBytes(message.styleNpy);
|
|
1535
|
+
if (message.drivenServerUrl !== "") obj.drivenServerUrl = message.drivenServerUrl;
|
|
1536
|
+
if (message.modelSettings !== void 0) obj.modelSettings = message.modelSettings;
|
|
1537
|
+
if (message.encoderStartFrame !== 0) obj.encoderStartFrame = Math.round(message.encoderStartFrame);
|
|
1538
|
+
return obj;
|
|
1539
|
+
},
|
|
1540
|
+
create(base) {
|
|
1541
|
+
return DrivenIngressConfig.fromPartial(base ?? {});
|
|
1542
|
+
},
|
|
1543
|
+
fromPartial(object) {
|
|
1544
|
+
const message = createBaseDrivenIngressConfig();
|
|
1545
|
+
message.shapeNpy = object.shapeNpy ?? /* @__PURE__ */ new Uint8Array(0);
|
|
1546
|
+
message.styleNpy = object.styleNpy ?? /* @__PURE__ */ new Uint8Array(0);
|
|
1547
|
+
message.drivenServerUrl = object.drivenServerUrl ?? "";
|
|
1548
|
+
message.modelSettings = object.modelSettings ?? void 0;
|
|
1549
|
+
message.encoderStartFrame = object.encoderStartFrame ?? 0;
|
|
1550
|
+
return message;
|
|
1551
|
+
}
|
|
1552
|
+
};
|
|
1553
|
+
function createBaseClientConfigureSession() {
|
|
1554
|
+
return {
|
|
1555
|
+
sampleRate: 0,
|
|
1556
|
+
bitrate: 0,
|
|
1557
|
+
audioFormat: 0,
|
|
1558
|
+
transportCompression: 0,
|
|
1559
|
+
egressType: 0,
|
|
1560
|
+
livekitEgress: void 0,
|
|
1561
|
+
agoraEgress: void 0
|
|
1562
|
+
};
|
|
1563
|
+
}
|
|
1564
|
+
var ClientConfigureSession = {
|
|
1565
|
+
encode(message, writer = new BinaryWriter()) {
|
|
1566
|
+
if (message.sampleRate !== 0) writer.uint32(8).int32(message.sampleRate);
|
|
1567
|
+
if (message.bitrate !== 0) writer.uint32(16).int32(message.bitrate);
|
|
1568
|
+
if (message.audioFormat !== 0) writer.uint32(24).int32(message.audioFormat);
|
|
1569
|
+
if (message.transportCompression !== 0) writer.uint32(32).int32(message.transportCompression);
|
|
1570
|
+
if (message.egressType !== 0) writer.uint32(40).int32(message.egressType);
|
|
1571
|
+
if (message.livekitEgress !== void 0) LiveKitEgressConfig.encode(message.livekitEgress, writer.uint32(50).fork()).join();
|
|
1572
|
+
if (message.agoraEgress !== void 0) AgoraEgressConfig.encode(message.agoraEgress, writer.uint32(58).fork()).join();
|
|
1573
|
+
return writer;
|
|
1574
|
+
},
|
|
1575
|
+
decode(input, length) {
|
|
1576
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1577
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
1578
|
+
const message = createBaseClientConfigureSession();
|
|
1579
|
+
while (reader.pos < end) {
|
|
1580
|
+
const tag = reader.uint32();
|
|
1581
|
+
switch (tag >>> 3) {
|
|
1582
|
+
case 1:
|
|
1583
|
+
if (tag !== 8) break;
|
|
1584
|
+
message.sampleRate = reader.int32();
|
|
1585
|
+
continue;
|
|
1586
|
+
case 2:
|
|
1587
|
+
if (tag !== 16) break;
|
|
1588
|
+
message.bitrate = reader.int32();
|
|
1589
|
+
continue;
|
|
1590
|
+
case 3:
|
|
1591
|
+
if (tag !== 24) break;
|
|
1592
|
+
message.audioFormat = reader.int32();
|
|
1593
|
+
continue;
|
|
1594
|
+
case 4:
|
|
1595
|
+
if (tag !== 32) break;
|
|
1596
|
+
message.transportCompression = reader.int32();
|
|
1597
|
+
continue;
|
|
1598
|
+
case 5:
|
|
1599
|
+
if (tag !== 40) break;
|
|
1600
|
+
message.egressType = reader.int32();
|
|
1601
|
+
continue;
|
|
1602
|
+
case 6:
|
|
1603
|
+
if (tag !== 50) break;
|
|
1604
|
+
message.livekitEgress = LiveKitEgressConfig.decode(reader, reader.uint32());
|
|
1605
|
+
continue;
|
|
1606
|
+
case 7:
|
|
1607
|
+
if (tag !== 58) break;
|
|
1608
|
+
message.agoraEgress = AgoraEgressConfig.decode(reader, reader.uint32());
|
|
1609
|
+
continue;
|
|
1610
|
+
}
|
|
1611
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
1612
|
+
reader.skip(tag & 7);
|
|
1613
|
+
}
|
|
1614
|
+
return message;
|
|
1615
|
+
},
|
|
1616
|
+
fromJSON(object) {
|
|
1617
|
+
return {
|
|
1618
|
+
sampleRate: isSet(object.sampleRate) ? globalThis.Number(object.sampleRate) : isSet(object.sample_rate) ? globalThis.Number(object.sample_rate) : 0,
|
|
1619
|
+
bitrate: isSet(object.bitrate) ? globalThis.Number(object.bitrate) : 0,
|
|
1620
|
+
audioFormat: isSet(object.audioFormat) ? audioFormatFromJSON(object.audioFormat) : isSet(object.audio_format) ? audioFormatFromJSON(object.audio_format) : 0,
|
|
1621
|
+
transportCompression: isSet(object.transportCompression) ? transportCompressionFromJSON(object.transportCompression) : isSet(object.transport_compression) ? transportCompressionFromJSON(object.transport_compression) : 0,
|
|
1622
|
+
egressType: isSet(object.egressType) ? egressTypeFromJSON(object.egressType) : isSet(object.egress_type) ? egressTypeFromJSON(object.egress_type) : 0,
|
|
1623
|
+
livekitEgress: isSet(object.livekitEgress) ? LiveKitEgressConfig.fromJSON(object.livekitEgress) : isSet(object.livekit_egress) ? LiveKitEgressConfig.fromJSON(object.livekit_egress) : void 0,
|
|
1624
|
+
agoraEgress: isSet(object.agoraEgress) ? AgoraEgressConfig.fromJSON(object.agoraEgress) : isSet(object.agora_egress) ? AgoraEgressConfig.fromJSON(object.agora_egress) : void 0
|
|
1625
|
+
};
|
|
1626
|
+
},
|
|
1627
|
+
toJSON(message) {
|
|
1628
|
+
const obj = {};
|
|
1629
|
+
if (message.sampleRate !== 0) obj.sampleRate = Math.round(message.sampleRate);
|
|
1630
|
+
if (message.bitrate !== 0) obj.bitrate = Math.round(message.bitrate);
|
|
1631
|
+
if (message.audioFormat !== 0) obj.audioFormat = audioFormatToJSON(message.audioFormat);
|
|
1632
|
+
if (message.transportCompression !== 0) obj.transportCompression = transportCompressionToJSON(message.transportCompression);
|
|
1633
|
+
if (message.egressType !== 0) obj.egressType = egressTypeToJSON(message.egressType);
|
|
1634
|
+
if (message.livekitEgress !== void 0) obj.livekitEgress = LiveKitEgressConfig.toJSON(message.livekitEgress);
|
|
1635
|
+
if (message.agoraEgress !== void 0) obj.agoraEgress = AgoraEgressConfig.toJSON(message.agoraEgress);
|
|
1636
|
+
return obj;
|
|
1637
|
+
},
|
|
1638
|
+
create(base) {
|
|
1639
|
+
return ClientConfigureSession.fromPartial(base ?? {});
|
|
1640
|
+
},
|
|
1641
|
+
fromPartial(object) {
|
|
1642
|
+
const message = createBaseClientConfigureSession();
|
|
1643
|
+
message.sampleRate = object.sampleRate ?? 0;
|
|
1644
|
+
message.bitrate = object.bitrate ?? 0;
|
|
1645
|
+
message.audioFormat = object.audioFormat ?? 0;
|
|
1646
|
+
message.transportCompression = object.transportCompression ?? 0;
|
|
1647
|
+
message.egressType = object.egressType ?? 0;
|
|
1648
|
+
message.livekitEgress = object.livekitEgress !== void 0 && object.livekitEgress !== null ? LiveKitEgressConfig.fromPartial(object.livekitEgress) : void 0;
|
|
1649
|
+
message.agoraEgress = object.agoraEgress !== void 0 && object.agoraEgress !== null ? AgoraEgressConfig.fromPartial(object.agoraEgress) : void 0;
|
|
1650
|
+
return message;
|
|
1651
|
+
}
|
|
1652
|
+
};
|
|
1653
|
+
function createBaseServerConfirmSession() {
|
|
1654
|
+
return { connectionId: "" };
|
|
1655
|
+
}
|
|
1656
|
+
var ServerConfirmSession = {
|
|
1657
|
+
encode(message, writer = new BinaryWriter()) {
|
|
1658
|
+
if (message.connectionId !== "") writer.uint32(10).string(message.connectionId);
|
|
1659
|
+
return writer;
|
|
1660
|
+
},
|
|
1661
|
+
decode(input, length) {
|
|
1662
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1663
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
1664
|
+
const message = createBaseServerConfirmSession();
|
|
1665
|
+
while (reader.pos < end) {
|
|
1666
|
+
const tag = reader.uint32();
|
|
1667
|
+
switch (tag >>> 3) {
|
|
1668
|
+
case 1:
|
|
1669
|
+
if (tag !== 10) break;
|
|
1670
|
+
message.connectionId = reader.string();
|
|
1671
|
+
continue;
|
|
1672
|
+
}
|
|
1673
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
1674
|
+
reader.skip(tag & 7);
|
|
1675
|
+
}
|
|
1676
|
+
return message;
|
|
1677
|
+
},
|
|
1678
|
+
fromJSON(object) {
|
|
1679
|
+
return { connectionId: isSet(object.connectionId) ? globalThis.String(object.connectionId) : isSet(object.connection_id) ? globalThis.String(object.connection_id) : "" };
|
|
1680
|
+
},
|
|
1681
|
+
toJSON(message) {
|
|
1682
|
+
const obj = {};
|
|
1683
|
+
if (message.connectionId !== "") obj.connectionId = message.connectionId;
|
|
1684
|
+
return obj;
|
|
1685
|
+
},
|
|
1686
|
+
create(base) {
|
|
1687
|
+
return ServerConfirmSession.fromPartial(base ?? {});
|
|
1688
|
+
},
|
|
1689
|
+
fromPartial(object) {
|
|
1690
|
+
const message = createBaseServerConfirmSession();
|
|
1691
|
+
message.connectionId = object.connectionId ?? "";
|
|
1692
|
+
return message;
|
|
1693
|
+
}
|
|
1694
|
+
};
|
|
1695
|
+
function createBaseTraceContext() {
|
|
1696
|
+
return {
|
|
1697
|
+
traceparent: "",
|
|
1698
|
+
tracestate: ""
|
|
1699
|
+
};
|
|
1700
|
+
}
|
|
1701
|
+
var TraceContext = {
|
|
1702
|
+
encode(message, writer = new BinaryWriter()) {
|
|
1703
|
+
if (message.traceparent !== "") writer.uint32(10).string(message.traceparent);
|
|
1704
|
+
if (message.tracestate !== "") writer.uint32(18).string(message.tracestate);
|
|
1705
|
+
return writer;
|
|
1706
|
+
},
|
|
1707
|
+
decode(input, length) {
|
|
1708
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1709
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
1710
|
+
const message = createBaseTraceContext();
|
|
1711
|
+
while (reader.pos < end) {
|
|
1712
|
+
const tag = reader.uint32();
|
|
1713
|
+
switch (tag >>> 3) {
|
|
1714
|
+
case 1:
|
|
1715
|
+
if (tag !== 10) break;
|
|
1716
|
+
message.traceparent = reader.string();
|
|
1717
|
+
continue;
|
|
1718
|
+
case 2:
|
|
1719
|
+
if (tag !== 18) break;
|
|
1720
|
+
message.tracestate = reader.string();
|
|
1721
|
+
continue;
|
|
1722
|
+
}
|
|
1723
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
1724
|
+
reader.skip(tag & 7);
|
|
1725
|
+
}
|
|
1726
|
+
return message;
|
|
1727
|
+
},
|
|
1728
|
+
fromJSON(object) {
|
|
1729
|
+
return {
|
|
1730
|
+
traceparent: isSet(object.traceparent) ? globalThis.String(object.traceparent) : "",
|
|
1731
|
+
tracestate: isSet(object.tracestate) ? globalThis.String(object.tracestate) : ""
|
|
1732
|
+
};
|
|
1733
|
+
},
|
|
1734
|
+
toJSON(message) {
|
|
1735
|
+
const obj = {};
|
|
1736
|
+
if (message.traceparent !== "") obj.traceparent = message.traceparent;
|
|
1737
|
+
if (message.tracestate !== "") obj.tracestate = message.tracestate;
|
|
1738
|
+
return obj;
|
|
1739
|
+
},
|
|
1740
|
+
create(base) {
|
|
1741
|
+
return TraceContext.fromPartial(base ?? {});
|
|
1742
|
+
},
|
|
1743
|
+
fromPartial(object) {
|
|
1744
|
+
const message = createBaseTraceContext();
|
|
1745
|
+
message.traceparent = object.traceparent ?? "";
|
|
1746
|
+
message.tracestate = object.tracestate ?? "";
|
|
1747
|
+
return message;
|
|
1748
|
+
}
|
|
1749
|
+
};
|
|
1750
|
+
function createBaseClientAudioInput() {
|
|
1751
|
+
return {
|
|
1752
|
+
reqId: "",
|
|
1753
|
+
end: false,
|
|
1754
|
+
audio: /* @__PURE__ */ new Uint8Array(0),
|
|
1755
|
+
traceContext: void 0
|
|
1756
|
+
};
|
|
1757
|
+
}
|
|
1758
|
+
var ClientAudioInput = {
|
|
1759
|
+
encode(message, writer = new BinaryWriter()) {
|
|
1760
|
+
if (message.reqId !== "") writer.uint32(10).string(message.reqId);
|
|
1761
|
+
if (message.end !== false) writer.uint32(16).bool(message.end);
|
|
1762
|
+
if (message.audio.length !== 0) writer.uint32(26).bytes(message.audio);
|
|
1763
|
+
if (message.traceContext !== void 0) TraceContext.encode(message.traceContext, writer.uint32(34).fork()).join();
|
|
1764
|
+
return writer;
|
|
1765
|
+
},
|
|
1766
|
+
decode(input, length) {
|
|
1767
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1768
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
1769
|
+
const message = createBaseClientAudioInput();
|
|
1770
|
+
while (reader.pos < end) {
|
|
1771
|
+
const tag = reader.uint32();
|
|
1772
|
+
switch (tag >>> 3) {
|
|
1773
|
+
case 1:
|
|
1774
|
+
if (tag !== 10) break;
|
|
1775
|
+
message.reqId = reader.string();
|
|
1776
|
+
continue;
|
|
1777
|
+
case 2:
|
|
1778
|
+
if (tag !== 16) break;
|
|
1779
|
+
message.end = reader.bool();
|
|
1780
|
+
continue;
|
|
1781
|
+
case 3:
|
|
1782
|
+
if (tag !== 26) break;
|
|
1783
|
+
message.audio = reader.bytes();
|
|
1784
|
+
continue;
|
|
1785
|
+
case 4:
|
|
1786
|
+
if (tag !== 34) break;
|
|
1787
|
+
message.traceContext = TraceContext.decode(reader, reader.uint32());
|
|
1788
|
+
continue;
|
|
1789
|
+
}
|
|
1790
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
1791
|
+
reader.skip(tag & 7);
|
|
1792
|
+
}
|
|
1793
|
+
return message;
|
|
1794
|
+
},
|
|
1795
|
+
fromJSON(object) {
|
|
1796
|
+
return {
|
|
1797
|
+
reqId: isSet(object.reqId) ? globalThis.String(object.reqId) : isSet(object.req_id) ? globalThis.String(object.req_id) : "",
|
|
1798
|
+
end: isSet(object.end) ? globalThis.Boolean(object.end) : false,
|
|
1799
|
+
audio: isSet(object.audio) ? bytesFromBase64(object.audio) : /* @__PURE__ */ new Uint8Array(0),
|
|
1800
|
+
traceContext: isSet(object.traceContext) ? TraceContext.fromJSON(object.traceContext) : isSet(object.trace_context) ? TraceContext.fromJSON(object.trace_context) : void 0
|
|
1801
|
+
};
|
|
1802
|
+
},
|
|
1803
|
+
toJSON(message) {
|
|
1804
|
+
const obj = {};
|
|
1805
|
+
if (message.reqId !== "") obj.reqId = message.reqId;
|
|
1806
|
+
if (message.end !== false) obj.end = message.end;
|
|
1807
|
+
if (message.audio.length !== 0) obj.audio = base64FromBytes(message.audio);
|
|
1808
|
+
if (message.traceContext !== void 0) obj.traceContext = TraceContext.toJSON(message.traceContext);
|
|
1809
|
+
return obj;
|
|
1810
|
+
},
|
|
1811
|
+
create(base) {
|
|
1812
|
+
return ClientAudioInput.fromPartial(base ?? {});
|
|
1813
|
+
},
|
|
1814
|
+
fromPartial(object) {
|
|
1815
|
+
const message = createBaseClientAudioInput();
|
|
1816
|
+
message.reqId = object.reqId ?? "";
|
|
1817
|
+
message.end = object.end ?? false;
|
|
1818
|
+
message.audio = object.audio ?? /* @__PURE__ */ new Uint8Array(0);
|
|
1819
|
+
message.traceContext = object.traceContext !== void 0 && object.traceContext !== null ? TraceContext.fromPartial(object.traceContext) : void 0;
|
|
1820
|
+
return message;
|
|
1821
|
+
}
|
|
1822
|
+
};
|
|
1823
|
+
function createBaseServerError() {
|
|
1824
|
+
return {
|
|
1825
|
+
connectionId: "",
|
|
1826
|
+
reqId: "",
|
|
1827
|
+
code: 0,
|
|
1828
|
+
message: ""
|
|
1829
|
+
};
|
|
1830
|
+
}
|
|
1831
|
+
var ServerError = {
|
|
1832
|
+
encode(message, writer = new BinaryWriter()) {
|
|
1833
|
+
if (message.connectionId !== "") writer.uint32(10).string(message.connectionId);
|
|
1834
|
+
if (message.reqId !== "") writer.uint32(18).string(message.reqId);
|
|
1835
|
+
if (message.code !== 0) writer.uint32(24).int32(message.code);
|
|
1836
|
+
if (message.message !== "") writer.uint32(34).string(message.message);
|
|
1837
|
+
return writer;
|
|
1838
|
+
},
|
|
1839
|
+
decode(input, length) {
|
|
1840
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1841
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
1842
|
+
const message = createBaseServerError();
|
|
1843
|
+
while (reader.pos < end) {
|
|
1844
|
+
const tag = reader.uint32();
|
|
1845
|
+
switch (tag >>> 3) {
|
|
1846
|
+
case 1:
|
|
1847
|
+
if (tag !== 10) break;
|
|
1848
|
+
message.connectionId = reader.string();
|
|
1849
|
+
continue;
|
|
1850
|
+
case 2:
|
|
1851
|
+
if (tag !== 18) break;
|
|
1852
|
+
message.reqId = reader.string();
|
|
1853
|
+
continue;
|
|
1854
|
+
case 3:
|
|
1855
|
+
if (tag !== 24) break;
|
|
1856
|
+
message.code = reader.int32();
|
|
1857
|
+
continue;
|
|
1858
|
+
case 4:
|
|
1859
|
+
if (tag !== 34) break;
|
|
1860
|
+
message.message = reader.string();
|
|
1861
|
+
continue;
|
|
1862
|
+
}
|
|
1863
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
1864
|
+
reader.skip(tag & 7);
|
|
1865
|
+
}
|
|
1866
|
+
return message;
|
|
1867
|
+
},
|
|
1868
|
+
fromJSON(object) {
|
|
1869
|
+
return {
|
|
1870
|
+
connectionId: isSet(object.connectionId) ? globalThis.String(object.connectionId) : isSet(object.connection_id) ? globalThis.String(object.connection_id) : "",
|
|
1871
|
+
reqId: isSet(object.reqId) ? globalThis.String(object.reqId) : isSet(object.req_id) ? globalThis.String(object.req_id) : "",
|
|
1872
|
+
code: isSet(object.code) ? globalThis.Number(object.code) : 0,
|
|
1873
|
+
message: isSet(object.message) ? globalThis.String(object.message) : ""
|
|
1874
|
+
};
|
|
1875
|
+
},
|
|
1876
|
+
toJSON(message) {
|
|
1877
|
+
const obj = {};
|
|
1878
|
+
if (message.connectionId !== "") obj.connectionId = message.connectionId;
|
|
1879
|
+
if (message.reqId !== "") obj.reqId = message.reqId;
|
|
1880
|
+
if (message.code !== 0) obj.code = Math.round(message.code);
|
|
1881
|
+
if (message.message !== "") obj.message = message.message;
|
|
1882
|
+
return obj;
|
|
1883
|
+
},
|
|
1884
|
+
create(base) {
|
|
1885
|
+
return ServerError.fromPartial(base ?? {});
|
|
1886
|
+
},
|
|
1887
|
+
fromPartial(object) {
|
|
1888
|
+
const message = createBaseServerError();
|
|
1889
|
+
message.connectionId = object.connectionId ?? "";
|
|
1890
|
+
message.reqId = object.reqId ?? "";
|
|
1891
|
+
message.code = object.code ?? 0;
|
|
1892
|
+
message.message = object.message ?? "";
|
|
1893
|
+
return message;
|
|
1894
|
+
}
|
|
1895
|
+
};
|
|
1896
|
+
function createBaseFlame() {
|
|
1897
|
+
return {
|
|
1898
|
+
translation: [],
|
|
1899
|
+
rotation: [],
|
|
1900
|
+
neckPose: [],
|
|
1901
|
+
jawPose: [],
|
|
1902
|
+
eyePose: [],
|
|
1903
|
+
eyeLid: [],
|
|
1904
|
+
expression: []
|
|
1905
|
+
};
|
|
1906
|
+
}
|
|
1907
|
+
var Flame = {
|
|
1908
|
+
encode(message, writer = new BinaryWriter()) {
|
|
1909
|
+
writer.uint32(10).fork();
|
|
1910
|
+
for (const v of message.translation) writer.float(v);
|
|
1911
|
+
writer.join();
|
|
1912
|
+
writer.uint32(18).fork();
|
|
1913
|
+
for (const v of message.rotation) writer.float(v);
|
|
1914
|
+
writer.join();
|
|
1915
|
+
writer.uint32(26).fork();
|
|
1916
|
+
for (const v of message.neckPose) writer.float(v);
|
|
1917
|
+
writer.join();
|
|
1918
|
+
writer.uint32(34).fork();
|
|
1919
|
+
for (const v of message.jawPose) writer.float(v);
|
|
1920
|
+
writer.join();
|
|
1921
|
+
writer.uint32(42).fork();
|
|
1922
|
+
for (const v of message.eyePose) writer.float(v);
|
|
1923
|
+
writer.join();
|
|
1924
|
+
writer.uint32(50).fork();
|
|
1925
|
+
for (const v of message.eyeLid) writer.float(v);
|
|
1926
|
+
writer.join();
|
|
1927
|
+
writer.uint32(58).fork();
|
|
1928
|
+
for (const v of message.expression) writer.float(v);
|
|
1929
|
+
writer.join();
|
|
1930
|
+
return writer;
|
|
1931
|
+
},
|
|
1932
|
+
decode(input, length) {
|
|
1933
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1934
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
1935
|
+
const message = createBaseFlame();
|
|
1936
|
+
while (reader.pos < end) {
|
|
1937
|
+
const tag = reader.uint32();
|
|
1938
|
+
switch (tag >>> 3) {
|
|
1939
|
+
case 1:
|
|
1940
|
+
if (tag === 13) {
|
|
1941
|
+
message.translation.push(reader.float());
|
|
1942
|
+
continue;
|
|
1943
|
+
}
|
|
1944
|
+
if (tag === 10) {
|
|
1945
|
+
const end2 = reader.uint32() + reader.pos;
|
|
1946
|
+
while (reader.pos < end2) message.translation.push(reader.float());
|
|
1947
|
+
continue;
|
|
1948
|
+
}
|
|
1949
|
+
break;
|
|
1950
|
+
case 2:
|
|
1951
|
+
if (tag === 21) {
|
|
1952
|
+
message.rotation.push(reader.float());
|
|
1953
|
+
continue;
|
|
1954
|
+
}
|
|
1955
|
+
if (tag === 18) {
|
|
1956
|
+
const end2 = reader.uint32() + reader.pos;
|
|
1957
|
+
while (reader.pos < end2) message.rotation.push(reader.float());
|
|
1958
|
+
continue;
|
|
1959
|
+
}
|
|
1960
|
+
break;
|
|
1961
|
+
case 3:
|
|
1962
|
+
if (tag === 29) {
|
|
1963
|
+
message.neckPose.push(reader.float());
|
|
1964
|
+
continue;
|
|
1965
|
+
}
|
|
1966
|
+
if (tag === 26) {
|
|
1967
|
+
const end2 = reader.uint32() + reader.pos;
|
|
1968
|
+
while (reader.pos < end2) message.neckPose.push(reader.float());
|
|
1969
|
+
continue;
|
|
1970
|
+
}
|
|
1971
|
+
break;
|
|
1972
|
+
case 4:
|
|
1973
|
+
if (tag === 37) {
|
|
1974
|
+
message.jawPose.push(reader.float());
|
|
1975
|
+
continue;
|
|
1976
|
+
}
|
|
1977
|
+
if (tag === 34) {
|
|
1978
|
+
const end2 = reader.uint32() + reader.pos;
|
|
1979
|
+
while (reader.pos < end2) message.jawPose.push(reader.float());
|
|
1980
|
+
continue;
|
|
1981
|
+
}
|
|
1982
|
+
break;
|
|
1983
|
+
case 5:
|
|
1984
|
+
if (tag === 45) {
|
|
1985
|
+
message.eyePose.push(reader.float());
|
|
1986
|
+
continue;
|
|
1987
|
+
}
|
|
1988
|
+
if (tag === 42) {
|
|
1989
|
+
const end2 = reader.uint32() + reader.pos;
|
|
1990
|
+
while (reader.pos < end2) message.eyePose.push(reader.float());
|
|
1991
|
+
continue;
|
|
1992
|
+
}
|
|
1993
|
+
break;
|
|
1994
|
+
case 6:
|
|
1995
|
+
if (tag === 53) {
|
|
1996
|
+
message.eyeLid.push(reader.float());
|
|
1997
|
+
continue;
|
|
1998
|
+
}
|
|
1999
|
+
if (tag === 50) {
|
|
2000
|
+
const end2 = reader.uint32() + reader.pos;
|
|
2001
|
+
while (reader.pos < end2) message.eyeLid.push(reader.float());
|
|
2002
|
+
continue;
|
|
2003
|
+
}
|
|
2004
|
+
break;
|
|
2005
|
+
case 7:
|
|
2006
|
+
if (tag === 61) {
|
|
2007
|
+
message.expression.push(reader.float());
|
|
2008
|
+
continue;
|
|
2009
|
+
}
|
|
2010
|
+
if (tag === 58) {
|
|
2011
|
+
const end2 = reader.uint32() + reader.pos;
|
|
2012
|
+
while (reader.pos < end2) message.expression.push(reader.float());
|
|
2013
|
+
continue;
|
|
2014
|
+
}
|
|
2015
|
+
break;
|
|
2016
|
+
}
|
|
2017
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
2018
|
+
reader.skip(tag & 7);
|
|
2019
|
+
}
|
|
2020
|
+
return message;
|
|
2021
|
+
},
|
|
2022
|
+
fromJSON(object) {
|
|
2023
|
+
return {
|
|
2024
|
+
translation: globalThis.Array.isArray(object?.translation) ? object.translation.map((e) => globalThis.Number(e)) : [],
|
|
2025
|
+
rotation: globalThis.Array.isArray(object?.rotation) ? object.rotation.map((e) => globalThis.Number(e)) : [],
|
|
2026
|
+
neckPose: globalThis.Array.isArray(object?.neckPose) ? object.neckPose.map((e) => globalThis.Number(e)) : globalThis.Array.isArray(object?.neck_pose) ? object.neck_pose.map((e) => globalThis.Number(e)) : [],
|
|
2027
|
+
jawPose: globalThis.Array.isArray(object?.jawPose) ? object.jawPose.map((e) => globalThis.Number(e)) : globalThis.Array.isArray(object?.jaw_pose) ? object.jaw_pose.map((e) => globalThis.Number(e)) : [],
|
|
2028
|
+
eyePose: globalThis.Array.isArray(object?.eyePose) ? object.eyePose.map((e) => globalThis.Number(e)) : globalThis.Array.isArray(object?.eye_pose) ? object.eye_pose.map((e) => globalThis.Number(e)) : [],
|
|
2029
|
+
eyeLid: globalThis.Array.isArray(object?.eyeLid) ? object.eyeLid.map((e) => globalThis.Number(e)) : globalThis.Array.isArray(object?.eye_lid) ? object.eye_lid.map((e) => globalThis.Number(e)) : [],
|
|
2030
|
+
expression: globalThis.Array.isArray(object?.expression) ? object.expression.map((e) => globalThis.Number(e)) : []
|
|
2031
|
+
};
|
|
2032
|
+
},
|
|
2033
|
+
toJSON(message) {
|
|
2034
|
+
const obj = {};
|
|
2035
|
+
if (message.translation?.length) obj.translation = message.translation;
|
|
2036
|
+
if (message.rotation?.length) obj.rotation = message.rotation;
|
|
2037
|
+
if (message.neckPose?.length) obj.neckPose = message.neckPose;
|
|
2038
|
+
if (message.jawPose?.length) obj.jawPose = message.jawPose;
|
|
2039
|
+
if (message.eyePose?.length) obj.eyePose = message.eyePose;
|
|
2040
|
+
if (message.eyeLid?.length) obj.eyeLid = message.eyeLid;
|
|
2041
|
+
if (message.expression?.length) obj.expression = message.expression;
|
|
2042
|
+
return obj;
|
|
2043
|
+
},
|
|
2044
|
+
create(base) {
|
|
2045
|
+
return Flame.fromPartial(base ?? {});
|
|
2046
|
+
},
|
|
2047
|
+
fromPartial(object) {
|
|
2048
|
+
const message = createBaseFlame();
|
|
2049
|
+
message.translation = object.translation?.map((e) => e) || [];
|
|
2050
|
+
message.rotation = object.rotation?.map((e) => e) || [];
|
|
2051
|
+
message.neckPose = object.neckPose?.map((e) => e) || [];
|
|
2052
|
+
message.jawPose = object.jawPose?.map((e) => e) || [];
|
|
2053
|
+
message.eyePose = object.eyePose?.map((e) => e) || [];
|
|
2054
|
+
message.eyeLid = object.eyeLid?.map((e) => e) || [];
|
|
2055
|
+
message.expression = object.expression?.map((e) => e) || [];
|
|
2056
|
+
return message;
|
|
2057
|
+
}
|
|
2058
|
+
};
|
|
2059
|
+
function createBaseFlameAnimation() {
|
|
2060
|
+
return { keyframes: [] };
|
|
2061
|
+
}
|
|
2062
|
+
var FlameAnimation = {
|
|
2063
|
+
encode(message, writer = new BinaryWriter()) {
|
|
2064
|
+
for (const v of message.keyframes) Flame.encode(v, writer.uint32(10).fork()).join();
|
|
2065
|
+
return writer;
|
|
2066
|
+
},
|
|
2067
|
+
decode(input, length) {
|
|
2068
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2069
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
2070
|
+
const message = createBaseFlameAnimation();
|
|
2071
|
+
while (reader.pos < end) {
|
|
2072
|
+
const tag = reader.uint32();
|
|
2073
|
+
switch (tag >>> 3) {
|
|
2074
|
+
case 1:
|
|
2075
|
+
if (tag !== 10) break;
|
|
2076
|
+
message.keyframes.push(Flame.decode(reader, reader.uint32()));
|
|
2077
|
+
continue;
|
|
2078
|
+
}
|
|
2079
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
2080
|
+
reader.skip(tag & 7);
|
|
2081
|
+
}
|
|
2082
|
+
return message;
|
|
2083
|
+
},
|
|
2084
|
+
fromJSON(object) {
|
|
2085
|
+
return { keyframes: globalThis.Array.isArray(object?.keyframes) ? object.keyframes.map((e) => Flame.fromJSON(e)) : [] };
|
|
2086
|
+
},
|
|
2087
|
+
toJSON(message) {
|
|
2088
|
+
const obj = {};
|
|
2089
|
+
if (message.keyframes?.length) obj.keyframes = message.keyframes.map((e) => Flame.toJSON(e));
|
|
2090
|
+
return obj;
|
|
2091
|
+
},
|
|
2092
|
+
create(base) {
|
|
2093
|
+
return FlameAnimation.fromPartial(base ?? {});
|
|
2094
|
+
},
|
|
2095
|
+
fromPartial(object) {
|
|
2096
|
+
const message = createBaseFlameAnimation();
|
|
2097
|
+
message.keyframes = object.keyframes?.map((e) => Flame.fromPartial(e)) || [];
|
|
2098
|
+
return message;
|
|
2099
|
+
}
|
|
2100
|
+
};
|
|
2101
|
+
function createBaseServerResponseAnimation() {
|
|
2102
|
+
return {
|
|
2103
|
+
connectionId: "",
|
|
2104
|
+
reqId: "",
|
|
2105
|
+
end: false,
|
|
2106
|
+
animation: void 0,
|
|
2107
|
+
avatarId: "",
|
|
2108
|
+
traceContext: void 0
|
|
2109
|
+
};
|
|
2110
|
+
}
|
|
2111
|
+
var ServerResponseAnimation = {
|
|
2112
|
+
encode(message, writer = new BinaryWriter()) {
|
|
2113
|
+
if (message.connectionId !== "") writer.uint32(10).string(message.connectionId);
|
|
2114
|
+
if (message.reqId !== "") writer.uint32(18).string(message.reqId);
|
|
2115
|
+
if (message.end !== false) writer.uint32(24).bool(message.end);
|
|
2116
|
+
if (message.animation !== void 0) FlameAnimation.encode(message.animation, writer.uint32(34).fork()).join();
|
|
2117
|
+
if (message.avatarId !== "") writer.uint32(42).string(message.avatarId);
|
|
2118
|
+
if (message.traceContext !== void 0) TraceContext.encode(message.traceContext, writer.uint32(50).fork()).join();
|
|
2119
|
+
return writer;
|
|
2120
|
+
},
|
|
2121
|
+
decode(input, length) {
|
|
2122
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2123
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
2124
|
+
const message = createBaseServerResponseAnimation();
|
|
2125
|
+
while (reader.pos < end) {
|
|
2126
|
+
const tag = reader.uint32();
|
|
2127
|
+
switch (tag >>> 3) {
|
|
2128
|
+
case 1:
|
|
2129
|
+
if (tag !== 10) break;
|
|
2130
|
+
message.connectionId = reader.string();
|
|
2131
|
+
continue;
|
|
2132
|
+
case 2:
|
|
2133
|
+
if (tag !== 18) break;
|
|
2134
|
+
message.reqId = reader.string();
|
|
2135
|
+
continue;
|
|
2136
|
+
case 3:
|
|
2137
|
+
if (tag !== 24) break;
|
|
2138
|
+
message.end = reader.bool();
|
|
2139
|
+
continue;
|
|
2140
|
+
case 4:
|
|
2141
|
+
if (tag !== 34) break;
|
|
2142
|
+
message.animation = FlameAnimation.decode(reader, reader.uint32());
|
|
2143
|
+
continue;
|
|
2144
|
+
case 5:
|
|
2145
|
+
if (tag !== 42) break;
|
|
2146
|
+
message.avatarId = reader.string();
|
|
2147
|
+
continue;
|
|
2148
|
+
case 6:
|
|
2149
|
+
if (tag !== 50) break;
|
|
2150
|
+
message.traceContext = TraceContext.decode(reader, reader.uint32());
|
|
2151
|
+
continue;
|
|
2152
|
+
}
|
|
2153
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
2154
|
+
reader.skip(tag & 7);
|
|
2155
|
+
}
|
|
2156
|
+
return message;
|
|
2157
|
+
},
|
|
2158
|
+
fromJSON(object) {
|
|
2159
|
+
return {
|
|
2160
|
+
connectionId: isSet(object.connectionId) ? globalThis.String(object.connectionId) : isSet(object.connection_id) ? globalThis.String(object.connection_id) : "",
|
|
2161
|
+
reqId: isSet(object.reqId) ? globalThis.String(object.reqId) : isSet(object.req_id) ? globalThis.String(object.req_id) : "",
|
|
2162
|
+
end: isSet(object.end) ? globalThis.Boolean(object.end) : false,
|
|
2163
|
+
animation: isSet(object.animation) ? FlameAnimation.fromJSON(object.animation) : void 0,
|
|
2164
|
+
avatarId: isSet(object.avatarId) ? globalThis.String(object.avatarId) : isSet(object.avatar_id) ? globalThis.String(object.avatar_id) : "",
|
|
2165
|
+
traceContext: isSet(object.traceContext) ? TraceContext.fromJSON(object.traceContext) : isSet(object.trace_context) ? TraceContext.fromJSON(object.trace_context) : void 0
|
|
2166
|
+
};
|
|
2167
|
+
},
|
|
2168
|
+
toJSON(message) {
|
|
2169
|
+
const obj = {};
|
|
2170
|
+
if (message.connectionId !== "") obj.connectionId = message.connectionId;
|
|
2171
|
+
if (message.reqId !== "") obj.reqId = message.reqId;
|
|
2172
|
+
if (message.end !== false) obj.end = message.end;
|
|
2173
|
+
if (message.animation !== void 0) obj.animation = FlameAnimation.toJSON(message.animation);
|
|
2174
|
+
if (message.avatarId !== "") obj.avatarId = message.avatarId;
|
|
2175
|
+
if (message.traceContext !== void 0) obj.traceContext = TraceContext.toJSON(message.traceContext);
|
|
2176
|
+
return obj;
|
|
2177
|
+
},
|
|
2178
|
+
create(base) {
|
|
2179
|
+
return ServerResponseAnimation.fromPartial(base ?? {});
|
|
2180
|
+
},
|
|
2181
|
+
fromPartial(object) {
|
|
2182
|
+
const message = createBaseServerResponseAnimation();
|
|
2183
|
+
message.connectionId = object.connectionId ?? "";
|
|
2184
|
+
message.reqId = object.reqId ?? "";
|
|
2185
|
+
message.end = object.end ?? false;
|
|
2186
|
+
message.animation = object.animation !== void 0 && object.animation !== null ? FlameAnimation.fromPartial(object.animation) : void 0;
|
|
2187
|
+
message.avatarId = object.avatarId ?? "";
|
|
2188
|
+
message.traceContext = object.traceContext !== void 0 && object.traceContext !== null ? TraceContext.fromPartial(object.traceContext) : void 0;
|
|
2189
|
+
return message;
|
|
2190
|
+
}
|
|
2191
|
+
};
|
|
2192
|
+
function createBaseClientInterrupt() {
|
|
2193
|
+
return { reqId: "" };
|
|
2194
|
+
}
|
|
2195
|
+
var ClientInterrupt = {
|
|
2196
|
+
encode(message, writer = new BinaryWriter()) {
|
|
2197
|
+
if (message.reqId !== "") writer.uint32(10).string(message.reqId);
|
|
2198
|
+
return writer;
|
|
2199
|
+
},
|
|
2200
|
+
decode(input, length) {
|
|
2201
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2202
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
2203
|
+
const message = createBaseClientInterrupt();
|
|
2204
|
+
while (reader.pos < end) {
|
|
2205
|
+
const tag = reader.uint32();
|
|
2206
|
+
switch (tag >>> 3) {
|
|
2207
|
+
case 1:
|
|
2208
|
+
if (tag !== 10) break;
|
|
2209
|
+
message.reqId = reader.string();
|
|
2210
|
+
continue;
|
|
2211
|
+
}
|
|
2212
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
2213
|
+
reader.skip(tag & 7);
|
|
2214
|
+
}
|
|
2215
|
+
return message;
|
|
2216
|
+
},
|
|
2217
|
+
fromJSON(object) {
|
|
2218
|
+
return { reqId: isSet(object.reqId) ? globalThis.String(object.reqId) : isSet(object.req_id) ? globalThis.String(object.req_id) : "" };
|
|
2219
|
+
},
|
|
2220
|
+
toJSON(message) {
|
|
2221
|
+
const obj = {};
|
|
2222
|
+
if (message.reqId !== "") obj.reqId = message.reqId;
|
|
2223
|
+
return obj;
|
|
2224
|
+
},
|
|
2225
|
+
create(base) {
|
|
2226
|
+
return ClientInterrupt.fromPartial(base ?? {});
|
|
2227
|
+
},
|
|
2228
|
+
fromPartial(object) {
|
|
2229
|
+
const message = createBaseClientInterrupt();
|
|
2230
|
+
message.reqId = object.reqId ?? "";
|
|
2231
|
+
return message;
|
|
2232
|
+
}
|
|
2233
|
+
};
|
|
2234
|
+
function createBaseMessage() {
|
|
2235
|
+
return {
|
|
2236
|
+
type: 0,
|
|
2237
|
+
clientConfigureSession: void 0,
|
|
2238
|
+
serverConfirmSession: void 0,
|
|
2239
|
+
clientAudioInput: void 0,
|
|
2240
|
+
serverError: void 0,
|
|
2241
|
+
serverResponseAnimation: void 0,
|
|
2242
|
+
drivenConfig: void 0,
|
|
2243
|
+
clientInterrupt: void 0
|
|
2244
|
+
};
|
|
2245
|
+
}
|
|
2246
|
+
var Message = {
|
|
2247
|
+
encode(message, writer = new BinaryWriter()) {
|
|
2248
|
+
if (message.type !== 0) writer.uint32(8).int32(message.type);
|
|
2249
|
+
if (message.clientConfigureSession !== void 0) ClientConfigureSession.encode(message.clientConfigureSession, writer.uint32(18).fork()).join();
|
|
2250
|
+
if (message.serverConfirmSession !== void 0) ServerConfirmSession.encode(message.serverConfirmSession, writer.uint32(26).fork()).join();
|
|
2251
|
+
if (message.clientAudioInput !== void 0) ClientAudioInput.encode(message.clientAudioInput, writer.uint32(34).fork()).join();
|
|
2252
|
+
if (message.serverError !== void 0) ServerError.encode(message.serverError, writer.uint32(42).fork()).join();
|
|
2253
|
+
if (message.serverResponseAnimation !== void 0) ServerResponseAnimation.encode(message.serverResponseAnimation, writer.uint32(50).fork()).join();
|
|
2254
|
+
if (message.drivenConfig !== void 0) DrivenIngressConfig.encode(message.drivenConfig, writer.uint32(58).fork()).join();
|
|
2255
|
+
if (message.clientInterrupt !== void 0) ClientInterrupt.encode(message.clientInterrupt, writer.uint32(66).fork()).join();
|
|
2256
|
+
return writer;
|
|
2257
|
+
},
|
|
2258
|
+
decode(input, length) {
|
|
2259
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2260
|
+
const end = length === void 0 ? reader.len : reader.pos + length;
|
|
2261
|
+
const message = createBaseMessage();
|
|
2262
|
+
while (reader.pos < end) {
|
|
2263
|
+
const tag = reader.uint32();
|
|
2264
|
+
switch (tag >>> 3) {
|
|
2265
|
+
case 1:
|
|
2266
|
+
if (tag !== 8) break;
|
|
2267
|
+
message.type = reader.int32();
|
|
2268
|
+
continue;
|
|
2269
|
+
case 2:
|
|
2270
|
+
if (tag !== 18) break;
|
|
2271
|
+
message.clientConfigureSession = ClientConfigureSession.decode(reader, reader.uint32());
|
|
2272
|
+
continue;
|
|
2273
|
+
case 3:
|
|
2274
|
+
if (tag !== 26) break;
|
|
2275
|
+
message.serverConfirmSession = ServerConfirmSession.decode(reader, reader.uint32());
|
|
2276
|
+
continue;
|
|
2277
|
+
case 4:
|
|
2278
|
+
if (tag !== 34) break;
|
|
2279
|
+
message.clientAudioInput = ClientAudioInput.decode(reader, reader.uint32());
|
|
2280
|
+
continue;
|
|
2281
|
+
case 5:
|
|
2282
|
+
if (tag !== 42) break;
|
|
2283
|
+
message.serverError = ServerError.decode(reader, reader.uint32());
|
|
2284
|
+
continue;
|
|
2285
|
+
case 6:
|
|
2286
|
+
if (tag !== 50) break;
|
|
2287
|
+
message.serverResponseAnimation = ServerResponseAnimation.decode(reader, reader.uint32());
|
|
2288
|
+
continue;
|
|
2289
|
+
case 7:
|
|
2290
|
+
if (tag !== 58) break;
|
|
2291
|
+
message.drivenConfig = DrivenIngressConfig.decode(reader, reader.uint32());
|
|
2292
|
+
continue;
|
|
2293
|
+
case 8:
|
|
2294
|
+
if (tag !== 66) break;
|
|
2295
|
+
message.clientInterrupt = ClientInterrupt.decode(reader, reader.uint32());
|
|
2296
|
+
continue;
|
|
2297
|
+
}
|
|
2298
|
+
if ((tag & 7) === 4 || tag === 0) break;
|
|
2299
|
+
reader.skip(tag & 7);
|
|
2300
|
+
}
|
|
2301
|
+
return message;
|
|
2302
|
+
},
|
|
2303
|
+
fromJSON(object) {
|
|
2304
|
+
return {
|
|
2305
|
+
type: isSet(object.type) ? messageTypeFromJSON(object.type) : 0,
|
|
2306
|
+
clientConfigureSession: isSet(object.clientConfigureSession) ? ClientConfigureSession.fromJSON(object.clientConfigureSession) : isSet(object.client_configure_session) ? ClientConfigureSession.fromJSON(object.client_configure_session) : void 0,
|
|
2307
|
+
serverConfirmSession: isSet(object.serverConfirmSession) ? ServerConfirmSession.fromJSON(object.serverConfirmSession) : isSet(object.server_confirm_session) ? ServerConfirmSession.fromJSON(object.server_confirm_session) : void 0,
|
|
2308
|
+
clientAudioInput: isSet(object.clientAudioInput) ? ClientAudioInput.fromJSON(object.clientAudioInput) : isSet(object.client_audio_input) ? ClientAudioInput.fromJSON(object.client_audio_input) : void 0,
|
|
2309
|
+
serverError: isSet(object.serverError) ? ServerError.fromJSON(object.serverError) : isSet(object.server_error) ? ServerError.fromJSON(object.server_error) : void 0,
|
|
2310
|
+
serverResponseAnimation: isSet(object.serverResponseAnimation) ? ServerResponseAnimation.fromJSON(object.serverResponseAnimation) : isSet(object.server_response_animation) ? ServerResponseAnimation.fromJSON(object.server_response_animation) : void 0,
|
|
2311
|
+
drivenConfig: isSet(object.drivenConfig) ? DrivenIngressConfig.fromJSON(object.drivenConfig) : isSet(object.driven_config) ? DrivenIngressConfig.fromJSON(object.driven_config) : void 0,
|
|
2312
|
+
clientInterrupt: isSet(object.clientInterrupt) ? ClientInterrupt.fromJSON(object.clientInterrupt) : isSet(object.client_interrupt) ? ClientInterrupt.fromJSON(object.client_interrupt) : void 0
|
|
2313
|
+
};
|
|
2314
|
+
},
|
|
2315
|
+
toJSON(message) {
|
|
2316
|
+
const obj = {};
|
|
2317
|
+
if (message.type !== 0) obj.type = messageTypeToJSON(message.type);
|
|
2318
|
+
if (message.clientConfigureSession !== void 0) obj.clientConfigureSession = ClientConfigureSession.toJSON(message.clientConfigureSession);
|
|
2319
|
+
if (message.serverConfirmSession !== void 0) obj.serverConfirmSession = ServerConfirmSession.toJSON(message.serverConfirmSession);
|
|
2320
|
+
if (message.clientAudioInput !== void 0) obj.clientAudioInput = ClientAudioInput.toJSON(message.clientAudioInput);
|
|
2321
|
+
if (message.serverError !== void 0) obj.serverError = ServerError.toJSON(message.serverError);
|
|
2322
|
+
if (message.serverResponseAnimation !== void 0) obj.serverResponseAnimation = ServerResponseAnimation.toJSON(message.serverResponseAnimation);
|
|
2323
|
+
if (message.drivenConfig !== void 0) obj.drivenConfig = DrivenIngressConfig.toJSON(message.drivenConfig);
|
|
2324
|
+
if (message.clientInterrupt !== void 0) obj.clientInterrupt = ClientInterrupt.toJSON(message.clientInterrupt);
|
|
2325
|
+
return obj;
|
|
2326
|
+
},
|
|
2327
|
+
create(base) {
|
|
2328
|
+
return Message.fromPartial(base ?? {});
|
|
2329
|
+
},
|
|
2330
|
+
fromPartial(object) {
|
|
2331
|
+
const message = createBaseMessage();
|
|
2332
|
+
message.type = object.type ?? 0;
|
|
2333
|
+
message.clientConfigureSession = object.clientConfigureSession !== void 0 && object.clientConfigureSession !== null ? ClientConfigureSession.fromPartial(object.clientConfigureSession) : void 0;
|
|
2334
|
+
message.serverConfirmSession = object.serverConfirmSession !== void 0 && object.serverConfirmSession !== null ? ServerConfirmSession.fromPartial(object.serverConfirmSession) : void 0;
|
|
2335
|
+
message.clientAudioInput = object.clientAudioInput !== void 0 && object.clientAudioInput !== null ? ClientAudioInput.fromPartial(object.clientAudioInput) : void 0;
|
|
2336
|
+
message.serverError = object.serverError !== void 0 && object.serverError !== null ? ServerError.fromPartial(object.serverError) : void 0;
|
|
2337
|
+
message.serverResponseAnimation = object.serverResponseAnimation !== void 0 && object.serverResponseAnimation !== null ? ServerResponseAnimation.fromPartial(object.serverResponseAnimation) : void 0;
|
|
2338
|
+
message.drivenConfig = object.drivenConfig !== void 0 && object.drivenConfig !== null ? DrivenIngressConfig.fromPartial(object.drivenConfig) : void 0;
|
|
2339
|
+
message.clientInterrupt = object.clientInterrupt !== void 0 && object.clientInterrupt !== null ? ClientInterrupt.fromPartial(object.clientInterrupt) : void 0;
|
|
2340
|
+
return message;
|
|
2341
|
+
}
|
|
2342
|
+
};
|
|
2343
|
+
function bytesFromBase64(b64) {
|
|
2344
|
+
const bin = globalThis.atob(b64);
|
|
2345
|
+
const arr = new Uint8Array(bin.length);
|
|
2346
|
+
for (let i = 0; i < bin.length; ++i) arr[i] = bin.charCodeAt(i);
|
|
2347
|
+
return arr;
|
|
2348
|
+
}
|
|
2349
|
+
function base64FromBytes(arr) {
|
|
2350
|
+
const bin = [];
|
|
2351
|
+
arr.forEach((byte) => {
|
|
2352
|
+
bin.push(globalThis.String.fromCharCode(byte));
|
|
2353
|
+
});
|
|
2354
|
+
return globalThis.btoa(bin.join(""));
|
|
2355
|
+
}
|
|
2356
|
+
function isObject$1(value) {
|
|
2357
|
+
return typeof value === "object" && value !== null;
|
|
2358
|
+
}
|
|
2359
|
+
function isSet(value) {
|
|
2360
|
+
return value !== null && value !== void 0;
|
|
2361
|
+
}
|
|
2362
|
+
//#endregion
|
|
2
2363
|
//#region node_modules/.pnpm/@opentelemetry+api@1.9.1/node_modules/@opentelemetry/api/build/esm/baggage/internal/baggage-impl.js
|
|
3
2364
|
var BaggageImpl = class BaggageImpl {
|
|
4
2365
|
constructor(entries) {
|
|
@@ -2282,6 +4643,37 @@ function buildTraceparent(conversationId) {
|
|
|
2282
4643
|
if (!conversationId) return null;
|
|
2283
4644
|
return `00-${conversationIdToTraceId(conversationId)}-${conversationIdToDrivenSpanId(conversationId)}-01`;
|
|
2284
4645
|
}
|
|
4646
|
+
/**
|
|
4647
|
+
* Parse an inbound W3C `traceparent` — the one the driving service stamps on
|
|
4648
|
+
* `ServerResponseAnimation.trace_context`.
|
|
4649
|
+
*
|
|
4650
|
+
* In backend mode the conversation_id is minted locally by the SDK, so the
|
|
4651
|
+
* trace_id derived from it cannot possibly match the server's. This header is the
|
|
4652
|
+
* only thing tying the round's playback trace to the upstream one, so it is
|
|
4653
|
+
* validated strictly rather than trusted: a malformed value would produce a span
|
|
4654
|
+
* the collector silently drops, which is worse than falling back to the derived
|
|
4655
|
+
* trace_id.
|
|
4656
|
+
*
|
|
4657
|
+
* Returns null for anything not matching version 00, `00-<32hex>-<16hex>-<2hex>`,
|
|
4658
|
+
* or carrying an all-zero (W3C-invalid) id.
|
|
4659
|
+
*
|
|
4660
|
+
* @internal
|
|
4661
|
+
*/
|
|
4662
|
+
function parseTraceparent(traceparent) {
|
|
4663
|
+
if (!traceparent) return null;
|
|
4664
|
+
const parts = traceparent.trim().split("-");
|
|
4665
|
+
if (parts.length !== 4) return null;
|
|
4666
|
+
const [version, traceId, spanId, flags] = parts;
|
|
4667
|
+
if (version !== "00") return null;
|
|
4668
|
+
if (!/^[0-9a-f]{32}$/.test(traceId) || /^0+$/.test(traceId)) return null;
|
|
4669
|
+
if (!/^[0-9a-f]{16}$/.test(spanId) || /^0+$/.test(spanId)) return null;
|
|
4670
|
+
if (!/^[0-9a-f]{2}$/.test(flags)) return null;
|
|
4671
|
+
return {
|
|
4672
|
+
traceId,
|
|
4673
|
+
spanId,
|
|
4674
|
+
sampled: (parseInt(flags, 16) & 1) === 1
|
|
4675
|
+
};
|
|
4676
|
+
}
|
|
2285
4677
|
//#endregion
|
|
2286
4678
|
//#region utils/otel-trace.ts
|
|
2287
4679
|
/**
|
|
@@ -2500,21 +4892,25 @@ function startConnectTrace(startTimeMs, attrs = {}) {
|
|
|
2500
4892
|
}
|
|
2501
4893
|
}
|
|
2502
4894
|
/**
|
|
2503
|
-
* 开一条播放 trace。root span 名 `playback`,trace_id
|
|
4895
|
+
* 开一条播放 trace。root span 名 `playback`,trace_id 默认由 conversation_id 确定性派生,
|
|
2504
4896
|
* conversation_id 同时作为 span 属性(无论是否与后端串成一条 trace,都能按它关联查询)。
|
|
2505
4897
|
* @param startTimeMs root span 起点(首包音频 tap_0 的真实时刻,epoch ms);省略则用当前时刻。
|
|
4898
|
+
* @param serverTraceparent 服务端在本轮动画包上带下来的 W3C traceparent,用它替代派生 id
|
|
4899
|
+
* 接上服务端那条 trace。**仅 backend mode 传**:那边 trace 起点在服务端,SDK 是跟随方;
|
|
4900
|
+
* direct mode 起点是 SDK 自己(上行首包已带 traceparent),回传值必然等于派生值,故不传。
|
|
2506
4901
|
* @internal
|
|
2507
4902
|
*/
|
|
2508
|
-
function startPlaybackTrace(conversationId, startTimeMs, attrs = {}) {
|
|
4903
|
+
function startPlaybackTrace(conversationId, startTimeMs, attrs = {}, serverTraceparent) {
|
|
2509
4904
|
if (!tracer || !tracerProvider) return NOOP_TRACE;
|
|
2510
4905
|
if (!conversationId) return NOOP_TRACE;
|
|
2511
4906
|
try {
|
|
2512
|
-
const
|
|
4907
|
+
const inbound = parseTraceparent(serverTraceparent);
|
|
4908
|
+
const traceId = inbound ? inbound.traceId : conversationIdToTraceId(conversationId);
|
|
2513
4909
|
const drivenSpanId = conversationIdToDrivenSpanId(conversationId);
|
|
2514
4910
|
const traceRootCtx = trace.setSpanContext(ROOT_CONTEXT, {
|
|
2515
4911
|
traceId,
|
|
2516
|
-
spanId: randomHex(16),
|
|
2517
|
-
traceFlags: 1,
|
|
4912
|
+
spanId: inbound ? inbound.spanId : randomHex(16),
|
|
4913
|
+
traceFlags: inbound && !inbound.sampled ? 0 : 1,
|
|
2518
4914
|
isRemote: true
|
|
2519
4915
|
});
|
|
2520
4916
|
idGenerator.nextSpanId = drivenSpanId;
|
|
@@ -2608,4 +5004,4 @@ function cleanupOtelTrace() {
|
|
|
2608
5004
|
}
|
|
2609
5005
|
}
|
|
2610
5006
|
//#endregion
|
|
2611
|
-
export { startLoadTrace as a, startInitTrace as i, initializeOtelTrace as n, startPlaybackTrace as o, startConnectTrace as r, buildTraceparent as s, cleanupOtelTrace as t };
|
|
5007
|
+
export { startLoadTrace as a, AudioFormat as c, MessageType as d, TransportCompression as f, startInitTrace as i, EgressType as l, BinaryWriter as m, initializeOtelTrace as n, startPlaybackTrace as o, BinaryReader as p, startConnectTrace as r, buildTraceparent as s, cleanupOtelTrace as t, Message as u };
|