quickblox 2.17.9-logger → 2.19.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.
Files changed (124) hide show
  1. package/LICENSE +4 -0
  2. package/README.md +1 -2
  3. package/package.json +2 -1
  4. package/quickblox.js +111 -7055
  5. package/quickblox.min.js +1 -1
  6. package/src/modules/chat/qbChat.js +17 -27
  7. package/src/modules/webrtc/qbWebRTCSignalingProcessor.js +1 -2
  8. package/src/modules/webrtc/qbWebRTCSignalingProvider.js +1 -2
  9. package/src/qbConfig.js +2 -2
  10. package/src/qbStrophe.js +49 -59
  11. package/{src/libs/strophe → strophejs-1.4.0/dist}/strophe.common.js +14 -14
  12. package/{src/libs/strophe → strophejs-1.4.0/dist}/strophe.esm.js +14 -14
  13. package/{src/libs/strophe → strophejs-1.4.0/dist}/strophe.umd.js +17 -17
  14. package/strophejs-1.4.0/dist/strophe.umd.min.js +1 -0
  15. package/src/libs/strophe/strophe.umd.min.js +0 -1
  16. package/strophejs-1.4.0/.eslintrc.json +0 -264
  17. package/strophejs-1.4.0/.gitattributes +0 -1
  18. package/strophejs-1.4.0/CHANGELOG.md +0 -250
  19. package/strophejs-1.4.0/LICENSE.txt +0 -19
  20. package/strophejs-1.4.0/Makefile +0 -92
  21. package/strophejs-1.4.0/README.md +0 -45
  22. package/strophejs-1.4.0/RELEASE_CHECKLIST.md +0 -16
  23. package/strophejs-1.4.0/contrib/discojs/README.txt +0 -42
  24. package/strophejs-1.4.0/contrib/discojs/css/disco.css +0 -16
  25. package/strophejs-1.4.0/contrib/discojs/index.html +0 -47
  26. package/strophejs-1.4.0/contrib/discojs/punjab.tac +0 -18
  27. package/strophejs-1.4.0/contrib/discojs/scripts/basic.js +0 -102
  28. package/strophejs-1.4.0/contrib/discojs/scripts/disco.js +0 -60
  29. package/strophejs-1.4.0/docs.css +0 -797
  30. package/strophejs-1.4.0/examples/amd.html +0 -21
  31. package/strophejs-1.4.0/examples/attach/README +0 -37
  32. package/strophejs-1.4.0/examples/attach/__init__.py +0 -0
  33. package/strophejs-1.4.0/examples/attach/attacher/__init__.py +0 -0
  34. package/strophejs-1.4.0/examples/attach/attacher/views.py +0 -18
  35. package/strophejs-1.4.0/examples/attach/boshclient.py +0 -158
  36. package/strophejs-1.4.0/examples/attach/manage.py +0 -11
  37. package/strophejs-1.4.0/examples/attach/settings.py +0 -85
  38. package/strophejs-1.4.0/examples/attach/templates/attacher/index.html +0 -88
  39. package/strophejs-1.4.0/examples/attach/urls.py +0 -19
  40. package/strophejs-1.4.0/examples/basic.html +0 -23
  41. package/strophejs-1.4.0/examples/basic.js +0 -73
  42. package/strophejs-1.4.0/examples/echobot.html +0 -25
  43. package/strophejs-1.4.0/examples/echobot.js +0 -79
  44. package/strophejs-1.4.0/examples/main.js +0 -59
  45. package/strophejs-1.4.0/examples/prebind.html +0 -39
  46. package/strophejs-1.4.0/examples/prebind.js +0 -103
  47. package/strophejs-1.4.0/examples/restore.html +0 -24
  48. package/strophejs-1.4.0/examples/restore.js +0 -71
  49. package/strophejs-1.4.0/package-lock.json +0 -8634
  50. package/strophejs-1.4.0/package.json +0 -84
  51. package/strophejs-1.4.0/rollup.config.js +0 -76
  52. package/strophejs-1.4.0/src/bosh.js +0 -916
  53. package/strophejs-1.4.0/src/core.js +0 -3535
  54. package/strophejs-1.4.0/src/md5.js +0 -204
  55. package/strophejs-1.4.0/src/sha1.js +0 -172
  56. package/strophejs-1.4.0/src/shared-connection-worker.js +0 -114
  57. package/strophejs-1.4.0/src/shims.js +0 -123
  58. package/strophejs-1.4.0/src/strophe.js +0 -14
  59. package/strophejs-1.4.0/src/utils.js +0 -63
  60. package/strophejs-1.4.0/src/websocket.js +0 -561
  61. package/strophejs-1.4.0/src/worker-websocket.js +0 -152
  62. package/strophejs-1.4.0/tests/index.html +0 -21
  63. package/strophejs-1.4.0/tests/main.js +0 -49
  64. package/strophejs-1.4.0/tests/tests.js +0 -929
  65. package/strophejs-1.6.1/.eslintrc.json +0 -264
  66. package/strophejs-1.6.1/.gitattributes +0 -1
  67. package/strophejs-1.6.1/.nvmrc +0 -1
  68. package/strophejs-1.6.1/CHANGELOG.md +0 -288
  69. package/strophejs-1.6.1/LICENSE.txt +0 -19
  70. package/strophejs-1.6.1/Makefile +0 -92
  71. package/strophejs-1.6.1/README.md +0 -46
  72. package/strophejs-1.6.1/RELEASE_CHECKLIST.md +0 -18
  73. package/strophejs-1.6.1/babel.config.json +0 -10
  74. package/strophejs-1.6.1/contrib/discojs/README.txt +0 -42
  75. package/strophejs-1.6.1/contrib/discojs/css/disco.css +0 -16
  76. package/strophejs-1.6.1/contrib/discojs/index.html +0 -47
  77. package/strophejs-1.6.1/contrib/discojs/punjab.tac +0 -18
  78. package/strophejs-1.6.1/contrib/discojs/scripts/basic.js +0 -102
  79. package/strophejs-1.6.1/contrib/discojs/scripts/disco.js +0 -60
  80. package/strophejs-1.6.1/docs.css +0 -797
  81. package/strophejs-1.6.1/examples/amd.html +0 -21
  82. package/strophejs-1.6.1/examples/attach/README +0 -37
  83. package/strophejs-1.6.1/examples/attach/__init__.py +0 -0
  84. package/strophejs-1.6.1/examples/attach/attacher/__init__.py +0 -0
  85. package/strophejs-1.6.1/examples/attach/attacher/views.py +0 -18
  86. package/strophejs-1.6.1/examples/attach/boshclient.py +0 -158
  87. package/strophejs-1.6.1/examples/attach/manage.py +0 -11
  88. package/strophejs-1.6.1/examples/attach/settings.py +0 -85
  89. package/strophejs-1.6.1/examples/attach/templates/attacher/index.html +0 -88
  90. package/strophejs-1.6.1/examples/attach/urls.py +0 -19
  91. package/strophejs-1.6.1/examples/basic.html +0 -23
  92. package/strophejs-1.6.1/examples/basic.js +0 -73
  93. package/strophejs-1.6.1/examples/echobot.html +0 -25
  94. package/strophejs-1.6.1/examples/echobot.js +0 -79
  95. package/strophejs-1.6.1/examples/main.js +0 -59
  96. package/strophejs-1.6.1/examples/prebind.html +0 -39
  97. package/strophejs-1.6.1/examples/prebind.js +0 -103
  98. package/strophejs-1.6.1/examples/restore.html +0 -24
  99. package/strophejs-1.6.1/examples/restore.js +0 -71
  100. package/strophejs-1.6.1/package-lock.json +0 -18461
  101. package/strophejs-1.6.1/package.json +0 -87
  102. package/strophejs-1.6.1/rollup.config.js +0 -70
  103. package/strophejs-1.6.1/src/bosh.js +0 -916
  104. package/strophejs-1.6.1/src/builder.js +0 -239
  105. package/strophejs-1.6.1/src/constants.js +0 -155
  106. package/strophejs-1.6.1/src/core.js +0 -2377
  107. package/strophejs-1.6.1/src/sasl-anon.js +0 -17
  108. package/strophejs-1.6.1/src/sasl-external.js +0 -27
  109. package/strophejs-1.6.1/src/sasl-oauthbearer.js +0 -30
  110. package/strophejs-1.6.1/src/sasl-plain.js +0 -32
  111. package/strophejs-1.6.1/src/sasl-sha1.js +0 -24
  112. package/strophejs-1.6.1/src/sasl-sha256.js +0 -24
  113. package/strophejs-1.6.1/src/sasl-sha384.js +0 -24
  114. package/strophejs-1.6.1/src/sasl-sha512.js +0 -24
  115. package/strophejs-1.6.1/src/sasl-xoauth2.js +0 -27
  116. package/strophejs-1.6.1/src/sasl.js +0 -143
  117. package/strophejs-1.6.1/src/scram.js +0 -182
  118. package/strophejs-1.6.1/src/shared-connection-worker.js +0 -114
  119. package/strophejs-1.6.1/src/shims.js +0 -122
  120. package/strophejs-1.6.1/src/strophe.js +0 -15
  121. package/strophejs-1.6.1/src/utils.js +0 -626
  122. package/strophejs-1.6.1/src/websocket.js +0 -556
  123. package/strophejs-1.6.1/src/worker-websocket.js +0 -149
  124. package/strophejs-1.6.1/tests.js +0 -993
