@webex/plugin-meetings 2.59.3-next.1 → 2.59.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.
Files changed (420) hide show
  1. package/.eslintrc.js +6 -6
  2. package/LICENSE +1 -1
  3. package/README.md +1204 -1204
  4. package/UPGRADING.md +287 -287
  5. package/babel.config.js +3 -3
  6. package/browsers.js +108 -108
  7. package/dist/common/browser-detection.d.ts +9 -9
  8. package/dist/common/browser-detection.js.map +1 -1
  9. package/dist/common/collection.d.ts +48 -48
  10. package/dist/common/collection.js +43 -43
  11. package/dist/common/collection.js.map +1 -1
  12. package/dist/common/config.d.ts +2 -2
  13. package/dist/common/config.js.map +1 -1
  14. package/dist/common/errors/captcha-error.d.ts +15 -15
  15. package/dist/common/errors/captcha-error.js +7 -7
  16. package/dist/common/errors/captcha-error.js.map +1 -1
  17. package/dist/common/errors/intent-to-join.d.ts +16 -16
  18. package/dist/common/errors/intent-to-join.js +7 -7
  19. package/dist/common/errors/intent-to-join.js.map +1 -1
  20. package/dist/common/errors/join-meeting.d.ts +17 -17
  21. package/dist/common/errors/join-meeting.js +8 -8
  22. package/dist/common/errors/join-meeting.js.map +1 -1
  23. package/dist/common/errors/media.d.ts +15 -15
  24. package/dist/common/errors/media.js +7 -7
  25. package/dist/common/errors/media.js.map +1 -1
  26. package/dist/common/errors/parameter.d.ts +15 -15
  27. package/dist/common/errors/parameter.js +7 -7
  28. package/dist/common/errors/parameter.js.map +1 -1
  29. package/dist/common/errors/password-error.d.ts +15 -15
  30. package/dist/common/errors/password-error.js +7 -7
  31. package/dist/common/errors/password-error.js.map +1 -1
  32. package/dist/common/errors/permission.d.ts +14 -14
  33. package/dist/common/errors/permission.js +6 -6
  34. package/dist/common/errors/permission.js.map +1 -1
  35. package/dist/common/errors/reconnection-in-progress.d.ts +9 -9
  36. package/dist/common/errors/reconnection-in-progress.js +6 -6
  37. package/dist/common/errors/reconnection-in-progress.js.map +1 -1
  38. package/dist/common/errors/reconnection.d.ts +15 -15
  39. package/dist/common/errors/reconnection.js +7 -7
  40. package/dist/common/errors/reconnection.js.map +1 -1
  41. package/dist/common/errors/stats.d.ts +15 -15
  42. package/dist/common/errors/stats.js +7 -7
  43. package/dist/common/errors/stats.js.map +1 -1
  44. package/dist/common/errors/webex-errors.d.ts +81 -81
  45. package/dist/common/errors/webex-errors.js +42 -42
  46. package/dist/common/errors/webex-errors.js.map +1 -1
  47. package/dist/common/errors/webex-meetings-error.d.ts +20 -20
  48. package/dist/common/errors/webex-meetings-error.js +12 -12
  49. package/dist/common/errors/webex-meetings-error.js.map +1 -1
  50. package/dist/common/events/events-scope.d.ts +17 -17
  51. package/dist/common/events/events-scope.js +10 -10
  52. package/dist/common/events/events-scope.js.map +1 -1
  53. package/dist/common/events/events.d.ts +12 -12
  54. package/dist/common/events/events.js +4 -4
  55. package/dist/common/events/events.js.map +1 -1
  56. package/dist/common/events/trigger-proxy.d.ts +2 -2
  57. package/dist/common/events/trigger-proxy.js.map +1 -1
  58. package/dist/common/events/util.d.ts +2 -2
  59. package/dist/common/events/util.js.map +1 -1
  60. package/dist/common/logs/logger-config.d.ts +2 -2
  61. package/dist/common/logs/logger-config.js.map +1 -1
  62. package/dist/common/logs/logger-proxy.d.ts +2 -2
  63. package/dist/common/logs/logger-proxy.js.map +1 -1
  64. package/dist/common/logs/request.d.ts +34 -34
  65. package/dist/common/logs/request.js +18 -18
  66. package/dist/common/logs/request.js.map +1 -1
  67. package/dist/common/queue.d.ts +32 -32
  68. package/dist/common/queue.js +18 -18
  69. package/dist/common/queue.js.map +1 -1
  70. package/dist/config.d.ts +73 -73
  71. package/dist/config.js +2 -2
  72. package/dist/config.js.map +1 -1
  73. package/dist/constants.d.ts +926 -924
  74. package/dist/constants.js +11 -9
  75. package/dist/constants.js.map +1 -1
  76. package/dist/controls-options-manager/constants.d.ts +4 -4
  77. package/dist/controls-options-manager/constants.js.map +1 -1
  78. package/dist/controls-options-manager/enums.d.ts +5 -5
  79. package/dist/controls-options-manager/enums.js.map +1 -1
  80. package/dist/controls-options-manager/index.d.ts +120 -120
  81. package/dist/controls-options-manager/index.js +81 -81
  82. package/dist/controls-options-manager/index.js.map +1 -1
  83. package/dist/controls-options-manager/util.d.ts +7 -7
  84. package/dist/controls-options-manager/util.js.map +1 -1
  85. package/dist/index.d.ts +4 -4
  86. package/dist/index.js.map +1 -1
  87. package/dist/locus-info/controlsUtils.d.ts +2 -2
  88. package/dist/locus-info/controlsUtils.js +21 -21
  89. package/dist/locus-info/controlsUtils.js.map +1 -1
  90. package/dist/locus-info/embeddedAppsUtils.d.ts +2 -2
  91. package/dist/locus-info/embeddedAppsUtils.js +14 -14
  92. package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
  93. package/dist/locus-info/fullState.d.ts +2 -2
  94. package/dist/locus-info/fullState.js.map +1 -1
  95. package/dist/locus-info/hostUtils.d.ts +2 -2
  96. package/dist/locus-info/hostUtils.js +19 -19
  97. package/dist/locus-info/hostUtils.js.map +1 -1
  98. package/dist/locus-info/index.d.ts +269 -269
  99. package/dist/locus-info/index.js +180 -180
  100. package/dist/locus-info/index.js.map +1 -1
  101. package/dist/locus-info/infoUtils.d.ts +2 -2
  102. package/dist/locus-info/infoUtils.js.map +1 -1
  103. package/dist/locus-info/mediaSharesUtils.d.ts +2 -2
  104. package/dist/locus-info/mediaSharesUtils.js +50 -50
  105. package/dist/locus-info/mediaSharesUtils.js.map +1 -1
  106. package/dist/locus-info/parser.d.ts +212 -212
  107. package/dist/locus-info/parser.js +136 -136
  108. package/dist/locus-info/parser.js.map +1 -1
  109. package/dist/locus-info/selfUtils.d.ts +2 -2
  110. package/dist/locus-info/selfUtils.js +52 -52
  111. package/dist/locus-info/selfUtils.js.map +1 -1
  112. package/dist/media/index.d.ts +32 -32
  113. package/dist/media/index.js +145 -145
  114. package/dist/media/index.js.map +1 -1
  115. package/dist/media/properties.d.ts +108 -108
  116. package/dist/media/properties.js +49 -49
  117. package/dist/media/properties.js.map +1 -1
  118. package/dist/media/util.d.ts +2 -2
  119. package/dist/media/util.js.map +1 -1
  120. package/dist/mediaQualityMetrics/config.d.ts +233 -233
  121. package/dist/mediaQualityMetrics/config.js.map +1 -1
  122. package/dist/meeting/effectsState.d.ts +42 -42
  123. package/dist/meeting/effectsState.js +24 -24
  124. package/dist/meeting/effectsState.js.map +1 -1
  125. package/dist/meeting/in-meeting-actions.d.ts +79 -79
  126. package/dist/meeting/in-meeting-actions.js +11 -11
  127. package/dist/meeting/in-meeting-actions.js.map +1 -1
  128. package/dist/meeting/index.d.ts +1621 -1621
  129. package/dist/meeting/index.js +1538 -1518
  130. package/dist/meeting/index.js.map +1 -1
  131. package/dist/meeting/muteState.d.ts +116 -116
  132. package/dist/meeting/muteState.js +85 -85
  133. package/dist/meeting/muteState.js.map +1 -1
  134. package/dist/meeting/request.d.ts +255 -255
  135. package/dist/meeting/request.js +141 -141
  136. package/dist/meeting/request.js.map +1 -1
  137. package/dist/meeting/state.d.ts +9 -9
  138. package/dist/meeting/state.js +30 -30
  139. package/dist/meeting/state.js.map +1 -1
  140. package/dist/meeting/util.d.ts +2 -2
  141. package/dist/meeting/util.js.map +1 -1
  142. package/dist/meeting-info/collection.d.ts +20 -20
  143. package/dist/meeting-info/collection.js +11 -11
  144. package/dist/meeting-info/collection.js.map +1 -1
  145. package/dist/meeting-info/index.d.ts +57 -57
  146. package/dist/meeting-info/index.js +50 -50
  147. package/dist/meeting-info/index.js.map +1 -1
  148. package/dist/meeting-info/meeting-info-v2.d.ts +93 -93
  149. package/dist/meeting-info/meeting-info-v2.js +52 -52
  150. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  151. package/dist/meeting-info/request.d.ts +22 -22
  152. package/dist/meeting-info/request.js +14 -14
  153. package/dist/meeting-info/request.js.map +1 -1
  154. package/dist/meeting-info/util.d.ts +2 -2
  155. package/dist/meeting-info/util.js +9 -9
  156. package/dist/meeting-info/util.js.map +1 -1
  157. package/dist/meeting-info/utilv2.d.ts +2 -2
  158. package/dist/meeting-info/utilv2.js +20 -20
  159. package/dist/meeting-info/utilv2.js.map +1 -1
  160. package/dist/meetings/collection.d.ts +23 -23
  161. package/dist/meetings/collection.js +14 -14
  162. package/dist/meetings/collection.js.map +1 -1
  163. package/dist/meetings/index.d.ts +296 -296
  164. package/dist/meetings/index.js +259 -259
  165. package/dist/meetings/index.js.map +1 -1
  166. package/dist/meetings/request.d.ts +27 -27
  167. package/dist/meetings/request.js +15 -15
  168. package/dist/meetings/request.js.map +1 -1
  169. package/dist/meetings/util.d.ts +18 -18
  170. package/dist/meetings/util.js +29 -29
  171. package/dist/meetings/util.js.map +1 -1
  172. package/dist/member/index.d.ts +147 -147
  173. package/dist/member/index.js +214 -214
  174. package/dist/member/index.js.map +1 -1
  175. package/dist/member/member.types.d.ts +11 -11
  176. package/dist/member/member.types.js.map +1 -1
  177. package/dist/member/util.d.ts +2 -2
  178. package/dist/member/util.js +60 -60
  179. package/dist/member/util.js.map +1 -1
  180. package/dist/members/collection.d.ts +24 -24
  181. package/dist/members/collection.js +11 -11
  182. package/dist/members/collection.js.map +1 -1
  183. package/dist/members/index.d.ts +298 -298
  184. package/dist/members/index.js +275 -275
  185. package/dist/members/index.js.map +1 -1
  186. package/dist/members/request.d.ts +50 -50
  187. package/dist/members/request.js +27 -27
  188. package/dist/members/request.js.map +1 -1
  189. package/dist/members/util.d.ts +2 -2
  190. package/dist/members/util.js +21 -21
  191. package/dist/members/util.js.map +1 -1
  192. package/dist/metrics/config.d.ts +169 -169
  193. package/dist/metrics/config.js.map +1 -1
  194. package/dist/metrics/constants.d.ts +59 -57
  195. package/dist/metrics/constants.js +2 -0
  196. package/dist/metrics/constants.js.map +1 -1
  197. package/dist/metrics/index.d.ts +152 -152
  198. package/dist/metrics/index.js +90 -90
  199. package/dist/metrics/index.js.map +1 -1
  200. package/dist/networkQualityMonitor/index.d.ts +70 -70
  201. package/dist/networkQualityMonitor/index.js +65 -65
  202. package/dist/networkQualityMonitor/index.js.map +1 -1
  203. package/dist/peer-connection-manager/index.d.ts +6 -6
  204. package/dist/peer-connection-manager/index.js +87 -87
  205. package/dist/peer-connection-manager/index.js.map +1 -1
  206. package/dist/peer-connection-manager/util.d.ts +6 -6
  207. package/dist/peer-connection-manager/util.js +9 -9
  208. package/dist/peer-connection-manager/util.js.map +1 -1
  209. package/dist/personal-meeting-room/index.d.ts +47 -47
  210. package/dist/personal-meeting-room/index.js +67 -67
  211. package/dist/personal-meeting-room/index.js.map +1 -1
  212. package/dist/personal-meeting-room/request.d.ts +14 -14
  213. package/dist/personal-meeting-room/request.js +7 -7
  214. package/dist/personal-meeting-room/request.js.map +1 -1
  215. package/dist/personal-meeting-room/util.d.ts +2 -2
  216. package/dist/personal-meeting-room/util.js.map +1 -1
  217. package/dist/reachability/index.d.ts +139 -139
  218. package/dist/reachability/index.js +110 -110
  219. package/dist/reachability/index.js.map +1 -1
  220. package/dist/reachability/request.d.ts +35 -35
  221. package/dist/reachability/request.js +15 -15
  222. package/dist/reachability/request.js.map +1 -1
  223. package/dist/reactions/reactions.d.ts +4 -4
  224. package/dist/reactions/reactions.js.map +1 -1
  225. package/dist/reactions/reactions.type.d.ts +32 -32
  226. package/dist/reactions/reactions.type.js.map +1 -1
  227. package/dist/reconnection-manager/index.d.ts +112 -112
  228. package/dist/reconnection-manager/index.js +112 -112
  229. package/dist/reconnection-manager/index.js.map +1 -1
  230. package/dist/recording-controller/enums.d.ts +7 -7
  231. package/dist/recording-controller/enums.js.map +1 -1
  232. package/dist/recording-controller/index.d.ts +193 -193
  233. package/dist/recording-controller/index.js +127 -127
  234. package/dist/recording-controller/index.js.map +1 -1
  235. package/dist/recording-controller/util.d.ts +13 -13
  236. package/dist/recording-controller/util.js.map +1 -1
  237. package/dist/roap/collection.d.ts +10 -10
  238. package/dist/roap/collection.js.map +1 -1
  239. package/dist/roap/handler.d.ts +47 -47
  240. package/dist/roap/handler.js +27 -27
  241. package/dist/roap/handler.js.map +1 -1
  242. package/dist/roap/index.d.ts +116 -116
  243. package/dist/roap/index.js +111 -111
  244. package/dist/roap/index.js.map +1 -1
  245. package/dist/roap/request.d.ts +35 -35
  246. package/dist/roap/request.js +17 -17
  247. package/dist/roap/request.js.map +1 -1
  248. package/dist/roap/state.d.ts +9 -9
  249. package/dist/roap/state.js +14 -14
  250. package/dist/roap/state.js.map +1 -1
  251. package/dist/roap/turnDiscovery.d.ts +67 -67
  252. package/dist/roap/turnDiscovery.js +46 -46
  253. package/dist/roap/turnDiscovery.js.map +1 -1
  254. package/dist/roap/util.d.ts +2 -2
  255. package/dist/roap/util.js.map +1 -1
  256. package/dist/statsAnalyzer/global.d.ts +118 -126
  257. package/dist/statsAnalyzer/global.js +4 -12
  258. package/dist/statsAnalyzer/global.js.map +1 -1
  259. package/dist/statsAnalyzer/index.d.ts +193 -190
  260. package/dist/statsAnalyzer/index.js +182 -140
  261. package/dist/statsAnalyzer/index.js.map +1 -1
  262. package/dist/statsAnalyzer/mqaUtil.d.ts +22 -22
  263. package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
  264. package/dist/transcription/index.d.ts +64 -64
  265. package/dist/transcription/index.js +42 -42
  266. package/dist/transcription/index.js.map +1 -1
  267. package/internal-README.md +172 -172
  268. package/jest.config.js +3 -3
  269. package/package.json +21 -22
  270. package/process +1 -1
  271. package/src/common/browser-detection.ts +39 -39
  272. package/src/common/collection.ts +94 -94
  273. package/src/common/config.ts +9 -9
  274. package/src/common/errors/captcha-error.ts +25 -25
  275. package/src/common/errors/intent-to-join.ts +27 -27
  276. package/src/common/errors/join-meeting.ts +32 -32
  277. package/src/common/errors/media.ts +25 -25
  278. package/src/common/errors/parameter.ts +33 -33
  279. package/src/common/errors/password-error.ts +25 -25
  280. package/src/common/errors/permission.ts +24 -24
  281. package/src/common/errors/reconnection-in-progress.ts +8 -8
  282. package/src/common/errors/reconnection.ts +25 -25
  283. package/src/common/errors/stats.ts +25 -25
  284. package/src/common/errors/webex-errors.ts +140 -140
  285. package/src/common/errors/webex-meetings-error.ts +35 -35
  286. package/src/common/events/events-scope.ts +30 -30
  287. package/src/common/events/events.ts +25 -25
  288. package/src/common/events/trigger-proxy.ts +25 -25
  289. package/src/common/events/util.ts +39 -39
  290. package/src/common/logs/logger-config.ts +8 -8
  291. package/src/common/logs/logger-proxy.ts +44 -44
  292. package/src/common/logs/request.ts +65 -65
  293. package/src/common/queue.ts +50 -50
  294. package/src/config.ts +96 -96
  295. package/src/constants.ts +1123 -1121
  296. package/src/controls-options-manager/constants.ts +5 -5
  297. package/src/controls-options-manager/enums.ts +6 -6
  298. package/src/controls-options-manager/index.ts +183 -183
  299. package/src/controls-options-manager/util.ts +20 -20
  300. package/src/index.js +15 -15
  301. package/src/locus-info/controlsUtils.ts +112 -112
  302. package/src/locus-info/embeddedAppsUtils.ts +57 -57
  303. package/src/locus-info/fullState.ts +69 -69
  304. package/src/locus-info/hostUtils.ts +60 -60
  305. package/src/locus-info/index.ts +1303 -1303
  306. package/src/locus-info/infoUtils.ts +101 -101
  307. package/src/locus-info/mediaSharesUtils.ts +173 -173
  308. package/src/locus-info/parser.ts +680 -680
  309. package/src/locus-info/selfUtils.ts +428 -428
  310. package/src/media/index.ts +675 -675
  311. package/src/media/properties.ts +313 -313
  312. package/src/media/util.ts +37 -37
  313. package/src/mediaQualityMetrics/config.ts +382 -382
  314. package/src/meeting/effectsState.ts +209 -209
  315. package/src/meeting/in-meeting-actions.ts +153 -153
  316. package/src/meeting/index.ts +6572 -6537
  317. package/src/meeting/muteState.ts +365 -365
  318. package/src/meeting/request.ts +810 -810
  319. package/src/meeting/state.ts +194 -194
  320. package/src/meeting/util.ts +530 -530
  321. package/src/meeting-info/collection.ts +41 -41
  322. package/src/meeting-info/index.ts +137 -137
  323. package/src/meeting-info/meeting-info-v2.ts +273 -273
  324. package/src/meeting-info/request.ts +46 -46
  325. package/src/meeting-info/util.ts +314 -314
  326. package/src/meeting-info/utilv2.ts +324 -324
  327. package/src/meetings/collection.ts +43 -43
  328. package/src/meetings/index.ts +1128 -1128
  329. package/src/meetings/request.ts +81 -81
  330. package/src/meetings/util.ts +181 -181
  331. package/src/member/index.ts +446 -446
  332. package/src/member/member.types.ts +13 -13
  333. package/src/member/util.ts +286 -286
  334. package/src/members/collection.ts +40 -40
  335. package/src/members/index.ts +900 -900
  336. package/src/members/request.ts +175 -175
  337. package/src/members/util.ts +260 -260
  338. package/src/metrics/config.ts +485 -485
  339. package/src/metrics/constants.ts +63 -61
  340. package/src/metrics/index.ts +543 -543
  341. package/src/networkQualityMonitor/index.ts +211 -211
  342. package/src/peer-connection-manager/index.ts +847 -847
  343. package/src/peer-connection-manager/util.ts +119 -119
  344. package/src/personal-meeting-room/index.ts +157 -157
  345. package/src/personal-meeting-room/request.ts +48 -48
  346. package/src/personal-meeting-room/util.ts +49 -49
  347. package/src/reachability/index.ts +478 -478
  348. package/src/reachability/request.ts +81 -81
  349. package/src/reactions/reactions.ts +104 -104
  350. package/src/reactions/reactions.type.ts +36 -36
  351. package/src/reconnection-manager/index.ts +622 -622
  352. package/src/recording-controller/enums.ts +8 -8
  353. package/src/recording-controller/index.ts +315 -315
  354. package/src/recording-controller/util.ts +58 -58
  355. package/src/roap/collection.ts +62 -62
  356. package/src/roap/handler.ts +294 -294
  357. package/src/roap/index.ts +413 -413
  358. package/src/roap/request.ts +229 -229
  359. package/src/roap/state.ts +156 -156
  360. package/src/roap/turnDiscovery.ts +283 -283
  361. package/src/roap/util.ts +100 -100
  362. package/src/statsAnalyzer/global.ts +120 -128
  363. package/src/statsAnalyzer/index.ts +1329 -1266
  364. package/src/statsAnalyzer/mqaUtil.ts +290 -290
  365. package/src/transcription/index.ts +154 -154
  366. package/test/integration/spec/journey.js +941 -941
  367. package/test/integration/spec/space-meeting.js +457 -457
  368. package/test/integration/spec/transcription.js +55 -55
  369. package/test/unit/spec/common/browser-detection.js +119 -119
  370. package/test/unit/spec/common/queue.js +69 -69
  371. package/test/unit/spec/controls-options-manager/index.js +123 -123
  372. package/test/unit/spec/controls-options-manager/util.js +65 -65
  373. package/test/unit/spec/fixture/locus.js +406 -406
  374. package/test/unit/spec/locus-info/controlsUtils.js +82 -82
  375. package/test/unit/spec/locus-info/embeddedAppsUtils.js +104 -104
  376. package/test/unit/spec/locus-info/index.js +1272 -1272
  377. package/test/unit/spec/locus-info/infoUtils.js +138 -138
  378. package/test/unit/spec/locus-info/lib/BasicSeqCmp.json +975 -975
  379. package/test/unit/spec/locus-info/lib/SeqCmp.json +522 -522
  380. package/test/unit/spec/locus-info/lib/selfConstant.js +286 -286
  381. package/test/unit/spec/locus-info/parser.js +298 -298
  382. package/test/unit/spec/locus-info/selfUtils.js +185 -185
  383. package/test/unit/spec/media/properties.ts +305 -305
  384. package/test/unit/spec/meeting/effectsState.js +281 -281
  385. package/test/unit/spec/meeting/in-meeting-actions.ts +90 -90
  386. package/test/unit/spec/meeting/index.js +5298 -5227
  387. package/test/unit/spec/meeting/muteState.js +430 -430
  388. package/test/unit/spec/meeting/request.js +317 -317
  389. package/test/unit/spec/meeting/utils.js +319 -319
  390. package/test/unit/spec/meeting-info/meetinginfov2.js +376 -376
  391. package/test/unit/spec/meeting-info/request.js +64 -64
  392. package/test/unit/spec/meeting-info/util.js +37 -37
  393. package/test/unit/spec/meeting-info/utilv2.js +330 -330
  394. package/test/unit/spec/meetings/collection.js +52 -52
  395. package/test/unit/spec/meetings/index.js +1375 -1375
  396. package/test/unit/spec/meetings/utils.js +66 -66
  397. package/test/unit/spec/member/index.js +47 -47
  398. package/test/unit/spec/member/util.js +80 -80
  399. package/test/unit/spec/members/index.js +364 -364
  400. package/test/unit/spec/members/request.js +200 -200
  401. package/test/unit/spec/members/utils.js +42 -42
  402. package/test/unit/spec/metrics/index.js +111 -111
  403. package/test/unit/spec/networkQualityMonitor/index.js +99 -99
  404. package/test/unit/spec/peerconnection-manager/index.js +218 -218
  405. package/test/unit/spec/peerconnection-manager/utils.js +49 -49
  406. package/test/unit/spec/peerconnection-manager/utils.test-fixtures.ts +388 -388
  407. package/test/unit/spec/personal-meeting-room/personal-meeting-room.js +29 -29
  408. package/test/unit/spec/reachability/index.ts +50 -50
  409. package/test/unit/spec/reconnection-manager/index.js +206 -206
  410. package/test/unit/spec/recording-controller/index.js +230 -230
  411. package/test/unit/spec/recording-controller/util.js +101 -101
  412. package/test/unit/spec/roap/index.ts +128 -128
  413. package/test/unit/spec/roap/turnDiscovery.ts +372 -372
  414. package/test/unit/spec/roap/util.js +30 -30
  415. package/test/unit/spec/stats-analyzer/index.js +438 -287
  416. package/test/utils/cmr.js +104 -104
  417. package/test/utils/testUtils.js +287 -287
  418. package/test/utils/webex-config.js +77 -77
  419. package/test/utils/webex-test-users.js +82 -82
  420. package/tsconfig.json +5 -5
