@acrobits/ipc-sdk 0.8.0-alpha.4 → 0.8.0-alpha.6

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/lib/ipc-sdk.js CHANGED
@@ -1,7 +1,7 @@
1
1
  var Re = Object.defineProperty;
2
2
  var Pe = (n, t, e) => t in n ? Re(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
3
- var x = (n, t, e) => (Pe(n, typeof t != "symbol" ? t + "" : t, e), e);
4
- var b = /* @__PURE__ */ ((n) => (n.BadgeQuery = "BADGE QUERY", n.Lifecycle = "LIFECYCLE", n.PushToken = "PUSH TOKEN", n))(b || {}), H = function(n, t) {
3
+ var _ = (n, t, e) => (Pe(n, typeof t != "symbol" ? t + "" : t, e), e);
4
+ var y = /* @__PURE__ */ ((n) => (n.BadgeQuery = "BADGE QUERY", n.Lifecycle = "LIFECYCLE", n.PushToken = "PUSH TOKEN", n))(y || {}), H = function(n, t) {
5
5
  return H = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, r) {
6
6
  e.__proto__ = r;
7
7
  } || function(e, r) {
@@ -38,8 +38,8 @@ function $(n, t) {
38
38
  try {
39
39
  for (; (t === void 0 || t-- > 0) && !(i = r.next()).done; )
40
40
  s.push(i.value);
41
- } catch (c) {
42
- o = { error: c };
41
+ } catch (a) {
42
+ o = { error: a };
43
43
  } finally {
44
44
  try {
45
45
  i && !i.done && (e = r.return) && e.call(r);
@@ -56,7 +56,7 @@ function k(n, t, e) {
56
56
  (s || !(r in t)) && (s || (s = Array.prototype.slice.call(t, 0, r)), s[r] = t[r]);
57
57
  return n.concat(s || Array.prototype.slice.call(t));
58
58
  }
59
- function m(n) {
59
+ function w(n) {
60
60
  return typeof n == "function";
61
61
  }
62
62
  function X(n) {
@@ -92,15 +92,15 @@ var T = function() {
92
92
  if (o)
93
93
  if (this._parentage = null, Array.isArray(o))
94
94
  try {
95
- for (var c = Q(o), a = c.next(); !a.done; a = c.next()) {
96
- var u = a.value;
95
+ for (var a = Q(o), c = a.next(); !c.done; c = a.next()) {
96
+ var u = c.value;
97
97
  u.remove(this);
98
98
  }
99
- } catch (p) {
100
- t = { error: p };
99
+ } catch (f) {
100
+ t = { error: f };
101
101
  } finally {
102
102
  try {
103
- a && !a.done && (e = c.return) && e.call(c);
103
+ c && !c.done && (e = a.return) && e.call(a);
104
104
  } finally {
105
105
  if (t)
106
106
  throw t.error;
@@ -108,30 +108,30 @@ var T = function() {
108
108
  }
109
109
  else
110
110
  o.remove(this);
111
- var v = this.initialTeardown;
112
- if (m(v))
111
+ var p = this.initialTeardown;
112
+ if (w(p))
113
113
  try {
114
- v();
115
- } catch (p) {
116
- s = p instanceof N ? p.errors : [p];
114
+ p();
115
+ } catch (f) {
116
+ s = f instanceof N ? f.errors : [f];
117
117
  }
118
- var g = this._finalizers;
119
- if (g) {
118
+ var v = this._finalizers;
119
+ if (v) {
120
120
  this._finalizers = null;
121
121
  try {
122
- for (var E = Q(g), w = E.next(); !w.done; w = E.next()) {
123
- var j = w.value;
122
+ for (var b = Q(v), S = b.next(); !S.done; S = b.next()) {
123
+ var j = S.value;
124
124
  try {
125
125
  ie(j);
126
- } catch (p) {
127
- s = s ?? [], p instanceof N ? s = k(k([], $(s)), $(p.errors)) : s.push(p);
126
+ } catch (f) {
127
+ s = s ?? [], f instanceof N ? s = k(k([], $(s)), $(f.errors)) : s.push(f);
128
128
  }
129
129
  }
130
- } catch (p) {
131
- r = { error: p };
130
+ } catch (f) {
131
+ r = { error: f };
132
132
  } finally {
133
133
  try {
134
- w && !w.done && (i = E.return) && i.call(E);
134
+ S && !S.done && (i = b.return) && i.call(b);
135
135
  } finally {
136
136
  if (r)
137
137
  throw r.error;
@@ -172,10 +172,10 @@ var T = function() {
172
172
  }(), n;
173
173
  }(), ye = T.EMPTY;
174
174
  function me(n) {
175
- return n instanceof T || n && "closed" in n && m(n.remove) && m(n.add) && m(n.unsubscribe);
175
+ return n instanceof T || n && "closed" in n && w(n.remove) && w(n.add) && w(n.unsubscribe);
176
176
  }
177
177
  function ie(n) {
178
- m(n) ? n() : n.unsubscribe();
178
+ w(n) ? n() : n.unsubscribe();
179
179
  }
180
180
  var we = {
181
181
  onUnhandledError: null,
@@ -237,7 +237,7 @@ var Z = function(n) {
237
237
  }
238
238
  }, t;
239
239
  }(T), Oe = Function.prototype.bind;
240
- function D(n, t) {
240
+ function q(n, t) {
241
241
  return Oe.call(n, t);
242
242
  }
243
243
  var Le = function() {
@@ -275,20 +275,20 @@ var Le = function() {
275
275
  M(t, n);
276
276
  function t(e, r, i) {
277
277
  var s = n.call(this) || this, o;
278
- if (m(e) || !e)
278
+ if (w(e) || !e)
279
279
  o = {
280
280
  next: e ?? void 0,
281
281
  error: r ?? void 0,
282
282
  complete: i ?? void 0
283
283
  };
284
284
  else {
285
- var c;
286
- s && we.useDeprecatedNextContext ? (c = Object.create(e), c.unsubscribe = function() {
285
+ var a;
286
+ s && we.useDeprecatedNextContext ? (a = Object.create(e), a.unsubscribe = function() {
287
287
  return s.unsubscribe();
288
288
  }, o = {
289
- next: e.next && D(e.next, c),
290
- error: e.error && D(e.error, c),
291
- complete: e.complete && D(e.complete, c)
289
+ next: e.next && q(e.next, a),
290
+ error: e.error && q(e.error, a),
291
+ complete: e.complete && q(e.complete, a)
292
292
  }) : o = e;
293
293
  }
294
294
  return s.destination = new Le(o), s;
@@ -329,8 +329,8 @@ var z = function() {
329
329
  }, n.prototype.subscribe = function(t, e, r) {
330
330
  var i = this, s = je(t) ? t : new V(t, e, r);
331
331
  return U(function() {
332
- var o = i, c = o.operator, a = o.source;
333
- s.add(c ? c.call(s, a) : a ? i._subscribe(s) : i._trySubscribe(s));
332
+ var o = i, a = o.operator, c = o.source;
333
+ s.add(a ? a.call(s, c) : c ? i._subscribe(s) : i._trySubscribe(s));
334
334
  }), s;
335
335
  }, n.prototype._trySubscribe = function(t) {
336
336
  try {
@@ -342,11 +342,11 @@ var z = function() {
342
342
  var r = this;
343
343
  return e = oe(e), new e(function(i, s) {
344
344
  var o = new V({
345
- next: function(c) {
345
+ next: function(a) {
346
346
  try {
347
- t(c);
348
- } catch (a) {
349
- s(a), o.unsubscribe();
347
+ t(a);
348
+ } catch (c) {
349
+ s(c), o.unsubscribe();
350
350
  }
351
351
  },
352
352
  error: s,
@@ -384,13 +384,13 @@ function oe(n) {
384
384
  return (t = n ?? we.Promise) !== null && t !== void 0 ? t : Promise;
385
385
  }
386
386
  function Ve(n) {
387
- return n && m(n.next) && m(n.error) && m(n.complete);
387
+ return n && w(n.next) && w(n.error) && w(n.complete);
388
388
  }
389
389
  function je(n) {
390
390
  return n && n instanceof Z || Ve(n) && me(n);
391
391
  }
392
392
  function Ne(n) {
393
- return m(n == null ? void 0 : n.lift);
393
+ return w(n == null ? void 0 : n.lift);
394
394
  }
395
395
  function Ce(n) {
396
396
  return function(t) {
@@ -406,27 +406,27 @@ function Ce(n) {
406
406
  };
407
407
  }
408
408
  function Me(n, t, e, r, i) {
409
- return new De(n, t, e, r, i);
409
+ return new qe(n, t, e, r, i);
410
410
  }
411
- var De = function(n) {
411
+ var qe = function(n) {
412
412
  M(t, n);
413
- function t(e, r, i, s, o, c) {
414
- var a = n.call(this, e) || this;
415
- return a.onFinalize = o, a.shouldUnsubscribe = c, a._next = r ? function(u) {
413
+ function t(e, r, i, s, o, a) {
414
+ var c = n.call(this, e) || this;
415
+ return c.onFinalize = o, c.shouldUnsubscribe = a, c._next = r ? function(u) {
416
416
  try {
417
417
  r(u);
418
- } catch (v) {
419
- e.error(v);
418
+ } catch (p) {
419
+ e.error(p);
420
420
  }
421
- } : n.prototype._next, a._error = s ? function(u) {
421
+ } : n.prototype._next, c._error = s ? function(u) {
422
422
  try {
423
423
  s(u);
424
- } catch (v) {
425
- e.error(v);
424
+ } catch (p) {
425
+ e.error(p);
426
426
  } finally {
427
427
  this.unsubscribe();
428
428
  }
429
- } : n.prototype._error, a._complete = i ? function() {
429
+ } : n.prototype._error, c._complete = i ? function() {
430
430
  try {
431
431
  i();
432
432
  } catch (u) {
@@ -434,7 +434,7 @@ var De = function(n) {
434
434
  } finally {
435
435
  this.unsubscribe();
436
436
  }
437
- } : n.prototype._complete, a;
437
+ } : n.prototype._complete, c;
438
438
  }
439
439
  return t.prototype.unsubscribe = function() {
440
440
  var e;
@@ -443,7 +443,7 @@ var De = function(n) {
443
443
  n.prototype.unsubscribe.call(this), !r && ((e = this.onFinalize) === null || e === void 0 || e.call(this));
444
444
  }
445
445
  }, t;
446
- }(Z), qe = X(function(n) {
446
+ }(Z), De = X(function(n) {
447
447
  return function() {
448
448
  n(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
449
449
  };
@@ -458,7 +458,7 @@ var De = function(n) {
458
458
  return r.operator = e, r;
459
459
  }, t.prototype._throwIfClosed = function() {
460
460
  if (this.closed)
461
- throw new qe();
461
+ throw new De();
462
462
  }, t.prototype.next = function(e) {
463
463
  var r = this;
464
464
  U(function() {
@@ -466,15 +466,15 @@ var De = function(n) {
466
466
  if (r._throwIfClosed(), !r.isStopped) {
467
467
  r.currentObservers || (r.currentObservers = Array.from(r.observers));
468
468
  try {
469
- for (var o = Q(r.currentObservers), c = o.next(); !c.done; c = o.next()) {
470
- var a = c.value;
471
- a.next(e);
469
+ for (var o = Q(r.currentObservers), a = o.next(); !a.done; a = o.next()) {
470
+ var c = a.value;
471
+ c.next(e);
472
472
  }
473
473
  } catch (u) {
474
474
  i = { error: u };
475
475
  } finally {
476
476
  try {
477
- c && !c.done && (s = o.return) && s.call(o);
477
+ a && !a.done && (s = o.return) && s.call(o);
478
478
  } finally {
479
479
  if (i)
480
480
  throw i.error;
@@ -514,9 +514,9 @@ var De = function(n) {
514
514
  }, t.prototype._subscribe = function(e) {
515
515
  return this._throwIfClosed(), this._checkFinalizedStatuses(e), this._innerSubscribe(e);
516
516
  }, t.prototype._innerSubscribe = function(e) {
517
- var r = this, i = this, s = i.hasError, o = i.isStopped, c = i.observers;
518
- return s || o ? ye : (this.currentObservers = null, c.push(e), new T(function() {
519
- r.currentObservers = null, F(c, e);
517
+ var r = this, i = this, s = i.hasError, o = i.isStopped, a = i.observers;
518
+ return s || o ? ye : (this.currentObservers = null, a.push(e), new T(function() {
519
+ r.currentObservers = null, F(a, e);
520
520
  }));
521
521
  }, t.prototype._checkFinalizedStatuses = function(e) {
522
522
  var r = this, i = r.hasError, s = r.thrownError, o = r.isStopped;
@@ -646,7 +646,7 @@ var De = function(n) {
646
646
  }, t;
647
647
  }(ae), Ye = new ze(Qe), Ge = Ye;
648
648
  function Ke(n) {
649
- return n && m(n.schedule);
649
+ return n && w(n.schedule);
650
650
  }
651
651
  var Je = X(function(n) {
652
652
  return function() {
@@ -692,23 +692,23 @@ function Xe(n, t, e) {
692
692
  });
693
693
  }
694
694
  function Ze(n, t, e) {
695
- var r = m(n) || t || e ? { next: n, error: t, complete: e } : n;
695
+ var r = w(n) || t || e ? { next: n, error: t, complete: e } : n;
696
696
  return r ? Ce(function(i, s) {
697
697
  var o;
698
698
  (o = r.subscribe) === null || o === void 0 || o.call(r);
699
- var c = !0;
700
- i.subscribe(Me(s, function(a) {
699
+ var a = !0;
700
+ i.subscribe(Me(s, function(c) {
701
701
  var u;
702
- (u = r.next) === null || u === void 0 || u.call(r, a), s.next(a);
702
+ (u = r.next) === null || u === void 0 || u.call(r, c), s.next(c);
703
703
  }, function() {
704
- var a;
705
- c = !1, (a = r.complete) === null || a === void 0 || a.call(r), s.complete();
706
- }, function(a) {
704
+ var c;
705
+ a = !1, (c = r.complete) === null || c === void 0 || c.call(r), s.complete();
706
+ }, function(c) {
707
707
  var u;
708
- c = !1, (u = r.error) === null || u === void 0 || u.call(r, a), s.error(a);
708
+ a = !1, (u = r.error) === null || u === void 0 || u.call(r, c), s.error(c);
709
709
  }, function() {
710
- var a, u;
711
- c && ((a = r.unsubscribe) === null || a === void 0 || a.call(r)), (u = r.finalize) === null || u === void 0 || u.call(r);
710
+ var c, u;
711
+ a && ((c = r.unsubscribe) === null || c === void 0 || c.call(r)), (u = r.finalize) === null || u === void 0 || u.call(r);
712
712
  }));
713
713
  }) : Ee;
714
714
  }
@@ -718,7 +718,7 @@ class l extends Error {
718
718
  super(`Incorrect context (${t}). Cannot perform the requested operation.`), C(this, "context"), this.context = t;
719
719
  }
720
720
  }
721
- class _ extends Error {
721
+ class x extends Error {
722
722
  constructor(t, e, r) {
723
723
  super(`Invalid parameter (${t}). ${r}`), this.param = t, this.value = e, this.reason = r;
724
724
  }
@@ -746,11 +746,11 @@ class le extends Error {
746
746
  e && (r += ` Minimum version supported is ${e}.`), super(r), this.version = t;
747
747
  }
748
748
  }
749
- function S(n) {
749
+ function E(n) {
750
750
  return typeof n == "function";
751
751
  }
752
752
  function it(n) {
753
- return S(n == null ? void 0 : n.lift);
753
+ return E(n == null ? void 0 : n.lift);
754
754
  }
755
755
  function R(n) {
756
756
  return function(t) {
@@ -802,8 +802,8 @@ function K(n, t) {
802
802
  try {
803
803
  for (; (t === void 0 || t-- > 0) && !(i = r.next()).done; )
804
804
  s.push(i.value);
805
- } catch (c) {
806
- o = { error: c };
805
+ } catch (a) {
806
+ o = { error: a };
807
807
  } finally {
808
808
  try {
809
809
  i && !i.done && (e = r.return) && e.call(r);
@@ -826,7 +826,7 @@ function st(n) {
826
826
  }, e = n(t);
827
827
  return e.prototype = Object.create(Error.prototype), e.prototype.constructor = e, e;
828
828
  }
829
- var q = st(function(n) {
829
+ var D = st(function(n) {
830
830
  return function(t) {
831
831
  n(this), this.message = t ? t.length + ` errors occurred during unsubscription:
832
832
  ` + t.map(function(e, r) {
@@ -853,15 +853,15 @@ var te = function() {
853
853
  if (o)
854
854
  if (this._parentage = null, Array.isArray(o))
855
855
  try {
856
- for (var c = he(o), a = c.next(); !a.done; a = c.next()) {
857
- var u = a.value;
856
+ for (var a = he(o), c = a.next(); !c.done; c = a.next()) {
857
+ var u = c.value;
858
858
  u.remove(this);
859
859
  }
860
- } catch (p) {
861
- t = { error: p };
860
+ } catch (f) {
861
+ t = { error: f };
862
862
  } finally {
863
863
  try {
864
- a && !a.done && (e = c.return) && e.call(c);
864
+ c && !c.done && (e = a.return) && e.call(a);
865
865
  } finally {
866
866
  if (t)
867
867
  throw t.error;
@@ -869,30 +869,30 @@ var te = function() {
869
869
  }
870
870
  else
871
871
  o.remove(this);
872
- var v = this.initialTeardown;
873
- if (S(v))
872
+ var p = this.initialTeardown;
873
+ if (E(p))
874
874
  try {
875
- v();
876
- } catch (p) {
877
- s = p instanceof q ? p.errors : [p];
875
+ p();
876
+ } catch (f) {
877
+ s = f instanceof D ? f.errors : [f];
878
878
  }
879
- var g = this._finalizers;
880
- if (g) {
879
+ var v = this._finalizers;
880
+ if (v) {
881
881
  this._finalizers = null;
882
882
  try {
883
- for (var E = he(g), w = E.next(); !w.done; w = E.next()) {
884
- var j = w.value;
883
+ for (var b = he(v), S = b.next(); !S.done; S = b.next()) {
884
+ var j = S.value;
885
885
  try {
886
886
  pe(j);
887
- } catch (p) {
888
- s = s ?? [], p instanceof q ? s = J(J([], K(s)), K(p.errors)) : s.push(p);
887
+ } catch (f) {
888
+ s = s ?? [], f instanceof D ? s = J(J([], K(s)), K(f.errors)) : s.push(f);
889
889
  }
890
890
  }
891
- } catch (p) {
892
- r = { error: p };
891
+ } catch (f) {
892
+ r = { error: f };
893
893
  } finally {
894
894
  try {
895
- w && !w.done && (i = E.return) && i.call(E);
895
+ S && !S.done && (i = b.return) && i.call(b);
896
896
  } finally {
897
897
  if (r)
898
898
  throw r.error;
@@ -900,7 +900,7 @@ var te = function() {
900
900
  }
901
901
  }
902
902
  if (s)
903
- throw new q(s);
903
+ throw new D(s);
904
904
  }
905
905
  }, n.prototype.add = function(t) {
906
906
  var e;
@@ -934,10 +934,10 @@ var te = function() {
934
934
  }();
935
935
  te.EMPTY;
936
936
  function _e(n) {
937
- return n instanceof te || n && "closed" in n && S(n.remove) && S(n.add) && S(n.unsubscribe);
937
+ return n instanceof te || n && "closed" in n && E(n.remove) && E(n.add) && E(n.unsubscribe);
938
938
  }
939
939
  function pe(n) {
940
- S(n) ? n() : n.unsubscribe();
940
+ E(n) ? n() : n.unsubscribe();
941
941
  }
942
942
  var Ie = {
943
943
  onUnhandledError: null,
@@ -1036,20 +1036,20 @@ var lt = function() {
1036
1036
  ee(t, n);
1037
1037
  function t(e, r, i) {
1038
1038
  var s = n.call(this) || this, o;
1039
- if (S(e) || !e)
1039
+ if (E(e) || !e)
1040
1040
  o = {
1041
1041
  next: e ?? void 0,
1042
1042
  error: r ?? void 0,
1043
1043
  complete: i ?? void 0
1044
1044
  };
1045
1045
  else {
1046
- var c;
1047
- s && Ie.useDeprecatedNextContext ? (c = Object.create(e), c.unsubscribe = function() {
1046
+ var a;
1047
+ s && Ie.useDeprecatedNextContext ? (a = Object.create(e), a.unsubscribe = function() {
1048
1048
  return s.unsubscribe();
1049
1049
  }, o = {
1050
- next: e.next && B(e.next, c),
1051
- error: e.error && B(e.error, c),
1052
- complete: e.complete && B(e.complete, c)
1050
+ next: e.next && B(e.next, a),
1051
+ error: e.error && B(e.error, a),
1052
+ complete: e.complete && B(e.complete, a)
1053
1053
  }) : o = e;
1054
1054
  }
1055
1055
  return s.destination = new lt(o), s;
@@ -1090,8 +1090,8 @@ var gt = function() {
1090
1090
  }, n.prototype.subscribe = function(t, e, r) {
1091
1091
  var i = this, s = bt(t) ? t : new W(t, e, r);
1092
1092
  return at(function() {
1093
- var o = i, c = o.operator, a = o.source;
1094
- s.add(c ? c.call(s, a) : a ? i._subscribe(s) : i._trySubscribe(s));
1093
+ var o = i, a = o.operator, c = o.source;
1094
+ s.add(a ? a.call(s, c) : c ? i._subscribe(s) : i._trySubscribe(s));
1095
1095
  }), s;
1096
1096
  }, n.prototype._trySubscribe = function(t) {
1097
1097
  try {
@@ -1103,11 +1103,11 @@ var gt = function() {
1103
1103
  var r = this;
1104
1104
  return e = ge(e), new e(function(i, s) {
1105
1105
  var o = new W({
1106
- next: function(c) {
1106
+ next: function(a) {
1107
1107
  try {
1108
- t(c);
1109
- } catch (a) {
1110
- s(a), o.unsubscribe();
1108
+ t(a);
1109
+ } catch (c) {
1110
+ s(c), o.unsubscribe();
1111
1111
  }
1112
1112
  },
1113
1113
  error: s,
@@ -1145,7 +1145,7 @@ function ge(n) {
1145
1145
  return (t = n ?? Ie.Promise) !== null && t !== void 0 ? t : Promise;
1146
1146
  }
1147
1147
  function vt(n) {
1148
- return n && S(n.next) && S(n.error) && S(n.complete);
1148
+ return n && E(n.next) && E(n.error) && E(n.complete);
1149
1149
  }
1150
1150
  function bt(n) {
1151
1151
  return n && n instanceof re || vt(n) && _e(n);
@@ -1155,23 +1155,23 @@ function P(n, t, e, r, i) {
1155
1155
  }
1156
1156
  var yt = function(n) {
1157
1157
  ee(t, n);
1158
- function t(e, r, i, s, o, c) {
1159
- var a = n.call(this, e) || this;
1160
- return a.onFinalize = o, a.shouldUnsubscribe = c, a._next = r ? function(u) {
1158
+ function t(e, r, i, s, o, a) {
1159
+ var c = n.call(this, e) || this;
1160
+ return c.onFinalize = o, c.shouldUnsubscribe = a, c._next = r ? function(u) {
1161
1161
  try {
1162
1162
  r(u);
1163
- } catch (v) {
1164
- e.error(v);
1163
+ } catch (p) {
1164
+ e.error(p);
1165
1165
  }
1166
- } : n.prototype._next, a._error = s ? function(u) {
1166
+ } : n.prototype._next, c._error = s ? function(u) {
1167
1167
  try {
1168
1168
  s(u);
1169
- } catch (v) {
1170
- e.error(v);
1169
+ } catch (p) {
1170
+ e.error(p);
1171
1171
  } finally {
1172
1172
  this.unsubscribe();
1173
1173
  }
1174
- } : n.prototype._error, a._complete = i ? function() {
1174
+ } : n.prototype._error, c._complete = i ? function() {
1175
1175
  try {
1176
1176
  i();
1177
1177
  } catch (u) {
@@ -1179,7 +1179,7 @@ var yt = function(n) {
1179
1179
  } finally {
1180
1180
  this.unsubscribe();
1181
1181
  }
1182
- } : n.prototype._complete, a;
1182
+ } : n.prototype._complete, c;
1183
1183
  }
1184
1184
  return t.prototype.unsubscribe = function() {
1185
1185
  var e;
@@ -1200,7 +1200,7 @@ function h(n, t) {
1200
1200
  var mt = new gt(function(n) {
1201
1201
  return n.complete();
1202
1202
  });
1203
- function y(n) {
1203
+ function m(n) {
1204
1204
  return n <= 0 ? function() {
1205
1205
  return mt;
1206
1206
  } : R(function(t, e) {
@@ -1210,7 +1210,7 @@ function y(n) {
1210
1210
  }));
1211
1211
  });
1212
1212
  }
1213
- function f(n, t) {
1213
+ function g(n, t) {
1214
1214
  return R(function(e, r) {
1215
1215
  var i = 0;
1216
1216
  e.subscribe(P(r, function(s) {
@@ -1228,23 +1228,23 @@ function wt(n, t) {
1228
1228
  });
1229
1229
  }
1230
1230
  function d(n, t, e) {
1231
- var r = S(n) || t || e ? { next: n, error: t, complete: e } : n;
1231
+ var r = E(n) || t || e ? { next: n, error: t, complete: e } : n;
1232
1232
  return r ? R(function(i, s) {
1233
1233
  var o;
1234
1234
  (o = r.subscribe) === null || o === void 0 || o.call(r);
1235
- var c = !0;
1236
- i.subscribe(P(s, function(a) {
1235
+ var a = !0;
1236
+ i.subscribe(P(s, function(c) {
1237
1237
  var u;
1238
- (u = r.next) === null || u === void 0 || u.call(r, a), s.next(a);
1238
+ (u = r.next) === null || u === void 0 || u.call(r, c), s.next(c);
1239
1239
  }, function() {
1240
- var a;
1241
- c = !1, (a = r.complete) === null || a === void 0 || a.call(r), s.complete();
1242
- }, function(a) {
1240
+ var c;
1241
+ a = !1, (c = r.complete) === null || c === void 0 || c.call(r), s.complete();
1242
+ }, function(c) {
1243
1243
  var u;
1244
- c = !1, (u = r.error) === null || u === void 0 || u.call(r, a), s.error(a);
1244
+ a = !1, (u = r.error) === null || u === void 0 || u.call(r, c), s.error(c);
1245
1245
  }, function() {
1246
- var a, u;
1247
- c && ((a = r.unsubscribe) === null || a === void 0 || a.call(r)), (u = r.finalize) === null || u === void 0 || u.call(r);
1246
+ var c, u;
1247
+ a && ((c = r.unsubscribe) === null || c === void 0 || c.call(r)), (u = r.finalize) === null || u === void 0 || u.call(r);
1248
1248
  }));
1249
1249
  }) : Te;
1250
1250
  }
@@ -1322,7 +1322,7 @@ class xt {
1322
1322
  determineContext() {
1323
1323
  return Xe(1e3).pipe(
1324
1324
  h(() => (this.isEmbedded() ? this.currentContext = "user" : this.currentContext = "guest", this.currentContext)),
1325
- y(1)
1325
+ m(1)
1326
1326
  );
1327
1327
  }
1328
1328
  /**
@@ -1337,7 +1337,7 @@ class xt {
1337
1337
  const t = "HELLO", e = this.createMessage(t);
1338
1338
  e.protocolVersions = this.supportedVersions, this.logCreated(t, e);
1339
1339
  const r = this.incomingMessages$.pipe(
1340
- f((i) => i.type === t && i.replyTo === e.id),
1340
+ g((i) => i.type === t && i.replyTo === e.id),
1341
1341
  h((i) => i),
1342
1342
  d(this.logReceived(t)),
1343
1343
  h((i) => {
@@ -1350,7 +1350,7 @@ class xt {
1350
1350
  `[IPC] Negotiated IPC Protocol Version: ${this.negotiatedProtocolVersion}`
1351
1351
  );
1352
1352
  }),
1353
- y(1)
1353
+ m(1)
1354
1354
  );
1355
1355
  return this.logService.debug(`Created ${t} Reply handler`), this.inIframe ? this.createIframeChannel().then(() => this.finishIpcSetup(e)) : this.finishIpcSetup(e), r;
1356
1356
  }
@@ -1367,10 +1367,10 @@ class xt {
1367
1367
  const t = "TOKEN", e = this.createMessage(t);
1368
1368
  this.logCreated(t, e);
1369
1369
  const r = this.incomingMessages$.pipe(
1370
- f((i) => i.type === t && i.replyTo === e.id),
1370
+ g((i) => i.type === t && i.replyTo === e.id),
1371
1371
  h((i) => i),
1372
1372
  d(this.logReceived(t)),
1373
- y(1)
1373
+ m(1)
1374
1374
  );
1375
1375
  return this.logService.debug(`Created ${t} Reply handler`), this.port2.postMessage(e), this.logSent(t, e), r;
1376
1376
  }
@@ -1396,11 +1396,11 @@ class xt {
1396
1396
  displayName: i,
1397
1397
  jwtToken: s,
1398
1398
  serverUrl: o,
1399
- region: c,
1400
- joinMicMuted: a,
1399
+ region: a,
1400
+ joinMicMuted: c,
1401
1401
  joinWithoutCamera: u
1402
- } = t, v = "JOINING ROOM", g = this.createMessage(v, !1);
1403
- g.roomName = e, g.jwtToken = s, g.serverUrl = o, g.region = c, g.roomInvite = r, g.joinMicMuted = a ?? !1, g.joinWithoutCamera = u ?? !1, g.displayName = i, this.logCreated(v, g), this.port2.postMessage(g), this.logSent(v, g);
1402
+ } = t, p = "JOINING ROOM", v = this.createMessage(p, !1);
1403
+ v.roomName = e, v.jwtToken = s, v.serverUrl = o, v.region = a, v.roomInvite = r, v.joinMicMuted = c ?? !1, v.joinWithoutCamera = u ?? !1, v.displayName = i, this.logCreated(p, v), this.port2.postMessage(v), this.logSent(p, v);
1404
1404
  }
1405
1405
  /**
1406
1406
  * Sends a {@link LeavingRoomMessage} lifecycle message to the Host app.
@@ -1450,7 +1450,7 @@ class xt {
1450
1450
  throw new l(this.currentContext);
1451
1451
  const t = "JOIN ROOM";
1452
1452
  return this.incomingMessages$.pipe(
1453
- f((e) => e.type === t && e.target === "client"),
1453
+ g((e) => e.type === t && e.target === "client"),
1454
1454
  h((e) => e),
1455
1455
  d(this.logReceived(t)),
1456
1456
  h((e) => e)
@@ -1486,7 +1486,7 @@ class xt {
1486
1486
  throw new l(this.currentContext);
1487
1487
  const t = "LEAVE ROOM";
1488
1488
  return this.incomingMessages$.pipe(
1489
- f((e) => e.type === t && e.target === "client"),
1489
+ g((e) => e.type === t && e.target === "client"),
1490
1490
  h((e) => e),
1491
1491
  d(this.logReceived(t)),
1492
1492
  h((e) => e)
@@ -1523,7 +1523,7 @@ class xt {
1523
1523
  throw new l(this.currentContext);
1524
1524
  const t = "CONFIG";
1525
1525
  return this.incomingMessages$.pipe(
1526
- f((e) => e.type === t && e.target === "client"),
1526
+ g((e) => e.type === t && e.target === "client"),
1527
1527
  h((e) => e),
1528
1528
  d(this.logReceived(t)),
1529
1529
  h((e) => ({
@@ -1546,11 +1546,11 @@ class xt {
1546
1546
  const e = "SCREENSHARE SOURCE", r = this.createMessage(e);
1547
1547
  r.sourceTypes = t, this.logCreated(e, r);
1548
1548
  const i = this.incomingMessages$.pipe(
1549
- f((s) => s.type === e && s.replyTo === r.id),
1549
+ g((s) => s.type === e && s.replyTo === r.id),
1550
1550
  h((s) => s),
1551
1551
  d(this.logReceived(e)),
1552
1552
  h((s) => s),
1553
- y(1)
1553
+ m(1)
1554
1554
  );
1555
1555
  return this.logService.debug(`Created ${e} Reply handler`), this.port2.postMessage(r), this.logSent(e, r), i;
1556
1556
  }
@@ -1560,11 +1560,11 @@ class xt {
1560
1560
  const i = "LAYOUT CHANGE";
1561
1561
  let s, o;
1562
1562
  if (e && r ? (s = this.createMessage(i, !1, r), s.result = e) : (s = this.createMessage(i), o = this.incomingMessages$.pipe(
1563
- f((c) => c.type === i && c.replyTo === s.id),
1564
- h((c) => c),
1563
+ g((a) => a.type === i && a.replyTo === s.id),
1564
+ h((a) => a),
1565
1565
  d(this.logReceived(i)),
1566
- h((c) => c),
1567
- y(1)
1566
+ h((a) => a),
1567
+ m(1)
1568
1568
  ), this.logService.debug(`Created ${i} Reply handler`)), s.layout = t, this.logCreated(i, s), this.port2.postMessage(s), this.logSent(i, s), o)
1569
1569
  return o;
1570
1570
  }
@@ -1604,7 +1604,7 @@ class xt {
1604
1604
  throw new l(this.currentContext);
1605
1605
  const t = "LAYOUT CHANGE";
1606
1606
  return this.incomingMessages$.pipe(
1607
- f((e) => e.type === t && e.target === "client" && e.replyTo === null),
1607
+ g((e) => e.type === t && e.target === "client" && e.replyTo === null),
1608
1608
  h((e) => e),
1609
1609
  d(this.logReceived(t)),
1610
1610
  h((e) => e)
@@ -1617,10 +1617,10 @@ class xt {
1617
1617
  const e = "OAUTH TOKEN", r = this.createMessage(e);
1618
1618
  r.providerTypes = t, this.logCreated(e, r);
1619
1619
  const i = this.incomingMessages$.pipe(
1620
- f((s) => s.type === e && s.replyTo === r.id),
1620
+ g((s) => s.type === e && s.replyTo === r.id),
1621
1621
  h((s) => s),
1622
1622
  d(this.logReceived(e)),
1623
- y(1)
1623
+ m(1)
1624
1624
  );
1625
1625
  return this.logService.debug(`Created ${e} Reply handler`), this.port2.postMessage(r), this.logSent(e, r), i;
1626
1626
  }
@@ -1634,32 +1634,32 @@ class xt {
1634
1634
  if (!this.isEmbedded())
1635
1635
  throw new l(this.currentContext);
1636
1636
  if (e === "group" && i === void 0)
1637
- throw new _(
1637
+ throw new x(
1638
1638
  "currentContacts",
1639
1639
  i,
1640
1640
  "currentContacts is required for group streams"
1641
1641
  );
1642
1642
  if (e === "direct" && i !== void 0)
1643
- throw new _(
1643
+ throw new x(
1644
1644
  "currentContacts",
1645
1645
  i,
1646
1646
  "currentContacts should not be passed for direct streams"
1647
1647
  );
1648
1648
  const s = "SELECT CONTACTS", o = this.createMessage(s, !0);
1649
1649
  o.streamType = e, o.streamId = t, o.contactType = r, o.currentContacts = i, this.logCreated(s, o);
1650
- const c = this.incomingMessages$.pipe(
1651
- f((a) => a.type === s && a.replyTo === o.id),
1650
+ const a = this.incomingMessages$.pipe(
1651
+ g((c) => c.type === s && c.replyTo === o.id),
1652
1652
  d(this.logReceived(s)),
1653
1653
  // validate if `streamId` is the same as we sent
1654
- h((a) => {
1655
- const u = a;
1654
+ h((c) => {
1655
+ const u = c;
1656
1656
  if (u.streamId !== t)
1657
1657
  throw new rt(u.streamId, t);
1658
1658
  return e === "direct" && u.contacts.length > 1 && (u.contacts = [u.contacts[0]]), u;
1659
1659
  }),
1660
- y(1)
1660
+ m(1)
1661
1661
  );
1662
- return this.logService.debug(`Created ${s} Reply handler`), this.port2.postMessage(o), this.logSent(s, o), c;
1662
+ return this.logService.debug(`Created ${s} Reply handler`), this.port2.postMessage(o), this.logSent(s, o), a;
1663
1663
  }
1664
1664
  /**
1665
1665
  * Request detailed contact information for the given Cloud usernames.
@@ -1673,14 +1673,14 @@ class xt {
1673
1673
  if (!this.isEmbedded())
1674
1674
  throw new l(this.currentContext);
1675
1675
  if (!t.length)
1676
- throw new _("contacts", t, "At least one contact is required");
1676
+ throw new x("contacts", t, "At least one contact is required");
1677
1677
  const e = "MATCH CONTACTS", r = this.createMessage(e);
1678
1678
  r.contacts = [...t], this.logCreated(e, r);
1679
1679
  const i = this.incomingMessages$.pipe(
1680
- f((s) => s.type === e && s.replyTo === r.id),
1680
+ g((s) => s.type === e && s.replyTo === r.id),
1681
1681
  d(this.logReceived(e)),
1682
1682
  h((s) => s),
1683
- y(1)
1683
+ m(1)
1684
1684
  );
1685
1685
  return this.logService.debug(`Created ${e} Reply handler`), this.port2.postMessage(r), this.logSent(e, r), i;
1686
1686
  }
@@ -1715,7 +1715,7 @@ class xt {
1715
1715
  throw new l(this.currentContext);
1716
1716
  const t = "PUSH MESSAGE";
1717
1717
  return this.incomingMessages$.pipe(
1718
- f((e) => e.type === t && e.target === "client"),
1718
+ g((e) => e.type === t && e.target === "client"),
1719
1719
  h((e) => e),
1720
1720
  d(this.logReceived(t))
1721
1721
  );
@@ -1735,10 +1735,10 @@ class xt {
1735
1735
  const t = "PUSH TOKEN", e = this.createMessage(t);
1736
1736
  this.logCreated(t, e);
1737
1737
  const r = this.incomingMessages$.pipe(
1738
- f((i) => i.type === t && i.replyTo === e.id),
1738
+ g((i) => i.type === t && i.replyTo === e.id),
1739
1739
  d(this.logReceived(t)),
1740
1740
  h((i) => i),
1741
- y(1)
1741
+ m(1)
1742
1742
  );
1743
1743
  return this.logService.debug(`Created ${t} Reply handler`), this.port2.postMessage(e), this.logSent(t, e), r;
1744
1744
  }
@@ -1774,7 +1774,7 @@ class xt {
1774
1774
  throw new l(this.currentContext);
1775
1775
  const t = "PUSH TOKEN";
1776
1776
  return this.incomingMessages$.pipe(
1777
- f(
1777
+ g(
1778
1778
  (e) => e.type === t && e.target === "client" && e.replyTo === null && e.expectReply === !1
1779
1779
  ),
1780
1780
  h((e) => {
@@ -1798,7 +1798,7 @@ class xt {
1798
1798
  throw new l(this.currentContext);
1799
1799
  const t = "BADGE QUERY";
1800
1800
  return this.incomingMessages$.pipe(
1801
- f((e) => e.type === t && e.target === "client"),
1801
+ g((e) => e.type === t && e.target === "client"),
1802
1802
  h((e) => e),
1803
1803
  d(this.logReceived(t))
1804
1804
  );
@@ -1856,7 +1856,7 @@ class xt {
1856
1856
  throw new l(this.currentContext);
1857
1857
  const t = "LIFECYCLE";
1858
1858
  return this.incomingMessages$.pipe(
1859
- f((e) => e.type === t && e.target === "client"),
1859
+ g((e) => e.type === t && e.target === "client"),
1860
1860
  h((e) => e),
1861
1861
  d(this.logReceived(t))
1862
1862
  );
@@ -1896,7 +1896,7 @@ class xt {
1896
1896
  throw new l(this.currentContext);
1897
1897
  const t = "REQUEST LOGS";
1898
1898
  return this.incomingMessages$.pipe(
1899
- f((e) => e.type === t && e.target === "client"),
1899
+ g((e) => e.type === t && e.target === "client"),
1900
1900
  h((e) => e),
1901
1901
  d(this.logReceived(t))
1902
1902
  );
@@ -1966,7 +1966,7 @@ class xt {
1966
1966
  const s = "FILE REQUEST", o = this.createMessage(s);
1967
1967
  if (o.fileHash = t.toLowerCase(), o.intent = e, o.maxChunkSizeInBytes = i, e === "attachment") {
1968
1968
  if (!r)
1969
- throw new _(
1969
+ throw new x(
1970
1970
  "streamId",
1971
1971
  r,
1972
1972
  "streamId is required for attachment intent"
@@ -1974,17 +1974,17 @@ class xt {
1974
1974
  o.streamId = r;
1975
1975
  }
1976
1976
  this.logCreated(s, o);
1977
- let c = 0;
1978
- const a = this.incomingMessages$.pipe(
1979
- f(
1977
+ let a = 0;
1978
+ const c = this.incomingMessages$.pipe(
1979
+ g(
1980
1980
  (u) => u.type === s && u.replyTo === o.id
1981
1981
  ),
1982
1982
  d(this.logReceived(s)),
1983
- d(() => c++),
1983
+ d(() => a++),
1984
1984
  h((u) => (u.result === "success" && (u.chunkHash = u.chunkHash.toLowerCase()), u)),
1985
- wt((u) => u.result === "success" && c < u.totalChunks, !0)
1985
+ wt((u) => u.result === "success" && a < u.totalChunks, !0)
1986
1986
  );
1987
- return this.port2.postMessage(o), this.logSent(s, o), a;
1987
+ return this.port2.postMessage(o), this.logSent(s, o), c;
1988
1988
  }
1989
1989
  /**
1990
1990
  * Sends a {@link FileRequestMessageReply} to the Host app, to reply to a
@@ -1998,6 +1998,9 @@ class xt {
1998
1998
  * to send the file chunks. The `chunkHash` field should be set to the SHA256 hash of the chunk
1999
1999
  * being sent.
2000
2000
  *
2001
+ * In case of `error` or `not found`, only one `FileRequestMessageReply` message should be sent
2002
+ * to the Host app to notify of the result.
2003
+ *
2001
2004
  * @param receivedMsg - The original {@link FileRequestMessage} that was received
2002
2005
  * @param result - The result of the file request. Can be either `success`, `error` or `not found`
2003
2006
  * along with the associated {@link FileRequestResult} properties.
@@ -2028,7 +2031,7 @@ class xt {
2028
2031
  throw new l(this.currentContext);
2029
2032
  const t = "FILE REQUEST";
2030
2033
  return this.incomingMessages$.pipe(
2031
- f(
2034
+ g(
2032
2035
  (e) => e.type === t && e.target === "client" && e.replyTo === null
2033
2036
  ),
2034
2037
  h((e) => (e.fileHash = e.fileHash.toLowerCase(), e)),
@@ -2055,32 +2058,38 @@ class xt {
2055
2058
  *
2056
2059
  * @returns This method returns void.
2057
2060
  */
2058
- sendFileSelectionMessage(t = "attachment", e, r, i, s) {
2061
+ sendFileSelectionMessage(t = "attachment", e, r, i, s, o) {
2059
2062
  if (!this.isEmbedded())
2060
2063
  throw new l(this.currentContext);
2061
- const o = "FILE SELECTION", c = this.createMessage(o);
2062
- if (c.intent = t, c.maxCount = r, c.maxFileSizeInBytes = i, c.mimeTypes = s, t === "attachment") {
2064
+ const a = "FILE SELECTION", c = this.createMessage(a);
2065
+ if (c.intent = t, c.maxCount = i, c.maxFileSizeInBytes = s, c.mimeTypes = o, t === "attachment") {
2063
2066
  if (!e)
2064
- throw new _(
2067
+ throw new x(
2065
2068
  "streamId",
2066
2069
  e,
2067
2070
  "streamId is required for attachment intent"
2068
2071
  );
2069
- c.streamId = e;
2072
+ if (!r)
2073
+ throw new x(
2074
+ "correlationId",
2075
+ r,
2076
+ "correlationId is required for attachment intent"
2077
+ );
2078
+ c.streamId = e, c.correlationId = r;
2070
2079
  }
2071
- this.logCreated(o, c);
2072
- const a = this.incomingMessages$.pipe(
2073
- f(
2074
- (u) => u.type === o && u.replyTo === c.id
2080
+ this.logCreated(a, c);
2081
+ const u = this.incomingMessages$.pipe(
2082
+ g(
2083
+ (p) => p.type === a && p.replyTo === c.id
2075
2084
  ),
2076
- h((u) => {
2085
+ h((p) => {
2077
2086
  var v;
2078
- return u.files = (v = u.files) == null ? void 0 : v.map((g) => (g.fileHash = g.fileHash.toLowerCase(), g)), u;
2087
+ return p.files = (v = p.files) == null ? void 0 : v.map((b) => (b.fileHash = b.fileHash.toLowerCase(), b)), p;
2079
2088
  }),
2080
- d(this.logReceived(o)),
2081
- y(1)
2089
+ d(this.logReceived(a)),
2090
+ m(1)
2082
2091
  );
2083
- return this.port2.postMessage(c), this.logSent(o, c), a;
2092
+ return this.port2.postMessage(c), this.logSent(a, c), u;
2084
2093
  }
2085
2094
  /**
2086
2095
  * Sends a {@link FileDownloadMessage} to the Host app, to request the download of a file.
@@ -2101,13 +2110,13 @@ class xt {
2101
2110
  throw new l(this.currentContext);
2102
2111
  const s = "FILE DOWNLOAD", o = this.createMessage(s);
2103
2112
  o.url = t, o.key = e, o.fileName = r, o.mimeType = i, this.logCreated(s, o);
2104
- const c = this.incomingMessages$.pipe(
2105
- f((a) => a.type === s && a.replyTo === o.id),
2113
+ const a = this.incomingMessages$.pipe(
2114
+ g((c) => c.type === s && c.replyTo === o.id),
2106
2115
  d(this.logReceived(s)),
2107
- h((a) => a),
2108
- y(1)
2116
+ h((c) => c),
2117
+ m(1)
2109
2118
  );
2110
- return this.port2.postMessage(o), this.logSent(s, o), c;
2119
+ return this.port2.postMessage(o), this.logSent(s, o), a;
2111
2120
  }
2112
2121
  sendFileUploadMessage() {
2113
2122
  throw new Error("Not implemented");
@@ -2124,12 +2133,18 @@ class xt {
2124
2133
  * @param fileHash - The SHA256 hash of the file to open.
2125
2134
  * @param fileName - _Optional_. The name of the file to open.
2126
2135
  * @param streamId - _Optional_. The ID of the message stream from which the file is opened from.
2136
+ * @param url - _Optional_. URL from where the host can download the file if it isn't in storage.
2137
+ * @param correlationId - _Optional_. Correlation ID of the message this file was attached to.
2138
+ * @param key - _Optional_. Key used to encrypt the original attachment.
2139
+ * @param sender - _Optional_. The {@link ContactItem} of the sender of the file.
2140
+ *
2141
+ * @returns This method returns void.
2127
2142
  */
2128
- sendFileOpenMessage(t, e, r) {
2143
+ sendFileOpenMessage(t, e, r, i, s, o, a) {
2129
2144
  if (!this.isEmbedded())
2130
2145
  throw new l(this.currentContext);
2131
- const i = "FILE OPEN", s = this.createMessage(i, !1);
2132
- s.fileHash = t.toLowerCase(), s.fileName = e, s.streamId = r, this.logCreated(i, s), this.port2.postMessage(s), this.logSent(i, s);
2146
+ const c = "FILE OPEN", u = this.createMessage(c, !1);
2147
+ u.fileHash = t.toLowerCase(), u.fileName = e, u.streamId = r, u.url = i, u.correlationId = s, u.key = o, u.sender = a, this.logCreated(c, u), this.port2.postMessage(u), this.logSent(c, u);
2133
2148
  }
2134
2149
  /**
2135
2150
  * Sends a {@link FileRemoveMessage} to the Host app, to request removal of a file from the
@@ -2152,10 +2167,10 @@ class xt {
2152
2167
  const r = "FILE REMOVE", i = this.createMessage(r, !0);
2153
2168
  i.hash = t.toLowerCase(), i.streamId = e, this.logCreated(r, i);
2154
2169
  const s = this.incomingMessages$.pipe(
2155
- f((o) => o.type === r && o.replyTo === i.id),
2170
+ g((o) => o.type === r && o.replyTo === i.id),
2156
2171
  d(this.logReceived(r)),
2157
2172
  h((o) => o),
2158
- y(1)
2173
+ m(1)
2159
2174
  );
2160
2175
  return this.port2.postMessage(i), this.logSent(r, i), s;
2161
2176
  }
@@ -2312,15 +2327,15 @@ class Rt {
2312
2327
  /**
2313
2328
  * The type of the `Host` app the `Client` is embedded in.
2314
2329
  */
2315
- x(this, "host");
2330
+ _(this, "host");
2316
2331
  /**
2317
2332
  * The cloud ID of the `Host` app the `Client` is embedded in.
2318
2333
  */
2319
- x(this, "cloudId");
2320
- x(this, "logger");
2321
- x(this, "helper");
2322
- x(this, "listeners");
2323
- this.logger = t ?? console, this.helper = new xt(It, this.logger), this.listeners = /* @__PURE__ */ new Map(), this.listeners.set(b.BadgeQuery, /* @__PURE__ */ new Set()), this.listeners.set(b.Lifecycle, /* @__PURE__ */ new Set()), this.listeners.set(b.PushToken, /* @__PURE__ */ new Set());
2334
+ _(this, "cloudId");
2335
+ _(this, "logger");
2336
+ _(this, "helper");
2337
+ _(this, "listeners");
2338
+ this.logger = t ?? console, this.helper = new xt(It, this.logger), this.listeners = /* @__PURE__ */ new Map(), this.listeners.set(y.BadgeQuery, /* @__PURE__ */ new Set()), this.listeners.set(y.Lifecycle, /* @__PURE__ */ new Set()), this.listeners.set(y.PushToken, /* @__PURE__ */ new Set());
2324
2339
  }
2325
2340
  /**
2326
2341
  * Returns whether the app is running inside a native WebView (`host` context) or as a
@@ -2362,17 +2377,17 @@ class Rt {
2362
2377
  this.helper.onBadgeQueryMessage().subscribe((e) => {
2363
2378
  var r;
2364
2379
  this.logger.debug("Received Badge Query: ", e);
2365
- for (const i of ((r = this.listeners.get(b.BadgeQuery)) == null ? void 0 : r.values()) ?? [])
2380
+ for (const i of ((r = this.listeners.get(y.BadgeQuery)) == null ? void 0 : r.values()) ?? [])
2366
2381
  i();
2367
2382
  }), this.helper.onLifecycleMessage().subscribe((e) => {
2368
2383
  var r;
2369
2384
  this.logger.debug("Received Lifecycle Event: ", e);
2370
- for (const i of ((r = this.listeners.get(b.Lifecycle)) == null ? void 0 : r.values()) ?? [])
2385
+ for (const i of ((r = this.listeners.get(y.Lifecycle)) == null ? void 0 : r.values()) ?? [])
2371
2386
  i(e.eventName, e.payload);
2372
2387
  }), this.helper.onPushTokenMessage().subscribe((e) => {
2373
2388
  var r;
2374
2389
  this.logger.debug("Received Push Token: ", e);
2375
- for (const i of ((r = this.listeners.get(b.PushToken)) == null ? void 0 : r.values()) ?? [])
2390
+ for (const i of ((r = this.listeners.get(y.PushToken)) == null ? void 0 : r.values()) ?? [])
2376
2391
  i(e.pushToken, e.appId, e.selector);
2377
2392
  }), this.cloudId = t.cloudId, this.host = t.host;
2378
2393
  }),
@@ -2386,7 +2401,7 @@ class Rt {
2386
2401
  let s;
2387
2402
  if (e === "multi") {
2388
2403
  if (!r || !Array.isArray(r))
2389
- throw new _(
2404
+ throw new x(
2390
2405
  "currentContacts",
2391
2406
  r,
2392
2407
  "currentContacts is required for group streams"
@@ -2469,9 +2484,9 @@ class Rt {
2469
2484
  */
2470
2485
  onBadgeQueryRequest(t) {
2471
2486
  var e;
2472
- return this.logger.debug("Registering for Badge Query"), (e = this.listeners.get(b.BadgeQuery)) == null || e.add(t), () => {
2487
+ return this.logger.debug("Registering for Badge Query"), (e = this.listeners.get(y.BadgeQuery)) == null || e.add(t), () => {
2473
2488
  var r;
2474
- return (r = this.listeners.get(b.BadgeQuery)) == null ? void 0 : r.delete(t);
2489
+ return (r = this.listeners.get(y.BadgeQuery)) == null ? void 0 : r.delete(t);
2475
2490
  };
2476
2491
  }
2477
2492
  /**
@@ -2488,9 +2503,9 @@ class Rt {
2488
2503
  */
2489
2504
  onLifecycleEvent(t) {
2490
2505
  var e;
2491
- return this.logger.debug("Registering for Lifecycle Event"), (e = this.listeners.get(b.Lifecycle)) == null || e.add(t), () => {
2506
+ return this.logger.debug("Registering for Lifecycle Event"), (e = this.listeners.get(y.Lifecycle)) == null || e.add(t), () => {
2492
2507
  var r;
2493
- return (r = this.listeners.get(b.Lifecycle)) == null ? void 0 : r.delete(t);
2508
+ return (r = this.listeners.get(y.Lifecycle)) == null ? void 0 : r.delete(t);
2494
2509
  };
2495
2510
  }
2496
2511
  /**
@@ -2506,9 +2521,9 @@ class Rt {
2506
2521
  */
2507
2522
  onPushToken(t) {
2508
2523
  var e;
2509
- return this.logger.debug("Registering for Push Token"), (e = this.listeners.get(b.PushToken)) == null || e.add(t), () => {
2524
+ return this.logger.debug("Registering for Push Token"), (e = this.listeners.get(y.PushToken)) == null || e.add(t), () => {
2510
2525
  var r;
2511
- return (r = this.listeners.get(b.PushToken)) == null ? void 0 : r.delete(t);
2526
+ return (r = this.listeners.get(y.PushToken)) == null ? void 0 : r.delete(t);
2512
2527
  };
2513
2528
  }
2514
2529
  evaluateContext(t) {
@@ -2519,6 +2534,6 @@ class Rt {
2519
2534
  }
2520
2535
  }
2521
2536
  export {
2522
- b as IPCEvents,
2537
+ y as IPCEvents,
2523
2538
  Rt as IPCManager
2524
2539
  };