@@ -418,12 +418,12 @@ function ChatProxy(service) {
418
418
  }
419
419
 
420
420
  // MUC presences go here
421
- if (xXMLNS && xXMLNS == 'http://jabber.org/protocol/muc#user') {
421
+ if (xXMLNS && xXMLNS == "http://jabber.org/protocol/muc#user") {
422
422
  dialogId = self.helpers.getDialogIdFromNode(from);
423
423
  userId = self.helpers.getUserIdFromRoomJid(from);
424
424
 
425
425
  // KICK from dialog event
426
- if (status && statusCode == '301') {
426
+ if (status && statusCode == "301") {
427
427
  if (typeof self.onKickOccupant === 'function') {
428
428
  var actorElement = chatUtils.getElement(chatUtils.getElement(x, 'item'), 'actor');
429
429
  var initiatorUserJid = chatUtils.getAttr(actorElement, 'jid');
@@ -751,7 +751,6 @@ ChatProxy.prototype = {
751
751
  /** Connect for browser env. */
752
752
  if (Utils.getEnv().browser) {
753
753
  Utils.QBLog('[QBChat]', '!!---Browser env - connected--!!');
754
- //artik _conn._changeConnectStatus...
755
754
  self.connection.connect(userJid, params.password, function (status, condition, elem) {
756
755
  Utils.QBLog('[QBChat]', 'self.connection.connect called with status ' + status);
757
756
  Utils.QBLog('[QBChat]', 'self.connection.connect called with condition ' + condition);
@@ -836,7 +835,7 @@ ChatProxy.prototype = {
836
835
  if (typeof self.onLogListener === 'function') {
837
836
  Utils.safeCallbackCall(self.onLogListener,
838
837
  '[QBChat]' +'[SDK v'+config.version+']' + ' Status.CONNECTING at ' + '(Chat Protocol - ' + config.chatProtocol.active === 1 ? 'BOSH' : 'WebSocket' + ')'+
839
- chatUtils.getLocalTime()+ ' CONNECTING CONDITION: ' + condition);
838
+ chatUtils.getLocalTime()+ ' CONNECTING CONDITION: ' + condition);
840
839
  }
841
840
  break;
842
841
  case Strophe.Status.CONNECTED:
@@ -1016,15 +1015,6 @@ ChatProxy.prototype = {
1016
1015
  }
1017
1016
  break;
1018
1017
  }
1019
- }, function (logLine){
1020
- Utils.QBLog('[QBChat]'+'[SDK v'+config.version+']', 'LOG strophe.js at ' + chatUtils.getLocalTime());
1021
- Utils.QBLog('[QBChat]'+'[SDK v'+config.version+']', 'LOG strophe.js: ' + logLine);
1022
-
1023
- if (typeof self.onLogListener === 'function') {
1024
- Utils.safeCallbackCall(self.onLogListener,
1025
- '[QBChat]' + '[SDK v'+config.version+']' +' LOG strophe.js at ' +
1026
- chatUtils.getLocalTime()+ ' LOG strophe.js: ' + logLine);
1027
- }
1028
1018
  });
1029
1019
  }
1030
1020
 
@@ -1080,7 +1070,7 @@ ChatProxy.prototype = {
1080
1070
  self._isConnecting = false;
1081
1071
 
1082
1072
  // reconnect to chat and enable check connection
1083
- self._establishConnection(params,'NODE:DISCONNECTED');
1073
+ self._establishConnection(params);
1084
1074
  });
1085
1075
 
1086
1076
  self.Client.on('error', function () {
@@ -1162,39 +1152,39 @@ ChatProxy.prototype = {
1162
1152
  }
1163
1153
  },
1164
1154
 
1165
- _establishConnection: function (params, description) {
1155
+ _establishConnection: function (params) {
1166
1156
  var self = this;
1167
- Utils.QBLog('[QBChat]', '_establishConnection called in ' + description);
1157
+ Utils.QBLog('[QBChat]', '_establishConnection called');
1168
1158
  if (typeof self.onLogListener === 'function') {
1169
1159
  Utils.safeCallbackCall(self.onLogListener,
1170
- '[QBChat]' + '_establishConnection called in ' + description);
1160
+ '[QBChat]' + '_establishConnection called');
1171
1161
  }
1172
1162
  if (self._isLogout || self._checkConnectionTimer) {
1173
1163
  Utils.QBLog('[QBChat]', '_establishConnection return');
1174
1164
  if (typeof self.onLogListener === 'function') {
1175
1165
  Utils.safeCallbackCall(self.onLogListener,
1176
- '[QBChat]' + 'BREAK _establishConnection RETURN with self._isLogout: '+
1177
- self._isLogout?self._isLogout:'undefined'+' and self._checkConnectionTimer ' +self._checkConnectionTimer?self._checkConnectionTimer:'undefined');
1166
+ '[QBChat]' + ' _establishConnection return with self._isLogout: '+
1167
+ self._isLogout+' and self._checkConnectionTimer ' +self._checkConnectionTimer?'set up':'undefined');
1178
1168
  }
1179
1169
  return;
1180
1170
  }
1181
1171
 
1182
1172
  var _connect = function () {
1183
- Utils.QBLog('[QBChat]', 'call _connect() in _establishConnection in '+description);
1173
+ Utils.QBLog('[QBChat]', 'call _connect() in _establishConnection ');
1184
1174
  if (typeof self.onLogListener === 'function') {
1185
1175
  Utils.safeCallbackCall(self.onLogListener,
1186
- '[QBChat]' + ' call _connect() in _establishConnection in '+description);
1176
+ '[QBChat]' + ' call _connect() in _establishConnection ');
1187
1177
  }
1188
1178
  if (!self.isConnected && !self._isConnecting && !self._sessionHasExpired) {
1189
- Utils.QBLog('[QBChat]', ' start EXECUTE connect() in _establishConnection ');
1179
+ Utils.QBLog('[QBChat]', ' start execute connect() in _establishConnection ');
1190
1180
  if (typeof self.onLogListener === 'function') {
1191
1181
  Utils.safeCallbackCall(self.onLogListener,
1192
- '[QBChat]' + ' start EXECUTE connect() in _establishConnection in '+description+' self.isConnected: '+self.isConnected+' self._isConnecting: '+self._isConnecting+' self._sessionHasExpired: '+self._sessionHasExpired);
1182
+ '[QBChat]' + ' with statuses (!self.isConnected && !self._isConnecting && !self._sessionHasExpired): '+' self.isConnected: '+self.isConnected+' self._isConnecting: '+self._isConnecting+' self._sessionHasExpired: '+self._sessionHasExpired);
1193
1183
  }
1194
1184
  self.connect(params);
1195
1185
  if (typeof self.onLogListener === 'function') {
1196
1186
  Utils.safeCallbackCall(self.onLogListener,
1197
- '[QBChat]' + 'call _connect() in _establishConnection in '+description+' is executed');
1187
+ '[QBChat]' + 'call _connect() in _establishConnection is executed');
1198
1188
  }
1199
1189
  } else {
1200
1190
  Utils.QBLog('[QBChat]', 'stop timer in _establishConnection ');
@@ -1202,7 +1192,7 @@ ChatProxy.prototype = {
1202
1192
  self._checkConnectionTimer = undefined;
1203
1193
  if (typeof self.onLogListener === 'function') {
1204
1194
  Utils.safeCallbackCall(self.onLogListener,
1205
- '[QBChat]' + 'stop timer in _establishConnection in '+description);
1195
+ '[QBChat]' + 'stop timer in _establishConnection ');
1206
1196
  }
1207
1197
  }
1208
1198
  };
@@ -1228,7 +1218,7 @@ ChatProxy.prototype = {
1228
1218
 
1229
1219
  if (Utils.getEnv().browser) {
1230
1220
  this.connection.flush();
1231
- this.connection.disconnect('reconnect from SDK');//artik should be added reasone = 'reconnect from SDK'
1221
+ this.connection.disconnect();
1232
1222
  } else {
1233
1223
  this.Client.end();
1234
1224
  }
@@ -1615,7 +1605,7 @@ ChatProxy.prototype = {
1615
1605
 
1616
1606
  if (Utils.getEnv().browser) {
1617
1607
  this.connection.flush();
1618
- this.connection.disconnect('disconnect from SDK');//artik should add reason = 'disconnect from SDK'
1608
+ this.connection.disconnect();
1619
1609
  if (this._checkConnectionPingTimer !== undefined) {
1620
1610
  Utils.QBLog('[QBChat]', 'Stop ping');
1621
1611
  clearInterval(this._checkConnectionPingTimer);
@@ -5,8 +5,7 @@
5
5
  * WebRTC Module (WebRTC signaling provider)
6
6
  */
7
7
 
8
- // require('strophe.js');
9
- require('../../libs/strophe/strophe.umd.js');
8
+ require('strophe.js');
10
9
 
11
10
  var SignalingConstants = require('./qbWebRTCSignalingConstants');
12
11
 
@@ -8,8 +8,7 @@
8
8
  * WebRTC Module (WebRTC signaling processor)
9
9
  */
10
10
 
11
- // require('strophe.js');
12
- require('../../libs/strophe/strophe.umd.js');
11
+ require('strophe.js');
13
12
 
14
13
  var Helpers = require('./qbWebRTCHelpers');
15
14
  var SignalingConstants = require('./qbWebRTCSignalingConstants');
package/src/qbConfig.js CHANGED
@@ -12,8 +12,8 @@
12
12
  */
13
13
 
14
14
  var config = {
15
- version: '2.17.9-logger',
16
- buildNumber: '1161',
15
+ version: '2.19.0',
16
+ buildNumber: '1163',
17
17
  creds: {
18
18
  'appId': 0,
19
19
  'authKey': '',
package/src/qbStrophe.js CHANGED
@@ -7,8 +7,7 @@
7
7
  * Strophe Connection Object
8
8
  */
9
9
 
10
- // require('strophe.js');
11
- require('./libs/strophe/strophe.umd.js');
10
+ require('strophe.js');
12
11
 
13
12
  var config = require('./qbConfig');
14
13
  var chatPRTCL = config.chatProtocol;
@@ -16,70 +15,61 @@ var Utils = require('./qbUtils');
16
15
  var QBChatModules = require('./modules/chat/qbChat');
17
16
 
18
17
  function Connection(onLogListenerCallback) {
19
- var protocol = chatPRTCL.active === 1 ? chatPRTCL.bosh : chatPRTCL.websocket;
20
- var conn = new Strophe.Connection(protocol);
21
- var onLogListener = onLogListenerCallback || QBChatModules.onLogListener;
22
-
23
- if (chatPRTCL.active === 1) {
24
- conn.xmlInput = function(data) {
25
- if (data.childNodes[0]) {
26
- for (var i = 0, len = data.childNodes.length; i < len; i++) {
27
- Utils.QBLog('[QBChat]', 'RECV:', data.childNodes[i]);
28
- if (onLogListener && typeof onLogListener === 'function') {
29
- Utils.safeCallbackCall(onLogListener,
30
- '[QBChat][QBStrophe]' + 'RECV:' + data.childNodes[i]);
31
- }
32
- }
33
- }
34
- };
35
- conn.xmlOutput = function(data) {
36
- if (data.childNodes[0]) {
37
- for (var i = 0, len = data.childNodes.length; i < len; i++) {
38
- Utils.QBLog('[QBChat]', 'SENT:', data.childNodes[i]);
39
- if (onLogListener && typeof onLogListener === 'function') {
40
- Utils.safeCallbackCall(onLogListener,
41
- '[QBChat][QBStrophe]' + 'SENT:' + data.childNodes[i]);
42
- }
43
- }
44
- }
45
- };
46
- } else {
47
- conn.xmlInput = function(data) {
48
- Utils.QBLog('[QBChat]', 'RECV:', data);
18
+ var protocol = chatPRTCL.active === 1 ? chatPRTCL.bosh : chatPRTCL.websocket;
19
+ var conn = new Strophe.Connection(protocol);
20
+ var onLogListener = config.debug? onLogListenerCallback || QBChatModules.onLogListener : null;
21
+ var safeCallbackCall = function(message, data) {
22
+ onLogListener = config.debug? onLogListenerCallback || QBChatModules.onLogListener : null;
49
23
  if (onLogListener && typeof onLogListener === 'function') {
50
24
  Utils.safeCallbackCall(onLogListener,
51
- '[QBChat][QBStrophe]' + 'RECV:' + data);
25
+ '[QBChat][QBStrophe]' + message + data);
52
26
  }
53
- try {
54
- let parser = new DOMParser();
55
- let xmlDoc = parser.parseFromString(data, 'text/xml');
27
+ };
56
28
 
57
- let errorElem = xmlDoc.getElementsByTagName('error');
58
- if (errorElem.length > 0) {
59
- let conditionElem = errorElem[0].getElementsByTagName('condition');
60
- if (conditionElem.length > 0) {
61
- let disconnectCondition = conditionElem[0].textContent;
62
- console.log('Disconnect condition:', disconnectCondition);
63
- if (onLogListener && typeof onLogListener === 'function') {
64
- Utils.safeCallbackCall(onLogListener,
65
- '[QBChat][QBStrophe]' + 'DISCONNECTED CONDITION: ' + disconnectCondition);
66
- }
29
+ if (chatPRTCL.active === 1) {
30
+ conn.xmlInput = function(data) {
31
+ if (data.childNodes[0]) {
32
+ for (var i = 0, len = data.childNodes.length; i < len; i++) {
33
+ Utils.QBLog('[QBChat]', 'RECV:', data.childNodes[i]);
34
+ safeCallbackCall('RECV:', data.childNodes[i]);
67
35
  }
68
36
  }
69
- } catch (e) {
70
- console.error('Error parsing XML input:', e);
71
- }
72
- };
73
- conn.xmlOutput = function(data) {
74
- Utils.QBLog('[QBChat]', 'SENT:', data);
75
- if (onLogListener && typeof onLogListener === 'function') {
76
- Utils.safeCallbackCall(onLogListener,
77
- '[QBChat][QBStrophe]' + 'SENT:' + data);
78
- }
79
- };
80
- }
37
+ };
38
+ conn.xmlOutput = function(data) {
39
+ if (data.childNodes[0]) {
40
+ for (var i = 0, len = data.childNodes.length; i < len; i++) {
41
+ Utils.QBLog('[QBChat]', 'SENT:', data.childNodes[i]);
42
+ safeCallbackCall('SENT', data.childNodes[i]);
43
+ }
44
+ }
45
+ };
46
+ } else {
47
+ conn.xmlInput = function(data) {
48
+ Utils.QBLog('[QBChat]', 'RECV:', data);
49
+ safeCallbackCall('RECV:', data);
81
50
 
82
- return conn;
51
+ try {
52
+ let parser = new DOMParser();
53
+ let xmlDoc = parser.parseFromString(data, 'text/xml');
54
+ let errorElem = xmlDoc.getElementsByTagName('error');
55
+ if (errorElem.length > 0) {
56
+ let conditionElem = errorElem[0].getElementsByTagName('condition');
57
+ if (conditionElem.length > 0) {
58
+ let disconnectCondition = conditionElem[0].textContent;
59
+ console.log('Disconnect condition:', disconnectCondition);
60
+ safeCallbackCall('DISCONNECTED CONDITION:', disconnectCondition);
61
+ }
62
+ }
63
+ } catch (e) {
64
+ console.error('Error parsing XML input:', e);
65
+ }
66
+ };
67
+ conn.xmlOutput = function(data) {
68
+ Utils.QBLog('[QBChat]', 'SENT:', data);
69
+ safeCallbackCall('SENT', data);
70
+ };
71
+ }
72
+ return conn;
83
73
  }
84
74
 
85
75
  module.exports = Connection;
@@ -195,7 +195,7 @@ function getWebSocketImplementation() {
195
195
  return WebSocketImplementation;
196
196
  }
197
197
 
198
- getWebSocketImplementation();
198
+ var WebSocket$1 = getWebSocketImplementation();
199
199
  /**
200
200
  * DOMParser
201
201
  * https://w3c.github.io/DOM-Parsing/#the-domparser-interface
@@ -297,7 +297,7 @@ function getDummyXMLDOMDocument() {
297
297
  * Add integers, wrapping at 2^32. This uses 16-bit operations internally
298
298
  * to work around bugs in some JS interpreters.
299
299
  */
300
- var safe_add$1 = function safe_add(x, y) {
300
+ var safe_add = function safe_add(x, y) {
301
301
  var lsw = (x & 0xFFFF) + (y & 0xFFFF);
302
302
  var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
303
303
  return msw << 16 | lsw & 0xFFFF;
@@ -363,7 +363,7 @@ var binl2hex = function binl2hex(binarray) {
363
363
 
364
364
 
365
365
  var md5_cmn = function md5_cmn(q, a, b, x, s, t) {
366
- return safe_add$1(bit_rol(safe_add$1(safe_add$1(a, q), safe_add$1(x, t)), s), b);
366
+ return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b);
367
367
  };
368
368
 
369
369
  var md5_ff = function md5_ff(a, b, c, d, x, s, t) {
@@ -465,10 +465,10 @@ var core_md5 = function core_md5(x, len) {
465
465
  d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379);
466
466
  c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259);
467
467
  b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551);
468
- a = safe_add$1(a, olda);
469
- b = safe_add$1(b, oldb);
470
- c = safe_add$1(c, oldc);
471
- d = safe_add$1(d, oldd);
468
+ a = safe_add(a, olda);
469
+ b = safe_add(b, oldb);
470
+ c = safe_add(c, oldc);
471
+ d = safe_add(d, oldd);
472
472
  }
473
473
 
474
474
  return [a, b, c, d];
@@ -531,7 +531,7 @@ function core_sha1(x, len) {
531
531
  w[j] = rol(w[j - 3] ^ w[j - 8] ^ w[j - 14] ^ w[j - 16], 1);
532
532
  }
533
533
 
534
- t = safe_add(safe_add(rol(a, 5), sha1_ft(j, b, c, d)), safe_add(safe_add(e, w[j]), sha1_kt(j)));
534
+ t = safe_add$1(safe_add$1(rol(a, 5), sha1_ft(j, b, c, d)), safe_add$1(safe_add$1(e, w[j]), sha1_kt(j)));
535
535
  e = d;
536
536
  d = c;
537
537
  c = rol(b, 30);
@@ -539,11 +539,11 @@ function core_sha1(x, len) {
539
539
  a = t;
540
540
  }
541
541
 
542
- a = safe_add(a, olda);
543
- b = safe_add(b, oldb);
544
- c = safe_add(c, oldc);
545
- d = safe_add(d, oldd);
546
- e = safe_add(e, olde);
542
+ a = safe_add$1(a, olda);
543
+ b = safe_add$1(b, oldb);
544
+ c = safe_add$1(c, oldc);
545
+ d = safe_add$1(d, oldd);
546
+ e = safe_add$1(e, olde);
547
547
  }
548
548
 
549
549
  return [a, b, c, d, e];
@@ -606,7 +606,7 @@ function core_hmac_sha1(key, data) {
606
606
  */
607
607
 
608
608
 
609
- function safe_add(x, y) {
609
+ function safe_add$1(x, y) {
610
610
  var lsw = (x & 0xFFFF) + (y & 0xFFFF);
611
611
  var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
612
612
  return msw << 16 | lsw & 0xFFFF;
@@ -191,7 +191,7 @@ function getWebSocketImplementation() {
191
191
  return WebSocketImplementation;
192
192
  }
193
193
 
194
- getWebSocketImplementation();
194
+ var WebSocket$1 = getWebSocketImplementation();
195
195
  /**
196
196
  * DOMParser
197
197
  * https://w3c.github.io/DOM-Parsing/#the-domparser-interface
@@ -293,7 +293,7 @@ function getDummyXMLDOMDocument() {
293
293
  * Add integers, wrapping at 2^32. This uses 16-bit operations internally
294
294
  * to work around bugs in some JS interpreters.
295
295
  */
296
- var safe_add$1 = function safe_add(x, y) {
296
+ var safe_add = function safe_add(x, y) {
297
297
  var lsw = (x & 0xFFFF) + (y & 0xFFFF);
298
298
  var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
299
299
  return msw << 16 | lsw & 0xFFFF;
@@ -359,7 +359,7 @@ var binl2hex = function binl2hex(binarray) {
359
359
 
360
360
 
361
361
  var md5_cmn = function md5_cmn(q, a, b, x, s, t) {
362
- return safe_add$1(bit_rol(safe_add$1(safe_add$1(a, q), safe_add$1(x, t)), s), b);
362
+ return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b);
363
363
  };
364
364
 
365
365
  var md5_ff = function md5_ff(a, b, c, d, x, s, t) {
@@ -461,10 +461,10 @@ var core_md5 = function core_md5(x, len) {
461
461
  d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379);
462
462
  c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259);
463
463
  b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551);
464
- a = safe_add$1(a, olda);
465
- b = safe_add$1(b, oldb);
466
- c = safe_add$1(c, oldc);
467
- d = safe_add$1(d, oldd);
464
+ a = safe_add(a, olda);
465
+ b = safe_add(b, oldb);
466
+ c = safe_add(c, oldc);
467
+ d = safe_add(d, oldd);
468
468
  }
469
469
 
470
470
  return [a, b, c, d];
@@ -527,7 +527,7 @@ function core_sha1(x, len) {
527
527
  w[j] = rol(w[j - 3] ^ w[j - 8] ^ w[j - 14] ^ w[j - 16], 1);
528
528
  }
529
529
 
530
- t = safe_add(safe_add(rol(a, 5), sha1_ft(j, b, c, d)), safe_add(safe_add(e, w[j]), sha1_kt(j)));
530
+ t = safe_add$1(safe_add$1(rol(a, 5), sha1_ft(j, b, c, d)), safe_add$1(safe_add$1(e, w[j]), sha1_kt(j)));
531
531
  e = d;
532
532
  d = c;
533
533
  c = rol(b, 30);
@@ -535,11 +535,11 @@ function core_sha1(x, len) {
535
535
  a = t;
536
536
  }
537
537
 
538
- a = safe_add(a, olda);
539
- b = safe_add(b, oldb);
540
- c = safe_add(c, oldc);
541
- d = safe_add(d, oldd);
542
- e = safe_add(e, olde);
538
+ a = safe_add$1(a, olda);
539
+ b = safe_add$1(b, oldb);
540
+ c = safe_add$1(c, oldc);
541
+ d = safe_add$1(d, oldd);
542
+ e = safe_add$1(e, olde);
543
543
  }
544
544
 
545
545
  return [a, b, c, d, e];
@@ -602,7 +602,7 @@ function core_hmac_sha1(key, data) {
602
602
  */
603
603
 
604
604
 
605
- function safe_add(x, y) {
605
+ function safe_add$1(x, y) {
606
606
  var lsw = (x & 0xFFFF) + (y & 0xFFFF);
607
607
  var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
608
608
  return msw << 16 | lsw & 0xFFFF;
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
3
3
  typeof define === 'function' && define.amd ? define(['exports'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.strophe = {}));
5
- })(this, (function (exports) { 'use strict';
4
+ (global = global || self, factory(global.strophe = {}));
5
+ }(this, (function (exports) { 'use strict';
6
6
 
7
7
  var global$1 = typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {};
8
8
 
@@ -195,7 +195,7 @@
195
195
  return WebSocketImplementation;
196
196
  }
197
197
 
198
- getWebSocketImplementation();
198
+ var WebSocket$1 = getWebSocketImplementation();
199
199
  /**
200
200
  * DOMParser
201
201
  * https://w3c.github.io/DOM-Parsing/#the-domparser-interface
@@ -297,7 +297,7 @@
297
297
  * Add integers, wrapping at 2^32. This uses 16-bit operations internally
298
298
  * to work around bugs in some JS interpreters.
299
299
  */
300
- var safe_add$1 = function safe_add(x, y) {
300
+ var safe_add = function safe_add(x, y) {
301
301
  var lsw = (x & 0xFFFF) + (y & 0xFFFF);
302
302
  var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
303
303
  return msw << 16 | lsw & 0xFFFF;
@@ -363,7 +363,7 @@
363
363
 
364
364
 
365
365
  var md5_cmn = function md5_cmn(q, a, b, x, s, t) {
366
- return safe_add$1(bit_rol(safe_add$1(safe_add$1(a, q), safe_add$1(x, t)), s), b);
366
+ return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b);
367
367
  };
368
368
 
369
369
  var md5_ff = function md5_ff(a, b, c, d, x, s, t) {
@@ -465,10 +465,10 @@
465
465
  d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379);
466
466
  c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259);
467
467
  b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551);
468
- a = safe_add$1(a, olda);
469
- b = safe_add$1(b, oldb);
470
- c = safe_add$1(c, oldc);
471
- d = safe_add$1(d, oldd);
468
+ a = safe_add(a, olda);
469
+ b = safe_add(b, oldb);
470
+ c = safe_add(c, oldc);
471
+ d = safe_add(d, oldd);
472
472
  }
473
473
 
474
474
  return [a, b, c, d];
@@ -531,7 +531,7 @@
531
531
  w[j] = rol(w[j - 3] ^ w[j - 8] ^ w[j - 14] ^ w[j - 16], 1);
532
532
  }
533
533
 
534
- t = safe_add(safe_add(rol(a, 5), sha1_ft(j, b, c, d)), safe_add(safe_add(e, w[j]), sha1_kt(j)));
534
+ t = safe_add$1(safe_add$1(rol(a, 5), sha1_ft(j, b, c, d)), safe_add$1(safe_add$1(e, w[j]), sha1_kt(j)));
535
535
  e = d;
536
536
  d = c;
537
537
  c = rol(b, 30);
@@ -539,11 +539,11 @@
539
539
  a = t;
540
540
  }
541
541
 
542
- a = safe_add(a, olda);
543
- b = safe_add(b, oldb);
544
- c = safe_add(c, oldc);
545
- d = safe_add(d, oldd);
546
- e = safe_add(e, olde);
542
+ a = safe_add$1(a, olda);
543
+ b = safe_add$1(b, oldb);
544
+ c = safe_add$1(c, oldc);
545
+ d = safe_add$1(d, oldd);
546
+ e = safe_add$1(e, olde);
547
547
  }
548
548
 
549
549
  return [a, b, c, d, e];
@@ -606,7 +606,7 @@
606
606
  */
607
607
 
608
608
 
609
- function safe_add(x, y) {
609
+ function safe_add$1(x, y) {
610
610
  var lsw = (x & 0xFFFF) + (y & 0xFFFF);
611
611
  var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
612
612
  return msw << 16 | lsw & 0xFFFF;
@@ -6870,4 +6870,4 @@
6870
6870
 
6871
6871
  Object.defineProperty(exports, '__esModule', { value: true });
6872
6872
 
6873
- }));
6873
+ })));