@viamrobotics/sdk 0.0.41 → 0.0.43
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 +7 -3
- package/dist/components/arm/Client.d.ts +1 -9
- package/dist/components/encoder/Client.d.ts +19 -0
- package/dist/components/encoder/Encoder.d.ts +18 -0
- package/dist/components/encoder.d.ts +2 -0
- package/dist/main.d.ts +16 -21
- package/dist/main.es.js +1325 -678
- package/dist/main.umd.js +9 -9
- package/dist/robot/Client.d.ts +3 -0
- package/dist/robot/dial.d.ts +17 -2
- package/dist/robot.d.ts +1 -1
- package/dist/services/datamanager/client.d.ts +11 -0
- package/dist/services/datamanager/datamanager.d.ts +4 -0
- package/dist/services/motion/Client.d.ts +20 -0
- package/dist/services/motion/Motion.d.ts +50 -0
- package/dist/services/motion/types.d.ts +4 -0
- package/dist/services/motion.d.ts +3 -0
- package/dist/types.d.ts +26 -0
- package/dist/utils.d.ts +22 -0
- package/package.json +23 -21
package/dist/main.es.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
const version = "0.0.41";
|
|
2
1
|
var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, robot_pb = {}, googleProtobuf = {};
|
|
3
2
|
(function(exports) {
|
|
4
3
|
var $jscomp = $jscomp || {};
|
|
@@ -12472,14 +12471,14 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
|
|
|
12472
12471
|
}([function(p, o, r) {
|
|
12473
12472
|
Object.defineProperty(o, "__esModule", { value: !0 });
|
|
12474
12473
|
var i = r(3), l = function() {
|
|
12475
|
-
function c(d,
|
|
12476
|
-
d === void 0 && (d = {}),
|
|
12477
|
-
var
|
|
12474
|
+
function c(d, m) {
|
|
12475
|
+
d === void 0 && (d = {}), m === void 0 && (m = { splitValues: !1 });
|
|
12476
|
+
var v, y = this;
|
|
12478
12477
|
this.headersMap = {}, d && (typeof Headers < "u" && d instanceof Headers ? i.getHeaderKeys(d).forEach(function(f) {
|
|
12479
12478
|
i.getHeaderValues(d, f).forEach(function(b) {
|
|
12480
|
-
|
|
12479
|
+
m.splitValues ? y.append(f, i.splitHeaderValue(b)) : y.append(f, b);
|
|
12481
12480
|
});
|
|
12482
|
-
}) : typeof (
|
|
12481
|
+
}) : typeof (v = d) == "object" && typeof v.headersMap == "object" && typeof v.forEach == "function" ? d.forEach(function(f, b) {
|
|
12483
12482
|
y.append(f, b);
|
|
12484
12483
|
}) : typeof Map < "u" && d instanceof Map ? d.forEach(function(f, b) {
|
|
12485
12484
|
y.append(b, f);
|
|
@@ -12491,62 +12490,62 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
|
|
|
12491
12490
|
}));
|
|
12492
12491
|
}
|
|
12493
12492
|
return c.prototype.appendFromString = function(d) {
|
|
12494
|
-
for (var
|
|
12495
|
-
`),
|
|
12496
|
-
var y = v
|
|
12493
|
+
for (var m = d.split(`\r
|
|
12494
|
+
`), v = 0; v < m.length; v++) {
|
|
12495
|
+
var y = m[v], f = y.indexOf(":");
|
|
12497
12496
|
if (f > 0) {
|
|
12498
12497
|
var b = y.substring(0, f).trim(), h = y.substring(f + 1).trim();
|
|
12499
12498
|
this.append(b, h);
|
|
12500
12499
|
}
|
|
12501
12500
|
}
|
|
12502
|
-
}, c.prototype.delete = function(d,
|
|
12503
|
-
var
|
|
12504
|
-
if (
|
|
12505
|
-
delete this.headersMap[
|
|
12501
|
+
}, c.prototype.delete = function(d, m) {
|
|
12502
|
+
var v = i.normalizeName(d);
|
|
12503
|
+
if (m === void 0)
|
|
12504
|
+
delete this.headersMap[v];
|
|
12506
12505
|
else {
|
|
12507
|
-
var y = this.headersMap[
|
|
12506
|
+
var y = this.headersMap[v];
|
|
12508
12507
|
if (y) {
|
|
12509
|
-
var f = y.indexOf(
|
|
12510
|
-
f >= 0 && y.splice(f, 1), y.length === 0 && delete this.headersMap[
|
|
12508
|
+
var f = y.indexOf(m);
|
|
12509
|
+
f >= 0 && y.splice(f, 1), y.length === 0 && delete this.headersMap[v];
|
|
12511
12510
|
}
|
|
12512
12511
|
}
|
|
12513
|
-
}, c.prototype.append = function(d,
|
|
12514
|
-
var
|
|
12515
|
-
Array.isArray(this.headersMap[y]) || (this.headersMap[y] = []), Array.isArray(
|
|
12516
|
-
|
|
12517
|
-
}) : this.headersMap[y].push(i.normalizeValue(
|
|
12518
|
-
}, c.prototype.set = function(d,
|
|
12519
|
-
var
|
|
12520
|
-
if (Array.isArray(
|
|
12512
|
+
}, c.prototype.append = function(d, m) {
|
|
12513
|
+
var v = this, y = i.normalizeName(d);
|
|
12514
|
+
Array.isArray(this.headersMap[y]) || (this.headersMap[y] = []), Array.isArray(m) ? m.forEach(function(f) {
|
|
12515
|
+
v.headersMap[y].push(i.normalizeValue(f));
|
|
12516
|
+
}) : this.headersMap[y].push(i.normalizeValue(m));
|
|
12517
|
+
}, c.prototype.set = function(d, m) {
|
|
12518
|
+
var v = i.normalizeName(d);
|
|
12519
|
+
if (Array.isArray(m)) {
|
|
12521
12520
|
var y = [];
|
|
12522
|
-
|
|
12521
|
+
m.forEach(function(f) {
|
|
12523
12522
|
y.push(i.normalizeValue(f));
|
|
12524
|
-
}), this.headersMap[
|
|
12523
|
+
}), this.headersMap[v] = y;
|
|
12525
12524
|
} else
|
|
12526
|
-
this.headersMap[
|
|
12527
|
-
}, c.prototype.has = function(d,
|
|
12528
|
-
var
|
|
12529
|
-
if (!Array.isArray(
|
|
12525
|
+
this.headersMap[v] = [i.normalizeValue(m)];
|
|
12526
|
+
}, c.prototype.has = function(d, m) {
|
|
12527
|
+
var v = this.headersMap[i.normalizeName(d)];
|
|
12528
|
+
if (!Array.isArray(v))
|
|
12530
12529
|
return !1;
|
|
12531
|
-
if (
|
|
12532
|
-
var y = i.normalizeValue(
|
|
12533
|
-
return
|
|
12530
|
+
if (m !== void 0) {
|
|
12531
|
+
var y = i.normalizeValue(m);
|
|
12532
|
+
return v.indexOf(y) >= 0;
|
|
12534
12533
|
}
|
|
12535
12534
|
return !0;
|
|
12536
12535
|
}, c.prototype.get = function(d) {
|
|
12537
|
-
var
|
|
12538
|
-
return
|
|
12536
|
+
var m = this.headersMap[i.normalizeName(d)];
|
|
12537
|
+
return m !== void 0 ? m.concat() : [];
|
|
12539
12538
|
}, c.prototype.forEach = function(d) {
|
|
12540
|
-
var
|
|
12541
|
-
Object.getOwnPropertyNames(this.headersMap).forEach(function(
|
|
12542
|
-
d(
|
|
12539
|
+
var m = this;
|
|
12540
|
+
Object.getOwnPropertyNames(this.headersMap).forEach(function(v) {
|
|
12541
|
+
d(v, m.headersMap[v]);
|
|
12543
12542
|
}, this);
|
|
12544
12543
|
}, c.prototype.toHeaders = function() {
|
|
12545
12544
|
if (typeof Headers < "u") {
|
|
12546
12545
|
var d = new Headers();
|
|
12547
|
-
return this.forEach(function(
|
|
12548
|
-
|
|
12549
|
-
d.append(
|
|
12546
|
+
return this.forEach(function(m, v) {
|
|
12547
|
+
v.forEach(function(y) {
|
|
12548
|
+
d.append(m, y);
|
|
12550
12549
|
});
|
|
12551
12550
|
}), d;
|
|
12552
12551
|
}
|
|
@@ -12579,23 +12578,23 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
|
|
|
12579
12578
|
var d = l;
|
|
12580
12579
|
if (d instanceof Headers && d.getAll)
|
|
12581
12580
|
return d.getAll(c);
|
|
12582
|
-
var
|
|
12583
|
-
return
|
|
12581
|
+
var m = d.get(c);
|
|
12582
|
+
return m && typeof m == "string" ? [m] : m;
|
|
12584
12583
|
}, o.getHeaderKeys = function(l) {
|
|
12585
|
-
var c = l, d = {},
|
|
12586
|
-
return c.keys ? i.iterateHeadersKeys(c, function(
|
|
12587
|
-
d[
|
|
12588
|
-
}) : c.forEach ? c.forEach(function(
|
|
12589
|
-
d[y] || (d[y] = !0,
|
|
12590
|
-
}) : i.iterateHeaders(c, function(
|
|
12591
|
-
var y =
|
|
12592
|
-
d[y] || (d[y] = !0,
|
|
12593
|
-
}),
|
|
12584
|
+
var c = l, d = {}, m = [];
|
|
12585
|
+
return c.keys ? i.iterateHeadersKeys(c, function(v) {
|
|
12586
|
+
d[v] || (d[v] = !0, m.push(v));
|
|
12587
|
+
}) : c.forEach ? c.forEach(function(v, y) {
|
|
12588
|
+
d[y] || (d[y] = !0, m.push(y));
|
|
12589
|
+
}) : i.iterateHeaders(c, function(v) {
|
|
12590
|
+
var y = v[0];
|
|
12591
|
+
d[y] || (d[y] = !0, m.push(y));
|
|
12592
|
+
}), m;
|
|
12594
12593
|
}, o.splitHeaderValue = function(l) {
|
|
12595
12594
|
var c = [];
|
|
12596
12595
|
return l.split(", ").forEach(function(d) {
|
|
12597
|
-
d.split(",").forEach(function(
|
|
12598
|
-
c.push(
|
|
12596
|
+
d.split(",").forEach(function(m) {
|
|
12597
|
+
c.push(m);
|
|
12599
12598
|
});
|
|
12600
12599
|
}), c;
|
|
12601
12600
|
};
|
|
@@ -12619,17 +12618,17 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
|
|
|
12619
12618
|
function d(f) {
|
|
12620
12619
|
return f.getUint32(1, !1);
|
|
12621
12620
|
}
|
|
12622
|
-
function
|
|
12621
|
+
function m(f, b, h) {
|
|
12623
12622
|
return f.byteLength - b >= h;
|
|
12624
12623
|
}
|
|
12625
|
-
function
|
|
12624
|
+
function v(f, b, h) {
|
|
12626
12625
|
if (f.slice)
|
|
12627
12626
|
return f.slice(b, h);
|
|
12628
12627
|
var R = f.length;
|
|
12629
12628
|
h !== void 0 && (R = h);
|
|
12630
|
-
for (var
|
|
12631
|
-
|
|
12632
|
-
return
|
|
12629
|
+
for (var _ = new Uint8Array(R - b), P = 0, D = b; D < R; D++)
|
|
12630
|
+
_[P++] = f[D];
|
|
12631
|
+
return _;
|
|
12633
12632
|
}
|
|
12634
12633
|
g.decodeASCII = l, g.encodeASCII = function(f) {
|
|
12635
12634
|
for (var b = new Uint8Array(f.length), h = 0; h !== f.length; ++h) {
|
|
@@ -12649,27 +12648,27 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
|
|
|
12649
12648
|
return f.prototype.parse = function(b, h) {
|
|
12650
12649
|
if (b.length === 0 && h)
|
|
12651
12650
|
return [];
|
|
12652
|
-
var R,
|
|
12651
|
+
var R, _ = [];
|
|
12653
12652
|
if (this.buffer == null)
|
|
12654
12653
|
this.buffer = b, this.position = 0;
|
|
12655
12654
|
else if (this.position === this.buffer.byteLength)
|
|
12656
12655
|
this.buffer = b, this.position = 0;
|
|
12657
12656
|
else {
|
|
12658
|
-
var P = this.buffer.byteLength - this.position, D = new Uint8Array(P + b.byteLength),
|
|
12659
|
-
D.set(
|
|
12657
|
+
var P = this.buffer.byteLength - this.position, D = new Uint8Array(P + b.byteLength), I = v(this.buffer, this.position);
|
|
12658
|
+
D.set(I, 0);
|
|
12660
12659
|
var z = new Uint8Array(b);
|
|
12661
12660
|
D.set(z, P), this.buffer = D, this.position = 0;
|
|
12662
12661
|
}
|
|
12663
12662
|
for (; ; ) {
|
|
12664
|
-
if (!
|
|
12665
|
-
return
|
|
12666
|
-
var x =
|
|
12667
|
-
if (!
|
|
12668
|
-
return
|
|
12669
|
-
var W =
|
|
12670
|
-
if (this.position += 5 + k, c(
|
|
12671
|
-
return
|
|
12672
|
-
|
|
12663
|
+
if (!m(this.buffer, this.position, 5))
|
|
12664
|
+
return _;
|
|
12665
|
+
var x = v(this.buffer, this.position, this.position + 5), q = new DataView(x.buffer, x.byteOffset, x.byteLength), k = d(q);
|
|
12666
|
+
if (!m(this.buffer, this.position, 5 + k))
|
|
12667
|
+
return _;
|
|
12668
|
+
var W = v(this.buffer, this.position + 5, this.position + 5 + k);
|
|
12669
|
+
if (this.position += 5 + k, c(q))
|
|
12670
|
+
return _.push({ chunkType: o.TRAILERS, trailers: (R = W, new r.Metadata(l(R))) }), _;
|
|
12671
|
+
_.push({ chunkType: o.MESSAGE, data: W });
|
|
12673
12672
|
}
|
|
12674
12673
|
}, f;
|
|
12675
12674
|
}();
|
|
@@ -12716,9 +12715,9 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
|
|
|
12716
12715
|
Object.defineProperty(g, "__esModule", { value: !0 }), g.client = void 0;
|
|
12717
12716
|
var o = p(65), r = p(617), i = p(8), l = p(346), c = p(57), d = p(882);
|
|
12718
12717
|
g.client = function(y, f) {
|
|
12719
|
-
return new
|
|
12718
|
+
return new m(y, f);
|
|
12720
12719
|
};
|
|
12721
|
-
var
|
|
12720
|
+
var m = function() {
|
|
12722
12721
|
function y(f, b) {
|
|
12723
12722
|
this.started = !1, this.sentFirstMessage = !1, this.completed = !1, this.closed = !1, this.finishedSending = !1, this.onHeadersCallbacks = [], this.onMessageCallbacks = [], this.onEndCallbacks = [], this.parser = new r.ChunkParser(), this.methodDefinition = f, this.props = b, this.createTransport();
|
|
12724
12723
|
}
|
|
@@ -12730,13 +12729,13 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
|
|
|
12730
12729
|
this.props.debug && l.debug("grpc.onHeaders received after request was closed - ignoring");
|
|
12731
12730
|
else if (b !== 0) {
|
|
12732
12731
|
this.responseHeaders = f, this.props.debug && l.debug("onHeaders.responseHeaders", JSON.stringify(this.responseHeaders, null, 2));
|
|
12733
|
-
var h =
|
|
12732
|
+
var h = v(f);
|
|
12734
12733
|
this.props.debug && l.debug("onHeaders.gRPCStatus", h);
|
|
12735
12734
|
var R = h && h >= 0 ? h : i.httpStatusToCode(b);
|
|
12736
12735
|
this.props.debug && l.debug("onHeaders.code", R);
|
|
12737
|
-
var
|
|
12738
|
-
if (this.props.debug && l.debug("onHeaders.gRPCMessage",
|
|
12739
|
-
var P = this.decodeGRPCStatus(
|
|
12736
|
+
var _ = f.get("grpc-message") || [];
|
|
12737
|
+
if (this.props.debug && l.debug("onHeaders.gRPCMessage", _), this.rawOnHeaders(f), R !== i.Code.OK) {
|
|
12738
|
+
var P = this.decodeGRPCStatus(_[0]);
|
|
12740
12739
|
this.rawOnError(R, P, f);
|
|
12741
12740
|
}
|
|
12742
12741
|
}
|
|
@@ -12753,8 +12752,8 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
|
|
|
12753
12752
|
}
|
|
12754
12753
|
h.forEach(function(R) {
|
|
12755
12754
|
if (R.chunkType === r.ChunkType.MESSAGE) {
|
|
12756
|
-
var
|
|
12757
|
-
b.rawOnMessage(
|
|
12755
|
+
var _ = b.methodDefinition.responseType.deserializeBinary(R.data);
|
|
12756
|
+
b.rawOnMessage(_);
|
|
12758
12757
|
} else
|
|
12759
12758
|
R.chunkType === r.ChunkType.TRAILERS && (b.responseHeaders ? (b.responseTrailers = new o.Metadata(R.trailers), b.props.debug && l.debug("onChunk.trailers", b.responseTrailers)) : (b.responseHeaders = new o.Metadata(R.trailers), b.rawOnHeaders(b.responseHeaders)));
|
|
12760
12759
|
});
|
|
@@ -12763,7 +12762,7 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
|
|
|
12763
12762
|
if (this.props.debug && l.debug("grpc.onEnd"), this.closed)
|
|
12764
12763
|
this.props.debug && l.debug("grpc.onEnd received after request was closed - ignoring");
|
|
12765
12764
|
else if (this.responseTrailers !== void 0) {
|
|
12766
|
-
var f =
|
|
12765
|
+
var f = v(this.responseTrailers);
|
|
12767
12766
|
if (f !== null) {
|
|
12768
12767
|
var b = this.responseTrailers.get("grpc-message"), h = this.decodeGRPCStatus(b[0]);
|
|
12769
12768
|
this.rawOnEnd(f, h, this.responseTrailers);
|
|
@@ -12772,10 +12771,10 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
|
|
|
12772
12771
|
} else {
|
|
12773
12772
|
if (this.responseHeaders === void 0)
|
|
12774
12773
|
return void this.rawOnError(i.Code.Unknown, "Response closed without headers");
|
|
12775
|
-
var R =
|
|
12776
|
-
if (this.props.debug && l.debug("grpc.headers only response ", R,
|
|
12774
|
+
var R = v(this.responseHeaders), _ = this.responseHeaders.get("grpc-message");
|
|
12775
|
+
if (this.props.debug && l.debug("grpc.headers only response ", R, _), R === null)
|
|
12777
12776
|
return void this.rawOnEnd(i.Code.Unknown, "Response closed without grpc-status (Headers only)", this.responseHeaders);
|
|
12778
|
-
var P = this.decodeGRPCStatus(
|
|
12777
|
+
var P = this.decodeGRPCStatus(_[0]);
|
|
12779
12778
|
this.rawOnEnd(R, P, this.responseHeaders);
|
|
12780
12779
|
}
|
|
12781
12780
|
}, y.prototype.decodeGRPCStatus = function(f) {
|
|
@@ -12788,10 +12787,10 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
|
|
|
12788
12787
|
}
|
|
12789
12788
|
}, y.prototype.rawOnEnd = function(f, b, h) {
|
|
12790
12789
|
var R = this;
|
|
12791
|
-
this.props.debug && l.debug("rawOnEnd", f, b, h), this.completed || (this.completed = !0, this.onEndCallbacks.forEach(function(
|
|
12790
|
+
this.props.debug && l.debug("rawOnEnd", f, b, h), this.completed || (this.completed = !0, this.onEndCallbacks.forEach(function(_) {
|
|
12792
12791
|
if (!R.closed)
|
|
12793
12792
|
try {
|
|
12794
|
-
|
|
12793
|
+
_(f, b, h);
|
|
12795
12794
|
} catch (P) {
|
|
12796
12795
|
setTimeout(function() {
|
|
12797
12796
|
throw P;
|
|
@@ -12810,10 +12809,10 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
|
|
|
12810
12809
|
});
|
|
12811
12810
|
}, y.prototype.rawOnError = function(f, b, h) {
|
|
12812
12811
|
var R = this;
|
|
12813
|
-
h === void 0 && (h = new o.Metadata()), this.props.debug && l.debug("rawOnError", f, b), this.completed || (this.completed = !0, this.onEndCallbacks.forEach(function(
|
|
12812
|
+
h === void 0 && (h = new o.Metadata()), this.props.debug && l.debug("rawOnError", f, b), this.completed || (this.completed = !0, this.onEndCallbacks.forEach(function(_) {
|
|
12814
12813
|
if (!R.closed)
|
|
12815
12814
|
try {
|
|
12816
|
-
|
|
12815
|
+
_(f, b, h);
|
|
12817
12816
|
} catch (P) {
|
|
12818
12817
|
setTimeout(function() {
|
|
12819
12818
|
throw P;
|
|
@@ -12872,7 +12871,7 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
|
|
|
12872
12871
|
this.closed = !0, this.props.debug && l.debug("request.abort aborting request"), this.transport.cancel();
|
|
12873
12872
|
}, y;
|
|
12874
12873
|
}();
|
|
12875
|
-
function
|
|
12874
|
+
function v(y) {
|
|
12876
12875
|
var f = y.get("grpc-status") || [];
|
|
12877
12876
|
if (f.length > 0)
|
|
12878
12877
|
try {
|
|
@@ -12891,8 +12890,8 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
|
|
|
12891
12890
|
};
|
|
12892
12891
|
}, 607: function(u, g, p) {
|
|
12893
12892
|
Object.defineProperty(g, "__esModule", { value: !0 }), g.grpc = void 0;
|
|
12894
|
-
var o, r = p(418), i = p(57), l = p(229), c = p(540), d = p(210),
|
|
12895
|
-
(o = g.grpc || (g.grpc = {})).setDefaultTransport = i.setDefaultTransportFactory, o.CrossBrowserHttpTransport =
|
|
12893
|
+
var o, r = p(418), i = p(57), l = p(229), c = p(540), d = p(210), m = p(859), v = p(8), y = p(938), f = p(35), b = p(934);
|
|
12894
|
+
(o = g.grpc || (g.grpc = {})).setDefaultTransport = i.setDefaultTransportFactory, o.CrossBrowserHttpTransport = m.CrossBrowserHttpTransport, o.FetchReadableStreamTransport = l.FetchReadableStreamTransport, o.XhrTransport = d.XhrTransport, o.WebsocketTransport = c.WebsocketTransport, o.Code = v.Code, o.Metadata = r.BrowserHeaders, o.client = function(h, R) {
|
|
12896
12895
|
return b.client(h, R);
|
|
12897
12896
|
}, o.invoke = y.invoke, o.unary = f.unary;
|
|
12898
12897
|
}, 938: function(u, g, p) {
|
|
@@ -12925,8 +12924,8 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
|
|
|
12925
12924
|
}, 229: function(u, g, p) {
|
|
12926
12925
|
var o = this && this.__assign || function() {
|
|
12927
12926
|
return (o = Object.assign || function(c) {
|
|
12928
|
-
for (var d,
|
|
12929
|
-
for (var y in d = arguments[
|
|
12927
|
+
for (var d, m = 1, v = arguments.length; m < v; m++)
|
|
12928
|
+
for (var y in d = arguments[m])
|
|
12930
12929
|
Object.prototype.hasOwnProperty.call(d, y) && (c[y] = d[y]);
|
|
12931
12930
|
return c;
|
|
12932
12931
|
}).apply(this, arguments);
|
|
@@ -12935,36 +12934,36 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
|
|
|
12935
12934
|
var r = p(65), i = p(346);
|
|
12936
12935
|
g.FetchReadableStreamTransport = function(c) {
|
|
12937
12936
|
return function(d) {
|
|
12938
|
-
return function(
|
|
12939
|
-
return
|
|
12937
|
+
return function(m, v) {
|
|
12938
|
+
return m.debug && i.debug("fetchRequest", m), new l(m, v);
|
|
12940
12939
|
}(d, c);
|
|
12941
12940
|
};
|
|
12942
12941
|
};
|
|
12943
12942
|
var l = function() {
|
|
12944
|
-
function c(d,
|
|
12945
|
-
this.cancelled = !1, this.controller = self.AbortController && new AbortController(), this.options = d, this.init =
|
|
12943
|
+
function c(d, m) {
|
|
12944
|
+
this.cancelled = !1, this.controller = self.AbortController && new AbortController(), this.options = d, this.init = m;
|
|
12946
12945
|
}
|
|
12947
|
-
return c.prototype.pump = function(d,
|
|
12948
|
-
var
|
|
12946
|
+
return c.prototype.pump = function(d, m) {
|
|
12947
|
+
var v = this;
|
|
12949
12948
|
if (this.reader = d, this.cancelled)
|
|
12950
12949
|
return this.options.debug && i.debug("Fetch.pump.cancel at first pump"), void this.reader.cancel().catch(function(y) {
|
|
12951
|
-
|
|
12950
|
+
v.options.debug && i.debug("Fetch.pump.reader.cancel exception", y);
|
|
12952
12951
|
});
|
|
12953
12952
|
this.reader.read().then(function(y) {
|
|
12954
12953
|
if (y.done)
|
|
12955
|
-
return
|
|
12956
|
-
|
|
12954
|
+
return v.options.onEnd(), m;
|
|
12955
|
+
v.options.onChunk(y.value), v.pump(v.reader, m);
|
|
12957
12956
|
}).catch(function(y) {
|
|
12958
|
-
|
|
12957
|
+
v.cancelled ? v.options.debug && i.debug("Fetch.catch - request cancelled") : (v.cancelled = !0, v.options.debug && i.debug("Fetch.catch", y.message), v.options.onEnd(y));
|
|
12959
12958
|
});
|
|
12960
12959
|
}, c.prototype.send = function(d) {
|
|
12961
|
-
var
|
|
12962
|
-
fetch(this.options.url, o(o({}, this.init), { headers: this.metadata.toHeaders(), method: "POST", body: d, signal: this.controller && this.controller.signal })).then(function(
|
|
12963
|
-
if (
|
|
12964
|
-
return
|
|
12965
|
-
|
|
12966
|
-
}).catch(function(
|
|
12967
|
-
|
|
12960
|
+
var m = this;
|
|
12961
|
+
fetch(this.options.url, o(o({}, this.init), { headers: this.metadata.toHeaders(), method: "POST", body: d, signal: this.controller && this.controller.signal })).then(function(v) {
|
|
12962
|
+
if (m.options.debug && i.debug("Fetch.response", v), m.options.onHeaders(new r.Metadata(v.headers), v.status), !v.body)
|
|
12963
|
+
return v;
|
|
12964
|
+
m.pump(v.body.getReader(), v);
|
|
12965
|
+
}).catch(function(v) {
|
|
12966
|
+
m.cancelled ? m.options.debug && i.debug("Fetch.catch - request cancelled") : (m.cancelled = !0, m.options.debug && i.debug("Fetch.catch", v.message), m.options.onEnd(v));
|
|
12968
12967
|
});
|
|
12969
12968
|
}, c.prototype.sendMessage = function(d) {
|
|
12970
12969
|
this.send(d);
|
|
@@ -12973,8 +12972,8 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
|
|
|
12973
12972
|
this.metadata = d;
|
|
12974
12973
|
}, c.prototype.cancel = function() {
|
|
12975
12974
|
var d = this;
|
|
12976
|
-
this.cancelled ? this.options.debug && i.debug("Fetch.cancel already cancelled") : (this.cancelled = !0, this.controller ? (this.options.debug && i.debug("Fetch.cancel.controller.abort"), this.controller.abort()) : this.options.debug && i.debug("Fetch.cancel.missing abort controller"), this.reader ? (this.options.debug && i.debug("Fetch.cancel.reader.cancel"), this.reader.cancel().catch(function(
|
|
12977
|
-
d.options.debug && i.debug("Fetch.cancel.reader.cancel exception",
|
|
12975
|
+
this.cancelled ? this.options.debug && i.debug("Fetch.cancel already cancelled") : (this.cancelled = !0, this.controller ? (this.options.debug && i.debug("Fetch.cancel.controller.abort"), this.controller.abort()) : this.options.debug && i.debug("Fetch.cancel.missing abort controller"), this.reader ? (this.options.debug && i.debug("Fetch.cancel.reader.cancel"), this.reader.cancel().catch(function(m) {
|
|
12976
|
+
d.options.debug && i.debug("Fetch.cancel.reader.cancel exception", m);
|
|
12978
12977
|
})) : this.options.debug && i.debug("Fetch.cancel before reader"));
|
|
12979
12978
|
}, c;
|
|
12980
12979
|
}();
|
|
@@ -12996,8 +12995,8 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
|
|
|
12996
12995
|
return (o = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(h, R) {
|
|
12997
12996
|
h.__proto__ = R;
|
|
12998
12997
|
} || function(h, R) {
|
|
12999
|
-
for (var
|
|
13000
|
-
Object.prototype.hasOwnProperty.call(R,
|
|
12998
|
+
for (var _ in R)
|
|
12999
|
+
Object.prototype.hasOwnProperty.call(R, _) && (h[_] = R[_]);
|
|
13001
13000
|
})(f, b);
|
|
13002
13001
|
}, function(f, b) {
|
|
13003
13002
|
function h() {
|
|
@@ -13010,7 +13009,7 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
|
|
|
13010
13009
|
g.XhrTransport = function(f) {
|
|
13011
13010
|
return function(b) {
|
|
13012
13011
|
if (c.detectMozXHRSupport())
|
|
13013
|
-
return new
|
|
13012
|
+
return new m(b, f);
|
|
13014
13013
|
if (c.detectXHROverrideMimeTypeSupport())
|
|
13015
13014
|
return new d(b, f);
|
|
13016
13015
|
throw new Error("This environment's XHR implementation cannot support binary transfer.");
|
|
@@ -13037,10 +13036,10 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
|
|
|
13037
13036
|
var h = this;
|
|
13038
13037
|
this.metadata = b;
|
|
13039
13038
|
var R = new XMLHttpRequest();
|
|
13040
|
-
this.xhr = R, R.open("POST", this.options.url), this.configureXhr(), this.metadata.forEach(function(
|
|
13041
|
-
R.setRequestHeader(
|
|
13042
|
-
}), R.withCredentials = !!this.init.withCredentials, R.addEventListener("readystatechange", this.onStateChange.bind(this)), R.addEventListener("progress", this.onProgressEvent.bind(this)), R.addEventListener("loadend", this.onLoadEvent.bind(this)), R.addEventListener("error", function(
|
|
13043
|
-
h.options.debug && l.debug("XHR.error",
|
|
13039
|
+
this.xhr = R, R.open("POST", this.options.url), this.configureXhr(), this.metadata.forEach(function(_, P) {
|
|
13040
|
+
R.setRequestHeader(_, P.join(", "));
|
|
13041
|
+
}), R.withCredentials = !!this.init.withCredentials, R.addEventListener("readystatechange", this.onStateChange.bind(this)), R.addEventListener("progress", this.onProgressEvent.bind(this)), R.addEventListener("loadend", this.onLoadEvent.bind(this)), R.addEventListener("error", function(_) {
|
|
13042
|
+
h.options.debug && l.debug("XHR.error", _), h.options.onEnd(_.error);
|
|
13044
13043
|
});
|
|
13045
13044
|
}, f.prototype.configureXhr = function() {
|
|
13046
13045
|
this.xhr.responseType = "text", this.xhr.overrideMimeType("text/plain; charset=x-user-defined");
|
|
@@ -13049,7 +13048,7 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
|
|
|
13049
13048
|
}, f;
|
|
13050
13049
|
}();
|
|
13051
13050
|
g.XHR = d;
|
|
13052
|
-
var
|
|
13051
|
+
var m = function(f) {
|
|
13053
13052
|
function b() {
|
|
13054
13053
|
return f !== null && f.apply(this, arguments) || this;
|
|
13055
13054
|
}
|
|
@@ -13060,7 +13059,7 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
|
|
|
13060
13059
|
this.options.debug && l.debug("MozXHR.onProgressEvent: ", new Uint8Array(h)), this.options.onChunk(new Uint8Array(h));
|
|
13061
13060
|
}, b;
|
|
13062
13061
|
}(d);
|
|
13063
|
-
function
|
|
13062
|
+
function v(f, b) {
|
|
13064
13063
|
var h = f.charCodeAt(b);
|
|
13065
13064
|
if (h >= 55296 && h <= 56319) {
|
|
13066
13065
|
var R = f.charCodeAt(b + 1);
|
|
@@ -13070,12 +13069,12 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
|
|
|
13070
13069
|
}
|
|
13071
13070
|
function y(f) {
|
|
13072
13071
|
for (var b = new Uint8Array(f.length), h = 0, R = 0; R < f.length; R++) {
|
|
13073
|
-
var
|
|
13074
|
-
b[h++] = 255 &
|
|
13072
|
+
var _ = String.prototype.codePointAt ? f.codePointAt(R) : v(f, R);
|
|
13073
|
+
b[h++] = 255 & _;
|
|
13075
13074
|
}
|
|
13076
13075
|
return b;
|
|
13077
13076
|
}
|
|
13078
|
-
g.MozChunkedArrayBufferXHR =
|
|
13077
|
+
g.MozChunkedArrayBufferXHR = m, g.stringToArrayBuffer = y;
|
|
13079
13078
|
}, 849: function(u, g) {
|
|
13080
13079
|
var p;
|
|
13081
13080
|
function o() {
|
|
@@ -13116,7 +13115,7 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
|
|
|
13116
13115
|
return function(c) {
|
|
13117
13116
|
return function(d) {
|
|
13118
13117
|
d.debug && r.debug("websocketRequest", d);
|
|
13119
|
-
var
|
|
13118
|
+
var m, v = function(b) {
|
|
13120
13119
|
if (b.substr(0, 8) === "https://")
|
|
13121
13120
|
return "wss://" + b.substr(8);
|
|
13122
13121
|
if (b.substr(0, 7) === "http://")
|
|
@@ -13125,34 +13124,34 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
|
|
|
13125
13124
|
}(d.url), y = [];
|
|
13126
13125
|
function f(b) {
|
|
13127
13126
|
if (b === o.FINISH_SEND)
|
|
13128
|
-
|
|
13127
|
+
m.send(l);
|
|
13129
13128
|
else {
|
|
13130
13129
|
var h = b, R = new Int8Array(h.byteLength + 1);
|
|
13131
|
-
R.set(new Uint8Array([0])), R.set(h, 1),
|
|
13130
|
+
R.set(new Uint8Array([0])), R.set(h, 1), m.send(R);
|
|
13132
13131
|
}
|
|
13133
13132
|
}
|
|
13134
13133
|
return { sendMessage: function(b) {
|
|
13135
|
-
|
|
13134
|
+
m && m.readyState !== m.CONNECTING ? f(b) : y.push(b);
|
|
13136
13135
|
}, finishSend: function() {
|
|
13137
|
-
|
|
13136
|
+
m && m.readyState !== m.CONNECTING ? f(o.FINISH_SEND) : y.push(o.FINISH_SEND);
|
|
13138
13137
|
}, start: function(b) {
|
|
13139
|
-
(
|
|
13138
|
+
(m = new WebSocket(v, ["grpc-websockets"])).binaryType = "arraybuffer", m.onopen = function() {
|
|
13140
13139
|
var h;
|
|
13141
|
-
d.debug && r.debug("websocketRequest.onopen"),
|
|
13142
|
-
h += R + ": " +
|
|
13140
|
+
d.debug && r.debug("websocketRequest.onopen"), m.send((h = "", b.forEach(function(R, _) {
|
|
13141
|
+
h += R + ": " + _.join(", ") + `\r
|
|
13143
13142
|
`;
|
|
13144
13143
|
}), i.encodeASCII(h))), y.forEach(function(R) {
|
|
13145
13144
|
f(R);
|
|
13146
13145
|
});
|
|
13147
|
-
},
|
|
13146
|
+
}, m.onclose = function(h) {
|
|
13148
13147
|
d.debug && r.debug("websocketRequest.onclose", h), d.onEnd();
|
|
13149
|
-
},
|
|
13148
|
+
}, m.onerror = function(h) {
|
|
13150
13149
|
d.debug && r.debug("websocketRequest.onerror", h);
|
|
13151
|
-
},
|
|
13150
|
+
}, m.onmessage = function(h) {
|
|
13152
13151
|
d.onChunk(new Uint8Array(h.data));
|
|
13153
13152
|
};
|
|
13154
13153
|
}, cancel: function() {
|
|
13155
|
-
d.debug && r.debug("websocket.abort"),
|
|
13154
|
+
d.debug && r.debug("websocket.abort"), m.close();
|
|
13156
13155
|
} };
|
|
13157
13156
|
}(c);
|
|
13158
13157
|
};
|
|
@@ -13165,15 +13164,15 @@ var grpcWebClient_umdExports = {}, grpcWebClient_umd = {
|
|
|
13165
13164
|
throw new Error(".unary cannot be used with server-streaming methods. Use .invoke or .client instead.");
|
|
13166
13165
|
if (i.requestStream)
|
|
13167
13166
|
throw new Error(".unary cannot be used with client-streaming methods. Use .client instead.");
|
|
13168
|
-
var c = null, d = null,
|
|
13169
|
-
return
|
|
13170
|
-
c =
|
|
13171
|
-
}),
|
|
13172
|
-
d =
|
|
13173
|
-
}),
|
|
13174
|
-
l.onEnd({ status:
|
|
13175
|
-
}),
|
|
13176
|
-
|
|
13167
|
+
var c = null, d = null, m = r.client(i, { host: l.host, transport: l.transport, debug: l.debug });
|
|
13168
|
+
return m.onHeaders(function(v) {
|
|
13169
|
+
c = v;
|
|
13170
|
+
}), m.onMessage(function(v) {
|
|
13171
|
+
d = v;
|
|
13172
|
+
}), m.onEnd(function(v, y, f) {
|
|
13173
|
+
l.onEnd({ status: v, statusMessage: y, headers: c || new o.Metadata(), message: d, trailers: f });
|
|
13174
|
+
}), m.start(l.metadata), m.send(l.request), m.finishSend(), { close: function() {
|
|
13175
|
+
m.close();
|
|
13177
13176
|
} };
|
|
13178
13177
|
};
|
|
13179
13178
|
}, 882: function(u, g) {
|
|
@@ -13203,6 +13202,43 @@ const promisify = function(t, e) {
|
|
|
13203
13202
|
y: t.getY(),
|
|
13204
13203
|
z: t.getZ()
|
|
13205
13204
|
};
|
|
13205
|
+
}, encodePose = (t) => {
|
|
13206
|
+
const e = new common_pb.Pose();
|
|
13207
|
+
return e.setX(t.x), e.setY(t.y), e.setZ(t.z), e.setOX(t.oX), e.setOY(t.oY), e.setOZ(t.oZ), e.setTheta(t.theta), e;
|
|
13208
|
+
}, encodePoseInFrame = (t) => {
|
|
13209
|
+
if (!t.pose)
|
|
13210
|
+
throw new Error("no pose");
|
|
13211
|
+
const e = new common_pb.PoseInFrame();
|
|
13212
|
+
return e.setPose(encodePose(t.pose)), e.setReferenceFrame(t.referenceFrame), e;
|
|
13213
|
+
}, encodeResourceName = (t) => {
|
|
13214
|
+
const e = new common_pb.ResourceName();
|
|
13215
|
+
return e.setNamespace(t.namespace), e.setType(t.type), e.setSubtype(t.subtype), e.setName(t.name), e;
|
|
13216
|
+
}, encodeGeometry = (t) => {
|
|
13217
|
+
const e = new common_pb.Geometry();
|
|
13218
|
+
if (t.center !== void 0 && e.setCenter(encodePose(t.center)), t.sphere !== void 0) {
|
|
13219
|
+
const s = new common_pb.Sphere();
|
|
13220
|
+
s.setRadiusMm(t.sphere.radiusMm), e.setSphere(s);
|
|
13221
|
+
}
|
|
13222
|
+
if (t.box !== void 0) {
|
|
13223
|
+
const s = new common_pb.RectangularPrism();
|
|
13224
|
+
t.box.dimsMm !== void 0 && s.setDimsMm(encodeVector3D(t.box.dimsMm)), e.setBox(s);
|
|
13225
|
+
}
|
|
13226
|
+
if (t.capsule !== void 0) {
|
|
13227
|
+
const s = new common_pb.Capsule();
|
|
13228
|
+
s.setLengthMm(t.capsule.lengthMm), s.setRadiusMm(t.capsule.radiusMm), e.setCapsule(s);
|
|
13229
|
+
}
|
|
13230
|
+
return e;
|
|
13231
|
+
}, encodeGeometriesInFrame = (t) => {
|
|
13232
|
+
const e = new common_pb.GeometriesInFrame();
|
|
13233
|
+
return e.setReferenceFrame(t.referenceFrame), e.setGeometriesList(t.geometriesList.map((s) => encodeGeometry(s))), e;
|
|
13234
|
+
}, encodeTransform = (t) => {
|
|
13235
|
+
const e = new common_pb.Transform();
|
|
13236
|
+
return e.setReferenceFrame(t.referenceFrame), t.physicalObject !== void 0 && e.setPhysicalObject(encodeGeometry(t.physicalObject)), t.poseInObserverFrame !== void 0 && e.setPoseInObserverFrame(encodePoseInFrame(t.poseInObserverFrame)), e;
|
|
13237
|
+
}, encodeWorldState = (t) => {
|
|
13238
|
+
const e = new common_pb.WorldState();
|
|
13239
|
+
return e.setObstaclesList(
|
|
13240
|
+
t.obstaclesList.map((s) => encodeGeometriesInFrame(s))
|
|
13241
|
+
), e.setTransformsList(t.transformsList.map((s) => encodeTransform(s))), e;
|
|
13206
13242
|
};
|
|
13207
13243
|
var __webpack_modules__ = { 37: function(t) {
|
|
13208
13244
|
t.exports = function(e) {
|
|
@@ -13250,58 +13286,58 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
13250
13286
|
}, function(e, s, n) {
|
|
13251
13287
|
Object.defineProperty(s, "__esModule", { value: !0 });
|
|
13252
13288
|
var u = n(0), g = n(8), p = n(9), o = n(1), r = n(4), i = n(14);
|
|
13253
|
-
s.client = function(d,
|
|
13254
|
-
return new l(d,
|
|
13289
|
+
s.client = function(d, m) {
|
|
13290
|
+
return new l(d, m);
|
|
13255
13291
|
};
|
|
13256
13292
|
var l = function() {
|
|
13257
|
-
function d(
|
|
13258
|
-
this.started = !1, this.sentFirstMessage = !1, this.completed = !1, this.closed = !1, this.finishedSending = !1, this.onHeadersCallbacks = [], this.onMessageCallbacks = [], this.onEndCallbacks = [], this.parser = new g.ChunkParser(), this.methodDefinition =
|
|
13293
|
+
function d(m, v) {
|
|
13294
|
+
this.started = !1, this.sentFirstMessage = !1, this.completed = !1, this.closed = !1, this.finishedSending = !1, this.onHeadersCallbacks = [], this.onMessageCallbacks = [], this.onEndCallbacks = [], this.parser = new g.ChunkParser(), this.methodDefinition = m, this.props = v, this.createTransport();
|
|
13259
13295
|
}
|
|
13260
13296
|
return d.prototype.createTransport = function() {
|
|
13261
|
-
var
|
|
13262
|
-
this.props.transport ? this.transport = this.props.transport(
|
|
13263
|
-
}, d.prototype.onTransportHeaders = function(
|
|
13264
|
-
if (this.props.debug && o.debug("onHeaders",
|
|
13297
|
+
var m = this.props.host + "/" + this.methodDefinition.service.serviceName + "/" + this.methodDefinition.methodName, v = { methodDefinition: this.methodDefinition, debug: this.props.debug || !1, url: m, onHeaders: this.onTransportHeaders.bind(this), onChunk: this.onTransportChunk.bind(this), onEnd: this.onTransportEnd.bind(this) };
|
|
13298
|
+
this.props.transport ? this.transport = this.props.transport(v) : this.transport = r.makeDefaultTransport(v);
|
|
13299
|
+
}, d.prototype.onTransportHeaders = function(m, v) {
|
|
13300
|
+
if (this.props.debug && o.debug("onHeaders", m, v), this.closed)
|
|
13265
13301
|
this.props.debug && o.debug("grpc.onHeaders received after request was closed - ignoring");
|
|
13266
|
-
else if (
|
|
13267
|
-
this.responseHeaders =
|
|
13268
|
-
var y = c(
|
|
13302
|
+
else if (v !== 0) {
|
|
13303
|
+
this.responseHeaders = m, this.props.debug && o.debug("onHeaders.responseHeaders", JSON.stringify(this.responseHeaders, null, 2));
|
|
13304
|
+
var y = c(m);
|
|
13269
13305
|
this.props.debug && o.debug("onHeaders.gRPCStatus", y);
|
|
13270
|
-
var f = y && y >= 0 ? y : p.httpStatusToCode(
|
|
13306
|
+
var f = y && y >= 0 ? y : p.httpStatusToCode(v);
|
|
13271
13307
|
this.props.debug && o.debug("onHeaders.code", f);
|
|
13272
|
-
var b =
|
|
13273
|
-
if (this.props.debug && o.debug("onHeaders.gRPCMessage", b), this.rawOnHeaders(
|
|
13308
|
+
var b = m.get("grpc-message") || [];
|
|
13309
|
+
if (this.props.debug && o.debug("onHeaders.gRPCMessage", b), this.rawOnHeaders(m), f !== p.Code.OK) {
|
|
13274
13310
|
var h = this.decodeGRPCStatus(b[0]);
|
|
13275
|
-
this.rawOnError(f, h,
|
|
13311
|
+
this.rawOnError(f, h, m);
|
|
13276
13312
|
}
|
|
13277
13313
|
}
|
|
13278
|
-
}, d.prototype.onTransportChunk = function(
|
|
13279
|
-
var
|
|
13314
|
+
}, d.prototype.onTransportChunk = function(m) {
|
|
13315
|
+
var v = this;
|
|
13280
13316
|
if (this.closed)
|
|
13281
13317
|
this.props.debug && o.debug("grpc.onChunk received after request was closed - ignoring");
|
|
13282
13318
|
else {
|
|
13283
13319
|
var y = [];
|
|
13284
13320
|
try {
|
|
13285
|
-
y = this.parser.parse(
|
|
13321
|
+
y = this.parser.parse(m);
|
|
13286
13322
|
} catch (f) {
|
|
13287
13323
|
return this.props.debug && o.debug("onChunk.parsing error", f, f.message), void this.rawOnError(p.Code.Internal, "parsing error: " + f.message);
|
|
13288
13324
|
}
|
|
13289
13325
|
y.forEach(function(f) {
|
|
13290
13326
|
if (f.chunkType === g.ChunkType.MESSAGE) {
|
|
13291
|
-
var b =
|
|
13292
|
-
|
|
13327
|
+
var b = v.methodDefinition.responseType.deserializeBinary(f.data);
|
|
13328
|
+
v.rawOnMessage(b);
|
|
13293
13329
|
} else
|
|
13294
|
-
f.chunkType === g.ChunkType.TRAILERS && (
|
|
13330
|
+
f.chunkType === g.ChunkType.TRAILERS && (v.responseHeaders ? (v.responseTrailers = new u.Metadata(f.trailers), v.props.debug && o.debug("onChunk.trailers", v.responseTrailers)) : (v.responseHeaders = new u.Metadata(f.trailers), v.rawOnHeaders(v.responseHeaders)));
|
|
13295
13331
|
});
|
|
13296
13332
|
}
|
|
13297
13333
|
}, d.prototype.onTransportEnd = function() {
|
|
13298
13334
|
if (this.props.debug && o.debug("grpc.onEnd"), this.closed)
|
|
13299
13335
|
this.props.debug && o.debug("grpc.onEnd received after request was closed - ignoring");
|
|
13300
13336
|
else if (this.responseTrailers !== void 0) {
|
|
13301
|
-
var
|
|
13302
|
-
if (
|
|
13303
|
-
var
|
|
13304
|
-
this.rawOnEnd(
|
|
13337
|
+
var m = c(this.responseTrailers);
|
|
13338
|
+
if (m !== null) {
|
|
13339
|
+
var v = this.responseTrailers.get("grpc-message"), y = this.decodeGRPCStatus(v[0]);
|
|
13340
|
+
this.rawOnEnd(m, y, this.responseTrailers);
|
|
13305
13341
|
} else
|
|
13306
13342
|
this.rawOnError(p.Code.Internal, "Response closed without grpc-status (Trailers provided)");
|
|
13307
13343
|
} else {
|
|
@@ -13313,73 +13349,73 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
13313
13349
|
var h = this.decodeGRPCStatus(b[0]);
|
|
13314
13350
|
this.rawOnEnd(f, h, this.responseHeaders);
|
|
13315
13351
|
}
|
|
13316
|
-
}, d.prototype.decodeGRPCStatus = function(
|
|
13317
|
-
if (!
|
|
13352
|
+
}, d.prototype.decodeGRPCStatus = function(m) {
|
|
13353
|
+
if (!m)
|
|
13318
13354
|
return "";
|
|
13319
13355
|
try {
|
|
13320
|
-
return decodeURIComponent(
|
|
13356
|
+
return decodeURIComponent(m);
|
|
13321
13357
|
} catch {
|
|
13322
|
-
return
|
|
13358
|
+
return m;
|
|
13323
13359
|
}
|
|
13324
|
-
}, d.prototype.rawOnEnd = function(
|
|
13360
|
+
}, d.prototype.rawOnEnd = function(m, v, y) {
|
|
13325
13361
|
var f = this;
|
|
13326
|
-
this.props.debug && o.debug("rawOnEnd",
|
|
13362
|
+
this.props.debug && o.debug("rawOnEnd", m, v, y), this.completed || (this.completed = !0, this.onEndCallbacks.forEach(function(b) {
|
|
13327
13363
|
if (!f.closed)
|
|
13328
13364
|
try {
|
|
13329
|
-
b(
|
|
13365
|
+
b(m, v, y);
|
|
13330
13366
|
} catch (h) {
|
|
13331
13367
|
setTimeout(function() {
|
|
13332
13368
|
throw h;
|
|
13333
13369
|
});
|
|
13334
13370
|
}
|
|
13335
13371
|
}));
|
|
13336
|
-
}, d.prototype.rawOnHeaders = function(
|
|
13337
|
-
this.props.debug && o.debug("rawOnHeaders",
|
|
13372
|
+
}, d.prototype.rawOnHeaders = function(m) {
|
|
13373
|
+
this.props.debug && o.debug("rawOnHeaders", m), this.completed || this.onHeadersCallbacks.forEach(function(v) {
|
|
13338
13374
|
try {
|
|
13339
|
-
m
|
|
13375
|
+
v(m);
|
|
13340
13376
|
} catch (y) {
|
|
13341
13377
|
setTimeout(function() {
|
|
13342
13378
|
throw y;
|
|
13343
13379
|
});
|
|
13344
13380
|
}
|
|
13345
13381
|
});
|
|
13346
|
-
}, d.prototype.rawOnError = function(
|
|
13382
|
+
}, d.prototype.rawOnError = function(m, v, y) {
|
|
13347
13383
|
var f = this;
|
|
13348
|
-
y === void 0 && (y = new u.Metadata()), this.props.debug && o.debug("rawOnError",
|
|
13384
|
+
y === void 0 && (y = new u.Metadata()), this.props.debug && o.debug("rawOnError", m, v), this.completed || (this.completed = !0, this.onEndCallbacks.forEach(function(b) {
|
|
13349
13385
|
if (!f.closed)
|
|
13350
13386
|
try {
|
|
13351
|
-
b(
|
|
13387
|
+
b(m, v, y);
|
|
13352
13388
|
} catch (h) {
|
|
13353
13389
|
setTimeout(function() {
|
|
13354
13390
|
throw h;
|
|
13355
13391
|
});
|
|
13356
13392
|
}
|
|
13357
13393
|
}));
|
|
13358
|
-
}, d.prototype.rawOnMessage = function(
|
|
13359
|
-
var
|
|
13360
|
-
this.props.debug && o.debug("rawOnMessage",
|
|
13361
|
-
if (!
|
|
13394
|
+
}, d.prototype.rawOnMessage = function(m) {
|
|
13395
|
+
var v = this;
|
|
13396
|
+
this.props.debug && o.debug("rawOnMessage", m.toObject()), this.completed || this.closed || this.onMessageCallbacks.forEach(function(y) {
|
|
13397
|
+
if (!v.closed)
|
|
13362
13398
|
try {
|
|
13363
|
-
y(
|
|
13399
|
+
y(m);
|
|
13364
13400
|
} catch (f) {
|
|
13365
13401
|
setTimeout(function() {
|
|
13366
13402
|
throw f;
|
|
13367
13403
|
});
|
|
13368
13404
|
}
|
|
13369
13405
|
});
|
|
13370
|
-
}, d.prototype.onHeaders = function(
|
|
13371
|
-
this.onHeadersCallbacks.push(
|
|
13372
|
-
}, d.prototype.onMessage = function(
|
|
13373
|
-
this.onMessageCallbacks.push(
|
|
13374
|
-
}, d.prototype.onEnd = function(
|
|
13375
|
-
this.onEndCallbacks.push(
|
|
13376
|
-
}, d.prototype.start = function(
|
|
13406
|
+
}, d.prototype.onHeaders = function(m) {
|
|
13407
|
+
this.onHeadersCallbacks.push(m);
|
|
13408
|
+
}, d.prototype.onMessage = function(m) {
|
|
13409
|
+
this.onMessageCallbacks.push(m);
|
|
13410
|
+
}, d.prototype.onEnd = function(m) {
|
|
13411
|
+
this.onEndCallbacks.push(m);
|
|
13412
|
+
}, d.prototype.start = function(m) {
|
|
13377
13413
|
if (this.started)
|
|
13378
13414
|
throw new Error("Client already started - cannot .start()");
|
|
13379
13415
|
this.started = !0;
|
|
13380
|
-
var
|
|
13381
|
-
|
|
13382
|
-
}, d.prototype.send = function(
|
|
13416
|
+
var v = new u.Metadata(m || {});
|
|
13417
|
+
v.set("content-type", "application/grpc-web+proto"), v.set("x-grpc-web", "1"), this.transport.start(v);
|
|
13418
|
+
}, d.prototype.send = function(m) {
|
|
13383
13419
|
if (!this.started)
|
|
13384
13420
|
throw new Error("Client not started - .start() must be called before .send()");
|
|
13385
13421
|
if (this.closed)
|
|
@@ -13389,8 +13425,8 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
13389
13425
|
if (!this.methodDefinition.requestStream && this.sentFirstMessage)
|
|
13390
13426
|
throw new Error("Message already sent for non-client-streaming method - cannot .send()");
|
|
13391
13427
|
this.sentFirstMessage = !0;
|
|
13392
|
-
var
|
|
13393
|
-
this.transport.sendMessage(
|
|
13428
|
+
var v = i.frameRequest(m);
|
|
13429
|
+
this.transport.sendMessage(v);
|
|
13394
13430
|
}, d.prototype.finishSend = function() {
|
|
13395
13431
|
if (!this.started)
|
|
13396
13432
|
throw new Error("Client not started - .finishSend() must be called before .close()");
|
|
@@ -13408,11 +13444,11 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
13408
13444
|
}, d;
|
|
13409
13445
|
}();
|
|
13410
13446
|
function c(d) {
|
|
13411
|
-
var
|
|
13412
|
-
if (
|
|
13447
|
+
var m = d.get("grpc-status") || [];
|
|
13448
|
+
if (m.length > 0)
|
|
13413
13449
|
try {
|
|
13414
|
-
var
|
|
13415
|
-
return parseInt(
|
|
13450
|
+
var v = m[0];
|
|
13451
|
+
return parseInt(v, 10);
|
|
13416
13452
|
} catch {
|
|
13417
13453
|
return null;
|
|
13418
13454
|
}
|
|
@@ -13448,63 +13484,63 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
13448
13484
|
var r = o(3), i = function() {
|
|
13449
13485
|
function l(c, d) {
|
|
13450
13486
|
c === void 0 && (c = {}), d === void 0 && (d = { splitValues: !1 });
|
|
13451
|
-
var
|
|
13487
|
+
var m, v = this;
|
|
13452
13488
|
this.headersMap = {}, c && (typeof Headers < "u" && c instanceof Headers ? r.getHeaderKeys(c).forEach(function(y) {
|
|
13453
13489
|
r.getHeaderValues(c, y).forEach(function(f) {
|
|
13454
|
-
d.splitValues ?
|
|
13490
|
+
d.splitValues ? v.append(y, r.splitHeaderValue(f)) : v.append(y, f);
|
|
13455
13491
|
});
|
|
13456
|
-
}) : typeof (
|
|
13457
|
-
|
|
13492
|
+
}) : typeof (m = c) == "object" && typeof m.headersMap == "object" && typeof m.forEach == "function" ? c.forEach(function(y, f) {
|
|
13493
|
+
v.append(y, f);
|
|
13458
13494
|
}) : typeof Map < "u" && c instanceof Map ? c.forEach(function(y, f) {
|
|
13459
|
-
|
|
13495
|
+
v.append(f, y);
|
|
13460
13496
|
}) : typeof c == "string" ? this.appendFromString(c) : typeof c == "object" && Object.getOwnPropertyNames(c).forEach(function(y) {
|
|
13461
13497
|
var f = c[y];
|
|
13462
13498
|
Array.isArray(f) ? f.forEach(function(b) {
|
|
13463
|
-
|
|
13464
|
-
}) :
|
|
13499
|
+
v.append(y, b);
|
|
13500
|
+
}) : v.append(y, f);
|
|
13465
13501
|
}));
|
|
13466
13502
|
}
|
|
13467
13503
|
return l.prototype.appendFromString = function(c) {
|
|
13468
13504
|
for (var d = c.split(`\r
|
|
13469
|
-
`),
|
|
13470
|
-
var
|
|
13505
|
+
`), m = 0; m < d.length; m++) {
|
|
13506
|
+
var v = d[m], y = v.indexOf(":");
|
|
13471
13507
|
if (y > 0) {
|
|
13472
|
-
var f =
|
|
13508
|
+
var f = v.substring(0, y).trim(), b = v.substring(y + 1).trim();
|
|
13473
13509
|
this.append(f, b);
|
|
13474
13510
|
}
|
|
13475
13511
|
}
|
|
13476
13512
|
}, l.prototype.delete = function(c, d) {
|
|
13477
|
-
var
|
|
13513
|
+
var m = r.normalizeName(c);
|
|
13478
13514
|
if (d === void 0)
|
|
13479
|
-
delete this.headersMap[
|
|
13515
|
+
delete this.headersMap[m];
|
|
13480
13516
|
else {
|
|
13481
|
-
var
|
|
13482
|
-
if (
|
|
13483
|
-
var y =
|
|
13484
|
-
y >= 0 &&
|
|
13517
|
+
var v = this.headersMap[m];
|
|
13518
|
+
if (v) {
|
|
13519
|
+
var y = v.indexOf(d);
|
|
13520
|
+
y >= 0 && v.splice(y, 1), v.length === 0 && delete this.headersMap[m];
|
|
13485
13521
|
}
|
|
13486
13522
|
}
|
|
13487
13523
|
}, l.prototype.append = function(c, d) {
|
|
13488
|
-
var
|
|
13489
|
-
Array.isArray(this.headersMap[
|
|
13490
|
-
|
|
13491
|
-
}) : this.headersMap[
|
|
13524
|
+
var m = this, v = r.normalizeName(c);
|
|
13525
|
+
Array.isArray(this.headersMap[v]) || (this.headersMap[v] = []), Array.isArray(d) ? d.forEach(function(y) {
|
|
13526
|
+
m.headersMap[v].push(r.normalizeValue(y));
|
|
13527
|
+
}) : this.headersMap[v].push(r.normalizeValue(d));
|
|
13492
13528
|
}, l.prototype.set = function(c, d) {
|
|
13493
|
-
var
|
|
13529
|
+
var m = r.normalizeName(c);
|
|
13494
13530
|
if (Array.isArray(d)) {
|
|
13495
|
-
var
|
|
13531
|
+
var v = [];
|
|
13496
13532
|
d.forEach(function(y) {
|
|
13497
|
-
|
|
13498
|
-
}), this.headersMap[
|
|
13533
|
+
v.push(r.normalizeValue(y));
|
|
13534
|
+
}), this.headersMap[m] = v;
|
|
13499
13535
|
} else
|
|
13500
|
-
this.headersMap[
|
|
13536
|
+
this.headersMap[m] = [r.normalizeValue(d)];
|
|
13501
13537
|
}, l.prototype.has = function(c, d) {
|
|
13502
|
-
var
|
|
13503
|
-
if (!Array.isArray(
|
|
13538
|
+
var m = this.headersMap[r.normalizeName(c)];
|
|
13539
|
+
if (!Array.isArray(m))
|
|
13504
13540
|
return !1;
|
|
13505
13541
|
if (d !== void 0) {
|
|
13506
|
-
var
|
|
13507
|
-
return
|
|
13542
|
+
var v = r.normalizeValue(d);
|
|
13543
|
+
return m.indexOf(v) >= 0;
|
|
13508
13544
|
}
|
|
13509
13545
|
return !0;
|
|
13510
13546
|
}, l.prototype.get = function(c) {
|
|
@@ -13512,15 +13548,15 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
13512
13548
|
return d !== void 0 ? d.concat() : [];
|
|
13513
13549
|
}, l.prototype.forEach = function(c) {
|
|
13514
13550
|
var d = this;
|
|
13515
|
-
Object.getOwnPropertyNames(this.headersMap).forEach(function(
|
|
13516
|
-
c(
|
|
13551
|
+
Object.getOwnPropertyNames(this.headersMap).forEach(function(m) {
|
|
13552
|
+
c(m, d.headersMap[m]);
|
|
13517
13553
|
}, this);
|
|
13518
13554
|
}, l.prototype.toHeaders = function() {
|
|
13519
13555
|
if (typeof Headers < "u") {
|
|
13520
13556
|
var c = new Headers();
|
|
13521
|
-
return this.forEach(function(d,
|
|
13522
|
-
|
|
13523
|
-
c.append(d,
|
|
13557
|
+
return this.forEach(function(d, m) {
|
|
13558
|
+
m.forEach(function(v) {
|
|
13559
|
+
c.append(d, v);
|
|
13524
13560
|
});
|
|
13525
13561
|
}), c;
|
|
13526
13562
|
}
|
|
@@ -13557,13 +13593,13 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
13557
13593
|
return d && typeof d == "string" ? [d] : d;
|
|
13558
13594
|
}, p.getHeaderKeys = function(i) {
|
|
13559
13595
|
var l = i, c = {}, d = [];
|
|
13560
|
-
return l.keys ? r.iterateHeadersKeys(l, function(
|
|
13561
|
-
c[v] || (c[v] = !0, d.push(v));
|
|
13562
|
-
}) : l.forEach ? l.forEach(function(v, m) {
|
|
13563
|
-
c[m] || (c[m] = !0, d.push(m));
|
|
13564
|
-
}) : r.iterateHeaders(l, function(v) {
|
|
13565
|
-
var m = v[0];
|
|
13596
|
+
return l.keys ? r.iterateHeadersKeys(l, function(m) {
|
|
13566
13597
|
c[m] || (c[m] = !0, d.push(m));
|
|
13598
|
+
}) : l.forEach ? l.forEach(function(m, v) {
|
|
13599
|
+
c[v] || (c[v] = !0, d.push(v));
|
|
13600
|
+
}) : r.iterateHeaders(l, function(m) {
|
|
13601
|
+
var v = m[0];
|
|
13602
|
+
c[v] || (c[v] = !0, d.push(v));
|
|
13567
13603
|
}), d;
|
|
13568
13604
|
}, p.splitHeaderValue = function(i) {
|
|
13569
13605
|
var l = [];
|
|
@@ -13650,163 +13686,163 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
13650
13686
|
return typeof Response < "u" && Response.prototype.hasOwnProperty("body") && typeof Headers == "function";
|
|
13651
13687
|
};
|
|
13652
13688
|
}, function(e, s, n) {
|
|
13653
|
-
var u, g = this && this.__extends || (u = function(
|
|
13689
|
+
var u, g = this && this.__extends || (u = function(m, v) {
|
|
13654
13690
|
return (u = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(y, f) {
|
|
13655
13691
|
y.__proto__ = f;
|
|
13656
13692
|
} || function(y, f) {
|
|
13657
13693
|
for (var b in f)
|
|
13658
13694
|
f.hasOwnProperty(b) && (y[b] = f[b]);
|
|
13659
|
-
})(
|
|
13660
|
-
}, function(
|
|
13695
|
+
})(m, v);
|
|
13696
|
+
}, function(m, v) {
|
|
13661
13697
|
function y() {
|
|
13662
|
-
this.constructor =
|
|
13698
|
+
this.constructor = m;
|
|
13663
13699
|
}
|
|
13664
|
-
u(
|
|
13700
|
+
u(m, v), m.prototype = v === null ? Object.create(v) : (y.prototype = v.prototype, new y());
|
|
13665
13701
|
});
|
|
13666
13702
|
Object.defineProperty(s, "__esModule", { value: !0 });
|
|
13667
13703
|
var p = n(0), o = n(1), r = n(11);
|
|
13668
|
-
s.XhrTransport = function(
|
|
13669
|
-
return function(
|
|
13704
|
+
s.XhrTransport = function(m) {
|
|
13705
|
+
return function(v) {
|
|
13670
13706
|
if (r.detectMozXHRSupport())
|
|
13671
|
-
return new l(
|
|
13707
|
+
return new l(v, m);
|
|
13672
13708
|
if (r.detectXHROverrideMimeTypeSupport())
|
|
13673
|
-
return new i(
|
|
13709
|
+
return new i(v, m);
|
|
13674
13710
|
throw new Error("This environment's XHR implementation cannot support binary transfer.");
|
|
13675
13711
|
};
|
|
13676
13712
|
};
|
|
13677
13713
|
var i = function() {
|
|
13678
|
-
function v
|
|
13679
|
-
this.options =
|
|
13714
|
+
function m(v, y) {
|
|
13715
|
+
this.options = v, this.init = y;
|
|
13680
13716
|
}
|
|
13681
|
-
return
|
|
13717
|
+
return m.prototype.onProgressEvent = function() {
|
|
13682
13718
|
this.options.debug && o.debug("XHR.onProgressEvent.length: ", this.xhr.response.length);
|
|
13683
|
-
var
|
|
13719
|
+
var v = this.xhr.response.substr(this.index);
|
|
13684
13720
|
this.index = this.xhr.response.length;
|
|
13685
|
-
var y = d(
|
|
13721
|
+
var y = d(v);
|
|
13686
13722
|
this.options.onChunk(y);
|
|
13687
|
-
},
|
|
13723
|
+
}, m.prototype.onLoadEvent = function() {
|
|
13688
13724
|
this.options.debug && o.debug("XHR.onLoadEvent"), this.options.onEnd();
|
|
13689
|
-
},
|
|
13725
|
+
}, m.prototype.onStateChange = function() {
|
|
13690
13726
|
this.options.debug && o.debug("XHR.onStateChange", this.xhr.readyState), this.xhr.readyState === XMLHttpRequest.HEADERS_RECEIVED && this.options.onHeaders(new p.Metadata(this.xhr.getAllResponseHeaders()), this.xhr.status);
|
|
13691
|
-
},
|
|
13692
|
-
this.xhr.send(
|
|
13693
|
-
},
|
|
13694
|
-
},
|
|
13727
|
+
}, m.prototype.sendMessage = function(v) {
|
|
13728
|
+
this.xhr.send(v);
|
|
13729
|
+
}, m.prototype.finishSend = function() {
|
|
13730
|
+
}, m.prototype.start = function(v) {
|
|
13695
13731
|
var y = this;
|
|
13696
|
-
this.metadata =
|
|
13732
|
+
this.metadata = v;
|
|
13697
13733
|
var f = new XMLHttpRequest();
|
|
13698
13734
|
this.xhr = f, f.open("POST", this.options.url), this.configureXhr(), this.metadata.forEach(function(b, h) {
|
|
13699
13735
|
f.setRequestHeader(b, h.join(", "));
|
|
13700
13736
|
}), f.withCredentials = !!this.init.withCredentials, f.addEventListener("readystatechange", this.onStateChange.bind(this)), f.addEventListener("progress", this.onProgressEvent.bind(this)), f.addEventListener("loadend", this.onLoadEvent.bind(this)), f.addEventListener("error", function(b) {
|
|
13701
13737
|
y.options.debug && o.debug("XHR.error", b), y.options.onEnd(b.error);
|
|
13702
13738
|
});
|
|
13703
|
-
},
|
|
13739
|
+
}, m.prototype.configureXhr = function() {
|
|
13704
13740
|
this.xhr.responseType = "text", this.xhr.overrideMimeType("text/plain; charset=x-user-defined");
|
|
13705
|
-
},
|
|
13741
|
+
}, m.prototype.cancel = function() {
|
|
13706
13742
|
this.options.debug && o.debug("XHR.abort"), this.xhr.abort();
|
|
13707
|
-
},
|
|
13743
|
+
}, m;
|
|
13708
13744
|
}();
|
|
13709
13745
|
s.XHR = i;
|
|
13710
|
-
var l = function(
|
|
13711
|
-
function
|
|
13712
|
-
return
|
|
13746
|
+
var l = function(m) {
|
|
13747
|
+
function v() {
|
|
13748
|
+
return m !== null && m.apply(this, arguments) || this;
|
|
13713
13749
|
}
|
|
13714
|
-
return g(
|
|
13750
|
+
return g(v, m), v.prototype.configureXhr = function() {
|
|
13715
13751
|
this.options.debug && o.debug("MozXHR.configureXhr: setting responseType to 'moz-chunked-arraybuffer'"), this.xhr.responseType = "moz-chunked-arraybuffer";
|
|
13716
|
-
},
|
|
13752
|
+
}, v.prototype.onProgressEvent = function() {
|
|
13717
13753
|
var y = this.xhr.response;
|
|
13718
13754
|
this.options.debug && o.debug("MozXHR.onProgressEvent: ", new Uint8Array(y)), this.options.onChunk(new Uint8Array(y));
|
|
13719
|
-
},
|
|
13755
|
+
}, v;
|
|
13720
13756
|
}(i);
|
|
13721
|
-
function c(
|
|
13722
|
-
var y =
|
|
13757
|
+
function c(m, v) {
|
|
13758
|
+
var y = m.charCodeAt(v);
|
|
13723
13759
|
if (y >= 55296 && y <= 56319) {
|
|
13724
|
-
var f =
|
|
13760
|
+
var f = m.charCodeAt(v + 1);
|
|
13725
13761
|
f >= 56320 && f <= 57343 && (y = 65536 + (y - 55296 << 10) + (f - 56320));
|
|
13726
13762
|
}
|
|
13727
13763
|
return y;
|
|
13728
13764
|
}
|
|
13729
|
-
function d(
|
|
13730
|
-
for (var
|
|
13731
|
-
var b = String.prototype.codePointAt ?
|
|
13732
|
-
|
|
13765
|
+
function d(m) {
|
|
13766
|
+
for (var v = new Uint8Array(m.length), y = 0, f = 0; f < m.length; f++) {
|
|
13767
|
+
var b = String.prototype.codePointAt ? m.codePointAt(f) : c(m, f);
|
|
13768
|
+
v[y++] = 255 & b;
|
|
13733
13769
|
}
|
|
13734
|
-
return
|
|
13770
|
+
return v;
|
|
13735
13771
|
}
|
|
13736
13772
|
s.MozChunkedArrayBufferXHR = l, s.stringToArrayBuffer = d;
|
|
13737
13773
|
}, function(e, s, n) {
|
|
13738
13774
|
Object.defineProperty(s, "__esModule", { value: !0 });
|
|
13739
13775
|
var u, g = n(0);
|
|
13740
|
-
function p(
|
|
13741
|
-
return function(
|
|
13742
|
-
return
|
|
13743
|
-
}(
|
|
13776
|
+
function p(m) {
|
|
13777
|
+
return function(v) {
|
|
13778
|
+
return v === 9 || v === 10 || v === 13;
|
|
13779
|
+
}(m) || m >= 32 && m <= 126;
|
|
13744
13780
|
}
|
|
13745
|
-
function o(
|
|
13746
|
-
for (var
|
|
13747
|
-
if (!p(v
|
|
13781
|
+
function o(m) {
|
|
13782
|
+
for (var v = 0; v !== m.length; ++v)
|
|
13783
|
+
if (!p(m[v]))
|
|
13748
13784
|
throw new Error("Metadata is not valid (printable) ASCII");
|
|
13749
|
-
return String.fromCharCode.apply(String, Array.prototype.slice.call(
|
|
13785
|
+
return String.fromCharCode.apply(String, Array.prototype.slice.call(m));
|
|
13750
13786
|
}
|
|
13751
|
-
function r(
|
|
13752
|
-
return (128 &
|
|
13787
|
+
function r(m) {
|
|
13788
|
+
return (128 & m.getUint8(0)) == 128;
|
|
13753
13789
|
}
|
|
13754
|
-
function i(
|
|
13755
|
-
return
|
|
13790
|
+
function i(m) {
|
|
13791
|
+
return m.getUint32(1, !1);
|
|
13756
13792
|
}
|
|
13757
|
-
function l(
|
|
13758
|
-
return
|
|
13793
|
+
function l(m, v, y) {
|
|
13794
|
+
return m.byteLength - v >= y;
|
|
13759
13795
|
}
|
|
13760
|
-
function c(
|
|
13761
|
-
if (
|
|
13762
|
-
return
|
|
13763
|
-
var f =
|
|
13796
|
+
function c(m, v, y) {
|
|
13797
|
+
if (m.slice)
|
|
13798
|
+
return m.slice(v, y);
|
|
13799
|
+
var f = m.length;
|
|
13764
13800
|
y !== void 0 && (f = y);
|
|
13765
|
-
for (var b = new Uint8Array(f -
|
|
13766
|
-
b[h++] =
|
|
13801
|
+
for (var b = new Uint8Array(f - v), h = 0, R = v; R < f; R++)
|
|
13802
|
+
b[h++] = m[R];
|
|
13767
13803
|
return b;
|
|
13768
13804
|
}
|
|
13769
|
-
s.decodeASCII = o, s.encodeASCII = function(
|
|
13770
|
-
for (var
|
|
13771
|
-
var f =
|
|
13805
|
+
s.decodeASCII = o, s.encodeASCII = function(m) {
|
|
13806
|
+
for (var v = new Uint8Array(m.length), y = 0; y !== m.length; ++y) {
|
|
13807
|
+
var f = m.charCodeAt(y);
|
|
13772
13808
|
if (!p(f))
|
|
13773
13809
|
throw new Error("Metadata contains invalid ASCII");
|
|
13774
|
-
|
|
13810
|
+
v[y] = f;
|
|
13775
13811
|
}
|
|
13776
|
-
return
|
|
13777
|
-
}, function(
|
|
13778
|
-
|
|
13812
|
+
return v;
|
|
13813
|
+
}, function(m) {
|
|
13814
|
+
m[m.MESSAGE = 1] = "MESSAGE", m[m.TRAILERS = 2] = "TRAILERS";
|
|
13779
13815
|
}(u = s.ChunkType || (s.ChunkType = {}));
|
|
13780
13816
|
var d = function() {
|
|
13781
|
-
function
|
|
13817
|
+
function m() {
|
|
13782
13818
|
this.buffer = null, this.position = 0;
|
|
13783
13819
|
}
|
|
13784
|
-
return
|
|
13785
|
-
if (
|
|
13820
|
+
return m.prototype.parse = function(v, y) {
|
|
13821
|
+
if (v.length === 0 && y)
|
|
13786
13822
|
return [];
|
|
13787
13823
|
var f, b = [];
|
|
13788
13824
|
if (this.buffer == null)
|
|
13789
|
-
this.buffer =
|
|
13825
|
+
this.buffer = v, this.position = 0;
|
|
13790
13826
|
else if (this.position === this.buffer.byteLength)
|
|
13791
|
-
this.buffer =
|
|
13827
|
+
this.buffer = v, this.position = 0;
|
|
13792
13828
|
else {
|
|
13793
|
-
var h = this.buffer.byteLength - this.position, R = new Uint8Array(h +
|
|
13794
|
-
R.set(
|
|
13795
|
-
var P = new Uint8Array(
|
|
13829
|
+
var h = this.buffer.byteLength - this.position, R = new Uint8Array(h + v.byteLength), _ = c(this.buffer, this.position);
|
|
13830
|
+
R.set(_, 0);
|
|
13831
|
+
var P = new Uint8Array(v);
|
|
13796
13832
|
R.set(P, h), this.buffer = R, this.position = 0;
|
|
13797
13833
|
}
|
|
13798
13834
|
for (; ; ) {
|
|
13799
13835
|
if (!l(this.buffer, this.position, 5))
|
|
13800
13836
|
return b;
|
|
13801
|
-
var D = c(this.buffer, this.position, this.position + 5),
|
|
13837
|
+
var D = c(this.buffer, this.position, this.position + 5), I = new DataView(D.buffer, D.byteOffset, D.byteLength), z = i(I);
|
|
13802
13838
|
if (!l(this.buffer, this.position, 5 + z))
|
|
13803
13839
|
return b;
|
|
13804
13840
|
var x = c(this.buffer, this.position + 5, this.position + 5 + z);
|
|
13805
|
-
if (this.position += 5 + z, r(
|
|
13841
|
+
if (this.position += 5 + z, r(I))
|
|
13806
13842
|
return b.push({ chunkType: u.TRAILERS, trailers: (f = x, new g.Metadata(o(f))) }), b;
|
|
13807
13843
|
b.push({ chunkType: u.MESSAGE, data: x });
|
|
13808
13844
|
}
|
|
13809
|
-
},
|
|
13845
|
+
}, m;
|
|
13810
13846
|
}();
|
|
13811
13847
|
s.ChunkParser = d;
|
|
13812
13848
|
}, function(e, s, n) {
|
|
@@ -13848,11 +13884,11 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
13848
13884
|
};
|
|
13849
13885
|
}, function(e, s, n) {
|
|
13850
13886
|
Object.defineProperty(s, "__esModule", { value: !0 });
|
|
13851
|
-
var u = n(3), g = n(4), p = n(6), o = n(12), r = n(7), i = n(5), l = n(9), c = n(13), d = n(15),
|
|
13852
|
-
(function(
|
|
13853
|
-
|
|
13854
|
-
return
|
|
13855
|
-
},
|
|
13887
|
+
var u = n(3), g = n(4), p = n(6), o = n(12), r = n(7), i = n(5), l = n(9), c = n(13), d = n(15), m = n(2);
|
|
13888
|
+
(function(v) {
|
|
13889
|
+
v.setDefaultTransport = g.setDefaultTransportFactory, v.CrossBrowserHttpTransport = i.CrossBrowserHttpTransport, v.FetchReadableStreamTransport = p.FetchReadableStreamTransport, v.XhrTransport = r.XhrTransport, v.WebsocketTransport = o.WebsocketTransport, v.Code = l.Code, v.Metadata = u.BrowserHeaders, v.client = function(y, f) {
|
|
13890
|
+
return m.client(y, f);
|
|
13891
|
+
}, v.invoke = c.invoke, v.unary = d.unary;
|
|
13856
13892
|
})(s.grpc || (s.grpc = {}));
|
|
13857
13893
|
}, function(e, s, n) {
|
|
13858
13894
|
var u;
|
|
@@ -13893,33 +13929,33 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
13893
13929
|
return function(r) {
|
|
13894
13930
|
return function(i) {
|
|
13895
13931
|
i.debug && g.debug("websocketRequest", i);
|
|
13896
|
-
var l, c = function(
|
|
13897
|
-
if (
|
|
13898
|
-
return "wss://" +
|
|
13899
|
-
if (
|
|
13900
|
-
return "ws://" +
|
|
13932
|
+
var l, c = function(v) {
|
|
13933
|
+
if (v.substr(0, 8) === "https://")
|
|
13934
|
+
return "wss://" + v.substr(8);
|
|
13935
|
+
if (v.substr(0, 7) === "http://")
|
|
13936
|
+
return "ws://" + v.substr(7);
|
|
13901
13937
|
throw new Error("Websocket transport constructed with non-https:// or http:// host.");
|
|
13902
13938
|
}(i.url), d = [];
|
|
13903
|
-
function v
|
|
13904
|
-
if (
|
|
13939
|
+
function m(v) {
|
|
13940
|
+
if (v === u.FINISH_SEND)
|
|
13905
13941
|
l.send(o);
|
|
13906
13942
|
else {
|
|
13907
|
-
var y =
|
|
13943
|
+
var y = v, f = new Int8Array(y.byteLength + 1);
|
|
13908
13944
|
f.set(new Uint8Array([0])), f.set(y, 1), l.send(f);
|
|
13909
13945
|
}
|
|
13910
13946
|
}
|
|
13911
|
-
return { sendMessage: function(
|
|
13912
|
-
l && l.readyState !== l.CONNECTING ? v
|
|
13947
|
+
return { sendMessage: function(v) {
|
|
13948
|
+
l && l.readyState !== l.CONNECTING ? m(v) : d.push(v);
|
|
13913
13949
|
}, finishSend: function() {
|
|
13914
|
-
l && l.readyState !== l.CONNECTING ?
|
|
13915
|
-
}, start: function(
|
|
13950
|
+
l && l.readyState !== l.CONNECTING ? m(u.FINISH_SEND) : d.push(u.FINISH_SEND);
|
|
13951
|
+
}, start: function(v) {
|
|
13916
13952
|
(l = new WebSocket(c, ["grpc-websockets"])).binaryType = "arraybuffer", l.onopen = function() {
|
|
13917
13953
|
var y;
|
|
13918
|
-
i.debug && g.debug("websocketRequest.onopen"), l.send((y = "",
|
|
13954
|
+
i.debug && g.debug("websocketRequest.onopen"), l.send((y = "", v.forEach(function(f, b) {
|
|
13919
13955
|
y += f + ": " + b.join(", ") + `\r
|
|
13920
13956
|
`;
|
|
13921
13957
|
}), p.encodeASCII(y))), d.forEach(function(f) {
|
|
13922
|
-
|
|
13958
|
+
m(f);
|
|
13923
13959
|
});
|
|
13924
13960
|
}, l.onclose = function(y) {
|
|
13925
13961
|
i.debug && g.debug("websocketRequest.onclose", y), i.onEnd();
|
|
@@ -13963,8 +13999,8 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
13963
13999
|
r = c;
|
|
13964
14000
|
}), l.onMessage(function(c) {
|
|
13965
14001
|
i = c;
|
|
13966
|
-
}), l.onEnd(function(c, d,
|
|
13967
|
-
o.onEnd({ status: c, statusMessage: d, headers: r || new u.Metadata(), message: i, trailers:
|
|
14002
|
+
}), l.onEnd(function(c, d, m) {
|
|
14003
|
+
o.onEnd({ status: c, statusMessage: d, headers: r || new u.Metadata(), message: i, trailers: m });
|
|
13968
14004
|
}), l.start(o.metadata), l.send(o.request), l.finishSend(), { close: function() {
|
|
13969
14005
|
l.close();
|
|
13970
14006
|
} };
|
|
@@ -20179,67 +20215,67 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
20179
20215
|
}, 138: (t, e, s) => {
|
|
20180
20216
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.ClientChannel = void 0;
|
|
20181
20217
|
var n = s(655), u = s(662), g = s(417), p = s(758), o = s(210), r = function(l) {
|
|
20182
|
-
function c(d,
|
|
20183
|
-
var
|
|
20184
|
-
return Object.defineProperty(
|
|
20185
|
-
return
|
|
20218
|
+
function c(d, m) {
|
|
20219
|
+
var v = l.call(this, d, m) || this;
|
|
20220
|
+
return Object.defineProperty(v, "streamIDCounter", { enumerable: !0, configurable: !0, writable: !0, value: 0 }), Object.defineProperty(v, "streams", { enumerable: !0, configurable: !0, writable: !0, value: {} }), m.onmessage = function(y) {
|
|
20221
|
+
return v.onChannelMessage(y);
|
|
20186
20222
|
}, d.addEventListener("iceconnectionstatechange", function() {
|
|
20187
20223
|
var y = d.iceConnectionState;
|
|
20188
|
-
y !== "failed" && y !== "disconnected" && y !== "closed" ||
|
|
20189
|
-
}),
|
|
20190
|
-
return
|
|
20191
|
-
}),
|
|
20224
|
+
y !== "failed" && y !== "disconnected" && y !== "closed" || v.onConnectionTerminated();
|
|
20225
|
+
}), m.addEventListener("close", function() {
|
|
20226
|
+
return v.onConnectionTerminated();
|
|
20227
|
+
}), v;
|
|
20192
20228
|
}
|
|
20193
20229
|
return n.__extends(c, l), Object.defineProperty(c.prototype, "transportFactory", { enumerable: !1, configurable: !0, writable: !0, value: function() {
|
|
20194
20230
|
var d = this;
|
|
20195
|
-
return function(
|
|
20196
|
-
return d.newStream(d.nextStreamID(),
|
|
20231
|
+
return function(m) {
|
|
20232
|
+
return d.newStream(d.nextStreamID(), m);
|
|
20197
20233
|
};
|
|
20198
20234
|
} }), Object.defineProperty(c.prototype, "onConnectionTerminated", { enumerable: !1, configurable: !0, writable: !0, value: function() {
|
|
20199
20235
|
this.closeWithReason(new p.ConnectionClosedError("data channel closed"));
|
|
20200
20236
|
var d = new p.ConnectionClosedError("connection terminated");
|
|
20201
|
-
for (var
|
|
20202
|
-
this.streams[
|
|
20237
|
+
for (var m in this.streams)
|
|
20238
|
+
this.streams[m].cs.closeWithRecvError(d);
|
|
20203
20239
|
} }), Object.defineProperty(c.prototype, "onChannelMessage", { enumerable: !1, configurable: !0, writable: !0, value: function(d) {
|
|
20204
|
-
var
|
|
20240
|
+
var m;
|
|
20205
20241
|
try {
|
|
20206
|
-
|
|
20242
|
+
m = o.Response.deserializeBinary(d.data);
|
|
20207
20243
|
} catch (b) {
|
|
20208
20244
|
return void console.error("error deserializing message", b);
|
|
20209
20245
|
}
|
|
20210
|
-
var
|
|
20211
|
-
if (
|
|
20212
|
-
var y =
|
|
20213
|
-
f !== void 0 ? f.cs.onResponse(
|
|
20246
|
+
var v = m.getStream();
|
|
20247
|
+
if (v !== void 0) {
|
|
20248
|
+
var y = v.getId(), f = this.streams[y];
|
|
20249
|
+
f !== void 0 ? f.cs.onResponse(m) : console.error("no stream for id; discarding", "id", y);
|
|
20214
20250
|
} else
|
|
20215
20251
|
console.error("no stream id; discarding");
|
|
20216
20252
|
} }), Object.defineProperty(c.prototype, "nextStreamID", { enumerable: !1, configurable: !0, writable: !0, value: function() {
|
|
20217
20253
|
var d = new o.Stream();
|
|
20218
20254
|
return d.setId(this.streamIDCounter++), d;
|
|
20219
|
-
} }), Object.defineProperty(c.prototype, "newStream", { enumerable: !1, configurable: !0, writable: !0, value: function(d,
|
|
20220
|
-
var
|
|
20255
|
+
} }), Object.defineProperty(c.prototype, "newStream", { enumerable: !1, configurable: !0, writable: !0, value: function(d, m) {
|
|
20256
|
+
var v = this;
|
|
20221
20257
|
if (this.isClosed())
|
|
20222
|
-
return new i(new p.ConnectionClosedError("connection closed"),
|
|
20258
|
+
return new i(new p.ConnectionClosedError("connection closed"), m);
|
|
20223
20259
|
var y = this.streams[d.getId()];
|
|
20224
20260
|
if (y === void 0) {
|
|
20225
20261
|
if (Object.keys(this.streams).length > 256)
|
|
20226
|
-
return new i(new Error("stream limit hit"),
|
|
20262
|
+
return new i(new Error("stream limit hit"), m);
|
|
20227
20263
|
y = { cs: new g.ClientStream(this, d, function(f) {
|
|
20228
|
-
return
|
|
20229
|
-
},
|
|
20264
|
+
return v.removeStreamByID(f);
|
|
20265
|
+
}, m) }, this.streams[d.getId()] = y;
|
|
20230
20266
|
}
|
|
20231
20267
|
return y.cs;
|
|
20232
20268
|
} }), Object.defineProperty(c.prototype, "removeStreamByID", { enumerable: !1, configurable: !0, writable: !0, value: function(d) {
|
|
20233
20269
|
delete this.streams[d];
|
|
20234
|
-
} }), Object.defineProperty(c.prototype, "writeHeaders", { enumerable: !1, configurable: !0, writable: !0, value: function(d,
|
|
20235
|
-
var
|
|
20236
|
-
|
|
20237
|
-
} }), Object.defineProperty(c.prototype, "writeMessage", { enumerable: !1, configurable: !0, writable: !0, value: function(d,
|
|
20238
|
-
var m = new o.Request();
|
|
20239
|
-
m.setStream(d), m.setMessage(v), this.write(m);
|
|
20240
|
-
} }), Object.defineProperty(c.prototype, "writeReset", { enumerable: !1, configurable: !0, writable: !0, value: function(d) {
|
|
20270
|
+
} }), Object.defineProperty(c.prototype, "writeHeaders", { enumerable: !1, configurable: !0, writable: !0, value: function(d, m) {
|
|
20271
|
+
var v = new o.Request();
|
|
20272
|
+
v.setStream(d), v.setHeaders(m), this.write(v);
|
|
20273
|
+
} }), Object.defineProperty(c.prototype, "writeMessage", { enumerable: !1, configurable: !0, writable: !0, value: function(d, m) {
|
|
20241
20274
|
var v = new o.Request();
|
|
20242
|
-
v.setStream(d), v.
|
|
20275
|
+
v.setStream(d), v.setMessage(m), this.write(v);
|
|
20276
|
+
} }), Object.defineProperty(c.prototype, "writeReset", { enumerable: !1, configurable: !0, writable: !0, value: function(d) {
|
|
20277
|
+
var m = new o.Request();
|
|
20278
|
+
m.setStream(d), m.setRstStream(!0), this.write(m);
|
|
20243
20279
|
} }), c;
|
|
20244
20280
|
}(u.BaseChannel);
|
|
20245
20281
|
e.ClientChannel = r;
|
|
@@ -20260,89 +20296,89 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
20260
20296
|
}, 417: (t, e, s) => {
|
|
20261
20297
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.encodeASCII = e.ClientStream = void 0;
|
|
20262
20298
|
var n = s(655), u = s(37), g = s(370), p = s(758), o = s(210), r = function(d) {
|
|
20263
|
-
function v
|
|
20299
|
+
function m(v, y, f, b) {
|
|
20264
20300
|
var h = d.call(this, y, f, b) || this;
|
|
20265
|
-
return Object.defineProperty(h, "channel", { enumerable: !0, configurable: !0, writable: !0, value: void 0 }), Object.defineProperty(h, "headersReceived", { enumerable: !0, configurable: !0, writable: !0, value: !1 }), Object.defineProperty(h, "trailersReceived", { enumerable: !0, configurable: !0, writable: !0, value: !1 }), h.channel =
|
|
20301
|
+
return Object.defineProperty(h, "channel", { enumerable: !0, configurable: !0, writable: !0, value: void 0 }), Object.defineProperty(h, "headersReceived", { enumerable: !0, configurable: !0, writable: !0, value: !1 }), Object.defineProperty(h, "trailersReceived", { enumerable: !0, configurable: !0, writable: !0, value: !1 }), h.channel = v, h;
|
|
20266
20302
|
}
|
|
20267
|
-
return n.__extends(
|
|
20303
|
+
return n.__extends(m, d), Object.defineProperty(m.prototype, "start", { enumerable: !1, configurable: !0, writable: !0, value: function(v) {
|
|
20268
20304
|
var y = "/".concat(this.opts.methodDefinition.service.serviceName, "/").concat(this.opts.methodDefinition.methodName), f = new o.RequestHeaders();
|
|
20269
|
-
f.setMethod(y), f.setMetadata(l(
|
|
20305
|
+
f.setMethod(y), f.setMetadata(l(v));
|
|
20270
20306
|
try {
|
|
20271
20307
|
this.channel.writeHeaders(this.stream, f);
|
|
20272
20308
|
} catch (b) {
|
|
20273
20309
|
console.error("error writing headers", b), this.closeWithRecvError(b);
|
|
20274
20310
|
}
|
|
20275
|
-
} }), Object.defineProperty(
|
|
20276
|
-
|
|
20277
|
-
} }), Object.defineProperty(
|
|
20311
|
+
} }), Object.defineProperty(m.prototype, "sendMessage", { enumerable: !1, configurable: !0, writable: !0, value: function(v) {
|
|
20312
|
+
v ? this.writeMessage(!1, v.slice(5)) : this.writeMessage(!1, void 0);
|
|
20313
|
+
} }), Object.defineProperty(m.prototype, "resetStream", { enumerable: !1, configurable: !0, writable: !0, value: function() {
|
|
20278
20314
|
try {
|
|
20279
20315
|
this.channel.writeReset(this.stream);
|
|
20280
|
-
} catch (
|
|
20281
|
-
console.error("error writing reset",
|
|
20316
|
+
} catch (v) {
|
|
20317
|
+
console.error("error writing reset", v), this.closeWithRecvError(v);
|
|
20282
20318
|
}
|
|
20283
|
-
} }), Object.defineProperty(
|
|
20319
|
+
} }), Object.defineProperty(m.prototype, "finishSend", { enumerable: !1, configurable: !0, writable: !0, value: function() {
|
|
20284
20320
|
this.opts.methodDefinition.requestStream && this.writeMessage(!0, void 0);
|
|
20285
|
-
} }), Object.defineProperty(
|
|
20321
|
+
} }), Object.defineProperty(m.prototype, "cancel", { enumerable: !1, configurable: !0, writable: !0, value: function() {
|
|
20286
20322
|
this.closed || this.resetStream();
|
|
20287
|
-
} }), Object.defineProperty(
|
|
20323
|
+
} }), Object.defineProperty(m.prototype, "writeMessage", { enumerable: !1, configurable: !0, writable: !0, value: function(v, y) {
|
|
20288
20324
|
try {
|
|
20289
20325
|
if (!y || y.length == 0)
|
|
20290
|
-
return (f = new o.PacketMessage()).setEom(!0), (b = new o.RequestMessage()).setHasMessage(!!y), b.setPacketMessage(f), b.setEos(
|
|
20326
|
+
return (f = new o.PacketMessage()).setEom(!0), (b = new o.RequestMessage()).setHasMessage(!!y), b.setPacketMessage(f), b.setEos(v), void this.channel.writeMessage(this.stream, b);
|
|
20291
20327
|
for (; y.length !== 0; ) {
|
|
20292
20328
|
var f, b, h = Math.min(y.length, 16373);
|
|
20293
|
-
(f = new o.PacketMessage()).setData(y.slice(0, h)), (y = y.slice(h)).length === 0 && f.setEom(!0), (b = new o.RequestMessage()).setHasMessage(!!y), b.setPacketMessage(f), b.setEos(
|
|
20329
|
+
(f = new o.PacketMessage()).setData(y.slice(0, h)), (y = y.slice(h)).length === 0 && f.setEom(!0), (b = new o.RequestMessage()).setHasMessage(!!y), b.setPacketMessage(f), b.setEos(v), this.channel.writeMessage(this.stream, b);
|
|
20294
20330
|
}
|
|
20295
20331
|
} catch (R) {
|
|
20296
20332
|
console.error("error writing message", R), this.closeWithRecvError(R);
|
|
20297
20333
|
}
|
|
20298
|
-
} }), Object.defineProperty(
|
|
20299
|
-
switch (
|
|
20334
|
+
} }), Object.defineProperty(m.prototype, "onResponse", { enumerable: !1, configurable: !0, writable: !0, value: function(v) {
|
|
20335
|
+
switch (v.getTypeCase()) {
|
|
20300
20336
|
case o.Response.TypeCase.HEADERS:
|
|
20301
20337
|
if (this.headersReceived)
|
|
20302
20338
|
return void this.closeWithRecvError(new Error("headers already received"));
|
|
20303
20339
|
if (this.trailersReceived)
|
|
20304
20340
|
return void this.closeWithRecvError(new Error("headers received after trailers"));
|
|
20305
|
-
this.processHeaders(
|
|
20341
|
+
this.processHeaders(v.getHeaders());
|
|
20306
20342
|
break;
|
|
20307
20343
|
case o.Response.TypeCase.MESSAGE:
|
|
20308
20344
|
if (!this.headersReceived)
|
|
20309
20345
|
return void this.closeWithRecvError(new Error("headers not yet received"));
|
|
20310
20346
|
if (this.trailersReceived)
|
|
20311
20347
|
return void this.closeWithRecvError(new Error("headers received after trailers"));
|
|
20312
|
-
this.processMessage(
|
|
20348
|
+
this.processMessage(v.getMessage());
|
|
20313
20349
|
break;
|
|
20314
20350
|
case o.Response.TypeCase.TRAILERS:
|
|
20315
|
-
this.processTrailers(
|
|
20351
|
+
this.processTrailers(v.getTrailers());
|
|
20316
20352
|
break;
|
|
20317
20353
|
default:
|
|
20318
|
-
console.error("unknown response type",
|
|
20354
|
+
console.error("unknown response type", v.getTypeCase());
|
|
20319
20355
|
}
|
|
20320
|
-
} }), Object.defineProperty(
|
|
20321
|
-
this.headersReceived = !0, this.opts.onHeaders(c(
|
|
20322
|
-
} }), Object.defineProperty(
|
|
20323
|
-
var y = d.prototype.processPacketMessage.call(this,
|
|
20356
|
+
} }), Object.defineProperty(m.prototype, "processHeaders", { enumerable: !1, configurable: !0, writable: !0, value: function(v) {
|
|
20357
|
+
this.headersReceived = !0, this.opts.onHeaders(c(v.getMetadata()), 200);
|
|
20358
|
+
} }), Object.defineProperty(m.prototype, "processMessage", { enumerable: !1, configurable: !0, writable: !0, value: function(v) {
|
|
20359
|
+
var y = d.prototype.processPacketMessage.call(this, v.getPacketMessage());
|
|
20324
20360
|
if (y) {
|
|
20325
20361
|
var f = new ArrayBuffer(y.length + 5);
|
|
20326
20362
|
new DataView(f, 1, 4).setUint32(0, y.length, !1), new Uint8Array(f, 5).set(y), this.opts.onChunk(new Uint8Array(f));
|
|
20327
20363
|
}
|
|
20328
|
-
} }), Object.defineProperty(
|
|
20364
|
+
} }), Object.defineProperty(m.prototype, "processTrailers", { enumerable: !1, configurable: !0, writable: !0, value: function(v) {
|
|
20329
20365
|
this.trailersReceived = !0;
|
|
20330
|
-
var y, f, b = c(
|
|
20366
|
+
var y, f, b = c(v.getMetadata()), h = v.getStatus();
|
|
20331
20367
|
h ? (y = h.getCode(), f = h.getMessage(), b.set("grpc-status", "".concat(h.getCode())), f !== void 0 && b.set("grpc-message", h.getMessage())) : (y = 0, b.set("grpc-status", "0"), f = "");
|
|
20332
20368
|
var R = function(P) {
|
|
20333
20369
|
var D = "";
|
|
20334
|
-
return P.forEach(function(
|
|
20335
|
-
D += "".concat(
|
|
20370
|
+
return P.forEach(function(I, z) {
|
|
20371
|
+
D += "".concat(I, ": ").concat(z.join(", "), `\r
|
|
20336
20372
|
`);
|
|
20337
20373
|
}), i(D);
|
|
20338
|
-
}(b),
|
|
20339
|
-
new DataView(
|
|
20340
|
-
} }),
|
|
20374
|
+
}(b), _ = new ArrayBuffer(R.length + 5);
|
|
20375
|
+
new DataView(_, 0, 1).setUint8(0, 128), new DataView(_, 1, 4).setUint32(0, R.length, !1), new Uint8Array(_, 5).set(R), this.opts.onChunk(new Uint8Array(_)), y !== 0 ? this.closeWithRecvError(new p.GRPCError(y, f)) : this.closeWithRecvError();
|
|
20376
|
+
} }), m;
|
|
20341
20377
|
}(g.BaseStream);
|
|
20342
20378
|
function i(d) {
|
|
20343
|
-
for (var
|
|
20379
|
+
for (var m, v, y = new Uint8Array(d.length), f = 0; f !== d.length; ++f) {
|
|
20344
20380
|
var b = d.charCodeAt(f);
|
|
20345
|
-
if (!((
|
|
20381
|
+
if (!((m = v = b) === 9 || m === 10 || m === 13 || v >= 32 && v <= 126))
|
|
20346
20382
|
throw new Error("Metadata contains invalid ASCII");
|
|
20347
20383
|
y[f] = b;
|
|
20348
20384
|
}
|
|
@@ -20351,67 +20387,67 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
20351
20387
|
e.ClientStream = r, e.encodeASCII = i;
|
|
20352
20388
|
var l = function(d) {
|
|
20353
20389
|
if (d) {
|
|
20354
|
-
var
|
|
20390
|
+
var m = new o.Metadata(), v = m.getMdMap();
|
|
20355
20391
|
if (d.forEach(function(y, f) {
|
|
20356
20392
|
var b = new o.Strings();
|
|
20357
|
-
b.setValuesList(f),
|
|
20358
|
-
}),
|
|
20359
|
-
return
|
|
20393
|
+
b.setValuesList(f), v.set(y, b);
|
|
20394
|
+
}), m.getMdMap().getLength() !== 0)
|
|
20395
|
+
return m;
|
|
20360
20396
|
}
|
|
20361
20397
|
}, c = function(d) {
|
|
20362
|
-
var
|
|
20363
|
-
return d && d.getMdMap().forEach(function(
|
|
20364
|
-
return
|
|
20365
|
-
}),
|
|
20398
|
+
var m = new u.grpc.Metadata();
|
|
20399
|
+
return d && d.getMdMap().forEach(function(v, y) {
|
|
20400
|
+
return m.append(y, v.getValuesList());
|
|
20401
|
+
}), m;
|
|
20366
20402
|
};
|
|
20367
20403
|
}, 512: (t, e, s) => {
|
|
20368
20404
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.dialWebRTC = e.dialDirect = void 0;
|
|
20369
|
-
var n = s(655), u = s(37), g = s(138), p = s(758), o = s(743), r = s(34), i = s(165), l = s(400), c = s(982), d = s(958),
|
|
20370
|
-
function
|
|
20405
|
+
var n = s(655), u = s(37), g = s(138), p = s(758), o = s(743), r = s(34), i = s(165), l = s(400), c = s(982), d = s(958), m = s(93);
|
|
20406
|
+
function v(h, R) {
|
|
20371
20407
|
return n.__awaiter(this, void 0, void 0, function() {
|
|
20372
|
-
var
|
|
20408
|
+
var _, P;
|
|
20373
20409
|
return n.__generator(this, function(D) {
|
|
20374
|
-
return b(R),
|
|
20375
|
-
return u.grpc.CrossBrowserHttpTransport({ withCredentials: !1 })(
|
|
20376
|
-
}, !R?.accessToken || R?.externalAuthAddress && R?.externalAuthToEntity ? R && (R?.credentials || R?.accessToken) ? [2, y(h,
|
|
20377
|
-
return new f(
|
|
20410
|
+
return b(R), _ = function(I) {
|
|
20411
|
+
return u.grpc.CrossBrowserHttpTransport({ withCredentials: !1 })(I);
|
|
20412
|
+
}, !R?.accessToken || R?.externalAuthAddress && R?.externalAuthToEntity ? R && (R?.credentials || R?.accessToken) ? [2, y(h, _, R)] : [2, _] : ((P = new u.grpc.Metadata()).set("authorization", "Bearer ".concat(R.accessToken)), [2, function(I) {
|
|
20413
|
+
return new f(I, _, P);
|
|
20378
20414
|
}]);
|
|
20379
20415
|
});
|
|
20380
20416
|
});
|
|
20381
20417
|
}
|
|
20382
|
-
function y(h, R,
|
|
20418
|
+
function y(h, R, _) {
|
|
20383
20419
|
return n.__awaiter(this, void 0, void 0, function() {
|
|
20384
|
-
var P, D,
|
|
20420
|
+
var P, D, I, z = this;
|
|
20385
20421
|
return n.__generator(this, function(x) {
|
|
20386
20422
|
switch (x.label) {
|
|
20387
20423
|
case 0:
|
|
20388
20424
|
return P = "", D = function() {
|
|
20389
20425
|
return n.__awaiter(z, void 0, void 0, function() {
|
|
20390
|
-
var
|
|
20391
|
-
return n.__generator(this, function(
|
|
20392
|
-
switch (
|
|
20426
|
+
var q, k, W, X, S, M, O, E, F, w;
|
|
20427
|
+
return n.__generator(this, function(T) {
|
|
20428
|
+
switch (T.label) {
|
|
20393
20429
|
case 0:
|
|
20394
|
-
return P != "" ? [3, 5] : (
|
|
20430
|
+
return P != "" ? [3, 5] : (q = "", _.accessToken && _.accessToken !== "" ? [3, 2] : ((O = new i.AuthenticateRequest()).setEntity(_.authEntity ? _.authEntity : h.replace(/^(.*:\/\/)/, "")), (X = new i.Credentials()).setType((F = _.credentials) === null || F === void 0 ? void 0 : F.type), X.setPayload((w = _.credentials) === null || w === void 0 ? void 0 : w.payload), O.setCredentials(X), M = new Promise(function(C, j) {
|
|
20395
20431
|
k = C, W = j;
|
|
20396
|
-
}), u.grpc.invoke(l.AuthService.Authenticate, { request:
|
|
20397
|
-
|
|
20398
|
-
}, onEnd: function(C, j,
|
|
20432
|
+
}), u.grpc.invoke(l.AuthService.Authenticate, { request: O, host: _.externalAuthAddress ? _.externalAuthAddress : h, transport: R, onMessage: function(C) {
|
|
20433
|
+
q = C.getAccessToken();
|
|
20434
|
+
}, onEnd: function(C, j, G) {
|
|
20399
20435
|
C == u.grpc.Code.OK ? k(E) : W(j);
|
|
20400
20436
|
} }), [4, M]));
|
|
20401
20437
|
case 1:
|
|
20402
|
-
return
|
|
20438
|
+
return T.sent(), [3, 3];
|
|
20403
20439
|
case 2:
|
|
20404
|
-
|
|
20440
|
+
q = _.accessToken, T.label = 3;
|
|
20405
20441
|
case 3:
|
|
20406
|
-
return P =
|
|
20442
|
+
return P = q, _.externalAuthAddress && _.externalAuthToEntity ? ((S = new u.grpc.Metadata()).set("authorization", "Bearer ".concat(P)), M = new Promise(function(C, j) {
|
|
20407
20443
|
k = C, W = j;
|
|
20408
|
-
}),
|
|
20409
|
-
|
|
20410
|
-
}, onEnd: function(C, j,
|
|
20444
|
+
}), q = "", (O = new i.AuthenticateToRequest()).setEntity(_.externalAuthToEntity), u.grpc.invoke(l.ExternalAuthService.AuthenticateTo, { request: O, host: _.externalAuthAddress, transport: R, metadata: S, onMessage: function(C) {
|
|
20445
|
+
q = C.getAccessToken();
|
|
20446
|
+
}, onEnd: function(C, j, G) {
|
|
20411
20447
|
C == u.grpc.Code.OK ? k(S) : W(j);
|
|
20412
20448
|
} }), [4, M]) : [3, 5];
|
|
20413
20449
|
case 4:
|
|
20414
|
-
|
|
20450
|
+
T.sent(), P = q, T.label = 5;
|
|
20415
20451
|
case 5:
|
|
20416
20452
|
return (E = new u.grpc.Metadata()).set("authorization", "Bearer ".concat(P)), [2, E];
|
|
20417
20453
|
}
|
|
@@ -20419,21 +20455,21 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
20419
20455
|
});
|
|
20420
20456
|
}, [4, D()];
|
|
20421
20457
|
case 1:
|
|
20422
|
-
return
|
|
20423
|
-
return new f(
|
|
20458
|
+
return I = x.sent(), [2, function(q) {
|
|
20459
|
+
return new f(q, R, I);
|
|
20424
20460
|
}];
|
|
20425
20461
|
}
|
|
20426
20462
|
});
|
|
20427
20463
|
});
|
|
20428
20464
|
}
|
|
20429
|
-
e.dialDirect =
|
|
20465
|
+
e.dialDirect = v;
|
|
20430
20466
|
var f = function() {
|
|
20431
|
-
function h(R,
|
|
20432
|
-
Object.defineProperty(this, "opts", { enumerable: !0, configurable: !0, writable: !0, value: void 0 }), Object.defineProperty(this, "transport", { enumerable: !0, configurable: !0, writable: !0, value: void 0 }), Object.defineProperty(this, "extraMetadata", { enumerable: !0, configurable: !0, writable: !0, value: void 0 }), this.opts = R, this.extraMetadata = P, this.transport =
|
|
20467
|
+
function h(R, _, P) {
|
|
20468
|
+
Object.defineProperty(this, "opts", { enumerable: !0, configurable: !0, writable: !0, value: void 0 }), Object.defineProperty(this, "transport", { enumerable: !0, configurable: !0, writable: !0, value: void 0 }), Object.defineProperty(this, "extraMetadata", { enumerable: !0, configurable: !0, writable: !0, value: void 0 }), this.opts = R, this.extraMetadata = P, this.transport = _(R);
|
|
20433
20469
|
}
|
|
20434
20470
|
return Object.defineProperty(h.prototype, "start", { enumerable: !1, configurable: !0, writable: !0, value: function(R) {
|
|
20435
|
-
this.extraMetadata.forEach(function(
|
|
20436
|
-
R.set(
|
|
20471
|
+
this.extraMetadata.forEach(function(_, P) {
|
|
20472
|
+
R.set(_, P);
|
|
20437
20473
|
}), this.transport.start(R);
|
|
20438
20474
|
} }), Object.defineProperty(h.prototype, "sendMessage", { enumerable: !1, configurable: !0, writable: !0, value: function(R) {
|
|
20439
20475
|
this.transport.sendMessage(R);
|
|
@@ -20468,44 +20504,44 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
20468
20504
|
}
|
|
20469
20505
|
}
|
|
20470
20506
|
}
|
|
20471
|
-
e.dialWebRTC = function(h, R,
|
|
20472
|
-
var P, D,
|
|
20507
|
+
e.dialWebRTC = function(h, R, _) {
|
|
20508
|
+
var P, D, I, z, x, q, k;
|
|
20473
20509
|
return n.__awaiter(this, void 0, void 0, function() {
|
|
20474
|
-
var W, X, S, M,
|
|
20510
|
+
var W, X, S, M, O, E, F, w, T, C, j, G, B, N, H, Z, ee, re, se, ie, pe, ne, ue, ae, ge = this;
|
|
20475
20511
|
return n.__generator(this, function(J) {
|
|
20476
20512
|
switch (J.label) {
|
|
20477
20513
|
case 0:
|
|
20478
|
-
return b(
|
|
20514
|
+
return b(_), W = _?.webrtcOptions, [4, (0, m.newPeerConnectionForClient)(W !== void 0 && W.disableTrickleICE, W?.rtcConfig)];
|
|
20479
20515
|
case 1:
|
|
20480
|
-
X = J.sent(), S = X.pc, M = X.dc,
|
|
20516
|
+
X = J.sent(), S = X.pc, M = X.dc, O = !1, J.label = 2;
|
|
20481
20517
|
case 2:
|
|
20482
|
-
return J.trys.push([2, , 9, 10]), E =
|
|
20518
|
+
return J.trys.push([2, , 9, 10]), E = _, _ && (E = n.__assign({}, _), _.accessToken || (E.authEntity = (P = _?.webrtcOptions) === null || P === void 0 ? void 0 : P.signalingAuthEntity, E.authEntity || (E.externalAuthAddress ? E.authEntity = (D = _.externalAuthAddress) === null || D === void 0 ? void 0 : D.replace(/^(.*:\/\/)/, "") : E.authEntity = h.replace(/^(.*:\/\/)/, "")), E.credentials = (I = _?.webrtcOptions) === null || I === void 0 ? void 0 : I.signalingCredentials, E.accessToken = (z = _?.webrtcOptions) === null || z === void 0 ? void 0 : z.signalingAccessToken), E.externalAuthAddress = (x = _?.webrtcOptions) === null || x === void 0 ? void 0 : x.signalingExternalAuthAddress, E.externalAuthToEntity = (q = _?.webrtcOptions) === null || q === void 0 ? void 0 : q.signalingExternalAuthToEntity), [4, v(h, E)];
|
|
20483
20519
|
case 3:
|
|
20484
|
-
return F = J.sent(),
|
|
20520
|
+
return F = J.sent(), w = u.grpc.client(d.SignalingService.Call, { host: h, transport: F }), T = "", C = !1, j = function(L) {
|
|
20485
20521
|
if (!C) {
|
|
20486
20522
|
C = !0;
|
|
20487
20523
|
var A = new c.CallUpdateRequest();
|
|
20488
|
-
A.setUuid(
|
|
20524
|
+
A.setUuid(T);
|
|
20489
20525
|
var V = new r.Status();
|
|
20490
|
-
V.setCode(o.Code.UNKNOWN), V.setMessage(
|
|
20526
|
+
V.setCode(o.Code.UNKNOWN), V.setMessage(L), A.setError(V), u.grpc.unary(d.SignalingService.CallUpdate, { request: A, metadata: { "rpc-host": R }, host: h, transport: F, onEnd: function($) {
|
|
20491
20527
|
var U = $.status, Y = $.statusMessage, Q = $.message;
|
|
20492
20528
|
U === u.grpc.Code.OK && Q || console.error(Y);
|
|
20493
20529
|
} });
|
|
20494
20530
|
}
|
|
20495
|
-
},
|
|
20531
|
+
}, G = function() {
|
|
20496
20532
|
if (!C) {
|
|
20497
20533
|
C = !0;
|
|
20498
|
-
var
|
|
20499
|
-
|
|
20534
|
+
var L = new c.CallUpdateRequest();
|
|
20535
|
+
L.setUuid(T), L.setDone(!0), u.grpc.unary(d.SignalingService.CallUpdate, { request: L, metadata: { "rpc-host": R }, host: h, transport: F, onEnd: function(A) {
|
|
20500
20536
|
var V = A.status, $ = A.statusMessage, U = A.message;
|
|
20501
20537
|
V === u.grpc.Code.OK && U || console.error($);
|
|
20502
20538
|
} });
|
|
20503
20539
|
}
|
|
20504
|
-
}, N = new Promise(function(
|
|
20505
|
-
B =
|
|
20540
|
+
}, N = new Promise(function(L) {
|
|
20541
|
+
B = L;
|
|
20506
20542
|
}), H = !1, W?.disableTrickleICE ? [3, 6] : [4, S.createOffer()];
|
|
20507
20543
|
case 4:
|
|
20508
|
-
return Z = J.sent(), ee = !1, S.onicecandidate = function(
|
|
20544
|
+
return Z = J.sent(), ee = !1, S.onicecandidate = function(L) {
|
|
20509
20545
|
return n.__awaiter(ge, void 0, void 0, function() {
|
|
20510
20546
|
var A, V;
|
|
20511
20547
|
return n.__generator(this, function($) {
|
|
@@ -20513,7 +20549,7 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
20513
20549
|
case 0:
|
|
20514
20550
|
return [4, N];
|
|
20515
20551
|
case 1:
|
|
20516
|
-
return $.sent(), H ? [2] :
|
|
20552
|
+
return $.sent(), H ? [2] : L.candidate === null ? (ee = !0, G(), [2]) : (U = L.candidate, (Y = new c.ICECandidate()).setCandidate(U.candidate), U.sdpMid && Y.setSdpMid(U.sdpMid), U.sdpMLineIndex && Y.setSdpmLineIndex(U.sdpMLineIndex), U.usernameFragment && Y.setUsernameFragment(U.usernameFragment), A = Y, (V = new c.CallUpdateRequest()).setUuid(T), V.setCandidate(A), u.grpc.unary(d.SignalingService.CallUpdate, { request: V, metadata: { "rpc-host": R }, host: h, transport: F, onEnd: function(Q) {
|
|
20517
20553
|
var te = Q.status, K = Q.statusMessage, oe = Q.message;
|
|
20518
20554
|
te === u.grpc.Code.OK && oe || H || ee || console.error("error sending candidate", K);
|
|
20519
20555
|
} }), [2]);
|
|
@@ -20525,20 +20561,20 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
20525
20561
|
case 5:
|
|
20526
20562
|
J.sent(), J.label = 6;
|
|
20527
20563
|
case 6:
|
|
20528
|
-
return re = !1,
|
|
20564
|
+
return re = !1, w.onMessage(function(L) {
|
|
20529
20565
|
return n.__awaiter(ge, void 0, void 0, function() {
|
|
20530
20566
|
var A, V, $, U, Y, Q;
|
|
20531
20567
|
return n.__generator(this, function(te) {
|
|
20532
20568
|
switch (te.label) {
|
|
20533
20569
|
case 0:
|
|
20534
|
-
return (A =
|
|
20570
|
+
return (A = L).hasInit() ? re ? (j("got init stage more than once"), [2]) : (V = A.getInit(), re = !0, T = A.getUuid(), $ = new RTCSessionDescription(JSON.parse(atob(V.getSdp()))), S.setRemoteDescription($), B(!0), W?.disableTrickleICE ? (H = !0, G(), [2]) : [3, 7]) : [3, 1];
|
|
20535
20571
|
case 1:
|
|
20536
20572
|
if (!A.hasUpdate())
|
|
20537
20573
|
return [3, 6];
|
|
20538
20574
|
if (!re)
|
|
20539
20575
|
return j("got update stage before init stage"), [2];
|
|
20540
|
-
if (A.getUuid() !==
|
|
20541
|
-
return j("uuid mismatch; have=".concat(A.getUuid(), " want=").concat(
|
|
20576
|
+
if (A.getUuid() !== T)
|
|
20577
|
+
return j("uuid mismatch; have=".concat(A.getUuid(), " want=").concat(T)), [2];
|
|
20542
20578
|
U = A.getUpdate(), K = U.getCandidate(), oe = { candidate: K.getCandidate() }, K.hasSdpMid() && (oe.sdpMid = K.getSdpMid()), K.hasSdpmLineIndex() && (oe.sdpMLineIndex = K.getSdpmLineIndex()), K.hasUsernameFragment() && (oe.usernameFragment = K.getUsernameFragment()), Y = oe, te.label = 2;
|
|
20543
20579
|
case 2:
|
|
20544
20580
|
return te.trys.push([2, 4, , 5]), [4, S.addIceCandidate(Y)];
|
|
@@ -20556,21 +20592,21 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
20556
20592
|
var K, oe;
|
|
20557
20593
|
});
|
|
20558
20594
|
});
|
|
20559
|
-
}), pe = new Promise(function(
|
|
20560
|
-
se =
|
|
20561
|
-
}),
|
|
20562
|
-
|
|
20563
|
-
}),
|
|
20595
|
+
}), pe = new Promise(function(L, A) {
|
|
20596
|
+
se = L, ie = A;
|
|
20597
|
+
}), w.onEnd(function(L, A, V) {
|
|
20598
|
+
L !== u.grpc.Code.OK ? A !== "Response closed without headers" ? (console.error(A), ie(A)) : ie(new p.ConnectionClosedError("failed to dial")) : se();
|
|
20599
|
+
}), w.start({ "rpc-host": R }), ne = new c.CallRequest(), ue = btoa(JSON.stringify(S.localDescription)), ne.setSdp(ue), W && W.disableTrickleICE && ne.setDisableTrickle(W.disableTrickleICE), w.send(ne), (ae = new g.ClientChannel(S, M)).ready.then(function() {
|
|
20564
20600
|
return se();
|
|
20565
|
-
}).catch(function(
|
|
20566
|
-
return ie(
|
|
20601
|
+
}).catch(function(L) {
|
|
20602
|
+
return ie(L);
|
|
20567
20603
|
}), [4, pe];
|
|
20568
20604
|
case 7:
|
|
20569
20605
|
return J.sent(), [4, ae.ready];
|
|
20570
20606
|
case 8:
|
|
20571
|
-
return J.sent(), H = !0,
|
|
20607
|
+
return J.sent(), H = !0, G(), _?.externalAuthAddress || (k = _?.credentials) === null || k === void 0 || k.type, O = !0, [2, { transportFactory: ae.transportFactory(), peerConnection: S }];
|
|
20572
20608
|
case 9:
|
|
20573
|
-
return
|
|
20609
|
+
return O || S.close(), [7];
|
|
20574
20610
|
case 10:
|
|
20575
20611
|
return [2];
|
|
20576
20612
|
}
|
|
@@ -20602,7 +20638,7 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
20602
20638
|
var n = s(655);
|
|
20603
20639
|
e.newPeerConnectionForClient = function(u, g) {
|
|
20604
20640
|
return n.__awaiter(this, void 0, void 0, function() {
|
|
20605
|
-
var p, o, r, i, l, c, d,
|
|
20641
|
+
var p, o, r, i, l, c, d, m, v = this;
|
|
20606
20642
|
return n.__generator(this, function(y) {
|
|
20607
20643
|
switch (y.label) {
|
|
20608
20644
|
case 0:
|
|
@@ -20611,7 +20647,7 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
20611
20647
|
}), (i = p.createDataChannel("data", { id: 0, negotiated: !0, ordered: !0 })).binaryType = "arraybuffer", (l = p.createDataChannel("negotiation", { id: 1, negotiated: !0, ordered: !0 })).binaryType = "arraybuffer", c = !1, l.onopen = function() {
|
|
20612
20648
|
c = !0;
|
|
20613
20649
|
}, l.onmessage = function(f) {
|
|
20614
|
-
return n.__awaiter(
|
|
20650
|
+
return n.__awaiter(v, void 0, void 0, function() {
|
|
20615
20651
|
var b, h;
|
|
20616
20652
|
return n.__generator(this, function(R) {
|
|
20617
20653
|
switch (R.label) {
|
|
@@ -20631,7 +20667,7 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
20631
20667
|
});
|
|
20632
20668
|
});
|
|
20633
20669
|
}, p.onnegotiationneeded = function() {
|
|
20634
|
-
return n.__awaiter(
|
|
20670
|
+
return n.__awaiter(v, void 0, void 0, function() {
|
|
20635
20671
|
var f;
|
|
20636
20672
|
return n.__generator(this, function(b) {
|
|
20637
20673
|
switch (b.label) {
|
|
@@ -20658,10 +20694,10 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
20658
20694
|
case 3:
|
|
20659
20695
|
return y.sent(), [3, 5];
|
|
20660
20696
|
case 4:
|
|
20661
|
-
return
|
|
20697
|
+
return m = y.sent(), [2, Promise.reject(m)];
|
|
20662
20698
|
case 5:
|
|
20663
20699
|
return p.onicecandidate = function(f) {
|
|
20664
|
-
return n.__awaiter(
|
|
20700
|
+
return n.__awaiter(v, void 0, void 0, function() {
|
|
20665
20701
|
return n.__generator(this, function(b) {
|
|
20666
20702
|
return f.candidate !== null || o({ pc: p, dc: i }), [2];
|
|
20667
20703
|
});
|
|
@@ -20672,102 +20708,102 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
20672
20708
|
});
|
|
20673
20709
|
};
|
|
20674
20710
|
}, 655: (t, e, s) => {
|
|
20675
|
-
s.r(e), s.d(e, { __assign: () => g, __asyncDelegator: () => P, __asyncGenerator: () =>
|
|
20711
|
+
s.r(e), s.d(e, { __assign: () => g, __asyncDelegator: () => P, __asyncGenerator: () => _, __asyncValues: () => D, __await: () => R, __awaiter: () => l, __classPrivateFieldGet: () => k, __classPrivateFieldIn: () => X, __classPrivateFieldSet: () => W, __createBinding: () => d, __decorate: () => o, __exportStar: () => m, __extends: () => u, __generator: () => c, __importDefault: () => q, __importStar: () => x, __makeTemplateObject: () => I, __metadata: () => i, __param: () => r, __read: () => y, __rest: () => p, __spread: () => f, __spreadArray: () => h, __spreadArrays: () => b, __values: () => v });
|
|
20676
20712
|
var n = function(S, M) {
|
|
20677
|
-
return n = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(
|
|
20678
|
-
|
|
20679
|
-
} || function(
|
|
20713
|
+
return n = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(O, E) {
|
|
20714
|
+
O.__proto__ = E;
|
|
20715
|
+
} || function(O, E) {
|
|
20680
20716
|
for (var F in E)
|
|
20681
|
-
Object.prototype.hasOwnProperty.call(E, F) && (
|
|
20717
|
+
Object.prototype.hasOwnProperty.call(E, F) && (O[F] = E[F]);
|
|
20682
20718
|
}, n(S, M);
|
|
20683
20719
|
};
|
|
20684
20720
|
function u(S, M) {
|
|
20685
20721
|
if (typeof M != "function" && M !== null)
|
|
20686
20722
|
throw new TypeError("Class extends value " + String(M) + " is not a constructor or null");
|
|
20687
|
-
function
|
|
20723
|
+
function O() {
|
|
20688
20724
|
this.constructor = S;
|
|
20689
20725
|
}
|
|
20690
|
-
n(S, M), S.prototype = M === null ? Object.create(M) : (
|
|
20726
|
+
n(S, M), S.prototype = M === null ? Object.create(M) : (O.prototype = M.prototype, new O());
|
|
20691
20727
|
}
|
|
20692
20728
|
var g = function() {
|
|
20693
20729
|
return g = Object.assign || function(S) {
|
|
20694
|
-
for (var M,
|
|
20695
|
-
for (var F in M = arguments[
|
|
20730
|
+
for (var M, O = 1, E = arguments.length; O < E; O++)
|
|
20731
|
+
for (var F in M = arguments[O])
|
|
20696
20732
|
Object.prototype.hasOwnProperty.call(M, F) && (S[F] = M[F]);
|
|
20697
20733
|
return S;
|
|
20698
20734
|
}, g.apply(this, arguments);
|
|
20699
20735
|
};
|
|
20700
20736
|
function p(S, M) {
|
|
20701
|
-
var
|
|
20737
|
+
var O = {};
|
|
20702
20738
|
for (var E in S)
|
|
20703
|
-
Object.prototype.hasOwnProperty.call(S, E) && M.indexOf(E) < 0 && (
|
|
20739
|
+
Object.prototype.hasOwnProperty.call(S, E) && M.indexOf(E) < 0 && (O[E] = S[E]);
|
|
20704
20740
|
if (S != null && typeof Object.getOwnPropertySymbols == "function") {
|
|
20705
20741
|
var F = 0;
|
|
20706
20742
|
for (E = Object.getOwnPropertySymbols(S); F < E.length; F++)
|
|
20707
|
-
M.indexOf(E[F]) < 0 && Object.prototype.propertyIsEnumerable.call(S, E[F]) && (
|
|
20743
|
+
M.indexOf(E[F]) < 0 && Object.prototype.propertyIsEnumerable.call(S, E[F]) && (O[E[F]] = S[E[F]]);
|
|
20708
20744
|
}
|
|
20709
|
-
return
|
|
20745
|
+
return O;
|
|
20710
20746
|
}
|
|
20711
|
-
function o(S, M,
|
|
20712
|
-
var F,
|
|
20747
|
+
function o(S, M, O, E) {
|
|
20748
|
+
var F, w = arguments.length, T = w < 3 ? M : E === null ? E = Object.getOwnPropertyDescriptor(M, O) : E;
|
|
20713
20749
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
20714
|
-
|
|
20750
|
+
T = Reflect.decorate(S, M, O, E);
|
|
20715
20751
|
else
|
|
20716
20752
|
for (var C = S.length - 1; C >= 0; C--)
|
|
20717
|
-
(F = S[C]) && (
|
|
20718
|
-
return
|
|
20753
|
+
(F = S[C]) && (T = (w < 3 ? F(T) : w > 3 ? F(M, O, T) : F(M, O)) || T);
|
|
20754
|
+
return w > 3 && T && Object.defineProperty(M, O, T), T;
|
|
20719
20755
|
}
|
|
20720
20756
|
function r(S, M) {
|
|
20721
|
-
return function(
|
|
20722
|
-
M(
|
|
20757
|
+
return function(O, E) {
|
|
20758
|
+
M(O, E, S);
|
|
20723
20759
|
};
|
|
20724
20760
|
}
|
|
20725
20761
|
function i(S, M) {
|
|
20726
20762
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
20727
20763
|
return Reflect.metadata(S, M);
|
|
20728
20764
|
}
|
|
20729
|
-
function l(S, M,
|
|
20730
|
-
return new (
|
|
20731
|
-
function
|
|
20765
|
+
function l(S, M, O, E) {
|
|
20766
|
+
return new (O || (O = Promise))(function(F, w) {
|
|
20767
|
+
function T(G) {
|
|
20732
20768
|
try {
|
|
20733
|
-
j(E.next(
|
|
20769
|
+
j(E.next(G));
|
|
20734
20770
|
} catch (B) {
|
|
20735
|
-
|
|
20771
|
+
w(B);
|
|
20736
20772
|
}
|
|
20737
20773
|
}
|
|
20738
|
-
function C(
|
|
20774
|
+
function C(G) {
|
|
20739
20775
|
try {
|
|
20740
|
-
j(E.throw(
|
|
20776
|
+
j(E.throw(G));
|
|
20741
20777
|
} catch (B) {
|
|
20742
|
-
|
|
20778
|
+
w(B);
|
|
20743
20779
|
}
|
|
20744
20780
|
}
|
|
20745
|
-
function j(
|
|
20781
|
+
function j(G) {
|
|
20746
20782
|
var B;
|
|
20747
|
-
|
|
20783
|
+
G.done ? F(G.value) : (B = G.value, B instanceof O ? B : new O(function(N) {
|
|
20748
20784
|
N(B);
|
|
20749
|
-
})).then(
|
|
20785
|
+
})).then(T, C);
|
|
20750
20786
|
}
|
|
20751
20787
|
j((E = E.apply(S, M || [])).next());
|
|
20752
20788
|
});
|
|
20753
20789
|
}
|
|
20754
20790
|
function c(S, M) {
|
|
20755
|
-
var
|
|
20791
|
+
var O, E, F, w, T = { label: 0, sent: function() {
|
|
20756
20792
|
if (1 & F[0])
|
|
20757
20793
|
throw F[1];
|
|
20758
20794
|
return F[1];
|
|
20759
20795
|
}, trys: [], ops: [] };
|
|
20760
|
-
return
|
|
20796
|
+
return w = { next: C(0), throw: C(1), return: C(2) }, typeof Symbol == "function" && (w[Symbol.iterator] = function() {
|
|
20761
20797
|
return this;
|
|
20762
|
-
}),
|
|
20798
|
+
}), w;
|
|
20763
20799
|
function C(j) {
|
|
20764
|
-
return function(
|
|
20800
|
+
return function(G) {
|
|
20765
20801
|
return function(B) {
|
|
20766
|
-
if (
|
|
20802
|
+
if (O)
|
|
20767
20803
|
throw new TypeError("Generator is already executing.");
|
|
20768
|
-
for (;
|
|
20804
|
+
for (; w && (w = 0, B[0] && (T = 0)), T; )
|
|
20769
20805
|
try {
|
|
20770
|
-
if (
|
|
20806
|
+
if (O = 1, E && (F = 2 & B[0] ? E.return : B[0] ? E.throw || ((F = E.return) && F.call(E), 0) : E.next) && !(F = F.call(E, B[1])).done)
|
|
20771
20807
|
return F;
|
|
20772
20808
|
switch (E = 0, F && (B = [2 & B[0], F.value]), B[0]) {
|
|
20773
20809
|
case 0:
|
|
@@ -20775,63 +20811,63 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
20775
20811
|
F = B;
|
|
20776
20812
|
break;
|
|
20777
20813
|
case 4:
|
|
20778
|
-
return
|
|
20814
|
+
return T.label++, { value: B[1], done: !1 };
|
|
20779
20815
|
case 5:
|
|
20780
|
-
|
|
20816
|
+
T.label++, E = B[1], B = [0];
|
|
20781
20817
|
continue;
|
|
20782
20818
|
case 7:
|
|
20783
|
-
B =
|
|
20819
|
+
B = T.ops.pop(), T.trys.pop();
|
|
20784
20820
|
continue;
|
|
20785
20821
|
default:
|
|
20786
|
-
if (!((F = (F =
|
|
20787
|
-
|
|
20822
|
+
if (!((F = (F = T.trys).length > 0 && F[F.length - 1]) || B[0] !== 6 && B[0] !== 2)) {
|
|
20823
|
+
T = 0;
|
|
20788
20824
|
continue;
|
|
20789
20825
|
}
|
|
20790
20826
|
if (B[0] === 3 && (!F || B[1] > F[0] && B[1] < F[3])) {
|
|
20791
|
-
|
|
20827
|
+
T.label = B[1];
|
|
20792
20828
|
break;
|
|
20793
20829
|
}
|
|
20794
|
-
if (B[0] === 6 &&
|
|
20795
|
-
|
|
20830
|
+
if (B[0] === 6 && T.label < F[1]) {
|
|
20831
|
+
T.label = F[1], F = B;
|
|
20796
20832
|
break;
|
|
20797
20833
|
}
|
|
20798
|
-
if (F &&
|
|
20799
|
-
|
|
20834
|
+
if (F && T.label < F[2]) {
|
|
20835
|
+
T.label = F[2], T.ops.push(B);
|
|
20800
20836
|
break;
|
|
20801
20837
|
}
|
|
20802
|
-
F[2] &&
|
|
20838
|
+
F[2] && T.ops.pop(), T.trys.pop();
|
|
20803
20839
|
continue;
|
|
20804
20840
|
}
|
|
20805
|
-
B = M.call(S,
|
|
20841
|
+
B = M.call(S, T);
|
|
20806
20842
|
} catch (N) {
|
|
20807
20843
|
B = [6, N], E = 0;
|
|
20808
20844
|
} finally {
|
|
20809
|
-
|
|
20845
|
+
O = F = 0;
|
|
20810
20846
|
}
|
|
20811
20847
|
if (5 & B[0])
|
|
20812
20848
|
throw B[1];
|
|
20813
20849
|
return { value: B[0] ? B[1] : void 0, done: !0 };
|
|
20814
|
-
}([j,
|
|
20850
|
+
}([j, G]);
|
|
20815
20851
|
};
|
|
20816
20852
|
}
|
|
20817
20853
|
}
|
|
20818
|
-
var d = Object.create ? function(S, M,
|
|
20819
|
-
E === void 0 && (E =
|
|
20820
|
-
var F = Object.getOwnPropertyDescriptor(M,
|
|
20854
|
+
var d = Object.create ? function(S, M, O, E) {
|
|
20855
|
+
E === void 0 && (E = O);
|
|
20856
|
+
var F = Object.getOwnPropertyDescriptor(M, O);
|
|
20821
20857
|
F && !("get" in F ? !M.__esModule : F.writable || F.configurable) || (F = { enumerable: !0, get: function() {
|
|
20822
|
-
return M[
|
|
20858
|
+
return M[O];
|
|
20823
20859
|
} }), Object.defineProperty(S, E, F);
|
|
20824
|
-
} : function(S, M,
|
|
20825
|
-
E === void 0 && (E =
|
|
20860
|
+
} : function(S, M, O, E) {
|
|
20861
|
+
E === void 0 && (E = O), S[E] = M[O];
|
|
20826
20862
|
};
|
|
20827
|
-
function
|
|
20828
|
-
for (var
|
|
20829
|
-
|
|
20863
|
+
function m(S, M) {
|
|
20864
|
+
for (var O in S)
|
|
20865
|
+
O === "default" || Object.prototype.hasOwnProperty.call(M, O) || d(M, S, O);
|
|
20830
20866
|
}
|
|
20831
|
-
function
|
|
20832
|
-
var M = typeof Symbol == "function" && Symbol.iterator,
|
|
20833
|
-
if (
|
|
20834
|
-
return
|
|
20867
|
+
function v(S) {
|
|
20868
|
+
var M = typeof Symbol == "function" && Symbol.iterator, O = M && S[M], E = 0;
|
|
20869
|
+
if (O)
|
|
20870
|
+
return O.call(S);
|
|
20835
20871
|
if (S && typeof S.length == "number")
|
|
20836
20872
|
return { next: function() {
|
|
20837
20873
|
return S && E >= S.length && (S = void 0), { value: S && S[E++], done: !S };
|
|
@@ -20839,24 +20875,24 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
20839
20875
|
throw new TypeError(M ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
20840
20876
|
}
|
|
20841
20877
|
function y(S, M) {
|
|
20842
|
-
var
|
|
20843
|
-
if (!
|
|
20878
|
+
var O = typeof Symbol == "function" && S[Symbol.iterator];
|
|
20879
|
+
if (!O)
|
|
20844
20880
|
return S;
|
|
20845
|
-
var E, F,
|
|
20881
|
+
var E, F, w = O.call(S), T = [];
|
|
20846
20882
|
try {
|
|
20847
|
-
for (; (M === void 0 || M-- > 0) && !(E =
|
|
20848
|
-
|
|
20883
|
+
for (; (M === void 0 || M-- > 0) && !(E = w.next()).done; )
|
|
20884
|
+
T.push(E.value);
|
|
20849
20885
|
} catch (C) {
|
|
20850
20886
|
F = { error: C };
|
|
20851
20887
|
} finally {
|
|
20852
20888
|
try {
|
|
20853
|
-
E && !E.done && (
|
|
20889
|
+
E && !E.done && (O = w.return) && O.call(w);
|
|
20854
20890
|
} finally {
|
|
20855
20891
|
if (F)
|
|
20856
20892
|
throw F.error;
|
|
20857
20893
|
}
|
|
20858
20894
|
}
|
|
20859
|
-
return
|
|
20895
|
+
return T;
|
|
20860
20896
|
}
|
|
20861
20897
|
function f() {
|
|
20862
20898
|
for (var S = [], M = 0; M < arguments.length; M++)
|
|
@@ -20864,88 +20900,88 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
20864
20900
|
return S;
|
|
20865
20901
|
}
|
|
20866
20902
|
function b() {
|
|
20867
|
-
for (var S = 0, M = 0,
|
|
20903
|
+
for (var S = 0, M = 0, O = arguments.length; M < O; M++)
|
|
20868
20904
|
S += arguments[M].length;
|
|
20869
20905
|
var E = Array(S), F = 0;
|
|
20870
|
-
for (M = 0; M <
|
|
20871
|
-
for (var
|
|
20872
|
-
E[F] = T
|
|
20906
|
+
for (M = 0; M < O; M++)
|
|
20907
|
+
for (var w = arguments[M], T = 0, C = w.length; T < C; T++, F++)
|
|
20908
|
+
E[F] = w[T];
|
|
20873
20909
|
return E;
|
|
20874
20910
|
}
|
|
20875
|
-
function h(S, M,
|
|
20876
|
-
if (
|
|
20877
|
-
for (var E, F = 0,
|
|
20911
|
+
function h(S, M, O) {
|
|
20912
|
+
if (O || arguments.length === 2)
|
|
20913
|
+
for (var E, F = 0, w = M.length; F < w; F++)
|
|
20878
20914
|
!E && F in M || (E || (E = Array.prototype.slice.call(M, 0, F)), E[F] = M[F]);
|
|
20879
20915
|
return S.concat(E || Array.prototype.slice.call(M));
|
|
20880
20916
|
}
|
|
20881
20917
|
function R(S) {
|
|
20882
20918
|
return this instanceof R ? (this.v = S, this) : new R(S);
|
|
20883
20919
|
}
|
|
20884
|
-
function
|
|
20920
|
+
function _(S, M, O) {
|
|
20885
20921
|
if (!Symbol.asyncIterator)
|
|
20886
20922
|
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
20887
|
-
var E, F =
|
|
20888
|
-
return E = {},
|
|
20923
|
+
var E, F = O.apply(S, M || []), w = [];
|
|
20924
|
+
return E = {}, T("next"), T("throw"), T("return"), E[Symbol.asyncIterator] = function() {
|
|
20889
20925
|
return this;
|
|
20890
20926
|
}, E;
|
|
20891
|
-
function
|
|
20927
|
+
function T(N) {
|
|
20892
20928
|
F[N] && (E[N] = function(H) {
|
|
20893
20929
|
return new Promise(function(Z, ee) {
|
|
20894
|
-
|
|
20930
|
+
w.push([N, H, Z, ee]) > 1 || C(N, H);
|
|
20895
20931
|
});
|
|
20896
20932
|
});
|
|
20897
20933
|
}
|
|
20898
20934
|
function C(N, H) {
|
|
20899
20935
|
try {
|
|
20900
|
-
(Z = F[N](H)).value instanceof R ? Promise.resolve(Z.value.v).then(j,
|
|
20936
|
+
(Z = F[N](H)).value instanceof R ? Promise.resolve(Z.value.v).then(j, G) : B(w[0][2], Z);
|
|
20901
20937
|
} catch (ee) {
|
|
20902
|
-
B(
|
|
20938
|
+
B(w[0][3], ee);
|
|
20903
20939
|
}
|
|
20904
20940
|
var Z;
|
|
20905
20941
|
}
|
|
20906
20942
|
function j(N) {
|
|
20907
20943
|
C("next", N);
|
|
20908
20944
|
}
|
|
20909
|
-
function
|
|
20945
|
+
function G(N) {
|
|
20910
20946
|
C("throw", N);
|
|
20911
20947
|
}
|
|
20912
20948
|
function B(N, H) {
|
|
20913
|
-
N(H),
|
|
20949
|
+
N(H), w.shift(), w.length && C(w[0][0], w[0][1]);
|
|
20914
20950
|
}
|
|
20915
20951
|
}
|
|
20916
20952
|
function P(S) {
|
|
20917
|
-
var M,
|
|
20953
|
+
var M, O;
|
|
20918
20954
|
return M = {}, E("next"), E("throw", function(F) {
|
|
20919
20955
|
throw F;
|
|
20920
20956
|
}), E("return"), M[Symbol.iterator] = function() {
|
|
20921
20957
|
return this;
|
|
20922
20958
|
}, M;
|
|
20923
|
-
function E(F,
|
|
20924
|
-
M[F] = S[F] ? function(
|
|
20925
|
-
return (
|
|
20926
|
-
} :
|
|
20959
|
+
function E(F, w) {
|
|
20960
|
+
M[F] = S[F] ? function(T) {
|
|
20961
|
+
return (O = !O) ? { value: R(S[F](T)), done: F === "return" } : w ? w(T) : T;
|
|
20962
|
+
} : w;
|
|
20927
20963
|
}
|
|
20928
20964
|
}
|
|
20929
20965
|
function D(S) {
|
|
20930
20966
|
if (!Symbol.asyncIterator)
|
|
20931
20967
|
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
20932
|
-
var M,
|
|
20933
|
-
return
|
|
20968
|
+
var M, O = S[Symbol.asyncIterator];
|
|
20969
|
+
return O ? O.call(S) : (S = v(S), M = {}, E("next"), E("throw"), E("return"), M[Symbol.asyncIterator] = function() {
|
|
20934
20970
|
return this;
|
|
20935
20971
|
}, M);
|
|
20936
20972
|
function E(F) {
|
|
20937
|
-
M[F] = S[F] && function(
|
|
20938
|
-
return new Promise(function(
|
|
20939
|
-
(function(j,
|
|
20973
|
+
M[F] = S[F] && function(w) {
|
|
20974
|
+
return new Promise(function(T, C) {
|
|
20975
|
+
(function(j, G, B, N) {
|
|
20940
20976
|
Promise.resolve(N).then(function(H) {
|
|
20941
20977
|
j({ value: H, done: B });
|
|
20942
|
-
},
|
|
20943
|
-
})(
|
|
20978
|
+
}, G);
|
|
20979
|
+
})(T, C, (w = S[F](w)).done, w.value);
|
|
20944
20980
|
});
|
|
20945
20981
|
};
|
|
20946
20982
|
}
|
|
20947
20983
|
}
|
|
20948
|
-
function
|
|
20984
|
+
function I(S, M) {
|
|
20949
20985
|
return Object.defineProperty ? Object.defineProperty(S, "raw", { value: M }) : S.raw = M, S;
|
|
20950
20986
|
}
|
|
20951
20987
|
var z = Object.create ? function(S, M) {
|
|
@@ -20958,28 +20994,28 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
20958
20994
|
return S;
|
|
20959
20995
|
var M = {};
|
|
20960
20996
|
if (S != null)
|
|
20961
|
-
for (var
|
|
20962
|
-
|
|
20997
|
+
for (var O in S)
|
|
20998
|
+
O !== "default" && Object.prototype.hasOwnProperty.call(S, O) && d(M, S, O);
|
|
20963
20999
|
return z(M, S), M;
|
|
20964
21000
|
}
|
|
20965
|
-
function
|
|
21001
|
+
function q(S) {
|
|
20966
21002
|
return S && S.__esModule ? S : { default: S };
|
|
20967
21003
|
}
|
|
20968
|
-
function k(S, M,
|
|
20969
|
-
if (
|
|
21004
|
+
function k(S, M, O, E) {
|
|
21005
|
+
if (O === "a" && !E)
|
|
20970
21006
|
throw new TypeError("Private accessor was defined without a getter");
|
|
20971
21007
|
if (typeof M == "function" ? S !== M || !E : !M.has(S))
|
|
20972
21008
|
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
20973
|
-
return
|
|
21009
|
+
return O === "m" ? E : O === "a" ? E.call(S) : E ? E.value : M.get(S);
|
|
20974
21010
|
}
|
|
20975
|
-
function W(S, M,
|
|
21011
|
+
function W(S, M, O, E, F) {
|
|
20976
21012
|
if (E === "m")
|
|
20977
21013
|
throw new TypeError("Private method is not writable");
|
|
20978
21014
|
if (E === "a" && !F)
|
|
20979
21015
|
throw new TypeError("Private accessor was defined without a setter");
|
|
20980
21016
|
if (typeof M == "function" ? S !== M || !F : !M.has(S))
|
|
20981
21017
|
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
20982
|
-
return E === "a" ? F.call(S,
|
|
21018
|
+
return E === "a" ? F.call(S, O) : F ? F.value = O : M.set(S, O), O;
|
|
20983
21019
|
}
|
|
20984
21020
|
function X(S, M) {
|
|
20985
21021
|
if (M === null || typeof M != "object" && typeof M != "function")
|
|
@@ -21441,13 +21477,13 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
21441
21477
|
}
|
|
21442
21478
|
g.Authenticate = { methodName: "Authenticate", service: g, requestStream: !1, responseStream: !1, requestType: n.AuthenticateRequest, responseType: n.AuthenticateResponse }, e.AuthService = g, p.prototype.authenticate = function(i, l, c) {
|
|
21443
21479
|
arguments.length === 2 && (c = arguments[1]);
|
|
21444
|
-
var d = u.unary(g.Authenticate, { request: i, host: this.serviceHost, metadata: l, transport: this.options.transport, debug: this.options.debug, onEnd: function(
|
|
21480
|
+
var d = u.unary(g.Authenticate, { request: i, host: this.serviceHost, metadata: l, transport: this.options.transport, debug: this.options.debug, onEnd: function(m) {
|
|
21445
21481
|
if (c)
|
|
21446
|
-
if (
|
|
21447
|
-
var
|
|
21448
|
-
|
|
21482
|
+
if (m.status !== u.Code.OK) {
|
|
21483
|
+
var v = new Error(m.statusMessage);
|
|
21484
|
+
v.code = m.status, v.metadata = m.trailers, c(v, null);
|
|
21449
21485
|
} else
|
|
21450
|
-
c(null,
|
|
21486
|
+
c(null, m.message);
|
|
21451
21487
|
} });
|
|
21452
21488
|
return { cancel: function() {
|
|
21453
21489
|
c = null, d.close();
|
|
@@ -21463,13 +21499,13 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
21463
21499
|
}
|
|
21464
21500
|
o.AuthenticateTo = { methodName: "AuthenticateTo", service: o, requestStream: !1, responseStream: !1, requestType: n.AuthenticateToRequest, responseType: n.AuthenticateToResponse }, e.ExternalAuthService = o, r.prototype.authenticateTo = function(i, l, c) {
|
|
21465
21501
|
arguments.length === 2 && (c = arguments[1]);
|
|
21466
|
-
var d = u.unary(o.AuthenticateTo, { request: i, host: this.serviceHost, metadata: l, transport: this.options.transport, debug: this.options.debug, onEnd: function(
|
|
21502
|
+
var d = u.unary(o.AuthenticateTo, { request: i, host: this.serviceHost, metadata: l, transport: this.options.transport, debug: this.options.debug, onEnd: function(m) {
|
|
21467
21503
|
if (c)
|
|
21468
|
-
if (
|
|
21469
|
-
var
|
|
21470
|
-
|
|
21504
|
+
if (m.status !== u.Code.OK) {
|
|
21505
|
+
var v = new Error(m.statusMessage);
|
|
21506
|
+
v.code = m.status, v.metadata = m.trailers, c(v, null);
|
|
21471
21507
|
} else
|
|
21472
|
-
c(null,
|
|
21508
|
+
c(null, m.message);
|
|
21473
21509
|
} });
|
|
21474
21510
|
return { cancel: function() {
|
|
21475
21511
|
c = null, d.close();
|
|
@@ -22830,11 +22866,11 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
22830
22866
|
i.data.forEach(function(d) {
|
|
22831
22867
|
d(c);
|
|
22832
22868
|
});
|
|
22833
|
-
}, onEnd: function(c, d,
|
|
22834
|
-
i.status.forEach(function(
|
|
22835
|
-
|
|
22836
|
-
}), i.end.forEach(function(
|
|
22837
|
-
|
|
22869
|
+
}, onEnd: function(c, d, m) {
|
|
22870
|
+
i.status.forEach(function(v) {
|
|
22871
|
+
v({ code: c, details: d, metadata: m });
|
|
22872
|
+
}), i.end.forEach(function(v) {
|
|
22873
|
+
v({ code: c, details: d, metadata: m });
|
|
22838
22874
|
}), i = null;
|
|
22839
22875
|
} });
|
|
22840
22876
|
return { on: function(c, d) {
|
|
@@ -22858,10 +22894,10 @@ var __webpack_modules__ = { 37: function(t) {
|
|
|
22858
22894
|
}, p.prototype.answer = function(o) {
|
|
22859
22895
|
var r = { data: [], end: [], status: [] }, i = u.client(g.Answer, { host: this.serviceHost, metadata: o, transport: this.options.transport });
|
|
22860
22896
|
return i.onEnd(function(l, c, d) {
|
|
22861
|
-
r.status.forEach(function(
|
|
22862
|
-
|
|
22863
|
-
}), r.end.forEach(function(
|
|
22864
|
-
|
|
22897
|
+
r.status.forEach(function(m) {
|
|
22898
|
+
m({ code: l, details: c, metadata: d });
|
|
22899
|
+
}), r.end.forEach(function(m) {
|
|
22900
|
+
m({ code: l, details: c, metadata: d });
|
|
22865
22901
|
}), r = null;
|
|
22866
22902
|
}), i.onMessage(function(l) {
|
|
22867
22903
|
r.data.forEach(function(c) {
|
|
@@ -23698,7 +23734,7 @@ var __webpack_exports__dialDirect = __webpack_exports__.ry, __webpack_exports__d
|
|
|
23698
23734
|
return e.Message.setProto3BooleanField(this, 1, o);
|
|
23699
23735
|
}, s.object.extend(t, proto.viam.component.arm.v1);
|
|
23700
23736
|
})(arm_pb);
|
|
23701
|
-
var component_arm_v1_arm_pb = arm_pb, common_v1_common_pb$
|
|
23737
|
+
var component_arm_v1_arm_pb = arm_pb, common_v1_common_pb$i = common_pb, grpc$j = grpcWebClient_umdExports.grpc, ArmService = function() {
|
|
23702
23738
|
function t() {
|
|
23703
23739
|
}
|
|
23704
23740
|
return t.serviceName = "viam.component.arm.v1.ArmService", t;
|
|
@@ -23756,15 +23792,15 @@ ArmService.DoCommand = {
|
|
|
23756
23792
|
service: ArmService,
|
|
23757
23793
|
requestStream: !1,
|
|
23758
23794
|
responseStream: !1,
|
|
23759
|
-
requestType: common_v1_common_pb$
|
|
23760
|
-
responseType: common_v1_common_pb$
|
|
23795
|
+
requestType: common_v1_common_pb$i.DoCommandRequest,
|
|
23796
|
+
responseType: common_v1_common_pb$i.DoCommandResponse
|
|
23761
23797
|
};
|
|
23762
23798
|
function ArmServiceClient(t, e) {
|
|
23763
23799
|
this.serviceHost = t, this.options = e || {};
|
|
23764
23800
|
}
|
|
23765
23801
|
ArmServiceClient.prototype.getEndPosition = function t(e, s, n) {
|
|
23766
23802
|
arguments.length === 2 && (n = arguments[1]);
|
|
23767
|
-
var u = grpc$
|
|
23803
|
+
var u = grpc$j.unary(ArmService.GetEndPosition, {
|
|
23768
23804
|
request: e,
|
|
23769
23805
|
host: this.serviceHost,
|
|
23770
23806
|
metadata: s,
|
|
@@ -23772,7 +23808,7 @@ ArmServiceClient.prototype.getEndPosition = function t(e, s, n) {
|
|
|
23772
23808
|
debug: this.options.debug,
|
|
23773
23809
|
onEnd: function(g) {
|
|
23774
23810
|
if (n)
|
|
23775
|
-
if (g.status !== grpc$
|
|
23811
|
+
if (g.status !== grpc$j.Code.OK) {
|
|
23776
23812
|
var p = new Error(g.statusMessage);
|
|
23777
23813
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
23778
23814
|
} else
|
|
@@ -23787,7 +23823,7 @@ ArmServiceClient.prototype.getEndPosition = function t(e, s, n) {
|
|
|
23787
23823
|
};
|
|
23788
23824
|
ArmServiceClient.prototype.moveToPosition = function t(e, s, n) {
|
|
23789
23825
|
arguments.length === 2 && (n = arguments[1]);
|
|
23790
|
-
var u = grpc$
|
|
23826
|
+
var u = grpc$j.unary(ArmService.MoveToPosition, {
|
|
23791
23827
|
request: e,
|
|
23792
23828
|
host: this.serviceHost,
|
|
23793
23829
|
metadata: s,
|
|
@@ -23795,7 +23831,7 @@ ArmServiceClient.prototype.moveToPosition = function t(e, s, n) {
|
|
|
23795
23831
|
debug: this.options.debug,
|
|
23796
23832
|
onEnd: function(g) {
|
|
23797
23833
|
if (n)
|
|
23798
|
-
if (g.status !== grpc$
|
|
23834
|
+
if (g.status !== grpc$j.Code.OK) {
|
|
23799
23835
|
var p = new Error(g.statusMessage);
|
|
23800
23836
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
23801
23837
|
} else
|
|
@@ -23810,7 +23846,7 @@ ArmServiceClient.prototype.moveToPosition = function t(e, s, n) {
|
|
|
23810
23846
|
};
|
|
23811
23847
|
ArmServiceClient.prototype.getJointPositions = function t(e, s, n) {
|
|
23812
23848
|
arguments.length === 2 && (n = arguments[1]);
|
|
23813
|
-
var u = grpc$
|
|
23849
|
+
var u = grpc$j.unary(ArmService.GetJointPositions, {
|
|
23814
23850
|
request: e,
|
|
23815
23851
|
host: this.serviceHost,
|
|
23816
23852
|
metadata: s,
|
|
@@ -23818,7 +23854,7 @@ ArmServiceClient.prototype.getJointPositions = function t(e, s, n) {
|
|
|
23818
23854
|
debug: this.options.debug,
|
|
23819
23855
|
onEnd: function(g) {
|
|
23820
23856
|
if (n)
|
|
23821
|
-
if (g.status !== grpc$
|
|
23857
|
+
if (g.status !== grpc$j.Code.OK) {
|
|
23822
23858
|
var p = new Error(g.statusMessage);
|
|
23823
23859
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
23824
23860
|
} else
|
|
@@ -23833,7 +23869,7 @@ ArmServiceClient.prototype.getJointPositions = function t(e, s, n) {
|
|
|
23833
23869
|
};
|
|
23834
23870
|
ArmServiceClient.prototype.moveToJointPositions = function t(e, s, n) {
|
|
23835
23871
|
arguments.length === 2 && (n = arguments[1]);
|
|
23836
|
-
var u = grpc$
|
|
23872
|
+
var u = grpc$j.unary(ArmService.MoveToJointPositions, {
|
|
23837
23873
|
request: e,
|
|
23838
23874
|
host: this.serviceHost,
|
|
23839
23875
|
metadata: s,
|
|
@@ -23841,7 +23877,7 @@ ArmServiceClient.prototype.moveToJointPositions = function t(e, s, n) {
|
|
|
23841
23877
|
debug: this.options.debug,
|
|
23842
23878
|
onEnd: function(g) {
|
|
23843
23879
|
if (n)
|
|
23844
|
-
if (g.status !== grpc$
|
|
23880
|
+
if (g.status !== grpc$j.Code.OK) {
|
|
23845
23881
|
var p = new Error(g.statusMessage);
|
|
23846
23882
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
23847
23883
|
} else
|
|
@@ -23856,7 +23892,7 @@ ArmServiceClient.prototype.moveToJointPositions = function t(e, s, n) {
|
|
|
23856
23892
|
};
|
|
23857
23893
|
ArmServiceClient.prototype.stop = function t(e, s, n) {
|
|
23858
23894
|
arguments.length === 2 && (n = arguments[1]);
|
|
23859
|
-
var u = grpc$
|
|
23895
|
+
var u = grpc$j.unary(ArmService.Stop, {
|
|
23860
23896
|
request: e,
|
|
23861
23897
|
host: this.serviceHost,
|
|
23862
23898
|
metadata: s,
|
|
@@ -23864,7 +23900,7 @@ ArmServiceClient.prototype.stop = function t(e, s, n) {
|
|
|
23864
23900
|
debug: this.options.debug,
|
|
23865
23901
|
onEnd: function(g) {
|
|
23866
23902
|
if (n)
|
|
23867
|
-
if (g.status !== grpc$
|
|
23903
|
+
if (g.status !== grpc$j.Code.OK) {
|
|
23868
23904
|
var p = new Error(g.statusMessage);
|
|
23869
23905
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
23870
23906
|
} else
|
|
@@ -23879,7 +23915,7 @@ ArmServiceClient.prototype.stop = function t(e, s, n) {
|
|
|
23879
23915
|
};
|
|
23880
23916
|
ArmServiceClient.prototype.isMoving = function t(e, s, n) {
|
|
23881
23917
|
arguments.length === 2 && (n = arguments[1]);
|
|
23882
|
-
var u = grpc$
|
|
23918
|
+
var u = grpc$j.unary(ArmService.IsMoving, {
|
|
23883
23919
|
request: e,
|
|
23884
23920
|
host: this.serviceHost,
|
|
23885
23921
|
metadata: s,
|
|
@@ -23887,7 +23923,7 @@ ArmServiceClient.prototype.isMoving = function t(e, s, n) {
|
|
|
23887
23923
|
debug: this.options.debug,
|
|
23888
23924
|
onEnd: function(g) {
|
|
23889
23925
|
if (n)
|
|
23890
|
-
if (g.status !== grpc$
|
|
23926
|
+
if (g.status !== grpc$j.Code.OK) {
|
|
23891
23927
|
var p = new Error(g.statusMessage);
|
|
23892
23928
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
23893
23929
|
} else
|
|
@@ -23902,7 +23938,7 @@ ArmServiceClient.prototype.isMoving = function t(e, s, n) {
|
|
|
23902
23938
|
};
|
|
23903
23939
|
ArmServiceClient.prototype.doCommand = function t(e, s, n) {
|
|
23904
23940
|
arguments.length === 2 && (n = arguments[1]);
|
|
23905
|
-
var u = grpc$
|
|
23941
|
+
var u = grpc$j.unary(ArmService.DoCommand, {
|
|
23906
23942
|
request: e,
|
|
23907
23943
|
host: this.serviceHost,
|
|
23908
23944
|
metadata: s,
|
|
@@ -23910,7 +23946,7 @@ ArmServiceClient.prototype.doCommand = function t(e, s, n) {
|
|
|
23910
23946
|
debug: this.options.debug,
|
|
23911
23947
|
onEnd: function(g) {
|
|
23912
23948
|
if (n)
|
|
23913
|
-
if (g.status !== grpc$
|
|
23949
|
+
if (g.status !== grpc$j.Code.OK) {
|
|
23914
23950
|
var p = new Error(g.statusMessage);
|
|
23915
23951
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
23916
23952
|
} else
|
|
@@ -24621,7 +24657,7 @@ var ArmServiceClient_1 = ArmServiceClient, base_pb = {};
|
|
|
24621
24657
|
return e.Message.setProto3BooleanField(this, 1, o);
|
|
24622
24658
|
}, s.object.extend(t, proto.viam.component.base.v1);
|
|
24623
24659
|
})(base_pb);
|
|
24624
|
-
var component_base_v1_base_pb = base_pb, common_v1_common_pb$
|
|
24660
|
+
var component_base_v1_base_pb = base_pb, common_v1_common_pb$h = common_pb, grpc$i = grpcWebClient_umdExports.grpc, BaseService = function() {
|
|
24625
24661
|
function t() {
|
|
24626
24662
|
}
|
|
24627
24663
|
return t.serviceName = "viam.component.base.v1.BaseService", t;
|
|
@@ -24679,15 +24715,15 @@ BaseService.DoCommand = {
|
|
|
24679
24715
|
service: BaseService,
|
|
24680
24716
|
requestStream: !1,
|
|
24681
24717
|
responseStream: !1,
|
|
24682
|
-
requestType: common_v1_common_pb$
|
|
24683
|
-
responseType: common_v1_common_pb$
|
|
24718
|
+
requestType: common_v1_common_pb$h.DoCommandRequest,
|
|
24719
|
+
responseType: common_v1_common_pb$h.DoCommandResponse
|
|
24684
24720
|
};
|
|
24685
24721
|
function BaseServiceClient(t, e) {
|
|
24686
24722
|
this.serviceHost = t, this.options = e || {};
|
|
24687
24723
|
}
|
|
24688
24724
|
BaseServiceClient.prototype.moveStraight = function t(e, s, n) {
|
|
24689
24725
|
arguments.length === 2 && (n = arguments[1]);
|
|
24690
|
-
var u = grpc$
|
|
24726
|
+
var u = grpc$i.unary(BaseService.MoveStraight, {
|
|
24691
24727
|
request: e,
|
|
24692
24728
|
host: this.serviceHost,
|
|
24693
24729
|
metadata: s,
|
|
@@ -24695,7 +24731,7 @@ BaseServiceClient.prototype.moveStraight = function t(e, s, n) {
|
|
|
24695
24731
|
debug: this.options.debug,
|
|
24696
24732
|
onEnd: function(g) {
|
|
24697
24733
|
if (n)
|
|
24698
|
-
if (g.status !== grpc$
|
|
24734
|
+
if (g.status !== grpc$i.Code.OK) {
|
|
24699
24735
|
var p = new Error(g.statusMessage);
|
|
24700
24736
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
24701
24737
|
} else
|
|
@@ -24710,7 +24746,7 @@ BaseServiceClient.prototype.moveStraight = function t(e, s, n) {
|
|
|
24710
24746
|
};
|
|
24711
24747
|
BaseServiceClient.prototype.spin = function t(e, s, n) {
|
|
24712
24748
|
arguments.length === 2 && (n = arguments[1]);
|
|
24713
|
-
var u = grpc$
|
|
24749
|
+
var u = grpc$i.unary(BaseService.Spin, {
|
|
24714
24750
|
request: e,
|
|
24715
24751
|
host: this.serviceHost,
|
|
24716
24752
|
metadata: s,
|
|
@@ -24718,7 +24754,7 @@ BaseServiceClient.prototype.spin = function t(e, s, n) {
|
|
|
24718
24754
|
debug: this.options.debug,
|
|
24719
24755
|
onEnd: function(g) {
|
|
24720
24756
|
if (n)
|
|
24721
|
-
if (g.status !== grpc$
|
|
24757
|
+
if (g.status !== grpc$i.Code.OK) {
|
|
24722
24758
|
var p = new Error(g.statusMessage);
|
|
24723
24759
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
24724
24760
|
} else
|
|
@@ -24733,7 +24769,7 @@ BaseServiceClient.prototype.spin = function t(e, s, n) {
|
|
|
24733
24769
|
};
|
|
24734
24770
|
BaseServiceClient.prototype.setPower = function t(e, s, n) {
|
|
24735
24771
|
arguments.length === 2 && (n = arguments[1]);
|
|
24736
|
-
var u = grpc$
|
|
24772
|
+
var u = grpc$i.unary(BaseService.SetPower, {
|
|
24737
24773
|
request: e,
|
|
24738
24774
|
host: this.serviceHost,
|
|
24739
24775
|
metadata: s,
|
|
@@ -24741,7 +24777,7 @@ BaseServiceClient.prototype.setPower = function t(e, s, n) {
|
|
|
24741
24777
|
debug: this.options.debug,
|
|
24742
24778
|
onEnd: function(g) {
|
|
24743
24779
|
if (n)
|
|
24744
|
-
if (g.status !== grpc$
|
|
24780
|
+
if (g.status !== grpc$i.Code.OK) {
|
|
24745
24781
|
var p = new Error(g.statusMessage);
|
|
24746
24782
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
24747
24783
|
} else
|
|
@@ -24756,7 +24792,7 @@ BaseServiceClient.prototype.setPower = function t(e, s, n) {
|
|
|
24756
24792
|
};
|
|
24757
24793
|
BaseServiceClient.prototype.setVelocity = function t(e, s, n) {
|
|
24758
24794
|
arguments.length === 2 && (n = arguments[1]);
|
|
24759
|
-
var u = grpc$
|
|
24795
|
+
var u = grpc$i.unary(BaseService.SetVelocity, {
|
|
24760
24796
|
request: e,
|
|
24761
24797
|
host: this.serviceHost,
|
|
24762
24798
|
metadata: s,
|
|
@@ -24764,7 +24800,7 @@ BaseServiceClient.prototype.setVelocity = function t(e, s, n) {
|
|
|
24764
24800
|
debug: this.options.debug,
|
|
24765
24801
|
onEnd: function(g) {
|
|
24766
24802
|
if (n)
|
|
24767
|
-
if (g.status !== grpc$
|
|
24803
|
+
if (g.status !== grpc$i.Code.OK) {
|
|
24768
24804
|
var p = new Error(g.statusMessage);
|
|
24769
24805
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
24770
24806
|
} else
|
|
@@ -24779,7 +24815,7 @@ BaseServiceClient.prototype.setVelocity = function t(e, s, n) {
|
|
|
24779
24815
|
};
|
|
24780
24816
|
BaseServiceClient.prototype.stop = function t(e, s, n) {
|
|
24781
24817
|
arguments.length === 2 && (n = arguments[1]);
|
|
24782
|
-
var u = grpc$
|
|
24818
|
+
var u = grpc$i.unary(BaseService.Stop, {
|
|
24783
24819
|
request: e,
|
|
24784
24820
|
host: this.serviceHost,
|
|
24785
24821
|
metadata: s,
|
|
@@ -24787,7 +24823,7 @@ BaseServiceClient.prototype.stop = function t(e, s, n) {
|
|
|
24787
24823
|
debug: this.options.debug,
|
|
24788
24824
|
onEnd: function(g) {
|
|
24789
24825
|
if (n)
|
|
24790
|
-
if (g.status !== grpc$
|
|
24826
|
+
if (g.status !== grpc$i.Code.OK) {
|
|
24791
24827
|
var p = new Error(g.statusMessage);
|
|
24792
24828
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
24793
24829
|
} else
|
|
@@ -24802,7 +24838,7 @@ BaseServiceClient.prototype.stop = function t(e, s, n) {
|
|
|
24802
24838
|
};
|
|
24803
24839
|
BaseServiceClient.prototype.isMoving = function t(e, s, n) {
|
|
24804
24840
|
arguments.length === 2 && (n = arguments[1]);
|
|
24805
|
-
var u = grpc$
|
|
24841
|
+
var u = grpc$i.unary(BaseService.IsMoving, {
|
|
24806
24842
|
request: e,
|
|
24807
24843
|
host: this.serviceHost,
|
|
24808
24844
|
metadata: s,
|
|
@@ -24810,7 +24846,7 @@ BaseServiceClient.prototype.isMoving = function t(e, s, n) {
|
|
|
24810
24846
|
debug: this.options.debug,
|
|
24811
24847
|
onEnd: function(g) {
|
|
24812
24848
|
if (n)
|
|
24813
|
-
if (g.status !== grpc$
|
|
24849
|
+
if (g.status !== grpc$i.Code.OK) {
|
|
24814
24850
|
var p = new Error(g.statusMessage);
|
|
24815
24851
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
24816
24852
|
} else
|
|
@@ -24825,7 +24861,7 @@ BaseServiceClient.prototype.isMoving = function t(e, s, n) {
|
|
|
24825
24861
|
};
|
|
24826
24862
|
BaseServiceClient.prototype.doCommand = function t(e, s, n) {
|
|
24827
24863
|
arguments.length === 2 && (n = arguments[1]);
|
|
24828
|
-
var u = grpc$
|
|
24864
|
+
var u = grpc$i.unary(BaseService.DoCommand, {
|
|
24829
24865
|
request: e,
|
|
24830
24866
|
host: this.serviceHost,
|
|
24831
24867
|
metadata: s,
|
|
@@ -24833,7 +24869,7 @@ BaseServiceClient.prototype.doCommand = function t(e, s, n) {
|
|
|
24833
24869
|
debug: this.options.debug,
|
|
24834
24870
|
onEnd: function(g) {
|
|
24835
24871
|
if (n)
|
|
24836
|
-
if (g.status !== grpc$
|
|
24872
|
+
if (g.status !== grpc$i.Code.OK) {
|
|
24837
24873
|
var p = new Error(g.statusMessage);
|
|
24838
24874
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
24839
24875
|
} else
|
|
@@ -26117,7 +26153,7 @@ var BaseServiceClient_1 = BaseServiceClient, board_pb = {};
|
|
|
26117
26153
|
POWER_MODE_OFFLINE_DEEP: 2
|
|
26118
26154
|
}, s.object.extend(t, proto.viam.component.board.v1);
|
|
26119
26155
|
})(board_pb);
|
|
26120
|
-
var component_board_v1_board_pb = board_pb, common_v1_common_pb$
|
|
26156
|
+
var component_board_v1_board_pb = board_pb, common_v1_common_pb$g = common_pb, grpc$h = grpcWebClient_umdExports.grpc, BoardService = function() {
|
|
26121
26157
|
function t() {
|
|
26122
26158
|
}
|
|
26123
26159
|
return t.serviceName = "viam.component.board.v1.BoardService", t;
|
|
@@ -26183,8 +26219,8 @@ BoardService.DoCommand = {
|
|
|
26183
26219
|
service: BoardService,
|
|
26184
26220
|
requestStream: !1,
|
|
26185
26221
|
responseStream: !1,
|
|
26186
|
-
requestType: common_v1_common_pb$
|
|
26187
|
-
responseType: common_v1_common_pb$
|
|
26222
|
+
requestType: common_v1_common_pb$g.DoCommandRequest,
|
|
26223
|
+
responseType: common_v1_common_pb$g.DoCommandResponse
|
|
26188
26224
|
};
|
|
26189
26225
|
BoardService.ReadAnalogReader = {
|
|
26190
26226
|
methodName: "ReadAnalogReader",
|
|
@@ -26215,7 +26251,7 @@ function BoardServiceClient(t, e) {
|
|
|
26215
26251
|
}
|
|
26216
26252
|
BoardServiceClient.prototype.status = function t(e, s, n) {
|
|
26217
26253
|
arguments.length === 2 && (n = arguments[1]);
|
|
26218
|
-
var u = grpc$
|
|
26254
|
+
var u = grpc$h.unary(BoardService.Status, {
|
|
26219
26255
|
request: e,
|
|
26220
26256
|
host: this.serviceHost,
|
|
26221
26257
|
metadata: s,
|
|
@@ -26223,7 +26259,7 @@ BoardServiceClient.prototype.status = function t(e, s, n) {
|
|
|
26223
26259
|
debug: this.options.debug,
|
|
26224
26260
|
onEnd: function(g) {
|
|
26225
26261
|
if (n)
|
|
26226
|
-
if (g.status !== grpc$
|
|
26262
|
+
if (g.status !== grpc$h.Code.OK) {
|
|
26227
26263
|
var p = new Error(g.statusMessage);
|
|
26228
26264
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
26229
26265
|
} else
|
|
@@ -26238,7 +26274,7 @@ BoardServiceClient.prototype.status = function t(e, s, n) {
|
|
|
26238
26274
|
};
|
|
26239
26275
|
BoardServiceClient.prototype.setGPIO = function t(e, s, n) {
|
|
26240
26276
|
arguments.length === 2 && (n = arguments[1]);
|
|
26241
|
-
var u = grpc$
|
|
26277
|
+
var u = grpc$h.unary(BoardService.SetGPIO, {
|
|
26242
26278
|
request: e,
|
|
26243
26279
|
host: this.serviceHost,
|
|
26244
26280
|
metadata: s,
|
|
@@ -26246,7 +26282,7 @@ BoardServiceClient.prototype.setGPIO = function t(e, s, n) {
|
|
|
26246
26282
|
debug: this.options.debug,
|
|
26247
26283
|
onEnd: function(g) {
|
|
26248
26284
|
if (n)
|
|
26249
|
-
if (g.status !== grpc$
|
|
26285
|
+
if (g.status !== grpc$h.Code.OK) {
|
|
26250
26286
|
var p = new Error(g.statusMessage);
|
|
26251
26287
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
26252
26288
|
} else
|
|
@@ -26261,7 +26297,7 @@ BoardServiceClient.prototype.setGPIO = function t(e, s, n) {
|
|
|
26261
26297
|
};
|
|
26262
26298
|
BoardServiceClient.prototype.getGPIO = function t(e, s, n) {
|
|
26263
26299
|
arguments.length === 2 && (n = arguments[1]);
|
|
26264
|
-
var u = grpc$
|
|
26300
|
+
var u = grpc$h.unary(BoardService.GetGPIO, {
|
|
26265
26301
|
request: e,
|
|
26266
26302
|
host: this.serviceHost,
|
|
26267
26303
|
metadata: s,
|
|
@@ -26269,7 +26305,7 @@ BoardServiceClient.prototype.getGPIO = function t(e, s, n) {
|
|
|
26269
26305
|
debug: this.options.debug,
|
|
26270
26306
|
onEnd: function(g) {
|
|
26271
26307
|
if (n)
|
|
26272
|
-
if (g.status !== grpc$
|
|
26308
|
+
if (g.status !== grpc$h.Code.OK) {
|
|
26273
26309
|
var p = new Error(g.statusMessage);
|
|
26274
26310
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
26275
26311
|
} else
|
|
@@ -26284,7 +26320,7 @@ BoardServiceClient.prototype.getGPIO = function t(e, s, n) {
|
|
|
26284
26320
|
};
|
|
26285
26321
|
BoardServiceClient.prototype.pWM = function t(e, s, n) {
|
|
26286
26322
|
arguments.length === 2 && (n = arguments[1]);
|
|
26287
|
-
var u = grpc$
|
|
26323
|
+
var u = grpc$h.unary(BoardService.PWM, {
|
|
26288
26324
|
request: e,
|
|
26289
26325
|
host: this.serviceHost,
|
|
26290
26326
|
metadata: s,
|
|
@@ -26292,7 +26328,7 @@ BoardServiceClient.prototype.pWM = function t(e, s, n) {
|
|
|
26292
26328
|
debug: this.options.debug,
|
|
26293
26329
|
onEnd: function(g) {
|
|
26294
26330
|
if (n)
|
|
26295
|
-
if (g.status !== grpc$
|
|
26331
|
+
if (g.status !== grpc$h.Code.OK) {
|
|
26296
26332
|
var p = new Error(g.statusMessage);
|
|
26297
26333
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
26298
26334
|
} else
|
|
@@ -26307,7 +26343,7 @@ BoardServiceClient.prototype.pWM = function t(e, s, n) {
|
|
|
26307
26343
|
};
|
|
26308
26344
|
BoardServiceClient.prototype.setPWM = function t(e, s, n) {
|
|
26309
26345
|
arguments.length === 2 && (n = arguments[1]);
|
|
26310
|
-
var u = grpc$
|
|
26346
|
+
var u = grpc$h.unary(BoardService.SetPWM, {
|
|
26311
26347
|
request: e,
|
|
26312
26348
|
host: this.serviceHost,
|
|
26313
26349
|
metadata: s,
|
|
@@ -26315,7 +26351,7 @@ BoardServiceClient.prototype.setPWM = function t(e, s, n) {
|
|
|
26315
26351
|
debug: this.options.debug,
|
|
26316
26352
|
onEnd: function(g) {
|
|
26317
26353
|
if (n)
|
|
26318
|
-
if (g.status !== grpc$
|
|
26354
|
+
if (g.status !== grpc$h.Code.OK) {
|
|
26319
26355
|
var p = new Error(g.statusMessage);
|
|
26320
26356
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
26321
26357
|
} else
|
|
@@ -26330,7 +26366,7 @@ BoardServiceClient.prototype.setPWM = function t(e, s, n) {
|
|
|
26330
26366
|
};
|
|
26331
26367
|
BoardServiceClient.prototype.pWMFrequency = function t(e, s, n) {
|
|
26332
26368
|
arguments.length === 2 && (n = arguments[1]);
|
|
26333
|
-
var u = grpc$
|
|
26369
|
+
var u = grpc$h.unary(BoardService.PWMFrequency, {
|
|
26334
26370
|
request: e,
|
|
26335
26371
|
host: this.serviceHost,
|
|
26336
26372
|
metadata: s,
|
|
@@ -26338,7 +26374,7 @@ BoardServiceClient.prototype.pWMFrequency = function t(e, s, n) {
|
|
|
26338
26374
|
debug: this.options.debug,
|
|
26339
26375
|
onEnd: function(g) {
|
|
26340
26376
|
if (n)
|
|
26341
|
-
if (g.status !== grpc$
|
|
26377
|
+
if (g.status !== grpc$h.Code.OK) {
|
|
26342
26378
|
var p = new Error(g.statusMessage);
|
|
26343
26379
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
26344
26380
|
} else
|
|
@@ -26353,7 +26389,7 @@ BoardServiceClient.prototype.pWMFrequency = function t(e, s, n) {
|
|
|
26353
26389
|
};
|
|
26354
26390
|
BoardServiceClient.prototype.setPWMFrequency = function t(e, s, n) {
|
|
26355
26391
|
arguments.length === 2 && (n = arguments[1]);
|
|
26356
|
-
var u = grpc$
|
|
26392
|
+
var u = grpc$h.unary(BoardService.SetPWMFrequency, {
|
|
26357
26393
|
request: e,
|
|
26358
26394
|
host: this.serviceHost,
|
|
26359
26395
|
metadata: s,
|
|
@@ -26361,7 +26397,7 @@ BoardServiceClient.prototype.setPWMFrequency = function t(e, s, n) {
|
|
|
26361
26397
|
debug: this.options.debug,
|
|
26362
26398
|
onEnd: function(g) {
|
|
26363
26399
|
if (n)
|
|
26364
|
-
if (g.status !== grpc$
|
|
26400
|
+
if (g.status !== grpc$h.Code.OK) {
|
|
26365
26401
|
var p = new Error(g.statusMessage);
|
|
26366
26402
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
26367
26403
|
} else
|
|
@@ -26376,7 +26412,7 @@ BoardServiceClient.prototype.setPWMFrequency = function t(e, s, n) {
|
|
|
26376
26412
|
};
|
|
26377
26413
|
BoardServiceClient.prototype.doCommand = function t(e, s, n) {
|
|
26378
26414
|
arguments.length === 2 && (n = arguments[1]);
|
|
26379
|
-
var u = grpc$
|
|
26415
|
+
var u = grpc$h.unary(BoardService.DoCommand, {
|
|
26380
26416
|
request: e,
|
|
26381
26417
|
host: this.serviceHost,
|
|
26382
26418
|
metadata: s,
|
|
@@ -26384,7 +26420,7 @@ BoardServiceClient.prototype.doCommand = function t(e, s, n) {
|
|
|
26384
26420
|
debug: this.options.debug,
|
|
26385
26421
|
onEnd: function(g) {
|
|
26386
26422
|
if (n)
|
|
26387
|
-
if (g.status !== grpc$
|
|
26423
|
+
if (g.status !== grpc$h.Code.OK) {
|
|
26388
26424
|
var p = new Error(g.statusMessage);
|
|
26389
26425
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
26390
26426
|
} else
|
|
@@ -26399,7 +26435,7 @@ BoardServiceClient.prototype.doCommand = function t(e, s, n) {
|
|
|
26399
26435
|
};
|
|
26400
26436
|
BoardServiceClient.prototype.readAnalogReader = function t(e, s, n) {
|
|
26401
26437
|
arguments.length === 2 && (n = arguments[1]);
|
|
26402
|
-
var u = grpc$
|
|
26438
|
+
var u = grpc$h.unary(BoardService.ReadAnalogReader, {
|
|
26403
26439
|
request: e,
|
|
26404
26440
|
host: this.serviceHost,
|
|
26405
26441
|
metadata: s,
|
|
@@ -26407,7 +26443,7 @@ BoardServiceClient.prototype.readAnalogReader = function t(e, s, n) {
|
|
|
26407
26443
|
debug: this.options.debug,
|
|
26408
26444
|
onEnd: function(g) {
|
|
26409
26445
|
if (n)
|
|
26410
|
-
if (g.status !== grpc$
|
|
26446
|
+
if (g.status !== grpc$h.Code.OK) {
|
|
26411
26447
|
var p = new Error(g.statusMessage);
|
|
26412
26448
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
26413
26449
|
} else
|
|
@@ -26422,7 +26458,7 @@ BoardServiceClient.prototype.readAnalogReader = function t(e, s, n) {
|
|
|
26422
26458
|
};
|
|
26423
26459
|
BoardServiceClient.prototype.getDigitalInterruptValue = function t(e, s, n) {
|
|
26424
26460
|
arguments.length === 2 && (n = arguments[1]);
|
|
26425
|
-
var u = grpc$
|
|
26461
|
+
var u = grpc$h.unary(BoardService.GetDigitalInterruptValue, {
|
|
26426
26462
|
request: e,
|
|
26427
26463
|
host: this.serviceHost,
|
|
26428
26464
|
metadata: s,
|
|
@@ -26430,7 +26466,7 @@ BoardServiceClient.prototype.getDigitalInterruptValue = function t(e, s, n) {
|
|
|
26430
26466
|
debug: this.options.debug,
|
|
26431
26467
|
onEnd: function(g) {
|
|
26432
26468
|
if (n)
|
|
26433
|
-
if (g.status !== grpc$
|
|
26469
|
+
if (g.status !== grpc$h.Code.OK) {
|
|
26434
26470
|
var p = new Error(g.statusMessage);
|
|
26435
26471
|
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
26436
26472
|
} else
|
|
@@ -26445,7 +26481,522 @@ BoardServiceClient.prototype.getDigitalInterruptValue = function t(e, s, n) {
|
|
|
26445
26481
|
};
|
|
26446
26482
|
BoardServiceClient.prototype.setPowerMode = function t(e, s, n) {
|
|
26447
26483
|
arguments.length === 2 && (n = arguments[1]);
|
|
26448
|
-
var u = grpc$
|
|
26484
|
+
var u = grpc$h.unary(BoardService.SetPowerMode, {
|
|
26485
|
+
request: e,
|
|
26486
|
+
host: this.serviceHost,
|
|
26487
|
+
metadata: s,
|
|
26488
|
+
transport: this.options.transport,
|
|
26489
|
+
debug: this.options.debug,
|
|
26490
|
+
onEnd: function(g) {
|
|
26491
|
+
if (n)
|
|
26492
|
+
if (g.status !== grpc$h.Code.OK) {
|
|
26493
|
+
var p = new Error(g.statusMessage);
|
|
26494
|
+
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
26495
|
+
} else
|
|
26496
|
+
n(null, g.message);
|
|
26497
|
+
}
|
|
26498
|
+
});
|
|
26499
|
+
return {
|
|
26500
|
+
cancel: function() {
|
|
26501
|
+
n = null, u.close();
|
|
26502
|
+
}
|
|
26503
|
+
};
|
|
26504
|
+
};
|
|
26505
|
+
var BoardServiceClient_1 = BoardServiceClient, encoder_pb = {};
|
|
26506
|
+
(function(t) {
|
|
26507
|
+
var e = googleProtobuf, s = e, n = function() {
|
|
26508
|
+
return this || window || n || self || Function("return this")();
|
|
26509
|
+
}.call(null), u = common_pb;
|
|
26510
|
+
s.object.extend(proto, u);
|
|
26511
|
+
var g = annotations_pb;
|
|
26512
|
+
s.object.extend(proto, g);
|
|
26513
|
+
var p = struct_pb;
|
|
26514
|
+
s.object.extend(proto, p), s.exportSymbol("proto.viam.component.encoder.v1.GetPositionRequest", null, n), s.exportSymbol("proto.viam.component.encoder.v1.GetPositionResponse", null, n), s.exportSymbol("proto.viam.component.encoder.v1.GetPropertiesRequest", null, n), s.exportSymbol("proto.viam.component.encoder.v1.GetPropertiesResponse", null, n), s.exportSymbol("proto.viam.component.encoder.v1.PositionType", null, n), s.exportSymbol("proto.viam.component.encoder.v1.ResetPositionRequest", null, n), s.exportSymbol("proto.viam.component.encoder.v1.ResetPositionResponse", null, n), proto.viam.component.encoder.v1.GetPositionRequest = function(o) {
|
|
26515
|
+
e.Message.initialize(this, o, 0, -1, null, null);
|
|
26516
|
+
}, s.inherits(proto.viam.component.encoder.v1.GetPositionRequest, e.Message), s.DEBUG && !COMPILED && (proto.viam.component.encoder.v1.GetPositionRequest.displayName = "proto.viam.component.encoder.v1.GetPositionRequest"), proto.viam.component.encoder.v1.GetPositionResponse = function(o) {
|
|
26517
|
+
e.Message.initialize(this, o, 0, -1, null, null);
|
|
26518
|
+
}, s.inherits(proto.viam.component.encoder.v1.GetPositionResponse, e.Message), s.DEBUG && !COMPILED && (proto.viam.component.encoder.v1.GetPositionResponse.displayName = "proto.viam.component.encoder.v1.GetPositionResponse"), proto.viam.component.encoder.v1.ResetPositionRequest = function(o) {
|
|
26519
|
+
e.Message.initialize(this, o, 0, -1, null, null);
|
|
26520
|
+
}, s.inherits(proto.viam.component.encoder.v1.ResetPositionRequest, e.Message), s.DEBUG && !COMPILED && (proto.viam.component.encoder.v1.ResetPositionRequest.displayName = "proto.viam.component.encoder.v1.ResetPositionRequest"), proto.viam.component.encoder.v1.ResetPositionResponse = function(o) {
|
|
26521
|
+
e.Message.initialize(this, o, 0, -1, null, null);
|
|
26522
|
+
}, s.inherits(proto.viam.component.encoder.v1.ResetPositionResponse, e.Message), s.DEBUG && !COMPILED && (proto.viam.component.encoder.v1.ResetPositionResponse.displayName = "proto.viam.component.encoder.v1.ResetPositionResponse"), proto.viam.component.encoder.v1.GetPropertiesRequest = function(o) {
|
|
26523
|
+
e.Message.initialize(this, o, 0, -1, null, null);
|
|
26524
|
+
}, s.inherits(proto.viam.component.encoder.v1.GetPropertiesRequest, e.Message), s.DEBUG && !COMPILED && (proto.viam.component.encoder.v1.GetPropertiesRequest.displayName = "proto.viam.component.encoder.v1.GetPropertiesRequest"), proto.viam.component.encoder.v1.GetPropertiesResponse = function(o) {
|
|
26525
|
+
e.Message.initialize(this, o, 0, -1, null, null);
|
|
26526
|
+
}, s.inherits(proto.viam.component.encoder.v1.GetPropertiesResponse, e.Message), s.DEBUG && !COMPILED && (proto.viam.component.encoder.v1.GetPropertiesResponse.displayName = "proto.viam.component.encoder.v1.GetPropertiesResponse"), e.Message.GENERATE_TO_OBJECT && (proto.viam.component.encoder.v1.GetPositionRequest.prototype.toObject = function(o) {
|
|
26527
|
+
return proto.viam.component.encoder.v1.GetPositionRequest.toObject(o, this);
|
|
26528
|
+
}, proto.viam.component.encoder.v1.GetPositionRequest.toObject = function(o, r) {
|
|
26529
|
+
var i, l = {
|
|
26530
|
+
name: e.Message.getFieldWithDefault(r, 1, ""),
|
|
26531
|
+
positionType: e.Message.getFieldWithDefault(r, 2, 0),
|
|
26532
|
+
extra: (i = r.getExtra()) && p.Struct.toObject(o, i)
|
|
26533
|
+
};
|
|
26534
|
+
return o && (l.$jspbMessageInstance = r), l;
|
|
26535
|
+
}), proto.viam.component.encoder.v1.GetPositionRequest.deserializeBinary = function(o) {
|
|
26536
|
+
var r = new e.BinaryReader(o), i = new proto.viam.component.encoder.v1.GetPositionRequest();
|
|
26537
|
+
return proto.viam.component.encoder.v1.GetPositionRequest.deserializeBinaryFromReader(i, r);
|
|
26538
|
+
}, proto.viam.component.encoder.v1.GetPositionRequest.deserializeBinaryFromReader = function(o, r) {
|
|
26539
|
+
for (; r.nextField() && !r.isEndGroup(); ) {
|
|
26540
|
+
var i = r.getFieldNumber();
|
|
26541
|
+
switch (i) {
|
|
26542
|
+
case 1:
|
|
26543
|
+
var l = (
|
|
26544
|
+
/** @type {string} */
|
|
26545
|
+
r.readString()
|
|
26546
|
+
);
|
|
26547
|
+
o.setName(l);
|
|
26548
|
+
break;
|
|
26549
|
+
case 2:
|
|
26550
|
+
var l = (
|
|
26551
|
+
/** @type {!proto.viam.component.encoder.v1.PositionType} */
|
|
26552
|
+
r.readEnum()
|
|
26553
|
+
);
|
|
26554
|
+
o.setPositionType(l);
|
|
26555
|
+
break;
|
|
26556
|
+
case 99:
|
|
26557
|
+
var l = new p.Struct();
|
|
26558
|
+
r.readMessage(l, p.Struct.deserializeBinaryFromReader), o.setExtra(l);
|
|
26559
|
+
break;
|
|
26560
|
+
default:
|
|
26561
|
+
r.skipField();
|
|
26562
|
+
break;
|
|
26563
|
+
}
|
|
26564
|
+
}
|
|
26565
|
+
return o;
|
|
26566
|
+
}, proto.viam.component.encoder.v1.GetPositionRequest.prototype.serializeBinary = function() {
|
|
26567
|
+
var o = new e.BinaryWriter();
|
|
26568
|
+
return proto.viam.component.encoder.v1.GetPositionRequest.serializeBinaryToWriter(this, o), o.getResultBuffer();
|
|
26569
|
+
}, proto.viam.component.encoder.v1.GetPositionRequest.serializeBinaryToWriter = function(o, r) {
|
|
26570
|
+
var i = void 0;
|
|
26571
|
+
i = o.getName(), i.length > 0 && r.writeString(
|
|
26572
|
+
1,
|
|
26573
|
+
i
|
|
26574
|
+
), i = /** @type {!proto.viam.component.encoder.v1.PositionType} */
|
|
26575
|
+
e.Message.getField(o, 2), i != null && r.writeEnum(
|
|
26576
|
+
2,
|
|
26577
|
+
i
|
|
26578
|
+
), i = o.getExtra(), i != null && r.writeMessage(
|
|
26579
|
+
99,
|
|
26580
|
+
i,
|
|
26581
|
+
p.Struct.serializeBinaryToWriter
|
|
26582
|
+
);
|
|
26583
|
+
}, proto.viam.component.encoder.v1.GetPositionRequest.prototype.getName = function() {
|
|
26584
|
+
return (
|
|
26585
|
+
/** @type {string} */
|
|
26586
|
+
e.Message.getFieldWithDefault(this, 1, "")
|
|
26587
|
+
);
|
|
26588
|
+
}, proto.viam.component.encoder.v1.GetPositionRequest.prototype.setName = function(o) {
|
|
26589
|
+
return e.Message.setProto3StringField(this, 1, o);
|
|
26590
|
+
}, proto.viam.component.encoder.v1.GetPositionRequest.prototype.getPositionType = function() {
|
|
26591
|
+
return (
|
|
26592
|
+
/** @type {!proto.viam.component.encoder.v1.PositionType} */
|
|
26593
|
+
e.Message.getFieldWithDefault(this, 2, 0)
|
|
26594
|
+
);
|
|
26595
|
+
}, proto.viam.component.encoder.v1.GetPositionRequest.prototype.setPositionType = function(o) {
|
|
26596
|
+
return e.Message.setField(this, 2, o);
|
|
26597
|
+
}, proto.viam.component.encoder.v1.GetPositionRequest.prototype.clearPositionType = function() {
|
|
26598
|
+
return e.Message.setField(this, 2, void 0);
|
|
26599
|
+
}, proto.viam.component.encoder.v1.GetPositionRequest.prototype.hasPositionType = function() {
|
|
26600
|
+
return e.Message.getField(this, 2) != null;
|
|
26601
|
+
}, proto.viam.component.encoder.v1.GetPositionRequest.prototype.getExtra = function() {
|
|
26602
|
+
return (
|
|
26603
|
+
/** @type{?proto.google.protobuf.Struct} */
|
|
26604
|
+
e.Message.getWrapperField(this, p.Struct, 99)
|
|
26605
|
+
);
|
|
26606
|
+
}, proto.viam.component.encoder.v1.GetPositionRequest.prototype.setExtra = function(o) {
|
|
26607
|
+
return e.Message.setWrapperField(this, 99, o);
|
|
26608
|
+
}, proto.viam.component.encoder.v1.GetPositionRequest.prototype.clearExtra = function() {
|
|
26609
|
+
return this.setExtra(void 0);
|
|
26610
|
+
}, proto.viam.component.encoder.v1.GetPositionRequest.prototype.hasExtra = function() {
|
|
26611
|
+
return e.Message.getField(this, 99) != null;
|
|
26612
|
+
}, e.Message.GENERATE_TO_OBJECT && (proto.viam.component.encoder.v1.GetPositionResponse.prototype.toObject = function(o) {
|
|
26613
|
+
return proto.viam.component.encoder.v1.GetPositionResponse.toObject(o, this);
|
|
26614
|
+
}, proto.viam.component.encoder.v1.GetPositionResponse.toObject = function(o, r) {
|
|
26615
|
+
var i = {
|
|
26616
|
+
value: e.Message.getFloatingPointFieldWithDefault(r, 1, 0),
|
|
26617
|
+
positionType: e.Message.getFieldWithDefault(r, 2, 0)
|
|
26618
|
+
};
|
|
26619
|
+
return o && (i.$jspbMessageInstance = r), i;
|
|
26620
|
+
}), proto.viam.component.encoder.v1.GetPositionResponse.deserializeBinary = function(o) {
|
|
26621
|
+
var r = new e.BinaryReader(o), i = new proto.viam.component.encoder.v1.GetPositionResponse();
|
|
26622
|
+
return proto.viam.component.encoder.v1.GetPositionResponse.deserializeBinaryFromReader(i, r);
|
|
26623
|
+
}, proto.viam.component.encoder.v1.GetPositionResponse.deserializeBinaryFromReader = function(o, r) {
|
|
26624
|
+
for (; r.nextField() && !r.isEndGroup(); ) {
|
|
26625
|
+
var i = r.getFieldNumber();
|
|
26626
|
+
switch (i) {
|
|
26627
|
+
case 1:
|
|
26628
|
+
var l = (
|
|
26629
|
+
/** @type {number} */
|
|
26630
|
+
r.readFloat()
|
|
26631
|
+
);
|
|
26632
|
+
o.setValue(l);
|
|
26633
|
+
break;
|
|
26634
|
+
case 2:
|
|
26635
|
+
var l = (
|
|
26636
|
+
/** @type {!proto.viam.component.encoder.v1.PositionType} */
|
|
26637
|
+
r.readEnum()
|
|
26638
|
+
);
|
|
26639
|
+
o.setPositionType(l);
|
|
26640
|
+
break;
|
|
26641
|
+
default:
|
|
26642
|
+
r.skipField();
|
|
26643
|
+
break;
|
|
26644
|
+
}
|
|
26645
|
+
}
|
|
26646
|
+
return o;
|
|
26647
|
+
}, proto.viam.component.encoder.v1.GetPositionResponse.prototype.serializeBinary = function() {
|
|
26648
|
+
var o = new e.BinaryWriter();
|
|
26649
|
+
return proto.viam.component.encoder.v1.GetPositionResponse.serializeBinaryToWriter(this, o), o.getResultBuffer();
|
|
26650
|
+
}, proto.viam.component.encoder.v1.GetPositionResponse.serializeBinaryToWriter = function(o, r) {
|
|
26651
|
+
var i = void 0;
|
|
26652
|
+
i = o.getValue(), i !== 0 && r.writeFloat(
|
|
26653
|
+
1,
|
|
26654
|
+
i
|
|
26655
|
+
), i = o.getPositionType(), i !== 0 && r.writeEnum(
|
|
26656
|
+
2,
|
|
26657
|
+
i
|
|
26658
|
+
);
|
|
26659
|
+
}, proto.viam.component.encoder.v1.GetPositionResponse.prototype.getValue = function() {
|
|
26660
|
+
return (
|
|
26661
|
+
/** @type {number} */
|
|
26662
|
+
e.Message.getFloatingPointFieldWithDefault(this, 1, 0)
|
|
26663
|
+
);
|
|
26664
|
+
}, proto.viam.component.encoder.v1.GetPositionResponse.prototype.setValue = function(o) {
|
|
26665
|
+
return e.Message.setProto3FloatField(this, 1, o);
|
|
26666
|
+
}, proto.viam.component.encoder.v1.GetPositionResponse.prototype.getPositionType = function() {
|
|
26667
|
+
return (
|
|
26668
|
+
/** @type {!proto.viam.component.encoder.v1.PositionType} */
|
|
26669
|
+
e.Message.getFieldWithDefault(this, 2, 0)
|
|
26670
|
+
);
|
|
26671
|
+
}, proto.viam.component.encoder.v1.GetPositionResponse.prototype.setPositionType = function(o) {
|
|
26672
|
+
return e.Message.setProto3EnumField(this, 2, o);
|
|
26673
|
+
}, e.Message.GENERATE_TO_OBJECT && (proto.viam.component.encoder.v1.ResetPositionRequest.prototype.toObject = function(o) {
|
|
26674
|
+
return proto.viam.component.encoder.v1.ResetPositionRequest.toObject(o, this);
|
|
26675
|
+
}, proto.viam.component.encoder.v1.ResetPositionRequest.toObject = function(o, r) {
|
|
26676
|
+
var i, l = {
|
|
26677
|
+
name: e.Message.getFieldWithDefault(r, 1, ""),
|
|
26678
|
+
extra: (i = r.getExtra()) && p.Struct.toObject(o, i)
|
|
26679
|
+
};
|
|
26680
|
+
return o && (l.$jspbMessageInstance = r), l;
|
|
26681
|
+
}), proto.viam.component.encoder.v1.ResetPositionRequest.deserializeBinary = function(o) {
|
|
26682
|
+
var r = new e.BinaryReader(o), i = new proto.viam.component.encoder.v1.ResetPositionRequest();
|
|
26683
|
+
return proto.viam.component.encoder.v1.ResetPositionRequest.deserializeBinaryFromReader(i, r);
|
|
26684
|
+
}, proto.viam.component.encoder.v1.ResetPositionRequest.deserializeBinaryFromReader = function(o, r) {
|
|
26685
|
+
for (; r.nextField() && !r.isEndGroup(); ) {
|
|
26686
|
+
var i = r.getFieldNumber();
|
|
26687
|
+
switch (i) {
|
|
26688
|
+
case 1:
|
|
26689
|
+
var l = (
|
|
26690
|
+
/** @type {string} */
|
|
26691
|
+
r.readString()
|
|
26692
|
+
);
|
|
26693
|
+
o.setName(l);
|
|
26694
|
+
break;
|
|
26695
|
+
case 99:
|
|
26696
|
+
var l = new p.Struct();
|
|
26697
|
+
r.readMessage(l, p.Struct.deserializeBinaryFromReader), o.setExtra(l);
|
|
26698
|
+
break;
|
|
26699
|
+
default:
|
|
26700
|
+
r.skipField();
|
|
26701
|
+
break;
|
|
26702
|
+
}
|
|
26703
|
+
}
|
|
26704
|
+
return o;
|
|
26705
|
+
}, proto.viam.component.encoder.v1.ResetPositionRequest.prototype.serializeBinary = function() {
|
|
26706
|
+
var o = new e.BinaryWriter();
|
|
26707
|
+
return proto.viam.component.encoder.v1.ResetPositionRequest.serializeBinaryToWriter(this, o), o.getResultBuffer();
|
|
26708
|
+
}, proto.viam.component.encoder.v1.ResetPositionRequest.serializeBinaryToWriter = function(o, r) {
|
|
26709
|
+
var i = void 0;
|
|
26710
|
+
i = o.getName(), i.length > 0 && r.writeString(
|
|
26711
|
+
1,
|
|
26712
|
+
i
|
|
26713
|
+
), i = o.getExtra(), i != null && r.writeMessage(
|
|
26714
|
+
99,
|
|
26715
|
+
i,
|
|
26716
|
+
p.Struct.serializeBinaryToWriter
|
|
26717
|
+
);
|
|
26718
|
+
}, proto.viam.component.encoder.v1.ResetPositionRequest.prototype.getName = function() {
|
|
26719
|
+
return (
|
|
26720
|
+
/** @type {string} */
|
|
26721
|
+
e.Message.getFieldWithDefault(this, 1, "")
|
|
26722
|
+
);
|
|
26723
|
+
}, proto.viam.component.encoder.v1.ResetPositionRequest.prototype.setName = function(o) {
|
|
26724
|
+
return e.Message.setProto3StringField(this, 1, o);
|
|
26725
|
+
}, proto.viam.component.encoder.v1.ResetPositionRequest.prototype.getExtra = function() {
|
|
26726
|
+
return (
|
|
26727
|
+
/** @type{?proto.google.protobuf.Struct} */
|
|
26728
|
+
e.Message.getWrapperField(this, p.Struct, 99)
|
|
26729
|
+
);
|
|
26730
|
+
}, proto.viam.component.encoder.v1.ResetPositionRequest.prototype.setExtra = function(o) {
|
|
26731
|
+
return e.Message.setWrapperField(this, 99, o);
|
|
26732
|
+
}, proto.viam.component.encoder.v1.ResetPositionRequest.prototype.clearExtra = function() {
|
|
26733
|
+
return this.setExtra(void 0);
|
|
26734
|
+
}, proto.viam.component.encoder.v1.ResetPositionRequest.prototype.hasExtra = function() {
|
|
26735
|
+
return e.Message.getField(this, 99) != null;
|
|
26736
|
+
}, e.Message.GENERATE_TO_OBJECT && (proto.viam.component.encoder.v1.ResetPositionResponse.prototype.toObject = function(o) {
|
|
26737
|
+
return proto.viam.component.encoder.v1.ResetPositionResponse.toObject(o, this);
|
|
26738
|
+
}, proto.viam.component.encoder.v1.ResetPositionResponse.toObject = function(o, r) {
|
|
26739
|
+
var i = {};
|
|
26740
|
+
return o && (i.$jspbMessageInstance = r), i;
|
|
26741
|
+
}), proto.viam.component.encoder.v1.ResetPositionResponse.deserializeBinary = function(o) {
|
|
26742
|
+
var r = new e.BinaryReader(o), i = new proto.viam.component.encoder.v1.ResetPositionResponse();
|
|
26743
|
+
return proto.viam.component.encoder.v1.ResetPositionResponse.deserializeBinaryFromReader(i, r);
|
|
26744
|
+
}, proto.viam.component.encoder.v1.ResetPositionResponse.deserializeBinaryFromReader = function(o, r) {
|
|
26745
|
+
for (; r.nextField() && !r.isEndGroup(); ) {
|
|
26746
|
+
var i = r.getFieldNumber();
|
|
26747
|
+
switch (i) {
|
|
26748
|
+
default:
|
|
26749
|
+
r.skipField();
|
|
26750
|
+
break;
|
|
26751
|
+
}
|
|
26752
|
+
}
|
|
26753
|
+
return o;
|
|
26754
|
+
}, proto.viam.component.encoder.v1.ResetPositionResponse.prototype.serializeBinary = function() {
|
|
26755
|
+
var o = new e.BinaryWriter();
|
|
26756
|
+
return proto.viam.component.encoder.v1.ResetPositionResponse.serializeBinaryToWriter(this, o), o.getResultBuffer();
|
|
26757
|
+
}, proto.viam.component.encoder.v1.ResetPositionResponse.serializeBinaryToWriter = function(o, r) {
|
|
26758
|
+
}, e.Message.GENERATE_TO_OBJECT && (proto.viam.component.encoder.v1.GetPropertiesRequest.prototype.toObject = function(o) {
|
|
26759
|
+
return proto.viam.component.encoder.v1.GetPropertiesRequest.toObject(o, this);
|
|
26760
|
+
}, proto.viam.component.encoder.v1.GetPropertiesRequest.toObject = function(o, r) {
|
|
26761
|
+
var i, l = {
|
|
26762
|
+
name: e.Message.getFieldWithDefault(r, 1, ""),
|
|
26763
|
+
extra: (i = r.getExtra()) && p.Struct.toObject(o, i)
|
|
26764
|
+
};
|
|
26765
|
+
return o && (l.$jspbMessageInstance = r), l;
|
|
26766
|
+
}), proto.viam.component.encoder.v1.GetPropertiesRequest.deserializeBinary = function(o) {
|
|
26767
|
+
var r = new e.BinaryReader(o), i = new proto.viam.component.encoder.v1.GetPropertiesRequest();
|
|
26768
|
+
return proto.viam.component.encoder.v1.GetPropertiesRequest.deserializeBinaryFromReader(i, r);
|
|
26769
|
+
}, proto.viam.component.encoder.v1.GetPropertiesRequest.deserializeBinaryFromReader = function(o, r) {
|
|
26770
|
+
for (; r.nextField() && !r.isEndGroup(); ) {
|
|
26771
|
+
var i = r.getFieldNumber();
|
|
26772
|
+
switch (i) {
|
|
26773
|
+
case 1:
|
|
26774
|
+
var l = (
|
|
26775
|
+
/** @type {string} */
|
|
26776
|
+
r.readString()
|
|
26777
|
+
);
|
|
26778
|
+
o.setName(l);
|
|
26779
|
+
break;
|
|
26780
|
+
case 99:
|
|
26781
|
+
var l = new p.Struct();
|
|
26782
|
+
r.readMessage(l, p.Struct.deserializeBinaryFromReader), o.setExtra(l);
|
|
26783
|
+
break;
|
|
26784
|
+
default:
|
|
26785
|
+
r.skipField();
|
|
26786
|
+
break;
|
|
26787
|
+
}
|
|
26788
|
+
}
|
|
26789
|
+
return o;
|
|
26790
|
+
}, proto.viam.component.encoder.v1.GetPropertiesRequest.prototype.serializeBinary = function() {
|
|
26791
|
+
var o = new e.BinaryWriter();
|
|
26792
|
+
return proto.viam.component.encoder.v1.GetPropertiesRequest.serializeBinaryToWriter(this, o), o.getResultBuffer();
|
|
26793
|
+
}, proto.viam.component.encoder.v1.GetPropertiesRequest.serializeBinaryToWriter = function(o, r) {
|
|
26794
|
+
var i = void 0;
|
|
26795
|
+
i = o.getName(), i.length > 0 && r.writeString(
|
|
26796
|
+
1,
|
|
26797
|
+
i
|
|
26798
|
+
), i = o.getExtra(), i != null && r.writeMessage(
|
|
26799
|
+
99,
|
|
26800
|
+
i,
|
|
26801
|
+
p.Struct.serializeBinaryToWriter
|
|
26802
|
+
);
|
|
26803
|
+
}, proto.viam.component.encoder.v1.GetPropertiesRequest.prototype.getName = function() {
|
|
26804
|
+
return (
|
|
26805
|
+
/** @type {string} */
|
|
26806
|
+
e.Message.getFieldWithDefault(this, 1, "")
|
|
26807
|
+
);
|
|
26808
|
+
}, proto.viam.component.encoder.v1.GetPropertiesRequest.prototype.setName = function(o) {
|
|
26809
|
+
return e.Message.setProto3StringField(this, 1, o);
|
|
26810
|
+
}, proto.viam.component.encoder.v1.GetPropertiesRequest.prototype.getExtra = function() {
|
|
26811
|
+
return (
|
|
26812
|
+
/** @type{?proto.google.protobuf.Struct} */
|
|
26813
|
+
e.Message.getWrapperField(this, p.Struct, 99)
|
|
26814
|
+
);
|
|
26815
|
+
}, proto.viam.component.encoder.v1.GetPropertiesRequest.prototype.setExtra = function(o) {
|
|
26816
|
+
return e.Message.setWrapperField(this, 99, o);
|
|
26817
|
+
}, proto.viam.component.encoder.v1.GetPropertiesRequest.prototype.clearExtra = function() {
|
|
26818
|
+
return this.setExtra(void 0);
|
|
26819
|
+
}, proto.viam.component.encoder.v1.GetPropertiesRequest.prototype.hasExtra = function() {
|
|
26820
|
+
return e.Message.getField(this, 99) != null;
|
|
26821
|
+
}, e.Message.GENERATE_TO_OBJECT && (proto.viam.component.encoder.v1.GetPropertiesResponse.prototype.toObject = function(o) {
|
|
26822
|
+
return proto.viam.component.encoder.v1.GetPropertiesResponse.toObject(o, this);
|
|
26823
|
+
}, proto.viam.component.encoder.v1.GetPropertiesResponse.toObject = function(o, r) {
|
|
26824
|
+
var i = {
|
|
26825
|
+
ticksCountSupported: e.Message.getBooleanFieldWithDefault(r, 1, !1),
|
|
26826
|
+
angleDegreesSupported: e.Message.getBooleanFieldWithDefault(r, 2, !1)
|
|
26827
|
+
};
|
|
26828
|
+
return o && (i.$jspbMessageInstance = r), i;
|
|
26829
|
+
}), proto.viam.component.encoder.v1.GetPropertiesResponse.deserializeBinary = function(o) {
|
|
26830
|
+
var r = new e.BinaryReader(o), i = new proto.viam.component.encoder.v1.GetPropertiesResponse();
|
|
26831
|
+
return proto.viam.component.encoder.v1.GetPropertiesResponse.deserializeBinaryFromReader(i, r);
|
|
26832
|
+
}, proto.viam.component.encoder.v1.GetPropertiesResponse.deserializeBinaryFromReader = function(o, r) {
|
|
26833
|
+
for (; r.nextField() && !r.isEndGroup(); ) {
|
|
26834
|
+
var i = r.getFieldNumber();
|
|
26835
|
+
switch (i) {
|
|
26836
|
+
case 1:
|
|
26837
|
+
var l = (
|
|
26838
|
+
/** @type {boolean} */
|
|
26839
|
+
r.readBool()
|
|
26840
|
+
);
|
|
26841
|
+
o.setTicksCountSupported(l);
|
|
26842
|
+
break;
|
|
26843
|
+
case 2:
|
|
26844
|
+
var l = (
|
|
26845
|
+
/** @type {boolean} */
|
|
26846
|
+
r.readBool()
|
|
26847
|
+
);
|
|
26848
|
+
o.setAngleDegreesSupported(l);
|
|
26849
|
+
break;
|
|
26850
|
+
default:
|
|
26851
|
+
r.skipField();
|
|
26852
|
+
break;
|
|
26853
|
+
}
|
|
26854
|
+
}
|
|
26855
|
+
return o;
|
|
26856
|
+
}, proto.viam.component.encoder.v1.GetPropertiesResponse.prototype.serializeBinary = function() {
|
|
26857
|
+
var o = new e.BinaryWriter();
|
|
26858
|
+
return proto.viam.component.encoder.v1.GetPropertiesResponse.serializeBinaryToWriter(this, o), o.getResultBuffer();
|
|
26859
|
+
}, proto.viam.component.encoder.v1.GetPropertiesResponse.serializeBinaryToWriter = function(o, r) {
|
|
26860
|
+
var i = void 0;
|
|
26861
|
+
i = o.getTicksCountSupported(), i && r.writeBool(
|
|
26862
|
+
1,
|
|
26863
|
+
i
|
|
26864
|
+
), i = o.getAngleDegreesSupported(), i && r.writeBool(
|
|
26865
|
+
2,
|
|
26866
|
+
i
|
|
26867
|
+
);
|
|
26868
|
+
}, proto.viam.component.encoder.v1.GetPropertiesResponse.prototype.getTicksCountSupported = function() {
|
|
26869
|
+
return (
|
|
26870
|
+
/** @type {boolean} */
|
|
26871
|
+
e.Message.getBooleanFieldWithDefault(this, 1, !1)
|
|
26872
|
+
);
|
|
26873
|
+
}, proto.viam.component.encoder.v1.GetPropertiesResponse.prototype.setTicksCountSupported = function(o) {
|
|
26874
|
+
return e.Message.setProto3BooleanField(this, 1, o);
|
|
26875
|
+
}, proto.viam.component.encoder.v1.GetPropertiesResponse.prototype.getAngleDegreesSupported = function() {
|
|
26876
|
+
return (
|
|
26877
|
+
/** @type {boolean} */
|
|
26878
|
+
e.Message.getBooleanFieldWithDefault(this, 2, !1)
|
|
26879
|
+
);
|
|
26880
|
+
}, proto.viam.component.encoder.v1.GetPropertiesResponse.prototype.setAngleDegreesSupported = function(o) {
|
|
26881
|
+
return e.Message.setProto3BooleanField(this, 2, o);
|
|
26882
|
+
}, proto.viam.component.encoder.v1.PositionType = {
|
|
26883
|
+
POSITION_TYPE_UNSPECIFIED: 0,
|
|
26884
|
+
POSITION_TYPE_TICKS_COUNT: 1,
|
|
26885
|
+
POSITION_TYPE_ANGLE_DEGREES: 2
|
|
26886
|
+
}, s.object.extend(t, proto.viam.component.encoder.v1);
|
|
26887
|
+
})(encoder_pb);
|
|
26888
|
+
var component_encoder_v1_encoder_pb = encoder_pb, common_v1_common_pb$f = common_pb, grpc$g = grpcWebClient_umdExports.grpc, EncoderService = function() {
|
|
26889
|
+
function t() {
|
|
26890
|
+
}
|
|
26891
|
+
return t.serviceName = "viam.component.encoder.v1.EncoderService", t;
|
|
26892
|
+
}();
|
|
26893
|
+
EncoderService.GetPosition = {
|
|
26894
|
+
methodName: "GetPosition",
|
|
26895
|
+
service: EncoderService,
|
|
26896
|
+
requestStream: !1,
|
|
26897
|
+
responseStream: !1,
|
|
26898
|
+
requestType: component_encoder_v1_encoder_pb.GetPositionRequest,
|
|
26899
|
+
responseType: component_encoder_v1_encoder_pb.GetPositionResponse
|
|
26900
|
+
};
|
|
26901
|
+
EncoderService.ResetPosition = {
|
|
26902
|
+
methodName: "ResetPosition",
|
|
26903
|
+
service: EncoderService,
|
|
26904
|
+
requestStream: !1,
|
|
26905
|
+
responseStream: !1,
|
|
26906
|
+
requestType: component_encoder_v1_encoder_pb.ResetPositionRequest,
|
|
26907
|
+
responseType: component_encoder_v1_encoder_pb.ResetPositionResponse
|
|
26908
|
+
};
|
|
26909
|
+
EncoderService.GetProperties = {
|
|
26910
|
+
methodName: "GetProperties",
|
|
26911
|
+
service: EncoderService,
|
|
26912
|
+
requestStream: !1,
|
|
26913
|
+
responseStream: !1,
|
|
26914
|
+
requestType: component_encoder_v1_encoder_pb.GetPropertiesRequest,
|
|
26915
|
+
responseType: component_encoder_v1_encoder_pb.GetPropertiesResponse
|
|
26916
|
+
};
|
|
26917
|
+
EncoderService.DoCommand = {
|
|
26918
|
+
methodName: "DoCommand",
|
|
26919
|
+
service: EncoderService,
|
|
26920
|
+
requestStream: !1,
|
|
26921
|
+
responseStream: !1,
|
|
26922
|
+
requestType: common_v1_common_pb$f.DoCommandRequest,
|
|
26923
|
+
responseType: common_v1_common_pb$f.DoCommandResponse
|
|
26924
|
+
};
|
|
26925
|
+
function EncoderServiceClient(t, e) {
|
|
26926
|
+
this.serviceHost = t, this.options = e || {};
|
|
26927
|
+
}
|
|
26928
|
+
EncoderServiceClient.prototype.getPosition = function t(e, s, n) {
|
|
26929
|
+
arguments.length === 2 && (n = arguments[1]);
|
|
26930
|
+
var u = grpc$g.unary(EncoderService.GetPosition, {
|
|
26931
|
+
request: e,
|
|
26932
|
+
host: this.serviceHost,
|
|
26933
|
+
metadata: s,
|
|
26934
|
+
transport: this.options.transport,
|
|
26935
|
+
debug: this.options.debug,
|
|
26936
|
+
onEnd: function(g) {
|
|
26937
|
+
if (n)
|
|
26938
|
+
if (g.status !== grpc$g.Code.OK) {
|
|
26939
|
+
var p = new Error(g.statusMessage);
|
|
26940
|
+
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
26941
|
+
} else
|
|
26942
|
+
n(null, g.message);
|
|
26943
|
+
}
|
|
26944
|
+
});
|
|
26945
|
+
return {
|
|
26946
|
+
cancel: function() {
|
|
26947
|
+
n = null, u.close();
|
|
26948
|
+
}
|
|
26949
|
+
};
|
|
26950
|
+
};
|
|
26951
|
+
EncoderServiceClient.prototype.resetPosition = function t(e, s, n) {
|
|
26952
|
+
arguments.length === 2 && (n = arguments[1]);
|
|
26953
|
+
var u = grpc$g.unary(EncoderService.ResetPosition, {
|
|
26954
|
+
request: e,
|
|
26955
|
+
host: this.serviceHost,
|
|
26956
|
+
metadata: s,
|
|
26957
|
+
transport: this.options.transport,
|
|
26958
|
+
debug: this.options.debug,
|
|
26959
|
+
onEnd: function(g) {
|
|
26960
|
+
if (n)
|
|
26961
|
+
if (g.status !== grpc$g.Code.OK) {
|
|
26962
|
+
var p = new Error(g.statusMessage);
|
|
26963
|
+
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
26964
|
+
} else
|
|
26965
|
+
n(null, g.message);
|
|
26966
|
+
}
|
|
26967
|
+
});
|
|
26968
|
+
return {
|
|
26969
|
+
cancel: function() {
|
|
26970
|
+
n = null, u.close();
|
|
26971
|
+
}
|
|
26972
|
+
};
|
|
26973
|
+
};
|
|
26974
|
+
EncoderServiceClient.prototype.getProperties = function t(e, s, n) {
|
|
26975
|
+
arguments.length === 2 && (n = arguments[1]);
|
|
26976
|
+
var u = grpc$g.unary(EncoderService.GetProperties, {
|
|
26977
|
+
request: e,
|
|
26978
|
+
host: this.serviceHost,
|
|
26979
|
+
metadata: s,
|
|
26980
|
+
transport: this.options.transport,
|
|
26981
|
+
debug: this.options.debug,
|
|
26982
|
+
onEnd: function(g) {
|
|
26983
|
+
if (n)
|
|
26984
|
+
if (g.status !== grpc$g.Code.OK) {
|
|
26985
|
+
var p = new Error(g.statusMessage);
|
|
26986
|
+
p.code = g.status, p.metadata = g.trailers, n(p, null);
|
|
26987
|
+
} else
|
|
26988
|
+
n(null, g.message);
|
|
26989
|
+
}
|
|
26990
|
+
});
|
|
26991
|
+
return {
|
|
26992
|
+
cancel: function() {
|
|
26993
|
+
n = null, u.close();
|
|
26994
|
+
}
|
|
26995
|
+
};
|
|
26996
|
+
};
|
|
26997
|
+
EncoderServiceClient.prototype.doCommand = function t(e, s, n) {
|
|
26998
|
+
arguments.length === 2 && (n = arguments[1]);
|
|
26999
|
+
var u = grpc$g.unary(EncoderService.DoCommand, {
|
|
26449
27000
|
request: e,
|
|
26450
27001
|
host: this.serviceHost,
|
|
26451
27002
|
metadata: s,
|
|
@@ -26466,7 +27017,7 @@ BoardServiceClient.prototype.setPowerMode = function t(e, s, n) {
|
|
|
26466
27017
|
}
|
|
26467
27018
|
};
|
|
26468
27019
|
};
|
|
26469
|
-
var
|
|
27020
|
+
var EncoderServiceClient_1 = EncoderServiceClient, gantry_pb = {};
|
|
26470
27021
|
(function(t) {
|
|
26471
27022
|
var e = googleProtobuf, s = e, n = function() {
|
|
26472
27023
|
return this || window || n || self || Function("return this")();
|
|
@@ -38862,6 +39413,7 @@ class RobotClient {
|
|
|
38862
39413
|
armServiceClient;
|
|
38863
39414
|
baseServiceClient;
|
|
38864
39415
|
boardServiceClient;
|
|
39416
|
+
encoderServiceClient;
|
|
38865
39417
|
gantryServiceClient;
|
|
38866
39418
|
genericServiceClient;
|
|
38867
39419
|
gripperServiceClient;
|
|
@@ -38908,6 +39460,11 @@ class RobotClient {
|
|
|
38908
39460
|
throw new Error(RobotClient.notConnectedYetStr);
|
|
38909
39461
|
return this.boardServiceClient;
|
|
38910
39462
|
}
|
|
39463
|
+
get encoderService() {
|
|
39464
|
+
if (!this.encoderServiceClient)
|
|
39465
|
+
throw new Error(RobotClient.notConnectedYetStr);
|
|
39466
|
+
return this.encoderServiceClient;
|
|
39467
|
+
}
|
|
38911
39468
|
get gantryService() {
|
|
38912
39469
|
if (!this.gantryServiceClient)
|
|
38913
39470
|
throw new Error(RobotClient.notConnectedYetStr);
|
|
@@ -39029,6 +39586,9 @@ class RobotClient {
|
|
|
39029
39586
|
), this.boardServiceClient = new BoardServiceClient_1(
|
|
39030
39587
|
this.serviceHost,
|
|
39031
39588
|
g
|
|
39589
|
+
), this.encoderServiceClient = new EncoderServiceClient_1(
|
|
39590
|
+
this.serviceHost,
|
|
39591
|
+
g
|
|
39032
39592
|
), this.gantryServiceClient = new GantryServiceClient_1(
|
|
39033
39593
|
this.serviceHost,
|
|
39034
39594
|
g
|
|
@@ -39186,23 +39746,13 @@ class ArmClient {
|
|
|
39186
39746
|
const g = (await promisify(s.getEndPosition.bind(s), n)).getPose();
|
|
39187
39747
|
if (!g)
|
|
39188
39748
|
throw new Error("no pose");
|
|
39189
|
-
return
|
|
39190
|
-
x: g.getX(),
|
|
39191
|
-
y: g.getY(),
|
|
39192
|
-
z: g.getZ(),
|
|
39193
|
-
ox: g.getOX(),
|
|
39194
|
-
oy: g.getOY(),
|
|
39195
|
-
oz: g.getOZ(),
|
|
39196
|
-
theta: g.getTheta()
|
|
39197
|
-
};
|
|
39749
|
+
return g.toObject();
|
|
39198
39750
|
}
|
|
39199
39751
|
async moveToPosition(e, s = {}) {
|
|
39200
|
-
const n = this.ArmService, u = new
|
|
39201
|
-
u.
|
|
39202
|
-
const g = new arm_pb.MoveToPositionRequest();
|
|
39203
|
-
g.setName(this.name), g.setTo(u), g.setExtra(struct_pb.Struct.fromJavaScript(s)), this.options.requestLogger?.(g), await promisify(
|
|
39752
|
+
const n = this.ArmService, u = new arm_pb.MoveToPositionRequest();
|
|
39753
|
+
u.setName(this.name), u.setTo(encodePose(e)), u.setExtra(struct_pb.Struct.fromJavaScript(s)), this.options.requestLogger?.(u), await promisify(
|
|
39204
39754
|
n.moveToPosition.bind(n),
|
|
39205
|
-
|
|
39755
|
+
u
|
|
39206
39756
|
);
|
|
39207
39757
|
}
|
|
39208
39758
|
async moveToJointPositions(e, s = {}) {
|
|
@@ -40666,6 +41216,32 @@ class CameraClient {
|
|
|
40666
41216
|
return s.setName(this.name), this.options.requestLogger?.(s), (await promisify(e.getProperties.bind(e), s)).toObject();
|
|
40667
41217
|
}
|
|
40668
41218
|
}
|
|
41219
|
+
var PositionType = /* @__PURE__ */ ((t) => (t[t.POSITION_TYPE_UNSPECIFIED = 0] = "POSITION_TYPE_UNSPECIFIED", t[t.POSITION_TYPE_TICKS_COUNT = 1] = "POSITION_TYPE_TICKS_COUNT", t[t.POSITION_TYPE_ANGLE_DEGREES = 2] = "POSITION_TYPE_ANGLE_DEGREES", t))(PositionType || {});
|
|
41220
|
+
class EncoderClient {
|
|
41221
|
+
client;
|
|
41222
|
+
name;
|
|
41223
|
+
options;
|
|
41224
|
+
constructor(e, s, n = {}) {
|
|
41225
|
+
this.client = e.createServiceClient(EncoderServiceClient_1), this.name = s, this.options = n;
|
|
41226
|
+
}
|
|
41227
|
+
get encoderService() {
|
|
41228
|
+
return this.client;
|
|
41229
|
+
}
|
|
41230
|
+
async resetPosition(e = {}) {
|
|
41231
|
+
const s = this.encoderService, n = new encoder_pb.ResetPositionRequest();
|
|
41232
|
+
n.setName(this.name), n.setExtra(struct_pb.Struct.fromJavaScript(e)), this.options.requestLogger?.(n), await promisify(s.resetPosition.bind(s), n);
|
|
41233
|
+
}
|
|
41234
|
+
async getProperties(e = {}) {
|
|
41235
|
+
const s = this.encoderService, n = new encoder_pb.GetPropertiesRequest();
|
|
41236
|
+
return n.setName(this.name), n.setExtra(struct_pb.Struct.fromJavaScript(e)), this.options.requestLogger?.(n), (await promisify(s.getProperties.bind(s), n)).toObject();
|
|
41237
|
+
}
|
|
41238
|
+
async getPosition(e = PositionType.POSITION_TYPE_UNSPECIFIED, s = {}) {
|
|
41239
|
+
const n = this.encoderService, u = new encoder_pb.GetPositionRequest();
|
|
41240
|
+
u.setName(this.name), u.setPositionType(e), u.setExtra(struct_pb.Struct.fromJavaScript(s)), this.options.requestLogger?.(u);
|
|
41241
|
+
const g = await promisify(n.getPosition.bind(n), u);
|
|
41242
|
+
return [g.getValue(), g.getPositionType()];
|
|
41243
|
+
}
|
|
41244
|
+
}
|
|
40669
41245
|
class MotorClient {
|
|
40670
41246
|
client;
|
|
40671
41247
|
name;
|
|
@@ -41402,14 +41978,84 @@ class StreamClient extends EventDispatcher {
|
|
|
41402
41978
|
}
|
|
41403
41979
|
}
|
|
41404
41980
|
}
|
|
41981
|
+
const encodeLinearConstraint = (t) => {
|
|
41982
|
+
const e = new motion_pb.LinearConstraint();
|
|
41983
|
+
return e.setLineToleranceMm(t.lineToleranceMm), e.setOrientationToleranceDegs(t.orientationToleranceDegs), e;
|
|
41984
|
+
}, encodeOrientationConstraint = (t) => {
|
|
41985
|
+
const e = new motion_pb.OrientationConstraint();
|
|
41986
|
+
return e.setOrientationToleranceDegs(t.orientationToleranceDegs), e;
|
|
41987
|
+
}, encodeAllowedFrameCollisions = (t) => {
|
|
41988
|
+
const e = new motion_pb.CollisionSpecification.AllowedFrameCollisions();
|
|
41989
|
+
return e.setFrame1(t.frame1), e.setFrame2(t.frame2), e;
|
|
41990
|
+
}, encodeCollisionSpecification = (t) => {
|
|
41991
|
+
const e = new motion_pb.CollisionSpecification();
|
|
41992
|
+
return e.setAllowsList(
|
|
41993
|
+
t.allowsList.map((s) => encodeAllowedFrameCollisions(s))
|
|
41994
|
+
), e;
|
|
41995
|
+
}, encodeConstraints = (t) => {
|
|
41996
|
+
const e = new motion_pb.Constraints();
|
|
41997
|
+
return e.setLinearConstraintList(
|
|
41998
|
+
t.linearConstraintList.map((s) => encodeLinearConstraint(s))
|
|
41999
|
+
), e.setOrientationConstraintList(
|
|
42000
|
+
t.orientationConstraintList.map((s) => encodeOrientationConstraint(s))
|
|
42001
|
+
), e.setCollisionSpecificationList(
|
|
42002
|
+
t.collisionSpecificationList.map((s) => encodeCollisionSpecification(s))
|
|
42003
|
+
), e;
|
|
42004
|
+
};
|
|
42005
|
+
class MotionClient {
|
|
42006
|
+
client;
|
|
42007
|
+
name;
|
|
42008
|
+
options;
|
|
42009
|
+
constructor(e, s, n = {}) {
|
|
42010
|
+
this.client = e.createServiceClient(MotionServiceClient_1), this.name = s, this.options = n;
|
|
42011
|
+
}
|
|
42012
|
+
get service() {
|
|
42013
|
+
return this.client;
|
|
42014
|
+
}
|
|
42015
|
+
async move(e, s, n, u, g = {}) {
|
|
42016
|
+
const p = this.service, o = new motion_pb.MoveRequest();
|
|
42017
|
+
return o.setName(this.name), o.setDestination(encodePoseInFrame(e)), o.setComponentName(encodeResourceName(s)), n !== void 0 && o.setWorldState(encodeWorldState(n)), u !== void 0 && o.setConstraints(encodeConstraints(u)), o.setExtra(struct_pb.Struct.fromJavaScript(g)), this.options.requestLogger?.(o), (await promisify(
|
|
42018
|
+
p.move.bind(p),
|
|
42019
|
+
o
|
|
42020
|
+
)).getSuccess();
|
|
42021
|
+
}
|
|
42022
|
+
async moveOnMap(e, s, n, u = {}) {
|
|
42023
|
+
const g = this.service, p = new motion_pb.MoveOnMapRequest();
|
|
42024
|
+
return p.setName(this.name), p.setDestination(encodePose(e)), p.setComponentName(encodeResourceName(s)), p.setSlamServiceName(encodeResourceName(n)), p.setExtra(struct_pb.Struct.fromJavaScript(u)), this.options.requestLogger?.(p), (await promisify(
|
|
42025
|
+
g.moveOnMap.bind(g),
|
|
42026
|
+
p
|
|
42027
|
+
)).getSuccess();
|
|
42028
|
+
}
|
|
42029
|
+
async moveSingleComponent(e, s, n, u = {}) {
|
|
42030
|
+
const g = this.service, p = new motion_pb.MoveSingleComponentRequest();
|
|
42031
|
+
return p.setName(this.name), p.setDestination(encodePoseInFrame(e)), p.setComponentName(encodeResourceName(s)), n !== void 0 && p.setWorldState(encodeWorldState(n)), p.setExtra(struct_pb.Struct.fromJavaScript(u)), this.options.requestLogger?.(p), (await promisify(g.moveSingleComponent.bind(g), p)).getSuccess();
|
|
42032
|
+
}
|
|
42033
|
+
async getPose(e, s, n, u = {}) {
|
|
42034
|
+
const g = this.service, p = new motion_pb.GetPoseRequest();
|
|
42035
|
+
p.setName(this.name), p.setComponentName(encodeResourceName(e)), p.setDestinationFrame(s), p.setSupplementalTransformsList(
|
|
42036
|
+
n.map((i) => encodeTransform(i))
|
|
42037
|
+
), p.setExtra(struct_pb.Struct.fromJavaScript(u)), this.options.requestLogger?.(p);
|
|
42038
|
+
const r = (await promisify(
|
|
42039
|
+
g.getPose.bind(g),
|
|
42040
|
+
p
|
|
42041
|
+
)).getPose();
|
|
42042
|
+
if (!r)
|
|
42043
|
+
throw new Error("no pose");
|
|
42044
|
+
return r.toObject();
|
|
42045
|
+
}
|
|
42046
|
+
}
|
|
42047
|
+
const version = "0.0.43";
|
|
41405
42048
|
export {
|
|
41406
42049
|
ArmClient,
|
|
41407
42050
|
BaseClient,
|
|
41408
42051
|
BoardClient,
|
|
41409
42052
|
CameraClient,
|
|
41410
42053
|
RobotClient as Client,
|
|
42054
|
+
EncoderClient,
|
|
42055
|
+
MotionClient,
|
|
41411
42056
|
MotorClient,
|
|
41412
42057
|
MovementSensorClient,
|
|
42058
|
+
PositionType,
|
|
41413
42059
|
RobotClient,
|
|
41414
42060
|
SensorClient,
|
|
41415
42061
|
StreamClient,
|
|
@@ -41419,6 +42065,7 @@ export {
|
|
|
41419
42065
|
camera_pb as cameraApi,
|
|
41420
42066
|
common_pb as commonApi,
|
|
41421
42067
|
createRobotClient,
|
|
42068
|
+
encoder_pb as encoderApi,
|
|
41422
42069
|
gantry_pb as gantryApi,
|
|
41423
42070
|
generic_pb as genericApi,
|
|
41424
42071
|
gripper_pb as gripperApi,
|