@origonai/web-sdk 0.1.1 → 0.1.2
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/README.md +10 -7
- package/dist/index.d.ts +4 -4
- package/dist/origon-web-sdk.js +616 -575
- package/dist/origon-web-sdk.js.map +1 -1
- package/docs/contract.md +20 -19
- package/package.json +1 -1
package/dist/origon-web-sdk.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
class
|
|
1
|
+
class Jn {
|
|
2
2
|
constructor() {
|
|
3
3
|
this.callbacks = {};
|
|
4
4
|
}
|
|
@@ -51,27 +51,27 @@ class h extends Error {
|
|
|
51
51
|
return new h({ kind: "session", message: t });
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function sn(e) {
|
|
55
55
|
return typeof e == "object" && e !== null && "error" in e && typeof e.error == "object" && e.error !== null && "message" in e.error;
|
|
56
56
|
}
|
|
57
|
-
const k = 8,
|
|
57
|
+
const k = 8, rn = 1048576, L = {
|
|
58
58
|
REQUEST: 1,
|
|
59
59
|
DATA: 2,
|
|
60
60
|
ERROR: 3,
|
|
61
61
|
CANCEL: 4
|
|
62
|
-
},
|
|
62
|
+
}, an = 0;
|
|
63
63
|
class b extends Error {
|
|
64
64
|
constructor(t) {
|
|
65
65
|
super(t), this.name = "OrpcCodecError";
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
class
|
|
68
|
+
class on extends b {
|
|
69
69
|
constructor(t) {
|
|
70
|
-
super(`frame payload too large: ${t} > ${
|
|
70
|
+
super(`frame payload too large: ${t} > ${rn}`), this.name = "OrpcFrameTooLargeError", this.declaredLength = t;
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
const we = new TextEncoder(),
|
|
74
|
-
function
|
|
73
|
+
const we = new TextEncoder(), cn = new TextDecoder("utf-8", { fatal: !0 });
|
|
74
|
+
function es(e, t, n, s) {
|
|
75
75
|
const r = we.encode(e), i = Object.entries(n).map(
|
|
76
76
|
([d, f]) => [we.encode(d), we.encode(f)]
|
|
77
77
|
);
|
|
@@ -79,19 +79,19 @@ function Jn(e, t, n, s) {
|
|
|
79
79
|
for (const [d, f] of i) a += 2 + d.length + 2 + f.length;
|
|
80
80
|
const o = Ve(L.REQUEST, a), l = new DataView(o.buffer);
|
|
81
81
|
let u = k;
|
|
82
|
-
l.setUint16(u, r.length), u += 2, o.set(r, u), u += r.length, l.setBigUint64(u, BigInt(t)), u += 8, o[u++] =
|
|
82
|
+
l.setUint16(u, r.length), u += 2, o.set(r, u), u += r.length, l.setBigUint64(u, BigInt(t)), u += 8, o[u++] = an, l.setUint16(u, i.length), u += 2;
|
|
83
83
|
for (const [d, f] of i)
|
|
84
84
|
l.setUint16(u, d.length), u += 2, o.set(d, u), u += d.length, l.setUint16(u, f.length), u += 2, o.set(f, u), u += f.length;
|
|
85
85
|
return o.set(s, u), o;
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function ts(e) {
|
|
88
88
|
const t = Ve(L.DATA, e.length);
|
|
89
89
|
return t.set(e, k), t;
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function un() {
|
|
92
92
|
return Ve(L.CANCEL, 0);
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function ns(e) {
|
|
95
95
|
if (e.length < k)
|
|
96
96
|
throw new b(`frame shorter than header: ${e.length} < ${k}`);
|
|
97
97
|
const t = e[0];
|
|
@@ -100,15 +100,15 @@ function ts(e) {
|
|
|
100
100
|
const n = new DataView(e.buffer, e.byteOffset, k), s = n.getUint16(2);
|
|
101
101
|
if (s !== 0) throw new b(`non-zero reserved field: ${s}`);
|
|
102
102
|
const r = n.getUint32(4);
|
|
103
|
-
if (r >
|
|
103
|
+
if (r > rn) throw new on(r);
|
|
104
104
|
if (t === L.CANCEL && r !== 0)
|
|
105
105
|
throw new b(`CANCEL payload must be empty: ${r}`);
|
|
106
106
|
return { frameType: t, payloadLen: r };
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function ss(e, t) {
|
|
109
109
|
switch (e) {
|
|
110
110
|
case L.REQUEST: {
|
|
111
|
-
const { path: n, body: s } =
|
|
111
|
+
const { path: n, body: s } = rs(t);
|
|
112
112
|
return { type: "response", path: n, body: s };
|
|
113
113
|
}
|
|
114
114
|
case L.DATA:
|
|
@@ -119,7 +119,7 @@ function ns(e, t) {
|
|
|
119
119
|
const n = new DataView(t.buffer, t.byteOffset, t.byteLength);
|
|
120
120
|
let s;
|
|
121
121
|
try {
|
|
122
|
-
s =
|
|
122
|
+
s = cn.decode(t.subarray(4));
|
|
123
123
|
} catch {
|
|
124
124
|
throw new b("ERROR reason is not valid UTF-8");
|
|
125
125
|
}
|
|
@@ -137,7 +137,7 @@ function Ve(e, t) {
|
|
|
137
137
|
const n = new Uint8Array(k + t), s = new DataView(n.buffer);
|
|
138
138
|
return n[0] = e, n[1] = 0, s.setUint16(2, 0), s.setUint32(4, t), n;
|
|
139
139
|
}
|
|
140
|
-
function
|
|
140
|
+
function rs(e) {
|
|
141
141
|
const t = new DataView(e.buffer, e.byteOffset, e.byteLength);
|
|
142
142
|
let n = 0;
|
|
143
143
|
if (e.length < 2) throw new b("REQUEST payload too short for path_len");
|
|
@@ -148,11 +148,11 @@ function ss(e) {
|
|
|
148
148
|
const r = e.subarray(n, n + s);
|
|
149
149
|
for (const l of r)
|
|
150
150
|
if (!(l >= 65 && l <= 90 || l >= 97 && l <= 122 || l >= 48 && l <= 57 || l === 46 || l === 95 || l === 47)) throw new b("REQUEST path contains an invalid byte");
|
|
151
|
-
const i =
|
|
151
|
+
const i = cn.decode(r);
|
|
152
152
|
if (n += s, n + 11 > e.length) throw new b("REQUEST payload missing fixed tail");
|
|
153
153
|
n += 8;
|
|
154
154
|
const a = e[n++];
|
|
155
|
-
if (a !==
|
|
155
|
+
if (a !== an)
|
|
156
156
|
throw new b(`unsupported response encoding: ${a}`);
|
|
157
157
|
const o = t.getUint16(n);
|
|
158
158
|
n += 2;
|
|
@@ -172,7 +172,7 @@ function ss(e) {
|
|
|
172
172
|
return { path: i, body: e.subarray(n) };
|
|
173
173
|
}
|
|
174
174
|
const ce = /* @__PURE__ */ new Map();
|
|
175
|
-
function
|
|
175
|
+
function at(e) {
|
|
176
176
|
const t = ce.get(e);
|
|
177
177
|
if (t && !t.dead) return t;
|
|
178
178
|
const n = new WebTransport(e), s = { transport: n, dead: !1 };
|
|
@@ -184,33 +184,33 @@ function it(e) {
|
|
|
184
184
|
function ue(e, t) {
|
|
185
185
|
t.dead = !0, ce.get(e) === t && ce.delete(e);
|
|
186
186
|
}
|
|
187
|
-
async function
|
|
187
|
+
async function ot(e) {
|
|
188
188
|
return await e.transport.ready, e.transport.createBidirectionalStream();
|
|
189
189
|
}
|
|
190
|
-
async function
|
|
191
|
-
let n =
|
|
190
|
+
async function is(e, t) {
|
|
191
|
+
let n = at(e), s, r = !1;
|
|
192
192
|
try {
|
|
193
|
-
s = await
|
|
193
|
+
s = await ot(n);
|
|
194
194
|
} catch {
|
|
195
|
-
ue(e, n), r = !0, n =
|
|
195
|
+
ue(e, n), r = !0, n = at(e), s = await ot(n);
|
|
196
196
|
}
|
|
197
197
|
const i = s.writable.getWriter(), a = s.readable.getReader();
|
|
198
198
|
try {
|
|
199
199
|
await i.write(t);
|
|
200
200
|
} catch (o) {
|
|
201
|
-
throw
|
|
201
|
+
throw ct(e, n, o), o;
|
|
202
202
|
}
|
|
203
203
|
return {
|
|
204
204
|
reader: a,
|
|
205
205
|
writer: i,
|
|
206
206
|
reconnected: r,
|
|
207
|
-
sessionFailed: (o) =>
|
|
207
|
+
sessionFailed: (o) => ct(e, n, o)
|
|
208
208
|
};
|
|
209
209
|
}
|
|
210
|
-
function
|
|
210
|
+
function ct(e, t, n) {
|
|
211
211
|
typeof n != "object" && typeof n != "function" || n === null || n.source === "session" && ue(e, t);
|
|
212
212
|
}
|
|
213
|
-
class
|
|
213
|
+
class ut {
|
|
214
214
|
constructor(t) {
|
|
215
215
|
this.reader = t, this.chunks = [], this.available = 0, this.ended = !1;
|
|
216
216
|
}
|
|
@@ -220,12 +220,12 @@ class ct {
|
|
|
220
220
|
throw new b(
|
|
221
221
|
`response FIN truncated frame header: have ${this.available}, need ${k}`
|
|
222
222
|
);
|
|
223
|
-
const t =
|
|
223
|
+
const t = ns(this.peek(k)), n = k + t.payloadLen;
|
|
224
224
|
if (await this.ensure(n), this.available < n)
|
|
225
225
|
throw new b(
|
|
226
226
|
`response FIN truncated frame payload: have ${this.available - k}, need ${t.payloadLen}`
|
|
227
227
|
);
|
|
228
|
-
return this.take(k),
|
|
228
|
+
return this.take(k), ss(t.frameType, this.take(t.payloadLen));
|
|
229
229
|
}
|
|
230
230
|
async cancel(t) {
|
|
231
231
|
await this.reader.cancel(t);
|
|
@@ -282,48 +282,48 @@ const Q = {
|
|
|
282
282
|
CANCELLED: 4,
|
|
283
283
|
/** Streaming DATA exceeds the ingress cap. */
|
|
284
284
|
MESSAGE_TOO_LARGE: 12
|
|
285
|
-
},
|
|
285
|
+
}, as = "DATA frame too large";
|
|
286
286
|
class T extends Error {
|
|
287
287
|
constructor(t, n) {
|
|
288
288
|
super(`orpc error 0x${t.toString(16)}${n ? `: ${n}` : ""}`), this.name = "OrpcError", this.code = t, this.reason = n;
|
|
289
289
|
}
|
|
290
290
|
}
|
|
291
|
-
function
|
|
291
|
+
function os(e) {
|
|
292
292
|
if (typeof e != "object" && typeof e != "function" || e === null) return !1;
|
|
293
293
|
const t = e;
|
|
294
294
|
return t.source === "stream" && Number.isInteger(t.streamErrorCode) && t.streamErrorCode >= 0 && t.streamErrorCode <= 255;
|
|
295
295
|
}
|
|
296
|
-
function
|
|
297
|
-
if (!
|
|
296
|
+
function cs(e) {
|
|
297
|
+
if (!os(e))
|
|
298
298
|
return e instanceof Error || typeof e == "object" && e !== null && "message" in e ? e : new Error(String(e));
|
|
299
|
-
const t = e.streamErrorCode === B.MESSAGE_TOO_LARGE ?
|
|
299
|
+
const t = e.streamErrorCode === B.MESSAGE_TOO_LARGE ? as : `WebTransport stream aborted with code 0x${e.streamErrorCode.toString(16)}`;
|
|
300
300
|
return new T(e.streamErrorCode, t);
|
|
301
301
|
}
|
|
302
|
-
function
|
|
302
|
+
function ln(e, t = "orpc stream cancelled") {
|
|
303
303
|
if (typeof WebTransportError < "u")
|
|
304
304
|
return new WebTransportError(t, { source: "stream", streamErrorCode: e });
|
|
305
305
|
const n = new Error(t);
|
|
306
306
|
return n.name = "WebTransportError", n.source = "stream", n.streamErrorCode = e, n;
|
|
307
307
|
}
|
|
308
|
-
const
|
|
308
|
+
const us = {
|
|
309
309
|
event() {
|
|
310
310
|
}
|
|
311
|
-
},
|
|
312
|
-
function
|
|
313
|
-
return
|
|
311
|
+
}, ls = [];
|
|
312
|
+
function ds() {
|
|
313
|
+
return ls.slice();
|
|
314
314
|
}
|
|
315
|
-
typeof window < "u" && (window.__orpcDebug =
|
|
316
|
-
function
|
|
317
|
-
const s = n.logger ??
|
|
315
|
+
typeof window < "u" && (window.__orpcDebug = ds);
|
|
316
|
+
function hs(e, t, n = {}) {
|
|
317
|
+
const s = n.logger ?? us, r = n.transport ?? is, i = { ...n.metadata };
|
|
318
318
|
delete i.authorization;
|
|
319
319
|
async function a(d, f) {
|
|
320
|
-
const p = t.getToken(), m = p ? { ...i, authorization: `Bearer ${p}` } : { ...i }, g =
|
|
320
|
+
const p = t.getToken(), m = p ? { ...i, authorization: `Bearer ${p}` } : { ...i }, g = es(d, 0, m, f);
|
|
321
321
|
s.event({ kind: "request", path: d, reqBytes: g.length });
|
|
322
322
|
const E = await r(e, g);
|
|
323
323
|
return E.reconnected && s.event({ kind: "transport", path: d, event: "reconnect" }), E;
|
|
324
324
|
}
|
|
325
325
|
async function o(d, f, p) {
|
|
326
|
-
const m = Ie(), g = await a(d, f), E = new
|
|
326
|
+
const m = Ie(), g = await a(d, f), E = new ut(g.reader), x = g.writer.close().then(
|
|
327
327
|
() => null,
|
|
328
328
|
(v) => V(g, v)
|
|
329
329
|
);
|
|
@@ -340,13 +340,13 @@ function ds(e, t, n = {}) {
|
|
|
340
340
|
E,
|
|
341
341
|
new b(`unexpected ${N.type} frame`)
|
|
342
342
|
), new b(`unexpected ${N.type} frame before unary reply`);
|
|
343
|
-
let
|
|
343
|
+
let rt;
|
|
344
344
|
try {
|
|
345
|
-
|
|
345
|
+
rt = await E.readFrame();
|
|
346
346
|
} catch (v) {
|
|
347
347
|
throw await O(g, E, v), V(g, v);
|
|
348
348
|
}
|
|
349
|
-
if (
|
|
349
|
+
if (rt !== null) {
|
|
350
350
|
const v = new b("trailing frame after unary terminal");
|
|
351
351
|
throw await O(g, E, v), v;
|
|
352
352
|
}
|
|
@@ -360,12 +360,12 @@ function ds(e, t, n = {}) {
|
|
|
360
360
|
}), u(N.code, N.reason, d, f, p);
|
|
361
361
|
if (N.path !== d)
|
|
362
362
|
throw new b(`response path mismatch: expected ${d}, got ${N.path}`);
|
|
363
|
-
const
|
|
364
|
-
if (
|
|
363
|
+
const it = await x;
|
|
364
|
+
if (it) throw it;
|
|
365
365
|
return s.event({ kind: "response", path: d, respBytes: N.body.length, ms: Ie() - m }), N.body;
|
|
366
366
|
}
|
|
367
367
|
async function l(d, f) {
|
|
368
|
-
const p = await a(d, f), m = new
|
|
368
|
+
const p = await a(d, f), m = new ut(p.reader);
|
|
369
369
|
let g;
|
|
370
370
|
try {
|
|
371
371
|
g = await m.readFrame();
|
|
@@ -377,7 +377,7 @@ function ds(e, t, n = {}) {
|
|
|
377
377
|
throw await O(p, m, E), E;
|
|
378
378
|
}
|
|
379
379
|
if (g.type === "error")
|
|
380
|
-
throw await
|
|
380
|
+
throw await dn(p), new T(g.code, g.reason);
|
|
381
381
|
if (g.type !== "response") {
|
|
382
382
|
const E = new b(
|
|
383
383
|
`unexpected ${g.type} frame before streaming REQUEST echo`
|
|
@@ -390,7 +390,7 @@ function ds(e, t, n = {}) {
|
|
|
390
390
|
);
|
|
391
391
|
throw await O(p, m, E), E;
|
|
392
392
|
}
|
|
393
|
-
return new
|
|
393
|
+
return new fs(g.body, p, m);
|
|
394
394
|
}
|
|
395
395
|
async function u(d, f, p, m, g) {
|
|
396
396
|
switch (d) {
|
|
@@ -412,14 +412,14 @@ function ds(e, t, n = {}) {
|
|
|
412
412
|
stream: l
|
|
413
413
|
};
|
|
414
414
|
}
|
|
415
|
-
class
|
|
415
|
+
class fs {
|
|
416
416
|
constructor(t, n, s) {
|
|
417
417
|
this.channel = n, this.frames = s, this.terminal = "open", this.terminalError = null, this.upload = "open", this.uploadError = null, this.finishPromise = null, this.cancelPromise = null, this.nextTail = Promise.resolve(), this.initial = t;
|
|
418
418
|
}
|
|
419
419
|
async send(t) {
|
|
420
420
|
this.assertWritable();
|
|
421
421
|
try {
|
|
422
|
-
await this.channel.writer.write(
|
|
422
|
+
await this.channel.writer.write(ts(t));
|
|
423
423
|
} catch (n) {
|
|
424
424
|
throw this.upload = "stopped", this.uploadError = V(this.channel, n), this.uploadError;
|
|
425
425
|
}
|
|
@@ -442,10 +442,10 @@ class hs {
|
|
|
442
442
|
}
|
|
443
443
|
}
|
|
444
444
|
async cancel(t = B.CANCELLED) {
|
|
445
|
-
if (
|
|
445
|
+
if (ms(t), this.cancelPromise) return this.cancelPromise;
|
|
446
446
|
if (this.terminal !== "open") return;
|
|
447
447
|
this.terminal = "cancelled", this.terminalError = new T(t, "stream cancelled");
|
|
448
|
-
const n =
|
|
448
|
+
const n = ln(t);
|
|
449
449
|
return this.cancelPromise = Promise.allSettled([
|
|
450
450
|
this.cancelUpload(),
|
|
451
451
|
this.frames.cancel(n).catch((s) => this.channel.sessionFailed?.(s))
|
|
@@ -483,7 +483,7 @@ class hs {
|
|
|
483
483
|
return this.terminal = "clean", { done: !0, value: void 0 };
|
|
484
484
|
if (t.type === "data") return { done: !1, value: t.body };
|
|
485
485
|
if (t.type === "error")
|
|
486
|
-
throw this.terminal = "error", this.terminalError = new T(t.code, t.reason),
|
|
486
|
+
throw this.terminal = "error", this.terminalError = new T(t.code, t.reason), dn(this.channel), this.terminalError;
|
|
487
487
|
const n = new b(`unexpected ${t.type} frame after streaming REQUEST echo`);
|
|
488
488
|
throw this.terminal = "error", this.terminalError = n, await O(this.channel, this.frames, n), n;
|
|
489
489
|
}
|
|
@@ -501,7 +501,7 @@ class hs {
|
|
|
501
501
|
if (this.upload === "open") {
|
|
502
502
|
this.upload = "closing";
|
|
503
503
|
try {
|
|
504
|
-
await this.channel.writer.write(
|
|
504
|
+
await this.channel.writer.write(un()), await this.channel.writer.close(), this.upload = "closed";
|
|
505
505
|
} catch (t) {
|
|
506
506
|
this.upload = "stopped", this.channel.sessionFailed?.(t);
|
|
507
507
|
}
|
|
@@ -510,11 +510,11 @@ class hs {
|
|
|
510
510
|
}
|
|
511
511
|
async function O(e, t, n) {
|
|
512
512
|
if (!(n instanceof b)) return;
|
|
513
|
-
const s = n instanceof
|
|
513
|
+
const s = n instanceof on ? B.MESSAGE_TOO_LARGE : B.INVALID_ARGUMENT, r = ln(s, n.message);
|
|
514
514
|
await Promise.allSettled([
|
|
515
515
|
(async () => {
|
|
516
516
|
try {
|
|
517
|
-
await e.writer.write(
|
|
517
|
+
await e.writer.write(un()), await e.writer.close();
|
|
518
518
|
} catch (i) {
|
|
519
519
|
e.sessionFailed?.(i);
|
|
520
520
|
}
|
|
@@ -522,7 +522,7 @@ async function O(e, t, n) {
|
|
|
522
522
|
t.cancel(r).catch((i) => e.sessionFailed?.(i))
|
|
523
523
|
]);
|
|
524
524
|
}
|
|
525
|
-
async function
|
|
525
|
+
async function dn(e) {
|
|
526
526
|
try {
|
|
527
527
|
await e.writer.close();
|
|
528
528
|
} catch (t) {
|
|
@@ -530,9 +530,9 @@ async function ln(e) {
|
|
|
530
530
|
}
|
|
531
531
|
}
|
|
532
532
|
function V(e, t) {
|
|
533
|
-
return e.sessionFailed?.(t),
|
|
533
|
+
return e.sessionFailed?.(t), cs(t);
|
|
534
534
|
}
|
|
535
|
-
function
|
|
535
|
+
function ms(e) {
|
|
536
536
|
if (!Number.isInteger(e) || e < 0 || e > 255)
|
|
537
537
|
throw new RangeError(`WebTransport stream error code must be an integer in 0..255: ${e}`);
|
|
538
538
|
}
|
|
@@ -542,7 +542,7 @@ function Ie() {
|
|
|
542
542
|
function W(e) {
|
|
543
543
|
return new Promise((t) => setTimeout(t, e));
|
|
544
544
|
}
|
|
545
|
-
function
|
|
545
|
+
function hn() {
|
|
546
546
|
const e = Date.now(), t = new Uint8Array(16);
|
|
547
547
|
crypto.getRandomValues(t), t[0] = e >> 40 & 255, t[1] = e >> 32 & 255, t[2] = e >> 24 & 255, t[3] = e >> 16 & 255, t[4] = e >> 8 & 255, t[5] = e & 255, t[6] = t[6] & 15 | 112, t[8] = t[8] & 63 | 128;
|
|
548
548
|
const n = [...t].map((s) => s.toString(16).padStart(2, "0")).join("");
|
|
@@ -558,7 +558,7 @@ var c;
|
|
|
558
558
|
(function(e) {
|
|
559
559
|
e[e.DOUBLE = 1] = "DOUBLE", e[e.FLOAT = 2] = "FLOAT", e[e.INT64 = 3] = "INT64", e[e.UINT64 = 4] = "UINT64", e[e.INT32 = 5] = "INT32", e[e.FIXED64 = 6] = "FIXED64", e[e.FIXED32 = 7] = "FIXED32", e[e.BOOL = 8] = "BOOL", e[e.STRING = 9] = "STRING", e[e.BYTES = 12] = "BYTES", e[e.UINT32 = 13] = "UINT32", e[e.SFIXED32 = 15] = "SFIXED32", e[e.SFIXED64 = 16] = "SFIXED64", e[e.SINT32 = 17] = "SINT32", e[e.SINT64 = 18] = "SINT64";
|
|
560
560
|
})(c || (c = {}));
|
|
561
|
-
function
|
|
561
|
+
function ps() {
|
|
562
562
|
let e = 0, t = 0;
|
|
563
563
|
for (let s = 0; s < 28; s += 7) {
|
|
564
564
|
let r = this.buf[this.pos++];
|
|
@@ -592,7 +592,7 @@ function Ne(e, t, n) {
|
|
|
592
592
|
}
|
|
593
593
|
}
|
|
594
594
|
const ae = 4294967296;
|
|
595
|
-
function
|
|
595
|
+
function lt(e) {
|
|
596
596
|
const t = e[0] === "-";
|
|
597
597
|
t && (e = e.slice(1));
|
|
598
598
|
const n = 1e6;
|
|
@@ -601,33 +601,33 @@ function ut(e) {
|
|
|
601
601
|
const l = Number(e.slice(a, o));
|
|
602
602
|
r *= n, s = s * n + l, s >= ae && (r = r + (s / ae | 0), s = s % ae);
|
|
603
603
|
}
|
|
604
|
-
return i(-24, -18), i(-18, -12), i(-12, -6), i(-6), t ?
|
|
604
|
+
return i(-24, -18), i(-18, -12), i(-12, -6), i(-6), t ? mn(s, r) : Ge(s, r);
|
|
605
605
|
}
|
|
606
|
-
function
|
|
606
|
+
function bs(e, t) {
|
|
607
607
|
let n = Ge(e, t);
|
|
608
608
|
const s = n.hi & 2147483648;
|
|
609
|
-
s && (n =
|
|
610
|
-
const r =
|
|
609
|
+
s && (n = mn(n.lo, n.hi));
|
|
610
|
+
const r = fn(n.lo, n.hi);
|
|
611
611
|
return s ? "-" + r : r;
|
|
612
612
|
}
|
|
613
|
-
function
|
|
614
|
-
if ({ lo: e, hi: t } =
|
|
613
|
+
function fn(e, t) {
|
|
614
|
+
if ({ lo: e, hi: t } = gs(e, t), t <= 2097151)
|
|
615
615
|
return String(ae * t + e);
|
|
616
616
|
const n = e & 16777215, s = (e >>> 24 | t << 8) & 16777215, r = t >> 16 & 65535;
|
|
617
617
|
let i = n + s * 6777216 + r * 6710656, a = s + r * 8147497, o = r * 2;
|
|
618
618
|
const l = 1e7;
|
|
619
|
-
return i >= l && (a += Math.floor(i / l), i %= l), a >= l && (o += Math.floor(a / l), a %= l), o.toString() +
|
|
619
|
+
return i >= l && (a += Math.floor(i / l), i %= l), a >= l && (o += Math.floor(a / l), a %= l), o.toString() + dt(a) + dt(i);
|
|
620
620
|
}
|
|
621
|
-
function
|
|
621
|
+
function gs(e, t) {
|
|
622
622
|
return { lo: e >>> 0, hi: t >>> 0 };
|
|
623
623
|
}
|
|
624
624
|
function Ge(e, t) {
|
|
625
625
|
return { lo: e | 0, hi: t | 0 };
|
|
626
626
|
}
|
|
627
|
-
function
|
|
627
|
+
function mn(e, t) {
|
|
628
628
|
return t = ~t, e ? e = ~e + 1 : t += 1, Ge(e, t);
|
|
629
629
|
}
|
|
630
|
-
const
|
|
630
|
+
const dt = (e) => {
|
|
631
631
|
const t = String(e);
|
|
632
632
|
return "0000000".slice(t.length) + t;
|
|
633
633
|
};
|
|
@@ -642,7 +642,7 @@ function Ce(e, t) {
|
|
|
642
642
|
t.push(1);
|
|
643
643
|
}
|
|
644
644
|
}
|
|
645
|
-
function
|
|
645
|
+
function Es() {
|
|
646
646
|
let e = this.buf[this.pos++], t = e & 127;
|
|
647
647
|
if ((e & 128) == 0)
|
|
648
648
|
return this.assertBounds(), t;
|
|
@@ -659,8 +659,8 @@ function gs() {
|
|
|
659
659
|
throw new Error("invalid varint");
|
|
660
660
|
return this.assertBounds(), t >>> 0;
|
|
661
661
|
}
|
|
662
|
-
const w = /* @__PURE__ */
|
|
663
|
-
function
|
|
662
|
+
const w = /* @__PURE__ */ ys();
|
|
663
|
+
function ys() {
|
|
664
664
|
const e = new DataView(new ArrayBuffer(8));
|
|
665
665
|
if (typeof BigInt == "function" && typeof e.getBigInt64 == "function" && typeof e.getBigUint64 == "function" && typeof e.setBigInt64 == "function" && typeof e.setBigUint64 == "function" && (!!globalThis.Deno || !!globalThis.Bun || typeof process != "object" || typeof process.env != "object" || process.env.BUF_BIGINT_DISABLE !== "1")) {
|
|
666
666
|
const n = BigInt("-9223372036854775808"), s = BigInt("9223372036854775807"), r = BigInt("0"), i = BigInt("18446744073709551615");
|
|
@@ -703,30 +703,30 @@ function Es() {
|
|
|
703
703
|
zero: "0",
|
|
704
704
|
supported: !1,
|
|
705
705
|
parse(n) {
|
|
706
|
-
return typeof n != "string" && (n = n.toString()),
|
|
706
|
+
return typeof n != "string" && (n = n.toString()), ht(n), n;
|
|
707
707
|
},
|
|
708
708
|
uParse(n) {
|
|
709
|
-
return typeof n != "string" && (n = n.toString()),
|
|
709
|
+
return typeof n != "string" && (n = n.toString()), ft(n), n;
|
|
710
710
|
},
|
|
711
711
|
enc(n) {
|
|
712
|
-
return typeof n != "string" && (n = n.toString()),
|
|
712
|
+
return typeof n != "string" && (n = n.toString()), ht(n), lt(n);
|
|
713
713
|
},
|
|
714
714
|
uEnc(n) {
|
|
715
|
-
return typeof n != "string" && (n = n.toString()),
|
|
715
|
+
return typeof n != "string" && (n = n.toString()), ft(n), lt(n);
|
|
716
716
|
},
|
|
717
717
|
dec(n, s) {
|
|
718
|
-
return
|
|
718
|
+
return bs(n, s);
|
|
719
719
|
},
|
|
720
720
|
uDec(n, s) {
|
|
721
|
-
return
|
|
721
|
+
return fn(n, s);
|
|
722
722
|
}
|
|
723
723
|
};
|
|
724
724
|
}
|
|
725
|
-
function
|
|
725
|
+
function ht(e) {
|
|
726
726
|
if (!/^-?[0-9]+$/.test(e))
|
|
727
727
|
throw new Error("invalid int64: " + e);
|
|
728
728
|
}
|
|
729
|
-
function
|
|
729
|
+
function ft(e) {
|
|
730
730
|
if (!/^[0-9]+$/.test(e))
|
|
731
731
|
throw new Error("invalid uint64: " + e);
|
|
732
732
|
}
|
|
@@ -751,7 +751,7 @@ function q(e, t) {
|
|
|
751
751
|
return 0;
|
|
752
752
|
}
|
|
753
753
|
}
|
|
754
|
-
function
|
|
754
|
+
function ws(e, t) {
|
|
755
755
|
switch (e) {
|
|
756
756
|
case c.BOOL:
|
|
757
757
|
return t === !1;
|
|
@@ -766,16 +766,16 @@ function ys(e, t) {
|
|
|
766
766
|
return t == 0;
|
|
767
767
|
}
|
|
768
768
|
}
|
|
769
|
-
const
|
|
770
|
-
function
|
|
769
|
+
const pn = 2, M = Symbol.for("reflect unsafe local");
|
|
770
|
+
function bn(e, t) {
|
|
771
771
|
const n = e[t.localName].case;
|
|
772
772
|
return n === void 0 ? n : t.fields.find((s) => s.localName === n);
|
|
773
773
|
}
|
|
774
|
-
function
|
|
774
|
+
function Is(e, t) {
|
|
775
775
|
const n = t.localName;
|
|
776
776
|
if (t.oneof)
|
|
777
777
|
return e[t.oneof.localName].case === n;
|
|
778
|
-
if (t.presence !=
|
|
778
|
+
if (t.presence != pn)
|
|
779
779
|
return e[n] !== void 0 && Object.prototype.hasOwnProperty.call(e, n);
|
|
780
780
|
switch (t.fieldKind) {
|
|
781
781
|
case "list":
|
|
@@ -783,7 +783,7 @@ function ws(e, t) {
|
|
|
783
783
|
case "map":
|
|
784
784
|
return Object.keys(e[n]).length > 0;
|
|
785
785
|
case "scalar":
|
|
786
|
-
return !
|
|
786
|
+
return !ws(t.scalar, e[n]);
|
|
787
787
|
case "enum":
|
|
788
788
|
return e[n] !== t.enum.values[0].number;
|
|
789
789
|
}
|
|
@@ -792,25 +792,25 @@ function ws(e, t) {
|
|
|
792
792
|
function H(e, t) {
|
|
793
793
|
return Object.prototype.hasOwnProperty.call(e, t) && e[t] !== void 0;
|
|
794
794
|
}
|
|
795
|
-
function
|
|
795
|
+
function gn(e, t) {
|
|
796
796
|
if (t.oneof) {
|
|
797
797
|
const n = e[t.oneof.localName];
|
|
798
798
|
return n.case === t.localName ? n.value : void 0;
|
|
799
799
|
}
|
|
800
800
|
return e[t.localName];
|
|
801
801
|
}
|
|
802
|
-
function
|
|
802
|
+
function En(e, t, n) {
|
|
803
803
|
t.oneof ? e[t.oneof.localName] = {
|
|
804
804
|
case: t.localName,
|
|
805
805
|
value: n
|
|
806
806
|
} : e[t.localName] = n;
|
|
807
807
|
}
|
|
808
|
-
function
|
|
808
|
+
function Ns(e, t) {
|
|
809
809
|
const n = t.localName;
|
|
810
810
|
if (t.oneof) {
|
|
811
811
|
const s = t.oneof.localName;
|
|
812
812
|
e[s].case === n && (e[s] = { case: void 0 });
|
|
813
|
-
} else if (t.presence !=
|
|
813
|
+
} else if (t.presence != pn)
|
|
814
814
|
delete e[n];
|
|
815
815
|
else
|
|
816
816
|
switch (t.fieldKind) {
|
|
@@ -856,14 +856,14 @@ function Ye(e, t) {
|
|
|
856
856
|
function $e(e, t) {
|
|
857
857
|
return P(e) && M in e && "desc" in e && P(e.desc) && e.desc.kind === "message" && (t === void 0 || e.desc.typeName == t.typeName);
|
|
858
858
|
}
|
|
859
|
-
function
|
|
860
|
-
return
|
|
859
|
+
function Ts(e) {
|
|
860
|
+
return wn(e.$typeName);
|
|
861
861
|
}
|
|
862
|
-
function
|
|
862
|
+
function yn(e) {
|
|
863
863
|
const t = e.fields[0];
|
|
864
|
-
return
|
|
864
|
+
return wn(e.typeName) && t !== void 0 && t.fieldKind == "scalar" && t.name == "value" && t.number == 1;
|
|
865
865
|
}
|
|
866
|
-
function
|
|
866
|
+
function wn(e) {
|
|
867
867
|
return e.startsWith("google.protobuf.") && [
|
|
868
868
|
"DoubleValue",
|
|
869
869
|
"FloatValue",
|
|
@@ -876,24 +876,24 @@ function yn(e) {
|
|
|
876
876
|
"BytesValue"
|
|
877
877
|
].includes(e.substring(16));
|
|
878
878
|
}
|
|
879
|
-
const
|
|
879
|
+
const Ss = 999, ks = 998, oe = 2;
|
|
880
880
|
function C(e, t) {
|
|
881
881
|
if (Fe(t, e))
|
|
882
882
|
return t;
|
|
883
|
-
const n =
|
|
884
|
-
return t !== void 0 &&
|
|
883
|
+
const n = Os(e);
|
|
884
|
+
return t !== void 0 && As(e, n, t), n;
|
|
885
885
|
}
|
|
886
|
-
function
|
|
886
|
+
function As(e, t, n) {
|
|
887
887
|
for (const s of e.members) {
|
|
888
888
|
let r = n[s.localName];
|
|
889
889
|
if (r == null)
|
|
890
890
|
continue;
|
|
891
891
|
let i;
|
|
892
892
|
if (s.kind == "oneof") {
|
|
893
|
-
const a =
|
|
893
|
+
const a = bn(n, s);
|
|
894
894
|
if (!a)
|
|
895
895
|
continue;
|
|
896
|
-
i = a, r =
|
|
896
|
+
i = a, r = gn(n, a);
|
|
897
897
|
} else
|
|
898
898
|
i = s;
|
|
899
899
|
switch (i.fieldKind) {
|
|
@@ -901,32 +901,32 @@ function ks(e, t, n) {
|
|
|
901
901
|
r = Xe(i, r);
|
|
902
902
|
break;
|
|
903
903
|
case "scalar":
|
|
904
|
-
r =
|
|
904
|
+
r = In(i, r);
|
|
905
905
|
break;
|
|
906
906
|
case "list":
|
|
907
|
-
r =
|
|
907
|
+
r = _s(i, r);
|
|
908
908
|
break;
|
|
909
909
|
case "map":
|
|
910
|
-
r =
|
|
910
|
+
r = Rs(i, r);
|
|
911
911
|
break;
|
|
912
912
|
}
|
|
913
|
-
|
|
913
|
+
En(t, i, r);
|
|
914
914
|
}
|
|
915
915
|
return t;
|
|
916
916
|
}
|
|
917
|
-
function
|
|
917
|
+
function In(e, t) {
|
|
918
918
|
return e.scalar == c.BYTES ? Ke(t) : t;
|
|
919
919
|
}
|
|
920
|
-
function
|
|
920
|
+
function Rs(e, t) {
|
|
921
921
|
if (P(t)) {
|
|
922
922
|
if (e.scalar == c.BYTES)
|
|
923
|
-
return
|
|
923
|
+
return mt(t, Ke);
|
|
924
924
|
if (e.mapKind == "message")
|
|
925
|
-
return
|
|
925
|
+
return mt(t, (n) => Xe(e, n));
|
|
926
926
|
}
|
|
927
927
|
return t;
|
|
928
928
|
}
|
|
929
|
-
function
|
|
929
|
+
function _s(e, t) {
|
|
930
930
|
if (Array.isArray(t)) {
|
|
931
931
|
if (e.scalar == c.BYTES)
|
|
932
932
|
return t.map(Ke);
|
|
@@ -936,8 +936,8 @@ function Rs(e, t) {
|
|
|
936
936
|
return t;
|
|
937
937
|
}
|
|
938
938
|
function Xe(e, t) {
|
|
939
|
-
if (e.fieldKind == "message" && !e.oneof &&
|
|
940
|
-
return
|
|
939
|
+
if (e.fieldKind == "message" && !e.oneof && yn(e.message))
|
|
940
|
+
return In(e.message.fields[0], t);
|
|
941
941
|
if (P(t)) {
|
|
942
942
|
if (e.message.typeName == "google.protobuf.Struct" && e.parent.typeName !== "google.protobuf.Value")
|
|
943
943
|
return t;
|
|
@@ -949,17 +949,17 @@ function Xe(e, t) {
|
|
|
949
949
|
function Ke(e) {
|
|
950
950
|
return Array.isArray(e) ? new Uint8Array(e) : e;
|
|
951
951
|
}
|
|
952
|
-
function
|
|
952
|
+
function mt(e, t) {
|
|
953
953
|
const n = {};
|
|
954
954
|
for (const s of Object.entries(e))
|
|
955
955
|
n[s[0]] = t(s[1]);
|
|
956
956
|
return n;
|
|
957
957
|
}
|
|
958
|
-
const
|
|
959
|
-
function
|
|
958
|
+
const vs = Symbol(), pt = /* @__PURE__ */ new WeakMap();
|
|
959
|
+
function Os(e) {
|
|
960
960
|
let t;
|
|
961
|
-
if (
|
|
962
|
-
const n =
|
|
961
|
+
if (Cs(e)) {
|
|
962
|
+
const n = pt.get(e);
|
|
963
963
|
let s, r;
|
|
964
964
|
if (n)
|
|
965
965
|
({ prototype: s, members: r } = n);
|
|
@@ -967,7 +967,7 @@ function vs(e) {
|
|
|
967
967
|
s = {}, r = /* @__PURE__ */ new Set();
|
|
968
968
|
for (const i of e.members)
|
|
969
969
|
i.kind != "oneof" && (i.fieldKind != "scalar" && i.fieldKind != "enum" || i.presence != oe && (r.add(i), s[i.localName] = Te(i)));
|
|
970
|
-
|
|
970
|
+
pt.set(e, { prototype: s, members: r });
|
|
971
971
|
}
|
|
972
972
|
t = Object.create(s), t.$typeName = e.typeName;
|
|
973
973
|
for (const i of e.members)
|
|
@@ -981,11 +981,11 @@ function vs(e) {
|
|
|
981
981
|
}
|
|
982
982
|
return t;
|
|
983
983
|
}
|
|
984
|
-
function
|
|
984
|
+
function Cs(e) {
|
|
985
985
|
switch (e.file.edition) {
|
|
986
|
-
case Ts:
|
|
987
|
-
return !1;
|
|
988
986
|
case Ss:
|
|
987
|
+
return !1;
|
|
988
|
+
case ks:
|
|
989
989
|
return !0;
|
|
990
990
|
default:
|
|
991
991
|
return e.fields.some((t) => t.presence != oe && t.fieldKind != "message" && !t.oneof);
|
|
@@ -999,7 +999,7 @@ function Te(e) {
|
|
|
999
999
|
if (e.fieldKind == "map")
|
|
1000
1000
|
return {};
|
|
1001
1001
|
if (e.fieldKind == "message")
|
|
1002
|
-
return
|
|
1002
|
+
return vs;
|
|
1003
1003
|
const t = e.getDefaultValue();
|
|
1004
1004
|
return t !== void 0 ? e.fieldKind == "scalar" && e.longAsString ? t.toString() : t : e.fieldKind == "scalar" ? q(e.scalar, e.longAsString) : e.enum.values[0].number;
|
|
1005
1005
|
}
|
|
@@ -1035,8 +1035,8 @@ var I;
|
|
|
1035
1035
|
(function(e) {
|
|
1036
1036
|
e[e.Varint = 0] = "Varint", e[e.Bit64 = 1] = "Bit64", e[e.LengthDelimited = 2] = "LengthDelimited", e[e.StartGroup = 3] = "StartGroup", e[e.EndGroup = 4] = "EndGroup", e[e.Bit32 = 5] = "Bit32";
|
|
1037
1037
|
})(I || (I = {}));
|
|
1038
|
-
const
|
|
1039
|
-
class
|
|
1038
|
+
const Nn = 34028234663852886e22, Tn = -34028234663852886e22, Sn = 4294967295, kn = 2147483647, An = -2147483648;
|
|
1039
|
+
class Ds {
|
|
1040
1040
|
constructor(t = We().encodeUtf8) {
|
|
1041
1041
|
this.encodeUtf8 = t, this.stack = [], this.chunks = [], this.buf = [];
|
|
1042
1042
|
}
|
|
@@ -1092,7 +1092,7 @@ class Cs {
|
|
|
1092
1092
|
* Write a `uint32` value, an unsigned 32 bit varint.
|
|
1093
1093
|
*/
|
|
1094
1094
|
uint32(t) {
|
|
1095
|
-
for (
|
|
1095
|
+
for (bt(t); t > 127; )
|
|
1096
1096
|
this.buf.push(t & 127 | 128), t = t >>> 7;
|
|
1097
1097
|
return this.buf.push(t), this;
|
|
1098
1098
|
}
|
|
@@ -1125,7 +1125,7 @@ class Cs {
|
|
|
1125
1125
|
* Write a `float` value, 32-bit floating point number.
|
|
1126
1126
|
*/
|
|
1127
1127
|
float(t) {
|
|
1128
|
-
|
|
1128
|
+
Ls(t);
|
|
1129
1129
|
let n = new Uint8Array(4);
|
|
1130
1130
|
return new DataView(n.buffer).setFloat32(0, t, !0), this.raw(n);
|
|
1131
1131
|
}
|
|
@@ -1140,7 +1140,7 @@ class Cs {
|
|
|
1140
1140
|
* Write a `fixed32` value, an unsigned, fixed-length 32-bit integer.
|
|
1141
1141
|
*/
|
|
1142
1142
|
fixed32(t) {
|
|
1143
|
-
|
|
1143
|
+
bt(t);
|
|
1144
1144
|
let n = new Uint8Array(4);
|
|
1145
1145
|
return new DataView(n.buffer).setUint32(0, t, !0), this.raw(n);
|
|
1146
1146
|
}
|
|
@@ -1194,9 +1194,9 @@ class Cs {
|
|
|
1194
1194
|
return Ne(n.lo, n.hi, this.buf), this;
|
|
1195
1195
|
}
|
|
1196
1196
|
}
|
|
1197
|
-
class
|
|
1197
|
+
class Us {
|
|
1198
1198
|
constructor(t, n = We().decodeUtf8) {
|
|
1199
|
-
this.decodeUtf8 = n, this.varint64 =
|
|
1199
|
+
this.decodeUtf8 = n, this.varint64 = ps, this.uint32 = Es, this.buf = t, this.len = t.length, this.pos = 0, this.view = new DataView(t.buffer, t.byteOffset, t.byteLength);
|
|
1200
1200
|
}
|
|
1201
1201
|
/**
|
|
1202
1202
|
* Reads a tag - field number and wire type. Tags are uint32 varints; values
|
|
@@ -1356,50 +1356,50 @@ function ke(e) {
|
|
|
1356
1356
|
e = Number(e);
|
|
1357
1357
|
else if (typeof e != "number")
|
|
1358
1358
|
throw new Error("invalid int32: " + typeof e);
|
|
1359
|
-
if (!Number.isInteger(e) || e >
|
|
1359
|
+
if (!Number.isInteger(e) || e > kn || e < An)
|
|
1360
1360
|
throw new Error("invalid int32: " + e);
|
|
1361
1361
|
}
|
|
1362
|
-
function
|
|
1362
|
+
function bt(e) {
|
|
1363
1363
|
if (typeof e == "string")
|
|
1364
1364
|
e = Number(e);
|
|
1365
1365
|
else if (typeof e != "number")
|
|
1366
1366
|
throw new Error("invalid uint32: " + typeof e);
|
|
1367
|
-
if (!Number.isInteger(e) || e >
|
|
1367
|
+
if (!Number.isInteger(e) || e > Sn || e < 0)
|
|
1368
1368
|
throw new Error("invalid uint32: " + e);
|
|
1369
1369
|
}
|
|
1370
|
-
function
|
|
1370
|
+
function Ls(e) {
|
|
1371
1371
|
if (typeof e == "string") {
|
|
1372
1372
|
const t = e;
|
|
1373
1373
|
if (e = Number(e), Number.isNaN(e) && t !== "NaN")
|
|
1374
1374
|
throw new Error("invalid float32: " + t);
|
|
1375
1375
|
} else if (typeof e != "number")
|
|
1376
1376
|
throw new Error("invalid float32: " + typeof e);
|
|
1377
|
-
if (Number.isFinite(e) && (e >
|
|
1377
|
+
if (Number.isFinite(e) && (e > Nn || e < Tn))
|
|
1378
1378
|
throw new Error("invalid float32: " + e);
|
|
1379
1379
|
}
|
|
1380
|
-
function
|
|
1380
|
+
function Ms(e, t) {
|
|
1381
1381
|
const n = e.fieldKind == "list" ? Be(t, e) : e.fieldKind == "map" ? Ye(t, e) : je(e, t);
|
|
1382
1382
|
if (n === !0)
|
|
1383
1383
|
return;
|
|
1384
1384
|
let s;
|
|
1385
1385
|
switch (e.fieldKind) {
|
|
1386
1386
|
case "list":
|
|
1387
|
-
s = `expected ${
|
|
1387
|
+
s = `expected ${_n(e)}, got ${de(t)}`;
|
|
1388
1388
|
break;
|
|
1389
1389
|
case "map":
|
|
1390
|
-
s = `expected ${
|
|
1390
|
+
s = `expected ${vn(e)}, got ${de(t)}`;
|
|
1391
1391
|
break;
|
|
1392
1392
|
default:
|
|
1393
1393
|
s = le(e, t, n);
|
|
1394
1394
|
}
|
|
1395
1395
|
return new Y(e, s);
|
|
1396
1396
|
}
|
|
1397
|
-
function
|
|
1397
|
+
function gt(e, t, n) {
|
|
1398
1398
|
const s = je(e, n);
|
|
1399
1399
|
if (s !== !0)
|
|
1400
1400
|
return new Y(e, `list item #${t + 1}: ${le(e, n, s)}`);
|
|
1401
1401
|
}
|
|
1402
|
-
function
|
|
1402
|
+
function xs(e, t, n) {
|
|
1403
1403
|
const s = De(t, e.mapKey);
|
|
1404
1404
|
if (s !== !0)
|
|
1405
1405
|
return new Y(e, `invalid map key: ${le({ scalar: e.mapKey }, t, s)}`);
|
|
@@ -1415,14 +1415,14 @@ function De(e, t) {
|
|
|
1415
1415
|
case c.DOUBLE:
|
|
1416
1416
|
return typeof e == "number";
|
|
1417
1417
|
case c.FLOAT:
|
|
1418
|
-
return typeof e != "number" ? !1 : Number.isNaN(e) || !Number.isFinite(e) ? !0 : e >
|
|
1418
|
+
return typeof e != "number" ? !1 : Number.isNaN(e) || !Number.isFinite(e) ? !0 : e > Nn || e < Tn ? `${e.toFixed()} out of range` : !0;
|
|
1419
1419
|
case c.INT32:
|
|
1420
1420
|
case c.SFIXED32:
|
|
1421
1421
|
case c.SINT32:
|
|
1422
|
-
return typeof e != "number" || !Number.isInteger(e) ? !1 : e >
|
|
1422
|
+
return typeof e != "number" || !Number.isInteger(e) ? !1 : e > kn || e < An ? `${e.toFixed()} out of range` : !0;
|
|
1423
1423
|
case c.FIXED32:
|
|
1424
1424
|
case c.UINT32:
|
|
1425
|
-
return typeof e != "number" || !Number.isInteger(e) ? !1 : e >
|
|
1425
|
+
return typeof e != "number" || !Number.isInteger(e) ? !1 : e > Sn || e < 0 ? `${e.toFixed()} out of range` : !0;
|
|
1426
1426
|
case c.BOOL:
|
|
1427
1427
|
return typeof e == "boolean";
|
|
1428
1428
|
case c.STRING:
|
|
@@ -1451,12 +1451,12 @@ function De(e, t) {
|
|
|
1451
1451
|
}
|
|
1452
1452
|
}
|
|
1453
1453
|
function le(e, t, n) {
|
|
1454
|
-
return n = typeof n == "string" ? `: ${n}` : `, got ${de(t)}`, e.scalar !== void 0 ? `expected ${
|
|
1454
|
+
return n = typeof n == "string" ? `: ${n}` : `, got ${de(t)}`, e.scalar !== void 0 ? `expected ${Ps(e.scalar)}` + n : e.enum !== void 0 ? `expected ${e.enum.toString()}` + n : `expected ${Rn(e.message)}` + n;
|
|
1455
1455
|
}
|
|
1456
1456
|
function de(e) {
|
|
1457
1457
|
switch (typeof e) {
|
|
1458
1458
|
case "object":
|
|
1459
|
-
return e === null ? "null" : e instanceof Uint8Array ? `Uint8Array(${e.length})` : Array.isArray(e) ? `Array(${e.length})` : Be(e) ?
|
|
1459
|
+
return e === null ? "null" : e instanceof Uint8Array ? `Uint8Array(${e.length})` : Array.isArray(e) ? `Array(${e.length})` : Be(e) ? _n(e.field()) : Ye(e) ? vn(e.field()) : $e(e) ? Rn(e.desc) : Fe(e) ? `message ${e.$typeName}` : "object";
|
|
1460
1460
|
case "string":
|
|
1461
1461
|
return e.length > 30 ? "string" : `"${e.split('"').join('\\"')}"`;
|
|
1462
1462
|
case "boolean":
|
|
@@ -1469,10 +1469,10 @@ function de(e) {
|
|
|
1469
1469
|
return typeof e;
|
|
1470
1470
|
}
|
|
1471
1471
|
}
|
|
1472
|
-
function
|
|
1472
|
+
function Rn(e) {
|
|
1473
1473
|
return `ReflectMessage (${e.typeName})`;
|
|
1474
1474
|
}
|
|
1475
|
-
function
|
|
1475
|
+
function _n(e) {
|
|
1476
1476
|
switch (e.listKind) {
|
|
1477
1477
|
case "message":
|
|
1478
1478
|
return `ReflectList (${e.message.toString()})`;
|
|
@@ -1482,7 +1482,7 @@ function Rn(e) {
|
|
|
1482
1482
|
return `ReflectList (${c[e.scalar]})`;
|
|
1483
1483
|
}
|
|
1484
1484
|
}
|
|
1485
|
-
function
|
|
1485
|
+
function vn(e) {
|
|
1486
1486
|
switch (e.mapKind) {
|
|
1487
1487
|
case "message":
|
|
1488
1488
|
return `ReflectMap (${c[e.mapKey]}, ${e.message.toString()})`;
|
|
@@ -1492,7 +1492,7 @@ function _n(e) {
|
|
|
1492
1492
|
return `ReflectMap (${c[e.mapKey]}, ${c[e.scalar]})`;
|
|
1493
1493
|
}
|
|
1494
1494
|
}
|
|
1495
|
-
function
|
|
1495
|
+
function Ps(e) {
|
|
1496
1496
|
switch (e) {
|
|
1497
1497
|
case c.STRING:
|
|
1498
1498
|
return "string";
|
|
@@ -1520,18 +1520,18 @@ function xs(e) {
|
|
|
1520
1520
|
return "number (int32)";
|
|
1521
1521
|
}
|
|
1522
1522
|
}
|
|
1523
|
-
const
|
|
1523
|
+
const Vs = 0;
|
|
1524
1524
|
function ge(e, t, n = !0) {
|
|
1525
|
-
return new
|
|
1525
|
+
return new On(e, t, n);
|
|
1526
1526
|
}
|
|
1527
|
-
const
|
|
1528
|
-
class
|
|
1527
|
+
const Et = /* @__PURE__ */ new WeakMap();
|
|
1528
|
+
class On {
|
|
1529
1529
|
get sortedFields() {
|
|
1530
|
-
const t =
|
|
1530
|
+
const t = Et.get(this.desc);
|
|
1531
1531
|
if (t)
|
|
1532
1532
|
return t;
|
|
1533
1533
|
const n = this.desc.fields.concat().sort((s, r) => s.number - r.number);
|
|
1534
|
-
return
|
|
1534
|
+
return Et.set(this.desc, n), n;
|
|
1535
1535
|
}
|
|
1536
1536
|
constructor(t, n, s = !0) {
|
|
1537
1537
|
this.lists = /* @__PURE__ */ new Map(), this.maps = /* @__PURE__ */ new Map(), this.check = s, this.desc = t, this.message = this[M] = n ?? C(t), this.fields = t.fields, this.oneofs = t.oneofs, this.members = t.members;
|
|
@@ -1540,31 +1540,31 @@ class vn {
|
|
|
1540
1540
|
return this._fieldsByNumber || (this._fieldsByNumber = new Map(this.desc.fields.map((n) => [n.number, n]))), this._fieldsByNumber.get(t);
|
|
1541
1541
|
}
|
|
1542
1542
|
oneofCase(t) {
|
|
1543
|
-
return K(this.message, t),
|
|
1543
|
+
return K(this.message, t), bn(this.message, t);
|
|
1544
1544
|
}
|
|
1545
1545
|
isSet(t) {
|
|
1546
|
-
return K(this.message, t),
|
|
1546
|
+
return K(this.message, t), Is(this.message, t);
|
|
1547
1547
|
}
|
|
1548
1548
|
clear(t) {
|
|
1549
|
-
K(this.message, t),
|
|
1549
|
+
K(this.message, t), Ns(this.message, t);
|
|
1550
1550
|
}
|
|
1551
1551
|
get(t) {
|
|
1552
1552
|
K(this.message, t);
|
|
1553
|
-
const n =
|
|
1553
|
+
const n = gn(this.message, t);
|
|
1554
1554
|
switch (t.fieldKind) {
|
|
1555
1555
|
case "list":
|
|
1556
1556
|
let s = this.lists.get(t);
|
|
1557
1557
|
return (!s || s[M] !== n) && this.lists.set(
|
|
1558
1558
|
t,
|
|
1559
1559
|
// biome-ignore lint/suspicious/noAssignInExpressions: no
|
|
1560
|
-
s = new
|
|
1560
|
+
s = new Fs(t, n, this.check)
|
|
1561
1561
|
), s;
|
|
1562
1562
|
case "map":
|
|
1563
1563
|
let r = this.maps.get(t);
|
|
1564
1564
|
return (!r || r[M] !== n) && this.maps.set(
|
|
1565
1565
|
t,
|
|
1566
1566
|
// biome-ignore lint/suspicious/noAssignInExpressions: no
|
|
1567
|
-
r = new
|
|
1567
|
+
r = new Gs(t, n, this.check)
|
|
1568
1568
|
), r;
|
|
1569
1569
|
case "message":
|
|
1570
1570
|
return He(t, n, this.check);
|
|
@@ -1576,12 +1576,12 @@ class vn {
|
|
|
1576
1576
|
}
|
|
1577
1577
|
set(t, n) {
|
|
1578
1578
|
if (K(this.message, t), this.check) {
|
|
1579
|
-
const r =
|
|
1579
|
+
const r = Ms(t, n);
|
|
1580
1580
|
if (r)
|
|
1581
1581
|
throw r;
|
|
1582
1582
|
}
|
|
1583
1583
|
let s;
|
|
1584
|
-
t.fieldKind == "message" ? s = qe(t, n) : Ye(n) || Be(n) ? s = n[M] : s = ze(t, n),
|
|
1584
|
+
t.fieldKind == "message" ? s = qe(t, n) : Ye(n) || Be(n) ? s = n[M] : s = ze(t, n), En(this.message, t, s);
|
|
1585
1585
|
}
|
|
1586
1586
|
getUnknown() {
|
|
1587
1587
|
return this.message.$unknown;
|
|
@@ -1594,7 +1594,7 @@ function K(e, t) {
|
|
|
1594
1594
|
if (t.parent.typeName !== e.$typeName)
|
|
1595
1595
|
throw new Y(t, `cannot use ${t.toString()} with message ${e.$typeName}`, "ForeignFieldError");
|
|
1596
1596
|
}
|
|
1597
|
-
class
|
|
1597
|
+
class Fs {
|
|
1598
1598
|
field() {
|
|
1599
1599
|
return this._field;
|
|
1600
1600
|
}
|
|
@@ -1612,19 +1612,19 @@ class Vs {
|
|
|
1612
1612
|
if (t < 0 || t >= this._arr.length)
|
|
1613
1613
|
throw new Y(this._field, `list item #${t + 1}: out of range`);
|
|
1614
1614
|
if (this.check) {
|
|
1615
|
-
const s =
|
|
1615
|
+
const s = gt(this._field, t, n);
|
|
1616
1616
|
if (s)
|
|
1617
1617
|
throw s;
|
|
1618
1618
|
}
|
|
1619
|
-
this._arr[t] =
|
|
1619
|
+
this._arr[t] = yt(this._field, n);
|
|
1620
1620
|
}
|
|
1621
1621
|
add(t) {
|
|
1622
1622
|
if (this.check) {
|
|
1623
|
-
const n =
|
|
1623
|
+
const n = gt(this._field, this._arr.length, t);
|
|
1624
1624
|
if (n)
|
|
1625
1625
|
throw n;
|
|
1626
1626
|
}
|
|
1627
|
-
this._arr.push(
|
|
1627
|
+
this._arr.push(yt(this._field, t));
|
|
1628
1628
|
}
|
|
1629
1629
|
clear() {
|
|
1630
1630
|
this._arr.splice(0, this._arr.length);
|
|
@@ -1644,7 +1644,7 @@ class Vs {
|
|
|
1644
1644
|
yield [t, Ae(this._field, this._arr[t], this.check)];
|
|
1645
1645
|
}
|
|
1646
1646
|
}
|
|
1647
|
-
class
|
|
1647
|
+
class Gs {
|
|
1648
1648
|
constructor(t, n, s = !0) {
|
|
1649
1649
|
this.obj = this[M] = n ?? {}, this.check = s, this._field = t;
|
|
1650
1650
|
}
|
|
@@ -1653,11 +1653,11 @@ class Fs {
|
|
|
1653
1653
|
}
|
|
1654
1654
|
set(t, n) {
|
|
1655
1655
|
if (this.check) {
|
|
1656
|
-
const s =
|
|
1656
|
+
const s = xs(this._field, t, n);
|
|
1657
1657
|
if (s)
|
|
1658
1658
|
throw s;
|
|
1659
1659
|
}
|
|
1660
|
-
return this.obj[J(t)] =
|
|
1660
|
+
return this.obj[J(t)] = Bs(this._field, n), this;
|
|
1661
1661
|
}
|
|
1662
1662
|
delete(t) {
|
|
1663
1663
|
const n = J(t), s = Object.prototype.hasOwnProperty.call(this.obj, n);
|
|
@@ -1676,12 +1676,12 @@ class Fs {
|
|
|
1676
1676
|
}
|
|
1677
1677
|
*keys() {
|
|
1678
1678
|
for (const t of Object.keys(this.obj))
|
|
1679
|
-
yield
|
|
1679
|
+
yield wt(t, this._field.mapKey);
|
|
1680
1680
|
}
|
|
1681
1681
|
*entries() {
|
|
1682
1682
|
for (const t of Object.entries(this.obj))
|
|
1683
1683
|
yield [
|
|
1684
|
-
|
|
1684
|
+
wt(t[0], this._field.mapKey),
|
|
1685
1685
|
Re(this._field, t[1], this.check)
|
|
1686
1686
|
];
|
|
1687
1687
|
}
|
|
@@ -1701,21 +1701,21 @@ class Fs {
|
|
|
1701
1701
|
}
|
|
1702
1702
|
}
|
|
1703
1703
|
function qe(e, t) {
|
|
1704
|
-
return $e(t) ?
|
|
1704
|
+
return $e(t) ? Ts(t.message) && !e.oneof && e.fieldKind == "message" ? t.message.value : t.desc.typeName == "google.protobuf.Struct" && e.parent.typeName != "google.protobuf.Value" ? Dn(t.message) : t.message : t;
|
|
1705
1705
|
}
|
|
1706
1706
|
function He(e, t, n) {
|
|
1707
|
-
return t !== void 0 && (
|
|
1707
|
+
return t !== void 0 && (yn(e.message) && !e.oneof && e.fieldKind == "message" ? t = {
|
|
1708
1708
|
$typeName: e.message.typeName,
|
|
1709
1709
|
value: Ze(e.message.fields[0], t)
|
|
1710
|
-
} : e.message.typeName == "google.protobuf.Struct" && e.parent.typeName != "google.protobuf.Value" && P(t) && (t =
|
|
1710
|
+
} : e.message.typeName == "google.protobuf.Struct" && e.parent.typeName != "google.protobuf.Value" && P(t) && (t = Cn(t))), new On(e.message, t, n);
|
|
1711
1711
|
}
|
|
1712
|
-
function
|
|
1712
|
+
function yt(e, t) {
|
|
1713
1713
|
return e.listKind == "message" ? qe(e, t) : ze(e, t);
|
|
1714
1714
|
}
|
|
1715
1715
|
function Ae(e, t, n) {
|
|
1716
1716
|
return e.listKind == "message" ? He(e, t, n) : Ze(e, t);
|
|
1717
1717
|
}
|
|
1718
|
-
function
|
|
1718
|
+
function Bs(e, t) {
|
|
1719
1719
|
return e.mapKind == "message" ? qe(e, t) : ze(e, t);
|
|
1720
1720
|
}
|
|
1721
1721
|
function Re(e, t, n) {
|
|
@@ -1724,7 +1724,7 @@ function Re(e, t, n) {
|
|
|
1724
1724
|
function J(e) {
|
|
1725
1725
|
return typeof e == "string" || typeof e == "number" ? e : String(e);
|
|
1726
1726
|
}
|
|
1727
|
-
function
|
|
1727
|
+
function wt(e, t) {
|
|
1728
1728
|
switch (t) {
|
|
1729
1729
|
case c.STRING:
|
|
1730
1730
|
return e;
|
|
@@ -1790,28 +1790,28 @@ function ze(e, t) {
|
|
|
1790
1790
|
}
|
|
1791
1791
|
return t;
|
|
1792
1792
|
}
|
|
1793
|
-
function
|
|
1793
|
+
function Cn(e) {
|
|
1794
1794
|
const t = {
|
|
1795
1795
|
$typeName: "google.protobuf.Struct",
|
|
1796
1796
|
fields: {}
|
|
1797
1797
|
};
|
|
1798
1798
|
if (P(e))
|
|
1799
1799
|
for (const [n, s] of Object.entries(e))
|
|
1800
|
-
t.fields[n] =
|
|
1800
|
+
t.fields[n] = Ln(s);
|
|
1801
1801
|
return t;
|
|
1802
1802
|
}
|
|
1803
|
-
function
|
|
1803
|
+
function Dn(e) {
|
|
1804
1804
|
const t = {};
|
|
1805
1805
|
for (const [n, s] of Object.entries(e.fields))
|
|
1806
|
-
t[n] =
|
|
1806
|
+
t[n] = Un(s);
|
|
1807
1807
|
return t;
|
|
1808
1808
|
}
|
|
1809
|
-
function
|
|
1809
|
+
function Un(e) {
|
|
1810
1810
|
switch (e.kind.case) {
|
|
1811
1811
|
case "structValue":
|
|
1812
|
-
return
|
|
1812
|
+
return Dn(e.kind.value);
|
|
1813
1813
|
case "listValue":
|
|
1814
|
-
return e.kind.value.values.map(
|
|
1814
|
+
return e.kind.value.values.map(Un);
|
|
1815
1815
|
case "nullValue":
|
|
1816
1816
|
case void 0:
|
|
1817
1817
|
return null;
|
|
@@ -1819,7 +1819,7 @@ function Dn(e) {
|
|
|
1819
1819
|
return e.kind.value;
|
|
1820
1820
|
}
|
|
1821
1821
|
}
|
|
1822
|
-
function
|
|
1822
|
+
function Ln(e) {
|
|
1823
1823
|
const t = {
|
|
1824
1824
|
$typeName: "google.protobuf.Value",
|
|
1825
1825
|
kind: { case: void 0 }
|
|
@@ -1836,7 +1836,7 @@ function Un(e) {
|
|
|
1836
1836
|
break;
|
|
1837
1837
|
case "object":
|
|
1838
1838
|
if (e === null)
|
|
1839
|
-
t.kind = { case: "nullValue", value:
|
|
1839
|
+
t.kind = { case: "nullValue", value: Vs };
|
|
1840
1840
|
else if (Array.isArray(e)) {
|
|
1841
1841
|
const n = {
|
|
1842
1842
|
$typeName: "google.protobuf.ListValue",
|
|
@@ -1844,7 +1844,7 @@ function Un(e) {
|
|
|
1844
1844
|
};
|
|
1845
1845
|
if (Array.isArray(e))
|
|
1846
1846
|
for (const s of e)
|
|
1847
|
-
n.values.push(
|
|
1847
|
+
n.values.push(Ln(s));
|
|
1848
1848
|
t.kind = {
|
|
1849
1849
|
case: "listValue",
|
|
1850
1850
|
value: n
|
|
@@ -1852,14 +1852,14 @@ function Un(e) {
|
|
|
1852
1852
|
} else
|
|
1853
1853
|
t.kind = {
|
|
1854
1854
|
case: "structValue",
|
|
1855
|
-
value:
|
|
1855
|
+
value: Cn(e)
|
|
1856
1856
|
};
|
|
1857
1857
|
break;
|
|
1858
1858
|
}
|
|
1859
1859
|
return t;
|
|
1860
1860
|
}
|
|
1861
|
-
function
|
|
1862
|
-
const t =
|
|
1861
|
+
function Ys(e) {
|
|
1862
|
+
const t = Xs();
|
|
1863
1863
|
let n = e.length * 3 / 4;
|
|
1864
1864
|
e[e.length - 2] == "=" ? n -= 2 : e[e.length - 1] == "=" && (n -= 1);
|
|
1865
1865
|
let s = new Uint8Array(n), r = 0, i = 0, a, o = 0;
|
|
@@ -1900,13 +1900,13 @@ function Bs(e) {
|
|
|
1900
1900
|
return s.subarray(0, r);
|
|
1901
1901
|
}
|
|
1902
1902
|
let ee, G;
|
|
1903
|
-
function
|
|
1903
|
+
function $s(e) {
|
|
1904
1904
|
return ee || (ee = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""), ee.slice(0, -2).concat("-", "_")), ee;
|
|
1905
1905
|
}
|
|
1906
|
-
function
|
|
1906
|
+
function Xs() {
|
|
1907
1907
|
if (!G) {
|
|
1908
1908
|
G = [];
|
|
1909
|
-
const e =
|
|
1909
|
+
const e = $s();
|
|
1910
1910
|
for (let t = 0; t < e.length; t++)
|
|
1911
1911
|
G[e[t].charCodeAt(0)] = t;
|
|
1912
1912
|
G[45] = e.indexOf("+"), G[95] = e.indexOf("/");
|
|
@@ -1941,7 +1941,7 @@ function he(e) {
|
|
|
1941
1941
|
}
|
|
1942
1942
|
return n.join("");
|
|
1943
1943
|
}
|
|
1944
|
-
const
|
|
1944
|
+
const Ks = /* @__PURE__ */ new Set([
|
|
1945
1945
|
// names reserved by JavaScript
|
|
1946
1946
|
"constructor",
|
|
1947
1947
|
"toString",
|
|
@@ -1949,25 +1949,25 @@ const Xs = /* @__PURE__ */ new Set([
|
|
|
1949
1949
|
"valueOf"
|
|
1950
1950
|
]);
|
|
1951
1951
|
function Z(e) {
|
|
1952
|
-
return
|
|
1952
|
+
return Ks.has(e) ? e + "$" : e;
|
|
1953
1953
|
}
|
|
1954
1954
|
function Qe(e) {
|
|
1955
1955
|
for (const t of e.field)
|
|
1956
1956
|
H(t, "jsonName") || (t.jsonName = he(t.name));
|
|
1957
1957
|
e.nestedType.forEach(Qe);
|
|
1958
1958
|
}
|
|
1959
|
-
function
|
|
1959
|
+
function Ws(e, t) {
|
|
1960
1960
|
const n = e.values.find((s) => s.name === t);
|
|
1961
1961
|
if (!n)
|
|
1962
1962
|
throw new Error(`cannot parse ${e} default value: ${t}`);
|
|
1963
1963
|
return n.number;
|
|
1964
1964
|
}
|
|
1965
|
-
function
|
|
1965
|
+
function js(e, t) {
|
|
1966
1966
|
switch (e) {
|
|
1967
1967
|
case c.STRING:
|
|
1968
1968
|
return t;
|
|
1969
1969
|
case c.BYTES: {
|
|
1970
|
-
const n =
|
|
1970
|
+
const n = qs(t);
|
|
1971
1971
|
if (n === !1)
|
|
1972
1972
|
throw new Error(`cannot parse ${c[e]} default value: ${t}`);
|
|
1973
1973
|
return n;
|
|
@@ -2001,7 +2001,7 @@ function Ws(e, t) {
|
|
|
2001
2001
|
return parseInt(t, 10);
|
|
2002
2002
|
}
|
|
2003
2003
|
}
|
|
2004
|
-
function
|
|
2004
|
+
function qs(e) {
|
|
2005
2005
|
const t = [], n = {
|
|
2006
2006
|
tail: e,
|
|
2007
2007
|
c: "",
|
|
@@ -2109,13 +2109,13 @@ function* Ue(e) {
|
|
|
2109
2109
|
break;
|
|
2110
2110
|
}
|
|
2111
2111
|
}
|
|
2112
|
-
function
|
|
2113
|
-
const t =
|
|
2112
|
+
function Mn(...e) {
|
|
2113
|
+
const t = Hs();
|
|
2114
2114
|
if (!e.length)
|
|
2115
2115
|
return t;
|
|
2116
2116
|
if ("$typeName" in e[0] && e[0].$typeName == "google.protobuf.FileDescriptorSet") {
|
|
2117
2117
|
for (const n of e[0].file)
|
|
2118
|
-
|
|
2118
|
+
St(n, t);
|
|
2119
2119
|
return t;
|
|
2120
2120
|
}
|
|
2121
2121
|
if ("$typeName" in e[0]) {
|
|
@@ -2133,14 +2133,14 @@ function Ln(...e) {
|
|
|
2133
2133
|
};
|
|
2134
2134
|
const n = e[0], s = e[1], r = /* @__PURE__ */ new Set();
|
|
2135
2135
|
for (const a of [n, ...i(n)].reverse())
|
|
2136
|
-
|
|
2136
|
+
St(a, t);
|
|
2137
2137
|
} else
|
|
2138
2138
|
for (const n of e)
|
|
2139
2139
|
for (const s of n.files)
|
|
2140
2140
|
t.addFile(s);
|
|
2141
2141
|
return t;
|
|
2142
2142
|
}
|
|
2143
|
-
function
|
|
2143
|
+
function Hs() {
|
|
2144
2144
|
const e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
|
|
2145
2145
|
return {
|
|
2146
2146
|
kind: "registry",
|
|
@@ -2199,7 +2199,7 @@ function qs() {
|
|
|
2199
2199
|
}
|
|
2200
2200
|
};
|
|
2201
2201
|
}
|
|
2202
|
-
const
|
|
2202
|
+
const Zs = 998, zs = 999, Qs = 9999, Js = 9, z = 10, j = 11, er = 12, It = 14, Je = 3, tr = 2, Nt = 1, nr = 0, _e = 1, Tt = 2, sr = 3, rr = 1, ir = 2, ar = 1, or = 2, cr = 1001, xn = {
|
|
2203
2203
|
// EDITION_PROTO2
|
|
2204
2204
|
998: {
|
|
2205
2205
|
fieldPresence: 1,
|
|
@@ -2277,15 +2277,15 @@ const Hs = 998, Zs = 999, zs = 9999, Qs = 9, z = 10, j = 11, Js = 12, wt = 14, J
|
|
|
2277
2277
|
// EXPORT_TOP_LEVEL,
|
|
2278
2278
|
}
|
|
2279
2279
|
};
|
|
2280
|
-
function
|
|
2280
|
+
function St(e, t) {
|
|
2281
2281
|
var n, s;
|
|
2282
2282
|
const r = {
|
|
2283
2283
|
kind: "file",
|
|
2284
2284
|
proto: e,
|
|
2285
2285
|
deprecated: (s = (n = e.options) === null || n === void 0 ? void 0 : n.deprecated) !== null && s !== void 0 ? s : !1,
|
|
2286
|
-
edition:
|
|
2286
|
+
edition: hr(e),
|
|
2287
2287
|
name: e.name.replace(/\.proto$/, ""),
|
|
2288
|
-
dependencies:
|
|
2288
|
+
dependencies: fr(e, t),
|
|
2289
2289
|
enums: [],
|
|
2290
2290
|
messages: [],
|
|
2291
2291
|
extensions: [],
|
|
@@ -2303,11 +2303,11 @@ function Tt(e, t) {
|
|
|
2303
2303
|
}
|
|
2304
2304
|
};
|
|
2305
2305
|
for (const o of e.enumType)
|
|
2306
|
-
|
|
2306
|
+
Pn(o, r, void 0, t);
|
|
2307
2307
|
for (const o of e.messageType)
|
|
2308
|
-
|
|
2308
|
+
Vn(o, r, void 0, t, a);
|
|
2309
2309
|
for (const o of e.service)
|
|
2310
|
-
|
|
2310
|
+
ur(o, r, t);
|
|
2311
2311
|
Le(r, t);
|
|
2312
2312
|
for (const o of i.values())
|
|
2313
2313
|
Me(o, t, a);
|
|
@@ -2334,9 +2334,9 @@ function Le(e, t) {
|
|
|
2334
2334
|
}
|
|
2335
2335
|
}
|
|
2336
2336
|
function Me(e, t, n) {
|
|
2337
|
-
const s = e.proto.oneofDecl.map((i) =>
|
|
2337
|
+
const s = e.proto.oneofDecl.map((i) => dr(i, e)), r = /* @__PURE__ */ new Set();
|
|
2338
2338
|
for (const i of e.proto.field) {
|
|
2339
|
-
const a =
|
|
2339
|
+
const a = br(i, s), o = xe(i, e, t, a, n);
|
|
2340
2340
|
e.fields.push(o), e.field[o.localName] = o, a === void 0 ? e.members.push(o) : (a.fields.push(o), r.has(a) || (r.add(a), e.members.push(a)));
|
|
2341
2341
|
}
|
|
2342
2342
|
for (const i of s.filter((a) => r.has(a)))
|
|
@@ -2344,9 +2344,9 @@ function Me(e, t, n) {
|
|
|
2344
2344
|
for (const i of e.nestedMessages)
|
|
2345
2345
|
Me(i, t, n);
|
|
2346
2346
|
}
|
|
2347
|
-
function
|
|
2347
|
+
function Pn(e, t, n, s) {
|
|
2348
2348
|
var r, i, a, o, l;
|
|
2349
|
-
const u =
|
|
2349
|
+
const u = mr(e.name, e.value), d = {
|
|
2350
2350
|
kind: "enum",
|
|
2351
2351
|
proto: e,
|
|
2352
2352
|
deprecated: (i = (r = e.options) === null || r === void 0 ? void 0 : r.deprecated) !== null && i !== void 0 ? i : !1,
|
|
@@ -2362,7 +2362,7 @@ function xn(e, t, n, s) {
|
|
|
2362
2362
|
return `enum ${this.typeName}`;
|
|
2363
2363
|
}
|
|
2364
2364
|
};
|
|
2365
|
-
d.open =
|
|
2365
|
+
d.open = wr(d), s.add(d);
|
|
2366
2366
|
for (const f of e.value) {
|
|
2367
2367
|
const p = f.name;
|
|
2368
2368
|
d.values.push(
|
|
@@ -2383,7 +2383,7 @@ function xn(e, t, n, s) {
|
|
|
2383
2383
|
}
|
|
2384
2384
|
((l = n?.nestedEnums) !== null && l !== void 0 ? l : t.enums).push(d);
|
|
2385
2385
|
}
|
|
2386
|
-
function
|
|
2386
|
+
function Vn(e, t, n, s, r) {
|
|
2387
2387
|
var i, a, o, l;
|
|
2388
2388
|
const u = {
|
|
2389
2389
|
kind: "message",
|
|
@@ -2406,11 +2406,11 @@ function Pn(e, t, n, s, r) {
|
|
|
2406
2406
|
};
|
|
2407
2407
|
((o = e.options) === null || o === void 0 ? void 0 : o.mapEntry) === !0 ? r.add(u) : (((l = n?.nestedMessages) !== null && l !== void 0 ? l : t.messages).push(u), s.add(u));
|
|
2408
2408
|
for (const d of e.enumType)
|
|
2409
|
-
|
|
2409
|
+
Pn(d, t, u, s);
|
|
2410
2410
|
for (const d of e.nestedType)
|
|
2411
|
-
|
|
2411
|
+
Vn(d, t, u, s, r);
|
|
2412
2412
|
}
|
|
2413
|
-
function
|
|
2413
|
+
function ur(e, t, n) {
|
|
2414
2414
|
var s, r;
|
|
2415
2415
|
const i = {
|
|
2416
2416
|
kind: "service",
|
|
@@ -2427,11 +2427,11 @@ function cr(e, t, n) {
|
|
|
2427
2427
|
};
|
|
2428
2428
|
t.services.push(i), n.add(i);
|
|
2429
2429
|
for (const a of e.method) {
|
|
2430
|
-
const o =
|
|
2430
|
+
const o = lr(a, i, n);
|
|
2431
2431
|
i.methods.push(o), i.method[o.localName] = o;
|
|
2432
2432
|
}
|
|
2433
2433
|
}
|
|
2434
|
-
function
|
|
2434
|
+
function lr(e, t, n) {
|
|
2435
2435
|
var s, r, i, a;
|
|
2436
2436
|
let o;
|
|
2437
2437
|
e.clientStreaming && e.serverStreaming ? o = "bidi_streaming" : e.clientStreaming ? o = "client_streaming" : e.serverStreaming ? o = "server_streaming" : o = "unary";
|
|
@@ -2448,13 +2448,13 @@ function ur(e, t, n) {
|
|
|
2448
2448
|
methodKind: o,
|
|
2449
2449
|
input: l,
|
|
2450
2450
|
output: u,
|
|
2451
|
-
idempotency: (a = (i = e.options) === null || i === void 0 ? void 0 : i.idempotencyLevel) !== null && a !== void 0 ? a :
|
|
2451
|
+
idempotency: (a = (i = e.options) === null || i === void 0 ? void 0 : i.idempotencyLevel) !== null && a !== void 0 ? a : nr,
|
|
2452
2452
|
toString() {
|
|
2453
2453
|
return `rpc ${t.typeName}.${d}`;
|
|
2454
2454
|
}
|
|
2455
2455
|
};
|
|
2456
2456
|
}
|
|
2457
|
-
function
|
|
2457
|
+
function dr(e, t) {
|
|
2458
2458
|
return {
|
|
2459
2459
|
kind: "oneof",
|
|
2460
2460
|
proto: e,
|
|
@@ -2479,8 +2479,8 @@ function xe(e, t, n, s, r) {
|
|
|
2479
2479
|
scalar: void 0,
|
|
2480
2480
|
message: void 0,
|
|
2481
2481
|
enum: void 0,
|
|
2482
|
-
presence:
|
|
2483
|
-
utf8Validation:
|
|
2482
|
+
presence: gr(e, s, l, t),
|
|
2483
|
+
utf8Validation: Ir(e, t),
|
|
2484
2484
|
listKind: void 0,
|
|
2485
2485
|
mapKind: void 0,
|
|
2486
2486
|
mapKey: void 0,
|
|
@@ -2503,59 +2503,59 @@ function xe(e, t, n, s, r) {
|
|
|
2503
2503
|
const m = f == j ? r?.get(D(e.typeName)) : void 0;
|
|
2504
2504
|
if (m) {
|
|
2505
2505
|
u.fieldKind = "map";
|
|
2506
|
-
const { key: g, value: E } =
|
|
2506
|
+
const { key: g, value: E } = yr(m);
|
|
2507
2507
|
return u.mapKey = g.scalar, u.mapKind = E.fieldKind, u.message = E.message, u.delimitedEncoding = !1, u.enum = E.enum, u.scalar = E.scalar, u;
|
|
2508
2508
|
}
|
|
2509
2509
|
switch (u.fieldKind = "list", f) {
|
|
2510
2510
|
case j:
|
|
2511
2511
|
case z:
|
|
2512
|
-
u.listKind = "message", u.message = n.getMessage(D(e.typeName)), A(u.message), u.delimitedEncoding =
|
|
2512
|
+
u.listKind = "message", u.message = n.getMessage(D(e.typeName)), A(u.message), u.delimitedEncoding = kt(e, t);
|
|
2513
2513
|
break;
|
|
2514
|
-
case
|
|
2514
|
+
case It:
|
|
2515
2515
|
u.listKind = "enum", u.enum = n.getEnum(D(e.typeName)), A(u.enum);
|
|
2516
2516
|
break;
|
|
2517
2517
|
default:
|
|
2518
|
-
u.listKind = "scalar", u.scalar = f, u.longAsString = p ==
|
|
2518
|
+
u.listKind = "scalar", u.scalar = f, u.longAsString = p == Nt;
|
|
2519
2519
|
break;
|
|
2520
2520
|
}
|
|
2521
|
-
return u.packed =
|
|
2521
|
+
return u.packed = Er(e, t), u;
|
|
2522
2522
|
}
|
|
2523
2523
|
switch (f) {
|
|
2524
2524
|
case j:
|
|
2525
2525
|
case z:
|
|
2526
|
-
u.fieldKind = "message", u.message = n.getMessage(D(e.typeName)), A(u.message, `invalid FieldDescriptorProto: type_name ${e.typeName} not found`), u.delimitedEncoding =
|
|
2526
|
+
u.fieldKind = "message", u.message = n.getMessage(D(e.typeName)), A(u.message, `invalid FieldDescriptorProto: type_name ${e.typeName} not found`), u.delimitedEncoding = kt(e, t), u.getDefaultValue = () => {
|
|
2527
2527
|
};
|
|
2528
2528
|
break;
|
|
2529
|
-
case
|
|
2529
|
+
case It: {
|
|
2530
2530
|
const m = n.getEnum(D(e.typeName));
|
|
2531
|
-
A(m !== void 0, `invalid FieldDescriptorProto: type_name ${e.typeName} not found`), u.fieldKind = "enum", u.enum = n.getEnum(D(e.typeName)), u.getDefaultValue = () => H(e, "defaultValue") ?
|
|
2531
|
+
A(m !== void 0, `invalid FieldDescriptorProto: type_name ${e.typeName} not found`), u.fieldKind = "enum", u.enum = n.getEnum(D(e.typeName)), u.getDefaultValue = () => H(e, "defaultValue") ? Ws(m, e.defaultValue) : void 0;
|
|
2532
2532
|
break;
|
|
2533
2533
|
}
|
|
2534
2534
|
default: {
|
|
2535
|
-
u.fieldKind = "scalar", u.scalar = f, u.longAsString = p ==
|
|
2535
|
+
u.fieldKind = "scalar", u.scalar = f, u.longAsString = p == Nt, u.getDefaultValue = () => H(e, "defaultValue") ? js(f, e.defaultValue) : void 0;
|
|
2536
2536
|
break;
|
|
2537
2537
|
}
|
|
2538
2538
|
}
|
|
2539
2539
|
return u;
|
|
2540
2540
|
}
|
|
2541
|
-
function
|
|
2541
|
+
function hr(e) {
|
|
2542
2542
|
switch (e.syntax) {
|
|
2543
2543
|
case "":
|
|
2544
2544
|
case "proto2":
|
|
2545
|
-
return Hs;
|
|
2546
|
-
case "proto3":
|
|
2547
2545
|
return Zs;
|
|
2546
|
+
case "proto3":
|
|
2547
|
+
return zs;
|
|
2548
2548
|
case "editions":
|
|
2549
|
-
if (e.edition ===
|
|
2550
|
-
return
|
|
2551
|
-
if (e.edition in
|
|
2549
|
+
if (e.edition === Qs)
|
|
2550
|
+
return cr;
|
|
2551
|
+
if (e.edition in xn)
|
|
2552
2552
|
return e.edition;
|
|
2553
2553
|
throw new Error(`${e.name}: unsupported edition`);
|
|
2554
2554
|
default:
|
|
2555
2555
|
throw new Error(`${e.name}: unsupported syntax "${e.syntax}"`);
|
|
2556
2556
|
}
|
|
2557
2557
|
}
|
|
2558
|
-
function
|
|
2558
|
+
function fr(e, t) {
|
|
2559
2559
|
return e.dependency.map((n) => {
|
|
2560
2560
|
const s = t.getFile(n);
|
|
2561
2561
|
if (!s)
|
|
@@ -2563,8 +2563,8 @@ function hr(e, t) {
|
|
|
2563
2563
|
return s;
|
|
2564
2564
|
});
|
|
2565
2565
|
}
|
|
2566
|
-
function
|
|
2567
|
-
const n =
|
|
2566
|
+
function mr(e, t) {
|
|
2567
|
+
const n = pr(e) + "_";
|
|
2568
2568
|
for (const s of t) {
|
|
2569
2569
|
if (!s.name.toLowerCase().startsWith(n))
|
|
2570
2570
|
return;
|
|
@@ -2574,7 +2574,7 @@ function fr(e, t) {
|
|
|
2574
2574
|
}
|
|
2575
2575
|
return n;
|
|
2576
2576
|
}
|
|
2577
|
-
function
|
|
2577
|
+
function pr(e) {
|
|
2578
2578
|
return (e.substring(0, 1) + e.substring(1).replace(/[A-Z]/g, (t) => "_" + t)).toLowerCase();
|
|
2579
2579
|
}
|
|
2580
2580
|
function Ee(e, t, n) {
|
|
@@ -2584,57 +2584,57 @@ function Ee(e, t, n) {
|
|
|
2584
2584
|
function D(e) {
|
|
2585
2585
|
return e.startsWith(".") ? e.substring(1) : e;
|
|
2586
2586
|
}
|
|
2587
|
-
function
|
|
2587
|
+
function br(e, t) {
|
|
2588
2588
|
if (!H(e, "oneofIndex") || e.proto3Optional)
|
|
2589
2589
|
return;
|
|
2590
2590
|
const n = t[e.oneofIndex];
|
|
2591
2591
|
return A(n, `invalid FieldDescriptorProto: oneof #${e.oneofIndex} for field #${e.number} not found`), n;
|
|
2592
2592
|
}
|
|
2593
|
-
function
|
|
2594
|
-
if (e.label ==
|
|
2595
|
-
return
|
|
2593
|
+
function gr(e, t, n, s) {
|
|
2594
|
+
if (e.label == tr)
|
|
2595
|
+
return sr;
|
|
2596
2596
|
if (e.label == Je)
|
|
2597
|
-
return
|
|
2597
|
+
return Tt;
|
|
2598
2598
|
if (t || e.proto3Optional || n)
|
|
2599
2599
|
return _e;
|
|
2600
2600
|
const r = F("fieldPresence", { proto: e, parent: s });
|
|
2601
|
-
return r ==
|
|
2601
|
+
return r == Tt && (e.type == j || e.type == z) ? _e : r;
|
|
2602
2602
|
}
|
|
2603
|
-
function
|
|
2603
|
+
function Er(e, t) {
|
|
2604
2604
|
if (e.label != Je)
|
|
2605
2605
|
return !1;
|
|
2606
2606
|
switch (e.type) {
|
|
2607
|
-
case Qs:
|
|
2608
2607
|
case Js:
|
|
2608
|
+
case er:
|
|
2609
2609
|
case z:
|
|
2610
2610
|
case j:
|
|
2611
2611
|
return !1;
|
|
2612
2612
|
}
|
|
2613
2613
|
const n = e.options;
|
|
2614
|
-
return n && H(n, "packed") ? n.packed :
|
|
2614
|
+
return n && H(n, "packed") ? n.packed : rr == F("repeatedFieldEncoding", {
|
|
2615
2615
|
proto: e,
|
|
2616
2616
|
parent: t
|
|
2617
2617
|
});
|
|
2618
2618
|
}
|
|
2619
|
-
function
|
|
2619
|
+
function yr(e) {
|
|
2620
2620
|
const t = e.fields.find((s) => s.number === 1), n = e.fields.find((s) => s.number === 2);
|
|
2621
2621
|
return A(t && t.fieldKind == "scalar" && t.scalar != c.BYTES && t.scalar != c.FLOAT && t.scalar != c.DOUBLE && n && n.fieldKind != "list" && n.fieldKind != "map"), { key: t, value: n };
|
|
2622
2622
|
}
|
|
2623
|
-
function
|
|
2623
|
+
function wr(e) {
|
|
2624
2624
|
var t;
|
|
2625
|
-
return
|
|
2625
|
+
return ar == F("enumType", {
|
|
2626
2626
|
proto: e.proto,
|
|
2627
2627
|
parent: (t = e.parent) !== null && t !== void 0 ? t : e.file
|
|
2628
2628
|
});
|
|
2629
2629
|
}
|
|
2630
|
-
function
|
|
2631
|
-
return e.type == z ? !0 :
|
|
2630
|
+
function kt(e, t) {
|
|
2631
|
+
return e.type == z ? !0 : ir == F("messageEncoding", {
|
|
2632
2632
|
proto: e,
|
|
2633
2633
|
parent: t
|
|
2634
2634
|
});
|
|
2635
2635
|
}
|
|
2636
|
-
function
|
|
2637
|
-
return
|
|
2636
|
+
function Ir(e, t) {
|
|
2637
|
+
return or == F("utf8Validation", {
|
|
2638
2638
|
proto: e,
|
|
2639
2639
|
parent: t
|
|
2640
2640
|
});
|
|
@@ -2650,7 +2650,7 @@ function F(e, t) {
|
|
|
2650
2650
|
if ("kind" in t) {
|
|
2651
2651
|
if (t.kind == "message")
|
|
2652
2652
|
return F(e, (s = t.parent) !== null && s !== void 0 ? s : t.file);
|
|
2653
|
-
const i =
|
|
2653
|
+
const i = xn[t.edition];
|
|
2654
2654
|
if (!i)
|
|
2655
2655
|
throw new Error(`feature default for edition ${t.edition} not found`);
|
|
2656
2656
|
return i[e];
|
|
@@ -2661,35 +2661,35 @@ function A(e, t) {
|
|
|
2661
2661
|
if (!e)
|
|
2662
2662
|
throw new Error(t);
|
|
2663
2663
|
}
|
|
2664
|
-
function
|
|
2665
|
-
const t =
|
|
2666
|
-
return t.messageType.forEach(Qe),
|
|
2664
|
+
function Nr(e) {
|
|
2665
|
+
const t = Tr(e);
|
|
2666
|
+
return t.messageType.forEach(Qe), Mn(t, () => {
|
|
2667
2667
|
}).getFile(t.name);
|
|
2668
2668
|
}
|
|
2669
|
-
function
|
|
2669
|
+
function Tr(e) {
|
|
2670
2670
|
return Object.assign(/* @__PURE__ */ Object.create({
|
|
2671
2671
|
syntax: "",
|
|
2672
2672
|
edition: 0
|
|
2673
|
-
}), Object.assign(Object.assign({ $typeName: "google.protobuf.FileDescriptorProto", dependency: [], publicDependency: [], weakDependency: [], optionDependency: [], service: [], extension: [] }, e), { messageType: e.messageType.map(
|
|
2673
|
+
}), Object.assign(Object.assign({ $typeName: "google.protobuf.FileDescriptorProto", dependency: [], publicDependency: [], weakDependency: [], optionDependency: [], service: [], extension: [] }, e), { messageType: e.messageType.map(Fn), enumType: e.enumType.map(Gn) }));
|
|
2674
2674
|
}
|
|
2675
|
-
function
|
|
2675
|
+
function Fn(e) {
|
|
2676
2676
|
var t, n, s, r, i, a, o, l;
|
|
2677
2677
|
return Object.assign(/* @__PURE__ */ Object.create({
|
|
2678
2678
|
visibility: 0
|
|
2679
2679
|
}), {
|
|
2680
2680
|
$typeName: "google.protobuf.DescriptorProto",
|
|
2681
2681
|
name: e.name,
|
|
2682
|
-
field: (n = (t = e.field) === null || t === void 0 ? void 0 : t.map(
|
|
2682
|
+
field: (n = (t = e.field) === null || t === void 0 ? void 0 : t.map(Sr)) !== null && n !== void 0 ? n : [],
|
|
2683
2683
|
extension: [],
|
|
2684
|
-
nestedType: (r = (s = e.nestedType) === null || s === void 0 ? void 0 : s.map(
|
|
2685
|
-
enumType: (a = (i = e.enumType) === null || i === void 0 ? void 0 : i.map(
|
|
2684
|
+
nestedType: (r = (s = e.nestedType) === null || s === void 0 ? void 0 : s.map(Fn)) !== null && r !== void 0 ? r : [],
|
|
2685
|
+
enumType: (a = (i = e.enumType) === null || i === void 0 ? void 0 : i.map(Gn)) !== null && a !== void 0 ? a : [],
|
|
2686
2686
|
extensionRange: (l = (o = e.extensionRange) === null || o === void 0 ? void 0 : o.map((d) => Object.assign({ $typeName: "google.protobuf.DescriptorProto.ExtensionRange" }, d))) !== null && l !== void 0 ? l : [],
|
|
2687
2687
|
oneofDecl: [],
|
|
2688
2688
|
reservedRange: [],
|
|
2689
2689
|
reservedName: []
|
|
2690
2690
|
});
|
|
2691
2691
|
}
|
|
2692
|
-
function
|
|
2692
|
+
function Sr(e) {
|
|
2693
2693
|
return Object.assign(/* @__PURE__ */ Object.create({
|
|
2694
2694
|
label: 1,
|
|
2695
2695
|
typeName: "",
|
|
@@ -2698,9 +2698,9 @@ function Tr(e) {
|
|
|
2698
2698
|
oneofIndex: 0,
|
|
2699
2699
|
jsonName: "",
|
|
2700
2700
|
proto3Optional: !1
|
|
2701
|
-
}), Object.assign(Object.assign({ $typeName: "google.protobuf.FieldDescriptorProto" }, e), { options: e.options ?
|
|
2701
|
+
}), Object.assign(Object.assign({ $typeName: "google.protobuf.FieldDescriptorProto" }, e), { options: e.options ? kr(e.options) : void 0 }));
|
|
2702
2702
|
}
|
|
2703
|
-
function
|
|
2703
|
+
function kr(e) {
|
|
2704
2704
|
var t, n, s;
|
|
2705
2705
|
return Object.assign(/* @__PURE__ */ Object.create({
|
|
2706
2706
|
ctype: 0,
|
|
@@ -2714,7 +2714,7 @@ function Sr(e) {
|
|
|
2714
2714
|
retention: 0
|
|
2715
2715
|
}), Object.assign(Object.assign({ $typeName: "google.protobuf.FieldOptions" }, e), { targets: (t = e.targets) !== null && t !== void 0 ? t : [], editionDefaults: (s = (n = e.editionDefaults) === null || n === void 0 ? void 0 : n.map((i) => Object.assign({ $typeName: "google.protobuf.FieldOptions.EditionDefault" }, i))) !== null && s !== void 0 ? s : [], uninterpretedOption: [] }));
|
|
2716
2716
|
}
|
|
2717
|
-
function
|
|
2717
|
+
function Gn(e) {
|
|
2718
2718
|
return Object.assign(/* @__PURE__ */ Object.create({
|
|
2719
2719
|
visibility: 0
|
|
2720
2720
|
}), {
|
|
@@ -2728,95 +2728,95 @@ function Fn(e) {
|
|
|
2728
2728
|
function R(e, t, ...n) {
|
|
2729
2729
|
return n.reduce((s, r) => s.nestedMessages[r], e.messages[t]);
|
|
2730
2730
|
}
|
|
2731
|
-
const kr = /* @__PURE__ */ Ir({ name: "google/protobuf/descriptor.proto", package: "google.protobuf", messageType: [{ name: "FileDescriptorSet", field: [{ name: "file", number: 1, type: 11, label: 3, typeName: ".google.protobuf.FileDescriptorProto" }], extensionRange: [{ start: 536e6, end: 536000001 }] }, { name: "FileDescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "package", number: 2, type: 9, label: 1 }, { name: "dependency", number: 3, type: 9, label: 3 }, { name: "public_dependency", number: 10, type: 5, label: 3 }, { name: "weak_dependency", number: 11, type: 5, label: 3 }, { name: "option_dependency", number: 15, type: 9, label: 3 }, { name: "message_type", number: 4, type: 11, label: 3, typeName: ".google.protobuf.DescriptorProto" }, { name: "enum_type", number: 5, type: 11, label: 3, typeName: ".google.protobuf.EnumDescriptorProto" }, { name: "service", number: 6, type: 11, label: 3, typeName: ".google.protobuf.ServiceDescriptorProto" }, { name: "extension", number: 7, type: 11, label: 3, typeName: ".google.protobuf.FieldDescriptorProto" }, { name: "options", number: 8, type: 11, label: 1, typeName: ".google.protobuf.FileOptions" }, { name: "source_code_info", number: 9, type: 11, label: 1, typeName: ".google.protobuf.SourceCodeInfo" }, { name: "syntax", number: 12, type: 9, label: 1 }, { name: "edition", number: 14, type: 14, label: 1, typeName: ".google.protobuf.Edition" }] }, { name: "DescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "field", number: 2, type: 11, label: 3, typeName: ".google.protobuf.FieldDescriptorProto" }, { name: "extension", number: 6, type: 11, label: 3, typeName: ".google.protobuf.FieldDescriptorProto" }, { name: "nested_type", number: 3, type: 11, label: 3, typeName: ".google.protobuf.DescriptorProto" }, { name: "enum_type", number: 4, type: 11, label: 3, typeName: ".google.protobuf.EnumDescriptorProto" }, { name: "extension_range", number: 5, type: 11, label: 3, typeName: ".google.protobuf.DescriptorProto.ExtensionRange" }, { name: "oneof_decl", number: 8, type: 11, label: 3, typeName: ".google.protobuf.OneofDescriptorProto" }, { name: "options", number: 7, type: 11, label: 1, typeName: ".google.protobuf.MessageOptions" }, { name: "reserved_range", number: 9, type: 11, label: 3, typeName: ".google.protobuf.DescriptorProto.ReservedRange" }, { name: "reserved_name", number: 10, type: 9, label: 3 }, { name: "visibility", number: 11, type: 14, label: 1, typeName: ".google.protobuf.SymbolVisibility" }], nestedType: [{ name: "ExtensionRange", field: [{ name: "start", number: 1, type: 5, label: 1 }, { name: "end", number: 2, type: 5, label: 1 }, { name: "options", number: 3, type: 11, label: 1, typeName: ".google.protobuf.ExtensionRangeOptions" }] }, { name: "ReservedRange", field: [{ name: "start", number: 1, type: 5, label: 1 }, { name: "end", number: 2, type: 5, label: 1 }] }] }, { name: "ExtensionRangeOptions", field: [{ name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }, { name: "declaration", number: 2, type: 11, label: 3, typeName: ".google.protobuf.ExtensionRangeOptions.Declaration", options: { retention: 2 } }, { name: "features", number: 50, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "verification", number: 3, type: 14, label: 1, typeName: ".google.protobuf.ExtensionRangeOptions.VerificationState", defaultValue: "UNVERIFIED", options: { retention: 2 } }], nestedType: [{ name: "Declaration", field: [{ name: "number", number: 1, type: 5, label: 1 }, { name: "full_name", number: 2, type: 9, label: 1 }, { name: "type", number: 3, type: 9, label: 1 }, { name: "reserved", number: 5, type: 8, label: 1 }, { name: "repeated", number: 6, type: 8, label: 1 }] }], enumType: [{ name: "VerificationState", value: [{ name: "DECLARATION", number: 0 }, { name: "UNVERIFIED", number: 1 }] }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "FieldDescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "number", number: 3, type: 5, label: 1 }, { name: "label", number: 4, type: 14, label: 1, typeName: ".google.protobuf.FieldDescriptorProto.Label" }, { name: "type", number: 5, type: 14, label: 1, typeName: ".google.protobuf.FieldDescriptorProto.Type" }, { name: "type_name", number: 6, type: 9, label: 1 }, { name: "extendee", number: 2, type: 9, label: 1 }, { name: "default_value", number: 7, type: 9, label: 1 }, { name: "oneof_index", number: 9, type: 5, label: 1 }, { name: "json_name", number: 10, type: 9, label: 1 }, { name: "options", number: 8, type: 11, label: 1, typeName: ".google.protobuf.FieldOptions" }, { name: "proto3_optional", number: 17, type: 8, label: 1 }], enumType: [{ name: "Type", value: [{ name: "TYPE_DOUBLE", number: 1 }, { name: "TYPE_FLOAT", number: 2 }, { name: "TYPE_INT64", number: 3 }, { name: "TYPE_UINT64", number: 4 }, { name: "TYPE_INT32", number: 5 }, { name: "TYPE_FIXED64", number: 6 }, { name: "TYPE_FIXED32", number: 7 }, { name: "TYPE_BOOL", number: 8 }, { name: "TYPE_STRING", number: 9 }, { name: "TYPE_GROUP", number: 10 }, { name: "TYPE_MESSAGE", number: 11 }, { name: "TYPE_BYTES", number: 12 }, { name: "TYPE_UINT32", number: 13 }, { name: "TYPE_ENUM", number: 14 }, { name: "TYPE_SFIXED32", number: 15 }, { name: "TYPE_SFIXED64", number: 16 }, { name: "TYPE_SINT32", number: 17 }, { name: "TYPE_SINT64", number: 18 }] }, { name: "Label", value: [{ name: "LABEL_OPTIONAL", number: 1 }, { name: "LABEL_REPEATED", number: 3 }, { name: "LABEL_REQUIRED", number: 2 }] }] }, { name: "OneofDescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "options", number: 2, type: 11, label: 1, typeName: ".google.protobuf.OneofOptions" }] }, { name: "EnumDescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "value", number: 2, type: 11, label: 3, typeName: ".google.protobuf.EnumValueDescriptorProto" }, { name: "options", number: 3, type: 11, label: 1, typeName: ".google.protobuf.EnumOptions" }, { name: "reserved_range", number: 4, type: 11, label: 3, typeName: ".google.protobuf.EnumDescriptorProto.EnumReservedRange" }, { name: "reserved_name", number: 5, type: 9, label: 3 }, { name: "visibility", number: 6, type: 14, label: 1, typeName: ".google.protobuf.SymbolVisibility" }], nestedType: [{ name: "EnumReservedRange", field: [{ name: "start", number: 1, type: 5, label: 1 }, { name: "end", number: 2, type: 5, label: 1 }] }] }, { name: "EnumValueDescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "number", number: 2, type: 5, label: 1 }, { name: "options", number: 3, type: 11, label: 1, typeName: ".google.protobuf.EnumValueOptions" }] }, { name: "ServiceDescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "method", number: 2, type: 11, label: 3, typeName: ".google.protobuf.MethodDescriptorProto" }, { name: "options", number: 3, type: 11, label: 1, typeName: ".google.protobuf.ServiceOptions" }] }, { name: "MethodDescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "input_type", number: 2, type: 9, label: 1 }, { name: "output_type", number: 3, type: 9, label: 1 }, { name: "options", number: 4, type: 11, label: 1, typeName: ".google.protobuf.MethodOptions" }, { name: "client_streaming", number: 5, type: 8, label: 1, defaultValue: "false" }, { name: "server_streaming", number: 6, type: 8, label: 1, defaultValue: "false" }] }, { name: "FileOptions", field: [{ name: "java_package", number: 1, type: 9, label: 1 }, { name: "java_outer_classname", number: 8, type: 9, label: 1 }, { name: "java_multiple_files", number: 10, type: 8, label: 1, defaultValue: "false", options: {} }, { name: "java_generate_equals_and_hash", number: 20, type: 8, label: 1, options: { deprecated: !0 } }, { name: "java_string_check_utf8", number: 27, type: 8, label: 1, defaultValue: "false" }, { name: "optimize_for", number: 9, type: 14, label: 1, typeName: ".google.protobuf.FileOptions.OptimizeMode", defaultValue: "SPEED" }, { name: "go_package", number: 11, type: 9, label: 1 }, { name: "cc_generic_services", number: 16, type: 8, label: 1, defaultValue: "false" }, { name: "java_generic_services", number: 17, type: 8, label: 1, defaultValue: "false" }, { name: "py_generic_services", number: 18, type: 8, label: 1, defaultValue: "false" }, { name: "deprecated", number: 23, type: 8, label: 1, defaultValue: "false" }, { name: "cc_enable_arenas", number: 31, type: 8, label: 1, defaultValue: "true" }, { name: "objc_class_prefix", number: 36, type: 9, label: 1 }, { name: "csharp_namespace", number: 37, type: 9, label: 1 }, { name: "swift_prefix", number: 39, type: 9, label: 1 }, { name: "php_class_prefix", number: 40, type: 9, label: 1 }, { name: "php_namespace", number: 41, type: 9, label: 1 }, { name: "php_metadata_namespace", number: 44, type: 9, label: 1 }, { name: "ruby_package", number: 45, type: 9, label: 1 }, { name: "features", number: 50, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], enumType: [{ name: "OptimizeMode", value: [{ name: "SPEED", number: 1 }, { name: "CODE_SIZE", number: 2 }, { name: "LITE_RUNTIME", number: 3 }] }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "MessageOptions", field: [{ name: "message_set_wire_format", number: 1, type: 8, label: 1, defaultValue: "false" }, { name: "no_standard_descriptor_accessor", number: 2, type: 8, label: 1, defaultValue: "false" }, { name: "deprecated", number: 3, type: 8, label: 1, defaultValue: "false" }, { name: "map_entry", number: 7, type: 8, label: 1 }, { name: "deprecated_legacy_json_field_conflicts", number: 11, type: 8, label: 1, options: { deprecated: !0 } }, { name: "features", number: 12, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "FieldOptions", field: [{ name: "ctype", number: 1, type: 14, label: 1, typeName: ".google.protobuf.FieldOptions.CType", defaultValue: "STRING" }, { name: "packed", number: 2, type: 8, label: 1 }, { name: "jstype", number: 6, type: 14, label: 1, typeName: ".google.protobuf.FieldOptions.JSType", defaultValue: "JS_NORMAL" }, { name: "lazy", number: 5, type: 8, label: 1, defaultValue: "false" }, { name: "unverified_lazy", number: 15, type: 8, label: 1, defaultValue: "false" }, { name: "deprecated", number: 3, type: 8, label: 1, defaultValue: "false" }, { name: "weak", number: 10, type: 8, label: 1, defaultValue: "false", options: { deprecated: !0 } }, { name: "debug_redact", number: 16, type: 8, label: 1, defaultValue: "false" }, { name: "retention", number: 17, type: 14, label: 1, typeName: ".google.protobuf.FieldOptions.OptionRetention" }, { name: "targets", number: 19, type: 14, label: 3, typeName: ".google.protobuf.FieldOptions.OptionTargetType" }, { name: "edition_defaults", number: 20, type: 11, label: 3, typeName: ".google.protobuf.FieldOptions.EditionDefault" }, { name: "features", number: 21, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "feature_support", number: 22, type: 11, label: 1, typeName: ".google.protobuf.FieldOptions.FeatureSupport" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], nestedType: [{ name: "EditionDefault", field: [{ name: "edition", number: 3, type: 14, label: 1, typeName: ".google.protobuf.Edition" }, { name: "value", number: 2, type: 9, label: 1 }] }, { name: "FeatureSupport", field: [{ name: "edition_introduced", number: 1, type: 14, label: 1, typeName: ".google.protobuf.Edition" }, { name: "edition_deprecated", number: 2, type: 14, label: 1, typeName: ".google.protobuf.Edition" }, { name: "deprecation_warning", number: 3, type: 9, label: 1 }, { name: "edition_removed", number: 4, type: 14, label: 1, typeName: ".google.protobuf.Edition" }, { name: "removal_error", number: 5, type: 9, label: 1 }] }], enumType: [{ name: "CType", value: [{ name: "STRING", number: 0 }, { name: "CORD", number: 1 }, { name: "STRING_PIECE", number: 2 }] }, { name: "JSType", value: [{ name: "JS_NORMAL", number: 0 }, { name: "JS_STRING", number: 1 }, { name: "JS_NUMBER", number: 2 }] }, { name: "OptionRetention", value: [{ name: "RETENTION_UNKNOWN", number: 0 }, { name: "RETENTION_RUNTIME", number: 1 }, { name: "RETENTION_SOURCE", number: 2 }] }, { name: "OptionTargetType", value: [{ name: "TARGET_TYPE_UNKNOWN", number: 0 }, { name: "TARGET_TYPE_FILE", number: 1 }, { name: "TARGET_TYPE_EXTENSION_RANGE", number: 2 }, { name: "TARGET_TYPE_MESSAGE", number: 3 }, { name: "TARGET_TYPE_FIELD", number: 4 }, { name: "TARGET_TYPE_ONEOF", number: 5 }, { name: "TARGET_TYPE_ENUM", number: 6 }, { name: "TARGET_TYPE_ENUM_ENTRY", number: 7 }, { name: "TARGET_TYPE_SERVICE", number: 8 }, { name: "TARGET_TYPE_METHOD", number: 9 }] }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "OneofOptions", field: [{ name: "features", number: 1, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "EnumOptions", field: [{ name: "allow_alias", number: 2, type: 8, label: 1 }, { name: "deprecated", number: 3, type: 8, label: 1, defaultValue: "false" }, { name: "deprecated_legacy_json_field_conflicts", number: 6, type: 8, label: 1, options: { deprecated: !0 } }, { name: "features", number: 7, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "EnumValueOptions", field: [{ name: "deprecated", number: 1, type: 8, label: 1, defaultValue: "false" }, { name: "features", number: 2, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "debug_redact", number: 3, type: 8, label: 1, defaultValue: "false" }, { name: "feature_support", number: 4, type: 11, label: 1, typeName: ".google.protobuf.FieldOptions.FeatureSupport" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "ServiceOptions", field: [{ name: "features", number: 34, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "deprecated", number: 33, type: 8, label: 1, defaultValue: "false" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "MethodOptions", field: [{ name: "deprecated", number: 33, type: 8, label: 1, defaultValue: "false" }, { name: "idempotency_level", number: 34, type: 14, label: 1, typeName: ".google.protobuf.MethodOptions.IdempotencyLevel", defaultValue: "IDEMPOTENCY_UNKNOWN" }, { name: "features", number: 35, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], enumType: [{ name: "IdempotencyLevel", value: [{ name: "IDEMPOTENCY_UNKNOWN", number: 0 }, { name: "NO_SIDE_EFFECTS", number: 1 }, { name: "IDEMPOTENT", number: 2 }] }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "UninterpretedOption", field: [{ name: "name", number: 2, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption.NamePart" }, { name: "identifier_value", number: 3, type: 9, label: 1 }, { name: "positive_int_value", number: 4, type: 4, label: 1 }, { name: "negative_int_value", number: 5, type: 3, label: 1 }, { name: "double_value", number: 6, type: 1, label: 1 }, { name: "string_value", number: 7, type: 12, label: 1 }, { name: "aggregate_value", number: 8, type: 9, label: 1 }], nestedType: [{ name: "NamePart", field: [{ name: "name_part", number: 1, type: 9, label: 2 }, { name: "is_extension", number: 2, type: 8, label: 2 }] }] }, { name: "FeatureSet", field: [{ name: "field_presence", number: 1, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.FieldPresence", options: { retention: 1, targets: [4, 1], editionDefaults: [{ value: "EXPLICIT", edition: 900 }, { value: "IMPLICIT", edition: 999 }, { value: "EXPLICIT", edition: 1e3 }] } }, { name: "enum_type", number: 2, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.EnumType", options: { retention: 1, targets: [6, 1], editionDefaults: [{ value: "CLOSED", edition: 900 }, { value: "OPEN", edition: 999 }] } }, { name: "repeated_field_encoding", number: 3, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.RepeatedFieldEncoding", options: { retention: 1, targets: [4, 1], editionDefaults: [{ value: "EXPANDED", edition: 900 }, { value: "PACKED", edition: 999 }] } }, { name: "utf8_validation", number: 4, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.Utf8Validation", options: { retention: 1, targets: [4, 1], editionDefaults: [{ value: "NONE", edition: 900 }, { value: "VERIFY", edition: 999 }] } }, { name: "message_encoding", number: 5, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.MessageEncoding", options: { retention: 1, targets: [4, 1], editionDefaults: [{ value: "LENGTH_PREFIXED", edition: 900 }] } }, { name: "json_format", number: 6, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.JsonFormat", options: { retention: 1, targets: [3, 6, 1], editionDefaults: [{ value: "LEGACY_BEST_EFFORT", edition: 900 }, { value: "ALLOW", edition: 999 }] } }, { name: "enforce_naming_style", number: 7, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.EnforceNamingStyle", options: { retention: 2, targets: [1, 2, 3, 4, 5, 6, 7, 8, 9], editionDefaults: [{ value: "STYLE_LEGACY", edition: 900 }, { value: "STYLE2024", edition: 1001 }] } }, { name: "default_symbol_visibility", number: 8, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility", options: { retention: 2, targets: [1], editionDefaults: [{ value: "EXPORT_ALL", edition: 900 }, { value: "EXPORT_TOP_LEVEL", edition: 1001 }] } }], nestedType: [{ name: "VisibilityFeature", enumType: [{ name: "DefaultSymbolVisibility", value: [{ name: "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN", number: 0 }, { name: "EXPORT_ALL", number: 1 }, { name: "EXPORT_TOP_LEVEL", number: 2 }, { name: "LOCAL_ALL", number: 3 }, { name: "STRICT", number: 4 }] }] }], enumType: [{ name: "FieldPresence", value: [{ name: "FIELD_PRESENCE_UNKNOWN", number: 0 }, { name: "EXPLICIT", number: 1 }, { name: "IMPLICIT", number: 2 }, { name: "LEGACY_REQUIRED", number: 3 }] }, { name: "EnumType", value: [{ name: "ENUM_TYPE_UNKNOWN", number: 0 }, { name: "OPEN", number: 1 }, { name: "CLOSED", number: 2 }] }, { name: "RepeatedFieldEncoding", value: [{ name: "REPEATED_FIELD_ENCODING_UNKNOWN", number: 0 }, { name: "PACKED", number: 1 }, { name: "EXPANDED", number: 2 }] }, { name: "Utf8Validation", value: [{ name: "UTF8_VALIDATION_UNKNOWN", number: 0 }, { name: "VERIFY", number: 2 }, { name: "NONE", number: 3 }] }, { name: "MessageEncoding", value: [{ name: "MESSAGE_ENCODING_UNKNOWN", number: 0 }, { name: "LENGTH_PREFIXED", number: 1 }, { name: "DELIMITED", number: 2 }] }, { name: "JsonFormat", value: [{ name: "JSON_FORMAT_UNKNOWN", number: 0 }, { name: "ALLOW", number: 1 }, { name: "LEGACY_BEST_EFFORT", number: 2 }] }, { name: "EnforceNamingStyle", value: [{ name: "ENFORCE_NAMING_STYLE_UNKNOWN", number: 0 }, { name: "STYLE2024", number: 1 }, { name: "STYLE_LEGACY", number: 2 }] }], extensionRange: [{ start: 1e3, end: 9995 }, { start: 9995, end: 1e4 }, { start: 1e4, end: 10001 }] }, { name: "FeatureSetDefaults", field: [{ name: "defaults", number: 1, type: 11, label: 3, typeName: ".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault" }, { name: "minimum_edition", number: 4, type: 14, label: 1, typeName: ".google.protobuf.Edition" }, { name: "maximum_edition", number: 5, type: 14, label: 1, typeName: ".google.protobuf.Edition" }], nestedType: [{ name: "FeatureSetEditionDefault", field: [{ name: "edition", number: 3, type: 14, label: 1, typeName: ".google.protobuf.Edition" }, { name: "overridable_features", number: 4, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "fixed_features", number: 5, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }] }] }, { name: "SourceCodeInfo", field: [{ name: "location", number: 1, type: 11, label: 3, typeName: ".google.protobuf.SourceCodeInfo.Location" }], nestedType: [{ name: "Location", field: [{ name: "path", number: 1, type: 5, label: 3, options: { packed: !0 } }, { name: "span", number: 2, type: 5, label: 3, options: { packed: !0 } }, { name: "leading_comments", number: 3, type: 9, label: 1 }, { name: "trailing_comments", number: 4, type: 9, label: 1 }, { name: "leading_detached_comments", number: 6, type: 9, label: 3 }] }], extensionRange: [{ start: 536e6, end: 536000001 }] }, { name: "GeneratedCodeInfo", field: [{ name: "annotation", number: 1, type: 11, label: 3, typeName: ".google.protobuf.GeneratedCodeInfo.Annotation" }], nestedType: [{ name: "Annotation", field: [{ name: "path", number: 1, type: 5, label: 3, options: { packed: !0 } }, { name: "source_file", number: 2, type: 9, label: 1 }, { name: "begin", number: 3, type: 5, label: 1 }, { name: "end", number: 4, type: 5, label: 1 }, { name: "semantic", number: 5, type: 14, label: 1, typeName: ".google.protobuf.GeneratedCodeInfo.Annotation.Semantic" }], enumType: [{ name: "Semantic", value: [{ name: "NONE", number: 0 }, { name: "SET", number: 1 }, { name: "ALIAS", number: 2 }] }] }] }], enumType: [{ name: "Edition", value: [{ name: "EDITION_UNKNOWN", number: 0 }, { name: "EDITION_LEGACY", number: 900 }, { name: "EDITION_PROTO2", number: 998 }, { name: "EDITION_PROTO3", number: 999 }, { name: "EDITION_2023", number: 1e3 }, { name: "EDITION_2024", number: 1001 }, { name: "EDITION_UNSTABLE", number: 9999 }, { name: "EDITION_1_TEST_ONLY", number: 1 }, { name: "EDITION_2_TEST_ONLY", number: 2 }, { name: "EDITION_99997_TEST_ONLY", number: 99997 }, { name: "EDITION_99998_TEST_ONLY", number: 99998 }, { name: "EDITION_99999_TEST_ONLY", number: 99999 }, { name: "EDITION_MAX", number: 2147483647 }] }, { name: "SymbolVisibility", value: [{ name: "VISIBILITY_UNSET", number: 0 }, { name: "VISIBILITY_LOCAL", number: 1 }, { name: "VISIBILITY_EXPORT", number: 2 }] }] }), Ar = /* @__PURE__ */ R(kr, 1);
|
|
2732
|
-
var kt;
|
|
2733
|
-
(function(e) {
|
|
2734
|
-
e[e.DECLARATION = 0] = "DECLARATION", e[e.UNVERIFIED = 1] = "UNVERIFIED";
|
|
2735
|
-
})(kt || (kt = {}));
|
|
2731
|
+
const Ar = /* @__PURE__ */ Nr({ name: "google/protobuf/descriptor.proto", package: "google.protobuf", messageType: [{ name: "FileDescriptorSet", field: [{ name: "file", number: 1, type: 11, label: 3, typeName: ".google.protobuf.FileDescriptorProto" }], extensionRange: [{ start: 536e6, end: 536000001 }] }, { name: "FileDescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "package", number: 2, type: 9, label: 1 }, { name: "dependency", number: 3, type: 9, label: 3 }, { name: "public_dependency", number: 10, type: 5, label: 3 }, { name: "weak_dependency", number: 11, type: 5, label: 3 }, { name: "option_dependency", number: 15, type: 9, label: 3 }, { name: "message_type", number: 4, type: 11, label: 3, typeName: ".google.protobuf.DescriptorProto" }, { name: "enum_type", number: 5, type: 11, label: 3, typeName: ".google.protobuf.EnumDescriptorProto" }, { name: "service", number: 6, type: 11, label: 3, typeName: ".google.protobuf.ServiceDescriptorProto" }, { name: "extension", number: 7, type: 11, label: 3, typeName: ".google.protobuf.FieldDescriptorProto" }, { name: "options", number: 8, type: 11, label: 1, typeName: ".google.protobuf.FileOptions" }, { name: "source_code_info", number: 9, type: 11, label: 1, typeName: ".google.protobuf.SourceCodeInfo" }, { name: "syntax", number: 12, type: 9, label: 1 }, { name: "edition", number: 14, type: 14, label: 1, typeName: ".google.protobuf.Edition" }] }, { name: "DescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "field", number: 2, type: 11, label: 3, typeName: ".google.protobuf.FieldDescriptorProto" }, { name: "extension", number: 6, type: 11, label: 3, typeName: ".google.protobuf.FieldDescriptorProto" }, { name: "nested_type", number: 3, type: 11, label: 3, typeName: ".google.protobuf.DescriptorProto" }, { name: "enum_type", number: 4, type: 11, label: 3, typeName: ".google.protobuf.EnumDescriptorProto" }, { name: "extension_range", number: 5, type: 11, label: 3, typeName: ".google.protobuf.DescriptorProto.ExtensionRange" }, { name: "oneof_decl", number: 8, type: 11, label: 3, typeName: ".google.protobuf.OneofDescriptorProto" }, { name: "options", number: 7, type: 11, label: 1, typeName: ".google.protobuf.MessageOptions" }, { name: "reserved_range", number: 9, type: 11, label: 3, typeName: ".google.protobuf.DescriptorProto.ReservedRange" }, { name: "reserved_name", number: 10, type: 9, label: 3 }, { name: "visibility", number: 11, type: 14, label: 1, typeName: ".google.protobuf.SymbolVisibility" }], nestedType: [{ name: "ExtensionRange", field: [{ name: "start", number: 1, type: 5, label: 1 }, { name: "end", number: 2, type: 5, label: 1 }, { name: "options", number: 3, type: 11, label: 1, typeName: ".google.protobuf.ExtensionRangeOptions" }] }, { name: "ReservedRange", field: [{ name: "start", number: 1, type: 5, label: 1 }, { name: "end", number: 2, type: 5, label: 1 }] }] }, { name: "ExtensionRangeOptions", field: [{ name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }, { name: "declaration", number: 2, type: 11, label: 3, typeName: ".google.protobuf.ExtensionRangeOptions.Declaration", options: { retention: 2 } }, { name: "features", number: 50, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "verification", number: 3, type: 14, label: 1, typeName: ".google.protobuf.ExtensionRangeOptions.VerificationState", defaultValue: "UNVERIFIED", options: { retention: 2 } }], nestedType: [{ name: "Declaration", field: [{ name: "number", number: 1, type: 5, label: 1 }, { name: "full_name", number: 2, type: 9, label: 1 }, { name: "type", number: 3, type: 9, label: 1 }, { name: "reserved", number: 5, type: 8, label: 1 }, { name: "repeated", number: 6, type: 8, label: 1 }] }], enumType: [{ name: "VerificationState", value: [{ name: "DECLARATION", number: 0 }, { name: "UNVERIFIED", number: 1 }] }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "FieldDescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "number", number: 3, type: 5, label: 1 }, { name: "label", number: 4, type: 14, label: 1, typeName: ".google.protobuf.FieldDescriptorProto.Label" }, { name: "type", number: 5, type: 14, label: 1, typeName: ".google.protobuf.FieldDescriptorProto.Type" }, { name: "type_name", number: 6, type: 9, label: 1 }, { name: "extendee", number: 2, type: 9, label: 1 }, { name: "default_value", number: 7, type: 9, label: 1 }, { name: "oneof_index", number: 9, type: 5, label: 1 }, { name: "json_name", number: 10, type: 9, label: 1 }, { name: "options", number: 8, type: 11, label: 1, typeName: ".google.protobuf.FieldOptions" }, { name: "proto3_optional", number: 17, type: 8, label: 1 }], enumType: [{ name: "Type", value: [{ name: "TYPE_DOUBLE", number: 1 }, { name: "TYPE_FLOAT", number: 2 }, { name: "TYPE_INT64", number: 3 }, { name: "TYPE_UINT64", number: 4 }, { name: "TYPE_INT32", number: 5 }, { name: "TYPE_FIXED64", number: 6 }, { name: "TYPE_FIXED32", number: 7 }, { name: "TYPE_BOOL", number: 8 }, { name: "TYPE_STRING", number: 9 }, { name: "TYPE_GROUP", number: 10 }, { name: "TYPE_MESSAGE", number: 11 }, { name: "TYPE_BYTES", number: 12 }, { name: "TYPE_UINT32", number: 13 }, { name: "TYPE_ENUM", number: 14 }, { name: "TYPE_SFIXED32", number: 15 }, { name: "TYPE_SFIXED64", number: 16 }, { name: "TYPE_SINT32", number: 17 }, { name: "TYPE_SINT64", number: 18 }] }, { name: "Label", value: [{ name: "LABEL_OPTIONAL", number: 1 }, { name: "LABEL_REPEATED", number: 3 }, { name: "LABEL_REQUIRED", number: 2 }] }] }, { name: "OneofDescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "options", number: 2, type: 11, label: 1, typeName: ".google.protobuf.OneofOptions" }] }, { name: "EnumDescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "value", number: 2, type: 11, label: 3, typeName: ".google.protobuf.EnumValueDescriptorProto" }, { name: "options", number: 3, type: 11, label: 1, typeName: ".google.protobuf.EnumOptions" }, { name: "reserved_range", number: 4, type: 11, label: 3, typeName: ".google.protobuf.EnumDescriptorProto.EnumReservedRange" }, { name: "reserved_name", number: 5, type: 9, label: 3 }, { name: "visibility", number: 6, type: 14, label: 1, typeName: ".google.protobuf.SymbolVisibility" }], nestedType: [{ name: "EnumReservedRange", field: [{ name: "start", number: 1, type: 5, label: 1 }, { name: "end", number: 2, type: 5, label: 1 }] }] }, { name: "EnumValueDescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "number", number: 2, type: 5, label: 1 }, { name: "options", number: 3, type: 11, label: 1, typeName: ".google.protobuf.EnumValueOptions" }] }, { name: "ServiceDescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "method", number: 2, type: 11, label: 3, typeName: ".google.protobuf.MethodDescriptorProto" }, { name: "options", number: 3, type: 11, label: 1, typeName: ".google.protobuf.ServiceOptions" }] }, { name: "MethodDescriptorProto", field: [{ name: "name", number: 1, type: 9, label: 1 }, { name: "input_type", number: 2, type: 9, label: 1 }, { name: "output_type", number: 3, type: 9, label: 1 }, { name: "options", number: 4, type: 11, label: 1, typeName: ".google.protobuf.MethodOptions" }, { name: "client_streaming", number: 5, type: 8, label: 1, defaultValue: "false" }, { name: "server_streaming", number: 6, type: 8, label: 1, defaultValue: "false" }] }, { name: "FileOptions", field: [{ name: "java_package", number: 1, type: 9, label: 1 }, { name: "java_outer_classname", number: 8, type: 9, label: 1 }, { name: "java_multiple_files", number: 10, type: 8, label: 1, defaultValue: "false", options: {} }, { name: "java_generate_equals_and_hash", number: 20, type: 8, label: 1, options: { deprecated: !0 } }, { name: "java_string_check_utf8", number: 27, type: 8, label: 1, defaultValue: "false" }, { name: "optimize_for", number: 9, type: 14, label: 1, typeName: ".google.protobuf.FileOptions.OptimizeMode", defaultValue: "SPEED" }, { name: "go_package", number: 11, type: 9, label: 1 }, { name: "cc_generic_services", number: 16, type: 8, label: 1, defaultValue: "false" }, { name: "java_generic_services", number: 17, type: 8, label: 1, defaultValue: "false" }, { name: "py_generic_services", number: 18, type: 8, label: 1, defaultValue: "false" }, { name: "deprecated", number: 23, type: 8, label: 1, defaultValue: "false" }, { name: "cc_enable_arenas", number: 31, type: 8, label: 1, defaultValue: "true" }, { name: "objc_class_prefix", number: 36, type: 9, label: 1 }, { name: "csharp_namespace", number: 37, type: 9, label: 1 }, { name: "swift_prefix", number: 39, type: 9, label: 1 }, { name: "php_class_prefix", number: 40, type: 9, label: 1 }, { name: "php_namespace", number: 41, type: 9, label: 1 }, { name: "php_metadata_namespace", number: 44, type: 9, label: 1 }, { name: "ruby_package", number: 45, type: 9, label: 1 }, { name: "features", number: 50, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], enumType: [{ name: "OptimizeMode", value: [{ name: "SPEED", number: 1 }, { name: "CODE_SIZE", number: 2 }, { name: "LITE_RUNTIME", number: 3 }] }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "MessageOptions", field: [{ name: "message_set_wire_format", number: 1, type: 8, label: 1, defaultValue: "false" }, { name: "no_standard_descriptor_accessor", number: 2, type: 8, label: 1, defaultValue: "false" }, { name: "deprecated", number: 3, type: 8, label: 1, defaultValue: "false" }, { name: "map_entry", number: 7, type: 8, label: 1 }, { name: "deprecated_legacy_json_field_conflicts", number: 11, type: 8, label: 1, options: { deprecated: !0 } }, { name: "features", number: 12, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "FieldOptions", field: [{ name: "ctype", number: 1, type: 14, label: 1, typeName: ".google.protobuf.FieldOptions.CType", defaultValue: "STRING" }, { name: "packed", number: 2, type: 8, label: 1 }, { name: "jstype", number: 6, type: 14, label: 1, typeName: ".google.protobuf.FieldOptions.JSType", defaultValue: "JS_NORMAL" }, { name: "lazy", number: 5, type: 8, label: 1, defaultValue: "false" }, { name: "unverified_lazy", number: 15, type: 8, label: 1, defaultValue: "false" }, { name: "deprecated", number: 3, type: 8, label: 1, defaultValue: "false" }, { name: "weak", number: 10, type: 8, label: 1, defaultValue: "false", options: { deprecated: !0 } }, { name: "debug_redact", number: 16, type: 8, label: 1, defaultValue: "false" }, { name: "retention", number: 17, type: 14, label: 1, typeName: ".google.protobuf.FieldOptions.OptionRetention" }, { name: "targets", number: 19, type: 14, label: 3, typeName: ".google.protobuf.FieldOptions.OptionTargetType" }, { name: "edition_defaults", number: 20, type: 11, label: 3, typeName: ".google.protobuf.FieldOptions.EditionDefault" }, { name: "features", number: 21, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "feature_support", number: 22, type: 11, label: 1, typeName: ".google.protobuf.FieldOptions.FeatureSupport" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], nestedType: [{ name: "EditionDefault", field: [{ name: "edition", number: 3, type: 14, label: 1, typeName: ".google.protobuf.Edition" }, { name: "value", number: 2, type: 9, label: 1 }] }, { name: "FeatureSupport", field: [{ name: "edition_introduced", number: 1, type: 14, label: 1, typeName: ".google.protobuf.Edition" }, { name: "edition_deprecated", number: 2, type: 14, label: 1, typeName: ".google.protobuf.Edition" }, { name: "deprecation_warning", number: 3, type: 9, label: 1 }, { name: "edition_removed", number: 4, type: 14, label: 1, typeName: ".google.protobuf.Edition" }, { name: "removal_error", number: 5, type: 9, label: 1 }] }], enumType: [{ name: "CType", value: [{ name: "STRING", number: 0 }, { name: "CORD", number: 1 }, { name: "STRING_PIECE", number: 2 }] }, { name: "JSType", value: [{ name: "JS_NORMAL", number: 0 }, { name: "JS_STRING", number: 1 }, { name: "JS_NUMBER", number: 2 }] }, { name: "OptionRetention", value: [{ name: "RETENTION_UNKNOWN", number: 0 }, { name: "RETENTION_RUNTIME", number: 1 }, { name: "RETENTION_SOURCE", number: 2 }] }, { name: "OptionTargetType", value: [{ name: "TARGET_TYPE_UNKNOWN", number: 0 }, { name: "TARGET_TYPE_FILE", number: 1 }, { name: "TARGET_TYPE_EXTENSION_RANGE", number: 2 }, { name: "TARGET_TYPE_MESSAGE", number: 3 }, { name: "TARGET_TYPE_FIELD", number: 4 }, { name: "TARGET_TYPE_ONEOF", number: 5 }, { name: "TARGET_TYPE_ENUM", number: 6 }, { name: "TARGET_TYPE_ENUM_ENTRY", number: 7 }, { name: "TARGET_TYPE_SERVICE", number: 8 }, { name: "TARGET_TYPE_METHOD", number: 9 }] }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "OneofOptions", field: [{ name: "features", number: 1, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "EnumOptions", field: [{ name: "allow_alias", number: 2, type: 8, label: 1 }, { name: "deprecated", number: 3, type: 8, label: 1, defaultValue: "false" }, { name: "deprecated_legacy_json_field_conflicts", number: 6, type: 8, label: 1, options: { deprecated: !0 } }, { name: "features", number: 7, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "EnumValueOptions", field: [{ name: "deprecated", number: 1, type: 8, label: 1, defaultValue: "false" }, { name: "features", number: 2, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "debug_redact", number: 3, type: 8, label: 1, defaultValue: "false" }, { name: "feature_support", number: 4, type: 11, label: 1, typeName: ".google.protobuf.FieldOptions.FeatureSupport" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "ServiceOptions", field: [{ name: "features", number: 34, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "deprecated", number: 33, type: 8, label: 1, defaultValue: "false" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "MethodOptions", field: [{ name: "deprecated", number: 33, type: 8, label: 1, defaultValue: "false" }, { name: "idempotency_level", number: 34, type: 14, label: 1, typeName: ".google.protobuf.MethodOptions.IdempotencyLevel", defaultValue: "IDEMPOTENCY_UNKNOWN" }, { name: "features", number: 35, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "uninterpreted_option", number: 999, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption" }], enumType: [{ name: "IdempotencyLevel", value: [{ name: "IDEMPOTENCY_UNKNOWN", number: 0 }, { name: "NO_SIDE_EFFECTS", number: 1 }, { name: "IDEMPOTENT", number: 2 }] }], extensionRange: [{ start: 1e3, end: 536870912 }] }, { name: "UninterpretedOption", field: [{ name: "name", number: 2, type: 11, label: 3, typeName: ".google.protobuf.UninterpretedOption.NamePart" }, { name: "identifier_value", number: 3, type: 9, label: 1 }, { name: "positive_int_value", number: 4, type: 4, label: 1 }, { name: "negative_int_value", number: 5, type: 3, label: 1 }, { name: "double_value", number: 6, type: 1, label: 1 }, { name: "string_value", number: 7, type: 12, label: 1 }, { name: "aggregate_value", number: 8, type: 9, label: 1 }], nestedType: [{ name: "NamePart", field: [{ name: "name_part", number: 1, type: 9, label: 2 }, { name: "is_extension", number: 2, type: 8, label: 2 }] }] }, { name: "FeatureSet", field: [{ name: "field_presence", number: 1, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.FieldPresence", options: { retention: 1, targets: [4, 1], editionDefaults: [{ value: "EXPLICIT", edition: 900 }, { value: "IMPLICIT", edition: 999 }, { value: "EXPLICIT", edition: 1e3 }] } }, { name: "enum_type", number: 2, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.EnumType", options: { retention: 1, targets: [6, 1], editionDefaults: [{ value: "CLOSED", edition: 900 }, { value: "OPEN", edition: 999 }] } }, { name: "repeated_field_encoding", number: 3, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.RepeatedFieldEncoding", options: { retention: 1, targets: [4, 1], editionDefaults: [{ value: "EXPANDED", edition: 900 }, { value: "PACKED", edition: 999 }] } }, { name: "utf8_validation", number: 4, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.Utf8Validation", options: { retention: 1, targets: [4, 1], editionDefaults: [{ value: "NONE", edition: 900 }, { value: "VERIFY", edition: 999 }] } }, { name: "message_encoding", number: 5, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.MessageEncoding", options: { retention: 1, targets: [4, 1], editionDefaults: [{ value: "LENGTH_PREFIXED", edition: 900 }] } }, { name: "json_format", number: 6, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.JsonFormat", options: { retention: 1, targets: [3, 6, 1], editionDefaults: [{ value: "LEGACY_BEST_EFFORT", edition: 900 }, { value: "ALLOW", edition: 999 }] } }, { name: "enforce_naming_style", number: 7, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.EnforceNamingStyle", options: { retention: 2, targets: [1, 2, 3, 4, 5, 6, 7, 8, 9], editionDefaults: [{ value: "STYLE_LEGACY", edition: 900 }, { value: "STYLE2024", edition: 1001 }] } }, { name: "default_symbol_visibility", number: 8, type: 14, label: 1, typeName: ".google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility", options: { retention: 2, targets: [1], editionDefaults: [{ value: "EXPORT_ALL", edition: 900 }, { value: "EXPORT_TOP_LEVEL", edition: 1001 }] } }], nestedType: [{ name: "VisibilityFeature", enumType: [{ name: "DefaultSymbolVisibility", value: [{ name: "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN", number: 0 }, { name: "EXPORT_ALL", number: 1 }, { name: "EXPORT_TOP_LEVEL", number: 2 }, { name: "LOCAL_ALL", number: 3 }, { name: "STRICT", number: 4 }] }] }], enumType: [{ name: "FieldPresence", value: [{ name: "FIELD_PRESENCE_UNKNOWN", number: 0 }, { name: "EXPLICIT", number: 1 }, { name: "IMPLICIT", number: 2 }, { name: "LEGACY_REQUIRED", number: 3 }] }, { name: "EnumType", value: [{ name: "ENUM_TYPE_UNKNOWN", number: 0 }, { name: "OPEN", number: 1 }, { name: "CLOSED", number: 2 }] }, { name: "RepeatedFieldEncoding", value: [{ name: "REPEATED_FIELD_ENCODING_UNKNOWN", number: 0 }, { name: "PACKED", number: 1 }, { name: "EXPANDED", number: 2 }] }, { name: "Utf8Validation", value: [{ name: "UTF8_VALIDATION_UNKNOWN", number: 0 }, { name: "VERIFY", number: 2 }, { name: "NONE", number: 3 }] }, { name: "MessageEncoding", value: [{ name: "MESSAGE_ENCODING_UNKNOWN", number: 0 }, { name: "LENGTH_PREFIXED", number: 1 }, { name: "DELIMITED", number: 2 }] }, { name: "JsonFormat", value: [{ name: "JSON_FORMAT_UNKNOWN", number: 0 }, { name: "ALLOW", number: 1 }, { name: "LEGACY_BEST_EFFORT", number: 2 }] }, { name: "EnforceNamingStyle", value: [{ name: "ENFORCE_NAMING_STYLE_UNKNOWN", number: 0 }, { name: "STYLE2024", number: 1 }, { name: "STYLE_LEGACY", number: 2 }] }], extensionRange: [{ start: 1e3, end: 9995 }, { start: 9995, end: 1e4 }, { start: 1e4, end: 10001 }] }, { name: "FeatureSetDefaults", field: [{ name: "defaults", number: 1, type: 11, label: 3, typeName: ".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault" }, { name: "minimum_edition", number: 4, type: 14, label: 1, typeName: ".google.protobuf.Edition" }, { name: "maximum_edition", number: 5, type: 14, label: 1, typeName: ".google.protobuf.Edition" }], nestedType: [{ name: "FeatureSetEditionDefault", field: [{ name: "edition", number: 3, type: 14, label: 1, typeName: ".google.protobuf.Edition" }, { name: "overridable_features", number: 4, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }, { name: "fixed_features", number: 5, type: 11, label: 1, typeName: ".google.protobuf.FeatureSet" }] }] }, { name: "SourceCodeInfo", field: [{ name: "location", number: 1, type: 11, label: 3, typeName: ".google.protobuf.SourceCodeInfo.Location" }], nestedType: [{ name: "Location", field: [{ name: "path", number: 1, type: 5, label: 3, options: { packed: !0 } }, { name: "span", number: 2, type: 5, label: 3, options: { packed: !0 } }, { name: "leading_comments", number: 3, type: 9, label: 1 }, { name: "trailing_comments", number: 4, type: 9, label: 1 }, { name: "leading_detached_comments", number: 6, type: 9, label: 3 }] }], extensionRange: [{ start: 536e6, end: 536000001 }] }, { name: "GeneratedCodeInfo", field: [{ name: "annotation", number: 1, type: 11, label: 3, typeName: ".google.protobuf.GeneratedCodeInfo.Annotation" }], nestedType: [{ name: "Annotation", field: [{ name: "path", number: 1, type: 5, label: 3, options: { packed: !0 } }, { name: "source_file", number: 2, type: 9, label: 1 }, { name: "begin", number: 3, type: 5, label: 1 }, { name: "end", number: 4, type: 5, label: 1 }, { name: "semantic", number: 5, type: 14, label: 1, typeName: ".google.protobuf.GeneratedCodeInfo.Annotation.Semantic" }], enumType: [{ name: "Semantic", value: [{ name: "NONE", number: 0 }, { name: "SET", number: 1 }, { name: "ALIAS", number: 2 }] }] }] }], enumType: [{ name: "Edition", value: [{ name: "EDITION_UNKNOWN", number: 0 }, { name: "EDITION_LEGACY", number: 900 }, { name: "EDITION_PROTO2", number: 998 }, { name: "EDITION_PROTO3", number: 999 }, { name: "EDITION_2023", number: 1e3 }, { name: "EDITION_2024", number: 1001 }, { name: "EDITION_UNSTABLE", number: 9999 }, { name: "EDITION_1_TEST_ONLY", number: 1 }, { name: "EDITION_2_TEST_ONLY", number: 2 }, { name: "EDITION_99997_TEST_ONLY", number: 99997 }, { name: "EDITION_99998_TEST_ONLY", number: 99998 }, { name: "EDITION_99999_TEST_ONLY", number: 99999 }, { name: "EDITION_MAX", number: 2147483647 }] }, { name: "SymbolVisibility", value: [{ name: "VISIBILITY_UNSET", number: 0 }, { name: "VISIBILITY_LOCAL", number: 1 }, { name: "VISIBILITY_EXPORT", number: 2 }] }] }), Rr = /* @__PURE__ */ R(Ar, 1);
|
|
2736
2732
|
var At;
|
|
2737
2733
|
(function(e) {
|
|
2738
|
-
e[e.
|
|
2734
|
+
e[e.DECLARATION = 0] = "DECLARATION", e[e.UNVERIFIED = 1] = "UNVERIFIED";
|
|
2739
2735
|
})(At || (At = {}));
|
|
2740
2736
|
var Rt;
|
|
2741
2737
|
(function(e) {
|
|
2742
|
-
e[e.
|
|
2738
|
+
e[e.DOUBLE = 1] = "DOUBLE", e[e.FLOAT = 2] = "FLOAT", e[e.INT64 = 3] = "INT64", e[e.UINT64 = 4] = "UINT64", e[e.INT32 = 5] = "INT32", e[e.FIXED64 = 6] = "FIXED64", e[e.FIXED32 = 7] = "FIXED32", e[e.BOOL = 8] = "BOOL", e[e.STRING = 9] = "STRING", e[e.GROUP = 10] = "GROUP", e[e.MESSAGE = 11] = "MESSAGE", e[e.BYTES = 12] = "BYTES", e[e.UINT32 = 13] = "UINT32", e[e.ENUM = 14] = "ENUM", e[e.SFIXED32 = 15] = "SFIXED32", e[e.SFIXED64 = 16] = "SFIXED64", e[e.SINT32 = 17] = "SINT32", e[e.SINT64 = 18] = "SINT64";
|
|
2743
2739
|
})(Rt || (Rt = {}));
|
|
2744
2740
|
var _t;
|
|
2745
2741
|
(function(e) {
|
|
2746
|
-
e[e.
|
|
2742
|
+
e[e.OPTIONAL = 1] = "OPTIONAL", e[e.REPEATED = 3] = "REPEATED", e[e.REQUIRED = 2] = "REQUIRED";
|
|
2747
2743
|
})(_t || (_t = {}));
|
|
2748
2744
|
var vt;
|
|
2749
2745
|
(function(e) {
|
|
2750
|
-
e[e.
|
|
2746
|
+
e[e.SPEED = 1] = "SPEED", e[e.CODE_SIZE = 2] = "CODE_SIZE", e[e.LITE_RUNTIME = 3] = "LITE_RUNTIME";
|
|
2751
2747
|
})(vt || (vt = {}));
|
|
2752
2748
|
var Ot;
|
|
2753
2749
|
(function(e) {
|
|
2754
|
-
e[e.
|
|
2750
|
+
e[e.STRING = 0] = "STRING", e[e.CORD = 1] = "CORD", e[e.STRING_PIECE = 2] = "STRING_PIECE";
|
|
2755
2751
|
})(Ot || (Ot = {}));
|
|
2756
2752
|
var Ct;
|
|
2757
2753
|
(function(e) {
|
|
2758
|
-
e[e.
|
|
2754
|
+
e[e.JS_NORMAL = 0] = "JS_NORMAL", e[e.JS_STRING = 1] = "JS_STRING", e[e.JS_NUMBER = 2] = "JS_NUMBER";
|
|
2759
2755
|
})(Ct || (Ct = {}));
|
|
2760
2756
|
var Dt;
|
|
2761
2757
|
(function(e) {
|
|
2762
|
-
e[e.
|
|
2758
|
+
e[e.RETENTION_UNKNOWN = 0] = "RETENTION_UNKNOWN", e[e.RETENTION_RUNTIME = 1] = "RETENTION_RUNTIME", e[e.RETENTION_SOURCE = 2] = "RETENTION_SOURCE";
|
|
2763
2759
|
})(Dt || (Dt = {}));
|
|
2764
2760
|
var Ut;
|
|
2765
2761
|
(function(e) {
|
|
2766
|
-
e[e.
|
|
2762
|
+
e[e.TARGET_TYPE_UNKNOWN = 0] = "TARGET_TYPE_UNKNOWN", e[e.TARGET_TYPE_FILE = 1] = "TARGET_TYPE_FILE", e[e.TARGET_TYPE_EXTENSION_RANGE = 2] = "TARGET_TYPE_EXTENSION_RANGE", e[e.TARGET_TYPE_MESSAGE = 3] = "TARGET_TYPE_MESSAGE", e[e.TARGET_TYPE_FIELD = 4] = "TARGET_TYPE_FIELD", e[e.TARGET_TYPE_ONEOF = 5] = "TARGET_TYPE_ONEOF", e[e.TARGET_TYPE_ENUM = 6] = "TARGET_TYPE_ENUM", e[e.TARGET_TYPE_ENUM_ENTRY = 7] = "TARGET_TYPE_ENUM_ENTRY", e[e.TARGET_TYPE_SERVICE = 8] = "TARGET_TYPE_SERVICE", e[e.TARGET_TYPE_METHOD = 9] = "TARGET_TYPE_METHOD";
|
|
2767
2763
|
})(Ut || (Ut = {}));
|
|
2768
2764
|
var Lt;
|
|
2769
2765
|
(function(e) {
|
|
2770
|
-
e[e.
|
|
2766
|
+
e[e.IDEMPOTENCY_UNKNOWN = 0] = "IDEMPOTENCY_UNKNOWN", e[e.NO_SIDE_EFFECTS = 1] = "NO_SIDE_EFFECTS", e[e.IDEMPOTENT = 2] = "IDEMPOTENT";
|
|
2771
2767
|
})(Lt || (Lt = {}));
|
|
2772
2768
|
var Mt;
|
|
2773
2769
|
(function(e) {
|
|
2774
|
-
e[e.
|
|
2770
|
+
e[e.DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0] = "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN", e[e.EXPORT_ALL = 1] = "EXPORT_ALL", e[e.EXPORT_TOP_LEVEL = 2] = "EXPORT_TOP_LEVEL", e[e.LOCAL_ALL = 3] = "LOCAL_ALL", e[e.STRICT = 4] = "STRICT";
|
|
2775
2771
|
})(Mt || (Mt = {}));
|
|
2776
2772
|
var xt;
|
|
2777
2773
|
(function(e) {
|
|
2778
|
-
e[e.
|
|
2774
|
+
e[e.FIELD_PRESENCE_UNKNOWN = 0] = "FIELD_PRESENCE_UNKNOWN", e[e.EXPLICIT = 1] = "EXPLICIT", e[e.IMPLICIT = 2] = "IMPLICIT", e[e.LEGACY_REQUIRED = 3] = "LEGACY_REQUIRED";
|
|
2779
2775
|
})(xt || (xt = {}));
|
|
2780
2776
|
var Pt;
|
|
2781
2777
|
(function(e) {
|
|
2782
|
-
e[e.
|
|
2778
|
+
e[e.ENUM_TYPE_UNKNOWN = 0] = "ENUM_TYPE_UNKNOWN", e[e.OPEN = 1] = "OPEN", e[e.CLOSED = 2] = "CLOSED";
|
|
2783
2779
|
})(Pt || (Pt = {}));
|
|
2784
2780
|
var Vt;
|
|
2785
2781
|
(function(e) {
|
|
2786
|
-
e[e.
|
|
2782
|
+
e[e.REPEATED_FIELD_ENCODING_UNKNOWN = 0] = "REPEATED_FIELD_ENCODING_UNKNOWN", e[e.PACKED = 1] = "PACKED", e[e.EXPANDED = 2] = "EXPANDED";
|
|
2787
2783
|
})(Vt || (Vt = {}));
|
|
2788
2784
|
var Ft;
|
|
2789
2785
|
(function(e) {
|
|
2790
|
-
e[e.
|
|
2786
|
+
e[e.UTF8_VALIDATION_UNKNOWN = 0] = "UTF8_VALIDATION_UNKNOWN", e[e.VERIFY = 2] = "VERIFY", e[e.NONE = 3] = "NONE";
|
|
2791
2787
|
})(Ft || (Ft = {}));
|
|
2792
2788
|
var Gt;
|
|
2793
2789
|
(function(e) {
|
|
2794
|
-
e[e.
|
|
2790
|
+
e[e.MESSAGE_ENCODING_UNKNOWN = 0] = "MESSAGE_ENCODING_UNKNOWN", e[e.LENGTH_PREFIXED = 1] = "LENGTH_PREFIXED", e[e.DELIMITED = 2] = "DELIMITED";
|
|
2795
2791
|
})(Gt || (Gt = {}));
|
|
2796
2792
|
var Bt;
|
|
2797
2793
|
(function(e) {
|
|
2798
|
-
e[e.
|
|
2794
|
+
e[e.JSON_FORMAT_UNKNOWN = 0] = "JSON_FORMAT_UNKNOWN", e[e.ALLOW = 1] = "ALLOW", e[e.LEGACY_BEST_EFFORT = 2] = "LEGACY_BEST_EFFORT";
|
|
2799
2795
|
})(Bt || (Bt = {}));
|
|
2800
2796
|
var Yt;
|
|
2801
2797
|
(function(e) {
|
|
2802
|
-
e[e.
|
|
2798
|
+
e[e.ENFORCE_NAMING_STYLE_UNKNOWN = 0] = "ENFORCE_NAMING_STYLE_UNKNOWN", e[e.STYLE2024 = 1] = "STYLE2024", e[e.STYLE_LEGACY = 2] = "STYLE_LEGACY";
|
|
2803
2799
|
})(Yt || (Yt = {}));
|
|
2804
2800
|
var $t;
|
|
2805
2801
|
(function(e) {
|
|
2806
|
-
e[e.
|
|
2802
|
+
e[e.NONE = 0] = "NONE", e[e.SET = 1] = "SET", e[e.ALIAS = 2] = "ALIAS";
|
|
2807
2803
|
})($t || ($t = {}));
|
|
2808
2804
|
var Xt;
|
|
2809
2805
|
(function(e) {
|
|
2810
|
-
e[e.
|
|
2806
|
+
e[e.EDITION_UNKNOWN = 0] = "EDITION_UNKNOWN", e[e.EDITION_LEGACY = 900] = "EDITION_LEGACY", e[e.EDITION_PROTO2 = 998] = "EDITION_PROTO2", e[e.EDITION_PROTO3 = 999] = "EDITION_PROTO3", e[e.EDITION_2023 = 1e3] = "EDITION_2023", e[e.EDITION_2024 = 1001] = "EDITION_2024", e[e.EDITION_UNSTABLE = 9999] = "EDITION_UNSTABLE", e[e.EDITION_1_TEST_ONLY = 1] = "EDITION_1_TEST_ONLY", e[e.EDITION_2_TEST_ONLY = 2] = "EDITION_2_TEST_ONLY", e[e.EDITION_99997_TEST_ONLY = 99997] = "EDITION_99997_TEST_ONLY", e[e.EDITION_99998_TEST_ONLY = 99998] = "EDITION_99998_TEST_ONLY", e[e.EDITION_99999_TEST_ONLY = 99999] = "EDITION_99999_TEST_ONLY", e[e.EDITION_MAX = 2147483647] = "EDITION_MAX";
|
|
2811
2807
|
})(Xt || (Xt = {}));
|
|
2812
|
-
|
|
2808
|
+
var Kt;
|
|
2809
|
+
(function(e) {
|
|
2810
|
+
e[e.VISIBILITY_UNSET = 0] = "VISIBILITY_UNSET", e[e.VISIBILITY_LOCAL = 1] = "VISIBILITY_LOCAL", e[e.VISIBILITY_EXPORT = 2] = "VISIBILITY_EXPORT";
|
|
2811
|
+
})(Kt || (Kt = {}));
|
|
2812
|
+
function _r(e) {
|
|
2813
2813
|
return Object.assign(Object.assign({ readUnknownFields: !0, recursionLimit: 100 }, e), { depth: 0 });
|
|
2814
2814
|
}
|
|
2815
2815
|
function fe(e, t, n) {
|
|
2816
2816
|
const s = ge(e, void 0, !1);
|
|
2817
|
-
return
|
|
2817
|
+
return Bn(s, new Us(t), _r(n), !1, t.byteLength), s.message;
|
|
2818
2818
|
}
|
|
2819
|
-
function
|
|
2819
|
+
function Bn(e, t, n, s, r) {
|
|
2820
2820
|
var i;
|
|
2821
2821
|
if (++n.depth > n.recursionLimit)
|
|
2822
2822
|
throw new Error(`cannot decode ${e.desc} from binary: maximum recursion depth of ${n.recursionLimit} reached`);
|
|
@@ -2830,13 +2830,13 @@ function Gn(e, t, n, s, r) {
|
|
|
2830
2830
|
n.readUnknownFields && u.push({ no: o, wireType: l, data: p });
|
|
2831
2831
|
continue;
|
|
2832
2832
|
}
|
|
2833
|
-
|
|
2833
|
+
vr(e, t, d, l, n);
|
|
2834
2834
|
}
|
|
2835
2835
|
if (s && (l != I.EndGroup || o !== r))
|
|
2836
2836
|
throw new Error("invalid end group tag");
|
|
2837
2837
|
u.length > 0 && e.setUnknown(u), n.depth--;
|
|
2838
2838
|
}
|
|
2839
|
-
function
|
|
2839
|
+
function vr(e, t, n, s, r) {
|
|
2840
2840
|
var i;
|
|
2841
2841
|
switch (n.fieldKind) {
|
|
2842
2842
|
case "scalar":
|
|
@@ -2863,14 +2863,14 @@ function _r(e, t, n, s, r) {
|
|
|
2863
2863
|
e.set(n, et(t, r, n, e.get(n)));
|
|
2864
2864
|
break;
|
|
2865
2865
|
case "list":
|
|
2866
|
-
|
|
2866
|
+
Cr(t, s, e.get(n), r);
|
|
2867
2867
|
break;
|
|
2868
2868
|
case "map":
|
|
2869
|
-
|
|
2869
|
+
Or(t, e.get(n), r);
|
|
2870
2870
|
break;
|
|
2871
2871
|
}
|
|
2872
2872
|
}
|
|
2873
|
-
function
|
|
2873
|
+
function Or(e, t, n) {
|
|
2874
2874
|
const s = t.field();
|
|
2875
2875
|
let r, i;
|
|
2876
2876
|
const a = e.uint32(), o = e.pos + a;
|
|
@@ -2909,7 +2909,7 @@ function vr(e, t, n) {
|
|
|
2909
2909
|
}
|
|
2910
2910
|
t.set(r, i);
|
|
2911
2911
|
}
|
|
2912
|
-
function
|
|
2912
|
+
function Cr(e, t, n, s) {
|
|
2913
2913
|
var r;
|
|
2914
2914
|
const i = n.field();
|
|
2915
2915
|
if (i.listKind === "message") {
|
|
@@ -2927,7 +2927,7 @@ function Or(e, t, n, s) {
|
|
|
2927
2927
|
}
|
|
2928
2928
|
function et(e, t, n, s) {
|
|
2929
2929
|
const r = n.delimitedEncoding, i = s ?? ge(n.message, void 0, !1);
|
|
2930
|
-
return
|
|
2930
|
+
return Bn(i, e, t, r, r ? n.number : e.uint32()), i;
|
|
2931
2931
|
}
|
|
2932
2932
|
function $(e, t, n = !1) {
|
|
2933
2933
|
switch (t) {
|
|
@@ -2963,37 +2963,37 @@ function $(e, t, n = !1) {
|
|
|
2963
2963
|
return e.sint32();
|
|
2964
2964
|
}
|
|
2965
2965
|
}
|
|
2966
|
-
function
|
|
2966
|
+
function Dr(e, t) {
|
|
2967
2967
|
var n;
|
|
2968
|
-
const s = fe(
|
|
2969
|
-
return s.messageType.forEach(Qe), s.dependency = (n = void 0) !== null && n !== void 0 ? n : [],
|
|
2968
|
+
const s = fe(Rr, Ys(e));
|
|
2969
|
+
return s.messageType.forEach(Qe), s.dependency = (n = void 0) !== null && n !== void 0 ? n : [], Mn(s, (i) => {
|
|
2970
2970
|
}).getFile(s.name);
|
|
2971
2971
|
}
|
|
2972
|
-
const
|
|
2972
|
+
const Ur = 3, Wt = {
|
|
2973
2973
|
writeUnknownFields: !0
|
|
2974
2974
|
};
|
|
2975
|
-
function
|
|
2976
|
-
return e ? Object.assign(Object.assign({},
|
|
2975
|
+
function Lr(e) {
|
|
2976
|
+
return e ? Object.assign(Object.assign({}, Wt), e) : Wt;
|
|
2977
2977
|
}
|
|
2978
2978
|
function te(e, t, n) {
|
|
2979
|
-
return me(new
|
|
2979
|
+
return me(new Ds(), Lr(n), ge(e, t)).finish();
|
|
2980
2980
|
}
|
|
2981
2981
|
function me(e, t, n) {
|
|
2982
2982
|
var s;
|
|
2983
2983
|
for (const r of n.sortedFields) {
|
|
2984
2984
|
if (!n.isSet(r)) {
|
|
2985
|
-
if (r.presence ==
|
|
2985
|
+
if (r.presence == Ur)
|
|
2986
2986
|
throw new Error(`cannot encode ${r} to binary: required field not set`);
|
|
2987
2987
|
continue;
|
|
2988
2988
|
}
|
|
2989
|
-
|
|
2989
|
+
Mr(e, t, n, r);
|
|
2990
2990
|
}
|
|
2991
2991
|
if (t.writeUnknownFields)
|
|
2992
2992
|
for (const { no: r, wireType: i, data: a } of (s = n.getUnknown()) !== null && s !== void 0 ? s : [])
|
|
2993
2993
|
e.tag(r, i).raw(a);
|
|
2994
2994
|
return e;
|
|
2995
2995
|
}
|
|
2996
|
-
function
|
|
2996
|
+
function Mr(e, t, n, s) {
|
|
2997
2997
|
var r;
|
|
2998
2998
|
switch (s.fieldKind) {
|
|
2999
2999
|
case "scalar":
|
|
@@ -3001,28 +3001,28 @@ function Lr(e, t, n, s) {
|
|
|
3001
3001
|
pe(e, n.desc.typeName, s.name, (r = s.scalar) !== null && r !== void 0 ? r : c.INT32, s.number, n.get(s));
|
|
3002
3002
|
break;
|
|
3003
3003
|
case "list":
|
|
3004
|
-
|
|
3004
|
+
xr(e, t, s, n.get(s));
|
|
3005
3005
|
break;
|
|
3006
3006
|
case "message":
|
|
3007
|
-
|
|
3007
|
+
Yn(e, t, s, n.get(s));
|
|
3008
3008
|
break;
|
|
3009
3009
|
case "map":
|
|
3010
3010
|
for (const [i, a] of n.get(s))
|
|
3011
|
-
|
|
3011
|
+
Pr(e, t, s, i, a);
|
|
3012
3012
|
break;
|
|
3013
3013
|
}
|
|
3014
3014
|
}
|
|
3015
3015
|
function pe(e, t, n, s, r, i) {
|
|
3016
|
-
|
|
3016
|
+
$n(e.tag(r, Vr(s)), t, n, s, i);
|
|
3017
3017
|
}
|
|
3018
|
-
function
|
|
3018
|
+
function Yn(e, t, n, s) {
|
|
3019
3019
|
n.delimitedEncoding ? me(e.tag(n.number, I.StartGroup), t, s).tag(n.number, I.EndGroup) : me(e.tag(n.number, I.LengthDelimited).fork(), t, s).join();
|
|
3020
3020
|
}
|
|
3021
|
-
function
|
|
3021
|
+
function xr(e, t, n, s) {
|
|
3022
3022
|
var r;
|
|
3023
3023
|
if (n.listKind == "message") {
|
|
3024
3024
|
for (const a of s)
|
|
3025
|
-
|
|
3025
|
+
Yn(e, t, n, a);
|
|
3026
3026
|
return;
|
|
3027
3027
|
}
|
|
3028
3028
|
const i = (r = n.scalar) !== null && r !== void 0 ? r : c.INT32;
|
|
@@ -3031,14 +3031,14 @@ function Mr(e, t, n, s) {
|
|
|
3031
3031
|
return;
|
|
3032
3032
|
e.tag(n.number, I.LengthDelimited).fork();
|
|
3033
3033
|
for (const a of s)
|
|
3034
|
-
|
|
3034
|
+
$n(e, n.parent.typeName, n.name, i, a);
|
|
3035
3035
|
e.join();
|
|
3036
3036
|
return;
|
|
3037
3037
|
}
|
|
3038
3038
|
for (const a of s)
|
|
3039
3039
|
pe(e, n.parent.typeName, n.name, i, n.number, a);
|
|
3040
3040
|
}
|
|
3041
|
-
function
|
|
3041
|
+
function Pr(e, t, n, s, r) {
|
|
3042
3042
|
var i;
|
|
3043
3043
|
switch (e.tag(n.number, I.LengthDelimited).fork(), pe(e, n.parent.typeName, n.name, n.mapKey, 1, s), n.mapKind) {
|
|
3044
3044
|
case "scalar":
|
|
@@ -3051,7 +3051,7 @@ function xr(e, t, n, s, r) {
|
|
|
3051
3051
|
}
|
|
3052
3052
|
e.join();
|
|
3053
3053
|
}
|
|
3054
|
-
function
|
|
3054
|
+
function $n(e, t, n, s, r) {
|
|
3055
3055
|
try {
|
|
3056
3056
|
switch (s) {
|
|
3057
3057
|
case c.STRING:
|
|
@@ -3104,7 +3104,7 @@ function Yn(e, t, n, s, r) {
|
|
|
3104
3104
|
throw i instanceof Error ? new Error(`cannot encode field ${t}.${n} to binary: ${i.message}`) : i;
|
|
3105
3105
|
}
|
|
3106
3106
|
}
|
|
3107
|
-
function
|
|
3107
|
+
function Vr(e) {
|
|
3108
3108
|
switch (e) {
|
|
3109
3109
|
case c.BYTES:
|
|
3110
3110
|
case c.STRING:
|
|
@@ -3121,12 +3121,22 @@ function Pr(e) {
|
|
|
3121
3121
|
return I.Varint;
|
|
3122
3122
|
}
|
|
3123
3123
|
}
|
|
3124
|
-
function
|
|
3124
|
+
function Fr(e, t, ...n) {
|
|
3125
3125
|
if (n.length > 0)
|
|
3126
3126
|
throw new Error();
|
|
3127
3127
|
return e.services[t];
|
|
3128
3128
|
}
|
|
3129
|
-
const _ = /* @__PURE__ */
|
|
3129
|
+
const _ = /* @__PURE__ */ Dr("CgpjaGF0LnByb3RvEgdjaGF0LnYxIkkKCkF0dGFjaG1lbnQSCgoCaWQYASABKAkSDAoEbmFtZRgCIAEoCRIUCgxjb250ZW50X3R5cGUYAyABKAkSCwoDdXJsGAQgASgJIkEKBkJ1dHRvbhINCgVsYWJlbBgBIAEoCRINCgV2YWx1ZRgCIAEoCRIZCgtidXR0b25fdHlwZRgDIAEoCVIEdHlwZSJ/CgRDYXJkEg0KBXRpdGxlGAEgASgJEhMKC2Rlc2NyaXB0aW9uGAIgASgJEicKBWltYWdlGAMgASgLMhMuY2hhdC52MS5BdHRhY2htZW50SACIAQESIAoHYnV0dG9ucxgEIAMoCzIPLmNoYXQudjEuQnV0dG9uQggKBl9pbWFnZSIjCg9NZXNzYWdlTWV0YWRhdGESEAoIYXVkaWVuY2UYASABKAkiIgoOVHlwaW5nTWV0YWRhdGESEAoIYXVkaWVuY2UYASABKAki7QIKB01lc3NhZ2USCgoCaWQYASABKAkSDAoEcm9sZRgCIAEoCRIRCgR0ZXh0GAMgASgJSACIAQESEQoEaHRtbBgEIAEoCUgBiAEBEigKC2F0dGFjaG1lbnRzGAUgAygLMhMuY2hhdC52MS5BdHRhY2htZW50EiAKB2J1dHRvbnMYBiADKAsyDy5jaGF0LnYxLkJ1dHRvbhIeCgdnYWxsZXJ5GAcgAygLMg0uY2hhdC52MS5DYXJkEhEKCXRpbWVzdGFtcBgIIAEoCRIYCgd1c2VyX2lkGAkgASgJUgd1c2VyX2lkEhwKCXVzZXJfbmFtZRgKIAEoCVIJdXNlcl9uYW1lEg0KBXN0YXRlGAsgASgJEhMKBmFjdGlvbhgMIAEoCUgCiAEBEioKCG1ldGFkYXRhGA0gASgLMhguY2hhdC52MS5NZXNzYWdlTWV0YWRhdGFCBwoFX3RleHRCBwoFX2h0bWxCCQoHX2FjdGlvbiKRAQoLVHlwaW5nRXZlbnQSFgoOcGFydGljaXBhbnRfaWQYASABKAkSDQoFc3RhdGUYAiABKAkSDAoEcm9sZRgDIAEoCRIPCgd1c2VyX2lkGAQgASgJEhEKCXVzZXJfbmFtZRgFIAEoCRIpCghtZXRhZGF0YRgGIAEoCzIXLmNoYXQudjEuVHlwaW5nTWV0YWRhdGEiXQoRUGFydGljaXBhbnRKb2luZWQSFgoOcGFydGljaXBhbnRfaWQYASABKAkSDAoEcm9sZRgCIAEoCRIPCgd1c2VyX2lkGAMgASgJEhEKCXVzZXJfbmFtZRgEIAEoCSJJCg9QYXJ0aWNpcGFudExlZnQSFgoOcGFydGljaXBhbnRfaWQYASABKAkSEwoGcmVhc29uGAIgASgJSACIAQFCCQoHX3JlYXNvbiJjCgNBY3cSDwoHZW5hYmxlZBgBIAEoCBIQCghkdXJhdGlvbhgCIAEoAxIPCgdlbmZvcmNlGAMgASgIEhIKCnN0YXJ0ZWRfYXQYBCABKAkSFAoMZGlzcG9zaXRpb25zGAUgAygJIkYKDFNlc3Npb25FbmRlZBIOCgZyZWFzb24YASABKAkSHgoDYWN3GAIgASgLMgwuY2hhdC52MS5BY3dIAIgBAUIGCgRfYWN3IhwKCUhlYXJ0YmVhdBIPCgd1bml4X21zGAEgASgDIqkCCglDaGF0RXZlbnQSIwoHbWVzc2FnZRgBIAEoCzIQLmNoYXQudjEuTWVzc2FnZUgAEiYKBnR5cGluZxgCIAEoCzIULmNoYXQudjEuVHlwaW5nRXZlbnRIABI4ChJwYXJ0aWNpcGFudF9qb2luZWQYAyABKAsyGi5jaGF0LnYxLlBhcnRpY2lwYW50Sm9pbmVkSAASNAoQcGFydGljaXBhbnRfbGVmdBgEIAEoCzIYLmNoYXQudjEuUGFydGljaXBhbnRMZWZ0SAASLgoNc2Vzc2lvbl9lbmRlZBgFIAEoCzIVLmNoYXQudjEuU2Vzc2lvbkVuZGVkSAASJwoJaGVhcnRiZWF0GAYgASgLMhIuY2hhdC52MS5IZWFydGJlYXRIAEIGCgRraW5kIg8KDUF0dGFjaFJlcXVlc3QiNgoOQXR0YWNoUmVzcG9uc2USFgoOcGFydGljaXBhbnRfaWQYASABKAkSDAoEcm9sZRgCIAEoCSKFAgoOTWVzc2FnZVJlcXVlc3QSGQoRY2xpZW50X21lc3NhZ2VfaWQYASABKAkSEQoEdGV4dBgCIAEoCUgAiAEBEigKC2F0dGFjaG1lbnRzGAMgAygLMhMuY2hhdC52MS5BdHRhY2htZW50EhIKBXZhbHVlGAQgASgJSAGIAQESGgoNZ2FsbGVyeV9sYWJlbBgFIAEoCUgCiAEBEhEKBGh0bWwYBiABKAlIA4gBARIqCghtZXRhZGF0YRgHIAEoCzIYLmNoYXQudjEuTWVzc2FnZU1ldGFkYXRhQgcKBV90ZXh0QggKBl92YWx1ZUIQCg5fZ2FsbGVyeV9sYWJlbEIHCgVfaHRtbCI0Cg9NZXNzYWdlUmVzcG9uc2USIQoHbWVzc2FnZRgBIAEoCzIQLmNoYXQudjEuTWVzc2FnZSJJCg1UeXBpbmdSZXF1ZXN0Eg0KBXN0YXRlGAEgASgJEikKCG1ldGFkYXRhGAIgASgLMhcuY2hhdC52MS5UeXBpbmdNZXRhZGF0YSIQCg5UeXBpbmdSZXNwb25zZSIOCgxMZWF2ZVJlcXVlc3QiDwoNTGVhdmVSZXNwb25zZTLyAQoHU2Vzc2lvbhI2CgZBdHRhY2gSFi5jaGF0LnYxLkF0dGFjaFJlcXVlc3QaEi5jaGF0LnYxLkNoYXRFdmVudDABEjwKB01lc3NhZ2USFy5jaGF0LnYxLk1lc3NhZ2VSZXF1ZXN0GhguY2hhdC52MS5NZXNzYWdlUmVzcG9uc2USOQoGVHlwaW5nEhYuY2hhdC52MS5UeXBpbmdSZXF1ZXN0GhcuY2hhdC52MS5UeXBpbmdSZXNwb25zZRI2CgVMZWF2ZRIVLmNoYXQudjEuTGVhdmVSZXF1ZXN0GhYuY2hhdC52MS5MZWF2ZVJlc3BvbnNlYgZwcm90bzM"), Gr = /* @__PURE__ */ R(_, 0), Br = /* @__PURE__ */ R(_, 3), Yr = /* @__PURE__ */ R(_, 4), $r = /* @__PURE__ */ R(_, 12), jt = /* @__PURE__ */ R(_, 13), Xr = /* @__PURE__ */ R(_, 14), qt = /* @__PURE__ */ R(_, 15), Kr = /* @__PURE__ */ R(_, 16), Ht = /* @__PURE__ */ R(_, 17), Zt = /* @__PURE__ */ R(_, 19), ne = /* @__PURE__ */ Fr(_, 0);
|
|
3130
|
+
function tt(e, t) {
|
|
3131
|
+
if (e == null) return;
|
|
3132
|
+
if (typeof e != "object" || Array.isArray(e))
|
|
3133
|
+
throw h.session(`${t} carried invalid metadata`);
|
|
3134
|
+
const n = e.audience;
|
|
3135
|
+
if (n == null || n === "") return {};
|
|
3136
|
+
if (n === "internal" || n === "all") return { audience: n };
|
|
3137
|
+
throw h.session(`${t} carried invalid metadata.audience`);
|
|
3138
|
+
}
|
|
3139
|
+
const Wr = "x-origon-client-id", jr = "stream_overflow", U = {
|
|
3130
3140
|
/** session_not_found — terminal */
|
|
3131
3141
|
NOT_FOUND: 1,
|
|
3132
3142
|
/** bad request (e.g. missing client id at gw) — terminal */
|
|
@@ -3154,7 +3164,7 @@ function se(e) {
|
|
|
3154
3164
|
return "terminal";
|
|
3155
3165
|
}
|
|
3156
3166
|
}
|
|
3157
|
-
function
|
|
3167
|
+
function zt(e) {
|
|
3158
3168
|
let t;
|
|
3159
3169
|
try {
|
|
3160
3170
|
t = new URL(e);
|
|
@@ -3170,11 +3180,11 @@ function Zt(e) {
|
|
|
3170
3180
|
`chat session url carries no client id (want /chat/api/<id>/live, got "${t.pathname}")`
|
|
3171
3181
|
);
|
|
3172
3182
|
}
|
|
3173
|
-
function
|
|
3174
|
-
const t = fe(
|
|
3183
|
+
function qr(e) {
|
|
3184
|
+
const t = fe($r, e);
|
|
3175
3185
|
switch (t.kind.case) {
|
|
3176
3186
|
case "message":
|
|
3177
|
-
return { kind: "message", message:
|
|
3187
|
+
return { kind: "message", message: Xn(t.kind.value) };
|
|
3178
3188
|
case "typing": {
|
|
3179
3189
|
const n = t.kind.value;
|
|
3180
3190
|
if (n.state !== "on" && n.state !== "off")
|
|
@@ -3187,49 +3197,50 @@ function jr(e) {
|
|
|
3187
3197
|
userId: n.userId,
|
|
3188
3198
|
userName: n.userName,
|
|
3189
3199
|
state: n.state,
|
|
3190
|
-
metadata:
|
|
3200
|
+
metadata: Qr(n.metadata?.audience)
|
|
3191
3201
|
}
|
|
3192
3202
|
};
|
|
3193
3203
|
}
|
|
3194
3204
|
case "sessionEnded": {
|
|
3195
3205
|
const n = t.kind.value.reason;
|
|
3196
|
-
return { kind: "ended", reason: n, replay: n ===
|
|
3206
|
+
return { kind: "ended", reason: n, replay: n === jr };
|
|
3197
3207
|
}
|
|
3198
3208
|
default:
|
|
3199
3209
|
return { kind: "ignore" };
|
|
3200
3210
|
}
|
|
3201
3211
|
}
|
|
3202
|
-
function
|
|
3212
|
+
function Xn(e) {
|
|
3213
|
+
const t = e.role === "ai" || e.role === "user" || e.role === "system" ? e.role : "external", n = tt(e.metadata, "chat message");
|
|
3203
3214
|
return {
|
|
3204
|
-
role:
|
|
3215
|
+
role: t,
|
|
3205
3216
|
id: e.id,
|
|
3206
|
-
attachments: e.attachments.map((
|
|
3207
|
-
id:
|
|
3208
|
-
name:
|
|
3209
|
-
contentType:
|
|
3210
|
-
...
|
|
3217
|
+
attachments: e.attachments.map((s) => ({
|
|
3218
|
+
id: s.id,
|
|
3219
|
+
name: s.name,
|
|
3220
|
+
contentType: s.contentType,
|
|
3221
|
+
...s.url !== "" ? { url: s.url } : {}
|
|
3211
3222
|
})),
|
|
3212
3223
|
status: "delivered",
|
|
3213
3224
|
state: e.state === "streaming" ? "streaming" : "completed",
|
|
3214
|
-
metadata:
|
|
3225
|
+
...n !== void 0 ? { metadata: n } : {},
|
|
3215
3226
|
...e.text !== void 0 ? { text: e.text } : {},
|
|
3216
3227
|
...e.html !== void 0 ? { html: e.html } : {},
|
|
3217
3228
|
...e.timestamp !== "" ? { timestamp: e.timestamp } : {},
|
|
3218
3229
|
...e.userId !== "" ? { userId: e.userId } : {},
|
|
3219
3230
|
...e.userName !== "" ? { userName: e.userName } : {},
|
|
3220
3231
|
...e.action !== void 0 ? { action: e.action } : {},
|
|
3221
|
-
...e.buttons.length > 0 ? { buttons: e.buttons.map(
|
|
3222
|
-
...e.gallery.length > 0 ? { gallery: e.gallery.map(
|
|
3232
|
+
...e.buttons.length > 0 ? { buttons: e.buttons.map(Kn) } : {},
|
|
3233
|
+
...e.gallery.length > 0 ? { gallery: e.gallery.map(Hr) } : {}
|
|
3223
3234
|
};
|
|
3224
3235
|
}
|
|
3225
|
-
function
|
|
3236
|
+
function Kn(e) {
|
|
3226
3237
|
return { label: e.label, value: e.value, type: e.buttonType };
|
|
3227
3238
|
}
|
|
3228
|
-
function
|
|
3239
|
+
function Hr(e) {
|
|
3229
3240
|
return {
|
|
3230
3241
|
title: e.title,
|
|
3231
3242
|
description: e.description,
|
|
3232
|
-
buttons: e.buttons.map(
|
|
3243
|
+
buttons: e.buttons.map(Kn),
|
|
3233
3244
|
...e.image !== void 0 ? {
|
|
3234
3245
|
image: {
|
|
3235
3246
|
id: e.image.id,
|
|
@@ -3240,9 +3251,9 @@ function qr(e) {
|
|
|
3240
3251
|
} : {}
|
|
3241
3252
|
};
|
|
3242
3253
|
}
|
|
3243
|
-
class
|
|
3254
|
+
class Zr {
|
|
3244
3255
|
constructor(t, n) {
|
|
3245
|
-
this.url = t.url, this.token = t.token, this.clientId =
|
|
3256
|
+
this.url = t.url, this.token = t.token, this.clientId = zt(t.url), this.opts = n, this.client = this.createClient();
|
|
3246
3257
|
}
|
|
3247
3258
|
get credentials() {
|
|
3248
3259
|
return { url: this.url, token: this.token };
|
|
@@ -3255,7 +3266,7 @@ class Hr {
|
|
|
3255
3266
|
*/
|
|
3256
3267
|
setCredentials(t) {
|
|
3257
3268
|
const n = t.url !== this.url;
|
|
3258
|
-
this.url = t.url, this.token = t.token, n && (this.clientId =
|
|
3269
|
+
this.url = t.url, this.token = t.token, n && (this.clientId = zt(t.url), this.client = this.createClient());
|
|
3259
3270
|
}
|
|
3260
3271
|
createClient() {
|
|
3261
3272
|
const t = {
|
|
@@ -3264,18 +3275,18 @@ class Hr {
|
|
|
3264
3275
|
logout: () => {
|
|
3265
3276
|
}
|
|
3266
3277
|
};
|
|
3267
|
-
return
|
|
3268
|
-
metadata: { [
|
|
3278
|
+
return hs(this.url, t, {
|
|
3279
|
+
metadata: { [Wr]: this.clientId },
|
|
3269
3280
|
...this.opts.transport !== void 0 ? { transport: this.opts.transport } : {},
|
|
3270
3281
|
...this.opts.logger !== void 0 ? { logger: this.opts.logger } : {}
|
|
3271
3282
|
});
|
|
3272
3283
|
}
|
|
3273
3284
|
/** Attach — join the room. The `initial` frame is the `AttachResponse`. */
|
|
3274
3285
|
async attach() {
|
|
3275
|
-
const t = te(
|
|
3286
|
+
const t = te(jt, C(jt)), n = await this.client.stream(re(ne.method.attach), t);
|
|
3276
3287
|
let s;
|
|
3277
3288
|
try {
|
|
3278
|
-
s = fe(
|
|
3289
|
+
s = fe(Xr, n.initial);
|
|
3279
3290
|
} catch (r) {
|
|
3280
3291
|
throw n.cancel(), r;
|
|
3281
3292
|
}
|
|
@@ -3286,10 +3297,10 @@ class Hr {
|
|
|
3286
3297
|
* timestamp, rewritten attachment URLs) — the former POST echo.
|
|
3287
3298
|
*/
|
|
3288
3299
|
async message(t) {
|
|
3289
|
-
const n = C(
|
|
3300
|
+
const n = C(qt, {
|
|
3290
3301
|
clientMessageId: t.clientMessageId,
|
|
3291
3302
|
attachments: (t.attachments ?? []).map(
|
|
3292
|
-
(i) => C(
|
|
3303
|
+
(i) => C(Gr, {
|
|
3293
3304
|
id: i.id,
|
|
3294
3305
|
name: i.name,
|
|
3295
3306
|
contentType: i.contentType,
|
|
@@ -3301,51 +3312,48 @@ class Hr {
|
|
|
3301
3312
|
...t.html !== void 0 ? { html: t.html } : {},
|
|
3302
3313
|
...t.value !== void 0 ? { value: t.value } : {},
|
|
3303
3314
|
...t.galleryLabel !== void 0 ? { galleryLabel: t.galleryLabel } : {},
|
|
3304
|
-
metadata: C(
|
|
3315
|
+
...t.metadata?.audience !== void 0 ? { metadata: C(Br, t.metadata) } : {}
|
|
3305
3316
|
}), s = await this.client.call(
|
|
3306
3317
|
re(ne.method.message),
|
|
3307
|
-
te(
|
|
3308
|
-
), r = fe(
|
|
3318
|
+
te(qt, n)
|
|
3319
|
+
), r = fe(Kr, s);
|
|
3309
3320
|
if (r.message === void 0)
|
|
3310
3321
|
throw h.session("chat message response carried no message");
|
|
3311
|
-
return
|
|
3322
|
+
return Xn(r.message);
|
|
3312
3323
|
}
|
|
3313
3324
|
/** Typing — on/off indicator. Unary; the response is empty. */
|
|
3314
3325
|
async typing(t, n) {
|
|
3315
|
-
const s = C(
|
|
3326
|
+
const s = C(Ht, {
|
|
3316
3327
|
state: t,
|
|
3317
|
-
metadata: C(
|
|
3328
|
+
...n?.audience !== void 0 ? { metadata: C(Yr, n) } : {}
|
|
3318
3329
|
});
|
|
3319
3330
|
await this.client.call(
|
|
3320
3331
|
re(ne.method.typing),
|
|
3321
|
-
te(
|
|
3332
|
+
te(Ht, s)
|
|
3322
3333
|
);
|
|
3323
3334
|
}
|
|
3324
3335
|
/** Leave — explicit participant leave (immediate finalize, idempotent). */
|
|
3325
3336
|
async leave() {
|
|
3326
3337
|
await this.client.call(
|
|
3327
3338
|
re(ne.method.leave),
|
|
3328
|
-
te(
|
|
3339
|
+
te(Zt, C(Zt))
|
|
3329
3340
|
);
|
|
3330
3341
|
}
|
|
3331
3342
|
}
|
|
3332
|
-
function
|
|
3343
|
+
function zr(e, t) {
|
|
3333
3344
|
if (e === "internal" || e === "all") return e;
|
|
3334
3345
|
throw h.session(`${t} carried invalid or missing metadata.audience`);
|
|
3335
3346
|
}
|
|
3336
|
-
function
|
|
3337
|
-
return { audience:
|
|
3338
|
-
}
|
|
3339
|
-
function zr(e) {
|
|
3340
|
-
return { audience: Kn(e, "chat typing event") };
|
|
3347
|
+
function Qr(e) {
|
|
3348
|
+
return { audience: zr(e, "chat typing event") };
|
|
3341
3349
|
}
|
|
3342
3350
|
function re(e) {
|
|
3343
3351
|
return `${e.parent.typeName}/${e.name}`;
|
|
3344
3352
|
}
|
|
3345
|
-
const
|
|
3346
|
-
class
|
|
3353
|
+
const Jr = 3e3, ei = 6e3, ti = 3, ni = 500, si = 2e3;
|
|
3354
|
+
class ri {
|
|
3347
3355
|
constructor(t, n) {
|
|
3348
|
-
this.stream = null, this.terminalFired = !1, this.reattaching = !1, this.provisionedRecoveryPromise = null, this.recoveryGeneration = 0, this.knownMessageIds = /* @__PURE__ */ new Set(), this.outboundOffTimer = null, this.outboundTypingMetadata = null, this.inboundTyping = /* @__PURE__ */ new Map(), this.sessionId = t.sessionId, this.lane = new
|
|
3356
|
+
this.stream = null, this.terminalFired = !1, this.reattaching = !1, this.provisionedRecoveryPromise = null, this.recoveryGeneration = 0, this.knownMessageIds = /* @__PURE__ */ new Set(), this.outboundOffTimer = null, this.outboundTypingMetadata = null, this.inboundTyping = /* @__PURE__ */ new Map(), this.sessionId = t.sessionId, this.lane = new Zr(
|
|
3349
3357
|
{ url: t.url.replace(/\/$/, ""), token: t.token },
|
|
3350
3358
|
{ remint: () => this.remint() }
|
|
3351
3359
|
), this.sessionHttp = n.sessionHttp, this.provisionedRecovery = n.provisionedRecovery, this.dispatcher = n.dispatcher, this.onTerminal = n.onTerminal;
|
|
@@ -3381,7 +3389,7 @@ class si {
|
|
|
3381
3389
|
// ── Outbound API ─────────────────────────────────────────────────────
|
|
3382
3390
|
async sendMessage(t) {
|
|
3383
3391
|
this.cancelOutboundDebounce({ flushOff: !0 });
|
|
3384
|
-
const n =
|
|
3392
|
+
const n = hn(), s = tt(t.metadata, "chat message request"), r = {
|
|
3385
3393
|
role: t.role ?? "external",
|
|
3386
3394
|
id: "",
|
|
3387
3395
|
localId: n,
|
|
@@ -3391,13 +3399,13 @@ class si {
|
|
|
3391
3399
|
attachments: t.attachments ?? [],
|
|
3392
3400
|
status: "sending",
|
|
3393
3401
|
state: "completed",
|
|
3394
|
-
metadata: s
|
|
3402
|
+
...s !== void 0 ? { metadata: s } : {}
|
|
3395
3403
|
};
|
|
3396
3404
|
this.knownMessageIds.add(n), this.dispatcher.fire("onMessageAdded", this.sessionId, "chat", r);
|
|
3397
3405
|
try {
|
|
3398
3406
|
const i = {
|
|
3399
3407
|
clientMessageId: n,
|
|
3400
|
-
metadata: s,
|
|
3408
|
+
...s !== void 0 ? { metadata: s } : {},
|
|
3401
3409
|
...t.text !== void 0 ? { text: t.text } : {},
|
|
3402
3410
|
...t.html !== void 0 ? { html: t.html } : {},
|
|
3403
3411
|
...t.attachments && t.attachments.length > 0 ? { attachments: t.attachments } : {},
|
|
@@ -3429,12 +3437,12 @@ class si {
|
|
|
3429
3437
|
}), i;
|
|
3430
3438
|
}
|
|
3431
3439
|
}
|
|
3432
|
-
notifyTyping(t
|
|
3433
|
-
this.outboundOffTimer ? (clearTimeout(this.outboundOffTimer), this.outboundTypingMetadata?.audience !== t
|
|
3440
|
+
notifyTyping(t) {
|
|
3441
|
+
this.outboundOffTimer ? (clearTimeout(this.outboundOffTimer), this.outboundTypingMetadata?.audience !== t?.audience && (this.sendTyping("off", this.outboundTypingMetadata ?? void 0), this.sendTyping("on", t))) : this.sendTyping("on", t), this.outboundTypingMetadata = t, this.outboundOffTimer = setTimeout(() => {
|
|
3434
3442
|
this.outboundOffTimer = null;
|
|
3435
3443
|
const n = this.outboundTypingMetadata;
|
|
3436
|
-
this.outboundTypingMetadata = null,
|
|
3437
|
-
},
|
|
3444
|
+
this.outboundTypingMetadata = null, this.sendTyping("off", n ?? void 0);
|
|
3445
|
+
}, Jr);
|
|
3438
3446
|
}
|
|
3439
3447
|
stopTyping() {
|
|
3440
3448
|
this.cancelOutboundDebounce({ flushOff: !0 });
|
|
@@ -3445,7 +3453,7 @@ class si {
|
|
|
3445
3453
|
this.fireTerminal({ kind: "localClose" }), n && await Promise.race([
|
|
3446
3454
|
this.lane.leave().catch((s) => {
|
|
3447
3455
|
}),
|
|
3448
|
-
W(
|
|
3456
|
+
W(si)
|
|
3449
3457
|
]);
|
|
3450
3458
|
}
|
|
3451
3459
|
/**
|
|
@@ -3473,7 +3481,7 @@ class si {
|
|
|
3473
3481
|
if (this.terminalFired || this.stream !== t) continue;
|
|
3474
3482
|
let r;
|
|
3475
3483
|
try {
|
|
3476
|
-
r =
|
|
3484
|
+
r = qr(s);
|
|
3477
3485
|
} catch {
|
|
3478
3486
|
this.fireTerminal({ kind: "protocolViolation" });
|
|
3479
3487
|
return;
|
|
@@ -3626,8 +3634,8 @@ class si {
|
|
|
3626
3634
|
this.reattaching = !0;
|
|
3627
3635
|
try {
|
|
3628
3636
|
let t = !1;
|
|
3629
|
-
for (let n = 0; n <
|
|
3630
|
-
if (await W(
|
|
3637
|
+
for (let n = 0; n < ti; n++) {
|
|
3638
|
+
if (await W(ni * 2 ** n), this.terminalFired) return;
|
|
3631
3639
|
try {
|
|
3632
3640
|
const { stream: s } = await this.lane.attach();
|
|
3633
3641
|
if (this.terminalFired) {
|
|
@@ -3718,7 +3726,7 @@ class si {
|
|
|
3718
3726
|
...t,
|
|
3719
3727
|
state: "off"
|
|
3720
3728
|
});
|
|
3721
|
-
},
|
|
3729
|
+
}, ei);
|
|
3722
3730
|
this.inboundTyping.set(t.participantId, { timer: n, update: t });
|
|
3723
3731
|
}
|
|
3724
3732
|
clearInboundWatchdog(t) {
|
|
@@ -3743,7 +3751,7 @@ class si {
|
|
|
3743
3751
|
if (this.outboundOffTimer) {
|
|
3744
3752
|
clearTimeout(this.outboundOffTimer), this.outboundOffTimer = null;
|
|
3745
3753
|
const n = this.outboundTypingMetadata;
|
|
3746
|
-
this.outboundTypingMetadata = null, t &&
|
|
3754
|
+
this.outboundTypingMetadata = null, t && this.sendTyping("off", n ?? void 0);
|
|
3747
3755
|
}
|
|
3748
3756
|
}
|
|
3749
3757
|
async sendTyping(t, n) {
|
|
@@ -3759,7 +3767,7 @@ class si {
|
|
|
3759
3767
|
this.stream = null, n && n.cancel(), this.clearAllInboundWatchdogs({ notify: this.provisionedRecovery !== void 0 }), this.outboundOffTimer && (clearTimeout(this.outboundOffTimer), this.outboundOffTimer = null), this.outboundTypingMetadata = null, this.onTerminal(t, this.sessionId);
|
|
3760
3768
|
}
|
|
3761
3769
|
}
|
|
3762
|
-
class
|
|
3770
|
+
class ii {
|
|
3763
3771
|
constructor(t) {
|
|
3764
3772
|
this.endpoint = t.endpoint.replace(/\/$/, ""), this.defaultHeaders = {}, t.token && (this.defaultHeaders.Authorization = `Bearer ${t.token}`);
|
|
3765
3773
|
}
|
|
@@ -3789,7 +3797,7 @@ class ri {
|
|
|
3789
3797
|
} catch (a) {
|
|
3790
3798
|
throw h.other(`fetch failed: ${a.message}`);
|
|
3791
3799
|
}
|
|
3792
|
-
return
|
|
3800
|
+
return Qt(i);
|
|
3793
3801
|
}
|
|
3794
3802
|
async getJsonAbsolute(t, n) {
|
|
3795
3803
|
const s = {
|
|
@@ -3803,7 +3811,7 @@ class ri {
|
|
|
3803
3811
|
} catch (i) {
|
|
3804
3812
|
throw h.other(`fetch failed: ${i.message}`);
|
|
3805
3813
|
}
|
|
3806
|
-
return
|
|
3814
|
+
return Qt(r);
|
|
3807
3815
|
}
|
|
3808
3816
|
async deleteAbsolute(t, n) {
|
|
3809
3817
|
const s = {
|
|
@@ -3819,7 +3827,7 @@ class ri {
|
|
|
3819
3827
|
}
|
|
3820
3828
|
if (!r.ok) {
|
|
3821
3829
|
const i = await r.text().catch(() => ""), a = n?.bearer;
|
|
3822
|
-
throw
|
|
3830
|
+
throw nt(
|
|
3823
3831
|
r.status,
|
|
3824
3832
|
a ? i.split(a).join("[REDACTED]") : i
|
|
3825
3833
|
);
|
|
@@ -3829,10 +3837,10 @@ class ri {
|
|
|
3829
3837
|
return this.url(t);
|
|
3830
3838
|
}
|
|
3831
3839
|
}
|
|
3832
|
-
async function
|
|
3840
|
+
async function Qt(e) {
|
|
3833
3841
|
const t = await e.text();
|
|
3834
3842
|
if (!e.ok)
|
|
3835
|
-
throw
|
|
3843
|
+
throw nt(e.status, t);
|
|
3836
3844
|
let n;
|
|
3837
3845
|
if (t.length !== 0) {
|
|
3838
3846
|
try {
|
|
@@ -3840,19 +3848,19 @@ async function zt(e) {
|
|
|
3840
3848
|
} catch (s) {
|
|
3841
3849
|
throw h.other(`decode response: ${s.message}`);
|
|
3842
3850
|
}
|
|
3843
|
-
if (
|
|
3851
|
+
if (sn(n))
|
|
3844
3852
|
throw h.http(e.status, n.error.code, n.error.message);
|
|
3845
3853
|
return n;
|
|
3846
3854
|
}
|
|
3847
3855
|
}
|
|
3848
|
-
function
|
|
3856
|
+
function nt(e, t) {
|
|
3849
3857
|
if (e >= 500)
|
|
3850
3858
|
return h.serverUnavailable(e);
|
|
3851
3859
|
if (t.length === 0)
|
|
3852
3860
|
return h.http(e, "", `HTTP ${e}`);
|
|
3853
3861
|
try {
|
|
3854
3862
|
const n = JSON.parse(t);
|
|
3855
|
-
if (
|
|
3863
|
+
if (sn(n))
|
|
3856
3864
|
return h.http(e, n.error.code, n.error.message);
|
|
3857
3865
|
} catch {
|
|
3858
3866
|
}
|
|
@@ -3861,7 +3869,7 @@ function tt(e, t) {
|
|
|
3861
3869
|
function ve(e, t) {
|
|
3862
3870
|
return t ? `${e}?userId=${encodeURIComponent(t)}` : e;
|
|
3863
3871
|
}
|
|
3864
|
-
class
|
|
3872
|
+
class ai {
|
|
3865
3873
|
constructor(t, n) {
|
|
3866
3874
|
this.http = t, this.userId = n;
|
|
3867
3875
|
}
|
|
@@ -3880,16 +3888,17 @@ class ii {
|
|
|
3880
3888
|
/** `GET /sessions` — list prior sessions (matches `client-sdk/session`). */
|
|
3881
3889
|
async listSessions() {
|
|
3882
3890
|
const t = await this.http.getJson(ve("/sessions", this.userId));
|
|
3883
|
-
return
|
|
3891
|
+
return oi(t);
|
|
3884
3892
|
}
|
|
3885
3893
|
/** `GET /session/{id}` — fetch transcript + control (matches `client-sdk/session`). */
|
|
3886
|
-
getSession(t) {
|
|
3887
|
-
|
|
3894
|
+
async getSession(t) {
|
|
3895
|
+
const n = await this.http.getJson(
|
|
3888
3896
|
ve(`/session/${encodeURIComponent(t)}`, this.userId)
|
|
3889
3897
|
);
|
|
3898
|
+
return ci(n);
|
|
3890
3899
|
}
|
|
3891
3900
|
}
|
|
3892
|
-
function
|
|
3901
|
+
function oi(e) {
|
|
3893
3902
|
if (!Array.isArray(e))
|
|
3894
3903
|
throw h.other("decode sessions: expected an array");
|
|
3895
3904
|
return e.forEach((t, n) => {
|
|
@@ -3897,9 +3906,41 @@ function ai(e) {
|
|
|
3897
3906
|
throw h.other(`decode sessions[${n}]: expected an object`);
|
|
3898
3907
|
if (typeof t.active != "boolean")
|
|
3899
3908
|
throw h.other(`decode sessions[${n}].active: expected boolean`);
|
|
3900
|
-
}), e
|
|
3909
|
+
}), e.map((t, n) => {
|
|
3910
|
+
const s = t;
|
|
3911
|
+
return s.lastMessage === void 0 || s.lastMessage === null ? s : {
|
|
3912
|
+
...s,
|
|
3913
|
+
lastMessage: Wn(s.lastMessage, `decode sessions[${n}].lastMessage`)
|
|
3914
|
+
};
|
|
3915
|
+
});
|
|
3901
3916
|
}
|
|
3902
|
-
function
|
|
3917
|
+
function ci(e) {
|
|
3918
|
+
if (typeof e != "object" || e === null || Array.isArray(e))
|
|
3919
|
+
throw h.other("decode session: expected an object");
|
|
3920
|
+
const t = e.history;
|
|
3921
|
+
if (!Array.isArray(t))
|
|
3922
|
+
throw h.other("decode session.history: expected an array");
|
|
3923
|
+
return {
|
|
3924
|
+
...e,
|
|
3925
|
+
history: t.map(
|
|
3926
|
+
(n, s) => Wn(n, `decode session.history[${s}]`)
|
|
3927
|
+
)
|
|
3928
|
+
};
|
|
3929
|
+
}
|
|
3930
|
+
function Wn(e, t) {
|
|
3931
|
+
if (typeof e != "object" || e === null || Array.isArray(e))
|
|
3932
|
+
throw h.other(`${t}: expected an object`);
|
|
3933
|
+
const n = e, s = tt(
|
|
3934
|
+
e.metadata,
|
|
3935
|
+
t
|
|
3936
|
+
);
|
|
3937
|
+
if (s === void 0) {
|
|
3938
|
+
const { metadata: r, ...i } = n;
|
|
3939
|
+
return i;
|
|
3940
|
+
}
|
|
3941
|
+
return { ...n, metadata: s };
|
|
3942
|
+
}
|
|
3943
|
+
function ui(e, t, n, s) {
|
|
3903
3944
|
return new Promise((r, i) => {
|
|
3904
3945
|
const a = new XMLHttpRequest();
|
|
3905
3946
|
a.open("POST", e, !0), s && a.setRequestHeader("Authorization", `Bearer ${s}`);
|
|
@@ -3916,11 +3957,11 @@ function oi(e, t, n, s) {
|
|
|
3916
3957
|
}), a.onload = () => {
|
|
3917
3958
|
const d = a.status, f = a.responseText ?? "";
|
|
3918
3959
|
if (d < 200 || d >= 300) {
|
|
3919
|
-
i(
|
|
3960
|
+
i(nt(d, hi(f, s)));
|
|
3920
3961
|
return;
|
|
3921
3962
|
}
|
|
3922
3963
|
try {
|
|
3923
|
-
const p =
|
|
3964
|
+
const p = li(JSON.parse(f));
|
|
3924
3965
|
if (n.onProgress && t.size > 0) {
|
|
3925
3966
|
const m = {
|
|
3926
3967
|
bytesUploaded: t.size,
|
|
@@ -3947,8 +3988,8 @@ function oi(e, t, n, s) {
|
|
|
3947
3988
|
a.send(o);
|
|
3948
3989
|
});
|
|
3949
3990
|
}
|
|
3950
|
-
function
|
|
3951
|
-
if (!
|
|
3991
|
+
function li(e) {
|
|
3992
|
+
if (!di(e)) throw h.other("decode response: attachment must be an object");
|
|
3952
3993
|
const { id: t, name: n, contentType: s, url: r } = e;
|
|
3953
3994
|
if (typeof t != "string" || typeof n != "string" || typeof s != "string")
|
|
3954
3995
|
throw h.other("decode response: attachment id, name, and contentType must be strings");
|
|
@@ -3956,17 +3997,17 @@ function ci(e) {
|
|
|
3956
3997
|
throw h.other("decode response: attachment url must be a string when present");
|
|
3957
3998
|
return { id: t, name: n, contentType: s, ...r !== void 0 ? { url: r } : {} };
|
|
3958
3999
|
}
|
|
3959
|
-
function
|
|
4000
|
+
function di(e) {
|
|
3960
4001
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
3961
4002
|
}
|
|
3962
|
-
function
|
|
4003
|
+
function hi(e, t) {
|
|
3963
4004
|
return t ? e.split(t).join("[REDACTED]") : e;
|
|
3964
4005
|
}
|
|
3965
|
-
function
|
|
4006
|
+
function fi(e, t) {
|
|
3966
4007
|
if (e.size === 0)
|
|
3967
4008
|
return { ok: !1, error: h.attachment("EMPTY_FILE", `Empty file: ${e.name}`) };
|
|
3968
4009
|
if (!t) return { ok: !0 };
|
|
3969
|
-
const n =
|
|
4010
|
+
const n = mi(e.type);
|
|
3970
4011
|
if (!n)
|
|
3971
4012
|
return {
|
|
3972
4013
|
ok: !1,
|
|
@@ -3990,28 +4031,28 @@ function di(e, t) {
|
|
|
3990
4031
|
)
|
|
3991
4032
|
} : { ok: !0 };
|
|
3992
4033
|
}
|
|
3993
|
-
function
|
|
4034
|
+
function mi(e) {
|
|
3994
4035
|
return e ? e.startsWith("image/") ? "images" : e.startsWith("video/") ? "videos" : e.startsWith("audio/") ? "audio" : e.startsWith("application/") || e.startsWith("text/") || e === "application/pdf" ? "documents" : null : null;
|
|
3995
4036
|
}
|
|
3996
|
-
const
|
|
3997
|
-
function
|
|
3998
|
-
const e = localStorage.getItem(
|
|
4037
|
+
const Jt = "origonWebSdkUserId";
|
|
4038
|
+
function pi() {
|
|
4039
|
+
const e = localStorage.getItem(Jt);
|
|
3999
4040
|
if (e) return e;
|
|
4000
|
-
const t =
|
|
4001
|
-
return localStorage.setItem(
|
|
4041
|
+
const t = hn();
|
|
4042
|
+
return localStorage.setItem(Jt, t), t;
|
|
4002
4043
|
}
|
|
4003
|
-
const
|
|
4044
|
+
const bi = (1n << 62n) - 1n;
|
|
4004
4045
|
class y extends Error {
|
|
4005
4046
|
constructor(t) {
|
|
4006
4047
|
super(t), this.name = "CodecError";
|
|
4007
4048
|
}
|
|
4008
4049
|
}
|
|
4009
|
-
function
|
|
4050
|
+
function gi(e) {
|
|
4010
4051
|
if (e < 0n) throw new y(`negative varint: ${e}`);
|
|
4011
4052
|
if (e <= 63n) return 1;
|
|
4012
4053
|
if (e <= 16383n) return 2;
|
|
4013
4054
|
if (e <= 1073741823n) return 4;
|
|
4014
|
-
if (e <=
|
|
4055
|
+
if (e <= bi) return 8;
|
|
4015
4056
|
throw new y(`varint overflow: ${e}`);
|
|
4016
4057
|
}
|
|
4017
4058
|
class X {
|
|
@@ -4036,7 +4077,7 @@ class X {
|
|
|
4036
4077
|
this.chunks.push(t), this.len += t.length;
|
|
4037
4078
|
}
|
|
4038
4079
|
putVarint(t) {
|
|
4039
|
-
const n = typeof t == "number" ? BigInt(t) : t, s =
|
|
4080
|
+
const n = typeof t == "number" ? BigInt(t) : t, s = gi(n);
|
|
4040
4081
|
switch (s) {
|
|
4041
4082
|
case 1:
|
|
4042
4083
|
this.putU8(Number(n));
|
|
@@ -4156,7 +4197,7 @@ class ye {
|
|
|
4156
4197
|
return new TextDecoder("utf-8", { fatal: !0 }).decode(this.getLengthPrefixedBytes());
|
|
4157
4198
|
}
|
|
4158
4199
|
}
|
|
4159
|
-
function
|
|
4200
|
+
function Ei(e) {
|
|
4160
4201
|
try {
|
|
4161
4202
|
const t = new ye(e);
|
|
4162
4203
|
t.getVarint();
|
|
@@ -4166,16 +4207,16 @@ function bi(e) {
|
|
|
4166
4207
|
return null;
|
|
4167
4208
|
}
|
|
4168
4209
|
}
|
|
4169
|
-
const
|
|
4170
|
-
function
|
|
4171
|
-
const t = new X(), n = e.endOfGroup ?
|
|
4210
|
+
const yi = 1, jn = 2, wi = 4, Ii = 8, Ni = 32;
|
|
4211
|
+
function Ti(e) {
|
|
4212
|
+
const t = new X(), n = e.endOfGroup ? jn : 0;
|
|
4172
4213
|
return t.putVarint(n), t.putVarint(e.trackAlias), t.putVarint(e.groupId), t.putVarint(e.objectId), t.putU8(e.publisherPriority & 255), t.putBytes(e.payload), t.toUint8Array();
|
|
4173
4214
|
}
|
|
4174
|
-
function
|
|
4215
|
+
function Si(e) {
|
|
4175
4216
|
const t = new ye(e), n = Number(t.getVarint());
|
|
4176
4217
|
if (!(n >= 0 && n <= 15 || n >= 32 && n <= 47))
|
|
4177
4218
|
throw new y(`invalid ObjectDatagram type byte 0x${n.toString(16)}`);
|
|
4178
|
-
const s = (n &
|
|
4219
|
+
const s = (n & yi) !== 0, r = (n & jn) !== 0, i = (n & wi) !== 0, a = (n & Ii) !== 0, o = (n & Ni) !== 0;
|
|
4179
4220
|
if (o && r)
|
|
4180
4221
|
throw new y("status datagram cannot also be end-of-group");
|
|
4181
4222
|
const l = t.getVarint(), u = t.getVarint(), d = i ? 1n : t.getVarint(), f = a ? 0 : t.getU8();
|
|
@@ -4207,11 +4248,11 @@ const ie = {
|
|
|
4207
4248
|
AudioObject: 0,
|
|
4208
4249
|
AudioFeedback: 1
|
|
4209
4250
|
};
|
|
4210
|
-
function
|
|
4251
|
+
function en(e, t) {
|
|
4211
4252
|
const n = new Uint8Array(t.length + 1);
|
|
4212
4253
|
return n[0] = e, n.set(t, 1), n;
|
|
4213
4254
|
}
|
|
4214
|
-
function
|
|
4255
|
+
function ki(e) {
|
|
4215
4256
|
if (e.length === 0) throw new y("empty datagram envelope");
|
|
4216
4257
|
return { cls: e[0], body: e.subarray(1) };
|
|
4217
4258
|
}
|
|
@@ -4236,31 +4277,31 @@ const Pe = 64 * 1024, S = {
|
|
|
4236
4277
|
// 0x54 = DtmfReceived — not implemented; uni-stream payload anyway
|
|
4237
4278
|
MOQ_ERROR: 0x55n
|
|
4238
4279
|
};
|
|
4239
|
-
function
|
|
4240
|
-
const t = new X(), { msgType: n, payload: s } =
|
|
4280
|
+
function Ai(e) {
|
|
4281
|
+
const t = new X(), { msgType: n, payload: s } = _i(e);
|
|
4241
4282
|
if (s.length > Pe)
|
|
4242
4283
|
throw new y(`control frame payload ${s.length} > ${Pe}`);
|
|
4243
4284
|
return t.putVarint(n), t.putVarint(s.length), t.putBytes(s), t.toUint8Array();
|
|
4244
4285
|
}
|
|
4245
|
-
function
|
|
4246
|
-
const t =
|
|
4286
|
+
function Ri(e) {
|
|
4287
|
+
const t = Ei(e);
|
|
4247
4288
|
if (t === null || t > e.length) return null;
|
|
4248
4289
|
const n = new ye(e), s = n.getVarint(), r = Number(n.getVarint());
|
|
4249
4290
|
if (r > Pe)
|
|
4250
4291
|
throw new y(`oversized payload ${r}`);
|
|
4251
4292
|
const i = n.getBytes(r);
|
|
4252
|
-
return { msg:
|
|
4293
|
+
return { msg: vi(s, i), consumed: t };
|
|
4253
4294
|
}
|
|
4254
|
-
function
|
|
4295
|
+
function _i(e) {
|
|
4255
4296
|
switch (e.type) {
|
|
4256
4297
|
case "connect":
|
|
4257
|
-
return { msgType: S.CONNECT, payload:
|
|
4298
|
+
return { msgType: S.CONNECT, payload: Xi(e.data) };
|
|
4258
4299
|
case "negotiateMedia":
|
|
4259
|
-
return { msgType: S.NEGOTIATE_MEDIA, payload:
|
|
4300
|
+
return { msgType: S.NEGOTIATE_MEDIA, payload: Ki(e.data) };
|
|
4260
4301
|
case "mute":
|
|
4261
|
-
return { msgType: S.MUTE, payload:
|
|
4302
|
+
return { msgType: S.MUTE, payload: Wi(e.data) };
|
|
4262
4303
|
case "resume":
|
|
4263
|
-
return { msgType: S.RESUME, payload:
|
|
4304
|
+
return { msgType: S.RESUME, payload: ji(e.data) };
|
|
4264
4305
|
// The remaining variants are server-emitted; we never encode them
|
|
4265
4306
|
// outbound. Including the cases keeps the union exhaustive.
|
|
4266
4307
|
case "connectOk":
|
|
@@ -4276,39 +4317,39 @@ function Ai(e) {
|
|
|
4276
4317
|
throw new y(`refusing to encode server-emitted variant '${e.type}'`);
|
|
4277
4318
|
}
|
|
4278
4319
|
}
|
|
4279
|
-
function
|
|
4320
|
+
function vi(e, t) {
|
|
4280
4321
|
const n = new ye(t);
|
|
4281
4322
|
let s;
|
|
4282
4323
|
switch (e) {
|
|
4283
4324
|
case S.CONNECT_OK:
|
|
4284
|
-
s = { type: "connectOk", data:
|
|
4325
|
+
s = { type: "connectOk", data: qi(n) };
|
|
4285
4326
|
break;
|
|
4286
4327
|
case S.NEGOTIATE_MEDIA_OK:
|
|
4287
|
-
s = { type: "negotiateMediaOk", data:
|
|
4328
|
+
s = { type: "negotiateMediaOk", data: Hi(n) };
|
|
4288
4329
|
break;
|
|
4289
4330
|
case S.MUTE_OK:
|
|
4290
|
-
s = { type: "muteOk", data:
|
|
4331
|
+
s = { type: "muteOk", data: Zi(n) };
|
|
4291
4332
|
break;
|
|
4292
4333
|
case S.RESUME_OK:
|
|
4293
|
-
s = { type: "resumeOk", data:
|
|
4334
|
+
s = { type: "resumeOk", data: zi(n) };
|
|
4294
4335
|
break;
|
|
4295
4336
|
case S.PEER_ATTACHED:
|
|
4296
|
-
s = { type: "peerAttached", data:
|
|
4337
|
+
s = { type: "peerAttached", data: Qi(n) };
|
|
4297
4338
|
break;
|
|
4298
4339
|
case S.PEER_DETACHED:
|
|
4299
|
-
s = { type: "peerDetached", data:
|
|
4340
|
+
s = { type: "peerDetached", data: Ji(n) };
|
|
4300
4341
|
break;
|
|
4301
4342
|
case S.ENDPOINT_MUTED:
|
|
4302
|
-
s = { type: "endpointMuted", data:
|
|
4343
|
+
s = { type: "endpointMuted", data: ea(n) };
|
|
4303
4344
|
break;
|
|
4304
4345
|
case S.ENDPOINT_HANGUP:
|
|
4305
|
-
s = { type: "endpointHangup", data:
|
|
4346
|
+
s = { type: "endpointHangup", data: ta(n) };
|
|
4306
4347
|
break;
|
|
4307
4348
|
case S.PEER_STATE_CHANGED:
|
|
4308
|
-
s = { type: "peerStateChanged", data:
|
|
4349
|
+
s = { type: "peerStateChanged", data: na(n) };
|
|
4309
4350
|
break;
|
|
4310
4351
|
case S.MOQ_ERROR:
|
|
4311
|
-
s = { type: "moqError", data:
|
|
4352
|
+
s = { type: "moqError", data: sa(n) };
|
|
4312
4353
|
break;
|
|
4313
4354
|
default:
|
|
4314
4355
|
throw new y(`unknown control message type 0x${e.toString(16)}`);
|
|
@@ -4319,17 +4360,17 @@ function Ri(e, t) {
|
|
|
4319
4360
|
);
|
|
4320
4361
|
return s;
|
|
4321
4362
|
}
|
|
4322
|
-
function
|
|
4363
|
+
function Oi(e) {
|
|
4323
4364
|
switch (e) {
|
|
4324
4365
|
case "audio":
|
|
4325
4366
|
return 1n;
|
|
4326
4367
|
}
|
|
4327
4368
|
}
|
|
4328
|
-
function
|
|
4369
|
+
function Ci(e) {
|
|
4329
4370
|
if (e === 1n) return "audio";
|
|
4330
4371
|
throw new y(`unknown EncodingClass id ${e}`);
|
|
4331
4372
|
}
|
|
4332
|
-
function
|
|
4373
|
+
function Di(e) {
|
|
4333
4374
|
switch (e) {
|
|
4334
4375
|
case "primary":
|
|
4335
4376
|
return 1n;
|
|
@@ -4337,12 +4378,12 @@ function Oi(e) {
|
|
|
4337
4378
|
return 2n;
|
|
4338
4379
|
}
|
|
4339
4380
|
}
|
|
4340
|
-
function
|
|
4381
|
+
function Ui(e) {
|
|
4341
4382
|
if (e === 1n) return "primary";
|
|
4342
4383
|
if (e === 2n) return "captions";
|
|
4343
4384
|
throw new y(`unknown TrackPurpose id ${e}`);
|
|
4344
4385
|
}
|
|
4345
|
-
function
|
|
4386
|
+
function Li(e) {
|
|
4346
4387
|
switch (e) {
|
|
4347
4388
|
case "opus":
|
|
4348
4389
|
return 1n;
|
|
@@ -4352,13 +4393,13 @@ function Di(e) {
|
|
|
4352
4393
|
return 3n;
|
|
4353
4394
|
}
|
|
4354
4395
|
}
|
|
4355
|
-
function
|
|
4396
|
+
function st(e) {
|
|
4356
4397
|
if (e === 1n) return "opus";
|
|
4357
4398
|
if (e === 2n) return "pcmu";
|
|
4358
4399
|
if (e === 3n) return "pcma";
|
|
4359
4400
|
throw new y(`unknown AudioCodec id ${e}`);
|
|
4360
4401
|
}
|
|
4361
|
-
function
|
|
4402
|
+
function Mi(e) {
|
|
4362
4403
|
switch (e) {
|
|
4363
4404
|
case "none":
|
|
4364
4405
|
return 0n;
|
|
@@ -4370,165 +4411,165 @@ function Ui(e) {
|
|
|
4370
4411
|
return 3n;
|
|
4371
4412
|
}
|
|
4372
4413
|
}
|
|
4373
|
-
function
|
|
4414
|
+
function qn(e) {
|
|
4374
4415
|
if (e === 0n) return "none";
|
|
4375
4416
|
if (e === 1n) return "uplink";
|
|
4376
4417
|
if (e === 2n) return "downlink";
|
|
4377
4418
|
if (e === 3n) return "both";
|
|
4378
4419
|
throw new y(`unknown MuteScope id ${e}`);
|
|
4379
4420
|
}
|
|
4380
|
-
function
|
|
4421
|
+
function xi(e) {
|
|
4381
4422
|
if (e === 1n) return "normal";
|
|
4382
4423
|
if (e === 2n) return "userCancel";
|
|
4383
4424
|
if (e === 3n) return "error";
|
|
4384
4425
|
throw new y(`unknown HangupReason id ${e}`);
|
|
4385
4426
|
}
|
|
4386
|
-
function
|
|
4427
|
+
function Hn(e) {
|
|
4387
4428
|
if (e === 1n) return "client";
|
|
4388
4429
|
if (e === 2n) return "controller";
|
|
4389
4430
|
if (e === 3n) return "engine";
|
|
4390
4431
|
if (e === 4n) return "networkLost";
|
|
4391
4432
|
throw new y(`unknown Origin id ${e}`);
|
|
4392
4433
|
}
|
|
4393
|
-
function
|
|
4434
|
+
function Pi(e) {
|
|
4394
4435
|
if (e === 1n) return "active";
|
|
4395
4436
|
if (e === 2n) return "held";
|
|
4396
4437
|
if (e === 3n) return "muted";
|
|
4397
4438
|
if (e === 4n) return "hangup";
|
|
4398
4439
|
throw new y(`unknown PeerState id ${e}`);
|
|
4399
4440
|
}
|
|
4400
|
-
function
|
|
4441
|
+
function Vi(e) {
|
|
4401
4442
|
if (e === 1n) return "codecMismatch";
|
|
4402
4443
|
if (e === 2n) return "unsupportedClass";
|
|
4403
4444
|
if (e === 3n) return "capacityExceeded";
|
|
4404
4445
|
throw new y(`unknown TrackRejectionReason id ${e}`);
|
|
4405
4446
|
}
|
|
4406
|
-
function
|
|
4407
|
-
t.putVarint(
|
|
4408
|
-
for (const n of e.codecs) t.putVarint(
|
|
4447
|
+
function Fi(e, t) {
|
|
4448
|
+
t.putVarint(Oi(e.class)), t.putVarint(Di(e.purpose)), t.putVarint(e.codecs.length);
|
|
4449
|
+
for (const n of e.codecs) t.putVarint(Li(n));
|
|
4409
4450
|
}
|
|
4410
|
-
function
|
|
4451
|
+
function Zn(e, t) {
|
|
4411
4452
|
t.putVarint(e.length);
|
|
4412
|
-
for (const n of e)
|
|
4453
|
+
for (const n of e) Fi(n, t);
|
|
4413
4454
|
}
|
|
4414
|
-
function
|
|
4455
|
+
function Gi(e) {
|
|
4415
4456
|
return {
|
|
4416
4457
|
offerIndex: Number(e.getVarint()),
|
|
4417
4458
|
alias: e.getVarint(),
|
|
4418
|
-
codec:
|
|
4459
|
+
codec: st(e.getVarint()),
|
|
4419
4460
|
frameSizeMs: Number(e.getVarint())
|
|
4420
4461
|
};
|
|
4421
4462
|
}
|
|
4422
|
-
function
|
|
4463
|
+
function zn(e) {
|
|
4423
4464
|
const t = Number(e.getVarint()), n = [];
|
|
4424
|
-
for (let s = 0; s < t; s++) n.push(
|
|
4465
|
+
for (let s = 0; s < t; s++) n.push(Gi(e));
|
|
4425
4466
|
return n;
|
|
4426
4467
|
}
|
|
4427
|
-
function
|
|
4468
|
+
function Bi(e) {
|
|
4428
4469
|
return {
|
|
4429
4470
|
offerIndex: Number(e.getVarint()),
|
|
4430
|
-
reason:
|
|
4471
|
+
reason: Vi(e.getVarint())
|
|
4431
4472
|
};
|
|
4432
4473
|
}
|
|
4433
|
-
function
|
|
4474
|
+
function Qn(e) {
|
|
4434
4475
|
const t = Number(e.getVarint()), n = [];
|
|
4435
|
-
for (let s = 0; s < t; s++) n.push(
|
|
4476
|
+
for (let s = 0; s < t; s++) n.push(Bi(e));
|
|
4436
4477
|
return n;
|
|
4437
4478
|
}
|
|
4438
|
-
function
|
|
4479
|
+
function Yi(e) {
|
|
4439
4480
|
return {
|
|
4440
4481
|
peerEndpointId: e.getString(),
|
|
4441
4482
|
alias: e.getVarint(),
|
|
4442
|
-
codec:
|
|
4483
|
+
codec: st(e.getVarint())
|
|
4443
4484
|
};
|
|
4444
4485
|
}
|
|
4445
|
-
function
|
|
4446
|
-
const t = e.getVarint(), n =
|
|
4447
|
-
for (let a = 0; a < r; a++) i.push(
|
|
4486
|
+
function $i(e) {
|
|
4487
|
+
const t = e.getVarint(), n = qn(e.getVarint()), s = e.getVarint() !== 0n, r = Number(e.getVarint()), i = [];
|
|
4488
|
+
for (let a = 0; a < r; a++) i.push(Yi(e));
|
|
4448
4489
|
return { sessionSeq: t, mute: n, held: s, peers: i };
|
|
4449
4490
|
}
|
|
4450
|
-
function
|
|
4491
|
+
function Xi(e) {
|
|
4451
4492
|
const t = new X();
|
|
4452
|
-
return t.putVarint(e.requestId), t.putLengthPrefixedBytes(e.callToken), t.putString(e.sdkName), t.putString(e.sdkVersion),
|
|
4493
|
+
return t.putVarint(e.requestId), t.putLengthPrefixedBytes(e.callToken), t.putString(e.sdkName), t.putString(e.sdkVersion), Zn(e.offers, t), t.putVarint(e.frameSizeMs), t.toUint8Array();
|
|
4453
4494
|
}
|
|
4454
|
-
function
|
|
4495
|
+
function Ki(e) {
|
|
4455
4496
|
const t = new X();
|
|
4456
|
-
return t.putVarint(e.requestId),
|
|
4497
|
+
return t.putVarint(e.requestId), Zn(e.offers, t), t.putVarint(e.frameSizeMs), t.toUint8Array();
|
|
4457
4498
|
}
|
|
4458
|
-
function
|
|
4499
|
+
function Wi(e) {
|
|
4459
4500
|
const t = new X();
|
|
4460
|
-
return t.putVarint(e.requestId), t.putVarint(
|
|
4501
|
+
return t.putVarint(e.requestId), t.putVarint(Mi(e.scope)), t.toUint8Array();
|
|
4461
4502
|
}
|
|
4462
|
-
function
|
|
4503
|
+
function ji(e) {
|
|
4463
4504
|
const t = new X();
|
|
4464
4505
|
return t.putVarint(e.requestId), t.putLengthPrefixedBytes(e.callToken), t.putVarint(e.lastEventSeq), t.toUint8Array();
|
|
4465
4506
|
}
|
|
4466
|
-
function
|
|
4507
|
+
function qi(e) {
|
|
4467
4508
|
return {
|
|
4468
4509
|
requestId: e.getVarint(),
|
|
4469
4510
|
serverEpochUnix: e.getVarint(),
|
|
4470
4511
|
canonicalPcmRate: Number(e.getVarint()),
|
|
4471
|
-
bindings:
|
|
4472
|
-
rejected:
|
|
4512
|
+
bindings: zn(e),
|
|
4513
|
+
rejected: Qn(e)
|
|
4473
4514
|
};
|
|
4474
4515
|
}
|
|
4475
|
-
function
|
|
4516
|
+
function Hi(e) {
|
|
4476
4517
|
return {
|
|
4477
4518
|
requestId: e.getVarint(),
|
|
4478
|
-
bindings:
|
|
4479
|
-
rejected:
|
|
4519
|
+
bindings: zn(e),
|
|
4520
|
+
rejected: Qn(e)
|
|
4480
4521
|
};
|
|
4481
4522
|
}
|
|
4482
|
-
function
|
|
4523
|
+
function Zi(e) {
|
|
4483
4524
|
return { requestId: e.getVarint() };
|
|
4484
4525
|
}
|
|
4485
|
-
function
|
|
4526
|
+
function zi(e) {
|
|
4486
4527
|
return {
|
|
4487
4528
|
requestId: e.getVarint(),
|
|
4488
|
-
state:
|
|
4529
|
+
state: $i(e)
|
|
4489
4530
|
};
|
|
4490
4531
|
}
|
|
4491
|
-
function
|
|
4532
|
+
function Qi(e) {
|
|
4492
4533
|
return {
|
|
4493
4534
|
requestId: e.getVarint(),
|
|
4494
4535
|
peerEndpointId: e.getString(),
|
|
4495
4536
|
alias: e.getVarint(),
|
|
4496
|
-
class:
|
|
4497
|
-
purpose:
|
|
4498
|
-
codec:
|
|
4537
|
+
class: Ci(e.getVarint()),
|
|
4538
|
+
purpose: Ui(e.getVarint()),
|
|
4539
|
+
codec: st(e.getVarint()),
|
|
4499
4540
|
frameSizeMs: Number(e.getVarint())
|
|
4500
4541
|
};
|
|
4501
4542
|
}
|
|
4502
|
-
function
|
|
4543
|
+
function Ji(e) {
|
|
4503
4544
|
return {
|
|
4504
4545
|
requestId: e.getVarint(),
|
|
4505
4546
|
peerEndpointId: e.getString()
|
|
4506
4547
|
};
|
|
4507
4548
|
}
|
|
4508
|
-
function
|
|
4549
|
+
function ea(e) {
|
|
4509
4550
|
return {
|
|
4510
4551
|
requestId: e.getVarint(),
|
|
4511
4552
|
endpointId: e.getString(),
|
|
4512
|
-
scope:
|
|
4513
|
-
origin:
|
|
4553
|
+
scope: qn(e.getVarint()),
|
|
4554
|
+
origin: Hn(e.getVarint())
|
|
4514
4555
|
};
|
|
4515
4556
|
}
|
|
4516
|
-
function
|
|
4557
|
+
function ta(e) {
|
|
4517
4558
|
return {
|
|
4518
4559
|
requestId: e.getVarint(),
|
|
4519
4560
|
endpointId: e.getString(),
|
|
4520
|
-
reason:
|
|
4521
|
-
origin:
|
|
4561
|
+
reason: xi(e.getVarint()),
|
|
4562
|
+
origin: Hn(e.getVarint())
|
|
4522
4563
|
};
|
|
4523
4564
|
}
|
|
4524
|
-
function
|
|
4565
|
+
function na(e) {
|
|
4525
4566
|
return {
|
|
4526
4567
|
requestId: e.getVarint(),
|
|
4527
4568
|
peerEndpointId: e.getString(),
|
|
4528
|
-
state:
|
|
4569
|
+
state: Pi(e.getVarint())
|
|
4529
4570
|
};
|
|
4530
4571
|
}
|
|
4531
|
-
function
|
|
4572
|
+
function sa(e) {
|
|
4532
4573
|
const t = e.getVarint();
|
|
4533
4574
|
let n;
|
|
4534
4575
|
if (t === 0n)
|
|
@@ -4538,9 +4579,9 @@ function ta(e) {
|
|
|
4538
4579
|
else
|
|
4539
4580
|
throw new y(`MoqError.request_id present tag ${t} not in {0,1}`);
|
|
4540
4581
|
const s = e.getVarint(), r = e.getString();
|
|
4541
|
-
return { requestId: n, code:
|
|
4582
|
+
return { requestId: n, code: ra(s), rawCode: s, detail: r };
|
|
4542
4583
|
}
|
|
4543
|
-
function
|
|
4584
|
+
function ra(e) {
|
|
4544
4585
|
switch (e) {
|
|
4545
4586
|
case 0x1001n:
|
|
4546
4587
|
return "endpointNotProvisioned";
|
|
@@ -4568,7 +4609,7 @@ function na(e) {
|
|
|
4568
4609
|
return null;
|
|
4569
4610
|
}
|
|
4570
4611
|
}
|
|
4571
|
-
const
|
|
4612
|
+
const ia = /* @__PURE__ */ new Set([
|
|
4572
4613
|
"sessionEnded",
|
|
4573
4614
|
"tokenInvalid",
|
|
4574
4615
|
"tokenExpired",
|
|
@@ -4606,7 +4647,7 @@ class be {
|
|
|
4606
4647
|
}
|
|
4607
4648
|
/** Encode + write one control frame. Honours WT backpressure. */
|
|
4608
4649
|
async sendControl(t) {
|
|
4609
|
-
const n =
|
|
4650
|
+
const n = Ai(t);
|
|
4610
4651
|
await this.controlWriter.ready, await this.controlWriter.write(n);
|
|
4611
4652
|
}
|
|
4612
4653
|
/**
|
|
@@ -4618,7 +4659,7 @@ class be {
|
|
|
4618
4659
|
let t = new Uint8Array(0);
|
|
4619
4660
|
for (; ; ) {
|
|
4620
4661
|
for (; ; ) {
|
|
4621
|
-
const i =
|
|
4662
|
+
const i = Ri(t);
|
|
4622
4663
|
if (!i) break;
|
|
4623
4664
|
yield i.msg, t = t.subarray(i.consumed);
|
|
4624
4665
|
}
|
|
@@ -4693,8 +4734,8 @@ class be {
|
|
|
4693
4734
|
}
|
|
4694
4735
|
}
|
|
4695
4736
|
}
|
|
4696
|
-
const
|
|
4697
|
-
class
|
|
4737
|
+
const aa = 2e3;
|
|
4738
|
+
class oa {
|
|
4698
4739
|
constructor(t) {
|
|
4699
4740
|
this.ctx = null, this.node = null, this.micStream = null, this.micSource = null, this.silenceSource = null, this.micDiagAnalyser = null, this.micDiagTimer = null, this.outboundCallback = null, this.downlinkFeedbackCallback = null, this.captureGeneration = 0, this.outboundCaptureGeneration = null, this.outputGateEpoch = 0, this.captureCommandId = 0, this.captureAcks = /* @__PURE__ */ new Map(), this.options = {
|
|
4700
4741
|
wasmUrl: t.wasmUrl,
|
|
@@ -4904,7 +4945,7 @@ class ia {
|
|
|
4904
4945
|
const n = ++this.captureCommandId, s = new Promise((r, i) => {
|
|
4905
4946
|
const a = setTimeout(() => {
|
|
4906
4947
|
this.captureAcks.get(n)?.expected === t && (this.captureAcks.delete(n), i(new Error(`${t} acknowledgement timed out`)));
|
|
4907
|
-
},
|
|
4948
|
+
}, aa);
|
|
4908
4949
|
this.captureAcks.set(n, { expected: t, resolve: r, reject: i, timeout: a });
|
|
4909
4950
|
});
|
|
4910
4951
|
return { commandId: n, ack: s };
|
|
@@ -4931,16 +4972,16 @@ class ia {
|
|
|
4931
4972
|
}
|
|
4932
4973
|
}
|
|
4933
4974
|
}
|
|
4934
|
-
const
|
|
4935
|
-
function
|
|
4975
|
+
const tn = [100, 250, 500, 1e3], ca = 1e4, ua = 50;
|
|
4976
|
+
function nn(e, t) {
|
|
4936
4977
|
return new URL(t, e.endsWith("/") ? e : `${e}/`).href;
|
|
4937
4978
|
}
|
|
4938
|
-
const
|
|
4939
|
-
class
|
|
4979
|
+
const la = new URL("./audio/wasm-gen/origon_web_audio_bg.wasm?no-inline", import.meta.url).href, da = new URL("./audio/audio-processor.js?no-inline", import.meta.url).href;
|
|
4980
|
+
class ha {
|
|
4940
4981
|
constructor(t, n) {
|
|
4941
4982
|
this.transport = null, this.requestIdCtr = 1n, this.uplinkAlias = null, this.peerAliasByEndpoint = /* @__PURE__ */ new Map(), this.pendingRequests = /* @__PURE__ */ new Map(), this.closedTransports = /* @__PURE__ */ new WeakSet(), this.lastEventSeq = 0n, this.terminalReason = null, this.statsSubscriberCount = 0, this.latestStats = null, this.statsSubscribers = /* @__PURE__ */ new Set(), this.currentMuteScope = "none", this.startGeneration = 0, this.captureTransition = Promise.resolve(), this.captureGeneration = 0, this.localCaptureEnabled = !1, this.desiredCoach = !1, this.diagTx = 0, this.diagRx = 0, this.diagLastStatsLog = 0, this.sessionId = t.sessionId, this.url = `${t.url.replace(/\/$/, "")}/web`, this.callToken = t.token, this.dispatcher = n.dispatcher, this.onTerminal = n.onTerminal;
|
|
4942
|
-
const s = n.assetBaseUrl ?
|
|
4943
|
-
this.host = new
|
|
4983
|
+
const s = n.assetBaseUrl ? nn(n.assetBaseUrl, "audio/wasm-gen/origon_web_audio_bg.wasm") : la, r = n.assetBaseUrl ? nn(n.assetBaseUrl, "audio/audio-processor.js") : da;
|
|
4984
|
+
this.host = new oa({
|
|
4944
4985
|
wasmUrl: s,
|
|
4945
4986
|
processorUrl: r,
|
|
4946
4987
|
onStats: (i) => this.handleHostStats(i),
|
|
@@ -4955,7 +4996,7 @@ class la {
|
|
|
4955
4996
|
const n = this.startGeneration;
|
|
4956
4997
|
this.assertStartActive(n), await this.host.start(), this.assertStartActive(n), this.host.onOutboundDatagram((s) => {
|
|
4957
4998
|
this.diagTx += 1, this.diagTx === 1 || this.diagTx % 100;
|
|
4958
|
-
const r =
|
|
4999
|
+
const r = en(ie.AudioObject, s);
|
|
4959
5000
|
this.transport?.sendDatagram(r).catch(() => {
|
|
4960
5001
|
});
|
|
4961
5002
|
}), this.host.onDownlinkFeedback((s) => {
|
|
@@ -4965,7 +5006,7 @@ class la {
|
|
|
4965
5006
|
if (r += 2, r + i > s.length) break;
|
|
4966
5007
|
const a = s.subarray(r, r + i);
|
|
4967
5008
|
r += i;
|
|
4968
|
-
const o =
|
|
5009
|
+
const o = en(ie.AudioFeedback, a);
|
|
4969
5010
|
this.transport?.sendDatagram(o).catch(() => {
|
|
4970
5011
|
});
|
|
4971
5012
|
}
|
|
@@ -5096,7 +5137,7 @@ class la {
|
|
|
5096
5137
|
for await (const n of t.readDatagrams()) {
|
|
5097
5138
|
let s;
|
|
5098
5139
|
try {
|
|
5099
|
-
const r =
|
|
5140
|
+
const r = ki(n);
|
|
5100
5141
|
if (r.cls === ie.AudioFeedback) {
|
|
5101
5142
|
this.host.pushUplinkFeedback(r.body);
|
|
5102
5143
|
continue;
|
|
@@ -5108,7 +5149,7 @@ class la {
|
|
|
5108
5149
|
continue;
|
|
5109
5150
|
}
|
|
5110
5151
|
try {
|
|
5111
|
-
const r =
|
|
5152
|
+
const r = Si(s);
|
|
5112
5153
|
this.diagRx += 1, this.diagRx === 1 || this.diagRx % 100;
|
|
5113
5154
|
} catch {
|
|
5114
5155
|
}
|
|
@@ -5129,7 +5170,7 @@ class la {
|
|
|
5129
5170
|
}
|
|
5130
5171
|
if ("requestId" in t.data) {
|
|
5131
5172
|
const s = t.data.requestId;
|
|
5132
|
-
s !== null && s !== 0n && (this.lastEventSeq =
|
|
5173
|
+
s !== null && s !== 0n && (this.lastEventSeq = fa(this.lastEventSeq, s));
|
|
5133
5174
|
}
|
|
5134
5175
|
switch (t.type) {
|
|
5135
5176
|
case "peerAttached": {
|
|
@@ -5162,10 +5203,10 @@ class la {
|
|
|
5162
5203
|
}
|
|
5163
5204
|
case "moqError": {
|
|
5164
5205
|
const s = t.data.code;
|
|
5165
|
-
if (s === null ||
|
|
5206
|
+
if (s === null || ia.has(s)) {
|
|
5166
5207
|
const i = s ?? "unknown";
|
|
5167
5208
|
this.enterTerminalState(
|
|
5168
|
-
s === null ? { kind: "protocolViolation" } :
|
|
5209
|
+
s === null ? { kind: "protocolViolation" } : ma(s),
|
|
5169
5210
|
new Error(`terminal MoqError ${i}`),
|
|
5170
5211
|
`terminal MoqError ${i}`
|
|
5171
5212
|
);
|
|
@@ -5198,14 +5239,14 @@ class la {
|
|
|
5198
5239
|
if (this.rejectPendingRequestsForTransport(
|
|
5199
5240
|
t,
|
|
5200
5241
|
new Error("voice transport closed before control acknowledgement")
|
|
5201
|
-
), this.closedTransports.add(t), this.host.cancelCaptureTransition(!1), this.localCaptureEnabled || (this.captureGeneration += 1, this.host.cancelCaptureTransition(!0)), await W(
|
|
5242
|
+
), this.closedTransports.add(t), this.host.cancelCaptureTransition(!1), this.localCaptureEnabled || (this.captureGeneration += 1, this.host.cancelCaptureTransition(!0)), await W(ua), this.terminalReason) {
|
|
5202
5243
|
this.host.dispose().catch(() => {
|
|
5203
5244
|
}), this.onTerminal(this.terminalReason, this.sessionId);
|
|
5204
5245
|
return;
|
|
5205
5246
|
}
|
|
5206
5247
|
this.transport === t && (this.transport = null);
|
|
5207
|
-
for (let r = 1; r <=
|
|
5208
|
-
const i =
|
|
5248
|
+
for (let r = 1; r <= tn.length && this.isStartActive(n); r++) {
|
|
5249
|
+
const i = tn[r - 1];
|
|
5209
5250
|
this.dispatcher.fire("onReconnecting", this.sessionId, "voice", {
|
|
5210
5251
|
attempt: r,
|
|
5211
5252
|
reason: { kind: "networkLoss" }
|
|
@@ -5309,7 +5350,7 @@ class la {
|
|
|
5309
5350
|
}
|
|
5310
5351
|
const a = setTimeout(() => {
|
|
5311
5352
|
this.pendingRequests.delete(t) && r(new Error(`request ${t} timed out`));
|
|
5312
|
-
},
|
|
5353
|
+
}, ca);
|
|
5313
5354
|
this.pendingRequests.set(t, {
|
|
5314
5355
|
transport: i,
|
|
5315
5356
|
resolve: (o) => {
|
|
@@ -5334,7 +5375,7 @@ class la {
|
|
|
5334
5375
|
/** Outbound datagram payload — for tests / external pumps. */
|
|
5335
5376
|
encodeAudioObject(t) {
|
|
5336
5377
|
if (this.uplinkAlias === null) throw new Error("uplink alias not negotiated");
|
|
5337
|
-
return
|
|
5378
|
+
return Ti({
|
|
5338
5379
|
trackAlias: this.uplinkAlias,
|
|
5339
5380
|
groupId: t.groupId,
|
|
5340
5381
|
objectId: t.objectId,
|
|
@@ -5347,10 +5388,10 @@ class la {
|
|
|
5347
5388
|
return this.currentMuteScope;
|
|
5348
5389
|
}
|
|
5349
5390
|
}
|
|
5350
|
-
function
|
|
5391
|
+
function fa(e, t) {
|
|
5351
5392
|
return e > t ? e : t;
|
|
5352
5393
|
}
|
|
5353
|
-
function
|
|
5394
|
+
function ma(e) {
|
|
5354
5395
|
switch (e) {
|
|
5355
5396
|
case "sessionEnded":
|
|
5356
5397
|
return { kind: "sessionEnded" };
|
|
@@ -5376,20 +5417,20 @@ function ha(e) {
|
|
|
5376
5417
|
return { kind: "replayLost" };
|
|
5377
5418
|
}
|
|
5378
5419
|
}
|
|
5379
|
-
class
|
|
5420
|
+
class pa {
|
|
5380
5421
|
constructor() {
|
|
5381
|
-
this.config = null, this.http = null, this.sessionHttp = null, this.dispatcher = new
|
|
5422
|
+
this.config = null, this.http = null, this.sessionHttp = null, this.dispatcher = new Jn(), this.sessions = /* @__PURE__ */ new Map(), this.pendingUploads = /* @__PURE__ */ new Map();
|
|
5382
5423
|
}
|
|
5383
5424
|
// ── Lifecycle ────────────────────────────────────────────────────────
|
|
5384
5425
|
initialize(t) {
|
|
5385
5426
|
if (!t.endpoint) throw h.missingField("endpoint");
|
|
5386
|
-
const n = t.attachmentBaseUrl === void 0 ? void 0 :
|
|
5427
|
+
const n = t.attachmentBaseUrl === void 0 ? void 0 : Ea(t.endpoint, t.attachmentBaseUrl);
|
|
5387
5428
|
if (n !== void 0 && !t.token)
|
|
5388
5429
|
throw h.missingField("token");
|
|
5389
|
-
this.attributes = t.attributes ? { ...t.attributes } : void 0, this.assetBaseUrl = t.assetBaseUrl, this.attachmentBaseUrl = n, this.attachmentBearer = n === void 0 ? void 0 : t.token, this.userId = t.userId ??
|
|
5430
|
+
this.attributes = t.attributes ? { ...t.attributes } : void 0, this.assetBaseUrl = t.assetBaseUrl, this.attachmentBaseUrl = n, this.attachmentBearer = n === void 0 ? void 0 : t.token, this.userId = t.userId ?? pi(), this.http = new ii({
|
|
5390
5431
|
endpoint: t.endpoint,
|
|
5391
5432
|
...t.token ? { token: t.token } : {}
|
|
5392
|
-
}), this.sessionHttp = new
|
|
5433
|
+
}), this.sessionHttp = new ai(this.http, this.userId);
|
|
5393
5434
|
}
|
|
5394
5435
|
async authenticate() {
|
|
5395
5436
|
const n = await this.requireSessionHttp().postConfig();
|
|
@@ -5425,7 +5466,7 @@ class fa {
|
|
|
5425
5466
|
const n = this.requireSessionHttp();
|
|
5426
5467
|
if (t.sessionId && this.sessions.has(t.sessionId))
|
|
5427
5468
|
throw h.other(`session already active: ${t.sessionId}`);
|
|
5428
|
-
const s =
|
|
5469
|
+
const s = ba(this.attributes, t.data), r = { channel: t.channel };
|
|
5429
5470
|
t.sessionId && (r.sessionId = t.sessionId), s && (r.data = s);
|
|
5430
5471
|
const i = await n.startSession(r);
|
|
5431
5472
|
return t.channel, await this.attachSession(i, t.channel), { sessionId: i.sessionId };
|
|
@@ -5445,7 +5486,7 @@ class fa {
|
|
|
5445
5486
|
throw h.other('chat join options require channel "chat"');
|
|
5446
5487
|
if (t.channel === "chat" && t.voice !== void 0)
|
|
5447
5488
|
throw h.other('voice join options require channel "voice"');
|
|
5448
|
-
const n = t.channel === "chat" ?
|
|
5489
|
+
const n = t.channel === "chat" ? ga(t.chat?.recovery) : void 0, s = {
|
|
5449
5490
|
sessionId: t.sessionId,
|
|
5450
5491
|
url: t.url,
|
|
5451
5492
|
token: t.token
|
|
@@ -5469,7 +5510,7 @@ class fa {
|
|
|
5469
5510
|
*/
|
|
5470
5511
|
async attachSession(t, n, s = !1, r) {
|
|
5471
5512
|
if (n === "voice") {
|
|
5472
|
-
const a = new
|
|
5513
|
+
const a = new ha(t, {
|
|
5473
5514
|
dispatcher: this.dispatcher,
|
|
5474
5515
|
// `sessionId` is the session's *current* id (post-`rename()`), not the
|
|
5475
5516
|
// one captured at construction — so a migrated session tears down its
|
|
@@ -5498,7 +5539,7 @@ class fa {
|
|
|
5498
5539
|
}
|
|
5499
5540
|
return;
|
|
5500
5541
|
}
|
|
5501
|
-
const i = new
|
|
5542
|
+
const i = new ri(t, {
|
|
5502
5543
|
sessionHttp: this.requireSessionHttp(),
|
|
5503
5544
|
provisionedRecovery: r,
|
|
5504
5545
|
dispatcher: this.dispatcher,
|
|
@@ -5584,13 +5625,13 @@ class fa {
|
|
|
5584
5625
|
* defers the whole decision to the server).
|
|
5585
5626
|
*/
|
|
5586
5627
|
async uploadAttachment(t, n) {
|
|
5587
|
-
const s = this.requireHttp(), r = this.config?.attachmentPolicy, i =
|
|
5628
|
+
const s = this.requireHttp(), r = this.config?.attachmentPolicy, i = fi(t, r);
|
|
5588
5629
|
if (!i.ok) throw i.error;
|
|
5589
5630
|
const a = new AbortController();
|
|
5590
5631
|
this.pendingUploads.set(n.uploadId, a);
|
|
5591
5632
|
try {
|
|
5592
|
-
const o =
|
|
5593
|
-
return await
|
|
5633
|
+
const o = wa(a.signal, n.signal), l = this.attachmentBaseUrl ?? s.buildAbsoluteUrl("/attachment");
|
|
5634
|
+
return await ui(
|
|
5594
5635
|
`${l}/upload`,
|
|
5595
5636
|
t,
|
|
5596
5637
|
{ ...n, signal: o },
|
|
@@ -5644,14 +5685,14 @@ class fa {
|
|
|
5644
5685
|
}
|
|
5645
5686
|
}
|
|
5646
5687
|
let Oe = null;
|
|
5647
|
-
function
|
|
5648
|
-
return Oe || (Oe = new
|
|
5688
|
+
function Ia() {
|
|
5689
|
+
return Oe || (Oe = new pa()), Oe;
|
|
5649
5690
|
}
|
|
5650
|
-
function
|
|
5691
|
+
function ba(e, t) {
|
|
5651
5692
|
if (!(!e && !t))
|
|
5652
5693
|
return e ? t ? { ...t, attributes: { ...e, ...t.attributes } } : { attributes: e } : t;
|
|
5653
5694
|
}
|
|
5654
|
-
function
|
|
5695
|
+
function ga(e) {
|
|
5655
5696
|
if (e !== void 0) {
|
|
5656
5697
|
if (e.replay !== "server")
|
|
5657
5698
|
throw h.other('provisioned chat recovery requires replay "server"');
|
|
@@ -5662,18 +5703,18 @@ function pa(e) {
|
|
|
5662
5703
|
return { ...e, delaysMs: [...e.delaysMs] };
|
|
5663
5704
|
}
|
|
5664
5705
|
}
|
|
5665
|
-
function
|
|
5706
|
+
function Ea(e, t) {
|
|
5666
5707
|
let n, s;
|
|
5667
5708
|
try {
|
|
5668
5709
|
n = new URL(e), s = new URL(t, n);
|
|
5669
5710
|
} catch {
|
|
5670
5711
|
throw h.other("invalid attachmentBaseUrl");
|
|
5671
5712
|
}
|
|
5672
|
-
if (t.trim() === "" || t.trim() !== t || !t.startsWith("/") && !/^https?:\/\//.test(t) ||
|
|
5713
|
+
if (t.trim() === "" || t.trim() !== t || !t.startsWith("/") && !/^https?:\/\//.test(t) || ya(t) || s.protocol !== "https:" && s.protocol !== "http:" || s.origin !== n.origin || s.username !== "" || s.password !== "" || s.search !== "" || s.hash !== "" || s.pathname === "/")
|
|
5673
5714
|
throw h.other("attachmentBaseUrl must be an HTTP(S) path on the endpoint origin");
|
|
5674
5715
|
return s.toString().replace(/\/$/, "");
|
|
5675
5716
|
}
|
|
5676
|
-
function
|
|
5717
|
+
function ya(e) {
|
|
5677
5718
|
let t = e;
|
|
5678
5719
|
for (let r = e.length + 1; r > 0; r -= 1) {
|
|
5679
5720
|
if (t.includes("\\")) return !0;
|
|
@@ -5708,12 +5749,12 @@ function ga(e) {
|
|
|
5708
5749
|
}
|
|
5709
5750
|
return !0;
|
|
5710
5751
|
}
|
|
5711
|
-
function
|
|
5752
|
+
function wa(e, t) {
|
|
5712
5753
|
if (!t) return e;
|
|
5713
5754
|
const n = new AbortController(), s = () => n.abort();
|
|
5714
5755
|
return e.aborted || t.aborted ? (n.abort(), n.signal) : (e.addEventListener("abort", s, { once: !0 }), t.addEventListener("abort", s, { once: !0 }), n.signal);
|
|
5715
5756
|
}
|
|
5716
|
-
const
|
|
5757
|
+
const Na = {
|
|
5717
5758
|
AI: "ai",
|
|
5718
5759
|
EXTERNAL: "external",
|
|
5719
5760
|
USER: "user",
|
|
@@ -5721,9 +5762,9 @@ const wa = {
|
|
|
5721
5762
|
};
|
|
5722
5763
|
export {
|
|
5723
5764
|
h as ClientError,
|
|
5724
|
-
|
|
5765
|
+
Na as MESSAGE_ROLES,
|
|
5725
5766
|
T as OrpcError,
|
|
5726
|
-
|
|
5727
|
-
|
|
5767
|
+
pa as SessionManager,
|
|
5768
|
+
Ia as getSessionManager
|
|
5728
5769
|
};
|
|
5729
5770
|
//# sourceMappingURL=origon-web-sdk.js.map
|