@viamrobotics/sdk 0.1.0-pre.1 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/extra/stream/client.d.ts +0 -1
- package/dist/main.es.js +164 -621
- package/dist/main.umd.js +5 -5
- package/dist/robot/client.d.ts +0 -2
- package/dist/robot/dial.d.ts +0 -1
- package/package.json +2 -3
package/dist/main.es.js
CHANGED
|
@@ -12501,436 +12501,7 @@ var timestamp_pb = {};
|
|
|
12501
12501
|
PEER_CONNECTION_TYPE_WEBRTC: 2
|
|
12502
12502
|
}, s.object.extend(t, proto.viam.robot.v1);
|
|
12503
12503
|
})(robot_pb);
|
|
12504
|
-
var
|
|
12505
|
-
return __assign = Object.assign || function(t) {
|
|
12506
|
-
for (var e, s = 1, i = arguments.length; s < i; s++) {
|
|
12507
|
-
e = arguments[s];
|
|
12508
|
-
for (var u in e)
|
|
12509
|
-
Object.prototype.hasOwnProperty.call(e, u) && (t[u] = e[u]);
|
|
12510
|
-
}
|
|
12511
|
-
return t;
|
|
12512
|
-
}, __assign.apply(this, arguments);
|
|
12513
|
-
};
|
|
12514
|
-
Object.defineProperty(options, "__esModule", { value: !0 });
|
|
12515
|
-
var defaultOptions = {
|
|
12516
|
-
delayFirstAttempt: !1,
|
|
12517
|
-
jitter: "none",
|
|
12518
|
-
maxDelay: 1 / 0,
|
|
12519
|
-
numOfAttempts: 10,
|
|
12520
|
-
retry: function() {
|
|
12521
|
-
return !0;
|
|
12522
|
-
},
|
|
12523
|
-
startingDelay: 100,
|
|
12524
|
-
timeMultiple: 2
|
|
12525
|
-
};
|
|
12526
|
-
function getSanitizedOptions(t) {
|
|
12527
|
-
var e = __assign(__assign({}, defaultOptions), t);
|
|
12528
|
-
return e.numOfAttempts < 1 && (e.numOfAttempts = 1), e;
|
|
12529
|
-
}
|
|
12530
|
-
options.getSanitizedOptions = getSanitizedOptions;
|
|
12531
|
-
var delay_factory = {}, skipFirst_delay = {}, delay_base = {}, jitter_factory = {}, full_jitter = {};
|
|
12532
|
-
Object.defineProperty(full_jitter, "__esModule", { value: !0 });
|
|
12533
|
-
function fullJitter(t) {
|
|
12534
|
-
var e = Math.random() * t;
|
|
12535
|
-
return Math.round(e);
|
|
12536
|
-
}
|
|
12537
|
-
full_jitter.fullJitter = fullJitter;
|
|
12538
|
-
var no_jitter = {};
|
|
12539
|
-
Object.defineProperty(no_jitter, "__esModule", { value: !0 });
|
|
12540
|
-
function noJitter(t) {
|
|
12541
|
-
return t;
|
|
12542
|
-
}
|
|
12543
|
-
no_jitter.noJitter = noJitter;
|
|
12544
|
-
Object.defineProperty(jitter_factory, "__esModule", { value: !0 });
|
|
12545
|
-
var full_jitter_1 = full_jitter, no_jitter_1 = no_jitter;
|
|
12546
|
-
function JitterFactory(t) {
|
|
12547
|
-
switch (t.jitter) {
|
|
12548
|
-
case "full":
|
|
12549
|
-
return full_jitter_1.fullJitter;
|
|
12550
|
-
case "none":
|
|
12551
|
-
default:
|
|
12552
|
-
return no_jitter_1.noJitter;
|
|
12553
|
-
}
|
|
12554
|
-
}
|
|
12555
|
-
jitter_factory.JitterFactory = JitterFactory;
|
|
12556
|
-
Object.defineProperty(delay_base, "__esModule", { value: !0 });
|
|
12557
|
-
var jitter_factory_1 = jitter_factory, Delay = (
|
|
12558
|
-
/** @class */
|
|
12559
|
-
function() {
|
|
12560
|
-
function t(e) {
|
|
12561
|
-
this.options = e, this.attempt = 0;
|
|
12562
|
-
}
|
|
12563
|
-
return t.prototype.apply = function() {
|
|
12564
|
-
var e = this;
|
|
12565
|
-
return new Promise(function(s) {
|
|
12566
|
-
return setTimeout(s, e.jitteredDelay);
|
|
12567
|
-
});
|
|
12568
|
-
}, t.prototype.setAttemptNumber = function(e) {
|
|
12569
|
-
this.attempt = e;
|
|
12570
|
-
}, Object.defineProperty(t.prototype, "jitteredDelay", {
|
|
12571
|
-
get: function() {
|
|
12572
|
-
var e = jitter_factory_1.JitterFactory(this.options);
|
|
12573
|
-
return e(this.delay);
|
|
12574
|
-
},
|
|
12575
|
-
enumerable: !0,
|
|
12576
|
-
configurable: !0
|
|
12577
|
-
}), Object.defineProperty(t.prototype, "delay", {
|
|
12578
|
-
get: function() {
|
|
12579
|
-
var e = this.options.startingDelay, s = this.options.timeMultiple, i = this.numOfDelayedAttempts, u = e * Math.pow(s, i);
|
|
12580
|
-
return Math.min(u, this.options.maxDelay);
|
|
12581
|
-
},
|
|
12582
|
-
enumerable: !0,
|
|
12583
|
-
configurable: !0
|
|
12584
|
-
}), Object.defineProperty(t.prototype, "numOfDelayedAttempts", {
|
|
12585
|
-
get: function() {
|
|
12586
|
-
return this.attempt;
|
|
12587
|
-
},
|
|
12588
|
-
enumerable: !0,
|
|
12589
|
-
configurable: !0
|
|
12590
|
-
}), t;
|
|
12591
|
-
}()
|
|
12592
|
-
);
|
|
12593
|
-
delay_base.Delay = Delay;
|
|
12594
|
-
var __extends$1 = commonjsGlobal && commonjsGlobal.__extends || function() {
|
|
12595
|
-
var t = function(e, s) {
|
|
12596
|
-
return t = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(i, u) {
|
|
12597
|
-
i.__proto__ = u;
|
|
12598
|
-
} || function(i, u) {
|
|
12599
|
-
for (var g in u)
|
|
12600
|
-
u.hasOwnProperty(g) && (i[g] = u[g]);
|
|
12601
|
-
}, t(e, s);
|
|
12602
|
-
};
|
|
12603
|
-
return function(e, s) {
|
|
12604
|
-
t(e, s);
|
|
12605
|
-
function i() {
|
|
12606
|
-
this.constructor = e;
|
|
12607
|
-
}
|
|
12608
|
-
e.prototype = s === null ? Object.create(s) : (i.prototype = s.prototype, new i());
|
|
12609
|
-
};
|
|
12610
|
-
}(), __awaiter$1 = commonjsGlobal && commonjsGlobal.__awaiter || function(t, e, s, i) {
|
|
12611
|
-
function u(g) {
|
|
12612
|
-
return g instanceof s ? g : new s(function(p) {
|
|
12613
|
-
p(g);
|
|
12614
|
-
});
|
|
12615
|
-
}
|
|
12616
|
-
return new (s || (s = Promise))(function(g, p) {
|
|
12617
|
-
function o(l) {
|
|
12618
|
-
try {
|
|
12619
|
-
n(i.next(l));
|
|
12620
|
-
} catch (c) {
|
|
12621
|
-
p(c);
|
|
12622
|
-
}
|
|
12623
|
-
}
|
|
12624
|
-
function r(l) {
|
|
12625
|
-
try {
|
|
12626
|
-
n(i.throw(l));
|
|
12627
|
-
} catch (c) {
|
|
12628
|
-
p(c);
|
|
12629
|
-
}
|
|
12630
|
-
}
|
|
12631
|
-
function n(l) {
|
|
12632
|
-
l.done ? g(l.value) : u(l.value).then(o, r);
|
|
12633
|
-
}
|
|
12634
|
-
n((i = i.apply(t, e || [])).next());
|
|
12635
|
-
});
|
|
12636
|
-
}, __generator$1 = commonjsGlobal && commonjsGlobal.__generator || function(t, e) {
|
|
12637
|
-
var s = { label: 0, sent: function() {
|
|
12638
|
-
if (g[0] & 1)
|
|
12639
|
-
throw g[1];
|
|
12640
|
-
return g[1];
|
|
12641
|
-
}, trys: [], ops: [] }, i, u, g, p;
|
|
12642
|
-
return p = { next: o(0), throw: o(1), return: o(2) }, typeof Symbol == "function" && (p[Symbol.iterator] = function() {
|
|
12643
|
-
return this;
|
|
12644
|
-
}), p;
|
|
12645
|
-
function o(n) {
|
|
12646
|
-
return function(l) {
|
|
12647
|
-
return r([n, l]);
|
|
12648
|
-
};
|
|
12649
|
-
}
|
|
12650
|
-
function r(n) {
|
|
12651
|
-
if (i)
|
|
12652
|
-
throw new TypeError("Generator is already executing.");
|
|
12653
|
-
for (; s; )
|
|
12654
|
-
try {
|
|
12655
|
-
if (i = 1, u && (g = n[0] & 2 ? u.return : n[0] ? u.throw || ((g = u.return) && g.call(u), 0) : u.next) && !(g = g.call(u, n[1])).done)
|
|
12656
|
-
return g;
|
|
12657
|
-
switch (u = 0, g && (n = [n[0] & 2, g.value]), n[0]) {
|
|
12658
|
-
case 0:
|
|
12659
|
-
case 1:
|
|
12660
|
-
g = n;
|
|
12661
|
-
break;
|
|
12662
|
-
case 4:
|
|
12663
|
-
return s.label++, { value: n[1], done: !1 };
|
|
12664
|
-
case 5:
|
|
12665
|
-
s.label++, u = n[1], n = [0];
|
|
12666
|
-
continue;
|
|
12667
|
-
case 7:
|
|
12668
|
-
n = s.ops.pop(), s.trys.pop();
|
|
12669
|
-
continue;
|
|
12670
|
-
default:
|
|
12671
|
-
if (g = s.trys, !(g = g.length > 0 && g[g.length - 1]) && (n[0] === 6 || n[0] === 2)) {
|
|
12672
|
-
s = 0;
|
|
12673
|
-
continue;
|
|
12674
|
-
}
|
|
12675
|
-
if (n[0] === 3 && (!g || n[1] > g[0] && n[1] < g[3])) {
|
|
12676
|
-
s.label = n[1];
|
|
12677
|
-
break;
|
|
12678
|
-
}
|
|
12679
|
-
if (n[0] === 6 && s.label < g[1]) {
|
|
12680
|
-
s.label = g[1], g = n;
|
|
12681
|
-
break;
|
|
12682
|
-
}
|
|
12683
|
-
if (g && s.label < g[2]) {
|
|
12684
|
-
s.label = g[2], s.ops.push(n);
|
|
12685
|
-
break;
|
|
12686
|
-
}
|
|
12687
|
-
g[2] && s.ops.pop(), s.trys.pop();
|
|
12688
|
-
continue;
|
|
12689
|
-
}
|
|
12690
|
-
n = e.call(t, s);
|
|
12691
|
-
} catch (l) {
|
|
12692
|
-
n = [6, l], u = 0;
|
|
12693
|
-
} finally {
|
|
12694
|
-
i = g = 0;
|
|
12695
|
-
}
|
|
12696
|
-
if (n[0] & 5)
|
|
12697
|
-
throw n[1];
|
|
12698
|
-
return { value: n[0] ? n[1] : void 0, done: !0 };
|
|
12699
|
-
}
|
|
12700
|
-
};
|
|
12701
|
-
Object.defineProperty(skipFirst_delay, "__esModule", { value: !0 });
|
|
12702
|
-
var delay_base_1$1 = delay_base, SkipFirstDelay = (
|
|
12703
|
-
/** @class */
|
|
12704
|
-
function(t) {
|
|
12705
|
-
__extends$1(e, t);
|
|
12706
|
-
function e() {
|
|
12707
|
-
return t !== null && t.apply(this, arguments) || this;
|
|
12708
|
-
}
|
|
12709
|
-
return e.prototype.apply = function() {
|
|
12710
|
-
return __awaiter$1(this, void 0, void 0, function() {
|
|
12711
|
-
return __generator$1(this, function(s) {
|
|
12712
|
-
return [2, this.isFirstAttempt ? !0 : t.prototype.apply.call(this)];
|
|
12713
|
-
});
|
|
12714
|
-
});
|
|
12715
|
-
}, Object.defineProperty(e.prototype, "isFirstAttempt", {
|
|
12716
|
-
get: function() {
|
|
12717
|
-
return this.attempt === 0;
|
|
12718
|
-
},
|
|
12719
|
-
enumerable: !0,
|
|
12720
|
-
configurable: !0
|
|
12721
|
-
}), Object.defineProperty(e.prototype, "numOfDelayedAttempts", {
|
|
12722
|
-
get: function() {
|
|
12723
|
-
return this.attempt - 1;
|
|
12724
|
-
},
|
|
12725
|
-
enumerable: !0,
|
|
12726
|
-
configurable: !0
|
|
12727
|
-
}), e;
|
|
12728
|
-
}(delay_base_1$1.Delay)
|
|
12729
|
-
);
|
|
12730
|
-
skipFirst_delay.SkipFirstDelay = SkipFirstDelay;
|
|
12731
|
-
var always_delay = {}, __extends = commonjsGlobal && commonjsGlobal.__extends || function() {
|
|
12732
|
-
var t = function(e, s) {
|
|
12733
|
-
return t = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(i, u) {
|
|
12734
|
-
i.__proto__ = u;
|
|
12735
|
-
} || function(i, u) {
|
|
12736
|
-
for (var g in u)
|
|
12737
|
-
u.hasOwnProperty(g) && (i[g] = u[g]);
|
|
12738
|
-
}, t(e, s);
|
|
12739
|
-
};
|
|
12740
|
-
return function(e, s) {
|
|
12741
|
-
t(e, s);
|
|
12742
|
-
function i() {
|
|
12743
|
-
this.constructor = e;
|
|
12744
|
-
}
|
|
12745
|
-
e.prototype = s === null ? Object.create(s) : (i.prototype = s.prototype, new i());
|
|
12746
|
-
};
|
|
12747
|
-
}();
|
|
12748
|
-
Object.defineProperty(always_delay, "__esModule", { value: !0 });
|
|
12749
|
-
var delay_base_1 = delay_base, AlwaysDelay = (
|
|
12750
|
-
/** @class */
|
|
12751
|
-
function(t) {
|
|
12752
|
-
__extends(e, t);
|
|
12753
|
-
function e() {
|
|
12754
|
-
return t !== null && t.apply(this, arguments) || this;
|
|
12755
|
-
}
|
|
12756
|
-
return e;
|
|
12757
|
-
}(delay_base_1.Delay)
|
|
12758
|
-
);
|
|
12759
|
-
always_delay.AlwaysDelay = AlwaysDelay;
|
|
12760
|
-
Object.defineProperty(delay_factory, "__esModule", { value: !0 });
|
|
12761
|
-
var skip_first_delay_1 = skipFirst_delay, always_delay_1 = always_delay;
|
|
12762
|
-
function DelayFactory(t, e) {
|
|
12763
|
-
var s = initDelayClass(t);
|
|
12764
|
-
return s.setAttemptNumber(e), s;
|
|
12765
|
-
}
|
|
12766
|
-
delay_factory.DelayFactory = DelayFactory;
|
|
12767
|
-
function initDelayClass(t) {
|
|
12768
|
-
return t.delayFirstAttempt ? new always_delay_1.AlwaysDelay(t) : new skip_first_delay_1.SkipFirstDelay(t);
|
|
12769
|
-
}
|
|
12770
|
-
var __awaiter = commonjsGlobal && commonjsGlobal.__awaiter || function(t, e, s, i) {
|
|
12771
|
-
function u(g) {
|
|
12772
|
-
return g instanceof s ? g : new s(function(p) {
|
|
12773
|
-
p(g);
|
|
12774
|
-
});
|
|
12775
|
-
}
|
|
12776
|
-
return new (s || (s = Promise))(function(g, p) {
|
|
12777
|
-
function o(l) {
|
|
12778
|
-
try {
|
|
12779
|
-
n(i.next(l));
|
|
12780
|
-
} catch (c) {
|
|
12781
|
-
p(c);
|
|
12782
|
-
}
|
|
12783
|
-
}
|
|
12784
|
-
function r(l) {
|
|
12785
|
-
try {
|
|
12786
|
-
n(i.throw(l));
|
|
12787
|
-
} catch (c) {
|
|
12788
|
-
p(c);
|
|
12789
|
-
}
|
|
12790
|
-
}
|
|
12791
|
-
function n(l) {
|
|
12792
|
-
l.done ? g(l.value) : u(l.value).then(o, r);
|
|
12793
|
-
}
|
|
12794
|
-
n((i = i.apply(t, e || [])).next());
|
|
12795
|
-
});
|
|
12796
|
-
}, __generator = commonjsGlobal && commonjsGlobal.__generator || function(t, e) {
|
|
12797
|
-
var s = { label: 0, sent: function() {
|
|
12798
|
-
if (g[0] & 1)
|
|
12799
|
-
throw g[1];
|
|
12800
|
-
return g[1];
|
|
12801
|
-
}, trys: [], ops: [] }, i, u, g, p;
|
|
12802
|
-
return p = { next: o(0), throw: o(1), return: o(2) }, typeof Symbol == "function" && (p[Symbol.iterator] = function() {
|
|
12803
|
-
return this;
|
|
12804
|
-
}), p;
|
|
12805
|
-
function o(n) {
|
|
12806
|
-
return function(l) {
|
|
12807
|
-
return r([n, l]);
|
|
12808
|
-
};
|
|
12809
|
-
}
|
|
12810
|
-
function r(n) {
|
|
12811
|
-
if (i)
|
|
12812
|
-
throw new TypeError("Generator is already executing.");
|
|
12813
|
-
for (; s; )
|
|
12814
|
-
try {
|
|
12815
|
-
if (i = 1, u && (g = n[0] & 2 ? u.return : n[0] ? u.throw || ((g = u.return) && g.call(u), 0) : u.next) && !(g = g.call(u, n[1])).done)
|
|
12816
|
-
return g;
|
|
12817
|
-
switch (u = 0, g && (n = [n[0] & 2, g.value]), n[0]) {
|
|
12818
|
-
case 0:
|
|
12819
|
-
case 1:
|
|
12820
|
-
g = n;
|
|
12821
|
-
break;
|
|
12822
|
-
case 4:
|
|
12823
|
-
return s.label++, { value: n[1], done: !1 };
|
|
12824
|
-
case 5:
|
|
12825
|
-
s.label++, u = n[1], n = [0];
|
|
12826
|
-
continue;
|
|
12827
|
-
case 7:
|
|
12828
|
-
n = s.ops.pop(), s.trys.pop();
|
|
12829
|
-
continue;
|
|
12830
|
-
default:
|
|
12831
|
-
if (g = s.trys, !(g = g.length > 0 && g[g.length - 1]) && (n[0] === 6 || n[0] === 2)) {
|
|
12832
|
-
s = 0;
|
|
12833
|
-
continue;
|
|
12834
|
-
}
|
|
12835
|
-
if (n[0] === 3 && (!g || n[1] > g[0] && n[1] < g[3])) {
|
|
12836
|
-
s.label = n[1];
|
|
12837
|
-
break;
|
|
12838
|
-
}
|
|
12839
|
-
if (n[0] === 6 && s.label < g[1]) {
|
|
12840
|
-
s.label = g[1], g = n;
|
|
12841
|
-
break;
|
|
12842
|
-
}
|
|
12843
|
-
if (g && s.label < g[2]) {
|
|
12844
|
-
s.label = g[2], s.ops.push(n);
|
|
12845
|
-
break;
|
|
12846
|
-
}
|
|
12847
|
-
g[2] && s.ops.pop(), s.trys.pop();
|
|
12848
|
-
continue;
|
|
12849
|
-
}
|
|
12850
|
-
n = e.call(t, s);
|
|
12851
|
-
} catch (l) {
|
|
12852
|
-
n = [6, l], u = 0;
|
|
12853
|
-
} finally {
|
|
12854
|
-
i = g = 0;
|
|
12855
|
-
}
|
|
12856
|
-
if (n[0] & 5)
|
|
12857
|
-
throw n[1];
|
|
12858
|
-
return { value: n[0] ? n[1] : void 0, done: !0 };
|
|
12859
|
-
}
|
|
12860
|
-
};
|
|
12861
|
-
Object.defineProperty(backoff, "__esModule", { value: !0 });
|
|
12862
|
-
var options_1 = options, delay_factory_1 = delay_factory;
|
|
12863
|
-
function backOff(t, e) {
|
|
12864
|
-
return e === void 0 && (e = {}), __awaiter(this, void 0, void 0, function() {
|
|
12865
|
-
var s, i;
|
|
12866
|
-
return __generator(this, function(u) {
|
|
12867
|
-
switch (u.label) {
|
|
12868
|
-
case 0:
|
|
12869
|
-
return s = options_1.getSanitizedOptions(e), i = new BackOff(t, s), [4, i.execute()];
|
|
12870
|
-
case 1:
|
|
12871
|
-
return [2, u.sent()];
|
|
12872
|
-
}
|
|
12873
|
-
});
|
|
12874
|
-
});
|
|
12875
|
-
}
|
|
12876
|
-
var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
12877
|
-
/** @class */
|
|
12878
|
-
function() {
|
|
12879
|
-
function t(e, s) {
|
|
12880
|
-
this.request = e, this.options = s, this.attemptNumber = 0;
|
|
12881
|
-
}
|
|
12882
|
-
return t.prototype.execute = function() {
|
|
12883
|
-
return __awaiter(this, void 0, void 0, function() {
|
|
12884
|
-
var e, s;
|
|
12885
|
-
return __generator(this, function(i) {
|
|
12886
|
-
switch (i.label) {
|
|
12887
|
-
case 0:
|
|
12888
|
-
if (this.attemptLimitReached)
|
|
12889
|
-
return [3, 7];
|
|
12890
|
-
i.label = 1;
|
|
12891
|
-
case 1:
|
|
12892
|
-
return i.trys.push([1, 4, , 6]), [4, this.applyDelay()];
|
|
12893
|
-
case 2:
|
|
12894
|
-
return i.sent(), [4, this.request()];
|
|
12895
|
-
case 3:
|
|
12896
|
-
return [2, i.sent()];
|
|
12897
|
-
case 4:
|
|
12898
|
-
return e = i.sent(), this.attemptNumber++, [4, this.options.retry(e, this.attemptNumber)];
|
|
12899
|
-
case 5:
|
|
12900
|
-
if (s = i.sent(), !s || this.attemptLimitReached)
|
|
12901
|
-
throw e;
|
|
12902
|
-
return [3, 6];
|
|
12903
|
-
case 6:
|
|
12904
|
-
return [3, 0];
|
|
12905
|
-
case 7:
|
|
12906
|
-
throw new Error("Something went wrong.");
|
|
12907
|
-
}
|
|
12908
|
-
});
|
|
12909
|
-
});
|
|
12910
|
-
}, Object.defineProperty(t.prototype, "attemptLimitReached", {
|
|
12911
|
-
get: function() {
|
|
12912
|
-
return this.attemptNumber >= this.options.numOfAttempts;
|
|
12913
|
-
},
|
|
12914
|
-
enumerable: !0,
|
|
12915
|
-
configurable: !0
|
|
12916
|
-
}), t.prototype.applyDelay = function() {
|
|
12917
|
-
return __awaiter(this, void 0, void 0, function() {
|
|
12918
|
-
var e;
|
|
12919
|
-
return __generator(this, function(s) {
|
|
12920
|
-
switch (s.label) {
|
|
12921
|
-
case 0:
|
|
12922
|
-
return e = delay_factory_1.DelayFactory(this.options, this.attemptNumber), [4, e.apply()];
|
|
12923
|
-
case 1:
|
|
12924
|
-
return s.sent(), [
|
|
12925
|
-
2
|
|
12926
|
-
/*return*/
|
|
12927
|
-
];
|
|
12928
|
-
}
|
|
12929
|
-
});
|
|
12930
|
-
});
|
|
12931
|
-
}, t;
|
|
12932
|
-
}()
|
|
12933
|
-
), __webpack_modules__ = { 37: function(t) {
|
|
12504
|
+
var __webpack_modules__ = { 37: function(t) {
|
|
12934
12505
|
t.exports = function(e) {
|
|
12935
12506
|
var s = {};
|
|
12936
12507
|
function i(u) {
|
|
@@ -13516,8 +13087,8 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
13516
13087
|
else if (this.position === this.buffer.byteLength)
|
|
13517
13088
|
this.buffer = v, this.position = 0;
|
|
13518
13089
|
else {
|
|
13519
|
-
var M = this.buffer.byteLength - this.position, h = new Uint8Array(M + v.byteLength),
|
|
13520
|
-
h.set(
|
|
13090
|
+
var M = this.buffer.byteLength - this.position, h = new Uint8Array(M + v.byteLength), _ = c(this.buffer, this.position);
|
|
13091
|
+
h.set(_, 0);
|
|
13521
13092
|
var w = new Uint8Array(v);
|
|
13522
13093
|
h.set(w, M), this.buffer = h, this.position = 0;
|
|
13523
13094
|
}
|
|
@@ -20061,8 +19632,8 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
20061
19632
|
C += "".concat(q, ": ").concat(N.join(", "), `\r
|
|
20062
19633
|
`);
|
|
20063
19634
|
}), n(C);
|
|
20064
|
-
}(b),
|
|
20065
|
-
new DataView(
|
|
19635
|
+
}(b), _ = new ArrayBuffer(h.length + 5);
|
|
19636
|
+
new DataView(_, 0, 1).setUint8(0, 128), new DataView(_, 1, 4).setUint32(0, h.length, !1), new Uint8Array(_, 5).set(h), this.opts.onChunk(new Uint8Array(_)), y !== 0 ? this.closeWithRecvError(new p.GRPCError(y, f)) : this.closeWithRecvError();
|
|
20066
19637
|
} }), m;
|
|
20067
19638
|
}(g.BaseStream);
|
|
20068
19639
|
function n(d) {
|
|
@@ -20093,19 +19664,19 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
20093
19664
|
}, 512: (t, e, s) => {
|
|
20094
19665
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.dialWebRTC = e.dialDirect = void 0;
|
|
20095
19666
|
var i = s(655), u = s(37), g = s(138), p = s(758), o = s(743), r = s(34), n = s(165), l = s(400), c = s(982), d = s(958), m = s(93);
|
|
20096
|
-
function v(h,
|
|
19667
|
+
function v(h, _) {
|
|
20097
19668
|
return i.__awaiter(this, void 0, void 0, function() {
|
|
20098
19669
|
var w, C;
|
|
20099
19670
|
return i.__generator(this, function(q) {
|
|
20100
|
-
return M(
|
|
19671
|
+
return M(_), w = function(N) {
|
|
20101
19672
|
return u.grpc.CrossBrowserHttpTransport({ withCredentials: !1 })(N);
|
|
20102
|
-
}, !
|
|
19673
|
+
}, !_?.accessToken || _?.externalAuthAddress && _?.externalAuthToEntity ? _ && (_?.credentials || _?.accessToken) ? [2, y(h, w, _)] : [2, w] : ((C = new u.grpc.Metadata()).set("authorization", "Bearer ".concat(_.accessToken)), [2, function(N) {
|
|
20103
19674
|
return new f(N, w, C);
|
|
20104
19675
|
}]);
|
|
20105
19676
|
});
|
|
20106
19677
|
});
|
|
20107
19678
|
}
|
|
20108
|
-
function y(h,
|
|
19679
|
+
function y(h, _, w) {
|
|
20109
19680
|
return i.__awaiter(this, void 0, void 0, function() {
|
|
20110
19681
|
var C, q, N, x = this;
|
|
20111
19682
|
return i.__generator(this, function(U) {
|
|
@@ -20113,31 +19684,31 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
20113
19684
|
case 0:
|
|
20114
19685
|
return C = "", q = function() {
|
|
20115
19686
|
return i.__awaiter(x, void 0, void 0, function() {
|
|
20116
|
-
var
|
|
19687
|
+
var G, z, k, S, R, O, E, F, P, T;
|
|
20117
19688
|
return i.__generator(this, function(j) {
|
|
20118
19689
|
switch (j.label) {
|
|
20119
19690
|
case 0:
|
|
20120
|
-
return C != "" ? [3, 5] : (
|
|
19691
|
+
return C != "" ? [3, 5] : (G = "", w.accessToken && w.accessToken !== "" ? [3, 2] : ((E = new n.AuthenticateRequest()).setEntity(w.authEntity ? w.authEntity : h.replace(/^(.*:\/\/)/, "")), (S = new n.Credentials()).setType((P = w.credentials) === null || P === void 0 ? void 0 : P.type), S.setPayload((T = w.credentials) === null || T === void 0 ? void 0 : T.payload), E.setCredentials(S), O = new Promise(function(A, D) {
|
|
20121
19692
|
z = A, k = D;
|
|
20122
|
-
}), u.grpc.invoke(l.AuthService.Authenticate, { request: E, host: w.externalAuthAddress ? w.externalAuthAddress : h, transport:
|
|
20123
|
-
|
|
19693
|
+
}), u.grpc.invoke(l.AuthService.Authenticate, { request: E, host: w.externalAuthAddress ? w.externalAuthAddress : h, transport: _, onMessage: function(A) {
|
|
19694
|
+
G = A.getAccessToken();
|
|
20124
19695
|
}, onEnd: function(A, D, B) {
|
|
20125
19696
|
A == u.grpc.Code.OK ? z(F) : k(D);
|
|
20126
|
-
} }), [4,
|
|
19697
|
+
} }), [4, O]));
|
|
20127
19698
|
case 1:
|
|
20128
19699
|
return j.sent(), [3, 3];
|
|
20129
19700
|
case 2:
|
|
20130
|
-
|
|
19701
|
+
G = w.accessToken, j.label = 3;
|
|
20131
19702
|
case 3:
|
|
20132
|
-
return C =
|
|
19703
|
+
return C = G, w.externalAuthAddress && w.externalAuthToEntity ? ((R = new u.grpc.Metadata()).set("authorization", "Bearer ".concat(C)), O = new Promise(function(A, D) {
|
|
20133
19704
|
z = A, k = D;
|
|
20134
|
-
}),
|
|
20135
|
-
|
|
19705
|
+
}), G = "", (E = new n.AuthenticateToRequest()).setEntity(w.externalAuthToEntity), u.grpc.invoke(l.ExternalAuthService.AuthenticateTo, { request: E, host: w.externalAuthAddress, transport: _, metadata: R, onMessage: function(A) {
|
|
19706
|
+
G = A.getAccessToken();
|
|
20136
19707
|
}, onEnd: function(A, D, B) {
|
|
20137
19708
|
A == u.grpc.Code.OK ? z(R) : k(D);
|
|
20138
|
-
} }), [4,
|
|
19709
|
+
} }), [4, O]) : [3, 5];
|
|
20139
19710
|
case 4:
|
|
20140
|
-
j.sent(), C =
|
|
19711
|
+
j.sent(), C = G, j.label = 5;
|
|
20141
19712
|
case 5:
|
|
20142
19713
|
return (F = new u.grpc.Metadata()).set("authorization", "Bearer ".concat(C)), [2, F];
|
|
20143
19714
|
}
|
|
@@ -20145,8 +19716,8 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
20145
19716
|
});
|
|
20146
19717
|
}, [4, q()];
|
|
20147
19718
|
case 1:
|
|
20148
|
-
return N = U.sent(), [2, function(
|
|
20149
|
-
return new f(
|
|
19719
|
+
return N = U.sent(), [2, function(G) {
|
|
19720
|
+
return new f(G, _, N);
|
|
20150
19721
|
}];
|
|
20151
19722
|
}
|
|
20152
19723
|
});
|
|
@@ -20154,40 +19725,40 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
20154
19725
|
}
|
|
20155
19726
|
e.dialDirect = v;
|
|
20156
19727
|
var f = function() {
|
|
20157
|
-
function h(
|
|
20158
|
-
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 =
|
|
19728
|
+
function h(_, w, C) {
|
|
19729
|
+
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 = _, this.extraMetadata = C, this.transport = w(_);
|
|
20159
19730
|
}
|
|
20160
|
-
return Object.defineProperty(h.prototype, "start", { enumerable: !1, configurable: !0, writable: !0, value: function(
|
|
19731
|
+
return Object.defineProperty(h.prototype, "start", { enumerable: !1, configurable: !0, writable: !0, value: function(_) {
|
|
20161
19732
|
this.extraMetadata.forEach(function(w, C) {
|
|
20162
|
-
|
|
20163
|
-
}), this.transport.start(
|
|
20164
|
-
} }), Object.defineProperty(h.prototype, "sendMessage", { enumerable: !1, configurable: !0, writable: !0, value: function(
|
|
20165
|
-
this.transport.sendMessage(
|
|
19733
|
+
_.set(w, C);
|
|
19734
|
+
}), this.transport.start(_);
|
|
19735
|
+
} }), Object.defineProperty(h.prototype, "sendMessage", { enumerable: !1, configurable: !0, writable: !0, value: function(_) {
|
|
19736
|
+
this.transport.sendMessage(_);
|
|
20166
19737
|
} }), Object.defineProperty(h.prototype, "finishSend", { enumerable: !1, configurable: !0, writable: !0, value: function() {
|
|
20167
19738
|
this.transport.finishSend();
|
|
20168
19739
|
} }), Object.defineProperty(h.prototype, "cancel", { enumerable: !1, configurable: !0, writable: !0, value: function() {
|
|
20169
19740
|
this.transport.cancel();
|
|
20170
19741
|
} }), h;
|
|
20171
19742
|
}();
|
|
20172
|
-
function b(h,
|
|
19743
|
+
function b(h, _, w) {
|
|
20173
19744
|
return i.__awaiter(this, void 0, void 0, function() {
|
|
20174
|
-
var C, q, N, x, U,
|
|
19745
|
+
var C, q, N, x, U, G;
|
|
20175
19746
|
return i.__generator(this, function(z) {
|
|
20176
19747
|
switch (z.label) {
|
|
20177
19748
|
case 0:
|
|
20178
19749
|
return C = i.__assign({}, w), [4, v(h, C)];
|
|
20179
19750
|
case 1:
|
|
20180
|
-
return q = z.sent(),
|
|
19751
|
+
return q = z.sent(), G = new Promise(function(k, S) {
|
|
20181
19752
|
N = k, x = S;
|
|
20182
|
-
}), u.grpc.unary(d.SignalingService.OptionalWebRTCConfig, { request: new c.OptionalWebRTCConfigRequest(), metadata: { "rpc-host":
|
|
20183
|
-
var S = k.status, R = k.statusMessage,
|
|
20184
|
-
if (S === u.grpc.Code.OK &&
|
|
20185
|
-
if (!(U =
|
|
19753
|
+
}), u.grpc.unary(d.SignalingService.OptionalWebRTCConfig, { request: new c.OptionalWebRTCConfigRequest(), metadata: { "rpc-host": _ }, host: h, transport: q, onEnd: function(k) {
|
|
19754
|
+
var S = k.status, R = k.statusMessage, O = k.message;
|
|
19755
|
+
if (S === u.grpc.Code.OK && O) {
|
|
19756
|
+
if (!(U = O.getConfig()))
|
|
20186
19757
|
return void N(new c.WebRTCConfig());
|
|
20187
19758
|
N(U);
|
|
20188
19759
|
} else
|
|
20189
19760
|
x(R);
|
|
20190
|
-
} }), [4,
|
|
19761
|
+
} }), [4, G];
|
|
20191
19762
|
case 2:
|
|
20192
19763
|
if (z.sent(), !U)
|
|
20193
19764
|
throw new Error("no config");
|
|
@@ -20197,7 +19768,7 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
20197
19768
|
});
|
|
20198
19769
|
}
|
|
20199
19770
|
function M(h) {
|
|
20200
|
-
var
|
|
19771
|
+
var _;
|
|
20201
19772
|
if (h) {
|
|
20202
19773
|
if (h.accessToken && h.accessToken.length > 0) {
|
|
20203
19774
|
if (h.authEntity)
|
|
@@ -20213,7 +19784,7 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
20213
19784
|
throw new Error("cannot set webrtcOptions.signalingCredentials with accessToken");
|
|
20214
19785
|
}
|
|
20215
19786
|
}
|
|
20216
|
-
if (!((
|
|
19787
|
+
if (!((_ = h?.webrtcOptions) === null || _ === void 0) && _.signalingAccessToken && h.webrtcOptions.signalingAccessToken.length > 0) {
|
|
20217
19788
|
if (h.webrtcOptions.signalingAuthEntity)
|
|
20218
19789
|
throw new Error("cannot set webrtcOptions.signalingAuthEntity with webrtcOptions.signalingAccessToken");
|
|
20219
19790
|
if (h.webrtcOptions.signalingCredentials)
|
|
@@ -20221,30 +19792,30 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
20221
19792
|
}
|
|
20222
19793
|
}
|
|
20223
19794
|
}
|
|
20224
|
-
e.dialWebRTC = function(h,
|
|
20225
|
-
var C, q, N, x, U,
|
|
19795
|
+
e.dialWebRTC = function(h, _, w) {
|
|
19796
|
+
var C, q, N, x, U, G, z;
|
|
20226
19797
|
return i.__awaiter(this, void 0, void 0, function() {
|
|
20227
|
-
var k, S, R,
|
|
19798
|
+
var k, S, R, O, E, F, P, T, j, A, D, B, W, V, Z, oe, re, ge, ae, ne, pe, ie, le, se, ce, ue, de = this;
|
|
20228
19799
|
return i.__generator(this, function(J) {
|
|
20229
19800
|
switch (J.label) {
|
|
20230
19801
|
case 0:
|
|
20231
|
-
return M(w), [4, b(h,
|
|
19802
|
+
return M(w), [4, b(h, _, w)];
|
|
20232
19803
|
case 1:
|
|
20233
19804
|
return k = J.sent(), S = k.toObject().additionalIceServersList.map(function(L) {
|
|
20234
19805
|
return { urls: L.urlsList, credential: L.credential, username: L.username };
|
|
20235
19806
|
}), w || (w = {}), w.webrtcOptions ? (R = w.webrtcOptions).rtcConfig ? R.rtcConfig.iceServers = i.__spreadArray(i.__spreadArray([], R.rtcConfig.iceServers || [], !0), S, !0) : R.rtcConfig = { iceServers: S } : R = { disableTrickleICE: k.getDisableTrickle(), rtcConfig: { iceServers: S } }, [4, (0, m.newPeerConnectionForClient)(R !== void 0 && R.disableTrickleICE, R?.rtcConfig)];
|
|
20236
19807
|
case 2:
|
|
20237
|
-
|
|
19808
|
+
O = J.sent(), E = O.pc, F = O.dc, P = !1, J.label = 3;
|
|
20238
19809
|
case 3:
|
|
20239
|
-
return J.trys.push([3, , 10, 11]), T = w, w && (T = i.__assign({}, w), w.accessToken || (T.authEntity = (C = w?.webrtcOptions) === null || C === void 0 ? void 0 : C.signalingAuthEntity, T.authEntity || (T.externalAuthAddress ? T.authEntity = (q = w.externalAuthAddress) === null || q === void 0 ? void 0 : q.replace(/^(.*:\/\/)/, "") : T.authEntity = h.replace(/^(.*:\/\/)/, "")), T.credentials = (N = w?.webrtcOptions) === null || N === void 0 ? void 0 : N.signalingCredentials, T.accessToken = (x = w?.webrtcOptions) === null || x === void 0 ? void 0 : x.signalingAccessToken), T.externalAuthAddress = (U = w?.webrtcOptions) === null || U === void 0 ? void 0 : U.signalingExternalAuthAddress, T.externalAuthToEntity = (
|
|
19810
|
+
return J.trys.push([3, , 10, 11]), T = w, w && (T = i.__assign({}, w), w.accessToken || (T.authEntity = (C = w?.webrtcOptions) === null || C === void 0 ? void 0 : C.signalingAuthEntity, T.authEntity || (T.externalAuthAddress ? T.authEntity = (q = w.externalAuthAddress) === null || q === void 0 ? void 0 : q.replace(/^(.*:\/\/)/, "") : T.authEntity = h.replace(/^(.*:\/\/)/, "")), T.credentials = (N = w?.webrtcOptions) === null || N === void 0 ? void 0 : N.signalingCredentials, T.accessToken = (x = w?.webrtcOptions) === null || x === void 0 ? void 0 : x.signalingAccessToken), T.externalAuthAddress = (U = w?.webrtcOptions) === null || U === void 0 ? void 0 : U.signalingExternalAuthAddress, T.externalAuthToEntity = (G = w?.webrtcOptions) === null || G === void 0 ? void 0 : G.signalingExternalAuthToEntity), [4, v(h, T)];
|
|
20240
19811
|
case 4:
|
|
20241
19812
|
return j = J.sent(), A = u.grpc.client(d.SignalingService.Call, { host: h, transport: j }), D = "", B = !1, W = function(L) {
|
|
20242
19813
|
if (!B) {
|
|
20243
19814
|
B = !0;
|
|
20244
|
-
var
|
|
20245
|
-
|
|
19815
|
+
var I = new c.CallUpdateRequest();
|
|
19816
|
+
I.setUuid(D);
|
|
20246
19817
|
var $ = new r.Status();
|
|
20247
|
-
$.setCode(o.Code.UNKNOWN), $.setMessage(L),
|
|
19818
|
+
$.setCode(o.Code.UNKNOWN), $.setMessage(L), I.setError($), u.grpc.unary(d.SignalingService.CallUpdate, { request: I, metadata: { "rpc-host": _ }, host: h, transport: j, onEnd: function(Y) {
|
|
20248
19819
|
var H = Y.status, K = Y.statusMessage, Q = Y.message;
|
|
20249
19820
|
H === u.grpc.Code.OK && Q || console.error(K);
|
|
20250
19821
|
} });
|
|
@@ -20253,8 +19824,8 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
20253
19824
|
if (!B) {
|
|
20254
19825
|
B = !0;
|
|
20255
19826
|
var L = new c.CallUpdateRequest();
|
|
20256
|
-
L.setUuid(D), L.setDone(!0), u.grpc.unary(d.SignalingService.CallUpdate, { request: L, metadata: { "rpc-host":
|
|
20257
|
-
var $ =
|
|
19827
|
+
L.setUuid(D), L.setDone(!0), u.grpc.unary(d.SignalingService.CallUpdate, { request: L, metadata: { "rpc-host": _ }, host: h, transport: j, onEnd: function(I) {
|
|
19828
|
+
var $ = I.status, Y = I.statusMessage, H = I.message;
|
|
20258
19829
|
$ === u.grpc.Code.OK && H || console.error(Y);
|
|
20259
19830
|
} });
|
|
20260
19831
|
}
|
|
@@ -20264,13 +19835,13 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
20264
19835
|
case 5:
|
|
20265
19836
|
return ge = J.sent(), ae = !1, E.onicecandidate = function(L) {
|
|
20266
19837
|
return i.__awaiter(de, void 0, void 0, function() {
|
|
20267
|
-
var
|
|
19838
|
+
var I, $;
|
|
20268
19839
|
return i.__generator(this, function(Y) {
|
|
20269
19840
|
switch (Y.label) {
|
|
20270
19841
|
case 0:
|
|
20271
19842
|
return [4, oe];
|
|
20272
19843
|
case 1:
|
|
20273
|
-
return Y.sent(), re ? [2] : L.candidate === null ? (ae = !0, V(), [2]) : (H = L.candidate, (K = new c.ICECandidate()).setCandidate(H.candidate), H.sdpMid && K.setSdpMid(H.sdpMid), H.sdpMLineIndex && K.setSdpmLineIndex(H.sdpMLineIndex), H.usernameFragment && K.setUsernameFragment(H.usernameFragment),
|
|
19844
|
+
return Y.sent(), re ? [2] : L.candidate === null ? (ae = !0, V(), [2]) : (H = L.candidate, (K = new c.ICECandidate()).setCandidate(H.candidate), H.sdpMid && K.setSdpMid(H.sdpMid), H.sdpMLineIndex && K.setSdpmLineIndex(H.sdpMLineIndex), H.usernameFragment && K.setUsernameFragment(H.usernameFragment), I = K, ($ = new c.CallUpdateRequest()).setUuid(D), $.setCandidate(I), u.grpc.unary(d.SignalingService.CallUpdate, { request: $, metadata: { "rpc-host": _ }, host: h, transport: j, onEnd: function(Q) {
|
|
20274
19845
|
var ee = Q.status, X = Q.statusMessage, te = Q.message;
|
|
20275
19846
|
ee === u.grpc.Code.OK && te || re || ae || console.error("error sending candidate", X);
|
|
20276
19847
|
} }), [2]);
|
|
@@ -20284,21 +19855,21 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
20284
19855
|
case 7:
|
|
20285
19856
|
return ne = !1, A.onMessage(function(L) {
|
|
20286
19857
|
return i.__awaiter(de, void 0, void 0, function() {
|
|
20287
|
-
var
|
|
19858
|
+
var I, $, Y, H, K, Q;
|
|
20288
19859
|
return i.__generator(this, function(ee) {
|
|
20289
19860
|
switch (ee.label) {
|
|
20290
19861
|
case 0:
|
|
20291
|
-
return (
|
|
19862
|
+
return (I = L).hasInit() ? ne ? (W("got init stage more than once"), [2]) : ($ = I.getInit(), ne = !0, D = I.getUuid(), Y = new RTCSessionDescription(JSON.parse(atob($.getSdp()))), [4, E.setRemoteDescription(Y)]) : [3, 2];
|
|
20292
19863
|
case 1:
|
|
20293
19864
|
return ee.sent(), Z(!0), R?.disableTrickleICE ? (re = !0, V(), [2]) : [3, 8];
|
|
20294
19865
|
case 2:
|
|
20295
|
-
if (!
|
|
19866
|
+
if (!I.hasUpdate())
|
|
20296
19867
|
return [3, 7];
|
|
20297
19868
|
if (!ne)
|
|
20298
19869
|
return W("got update stage before init stage"), [2];
|
|
20299
|
-
if (
|
|
20300
|
-
return W("uuid mismatch; have=".concat(
|
|
20301
|
-
H =
|
|
19870
|
+
if (I.getUuid() !== D)
|
|
19871
|
+
return W("uuid mismatch; have=".concat(I.getUuid(), " want=").concat(D)), [2];
|
|
19872
|
+
H = I.getUpdate(), X = H.getCandidate(), te = { candidate: X.getCandidate() }, X.hasSdpMid() && (te.sdpMid = X.getSdpMid()), X.hasSdpmLineIndex() && (te.sdpMLineIndex = X.getSdpmLineIndex()), X.hasUsernameFragment() && (te.usernameFragment = X.getUsernameFragment()), K = te, ee.label = 3;
|
|
20302
19873
|
case 3:
|
|
20303
19874
|
return ee.trys.push([3, 5, , 6]), [4, E.addIceCandidate(K)];
|
|
20304
19875
|
case 4:
|
|
@@ -20315,11 +19886,11 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
20315
19886
|
var X, te;
|
|
20316
19887
|
});
|
|
20317
19888
|
});
|
|
20318
|
-
}), le = new Promise(function(L,
|
|
20319
|
-
pe = L, ie =
|
|
20320
|
-
}), A.onEnd(function(L,
|
|
20321
|
-
L !== u.grpc.Code.OK ?
|
|
20322
|
-
}), A.start({ "rpc-host":
|
|
19889
|
+
}), le = new Promise(function(L, I) {
|
|
19890
|
+
pe = L, ie = I;
|
|
19891
|
+
}), A.onEnd(function(L, I, $) {
|
|
19892
|
+
L !== u.grpc.Code.OK ? I !== "Response closed without headers" ? (console.error(I), ie(I)) : ie(new p.ConnectionClosedError("failed to dial")) : pe();
|
|
19893
|
+
}), A.start({ "rpc-host": _ }), se = new c.CallRequest(), ce = btoa(JSON.stringify(E.localDescription)), se.setSdp(ce), R && R.disableTrickleICE && se.setDisableTrickle(R.disableTrickleICE), A.send(se), (ue = new g.ClientChannel(E, F)).ready.then(function() {
|
|
20323
19894
|
return pe();
|
|
20324
19895
|
}).catch(function(L) {
|
|
20325
19896
|
return ie(L);
|
|
@@ -20431,62 +20002,62 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
20431
20002
|
});
|
|
20432
20003
|
};
|
|
20433
20004
|
}, 655: (t, e, s) => {
|
|
20434
|
-
s.r(e), s.d(e, { __assign: () => g, __asyncDelegator: () => w, __asyncGenerator: () =>
|
|
20005
|
+
s.r(e), s.d(e, { __assign: () => g, __asyncDelegator: () => w, __asyncGenerator: () => _, __asyncValues: () => C, __await: () => h, __awaiter: () => l, __classPrivateFieldGet: () => G, __classPrivateFieldIn: () => k, __classPrivateFieldSet: () => z, __createBinding: () => d, __decorate: () => o, __exportStar: () => m, __extends: () => u, __generator: () => c, __importDefault: () => U, __importStar: () => x, __makeTemplateObject: () => q, __metadata: () => n, __param: () => r, __read: () => y, __rest: () => p, __spread: () => f, __spreadArray: () => M, __spreadArrays: () => b, __values: () => v });
|
|
20435
20006
|
var i = function(S, R) {
|
|
20436
|
-
return i = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(
|
|
20437
|
-
|
|
20438
|
-
} || function(
|
|
20007
|
+
return i = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(O, E) {
|
|
20008
|
+
O.__proto__ = E;
|
|
20009
|
+
} || function(O, E) {
|
|
20439
20010
|
for (var F in E)
|
|
20440
|
-
Object.prototype.hasOwnProperty.call(E, F) && (
|
|
20011
|
+
Object.prototype.hasOwnProperty.call(E, F) && (O[F] = E[F]);
|
|
20441
20012
|
}, i(S, R);
|
|
20442
20013
|
};
|
|
20443
20014
|
function u(S, R) {
|
|
20444
20015
|
if (typeof R != "function" && R !== null)
|
|
20445
20016
|
throw new TypeError("Class extends value " + String(R) + " is not a constructor or null");
|
|
20446
|
-
function
|
|
20017
|
+
function O() {
|
|
20447
20018
|
this.constructor = S;
|
|
20448
20019
|
}
|
|
20449
|
-
i(S, R), S.prototype = R === null ? Object.create(R) : (
|
|
20020
|
+
i(S, R), S.prototype = R === null ? Object.create(R) : (O.prototype = R.prototype, new O());
|
|
20450
20021
|
}
|
|
20451
20022
|
var g = function() {
|
|
20452
20023
|
return g = Object.assign || function(S) {
|
|
20453
|
-
for (var R,
|
|
20454
|
-
for (var F in R = arguments[
|
|
20024
|
+
for (var R, O = 1, E = arguments.length; O < E; O++)
|
|
20025
|
+
for (var F in R = arguments[O])
|
|
20455
20026
|
Object.prototype.hasOwnProperty.call(R, F) && (S[F] = R[F]);
|
|
20456
20027
|
return S;
|
|
20457
20028
|
}, g.apply(this, arguments);
|
|
20458
20029
|
};
|
|
20459
20030
|
function p(S, R) {
|
|
20460
|
-
var
|
|
20031
|
+
var O = {};
|
|
20461
20032
|
for (var E in S)
|
|
20462
|
-
Object.prototype.hasOwnProperty.call(S, E) && R.indexOf(E) < 0 && (
|
|
20033
|
+
Object.prototype.hasOwnProperty.call(S, E) && R.indexOf(E) < 0 && (O[E] = S[E]);
|
|
20463
20034
|
if (S != null && typeof Object.getOwnPropertySymbols == "function") {
|
|
20464
20035
|
var F = 0;
|
|
20465
20036
|
for (E = Object.getOwnPropertySymbols(S); F < E.length; F++)
|
|
20466
|
-
R.indexOf(E[F]) < 0 && Object.prototype.propertyIsEnumerable.call(S, E[F]) && (
|
|
20037
|
+
R.indexOf(E[F]) < 0 && Object.prototype.propertyIsEnumerable.call(S, E[F]) && (O[E[F]] = S[E[F]]);
|
|
20467
20038
|
}
|
|
20468
|
-
return
|
|
20039
|
+
return O;
|
|
20469
20040
|
}
|
|
20470
|
-
function o(S, R,
|
|
20471
|
-
var F, P = arguments.length, T = P < 3 ? R : E === null ? E = Object.getOwnPropertyDescriptor(R,
|
|
20041
|
+
function o(S, R, O, E) {
|
|
20042
|
+
var F, P = arguments.length, T = P < 3 ? R : E === null ? E = Object.getOwnPropertyDescriptor(R, O) : E;
|
|
20472
20043
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
20473
|
-
T = Reflect.decorate(S, R,
|
|
20044
|
+
T = Reflect.decorate(S, R, O, E);
|
|
20474
20045
|
else
|
|
20475
20046
|
for (var j = S.length - 1; j >= 0; j--)
|
|
20476
|
-
(F = S[j]) && (T = (P < 3 ? F(T) : P > 3 ? F(R,
|
|
20477
|
-
return P > 3 && T && Object.defineProperty(R,
|
|
20047
|
+
(F = S[j]) && (T = (P < 3 ? F(T) : P > 3 ? F(R, O, T) : F(R, O)) || T);
|
|
20048
|
+
return P > 3 && T && Object.defineProperty(R, O, T), T;
|
|
20478
20049
|
}
|
|
20479
20050
|
function r(S, R) {
|
|
20480
|
-
return function(
|
|
20481
|
-
R(
|
|
20051
|
+
return function(O, E) {
|
|
20052
|
+
R(O, E, S);
|
|
20482
20053
|
};
|
|
20483
20054
|
}
|
|
20484
20055
|
function n(S, R) {
|
|
20485
20056
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
|
|
20486
20057
|
return Reflect.metadata(S, R);
|
|
20487
20058
|
}
|
|
20488
|
-
function l(S, R,
|
|
20489
|
-
return new (
|
|
20059
|
+
function l(S, R, O, E) {
|
|
20060
|
+
return new (O || (O = Promise))(function(F, P) {
|
|
20490
20061
|
function T(D) {
|
|
20491
20062
|
try {
|
|
20492
20063
|
A(E.next(D));
|
|
@@ -20503,7 +20074,7 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
20503
20074
|
}
|
|
20504
20075
|
function A(D) {
|
|
20505
20076
|
var B;
|
|
20506
|
-
D.done ? F(D.value) : (B = D.value, B instanceof
|
|
20077
|
+
D.done ? F(D.value) : (B = D.value, B instanceof O ? B : new O(function(W) {
|
|
20507
20078
|
W(B);
|
|
20508
20079
|
})).then(T, j);
|
|
20509
20080
|
}
|
|
@@ -20511,7 +20082,7 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
20511
20082
|
});
|
|
20512
20083
|
}
|
|
20513
20084
|
function c(S, R) {
|
|
20514
|
-
var
|
|
20085
|
+
var O, E, F, P, T = { label: 0, sent: function() {
|
|
20515
20086
|
if (1 & F[0])
|
|
20516
20087
|
throw F[1];
|
|
20517
20088
|
return F[1];
|
|
@@ -20522,11 +20093,11 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
20522
20093
|
function j(A) {
|
|
20523
20094
|
return function(D) {
|
|
20524
20095
|
return function(B) {
|
|
20525
|
-
if (
|
|
20096
|
+
if (O)
|
|
20526
20097
|
throw new TypeError("Generator is already executing.");
|
|
20527
20098
|
for (; P && (P = 0, B[0] && (T = 0)), T; )
|
|
20528
20099
|
try {
|
|
20529
|
-
if (
|
|
20100
|
+
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)
|
|
20530
20101
|
return F;
|
|
20531
20102
|
switch (E = 0, F && (B = [2 & B[0], F.value]), B[0]) {
|
|
20532
20103
|
case 0:
|
|
@@ -20565,7 +20136,7 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
20565
20136
|
} catch (W) {
|
|
20566
20137
|
B = [6, W], E = 0;
|
|
20567
20138
|
} finally {
|
|
20568
|
-
|
|
20139
|
+
O = F = 0;
|
|
20569
20140
|
}
|
|
20570
20141
|
if (5 & B[0])
|
|
20571
20142
|
throw B[1];
|
|
@@ -20574,23 +20145,23 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
20574
20145
|
};
|
|
20575
20146
|
}
|
|
20576
20147
|
}
|
|
20577
|
-
var d = Object.create ? function(S, R,
|
|
20578
|
-
E === void 0 && (E =
|
|
20579
|
-
var F = Object.getOwnPropertyDescriptor(R,
|
|
20148
|
+
var d = Object.create ? function(S, R, O, E) {
|
|
20149
|
+
E === void 0 && (E = O);
|
|
20150
|
+
var F = Object.getOwnPropertyDescriptor(R, O);
|
|
20580
20151
|
F && !("get" in F ? !R.__esModule : F.writable || F.configurable) || (F = { enumerable: !0, get: function() {
|
|
20581
|
-
return R[
|
|
20152
|
+
return R[O];
|
|
20582
20153
|
} }), Object.defineProperty(S, E, F);
|
|
20583
|
-
} : function(S, R,
|
|
20584
|
-
E === void 0 && (E =
|
|
20154
|
+
} : function(S, R, O, E) {
|
|
20155
|
+
E === void 0 && (E = O), S[E] = R[O];
|
|
20585
20156
|
};
|
|
20586
20157
|
function m(S, R) {
|
|
20587
|
-
for (var
|
|
20588
|
-
|
|
20158
|
+
for (var O in S)
|
|
20159
|
+
O === "default" || Object.prototype.hasOwnProperty.call(R, O) || d(R, S, O);
|
|
20589
20160
|
}
|
|
20590
20161
|
function v(S) {
|
|
20591
|
-
var R = typeof Symbol == "function" && Symbol.iterator,
|
|
20592
|
-
if (
|
|
20593
|
-
return
|
|
20162
|
+
var R = typeof Symbol == "function" && Symbol.iterator, O = R && S[R], E = 0;
|
|
20163
|
+
if (O)
|
|
20164
|
+
return O.call(S);
|
|
20594
20165
|
if (S && typeof S.length == "number")
|
|
20595
20166
|
return { next: function() {
|
|
20596
20167
|
return S && E >= S.length && (S = void 0), { value: S && S[E++], done: !S };
|
|
@@ -20598,10 +20169,10 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
20598
20169
|
throw new TypeError(R ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
20599
20170
|
}
|
|
20600
20171
|
function y(S, R) {
|
|
20601
|
-
var
|
|
20602
|
-
if (!
|
|
20172
|
+
var O = typeof Symbol == "function" && S[Symbol.iterator];
|
|
20173
|
+
if (!O)
|
|
20603
20174
|
return S;
|
|
20604
|
-
var E, F, P =
|
|
20175
|
+
var E, F, P = O.call(S), T = [];
|
|
20605
20176
|
try {
|
|
20606
20177
|
for (; (R === void 0 || R-- > 0) && !(E = P.next()).done; )
|
|
20607
20178
|
T.push(E.value);
|
|
@@ -20609,7 +20180,7 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
20609
20180
|
F = { error: j };
|
|
20610
20181
|
} finally {
|
|
20611
20182
|
try {
|
|
20612
|
-
E && !E.done && (
|
|
20183
|
+
E && !E.done && (O = P.return) && O.call(P);
|
|
20613
20184
|
} finally {
|
|
20614
20185
|
if (F)
|
|
20615
20186
|
throw F.error;
|
|
@@ -20623,16 +20194,16 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
20623
20194
|
return S;
|
|
20624
20195
|
}
|
|
20625
20196
|
function b() {
|
|
20626
|
-
for (var S = 0, R = 0,
|
|
20197
|
+
for (var S = 0, R = 0, O = arguments.length; R < O; R++)
|
|
20627
20198
|
S += arguments[R].length;
|
|
20628
20199
|
var E = Array(S), F = 0;
|
|
20629
|
-
for (R = 0; R <
|
|
20200
|
+
for (R = 0; R < O; R++)
|
|
20630
20201
|
for (var P = arguments[R], T = 0, j = P.length; T < j; T++, F++)
|
|
20631
20202
|
E[F] = P[T];
|
|
20632
20203
|
return E;
|
|
20633
20204
|
}
|
|
20634
|
-
function M(S, R,
|
|
20635
|
-
if (
|
|
20205
|
+
function M(S, R, O) {
|
|
20206
|
+
if (O || arguments.length === 2)
|
|
20636
20207
|
for (var E, F = 0, P = R.length; F < P; F++)
|
|
20637
20208
|
!E && F in R || (E || (E = Array.prototype.slice.call(R, 0, F)), E[F] = R[F]);
|
|
20638
20209
|
return S.concat(E || Array.prototype.slice.call(R));
|
|
@@ -20640,10 +20211,10 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
20640
20211
|
function h(S) {
|
|
20641
20212
|
return this instanceof h ? (this.v = S, this) : new h(S);
|
|
20642
20213
|
}
|
|
20643
|
-
function
|
|
20214
|
+
function _(S, R, O) {
|
|
20644
20215
|
if (!Symbol.asyncIterator)
|
|
20645
20216
|
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
20646
|
-
var E, F =
|
|
20217
|
+
var E, F = O.apply(S, R || []), P = [];
|
|
20647
20218
|
return E = {}, T("next"), T("throw"), T("return"), E[Symbol.asyncIterator] = function() {
|
|
20648
20219
|
return this;
|
|
20649
20220
|
}, E;
|
|
@@ -20673,7 +20244,7 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
20673
20244
|
}
|
|
20674
20245
|
}
|
|
20675
20246
|
function w(S) {
|
|
20676
|
-
var R,
|
|
20247
|
+
var R, O;
|
|
20677
20248
|
return R = {}, E("next"), E("throw", function(F) {
|
|
20678
20249
|
throw F;
|
|
20679
20250
|
}), E("return"), R[Symbol.iterator] = function() {
|
|
@@ -20681,15 +20252,15 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
20681
20252
|
}, R;
|
|
20682
20253
|
function E(F, P) {
|
|
20683
20254
|
R[F] = S[F] ? function(T) {
|
|
20684
|
-
return (
|
|
20255
|
+
return (O = !O) ? { value: h(S[F](T)), done: F === "return" } : P ? P(T) : T;
|
|
20685
20256
|
} : P;
|
|
20686
20257
|
}
|
|
20687
20258
|
}
|
|
20688
20259
|
function C(S) {
|
|
20689
20260
|
if (!Symbol.asyncIterator)
|
|
20690
20261
|
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
20691
|
-
var R,
|
|
20692
|
-
return
|
|
20262
|
+
var R, O = S[Symbol.asyncIterator];
|
|
20263
|
+
return O ? O.call(S) : (S = v(S), R = {}, E("next"), E("throw"), E("return"), R[Symbol.asyncIterator] = function() {
|
|
20693
20264
|
return this;
|
|
20694
20265
|
}, R);
|
|
20695
20266
|
function E(F) {
|
|
@@ -20717,28 +20288,28 @@ var backOff_1 = backoff.backOff = backOff, BackOff = (
|
|
|
20717
20288
|
return S;
|
|
20718
20289
|
var R = {};
|
|
20719
20290
|
if (S != null)
|
|
20720
|
-
for (var
|
|
20721
|
-
|
|
20291
|
+
for (var O in S)
|
|
20292
|
+
O !== "default" && Object.prototype.hasOwnProperty.call(S, O) && d(R, S, O);
|
|
20722
20293
|
return N(R, S), R;
|
|
20723
20294
|
}
|
|
20724
20295
|
function U(S) {
|
|
20725
20296
|
return S && S.__esModule ? S : { default: S };
|
|
20726
20297
|
}
|
|
20727
|
-
function
|
|
20728
|
-
if (
|
|
20298
|
+
function G(S, R, O, E) {
|
|
20299
|
+
if (O === "a" && !E)
|
|
20729
20300
|
throw new TypeError("Private accessor was defined without a getter");
|
|
20730
20301
|
if (typeof R == "function" ? S !== R || !E : !R.has(S))
|
|
20731
20302
|
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
20732
|
-
return
|
|
20303
|
+
return O === "m" ? E : O === "a" ? E.call(S) : E ? E.value : R.get(S);
|
|
20733
20304
|
}
|
|
20734
|
-
function z(S, R,
|
|
20305
|
+
function z(S, R, O, E, F) {
|
|
20735
20306
|
if (E === "m")
|
|
20736
20307
|
throw new TypeError("Private method is not writable");
|
|
20737
20308
|
if (E === "a" && !F)
|
|
20738
20309
|
throw new TypeError("Private accessor was defined without a setter");
|
|
20739
20310
|
if (typeof R == "function" ? S !== R || !F : !R.has(S))
|
|
20740
20311
|
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
20741
|
-
return E === "a" ? F.call(S,
|
|
20312
|
+
return E === "a" ? F.call(S, O) : F ? F.value = O : R.set(S, O), O;
|
|
20742
20313
|
}
|
|
20743
20314
|
function k(S, R) {
|
|
20744
20315
|
if (R === null || typeof R != "object" && typeof R != "function")
|
|
@@ -22887,9 +22458,9 @@ var __webpack_exports__dialDirect = __webpack_exports__.ry, __webpack_exports__d
|
|
|
22887
22458
|
return f.slice(b, M);
|
|
22888
22459
|
var h = f.length;
|
|
22889
22460
|
M !== void 0 && (h = M);
|
|
22890
|
-
for (var
|
|
22891
|
-
|
|
22892
|
-
return
|
|
22461
|
+
for (var _ = new Uint8Array(h - b), w = 0, C = b; C < h; C++)
|
|
22462
|
+
_[w++] = f[C];
|
|
22463
|
+
return _;
|
|
22893
22464
|
}
|
|
22894
22465
|
g.decodeASCII = l, g.encodeASCII = function(f) {
|
|
22895
22466
|
for (var b = new Uint8Array(f.length), M = 0; M !== f.length; ++M) {
|
|
@@ -22909,7 +22480,7 @@ var __webpack_exports__dialDirect = __webpack_exports__.ry, __webpack_exports__d
|
|
|
22909
22480
|
return f.prototype.parse = function(b, M) {
|
|
22910
22481
|
if (b.length === 0 && M)
|
|
22911
22482
|
return [];
|
|
22912
|
-
var h,
|
|
22483
|
+
var h, _ = [];
|
|
22913
22484
|
if (this.buffer == null)
|
|
22914
22485
|
this.buffer = b, this.position = 0;
|
|
22915
22486
|
else if (this.position === this.buffer.byteLength)
|
|
@@ -22922,14 +22493,14 @@ var __webpack_exports__dialDirect = __webpack_exports__.ry, __webpack_exports__d
|
|
|
22922
22493
|
}
|
|
22923
22494
|
for (; ; ) {
|
|
22924
22495
|
if (!m(this.buffer, this.position, 5))
|
|
22925
|
-
return
|
|
22926
|
-
var x = v(this.buffer, this.position, this.position + 5), U = new DataView(x.buffer, x.byteOffset, x.byteLength),
|
|
22927
|
-
if (!m(this.buffer, this.position, 5 +
|
|
22928
|
-
return
|
|
22929
|
-
var z = v(this.buffer, this.position + 5, this.position + 5 +
|
|
22930
|
-
if (this.position += 5 +
|
|
22931
|
-
return
|
|
22932
|
-
|
|
22496
|
+
return _;
|
|
22497
|
+
var x = v(this.buffer, this.position, this.position + 5), U = new DataView(x.buffer, x.byteOffset, x.byteLength), G = d(U);
|
|
22498
|
+
if (!m(this.buffer, this.position, 5 + G))
|
|
22499
|
+
return _;
|
|
22500
|
+
var z = v(this.buffer, this.position + 5, this.position + 5 + G);
|
|
22501
|
+
if (this.position += 5 + G, c(U))
|
|
22502
|
+
return _.push({ chunkType: o.TRAILERS, trailers: (h = z, new r.Metadata(l(h))) }), _;
|
|
22503
|
+
_.push({ chunkType: o.MESSAGE, data: z });
|
|
22933
22504
|
}
|
|
22934
22505
|
}, f;
|
|
22935
22506
|
}();
|
|
@@ -22994,9 +22565,9 @@ var __webpack_exports__dialDirect = __webpack_exports__.ry, __webpack_exports__d
|
|
|
22994
22565
|
this.props.debug && l.debug("onHeaders.gRPCStatus", M);
|
|
22995
22566
|
var h = M && M >= 0 ? M : n.httpStatusToCode(b);
|
|
22996
22567
|
this.props.debug && l.debug("onHeaders.code", h);
|
|
22997
|
-
var
|
|
22998
|
-
if (this.props.debug && l.debug("onHeaders.gRPCMessage",
|
|
22999
|
-
var w = this.decodeGRPCStatus(
|
|
22568
|
+
var _ = f.get("grpc-message") || [];
|
|
22569
|
+
if (this.props.debug && l.debug("onHeaders.gRPCMessage", _), this.rawOnHeaders(f), h !== n.Code.OK) {
|
|
22570
|
+
var w = this.decodeGRPCStatus(_[0]);
|
|
23000
22571
|
this.rawOnError(h, w, f);
|
|
23001
22572
|
}
|
|
23002
22573
|
}
|
|
@@ -23013,8 +22584,8 @@ var __webpack_exports__dialDirect = __webpack_exports__.ry, __webpack_exports__d
|
|
|
23013
22584
|
}
|
|
23014
22585
|
M.forEach(function(h) {
|
|
23015
22586
|
if (h.chunkType === r.ChunkType.MESSAGE) {
|
|
23016
|
-
var
|
|
23017
|
-
b.rawOnMessage(
|
|
22587
|
+
var _ = b.methodDefinition.responseType.deserializeBinary(h.data);
|
|
22588
|
+
b.rawOnMessage(_);
|
|
23018
22589
|
} else
|
|
23019
22590
|
h.chunkType === r.ChunkType.TRAILERS && (b.responseHeaders ? (b.responseTrailers = new o.Metadata(h.trailers), b.props.debug && l.debug("onChunk.trailers", b.responseTrailers)) : (b.responseHeaders = new o.Metadata(h.trailers), b.rawOnHeaders(b.responseHeaders)));
|
|
23020
22591
|
});
|
|
@@ -23032,10 +22603,10 @@ var __webpack_exports__dialDirect = __webpack_exports__.ry, __webpack_exports__d
|
|
|
23032
22603
|
} else {
|
|
23033
22604
|
if (this.responseHeaders === void 0)
|
|
23034
22605
|
return void this.rawOnError(n.Code.Unknown, "Response closed without headers");
|
|
23035
|
-
var h = v(this.responseHeaders),
|
|
23036
|
-
if (this.props.debug && l.debug("grpc.headers only response ", h,
|
|
22606
|
+
var h = v(this.responseHeaders), _ = this.responseHeaders.get("grpc-message");
|
|
22607
|
+
if (this.props.debug && l.debug("grpc.headers only response ", h, _), h === null)
|
|
23037
22608
|
return void this.rawOnEnd(n.Code.Unknown, "Response closed without grpc-status (Headers only)", this.responseHeaders);
|
|
23038
|
-
var w = this.decodeGRPCStatus(
|
|
22609
|
+
var w = this.decodeGRPCStatus(_[0]);
|
|
23039
22610
|
this.rawOnEnd(h, w, this.responseHeaders);
|
|
23040
22611
|
}
|
|
23041
22612
|
}, y.prototype.decodeGRPCStatus = function(f) {
|
|
@@ -23048,10 +22619,10 @@ var __webpack_exports__dialDirect = __webpack_exports__.ry, __webpack_exports__d
|
|
|
23048
22619
|
}
|
|
23049
22620
|
}, y.prototype.rawOnEnd = function(f, b, M) {
|
|
23050
22621
|
var h = this;
|
|
23051
|
-
this.props.debug && l.debug("rawOnEnd", f, b, M), this.completed || (this.completed = !0, this.onEndCallbacks.forEach(function(
|
|
22622
|
+
this.props.debug && l.debug("rawOnEnd", f, b, M), this.completed || (this.completed = !0, this.onEndCallbacks.forEach(function(_) {
|
|
23052
22623
|
if (!h.closed)
|
|
23053
22624
|
try {
|
|
23054
|
-
|
|
22625
|
+
_(f, b, M);
|
|
23055
22626
|
} catch (w) {
|
|
23056
22627
|
setTimeout(function() {
|
|
23057
22628
|
throw w;
|
|
@@ -23070,10 +22641,10 @@ var __webpack_exports__dialDirect = __webpack_exports__.ry, __webpack_exports__d
|
|
|
23070
22641
|
});
|
|
23071
22642
|
}, y.prototype.rawOnError = function(f, b, M) {
|
|
23072
22643
|
var h = this;
|
|
23073
|
-
M === void 0 && (M = new o.Metadata()), this.props.debug && l.debug("rawOnError", f, b), this.completed || (this.completed = !0, this.onEndCallbacks.forEach(function(
|
|
22644
|
+
M === void 0 && (M = new o.Metadata()), this.props.debug && l.debug("rawOnError", f, b), this.completed || (this.completed = !0, this.onEndCallbacks.forEach(function(_) {
|
|
23074
22645
|
if (!h.closed)
|
|
23075
22646
|
try {
|
|
23076
|
-
|
|
22647
|
+
_(f, b, M);
|
|
23077
22648
|
} catch (w) {
|
|
23078
22649
|
setTimeout(function() {
|
|
23079
22650
|
throw w;
|
|
@@ -23256,8 +22827,8 @@ var __webpack_exports__dialDirect = __webpack_exports__.ry, __webpack_exports__d
|
|
|
23256
22827
|
return (o = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(M, h) {
|
|
23257
22828
|
M.__proto__ = h;
|
|
23258
22829
|
} || function(M, h) {
|
|
23259
|
-
for (var
|
|
23260
|
-
Object.prototype.hasOwnProperty.call(h,
|
|
22830
|
+
for (var _ in h)
|
|
22831
|
+
Object.prototype.hasOwnProperty.call(h, _) && (M[_] = h[_]);
|
|
23261
22832
|
})(f, b);
|
|
23262
22833
|
}, function(f, b) {
|
|
23263
22834
|
function M() {
|
|
@@ -23297,10 +22868,10 @@ var __webpack_exports__dialDirect = __webpack_exports__.ry, __webpack_exports__d
|
|
|
23297
22868
|
var M = this;
|
|
23298
22869
|
this.metadata = b;
|
|
23299
22870
|
var h = new XMLHttpRequest();
|
|
23300
|
-
this.xhr = h, h.open("POST", this.options.url), this.configureXhr(), this.metadata.forEach(function(
|
|
23301
|
-
h.setRequestHeader(
|
|
23302
|
-
}), h.withCredentials = !!this.init.withCredentials, h.addEventListener("readystatechange", this.onStateChange.bind(this)), h.addEventListener("progress", this.onProgressEvent.bind(this)), h.addEventListener("loadend", this.onLoadEvent.bind(this)), h.addEventListener("error", function(
|
|
23303
|
-
M.options.debug && l.debug("XHR.error",
|
|
22871
|
+
this.xhr = h, h.open("POST", this.options.url), this.configureXhr(), this.metadata.forEach(function(_, w) {
|
|
22872
|
+
h.setRequestHeader(_, w.join(", "));
|
|
22873
|
+
}), h.withCredentials = !!this.init.withCredentials, h.addEventListener("readystatechange", this.onStateChange.bind(this)), h.addEventListener("progress", this.onProgressEvent.bind(this)), h.addEventListener("loadend", this.onLoadEvent.bind(this)), h.addEventListener("error", function(_) {
|
|
22874
|
+
M.options.debug && l.debug("XHR.error", _), M.options.onEnd(_.error);
|
|
23304
22875
|
});
|
|
23305
22876
|
}, f.prototype.configureXhr = function() {
|
|
23306
22877
|
this.xhr.responseType = "text", this.xhr.overrideMimeType("text/plain; charset=x-user-defined");
|
|
@@ -23330,8 +22901,8 @@ var __webpack_exports__dialDirect = __webpack_exports__.ry, __webpack_exports__d
|
|
|
23330
22901
|
}
|
|
23331
22902
|
function y(f) {
|
|
23332
22903
|
for (var b = new Uint8Array(f.length), M = 0, h = 0; h < f.length; h++) {
|
|
23333
|
-
var
|
|
23334
|
-
b[M++] = 255 &
|
|
22904
|
+
var _ = String.prototype.codePointAt ? f.codePointAt(h) : v(f, h);
|
|
22905
|
+
b[M++] = 255 & _;
|
|
23335
22906
|
}
|
|
23336
22907
|
return b;
|
|
23337
22908
|
}
|
|
@@ -23398,8 +22969,8 @@ var __webpack_exports__dialDirect = __webpack_exports__.ry, __webpack_exports__d
|
|
|
23398
22969
|
}, start: function(b) {
|
|
23399
22970
|
(m = new WebSocket(v, ["grpc-websockets"])).binaryType = "arraybuffer", m.onopen = function() {
|
|
23400
22971
|
var M;
|
|
23401
|
-
d.debug && r.debug("websocketRequest.onopen"), m.send((M = "", b.forEach(function(h,
|
|
23402
|
-
M += h + ": " +
|
|
22972
|
+
d.debug && r.debug("websocketRequest.onopen"), m.send((M = "", b.forEach(function(h, _) {
|
|
22973
|
+
M += h + ": " + _.join(", ") + `\r
|
|
23403
22974
|
`;
|
|
23404
22975
|
}), n.encodeASCII(M))), y.forEach(function(h) {
|
|
23405
22976
|
f(h);
|
|
@@ -38715,9 +38286,6 @@ class RobotClient {
|
|
|
38715
38286
|
const i = { transport: s };
|
|
38716
38287
|
return new e(this.serviceHost, i);
|
|
38717
38288
|
}
|
|
38718
|
-
get peerConnection() {
|
|
38719
|
-
return this.peerConn;
|
|
38720
|
-
}
|
|
38721
38289
|
async disconnect() {
|
|
38722
38290
|
for (; this.connecting; )
|
|
38723
38291
|
await this.connecting;
|
|
@@ -38748,25 +38316,7 @@ class RobotClient {
|
|
|
38748
38316
|
this.webrtcOptions.host,
|
|
38749
38317
|
i
|
|
38750
38318
|
);
|
|
38751
|
-
this.peerConn = p.peerConnection, this.
|
|
38752
|
-
if (this.peerConn?.iceConnectionState === "closed") {
|
|
38753
|
-
if (this.webrtcOptions?.noReconnect)
|
|
38754
|
-
return;
|
|
38755
|
-
let o = 0;
|
|
38756
|
-
console.debug("connection closed, will try to reconnect"), backOff_1(
|
|
38757
|
-
() => this.connect().then(
|
|
38758
|
-
() => {
|
|
38759
|
-
console.debug("reconnected successfully!"), events.emit("reconnected", {});
|
|
38760
|
-
},
|
|
38761
|
-
(r) => {
|
|
38762
|
-
throw console.debug(
|
|
38763
|
-
`failed to reconnect - retries count: ${o}`
|
|
38764
|
-
), o += 1, r;
|
|
38765
|
-
}
|
|
38766
|
-
)
|
|
38767
|
-
);
|
|
38768
|
-
}
|
|
38769
|
-
}), this.transportFactory = p.transportFactory, p.peerConnection.ontrack = (o) => {
|
|
38319
|
+
this.peerConn = p.peerConnection, this.transportFactory = p.transportFactory, p.peerConnection.ontrack = (o) => {
|
|
38770
38320
|
const [r] = o.streams;
|
|
38771
38321
|
if (!r)
|
|
38772
38322
|
throw events.emit("track", o), new Error("expected event stream to exist");
|
|
@@ -38909,8 +38459,7 @@ const isLocalConnection = (t) => t.includes(".local"), dialDirect = async (t) =>
|
|
|
38909
38459
|
enabled: !0,
|
|
38910
38460
|
host: t.host,
|
|
38911
38461
|
signalingAddress: s,
|
|
38912
|
-
rtcConfig: u
|
|
38913
|
-
noReconnect: t.noReconnect
|
|
38462
|
+
rtcConfig: u
|
|
38914
38463
|
}, p = new RobotClient(e, g);
|
|
38915
38464
|
let o;
|
|
38916
38465
|
return t.credential && (o = t.credential), await p.connect(e, o), console.debug("connected via WebRTC"), p;
|
|
@@ -41228,14 +40777,8 @@ const getValidSDPTrackName = (t) => t.replaceAll(":", "+");
|
|
|
41228
40777
|
class StreamClient extends EventDispatcher {
|
|
41229
40778
|
client;
|
|
41230
40779
|
options;
|
|
41231
|
-
streams;
|
|
41232
40780
|
constructor(e, s = {}) {
|
|
41233
|
-
super(), this.client = e.createServiceClient(StreamServiceClient_1), this.options = s,
|
|
41234
|
-
this.emit("track", i);
|
|
41235
|
-
}), events.on("reconnected", () => {
|
|
41236
|
-
for (const i of this.streams.values())
|
|
41237
|
-
this.add(i);
|
|
41238
|
-
});
|
|
40781
|
+
super(), this.client = e.createServiceClient(StreamServiceClient_1), this.options = s, events.on("track", (i) => this.emit("track", i));
|
|
41239
40782
|
}
|
|
41240
40783
|
get streamService() {
|
|
41241
40784
|
return this.client;
|
|
@@ -41247,12 +40790,12 @@ class StreamClient extends EventDispatcher {
|
|
|
41247
40790
|
await promisify(
|
|
41248
40791
|
s.addStream.bind(s),
|
|
41249
40792
|
i
|
|
41250
|
-
)
|
|
40793
|
+
);
|
|
41251
40794
|
} catch {
|
|
41252
40795
|
i.setName(e), this.options.requestLogger?.(i), await promisify(
|
|
41253
40796
|
s.addStream.bind(s),
|
|
41254
40797
|
i
|
|
41255
|
-
)
|
|
40798
|
+
);
|
|
41256
40799
|
}
|
|
41257
40800
|
}
|
|
41258
40801
|
async remove(e) {
|
|
@@ -41262,12 +40805,12 @@ class StreamClient extends EventDispatcher {
|
|
|
41262
40805
|
await promisify(
|
|
41263
40806
|
s.removeStream.bind(s),
|
|
41264
40807
|
i
|
|
41265
|
-
)
|
|
40808
|
+
);
|
|
41266
40809
|
} catch {
|
|
41267
40810
|
i.setName(e), this.options.requestLogger?.(i), await promisify(
|
|
41268
40811
|
s.removeStream.bind(s),
|
|
41269
40812
|
i
|
|
41270
|
-
)
|
|
40813
|
+
);
|
|
41271
40814
|
}
|
|
41272
40815
|
}
|
|
41273
40816
|
}
|
|
@@ -41622,7 +41165,7 @@ class ServoClient {
|
|
|
41622
41165
|
return doCommandFromClient(s, this.name, e, this.options);
|
|
41623
41166
|
}
|
|
41624
41167
|
}
|
|
41625
|
-
const version = "0.1.0
|
|
41168
|
+
const version = "0.1.0";
|
|
41626
41169
|
export {
|
|
41627
41170
|
ArmClient,
|
|
41628
41171
|
BaseClient,
|