obi-sdk 0.1.2 → 0.1.4

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.
@@ -1,20 +1,5 @@
1
- import { S as SDKState, z } from "./index-634e0df5.js";
2
- function mitt(n) {
3
- return { all: n = n || /* @__PURE__ */ new Map(), on: function(t, e2) {
4
- var i = n.get(t);
5
- i ? i.push(e2) : n.set(t, [e2]);
6
- }, off: function(t, e2) {
7
- var i = n.get(t);
8
- i && (e2 ? i.splice(i.indexOf(e2) >>> 0, 1) : n.set(t, []));
9
- }, emit: function(t, e2) {
10
- var i = n.get(t);
11
- i && i.slice().map(function(n2) {
12
- n2(e2);
13
- }), (i = n.get("*")) && i.slice().map(function(n2) {
14
- n2(t, e2);
15
- });
16
- } };
17
- }
1
+ import { m as mitt } from "./mitt-3c1f932d.js";
2
+ import { S as SDKState, z } from "./obi-widget-0d63936f.js";
18
3
  function _mergeNamespaces(n, m) {
19
4
  m.forEach(function(e2) {
20
5
  e2 && typeof e2 !== "string" && !Array.isArray(e2) && Object.keys(e2).forEach(function(k) {
@@ -11814,7 +11799,7 @@ function requireParser() {
11814
11799
  var grammar2 = requireGrammar();
11815
11800
  var validLine = RegExp.prototype.test.bind(/^([a-z])=(.*)/);
11816
11801
  exports.parse = function(sdp2) {
11817
- var session2 = {}, media = [], location = session2;
11802
+ var session = {}, media = [], location = session;
11818
11803
  sdp2.split(/(\r\n|\r|\n)/).filter(validLine).forEach(function(l) {
11819
11804
  var type = l[0];
11820
11805
  var content = l.slice(2);
@@ -11832,8 +11817,8 @@ function requireParser() {
11832
11817
  }
11833
11818
  }
11834
11819
  });
11835
- session2.media = media;
11836
- return session2;
11820
+ session.media = media;
11821
+ return session;
11837
11822
  };
11838
11823
  var paramReducer = function(acc, expr) {
11839
11824
  var s = expr.split(/=(.+)/, 2);
@@ -11937,15 +11922,15 @@ function requireWriter() {
11937
11922
  };
11938
11923
  var defaultOuterOrder = ["v", "o", "s", "i", "u", "e", "p", "c", "b", "t", "r", "z", "a"];
11939
11924
  var defaultInnerOrder = ["i", "c", "b", "a"];
11940
- writer = function(session2, opts) {
11925
+ writer = function(session, opts) {
11941
11926
  opts = opts || {};
11942
- if (session2.version == null) {
11943
- session2.version = 0;
11927
+ if (session.version == null) {
11928
+ session.version = 0;
11944
11929
  }
11945
- if (session2.name == null) {
11946
- session2.name = " ";
11930
+ if (session.name == null) {
11931
+ session.name = " ";
11947
11932
  }
11948
- session2.media.forEach(function(mLine) {
11933
+ session.media.forEach(function(mLine) {
11949
11934
  if (mLine.payloads == null) {
11950
11935
  mLine.payloads = "";
11951
11936
  }
@@ -11955,16 +11940,16 @@ function requireWriter() {
11955
11940
  var sdp2 = [];
11956
11941
  outerOrder.forEach(function(type) {
11957
11942
  grammar2[type].forEach(function(obj) {
11958
- if (obj.name in session2 && session2[obj.name] != null) {
11959
- sdp2.push(makeLine(type, obj, session2));
11960
- } else if (obj.push in session2 && session2[obj.push] != null) {
11961
- session2[obj.push].forEach(function(el) {
11943
+ if (obj.name in session && session[obj.name] != null) {
11944
+ sdp2.push(makeLine(type, obj, session));
11945
+ } else if (obj.push in session && session[obj.push] != null) {
11946
+ session[obj.push].forEach(function(el) {
11962
11947
  sdp2.push(makeLine(type, obj, el));
11963
11948
  });
11964
11949
  }
11965
11950
  });
11966
11951
  });
11967
- session2.media.forEach(function(mLine) {
11952
+ session.media.forEach(function(mLine) {
11968
11953
  sdp2.push(makeLine("m", grammar2.m[0], mLine));
11969
11954
  innerOrder.forEach(function(type) {
11970
11955
  grammar2[type].forEach(function(obj) {
@@ -22156,13 +22141,7 @@ class ObiSession {
22156
22141
  }
22157
22142
  }
22158
22143
  }
22159
- const session = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
22160
- __proto__: null,
22161
- ObiSession
22162
- }, Symbol.toStringTag, { value: "Module" }));
22163
22144
  export {
22164
- ObiSession as O,
22165
- mitt as m,
22166
- session as s
22145
+ ObiSession
22167
22146
  };
22168
- //# sourceMappingURL=session-e208b5bb.js.map
22147
+ //# sourceMappingURL=session-88fd0dca.js.map