@@ -14,18 +14,18 @@ var _difference2 = _interopRequireDefault(require("lodash/difference"));
14
14
  var _queue = _interopRequireDefault(require("../common/queue"));
15
15
  var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
16
16
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
17
- /**
18
- * Locus Delta Parser
19
- * @private
20
- * https://sqbu-github.cisco.com/WebExSquared/cloud-apps/wiki/Locus-Delta-Events
17
+ /**
18
+ * Locus Delta Parser
19
+ * @private
20
+ * https://sqbu-github.cisco.com/WebExSquared/cloud-apps/wiki/Locus-Delta-Events
21
21
  */
22
22
  var Parser = /*#__PURE__*/function () {
23
23
  // processing status
24
24
 
25
25
  // loci comparison states
26
26
 
27
- /**
28
- * @constructs Parser
27
+ /**
28
+ * @constructs Parser
29
29
  */
30
30
  function Parser() {
31
31
  (0, _classCallCheck2.default)(this, Parser);
@@ -38,21 +38,21 @@ var Parser = /*#__PURE__*/function () {
38
38
  this.workingCopy = null;
39
39
  }
40
40
 
41
- /**
42
- * Checks if two sequences overlap in time,
43
- * the sequence with the higher minimum value is greater.
44
- * Chooses sequence with most recent data.
45
- * @param {Types~Locus} current
46
- * @param {Types~Locus} incoming
47
- * @returns {string} loci comparison state
41
+ /**
42
+ * Checks if two sequences overlap in time,
43
+ * the sequence with the higher minimum value is greater.
44
+ * Chooses sequence with most recent data.
45
+ * @param {Types~Locus} current
46
+ * @param {Types~Locus} incoming
47
+ * @returns {string} loci comparison state
48
48
  */
49
49
  (0, _createClass2.default)(Parser, [{
50
50
  key: "isValidLocus",
51
51
  value:
52
- /**
53
- * Checks if newLoci or workingCopy is invalid.
54
- * @param {Types~Locus} newLoci
55
- * @returns {boolean}
52
+ /**
53
+ * Checks if newLoci or workingCopy is invalid.
54
+ * @param {Types~Locus} newLoci
55
+ * @returns {boolean}
56
56
  */
57
57
  function isValidLocus(newLoci) {
58
58
  var _this = this;
@@ -75,18 +75,18 @@ var Parser = /*#__PURE__*/function () {
75
75
  return isValid;
76
76
  }
77
77
 
78
- /**
79
- * Determines if a paricular locus's sequence is empty
80
- * @param {Types~Locus} locus
81
- * @returns {bool}
78
+ /**
79
+ * Determines if a paricular locus's sequence is empty
80
+ * @param {Types~Locus} locus
81
+ * @returns {bool}
82
82
  */
83
83
  }, {
84
84
  key: "nextEvent",
85
85
  value:
86
- /**
87
- * Processes next event in queue,
88
- * if queue is empty sets status to idle.
89
- * @returns {undefined}
86
+ /**
87
+ * Processes next event in queue,
88
+ * if queue is empty sets status to idle.
89
+ * @returns {undefined}
90
90
  */
91
91
  function nextEvent() {
92
92
  // @ts-ignore
@@ -104,22 +104,22 @@ var Parser = /*#__PURE__*/function () {
104
104
  }
105
105
  }
106
106
 
107
- /**
108
- * Function handler for delta actions,
109
- * is set by instance callee.
110
- * @param {string} action Locus delta action
111
- * @param {Types~Locus} locus Locus delta
112
- * @returns {undefined}
107
+ /**
108
+ * Function handler for delta actions,
109
+ * is set by instance callee.
110
+ * @param {string} action Locus delta action
111
+ * @param {Types~Locus} locus Locus delta
112
+ * @returns {undefined}
113
113
  */
114
114
  // eslint-disable-next-line no-unused-vars
115
115
  }, {
116
116
  key: "onDeltaAction",
117
117
  value: function onDeltaAction(action, locus) {}
118
118
 
119
- /**
120
- * Event handler for locus delta events
121
- * @param {Types~Locus} loci Locus Delta
122
- * @returns {undefined}
119
+ /**
120
+ * Event handler for locus delta events
121
+ * @param {Types~Locus} loci Locus Delta
122
+ * @returns {undefined}
123
123
  */
124
124
  }, {
125
125
  key: "onDeltaEvent",
@@ -137,18 +137,18 @@ var Parser = /*#__PURE__*/function () {
137
137
  }
138
138
  }
139
139
 
140
- /**
141
- * Appends new data onto a string of existing data.
142
- * @param {string} newData
143
- * @param {string} oldData
144
- * @returns {string}
140
+ /**
141
+ * Appends new data onto a string of existing data.
142
+ * @param {string} newData
143
+ * @param {string} oldData
144
+ * @returns {string}
145
145
  */
146
146
  }, {
147
147
  key: "pause",
148
148
  value:
149
- /**
150
- * Pause locus processing
151
- * @returns {undefined}
149
+ /**
150
+ * Pause locus processing
151
+ * @returns {undefined}
152
152
  */
153
153
  function pause() {
154
154
  // @ts-ignore
@@ -156,11 +156,11 @@ var Parser = /*#__PURE__*/function () {
156
156
  _loggerProxy.default.logger.info('Locus-info:parser#pause --> Locus parser paused.');
157
157
  }
158
158
 
159
- /**
160
- * Processes next locus delta in the queue,
161
- * continues until the queue is empty
162
- * or cleared.
163
- * @returns {undefined}
159
+ /**
160
+ * Processes next locus delta in the queue,
161
+ * continues until the queue is empty
162
+ * or cleared.
163
+ * @returns {undefined}
164
164
  */
165
165
  }, {
166
166
  key: "processDeltaEvent",
@@ -197,9 +197,9 @@ var Parser = /*#__PURE__*/function () {
197
197
  this.nextEvent();
198
198
  }
199
199
 
200
- /**
201
- * Resume from a paused state
202
- * @returns {undefined}
200
+ /**
201
+ * Resume from a paused state
202
+ * @returns {undefined}
203
203
  */
204
204
  }, {
205
205
  key: "resume",
@@ -210,11 +210,11 @@ var Parser = /*#__PURE__*/function () {
210
210
  this.nextEvent();
211
211
  }
212
212
 
213
- /**
214
- * Gets related debug info for given error code
215
- * @param {string} debugCode Debug code
216
- * @param {string} comparison Locus comparison string
217
- * @returns {object} Debug message
213
+ /**
214
+ * Gets related debug info for given error code
215
+ * @param {string} debugCode Debug code
216
+ * @param {string} comparison Locus comparison string
217
+ * @returns {object} Debug message
218
218
  */
219
219
  }], [{
220
220
  key: "checkSequenceOverlap",
@@ -236,12 +236,12 @@ var Parser = /*#__PURE__*/function () {
236
236
  return comparison;
237
237
  }
238
238
 
239
- /**
240
- * Checks if two sequences have unequal ranges.
241
- * Chooses sequence with most larger range.
242
- * @param {Types~Locus} current
243
- * @param {Types~Locus} incoming
244
- * @returns {object} loci comparison
239
+ /**
240
+ * Checks if two sequences have unequal ranges.
241
+ * Chooses sequence with most larger range.
242
+ * @param {Types~Locus} current
243
+ * @param {Types~Locus} incoming
244
+ * @returns {object} loci comparison
245
245
  */
246
246
  }, {
247
247
  key: "checkUnequalRanges",
@@ -272,14 +272,14 @@ var Parser = /*#__PURE__*/function () {
272
272
  return comparison;
273
273
  }
274
274
 
275
- /**
276
- * Checks if either sequences has unique entries.
277
- * Entries are considered unique if they do not overlap
278
- * with other Loci sequences or range values.
279
- * Chooses sequence with the unique entries.
280
- * @param {Types~Locus} current
281
- * @param {Types~Locus} incoming
282
- * @returns {string} loci comparison state
275
+ /**
276
+ * Checks if either sequences has unique entries.
277
+ * Entries are considered unique if they do not overlap
278
+ * with other Loci sequences or range values.
279
+ * Chooses sequence with the unique entries.
280
+ * @param {Types~Locus} current
281
+ * @param {Types~Locus} incoming
282
+ * @returns {string} loci comparison state
283
283
  */
284
284
  }, {
285
285
  key: "checkForUniqueEntries",
@@ -301,13 +301,13 @@ var Parser = /*#__PURE__*/function () {
301
301
  return comparison;
302
302
  }
303
303
 
304
- /**
305
- * Checks both Locus Delta objects to see if they are
306
- * out of sync with one another. If so sends a DESYNC
307
- * request to the server.
308
- * @param {Types~Locus} current
309
- * @param {Types~Locus} incoming
310
- * @returns {string} loci comparison state
304
+ /**
305
+ * Checks both Locus Delta objects to see if they are
306
+ * out of sync with one another. If so sends a DESYNC
307
+ * request to the server.
308
+ * @param {Types~Locus} current
309
+ * @param {Types~Locus} incoming
310
+ * @returns {string} loci comparison state
311
311
  */
312
312
  }, {
313
313
  key: "checkIfOutOfSync",
@@ -343,13 +343,13 @@ var Parser = /*#__PURE__*/function () {
343
343
  return comparison;
344
344
  }
345
345
 
346
- /**
347
- * Compares two loci to determine which one contains the most recent state
348
- * @instance
349
- * @memberof Locus
350
- * @param {Types~Locus} current
351
- * @param {Types~Locus} incoming
352
- * @returns {string} loci comparison state
346
+ /**
347
+ * Compares two loci to determine which one contains the most recent state
348
+ * @instance
349
+ * @memberof Locus
350
+ * @param {Types~Locus} current
351
+ * @param {Types~Locus} incoming
352
+ * @returns {string} loci comparison state
353
353
  */
354
354
  }, {
355
355
  key: "compare",
@@ -368,15 +368,15 @@ var Parser = /*#__PURE__*/function () {
368
368
  return pack(action, result);
369
369
  }
370
370
 
371
- /**
372
- * Compares two loci sequences (with delta params) and indicates what action
373
- * to take.
374
- * @instance
375
- * @memberof Locus
376
- * @param {Types~Locus} current
377
- * @param {Types~Locus} incoming
378
- * @private
379
- * @returns {string} loci comparison state
371
+ /**
372
+ * Compares two loci sequences (with delta params) and indicates what action
373
+ * to take.
374
+ * @instance
375
+ * @memberof Locus
376
+ * @param {Types~Locus} current
377
+ * @param {Types~Locus} incoming
378
+ * @private
379
+ * @returns {string} loci comparison state
380
380
  */
381
381
  }, {
382
382
  key: "compareDelta",
@@ -406,11 +406,11 @@ var Parser = /*#__PURE__*/function () {
406
406
  return pack(comparison, result);
407
407
  }
408
408
 
409
- /**
410
- * Compares Locus sequences
411
- * @param {Types~Locus} current Current working copy
412
- * @param {Types~Locus} incoming New Locus delta
413
- * @returns {string}
409
+ /**
410
+ * Compares Locus sequences
411
+ * @param {Types~Locus} current Current working copy
412
+ * @param {Types~Locus} incoming New Locus delta
413
+ * @returns {string}
414
414
  */
415
415
  }, {
416
416
  key: "compareSequence",
@@ -444,10 +444,10 @@ var Parser = /*#__PURE__*/function () {
444
444
  return Parser.loci.ERROR;
445
445
  }
446
446
 
447
- /**
448
- * Transates the result of a sequence comparison into an intended behavior
449
- * @param {string} result
450
- * @returns {string} Locus comparison action
447
+ /**
448
+ * Transates the result of a sequence comparison into an intended behavior
449
+ * @param {string} result
450
+ * @returns {string} Locus comparison action
451
451
  */
452
452
  }, {
453
453
  key: "compareToAction",
@@ -478,10 +478,10 @@ var Parser = /*#__PURE__*/function () {
478
478
  return action;
479
479
  }
480
480
 
481
- /**
482
- * Extracts a loci comparison from a string of data.
483
- * @param {string} lociComparisonResult Comparison result with extra data
484
- * @returns {string} Comparison of EQ, LT, GT, or DESYNC.
481
+ /**
482
+ * Extracts a loci comparison from a string of data.
483
+ * @param {string} lociComparisonResult Comparison result with extra data
484
+ * @returns {string} Comparison of EQ, LT, GT, or DESYNC.
485
485
  */
486
486
  }, {
487
487
  key: "extractComparisonState",
@@ -489,21 +489,21 @@ var Parser = /*#__PURE__*/function () {
489
489
  return lociComparisonResult.split(':')[0];
490
490
  }
491
491
 
492
- /**
493
- * @typedef {object} LociMetadata
494
- * @property {number} start - Starting sequence number
495
- * @property {number} end - Ending sequence number
496
- * @property {number} first - First sequence number
497
- * @property {number} last - Last sequence number
498
- * @property {number} min - Minimum sequence number
499
- * @property {number} max - Maximum sequence number
500
- * @property {number} entries - Loci sequence entries
492
+ /**
493
+ * @typedef {object} LociMetadata
494
+ * @property {number} start - Starting sequence number
495
+ * @property {number} end - Ending sequence number
496
+ * @property {number} first - First sequence number
497
+ * @property {number} last - Last sequence number
498
+ * @property {number} min - Minimum sequence number
499
+ * @property {number} max - Maximum sequence number
500
+ * @property {number} entries - Loci sequence entries
501
501
  */
502
502
 
503
- /**
504
- * Metadata for Locus delta
505
- * @param {Array.<number>} sequence Locus delta sequence
506
- * @returns {LociMetadata} Locus Delta Metadata
503
+ /**
504
+ * Metadata for Locus delta
505
+ * @param {Array.<number>} sequence Locus delta sequence
506
+ * @returns {LociMetadata} Locus Delta Metadata
507
507
  */
508
508
  }, {
509
509
  key: "getMetaData",
@@ -531,12 +531,12 @@ var Parser = /*#__PURE__*/function () {
531
531
  };
532
532
  }
533
533
 
534
- /**
535
- * Compares two Locus delta objects and notes unique
536
- * values contained within baseLoci.
537
- * @param {LociMetadata} baseLoci
538
- * @param {LociMetadata} otherLoci
539
- * @returns {Array.<number>} List of unique sequences
534
+ /**
535
+ * Compares two Locus delta objects and notes unique
536
+ * values contained within baseLoci.
537
+ * @param {LociMetadata} baseLoci
538
+ * @param {LociMetadata} otherLoci
539
+ * @returns {Array.<number>} List of unique sequences
540
540
  */
541
541
  }, {
542
542
  key: "getUniqueSequences",
@@ -547,12 +547,12 @@ var Parser = /*#__PURE__*/function () {
547
547
  return Parser.getNumbersOutOfRange(diff, start, end);
548
548
  }
549
549
 
550
- /**
551
- * Returns an array of numbers outside of a given range.
552
- * @param {Array.<number>} list Array to filter
553
- * @param {number} rangeStart Start of range
554
- * @param {number} rangeEnd End of range
555
- * @returns {Array.<number>} Array of numbers sorted ASC
550
+ /**
551
+ * Returns an array of numbers outside of a given range.
552
+ * @param {Array.<number>} list Array to filter
553
+ * @param {number} rangeStart Start of range
554
+ * @param {number} rangeEnd End of range
555
+ * @returns {Array.<number>} Array of numbers sorted ASC
556
556
  */
557
557
  }, {
558
558
  key: "getNumbersOutOfRange",
@@ -577,11 +577,11 @@ var Parser = /*#__PURE__*/function () {
577
577
  return hasEmptyEntries && hasEmptyRange;
578
578
  }
579
579
 
580
- /**
581
- * Determines if an object has basic
582
- * structure of a locus object.
583
- * @param {Types~Locus} loci
584
- * @returns {boolean}
580
+ /**
581
+ * Determines if an object has basic
582
+ * structure of a locus object.
583
+ * @param {Types~Locus} loci
584
+ * @returns {boolean}
585
585
  */
586
586
  }, {
587
587
  key: "isLoci",
@@ -1 +1 @@
1
- {"version":3,"names":["_queue","_interopRequireDefault","require","_loggerProxy","_templateObject","_templateObject2","_templateObject3","_templateObject4","_templateObject5","_templateObject6","_templateObject7","_templateObject8","_templateObject9","_templateObject10","Parser","_classCallCheck2","default","_defineProperty2","queue","SimpleQueue","status","IDLE","onDeltaAction","workingCopy","_createClass2","key","value","isValidLocus","newLoci","_this","isValid","isLoci","setStatus","LoggerProxy","logger","info","nextEvent","PAUSED","size","processDeltaEvent","action","locus","onDeltaEvent","loci","enqueue","WORKING","pause","_Parser$loci","DESYNC","USE_INCOMING","extract","extractComparisonState","dequeue","result","compare","lociComparison","debug","concat","call","resume","checkSequenceOverlap","current","incoming","comparison","min","max","GT","LT","checkUnequalRanges","currentIsNotUnique","unique","length","incomingIsNotUnique","currentTotalRange","end","incomingTotalRange","EQ","checkForUniqueEntries","currentIsUnique","incomingIsUnique","checkIfOutOfSync","currentUniqueMin","incomingUniqueMin","currentHasNoRange","start","incomingHasNoRange","neitherSeqHasRange","hasUniqOverlap","list","some","seq","currentUniqOverlap","incomingUniqOverlap","debugInfo","isSequenceEmpty","pack","packComparisonResult","baseSequence","compareDelta","compareSequence","sequence","compareToAction","_Parser$loci2","local","getMetaData","delta","getUniqueSequences","rules","_i","_rules","rule","ERROR","_Parser$loci3","USE_CURRENT","lociComparisonResult","split","entries","first","last","slice","rangeStart","rangeEnd","baseLoci","otherLoci","diff","_difference2","getNumbersOutOfRange","output","filter","num","sort","a","b","_sequence$entries","hasEmptyEntries","hasEmptyRange","hasProp","prop","Object","prototype","hasOwnProperty","newData","oldData","getDebugMessage","debugCode","mStr","strings","join","replace","resolutionMap","debugMap","SO001","title","description","_taggedTemplateLiteral2","logic","SO002","UR001","UR002","UR003","UE001","UE002","OOS001","OOS002","OOS003","debugObj","resolution","exports"],"sources":["parser.ts"],"sourcesContent":["import {difference} from 'lodash';\r\n\r\nimport SimpleQueue from '../common/queue';\r\nimport LoggerProxy from '../common/logs/logger-proxy';\r\n\r\n/**\r\n * Locus Delta Parser\r\n * @private\r\n * https://sqbu-github.cisco.com/WebExSquared/cloud-apps/wiki/Locus-Delta-Events\r\n */\r\nexport default class Parser {\r\n // processing status\r\n static status = {\r\n IDLE: 'IDLE',\r\n PAUSED: 'PAUSED',\r\n WORKING: 'WORKING',\r\n };\r\n\r\n // loci comparison states\r\n static loci = {\r\n EQ: 'EQUAL',\r\n GT: 'GREATER_THAN',\r\n LT: 'LESS_THAN',\r\n DESYNC: 'DESYNC',\r\n USE_INCOMING: 'USE_INCOMING',\r\n USE_CURRENT: 'USE_CURRENT',\r\n ERROR: 'ERROR',\r\n };\r\n\r\n queue: any;\r\n workingCopy: any;\r\n\r\n /**\r\n * @constructs Parser\r\n */\r\n constructor() {\r\n this.queue = new SimpleQueue();\r\n // @ts-ignore - This is declared as static class member and again being initialized here from same\r\n this.status = Parser.status.IDLE;\r\n this.onDeltaAction = null;\r\n this.workingCopy = null;\r\n }\r\n\r\n /**\r\n * Checks if two sequences overlap in time,\r\n * the sequence with the higher minimum value is greater.\r\n * Chooses sequence with most recent data.\r\n * @param {Types~Locus} current\r\n * @param {Types~Locus} incoming\r\n * @returns {string} loci comparison state\r\n */\r\n static checkSequenceOverlap(current, incoming) {\r\n let comparison = null;\r\n\r\n // if earliest working copy sequence is more recent than last incoming sequence\r\n if (current.min > incoming.max) {\r\n // choose left side (current)\r\n comparison = `${Parser.loci.GT}:SO001`;\r\n }\r\n // if last working copy sequence is before the earliest incoming sequence\r\n else if (current.max < incoming.min) {\r\n // choose right side (incoming)\r\n comparison = `${Parser.loci.LT}:SO002`;\r\n }\r\n\r\n // if no match above, defaults to null\r\n return comparison;\r\n }\r\n\r\n /**\r\n * Checks if two sequences have unequal ranges.\r\n * Chooses sequence with most larger range.\r\n * @param {Types~Locus} current\r\n * @param {Types~Locus} incoming\r\n * @returns {object} loci comparison\r\n */\r\n static checkUnequalRanges(current, incoming) {\r\n let comparison = null;\r\n const currentIsNotUnique = current.unique.length === 0;\r\n const incomingIsNotUnique = incoming.unique.length === 0;\r\n const currentTotalRange = current.end - current.min;\r\n const incomingTotalRange = incoming.end - incoming.min;\r\n\r\n // no unique values for both loci\r\n if (currentIsNotUnique && incomingIsNotUnique) {\r\n // current working copy loci has a larger range\r\n if (currentTotalRange > incomingTotalRange) {\r\n // choose left side (current)\r\n comparison = `${Parser.loci.GT}:UR001`;\r\n }\r\n // incoming delta loci has a larger range\r\n else if (currentTotalRange < incomingTotalRange) {\r\n // choose right side (incoming)\r\n comparison = `${Parser.loci.LT}:UR002`;\r\n } else {\r\n // with no unique entries and with ranges either absent or\r\n // of the same size, the sequences are considered equal.\r\n comparison = `${Parser.loci.EQ}:UR003`;\r\n }\r\n }\r\n\r\n return comparison;\r\n }\r\n\r\n /**\r\n * Checks if either sequences has unique entries.\r\n * Entries are considered unique if they do not overlap\r\n * with other Loci sequences or range values.\r\n * Chooses sequence with the unique entries.\r\n * @param {Types~Locus} current\r\n * @param {Types~Locus} incoming\r\n * @returns {string} loci comparison state\r\n */\r\n static checkForUniqueEntries(current, incoming) {\r\n let comparison = null;\r\n const currentIsUnique = current.unique.length > 0;\r\n const incomingIsUnique = incoming.unique.length > 0;\r\n\r\n // current has unique entries and incoming does not\r\n if (currentIsUnique && !incomingIsUnique) {\r\n // choose left side (current)\r\n comparison = `${Parser.loci.GT}:UE001`;\r\n }\r\n // current has no unique entries but incoming does\r\n else if (!currentIsUnique && incomingIsUnique) {\r\n // choose right side (incoming)\r\n comparison = `${Parser.loci.LT}:UE002`;\r\n }\r\n\r\n return comparison;\r\n }\r\n\r\n /**\r\n * Checks both Locus Delta objects to see if they are\r\n * out of sync with one another. If so sends a DESYNC\r\n * request to the server.\r\n * @param {Types~Locus} current\r\n * @param {Types~Locus} incoming\r\n * @returns {string} loci comparison state\r\n */\r\n static checkIfOutOfSync(current, incoming) {\r\n let comparison = null;\r\n const currentUniqueMin = current.unique[0];\r\n const incomingUniqueMin = incoming.unique[0];\r\n\r\n const currentHasNoRange = !current.start && !current.end;\r\n const incomingHasNoRange = !incoming.start && !incoming.end;\r\n const neitherSeqHasRange = currentHasNoRange && incomingHasNoRange;\r\n\r\n const hasUniqOverlap = (list, min, max) => list.some((seq) => min < seq && seq < max);\r\n // current unique entries overlap the total range of incoming\r\n const currentUniqOverlap = hasUniqOverlap(current.unique, incoming.min, incoming.max);\r\n // vice-versa, incoming unique entries overlap the total range of current\r\n const incomingUniqOverlap = hasUniqOverlap(incoming.unique, current.min, current.max);\r\n\r\n if (neitherSeqHasRange || currentUniqOverlap || incomingUniqOverlap) {\r\n // outputs string indicating which condition occurred. ex: 0,1,0\r\n const debugInfo = `${+neitherSeqHasRange},${+currentUniqOverlap},${+incomingUniqOverlap}`;\r\n\r\n // send DESYNC to server\r\n comparison = `${Parser.loci.DESYNC}:OOS001:${debugInfo}`;\r\n } else if (currentUniqueMin > incomingUniqueMin) {\r\n // choose left side (current)\r\n comparison = `${Parser.loci.GT}:OOS002`;\r\n } else {\r\n // choose right side (incoming)\r\n comparison = `${Parser.loci.LT}:OOS003`;\r\n }\r\n\r\n return comparison;\r\n }\r\n\r\n /**\r\n * Compares two loci to determine which one contains the most recent state\r\n * @instance\r\n * @memberof Locus\r\n * @param {Types~Locus} current\r\n * @param {Types~Locus} incoming\r\n * @returns {string} loci comparison state\r\n */\r\n static compare(current, incoming) {\r\n const {isSequenceEmpty} = Parser;\r\n const {extractComparisonState: extract} = Parser;\r\n const {packComparisonResult: pack} = Parser;\r\n\r\n if (isSequenceEmpty(current) || isSequenceEmpty(incoming)) {\r\n return pack(Parser.loci.USE_INCOMING, 'C001');\r\n }\r\n\r\n if (incoming.baseSequence) {\r\n return pack(Parser.compareDelta(current, incoming), 'C002');\r\n }\r\n\r\n const result = Parser.compareSequence(current.sequence, incoming.sequence);\r\n const action = Parser.compareToAction(extract(result));\r\n\r\n return pack(action, result);\r\n }\r\n\r\n /**\r\n * Compares two loci sequences (with delta params) and indicates what action\r\n * to take.\r\n * @instance\r\n * @memberof Locus\r\n * @param {Types~Locus} current\r\n * @param {Types~Locus} incoming\r\n * @private\r\n * @returns {string} loci comparison state\r\n */\r\n private static compareDelta(current, incoming) {\r\n const {LT, GT, EQ, DESYNC, USE_INCOMING} = Parser.loci;\r\n\r\n const {extractComparisonState: extract} = Parser;\r\n const {packComparisonResult: pack} = Parser;\r\n\r\n const result = Parser.compareSequence(current.sequence, incoming.sequence);\r\n let comparison = extract(result);\r\n\r\n if (comparison !== LT) {\r\n return pack(Parser.compareToAction(comparison), result);\r\n }\r\n\r\n comparison = Parser.compareSequence(current.sequence, incoming.baseSequence);\r\n\r\n switch (extract(comparison)) {\r\n case GT:\r\n case EQ:\r\n comparison = USE_INCOMING;\r\n break;\r\n\r\n default:\r\n comparison = DESYNC;\r\n }\r\n\r\n return pack(comparison, result);\r\n }\r\n\r\n /**\r\n * Compares Locus sequences\r\n * @param {Types~Locus} current Current working copy\r\n * @param {Types~Locus} incoming New Locus delta\r\n * @returns {string}\r\n */\r\n static compareSequence(current, incoming) {\r\n // Locus sequence comparison rules in order of priority.\r\n // https://sqbu-github.cisco.com/WebExSquared/cloud-apps/wiki/Locus-Sequence-Comparison-Algorithm\r\n\r\n const local: any = Parser.getMetaData(current);\r\n const delta: any = Parser.getMetaData(incoming);\r\n\r\n // update loci metadata\r\n local.unique = Parser.getUniqueSequences(local, delta);\r\n delta.unique = Parser.getUniqueSequences(delta, local);\r\n\r\n // Locus sequence comparison rules\r\n // order matters\r\n const rules = [\r\n Parser.checkSequenceOverlap,\r\n Parser.checkUnequalRanges,\r\n Parser.checkForUniqueEntries,\r\n Parser.checkIfOutOfSync,\r\n ];\r\n\r\n for (const rule of rules) {\r\n // Rule only returns a value if the rule applies,\r\n // otherwise returns null.\r\n const result = rule(local, delta);\r\n\r\n if (result) {\r\n return result;\r\n }\r\n }\r\n\r\n // error, none of rules above applied\r\n // should never get here as last rule\r\n // should be catch all.\r\n return Parser.loci.ERROR;\r\n }\r\n\r\n /**\r\n * Transates the result of a sequence comparison into an intended behavior\r\n * @param {string} result\r\n * @returns {string} Locus comparison action\r\n */\r\n static compareToAction(result: string) {\r\n const {DESYNC, EQ, ERROR, GT, LT, USE_CURRENT, USE_INCOMING} = Parser.loci;\r\n\r\n let action = ERROR;\r\n\r\n switch (result) {\r\n case EQ:\r\n case GT:\r\n action = USE_CURRENT;\r\n break;\r\n case LT:\r\n action = USE_INCOMING;\r\n break;\r\n case DESYNC:\r\n action = DESYNC;\r\n break;\r\n default:\r\n LoggerProxy.logger.info(\r\n `Locus-info:parser#compareToAction --> Error: ${result} is not a recognized sequence comparison result.`\r\n );\r\n }\r\n\r\n return action;\r\n }\r\n\r\n /**\r\n * Extracts a loci comparison from a string of data.\r\n * @param {string} lociComparisonResult Comparison result with extra data\r\n * @returns {string} Comparison of EQ, LT, GT, or DESYNC.\r\n */\r\n static extractComparisonState(lociComparisonResult: string) {\r\n return lociComparisonResult.split(':')[0];\r\n }\r\n\r\n /**\r\n * @typedef {object} LociMetadata\r\n * @property {number} start - Starting sequence number\r\n * @property {number} end - Ending sequence number\r\n * @property {number} first - First sequence number\r\n * @property {number} last - Last sequence number\r\n * @property {number} min - Minimum sequence number\r\n * @property {number} max - Maximum sequence number\r\n * @property {number} entries - Loci sequence entries\r\n */\r\n\r\n /**\r\n * Metadata for Locus delta\r\n * @param {Array.<number>} sequence Locus delta sequence\r\n * @returns {LociMetadata} Locus Delta Metadata\r\n */\r\n static getMetaData(sequence: any) {\r\n const {entries} = sequence;\r\n const first = entries[0];\r\n const last = entries.slice(-1)[0];\r\n\r\n // rangeStart or rangeEnd is 0 if a range doesn't exist\r\n const start = sequence.rangeStart;\r\n const end = sequence.rangeEnd;\r\n\r\n // sequence data\r\n return {\r\n start,\r\n end,\r\n first,\r\n last,\r\n // Rule is: rangeStart <= rangeEnd <= min(entries)\r\n min: start || first,\r\n // Grab last entry if exist else default to rangeEnd\r\n max: last || end,\r\n // keep reference to actual sequence entries\r\n entries,\r\n };\r\n }\r\n\r\n /**\r\n * Compares two Locus delta objects and notes unique\r\n * values contained within baseLoci.\r\n * @param {LociMetadata} baseLoci\r\n * @param {LociMetadata} otherLoci\r\n * @returns {Array.<number>} List of unique sequences\r\n */\r\n static getUniqueSequences(baseLoci: any, otherLoci: any) {\r\n const diff: any = difference(baseLoci.entries, otherLoci.entries);\r\n\r\n const {start, end} = otherLoci;\r\n\r\n return Parser.getNumbersOutOfRange(diff, start, end);\r\n }\r\n\r\n /**\r\n * Returns an array of numbers outside of a given range.\r\n * @param {Array.<number>} list Array to filter\r\n * @param {number} rangeStart Start of range\r\n * @param {number} rangeEnd End of range\r\n * @returns {Array.<number>} Array of numbers sorted ASC\r\n */\r\n static getNumbersOutOfRange(list: Array<number>, rangeStart: number, rangeEnd: number) {\r\n // Collect all numbers if number is outside of specified range\r\n const output = list.filter((num) => num < rangeStart || num > rangeEnd);\r\n\r\n // sort ascending\r\n return output.sort((a, b) => a - b);\r\n }\r\n\r\n /**\r\n * Checks if newLoci or workingCopy is invalid.\r\n * @param {Types~Locus} newLoci\r\n * @returns {boolean}\r\n */\r\n isValidLocus(newLoci) {\r\n let isValid = false;\r\n const {IDLE} = Parser.status;\r\n const {isLoci} = Parser;\r\n // @ts-ignore\r\n const setStatus = (status) => {\r\n // @ts-ignore\r\n this.status = status;\r\n };\r\n\r\n // one or both objects are not locus delta events\r\n if (!isLoci(this.workingCopy) || !isLoci(newLoci)) {\r\n setStatus(IDLE);\r\n LoggerProxy.logger.info(\r\n 'Locus-info:parser#processDeltaEvent --> Ignoring non-locus object. workingCopy:',\r\n this.workingCopy,\r\n 'newLoci:',\r\n newLoci\r\n );\r\n } else {\r\n isValid = true;\r\n }\r\n\r\n return isValid;\r\n }\r\n\r\n /**\r\n * Determines if a paricular locus's sequence is empty\r\n * @param {Types~Locus} locus\r\n * @returns {bool}\r\n */\r\n static isSequenceEmpty(locus) {\r\n const {sequence} = locus;\r\n const hasEmptyEntries = !sequence.entries?.length;\r\n const hasEmptyRange = sequence.rangeStart === 0 && sequence.rangeEnd === 0;\r\n\r\n return hasEmptyEntries && hasEmptyRange;\r\n }\r\n\r\n /**\r\n * Determines if an object has basic\r\n * structure of a locus object.\r\n * @param {Types~Locus} loci\r\n * @returns {boolean}\r\n */\r\n static isLoci(loci) {\r\n if (!loci || !loci.sequence) {\r\n return false;\r\n }\r\n const hasProp = (prop) => Object.prototype.hasOwnProperty.call(loci.sequence, prop);\r\n\r\n if (hasProp('rangeStart') && hasProp('rangeEnd')) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n /**\r\n * Processes next event in queue,\r\n * if queue is empty sets status to idle.\r\n * @returns {undefined}\r\n */\r\n nextEvent() {\r\n // @ts-ignore\r\n if (this.status === Parser.status.PAUSED) {\r\n LoggerProxy.logger.info('Locus-info:parser#nextEvent --> Locus parser paused.');\r\n\r\n return;\r\n }\r\n\r\n // continue processing until queue is empty\r\n if (this.queue.size() > 0) {\r\n this.processDeltaEvent();\r\n } else {\r\n // @ts-ignore\r\n this.status = Parser.status.IDLE;\r\n }\r\n }\r\n\r\n /**\r\n * Function handler for delta actions,\r\n * is set by instance callee.\r\n * @param {string} action Locus delta action\r\n * @param {Types~Locus} locus Locus delta\r\n * @returns {undefined}\r\n */\r\n // eslint-disable-next-line no-unused-vars\r\n onDeltaAction(action: string, locus) {}\r\n\r\n /**\r\n * Event handler for locus delta events\r\n * @param {Types~Locus} loci Locus Delta\r\n * @returns {undefined}\r\n */\r\n onDeltaEvent(loci) {\r\n // enqueue the new loci\r\n this.queue.enqueue(loci);\r\n // start processing events in the queue if idle\r\n // and a function handler is defined\r\n // @ts-ignore\r\n if (this.status === Parser.status.IDLE && this.onDeltaAction) {\r\n // Update status, ensure we only process one event at a time.\r\n // @ts-ignore\r\n this.status = Parser.status.WORKING;\r\n\r\n this.processDeltaEvent();\r\n }\r\n }\r\n\r\n /**\r\n * Appends new data onto a string of existing data.\r\n * @param {string} newData\r\n * @param {string} oldData\r\n * @returns {string}\r\n */\r\n static packComparisonResult(newData: string, oldData: string) {\r\n return `${newData}:${oldData}`;\r\n }\r\n\r\n /**\r\n * Pause locus processing\r\n * @returns {undefined}\r\n */\r\n pause() {\r\n // @ts-ignore\r\n this.status = Parser.status.PAUSED;\r\n LoggerProxy.logger.info('Locus-info:parser#pause --> Locus parser paused.');\r\n }\r\n\r\n /**\r\n * Processes next locus delta in the queue,\r\n * continues until the queue is empty\r\n * or cleared.\r\n * @returns {undefined}\r\n */\r\n processDeltaEvent() {\r\n const {DESYNC, USE_INCOMING} = Parser.loci;\r\n const {extractComparisonState: extract} = Parser;\r\n const newLoci = this.queue.dequeue();\r\n\r\n if (!this.isValidLocus(newLoci)) {\r\n return;\r\n }\r\n\r\n const result = Parser.compare(this.workingCopy, newLoci);\r\n const lociComparison = extract(result);\r\n\r\n // limited debugging, use chrome extension\r\n // for full debugging.\r\n LoggerProxy.logger.debug(`Locus-info:parser#processDeltaEvent --> Locus Debug: ${result}`);\r\n\r\n if (lociComparison === DESYNC) {\r\n // wait for desync response\r\n this.pause();\r\n } else if (lociComparison === USE_INCOMING) {\r\n // update working copy for future comparisons.\r\n // Note: The working copy of parser gets updated in .onFullLocus()\r\n // and here when USE_INCOMING locus.\r\n this.workingCopy = newLoci;\r\n }\r\n\r\n if (this.onDeltaAction) {\r\n LoggerProxy.logger.info(\r\n `Locus-info:parser#processDeltaEvent --> Locus Delta Action: ${lociComparison}`\r\n );\r\n\r\n // eslint-disable-next-line no-useless-call\r\n this.onDeltaAction.call(this, lociComparison, newLoci);\r\n }\r\n\r\n this.nextEvent();\r\n }\r\n\r\n /**\r\n * Resume from a paused state\r\n * @returns {undefined}\r\n */\r\n resume() {\r\n LoggerProxy.logger.info('Locus-info:parser#resume --> Locus parser resumed.');\r\n // @ts-ignore\r\n this.status = Parser.status.WORKING;\r\n this.nextEvent();\r\n }\r\n\r\n /**\r\n * Gets related debug info for given error code\r\n * @param {string} debugCode Debug code\r\n * @param {string} comparison Locus comparison string\r\n * @returns {object} Debug message\r\n */\r\n static getDebugMessage(debugCode: string, comparison: string) {\r\n // removes extra spaces from multiline string\r\n const mStr = (strings) => strings.join('').replace(/\\s{2,}/g, ' ');\r\n\r\n const resolutionMap = {\r\n EQ: `${Parser.loci.LT}: is equal (current == incoming).`,\r\n LT: `${Parser.loci.LT}: choose right side (incoming).`,\r\n GT: `${Parser.loci.GT}: choose left side (current).`,\r\n };\r\n\r\n const debugMap = {\r\n SO001: {\r\n title: 'checkSequenceOverlap-001',\r\n description: mStr`Occurs if earliest working copy sequence is more \\\r\n recent than last incoming sequence.`,\r\n logic: 'current.min > incoming.max',\r\n },\r\n\r\n SO002: {\r\n title: 'checkSequenceOverlap-002',\r\n description: mStr`Occurs if last working copy sequence is before the \\\r\n earliest incoming sequence.`,\r\n logic: 'current.max < incoming.min',\r\n },\r\n\r\n UR001: {\r\n title: 'checkUnequalRanges-001',\r\n description: mStr`Occurs if there are no unique values for both loci, \\\r\n and the current working copy loci has a larger range.`,\r\n logic: 'currentTotalRange > incomingTotalRange',\r\n },\r\n\r\n UR002: {\r\n title: 'checkUnequalRanges-002',\r\n description: mStr`Occurs if there are no unique values for both loci, \\\r\n and the incoming delta loci has a larger range.`,\r\n logic: 'currentTotalRange < incomingTotalRange',\r\n },\r\n\r\n UR003: {\r\n title: 'checkUnequalRanges-003',\r\n description: mStr`Occurs if there are no unique values for both loci, \\\r\n and with ranges either absent or of the same size, the sequences \\\r\n are considered equal.`,\r\n logic: 'currentTotalRange == incomingTotalRange',\r\n },\r\n\r\n UE001: {\r\n title: 'checkForUniqueEntries-001',\r\n description: mStr`Occurs if current loci has unique entries and \\\r\n incoming does not. Entries are considered unique if they \\\r\n do not overlap with other Loci sequences or range values.`,\r\n logic: 'currentIsUnique && !incomingIsUnique',\r\n },\r\n\r\n UE002: {\r\n title: 'checkForUniqueEntries-002',\r\n description: mStr`Occurs if current has no unique entries but \\\r\n incoming does. Entries are considered unique if they \\\r\n do not overlap with other Loci sequences or range values.`,\r\n logic: '!currentIsUnique && incomingIsUnique',\r\n },\r\n\r\n OOS001: {\r\n title: 'checkIfOutOfSync-001',\r\n description: mStr`Occurs if neither sequence has a range, or \\\r\n if the current loci unique entries overlap the total range of the \\\r\n incoming sequence, or if the incoming unique entries overlap \\\r\n the total range of current sequence.`,\r\n logic: 'neitherSeqHasRange || currentUniqOverlap || incomingUniqOverlap',\r\n },\r\n\r\n OOS002: {\r\n title: 'checkIfOutOfSync-002',\r\n description: mStr`Occurs if the minimum value from sequences that are \\\r\n unique to the current loci is greater than the minimum value from \\\r\n sequences that are unique to the incoming loci.`,\r\n logic: 'currentUniqueMin > incomingUniqueMin',\r\n },\r\n\r\n OOS003: {\r\n title: 'checkIfOutOfSync-003',\r\n description: mStr`Occurs if none of the comparison rules applied. \\\r\n It is a catch all.`,\r\n logic: 'else (catch all)',\r\n },\r\n };\r\n\r\n const debugObj = debugMap[debugCode];\r\n\r\n debugObj.title = `Debug: ${debugObj.title}`;\r\n debugObj.resolution = resolutionMap[comparison];\r\n\r\n return debugObj;\r\n }\r\n}\r\n"],"mappings":";;;;;;;;;;;;;AAEA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAF,sBAAA,CAAAC,OAAA;AAAsD,IAAAE,eAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,iBAAA;AAEtD;AACA;AACA;AACA;AACA;AAJA,IAKqBC,MAAM;EACzB;;EAOA;;EAcA;AACF;AACA;EACE,SAAAA,OAAA,EAAc;IAAA,IAAAC,gBAAA,CAAAC,OAAA,QAAAF,MAAA;IAAA,IAAAG,gBAAA,CAAAD,OAAA;IAAA,IAAAC,gBAAA,CAAAD,OAAA;IACZ,IAAI,CAACE,KAAK,GAAG,IAAIC,cAAW,EAAE;IAC9B;IACA,IAAI,CAACC,MAAM,GAAGN,MAAM,CAACM,MAAM,CAACC,IAAI;IAChC,IAAI,CAACC,aAAa,GAAG,IAAI;IACzB,IAAI,CAACC,WAAW,GAAG,IAAI;EACzB;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EAPE,IAAAC,aAAA,CAAAR,OAAA,EAAAF,MAAA;IAAAW,GAAA;IAAAC,KAAA;IAyVA;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AAE,WAAW;EACfnB,MAAM,EAAE,QAAQ;EAChBC,YAAY,EAAE,cAAc;EAC5BgE,WAAW,EAAE,aAAa;EAC1BF,KAAK,EAAE;AACT,CAAC"}
1
+ {"version":3,"names":["_queue","_interopRequireDefault","require","_loggerProxy","_templateObject","_templateObject2","_templateObject3","_templateObject4","_templateObject5","_templateObject6","_templateObject7","_templateObject8","_templateObject9","_templateObject10","Parser","_classCallCheck2","default","_defineProperty2","queue","SimpleQueue","status","IDLE","onDeltaAction","workingCopy","_createClass2","key","value","isValidLocus","newLoci","_this","isValid","isLoci","setStatus","LoggerProxy","logger","info","nextEvent","PAUSED","size","processDeltaEvent","action","locus","onDeltaEvent","loci","enqueue","WORKING","pause","_Parser$loci","DESYNC","USE_INCOMING","extract","extractComparisonState","dequeue","result","compare","lociComparison","debug","concat","call","resume","checkSequenceOverlap","current","incoming","comparison","min","max","GT","LT","checkUnequalRanges","currentIsNotUnique","unique","length","incomingIsNotUnique","currentTotalRange","end","incomingTotalRange","EQ","checkForUniqueEntries","currentIsUnique","incomingIsUnique","checkIfOutOfSync","currentUniqueMin","incomingUniqueMin","currentHasNoRange","start","incomingHasNoRange","neitherSeqHasRange","hasUniqOverlap","list","some","seq","currentUniqOverlap","incomingUniqOverlap","debugInfo","isSequenceEmpty","pack","packComparisonResult","baseSequence","compareDelta","compareSequence","sequence","compareToAction","_Parser$loci2","local","getMetaData","delta","getUniqueSequences","rules","_i","_rules","rule","ERROR","_Parser$loci3","USE_CURRENT","lociComparisonResult","split","entries","first","last","slice","rangeStart","rangeEnd","baseLoci","otherLoci","diff","_difference2","getNumbersOutOfRange","output","filter","num","sort","a","b","_sequence$entries","hasEmptyEntries","hasEmptyRange","hasProp","prop","Object","prototype","hasOwnProperty","newData","oldData","getDebugMessage","debugCode","mStr","strings","join","replace","resolutionMap","debugMap","SO001","title","description","_taggedTemplateLiteral2","logic","SO002","UR001","UR002","UR003","UE001","UE002","OOS001","OOS002","OOS003","debugObj","resolution","exports"],"sources":["parser.ts"],"sourcesContent":["import {difference} from 'lodash';\n\nimport SimpleQueue from '../common/queue';\nimport LoggerProxy from '../common/logs/logger-proxy';\n\n/**\n * Locus Delta Parser\n * @private\n * https://sqbu-github.cisco.com/WebExSquared/cloud-apps/wiki/Locus-Delta-Events\n */\nexport default class Parser {\n // processing status\n static status = {\n IDLE: 'IDLE',\n PAUSED: 'PAUSED',\n WORKING: 'WORKING',\n };\n\n // loci comparison states\n static loci = {\n EQ: 'EQUAL',\n GT: 'GREATER_THAN',\n LT: 'LESS_THAN',\n DESYNC: 'DESYNC',\n USE_INCOMING: 'USE_INCOMING',\n USE_CURRENT: 'USE_CURRENT',\n ERROR: 'ERROR',\n };\n\n queue: any;\n workingCopy: any;\n\n /**\n * @constructs Parser\n */\n constructor() {\n this.queue = new SimpleQueue();\n // @ts-ignore - This is declared as static class member and again being initialized here from same\n this.status = Parser.status.IDLE;\n this.onDeltaAction = null;\n this.workingCopy = null;\n }\n\n /**\n * Checks if two sequences overlap in time,\n * the sequence with the higher minimum value is greater.\n * Chooses sequence with most recent data.\n * @param {Types~Locus} current\n * @param {Types~Locus} incoming\n * @returns {string} loci comparison state\n */\n static checkSequenceOverlap(current, incoming) {\n let comparison = null;\n\n // if earliest working copy sequence is more recent than last incoming sequence\n if (current.min > incoming.max) {\n // choose left side (current)\n comparison = `${Parser.loci.GT}:SO001`;\n }\n // if last working copy sequence is before the earliest incoming sequence\n else if (current.max < incoming.min) {\n // choose right side (incoming)\n comparison = `${Parser.loci.LT}:SO002`;\n }\n\n // if no match above, defaults to null\n return comparison;\n }\n\n /**\n * Checks if two sequences have unequal ranges.\n * Chooses sequence with most larger range.\n * @param {Types~Locus} current\n * @param {Types~Locus} incoming\n * @returns {object} loci comparison\n */\n static checkUnequalRanges(current, incoming) {\n let comparison = null;\n const currentIsNotUnique = current.unique.length === 0;\n const incomingIsNotUnique = incoming.unique.length === 0;\n const currentTotalRange = current.end - current.min;\n const incomingTotalRange = incoming.end - incoming.min;\n\n // no unique values for both loci\n if (currentIsNotUnique && incomingIsNotUnique) {\n // current working copy loci has a larger range\n if (currentTotalRange > incomingTotalRange) {\n // choose left side (current)\n comparison = `${Parser.loci.GT}:UR001`;\n }\n // incoming delta loci has a larger range\n else if (currentTotalRange < incomingTotalRange) {\n // choose right side (incoming)\n comparison = `${Parser.loci.LT}:UR002`;\n } else {\n // with no unique entries and with ranges either absent or\n // of the same size, the sequences are considered equal.\n comparison = `${Parser.loci.EQ}:UR003`;\n }\n }\n\n return comparison;\n }\n\n /**\n * Checks if either sequences has unique entries.\n * Entries are considered unique if they do not overlap\n * with other Loci sequences or range values.\n * Chooses sequence with the unique entries.\n * @param {Types~Locus} current\n * @param {Types~Locus} incoming\n * @returns {string} loci comparison state\n */\n static checkForUniqueEntries(current, incoming) {\n let comparison = null;\n const currentIsUnique = current.unique.length > 0;\n const incomingIsUnique = incoming.unique.length > 0;\n\n // current has unique entries and incoming does not\n if (currentIsUnique && !incomingIsUnique) {\n // choose left side (current)\n comparison = `${Parser.loci.GT}:UE001`;\n }\n // current has no unique entries but incoming does\n else if (!currentIsUnique && incomingIsUnique) {\n // choose right side (incoming)\n comparison = `${Parser.loci.LT}:UE002`;\n }\n\n return comparison;\n }\n\n /**\n * Checks both Locus Delta objects to see if they are\n * out of sync with one another. If so sends a DESYNC\n * request to the server.\n * @param {Types~Locus} current\n * @param {Types~Locus} incoming\n * @returns {string} loci comparison state\n */\n static checkIfOutOfSync(current, incoming) {\n let comparison = null;\n const currentUniqueMin = current.unique[0];\n const incomingUniqueMin = incoming.unique[0];\n\n const currentHasNoRange = !current.start && !current.end;\n const incomingHasNoRange = !incoming.start && !incoming.end;\n const neitherSeqHasRange = currentHasNoRange && incomingHasNoRange;\n\n const hasUniqOverlap = (list, min, max) => list.some((seq) => min < seq && seq < max);\n // current unique entries overlap the total range of incoming\n const currentUniqOverlap = hasUniqOverlap(current.unique, incoming.min, incoming.max);\n // vice-versa, incoming unique entries overlap the total range of current\n const incomingUniqOverlap = hasUniqOverlap(incoming.unique, current.min, current.max);\n\n if (neitherSeqHasRange || currentUniqOverlap || incomingUniqOverlap) {\n // outputs string indicating which condition occurred. ex: 0,1,0\n const debugInfo = `${+neitherSeqHasRange},${+currentUniqOverlap},${+incomingUniqOverlap}`;\n\n // send DESYNC to server\n comparison = `${Parser.loci.DESYNC}:OOS001:${debugInfo}`;\n } else if (currentUniqueMin > incomingUniqueMin) {\n // choose left side (current)\n comparison = `${Parser.loci.GT}:OOS002`;\n } else {\n // choose right side (incoming)\n comparison = `${Parser.loci.LT}:OOS003`;\n }\n\n return comparison;\n }\n\n /**\n * Compares two loci to determine which one contains the most recent state\n * @instance\n * @memberof Locus\n * @param {Types~Locus} current\n * @param {Types~Locus} incoming\n * @returns {string} loci comparison state\n */\n static compare(current, incoming) {\n const {isSequenceEmpty} = Parser;\n const {extractComparisonState: extract} = Parser;\n const {packComparisonResult: pack} = Parser;\n\n if (isSequenceEmpty(current) || isSequenceEmpty(incoming)) {\n return pack(Parser.loci.USE_INCOMING, 'C001');\n }\n\n if (incoming.baseSequence) {\n return pack(Parser.compareDelta(current, incoming), 'C002');\n }\n\n const result = Parser.compareSequence(current.sequence, incoming.sequence);\n const action = Parser.compareToAction(extract(result));\n\n return pack(action, result);\n }\n\n /**\n * Compares two loci sequences (with delta params) and indicates what action\n * to take.\n * @instance\n * @memberof Locus\n * @param {Types~Locus} current\n * @param {Types~Locus} incoming\n * @private\n * @returns {string} loci comparison state\n */\n private static compareDelta(current, incoming) {\n const {LT, GT, EQ, DESYNC, USE_INCOMING} = Parser.loci;\n\n const {extractComparisonState: extract} = Parser;\n const {packComparisonResult: pack} = Parser;\n\n const result = Parser.compareSequence(current.sequence, incoming.sequence);\n let comparison = extract(result);\n\n if (comparison !== LT) {\n return pack(Parser.compareToAction(comparison), result);\n }\n\n comparison = Parser.compareSequence(current.sequence, incoming.baseSequence);\n\n switch (extract(comparison)) {\n case GT:\n case EQ:\n comparison = USE_INCOMING;\n break;\n\n default:\n comparison = DESYNC;\n }\n\n return pack(comparison, result);\n }\n\n /**\n * Compares Locus sequences\n * @param {Types~Locus} current Current working copy\n * @param {Types~Locus} incoming New Locus delta\n * @returns {string}\n */\n static compareSequence(current, incoming) {\n // Locus sequence comparison rules in order of priority.\n // https://sqbu-github.cisco.com/WebExSquared/cloud-apps/wiki/Locus-Sequence-Comparison-Algorithm\n\n const local: any = Parser.getMetaData(current);\n const delta: any = Parser.getMetaData(incoming);\n\n // update loci metadata\n local.unique = Parser.getUniqueSequences(local, delta);\n delta.unique = Parser.getUniqueSequences(delta, local);\n\n // Locus sequence comparison rules\n // order matters\n const rules = [\n Parser.checkSequenceOverlap,\n Parser.checkUnequalRanges,\n Parser.checkForUniqueEntries,\n Parser.checkIfOutOfSync,\n ];\n\n for (const rule of rules) {\n // Rule only returns a value if the rule applies,\n // otherwise returns null.\n const result = rule(local, delta);\n\n if (result) {\n return result;\n }\n }\n\n // error, none of rules above applied\n // should never get here as last rule\n // should be catch all.\n return Parser.loci.ERROR;\n }\n\n /**\n * Transates the result of a sequence comparison into an intended behavior\n * @param {string} result\n * @returns {string} Locus comparison action\n */\n static compareToAction(result: string) {\n const {DESYNC, EQ, ERROR, GT, LT, USE_CURRENT, USE_INCOMING} = Parser.loci;\n\n let action = ERROR;\n\n switch (result) {\n case EQ:\n case GT:\n action = USE_CURRENT;\n break;\n case LT:\n action = USE_INCOMING;\n break;\n case DESYNC:\n action = DESYNC;\n break;\n default:\n LoggerProxy.logger.info(\n `Locus-info:parser#compareToAction --> Error: ${result} is not a recognized sequence comparison result.`\n );\n }\n\n return action;\n }\n\n /**\n * Extracts a loci comparison from a string of data.\n * @param {string} lociComparisonResult Comparison result with extra data\n * @returns {string} Comparison of EQ, LT, GT, or DESYNC.\n */\n static extractComparisonState(lociComparisonResult: string) {\n return lociComparisonResult.split(':')[0];\n }\n\n /**\n * @typedef {object} LociMetadata\n * @property {number} start - Starting sequence number\n * @property {number} end - Ending sequence number\n * @property {number} first - First sequence number\n * @property {number} last - Last sequence number\n * @property {number} min - Minimum sequence number\n * @property {number} max - Maximum sequence number\n * @property {number} entries - Loci sequence entries\n */\n\n /**\n * Metadata for Locus delta\n * @param {Array.<number>} sequence Locus delta sequence\n * @returns {LociMetadata} Locus Delta Metadata\n */\n static getMetaData(sequence: any) {\n const {entries} = sequence;\n const first = entries[0];\n const last = entries.slice(-1)[0];\n\n // rangeStart or rangeEnd is 0 if a range doesn't exist\n const start = sequence.rangeStart;\n const end = sequence.rangeEnd;\n\n // sequence data\n return {\n start,\n end,\n first,\n last,\n // Rule is: rangeStart <= rangeEnd <= min(entries)\n min: start || first,\n // Grab last entry if exist else default to rangeEnd\n max: last || end,\n // keep reference to actual sequence entries\n entries,\n };\n }\n\n /**\n * Compares two Locus delta objects and notes unique\n * values contained within baseLoci.\n * @param {LociMetadata} baseLoci\n * @param {LociMetadata} otherLoci\n * @returns {Array.<number>} List of unique sequences\n */\n static getUniqueSequences(baseLoci: any, otherLoci: any) {\n const diff: any = difference(baseLoci.entries, otherLoci.entries);\n\n const {start, end} = otherLoci;\n\n return Parser.getNumbersOutOfRange(diff, start, end);\n }\n\n /**\n * Returns an array of numbers outside of a given range.\n * @param {Array.<number>} list Array to filter\n * @param {number} rangeStart Start of range\n * @param {number} rangeEnd End of range\n * @returns {Array.<number>} Array of numbers sorted ASC\n */\n static getNumbersOutOfRange(list: Array<number>, rangeStart: number, rangeEnd: number) {\n // Collect all numbers if number is outside of specified range\n const output = list.filter((num) => num < rangeStart || num > rangeEnd);\n\n // sort ascending\n return output.sort((a, b) => a - b);\n }\n\n /**\n * Checks if newLoci or workingCopy is invalid.\n * @param {Types~Locus} newLoci\n * @returns {boolean}\n */\n isValidLocus(newLoci) {\n let isValid = false;\n const {IDLE} = Parser.status;\n const {isLoci} = Parser;\n // @ts-ignore\n const setStatus = (status) => {\n // @ts-ignore\n this.status = status;\n };\n\n // one or both objects are not locus delta events\n if (!isLoci(this.workingCopy) || !isLoci(newLoci)) {\n setStatus(IDLE);\n LoggerProxy.logger.info(\n 'Locus-info:parser#processDeltaEvent --> Ignoring non-locus object. workingCopy:',\n this.workingCopy,\n 'newLoci:',\n newLoci\n );\n } else {\n isValid = true;\n }\n\n return isValid;\n }\n\n /**\n * Determines if a paricular locus's sequence is empty\n * @param {Types~Locus} locus\n * @returns {bool}\n */\n static isSequenceEmpty(locus) {\n const {sequence} = locus;\n const hasEmptyEntries = !sequence.entries?.length;\n const hasEmptyRange = sequence.rangeStart === 0 && sequence.rangeEnd === 0;\n\n return hasEmptyEntries && hasEmptyRange;\n }\n\n /**\n * Determines if an object has basic\n * structure of a locus object.\n * @param {Types~Locus} loci\n * @returns {boolean}\n */\n static isLoci(loci) {\n if (!loci || !loci.sequence) {\n return false;\n }\n const hasProp = (prop) => Object.prototype.hasOwnProperty.call(loci.sequence, prop);\n\n if (hasProp('rangeStart') && hasProp('rangeEnd')) {\n return true;\n }\n\n return false;\n }\n\n /**\n * Processes next event in queue,\n * if queue is empty sets status to idle.\n * @returns {undefined}\n */\n nextEvent() {\n // @ts-ignore\n if (this.status === Parser.status.PAUSED) {\n LoggerProxy.logger.info('Locus-info:parser#nextEvent --> Locus parser paused.');\n\n return;\n }\n\n // continue processing until queue is empty\n if (this.queue.size() > 0) {\n this.processDeltaEvent();\n } else {\n // @ts-ignore\n this.status = Parser.status.IDLE;\n }\n }\n\n /**\n * Function handler for delta actions,\n * is set by instance callee.\n * @param {string} action Locus delta action\n * @param {Types~Locus} locus Locus delta\n * @returns {undefined}\n */\n // eslint-disable-next-line no-unused-vars\n onDeltaAction(action: string, locus) {}\n\n /**\n * Event handler for locus delta events\n * @param {Types~Locus} loci Locus Delta\n * @returns {undefined}\n */\n onDeltaEvent(loci) {\n // enqueue the new loci\n this.queue.enqueue(loci);\n // start processing events in the queue if idle\n // and a function handler is defined\n // @ts-ignore\n if (this.status === Parser.status.IDLE && this.onDeltaAction) {\n // Update status, ensure we only process one event at a time.\n // @ts-ignore\n this.status = Parser.status.WORKING;\n\n this.processDeltaEvent();\n }\n }\n\n /**\n * Appends new data onto a string of existing data.\n * @param {string} newData\n * @param {string} oldData\n * @returns {string}\n */\n static packComparisonResult(newData: string, oldData: string) {\n return `${newData}:${oldData}`;\n }\n\n /**\n * Pause locus processing\n * @returns {undefined}\n */\n pause() {\n // @ts-ignore\n this.status = Parser.status.PAUSED;\n LoggerProxy.logger.info('Locus-info:parser#pause --> Locus parser paused.');\n }\n\n /**\n * Processes next locus delta in the queue,\n * continues until the queue is empty\n * or cleared.\n * @returns {undefined}\n */\n processDeltaEvent() {\n const {DESYNC, USE_INCOMING} = Parser.loci;\n const {extractComparisonState: extract} = Parser;\n const newLoci = this.queue.dequeue();\n\n if (!this.isValidLocus(newLoci)) {\n return;\n }\n\n const result = Parser.compare(this.workingCopy, newLoci);\n const lociComparison = extract(result);\n\n // limited debugging, use chrome extension\n // for full debugging.\n LoggerProxy.logger.debug(`Locus-info:parser#processDeltaEvent --> Locus Debug: ${result}`);\n\n if (lociComparison === DESYNC) {\n // wait for desync response\n this.pause();\n } else if (lociComparison === USE_INCOMING) {\n // update working copy for future comparisons.\n // Note: The working copy of parser gets updated in .onFullLocus()\n // and here when USE_INCOMING locus.\n this.workingCopy = newLoci;\n }\n\n if (this.onDeltaAction) {\n LoggerProxy.logger.info(\n `Locus-info:parser#processDeltaEvent --> Locus Delta Action: ${lociComparison}`\n );\n\n // eslint-disable-next-line no-useless-call\n this.onDeltaAction.call(this, lociComparison, newLoci);\n }\n\n this.nextEvent();\n }\n\n /**\n * Resume from a paused state\n * @returns {undefined}\n */\n resume() {\n LoggerProxy.logger.info('Locus-info:parser#resume --> Locus parser resumed.');\n // @ts-ignore\n this.status = Parser.status.WORKING;\n this.nextEvent();\n }\n\n /**\n * Gets related debug info for given error code\n * @param {string} debugCode Debug code\n * @param {string} comparison Locus comparison string\n * @returns {object} Debug message\n */\n static getDebugMessage(debugCode: string, comparison: string) {\n // removes extra spaces from multiline string\n const mStr = (strings) => strings.join('').replace(/\\s{2,}/g, ' ');\n\n const resolutionMap = {\n EQ: `${Parser.loci.LT}: is equal (current == incoming).`,\n LT: `${Parser.loci.LT}: choose right side (incoming).`,\n GT: `${Parser.loci.GT}: choose left side (current).`,\n };\n\n const debugMap = {\n SO001: {\n title: 'checkSequenceOverlap-001',\n description: mStr`Occurs if earliest working copy sequence is more \\\n recent than last incoming sequence.`,\n logic: 'current.min > incoming.max',\n },\n\n SO002: {\n title: 'checkSequenceOverlap-002',\n description: mStr`Occurs if last working copy sequence is before the \\\n earliest incoming sequence.`,\n logic: 'current.max < incoming.min',\n },\n\n UR001: {\n title: 'checkUnequalRanges-001',\n description: mStr`Occurs if there are no unique values for both loci, \\\n and the current working copy loci has a larger range.`,\n logic: 'currentTotalRange > incomingTotalRange',\n },\n\n UR002: {\n title: 'checkUnequalRanges-002',\n description: mStr`Occurs if there are no unique values for both loci, \\\n and the incoming delta loci has a larger range.`,\n logic: 'currentTotalRange < incomingTotalRange',\n },\n\n UR003: {\n title: 'checkUnequalRanges-003',\n description: mStr`Occurs if there are no unique values for both loci, \\\n and with ranges either absent or of the same size, the sequences \\\n are considered equal.`,\n logic: 'currentTotalRange == incomingTotalRange',\n },\n\n UE001: {\n title: 'checkForUniqueEntries-001',\n description: mStr`Occurs if current loci has unique entries and \\\n incoming does not. Entries are considered unique if they \\\n do not overlap with other Loci sequences or range values.`,\n logic: 'currentIsUnique && !incomingIsUnique',\n },\n\n UE002: {\n title: 'checkForUniqueEntries-002',\n description: mStr`Occurs if current has no unique entries but \\\n incoming does. Entries are considered unique if they \\\n do not overlap with other Loci sequences or range values.`,\n logic: '!currentIsUnique && incomingIsUnique',\n },\n\n OOS001: {\n title: 'checkIfOutOfSync-001',\n description: mStr`Occurs if neither sequence has a range, or \\\n if the current loci unique entries overlap the total range of the \\\n incoming sequence, or if the incoming unique entries overlap \\\n the total range of current sequence.`,\n logic: 'neitherSeqHasRange || currentUniqOverlap || incomingUniqOverlap',\n },\n\n OOS002: {\n title: 'checkIfOutOfSync-002',\n description: mStr`Occurs if the minimum value from sequences that are \\\n unique to the current loci is greater than the minimum value from \\\n sequences that are unique to the incoming loci.`,\n logic: 'currentUniqueMin > incomingUniqueMin',\n },\n\n OOS003: {\n title: 'checkIfOutOfSync-003',\n description: mStr`Occurs if none of the comparison rules applied. \\\n It is a catch all.`,\n logic: 'else (catch all)',\n },\n };\n\n const debugObj = debugMap[debugCode];\n\n debugObj.title = `Debug: ${debugObj.title}`;\n debugObj.resolution = resolutionMap[comparison];\n\n return debugObj;\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAEA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAF,sBAAA,CAAAC,OAAA;AAAsD,IAAAE,eAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,iBAAA;AAEtD;AACA;AACA;AACA;AACA;AAJA,IAKqBC,MAAM;EACzB;;EAOA;;EAcA;AACF;AACA;EACE,SAAAA,OAAA,EAAc;IAAA,IAAAC,gBAAA,CAAAC,OAAA,QAAAF,MAAA;IAAA,IAAAG,gBAAA,CAAAD,OAAA;IAAA,IAAAC,gBAAA,CAAAD,OAAA;IACZ,IAAI,CAACE,KAAK,GAAG,IAAIC,cAAW,EAAE;IAC9B;IACA,IAAI,CAACC,MAAM,GAAGN,MAAM,CAACM,MAAM,CAACC,IAAI;IAChC,IAAI,CAACC,aAAa,GAAG,IAAI;IACzB,IAAI,CAACC,WAAW,GAAG,IAAI;EACzB;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EAPE,IAAAC,aAAA,CAAAR,OAAA,EAAAF,MAAA;IAAAW,GAAA;IAAAC,KAAA;IAyVA;AACF;AACA;AACA;AACA;IACE,SAAAC,aAAaC,OAAO,EAAE;MAAA,IAAAC,KAAA;MACpB,IAAIC,OAAO,GAAG,KAAK;MACnB,IAAOT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