cnhis-design-vue 2.1.56 → 2.1.58

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 (574) hide show
  1. package/.prettierrc.js +27 -27
  2. package/CHANGELOG.md +2653 -2551
  3. package/README.md +90 -90
  4. package/commitlint.config.js +1 -1
  5. package/es/affix/index.js +8 -8
  6. package/es/age/index.js +18 -18
  7. package/es/alert/index.js +8 -8
  8. package/es/anchor/index.js +8 -8
  9. package/es/auto-complete/index.js +8 -8
  10. package/es/avatar/index.js +8 -8
  11. package/es/back-top/index.js +8 -8
  12. package/es/badge/index.js +8 -8
  13. package/es/base/index.js +8 -8
  14. package/es/big-table/index.js +308 -308
  15. package/es/breadcrumb/index.js +8 -8
  16. package/es/button/index.js +31 -31
  17. package/es/calendar/index.js +8 -8
  18. package/es/captcha/index.js +7 -7
  19. package/es/card/index.js +8 -8
  20. package/es/carousel/index.js +8 -8
  21. package/es/cascader/index.js +8 -8
  22. package/es/checkbox/index.js +17 -17
  23. package/es/col/index.js +8 -8
  24. package/es/collapse/index.js +8 -8
  25. package/es/color-picker/index.js +5 -5
  26. package/es/comment/index.js +8 -8
  27. package/es/config-provider/index.js +8 -8
  28. package/es/date-picker/index.js +30 -30
  29. package/es/descriptions/index.js +8 -8
  30. package/es/divider/index.js +8 -8
  31. package/es/drag-layout/index.js +5 -5
  32. package/es/drawer/index.js +8 -8
  33. package/es/dropdown/index.js +8 -8
  34. package/es/editor/index.js +1 -1
  35. package/es/ellipsis/index.js +3211 -0
  36. package/es/ellipsis/style.css +1 -0
  37. package/es/empty/index.js +8 -8
  38. package/es/fabric-chart/index.js +45 -45
  39. package/es/form/index.js +8 -8
  40. package/es/form-model/index.js +8 -8
  41. package/es/form-table/index.js +1623 -422
  42. package/es/form-table/style.css +1 -1
  43. package/es/grid/index.js +4 -4
  44. package/es/index/index.js +2599 -1411
  45. package/es/index/style.css +1 -1
  46. package/es/input/index.js +11 -11
  47. package/es/input-number/index.js +8 -8
  48. package/es/keep-cache/index.js +9 -9
  49. package/es/layout/index.js +8 -8
  50. package/es/list/index.js +8 -8
  51. package/es/locale-provider/index.js +8 -8
  52. package/es/map/index.js +13 -13
  53. package/es/mentions/index.js +8 -8
  54. package/es/menu/index.js +8 -8
  55. package/es/message/index.js +8 -8
  56. package/es/multi-chat/index.js +116 -116
  57. package/es/multi-chat-client/index.js +110 -110
  58. package/es/multi-chat-history/index.js +6 -6
  59. package/es/multi-chat-record/index.js +27 -27
  60. package/es/multi-chat-setting/index.js +43 -43
  61. package/es/multi-chat-sip/index.js +1 -1
  62. package/es/notification/index.js +8 -8
  63. package/es/page-header/index.js +8 -8
  64. package/es/pagination/index.js +8 -8
  65. package/es/popconfirm/index.js +8 -8
  66. package/es/popover/index.js +8 -8
  67. package/es/progress/index.js +8 -8
  68. package/es/radio/index.js +17 -17
  69. package/es/rate/index.js +8 -8
  70. package/es/result/index.js +8 -8
  71. package/es/row/index.js +8 -8
  72. package/es/scale-container/index.js +3361 -0
  73. package/es/scale-container/style.css +1 -0
  74. package/es/scale-view/index.js +158 -158
  75. package/es/select/index.js +83 -70
  76. package/es/select/style.css +1 -1
  77. package/es/select-label/index.js +50 -50
  78. package/es/select-person/index.js +20 -20
  79. package/es/shortcut-setter/index.js +10 -10
  80. package/es/skeleton/index.js +8 -8
  81. package/es/slider/index.js +8 -8
  82. package/es/space/index.js +8 -8
  83. package/es/spin/index.js +8 -8
  84. package/es/statistic/index.js +8 -8
  85. package/es/steps/index.js +8 -8
  86. package/es/switch/index.js +8 -8
  87. package/es/table-filter/index.js +251 -238
  88. package/es/table-filter/style.css +1 -1
  89. package/es/tabs/index.js +8 -8
  90. package/es/tag/index.js +9 -9
  91. package/es/time-picker/index.js +8 -8
  92. package/es/timeline/index.js +8 -8
  93. package/es/tooltip/index.js +8 -8
  94. package/es/transfer/index.js +8 -8
  95. package/es/tree/index.js +8 -8
  96. package/es/tree-select/index.js +8 -8
  97. package/es/upload/index.js +8 -8
  98. package/es/utils/clickoutside.js +7 -7
  99. package/es/utils/kty.min-1.0.0.js +5 -5
  100. package/es/utils/time-domain.js +16 -16
  101. package/es/utils/utils-map.js +32 -32
  102. package/es/utils/vexutils.js +27 -27
  103. package/es/verification-code/index.js +2 -2
  104. package/lib/cui.common.js +5011 -1618
  105. package/lib/cui.umd.js +5011 -1618
  106. package/lib/cui.umd.min.js +63 -57
  107. package/package.json +110 -108
  108. package/packages/affix/index.js +12 -12
  109. package/packages/affix/src/Affix.jsx +12 -12
  110. package/packages/age/index.js +27 -27
  111. package/packages/age/src/age/index.vue +139 -139
  112. package/packages/age/src/age-com/index.vue +209 -209
  113. package/packages/alert/index.js +12 -12
  114. package/packages/alert/src/Alert.jsx +11 -11
  115. package/packages/anchor/index.js +18 -18
  116. package/packages/anchor/src/Anchor.jsx +11 -11
  117. package/packages/anchor/src/Link.jsx +11 -11
  118. package/packages/auto-complete/index.js +12 -12
  119. package/packages/auto-complete/src/AutoComplete.jsx +12 -12
  120. package/packages/avatar/index.js +12 -12
  121. package/packages/avatar/src/Avatar.jsx +11 -11
  122. package/packages/back-top/index.js +12 -12
  123. package/packages/back-top/src/BackTop.jsx +11 -11
  124. package/packages/badge/index.js +12 -12
  125. package/packages/badge/src/Badge.jsx +11 -11
  126. package/packages/base/index.js +3 -3
  127. package/packages/big-table/index.js +16 -16
  128. package/packages/big-table/src/BigTable.vue +3144 -3144
  129. package/packages/big-table/src/Fieldset.vue +2067 -2067
  130. package/packages/big-table/src/assets/iconfont/iconfont.css +21 -21
  131. package/packages/big-table/src/assets/style/table-base.less +385 -385
  132. package/packages/big-table/src/assets/style/table-global.less +175 -175
  133. package/packages/big-table/src/components/AutoLayoutButton.vue +279 -279
  134. package/packages/big-table/src/components/NoData.vue +81 -81
  135. package/packages/big-table/src/components/TextOverTooltip.vue +120 -120
  136. package/packages/big-table/src/components/edit-form/EditForm.vue +509 -509
  137. package/packages/big-table/src/components/edit-form/edit-component/config-data/index.js +68 -68
  138. package/packages/big-table/src/components/edit-form/edit-component/edit-date-picker/edit-date-picker.vue +60 -60
  139. package/packages/big-table/src/components/edit-form/edit-component/edit-digital/edit-digital.vue +54 -54
  140. package/packages/big-table/src/components/edit-form/edit-component/edit-input/edit-input.vue +39 -39
  141. package/packages/big-table/src/components/edit-form/edit-component/edit-input-password/edit-input-password.vue +79 -79
  142. package/packages/big-table/src/components/edit-form/edit-component/edit-month-picker/edit-month-picker.vue +37 -37
  143. package/packages/big-table/src/components/edit-form/edit-component/edit-search/edit-search.vue +82 -82
  144. package/packages/big-table/src/components/edit-form/edit-component/edit-search-more/edit-search-more.vue +95 -95
  145. package/packages/big-table/src/components/edit-form/edit-component/edit-select/edit-select.vue +40 -40
  146. package/packages/big-table/src/components/edit-form/edit-component/edit-select-multiple/edit-select-multiple.vue +55 -55
  147. package/packages/big-table/src/components/edit-form/edit-component/edit-switch/edit-switch.vue +43 -43
  148. package/packages/big-table/src/components/edit-form/edit-component/edit-textarea/edit-textarea.vue +41 -41
  149. package/packages/big-table/src/components/edit-form/edit-component/edit-time-picker/edit-time-picker.vue +40 -40
  150. package/packages/big-table/src/components/edit-form/edit-component/mixins/bound-date.js +3 -3
  151. package/packages/big-table/src/components/edit-form/edit-component/mixins/dateType.js +217 -217
  152. package/packages/big-table/src/components/edit-form/edit-component/mixins/item-default.js +639 -639
  153. package/packages/big-table/src/components/edit-form/edit-component/mixins/search.js +1247 -1247
  154. package/packages/big-table/src/components/edit-form/edit-component/register-com.js +26 -26
  155. package/packages/big-table/src/components/edit-form/edit-item/form-event.js +80 -80
  156. package/packages/big-table/src/components/edit-form/edit-item/global-props.js +33 -33
  157. package/packages/big-table/src/components/edit-form/edit-item/index.js +4 -4
  158. package/packages/big-table/src/components/edit-form/edit-item/render-methods.js +28 -28
  159. package/packages/big-table/src/components/edit-form/edit-item/validate-rules.js +463 -463
  160. package/packages/big-table/src/components/edit-form/edit-mixins/form-commom.js +673 -673
  161. package/packages/big-table/src/components/edit-form/edit-mixins/index.js +3 -3
  162. package/packages/big-table/src/components/edit-form/edit-utils/index.js +112 -112
  163. package/packages/big-table/src/components/password-com.vue +58 -58
  164. package/packages/big-table/src/components/player-vod/index.vue +57 -57
  165. package/packages/big-table/src/components/player-vod/player.vue +189 -189
  166. package/packages/big-table/src/components/player-vod/video-list.vue +265 -265
  167. package/packages/big-table/src/components/player-vod/video-modal.vue +126 -126
  168. package/packages/big-table/src/utils/CustomPagination.vue +86 -86
  169. package/packages/big-table/src/utils/batchEditing.js +610 -610
  170. package/packages/big-table/src/utils/bigTableProps.js +103 -103
  171. package/packages/big-table/src/utils/format.js +557 -557
  172. package/packages/big-table/src/utils/nestTable.js +109 -109
  173. package/packages/big-table/src/utils/tableParse.js +234 -234
  174. package/packages/breadcrumb/index.js +21 -21
  175. package/packages/breadcrumb/src/Breadcrumb.jsx +11 -11
  176. package/packages/breadcrumb/src/BreadcrumbItem.jsx +11 -11
  177. package/packages/breadcrumb/src/BreadcrumbSeparator.jsx +11 -11
  178. package/packages/button/index.js +21 -21
  179. package/packages/button/src/Button.jsx +11 -11
  180. package/packages/button/src/ButtonGroup.jsx +11 -11
  181. package/packages/button/src/ButtonPrint/components/IdentityVerification.vue +181 -181
  182. package/packages/button/src/ButtonPrint/index.vue +766 -766
  183. package/packages/button/src/ButtonPrint/mixin/his-print.js +95 -95
  184. package/packages/calendar/index.js +12 -12
  185. package/packages/calendar/src/Calendar.jsx +11 -11
  186. package/packages/captcha/index.js +9 -9
  187. package/packages/captcha/src/Captcha.vue +164 -164
  188. package/packages/captcha/src/Index.vue +47 -47
  189. package/packages/captcha/src/SlideVerify.vue +285 -285
  190. package/packages/card/index.js +21 -21
  191. package/packages/card/src/Card.jsx +12 -12
  192. package/packages/card/src/CardGrid.js +7 -7
  193. package/packages/card/src/CardMeta.js +7 -7
  194. package/packages/carousel/index.js +12 -12
  195. package/packages/carousel/src/Carousel.jsx +12 -12
  196. package/packages/cascader/index.js +12 -12
  197. package/packages/cascader/src/Cascader.jsx +11 -11
  198. package/packages/checkbox/index.js +30 -30
  199. package/packages/checkbox/src/Checkbox.jsx +11 -11
  200. package/packages/checkbox/src/CheckboxImg/index.vue +141 -141
  201. package/packages/checkbox/src/Group.jsx +11 -11
  202. package/packages/col/index.js +13 -13
  203. package/packages/col/src/Col.jsx +11 -11
  204. package/packages/collapse/index.js +18 -18
  205. package/packages/collapse/src/Collapse.jsx +11 -11
  206. package/packages/collapse/src/Panel.jsx +11 -11
  207. package/packages/color-picker/index.js +10 -10
  208. package/packages/color-picker/src/color-picker.vue +191 -191
  209. package/packages/color-picker/src/style.less +109 -109
  210. package/packages/comment/index.js +12 -12
  211. package/packages/comment/src/Comment.jsx +11 -11
  212. package/packages/config-provider/index.js +12 -12
  213. package/packages/config-provider/src/ConfigProvider.jsx +11 -11
  214. package/packages/date-picker/index.js +26 -26
  215. package/packages/date-picker/src/DatePicker.jsx +12 -12
  216. package/packages/date-picker/src/MonthPicker.jsx +11 -11
  217. package/packages/date-picker/src/RangePicker.jsx +11 -11
  218. package/packages/date-picker/src/WeekPicker.jsx +11 -11
  219. package/packages/date-picker/src/utils/index.js +374 -374
  220. package/packages/descriptions/index.js +18 -18
  221. package/packages/descriptions/src/Descriptions.jsx +11 -11
  222. package/packages/descriptions/src/Item.jsx +11 -11
  223. package/packages/divider/index.js +12 -12
  224. package/packages/divider/src/Divider.jsx +11 -11
  225. package/packages/drag-layout/DragFormLeftItem.vue +173 -173
  226. package/packages/drag-layout/DragFormRightItem.vue +284 -284
  227. package/packages/drag-layout/I18n-mixins.js +10 -10
  228. package/packages/drag-layout/drag-layout.vue +778 -778
  229. package/packages/drag-layout/index.js +12 -12
  230. package/packages/drawer/index.js +12 -12
  231. package/packages/drawer/src/Drawer.jsx +11 -11
  232. package/packages/dropdown/index.js +12 -12
  233. package/packages/dropdown/src/Dropdown.jsx +11 -11
  234. package/packages/editor/index.js +9 -9
  235. package/packages/ellipsis/index.js +9 -0
  236. package/packages/ellipsis/src/Ellipsis.vue +65 -0
  237. package/packages/empty/index.js +12 -12
  238. package/packages/empty/src/Empty.jsx +11 -11
  239. package/packages/fabric-chart/index.js +9 -9
  240. package/packages/fabric-chart/src/FabricGrid.vue +66 -66
  241. package/packages/fabric-chart/src/components/DropPopup.vue +90 -90
  242. package/packages/fabric-chart/src/components/MouseRightClick.vue +168 -168
  243. package/packages/fabric-chart/src/components/TimeScaleValue.vue +115 -115
  244. package/packages/fabric-chart/src/const/defaultVaule.js +59 -59
  245. package/packages/fabric-chart/src/fabric-chart/FabricLines.vue +552 -552
  246. package/packages/fabric-chart/src/fabric-chart/FabricPolylines.vue +1126 -1126
  247. package/packages/fabric-chart/src/fabric-chart/FabricScaleValue.vue +134 -134
  248. package/packages/fabric-chart/src/fabric-chart/FabricTextGroup.vue +566 -566
  249. package/packages/fabric-chart/src/mixins/fabricCommon.js +95 -95
  250. package/packages/fabric-chart/src/mixins/fabricObject.js +193 -193
  251. package/packages/fabric-chart/src/mixins/type.js +5 -5
  252. package/packages/form/index.js +16 -16
  253. package/packages/form/src/Form.jsx +11 -11
  254. package/packages/form/src/Item.jsx +11 -11
  255. package/packages/form-model/index.js +14 -14
  256. package/packages/form-model/src/FormModel.jsx +11 -11
  257. package/packages/form-model/src/Item.jsx +11 -11
  258. package/packages/form-table/index.js +16 -10
  259. package/packages/form-table/src/FormTable.vue +1110 -1110
  260. package/packages/form-table/src/components/table-component/config-data/index.js +80 -80
  261. package/packages/form-table/src/components/table-component/global-props.js +22 -22
  262. package/packages/form-table/src/components/table-component/index.js +8 -8
  263. package/packages/form-table/src/components/table-component/mixins/bound-date.js +455 -455
  264. package/packages/form-table/src/components/table-component/mixins/dateType.js +217 -217
  265. package/packages/form-table/src/components/table-component/mixins/item-default.js +257 -257
  266. package/packages/form-table/src/components/table-component/mixins/search.js +1242 -1228
  267. package/packages/form-table/src/components/table-component/register-com.js +30 -30
  268. package/packages/form-table/src/components/table-component/table-age/table-age.vue +175 -175
  269. package/packages/form-table/src/components/table-component/table-date-picker/table-date-picker.vue +87 -87
  270. package/packages/form-table/src/components/table-component/table-digital/table-digital.vue +93 -93
  271. package/packages/form-table/src/components/table-component/table-input/table-input.vue +81 -81
  272. package/packages/form-table/src/components/table-component/table-input-password/table-input-password.vue +126 -126
  273. package/packages/form-table/src/components/table-component/table-month-picker/table-month-picker.vue +55 -55
  274. package/packages/form-table/src/components/table-component/table-search/table-search.vue +174 -128
  275. package/packages/form-table/src/components/table-component/table-search-more/table-search-more.vue +191 -144
  276. package/packages/form-table/src/components/table-component/table-select/table-select.vue +64 -64
  277. package/packages/form-table/src/components/table-component/table-select-multiple/table-select-multiple.vue +81 -81
  278. package/packages/form-table/src/components/table-component/table-textarea/table-textarea.vue +76 -76
  279. package/packages/form-table/src/components/table-component/table-time-picker/table-time-picker.vue +55 -55
  280. package/packages/form-table/src/components/table-component/table-tree-select/table-tree-select.vue +135 -135
  281. package/packages/form-table/src/components/table-component/text-over-tooltip/TextOverTooltip.vue +97 -97
  282. package/packages/form-table/src/components/table-item/form-event.js +81 -81
  283. package/packages/form-table/src/components/table-item/global-props.js +27 -27
  284. package/packages/form-table/src/components/table-item/index.js +4 -4
  285. package/packages/form-table/src/components/table-item/render-methods.js +28 -28
  286. package/packages/form-table/src/components/table-item/validate-rules.js +520 -520
  287. package/packages/form-table/src/components/table-mixins/form-commom.js +98 -98
  288. package/packages/form-table/src/components/table-mixins/index.js +3 -3
  289. package/packages/form-table/src/components/table-utils/index.js +112 -112
  290. package/packages/form-table/src/disabledDetail.less +46 -46
  291. package/packages/grid/index.js +10 -10
  292. package/packages/grid/src/grid.js +28 -28
  293. package/packages/icon/index.js +10 -10
  294. package/packages/icon/src/icon.js +13 -13
  295. package/packages/index.js +313 -307
  296. package/packages/input/index.js +30 -30
  297. package/packages/input/src/Group.jsx +11 -11
  298. package/packages/input/src/Input.jsx +11 -11
  299. package/packages/input/src/Password.jsx +11 -11
  300. package/packages/input/src/Search.jsx +11 -11
  301. package/packages/input/src/TextArea.jsx +11 -11
  302. package/packages/input/src/input-quick/components/quick-item.vue +284 -284
  303. package/packages/input/src/input-quick/components/quick-popover.vue +596 -596
  304. package/packages/input/src/input-quick/index.vue +137 -137
  305. package/packages/input-number/index.js +12 -12
  306. package/packages/input-number/src/InputNumber.jsx +11 -11
  307. package/packages/keep-cache/KeepCache.js +236 -236
  308. package/packages/keep-cache/index.css +2 -2
  309. package/packages/keep-cache/index.js +8 -8
  310. package/packages/layout/index.js +27 -27
  311. package/packages/layout/src/Content.jsx +11 -11
  312. package/packages/layout/src/Footer.jsx +11 -11
  313. package/packages/layout/src/Header.jsx +11 -11
  314. package/packages/layout/src/Layout.jsx +11 -11
  315. package/packages/layout/src/Sider.jsx +11 -11
  316. package/packages/list/index.js +21 -21
  317. package/packages/list/src/Item.jsx +11 -11
  318. package/packages/list/src/ItemMeta.jsx +11 -11
  319. package/packages/list/src/List.jsx +11 -11
  320. package/packages/locale-provider/index.js +12 -12
  321. package/packages/locale-provider/src/LocaleProvider.jsx +11 -11
  322. package/packages/map/index.js +9 -9
  323. package/packages/map/src/Map.vue +484 -484
  324. package/packages/map/src/popup-map.vue +53 -53
  325. package/packages/mentions/index.js +18 -18
  326. package/packages/mentions/src/Mentions.jsx +11 -11
  327. package/packages/mentions/src/Option.jsx +11 -11
  328. package/packages/menu/index.js +27 -27
  329. package/packages/menu/src/Divider.jsx +11 -11
  330. package/packages/menu/src/Item.jsx +11 -11
  331. package/packages/menu/src/ItemGroup.jsx +11 -11
  332. package/packages/menu/src/Menu.jsx +11 -11
  333. package/packages/menu/src/SubMenu.jsx +11 -11
  334. package/packages/message/index.js +8 -8
  335. package/packages/modal/index.js +10 -10
  336. package/packages/modal/src/Modal.js +7 -7
  337. package/packages/multi-chat/chat/addConference.vue +200 -200
  338. package/packages/multi-chat/chat/addMembers.vue +411 -411
  339. package/packages/multi-chat/chat/advancedFilter.vue +372 -372
  340. package/packages/multi-chat/chat/calling.vue +246 -246
  341. package/packages/multi-chat/chat/chatFooter.vue +1596 -1596
  342. package/packages/multi-chat/chat/chatHistory.vue +605 -605
  343. package/packages/multi-chat/chat/chatMain.vue +1486 -1486
  344. package/packages/multi-chat/chat/client/index.vue +149 -149
  345. package/packages/multi-chat/chat/delay.vue +177 -177
  346. package/packages/multi-chat/chat/evaluate.vue +343 -343
  347. package/packages/multi-chat/chat/messageRecord.vue +324 -324
  348. package/packages/multi-chat/chat/mixins/NoData.js +20 -20
  349. package/packages/multi-chat/chat/mixins/base.js +97 -97
  350. package/packages/multi-chat/chat/mixins/uniRTCAPI.js +80 -80
  351. package/packages/multi-chat/chat/mixins/viewerOptions.js +67 -67
  352. package/packages/multi-chat/chat/quickReply.vue +439 -439
  353. package/packages/multi-chat/chat/robot/index.vue +312 -312
  354. package/packages/multi-chat/chat/scrollList.vue +1238 -1238
  355. package/packages/multi-chat/chat/videoVoiceList.vue +348 -348
  356. package/packages/multi-chat/chat/voice.vue +431 -431
  357. package/packages/multi-chat/components/avatar.vue +113 -113
  358. package/packages/multi-chat/components/chat-tabs-header.vue +251 -251
  359. package/packages/multi-chat/components/classify-tabs.vue +185 -185
  360. package/packages/multi-chat/components/empty.vue +24 -24
  361. package/packages/multi-chat/components/modal-refuse-reason.vue +112 -112
  362. package/packages/multi-chat/components/modal-sip.vue +160 -160
  363. package/packages/multi-chat/components/modal-user-transfer.vue +98 -98
  364. package/packages/multi-chat/components/msg-describe.vue +138 -138
  365. package/packages/multi-chat/components/msg-picture.vue +68 -68
  366. package/packages/multi-chat/components/msg-prescription.vue +205 -205
  367. package/packages/multi-chat/components/read-record.vue +133 -133
  368. package/packages/multi-chat/components/read-status.vue +34 -34
  369. package/packages/multi-chat/components/user-status.vue +198 -198
  370. package/packages/multi-chat/index.js +7 -7
  371. package/packages/multi-chat/setting/authority/index.vue +156 -156
  372. package/packages/multi-chat/setting/authority/roleSetting.vue +204 -204
  373. package/packages/multi-chat/setting/baseInfo/index.vue +1316 -1316
  374. package/packages/multi-chat/setting/customerService/batchSelect.vue +403 -403
  375. package/packages/multi-chat/setting/customerService/index.vue +273 -273
  376. package/packages/multi-chat/setting/event/edit/condition.vue +128 -128
  377. package/packages/multi-chat/setting/event/edit/index.vue +437 -437
  378. package/packages/multi-chat/setting/event/edit/notice.vue +129 -129
  379. package/packages/multi-chat/setting/event/edit/strategy.vue +98 -98
  380. package/packages/multi-chat/setting/event/index.vue +249 -249
  381. package/packages/multi-chat/setting/index.vue +269 -269
  382. package/packages/multi-chat/setting/page.vue +14 -14
  383. package/packages/multi-chat/setting/sessionList/index.vue +412 -412
  384. package/packages/multi-chat/setting/sessionList/messageRecord.vue +372 -372
  385. package/packages/multi-chat/setting/userConfig/index.vue +124 -124
  386. package/packages/multi-chat/setting/worktime/index.vue +274 -274
  387. package/packages/multi-chat/store/actions.js +452 -452
  388. package/packages/multi-chat/store/getters.js +371 -371
  389. package/packages/multi-chat/store/helper.js +66 -66
  390. package/packages/multi-chat/store/index.js +50 -50
  391. package/packages/multi-chat/store/mutation.js +296 -296
  392. package/packages/multi-chat/store/state.js +117 -117
  393. package/packages/multi-chat/style/emoji.css +315 -315
  394. package/packages/multi-chat/style/message.mixin.less +38 -38
  395. package/packages/multi-chat/utils/chatSock.js +93 -93
  396. package/packages/multi-chat/utils/compressImage.js +115 -115
  397. package/packages/multi-chat/utils/emoji.json +68 -68
  398. package/packages/multi-chat/utils/index.js +259 -259
  399. package/packages/multi-chat/utils/observer-scroll.js +49 -49
  400. package/packages/multi-chat/utils/panelsetting.js +48 -48
  401. package/packages/multi-chat-client/index.js +7 -7
  402. package/packages/multi-chat-history/index.js +7 -7
  403. package/packages/multi-chat-record/index.js +7 -7
  404. package/packages/multi-chat-setting/index.js +7 -7
  405. package/packages/multi-chat-sip/index.js +6 -6
  406. package/packages/notification/index.js +8 -8
  407. package/packages/page-header/index.js +12 -12
  408. package/packages/page-header/src/PageHeader.jsx +11 -11
  409. package/packages/pagination/index.js +12 -12
  410. package/packages/pagination/src/Pagination.jsx +11 -11
  411. package/packages/popconfirm/index.js +12 -12
  412. package/packages/popconfirm/src/Popconfirm.jsx +11 -11
  413. package/packages/popover/index.js +12 -12
  414. package/packages/popover/src/Popover.jsx +11 -11
  415. package/packages/progress/index.js +12 -12
  416. package/packages/progress/src/Progress.jsx +11 -11
  417. package/packages/radio/index.js +33 -33
  418. package/packages/radio/src/Group.jsx +11 -11
  419. package/packages/radio/src/Radio.jsx +11 -11
  420. package/packages/radio/src/RadioButton.jsx +11 -11
  421. package/packages/radio/src/RadioImg/index.vue +124 -124
  422. package/packages/rate/index.js +12 -12
  423. package/packages/rate/src/Rate.jsx +11 -11
  424. package/packages/result/index.js +12 -12
  425. package/packages/result/src/Result.jsx +11 -11
  426. package/packages/row/index.js +12 -12
  427. package/packages/row/src/Row.jsx +11 -11
  428. package/packages/scale-container/index.js +9 -0
  429. package/packages/scale-container/src/ScaleContainer.vue +197 -0
  430. package/packages/scale-container/src/scale.png +0 -0
  431. package/packages/scale-view/NoData.vue +81 -81
  432. package/packages/scale-view/answerParse.vue +133 -133
  433. package/packages/scale-view/customList.vue +801 -801
  434. package/packages/scale-view/data.js +80 -80
  435. package/packages/scale-view/evaluateCountdown.vue +155 -155
  436. package/packages/scale-view/evaluatePage.vue +202 -202
  437. package/packages/scale-view/formitem/data.js +3991 -3991
  438. package/packages/scale-view/formitem/index.js +6 -6
  439. package/packages/scale-view/formitem/r-address.vue +238 -238
  440. package/packages/scale-view/formitem/r-choice.vue +726 -726
  441. package/packages/scale-view/formitem/r-input.vue +92 -92
  442. package/packages/scale-view/formitem/r-prompt.vue +52 -52
  443. package/packages/scale-view/formitem/r-time.vue +285 -285
  444. package/packages/scale-view/formitem/r-upload-custom-list.vue +242 -242
  445. package/packages/scale-view/formitem/r-upload.vue +287 -287
  446. package/packages/scale-view/formitem/text-over-tooltip/TextOverTooltip.vue +98 -98
  447. package/packages/scale-view/index.js +17 -17
  448. package/packages/scale-view/mixin/NoData.js +38 -38
  449. package/packages/scale-view/mixin/evaluate.js +146 -146
  450. package/packages/scale-view/mixin/index.js +337 -337
  451. package/packages/scale-view/mixin/judgeTypes.js +267 -267
  452. package/packages/scale-view/scaleView.vue +2010 -2010
  453. package/packages/select/index.js +27 -27
  454. package/packages/select/src/CustomSelect/index.vue +130 -130
  455. package/packages/select/src/OptGroup.jsx +11 -11
  456. package/packages/select/src/Option.jsx +11 -11
  457. package/packages/select/src/Select/Select.vue +231 -231
  458. package/packages/select/src/Select/index.js +12 -12
  459. package/packages/select/src/TableSelect/index.vue +514 -514
  460. package/packages/select-label/index.js +14 -14
  461. package/packages/select-label/label-classify.vue +129 -129
  462. package/packages/select-label/labelFormContent.vue +787 -787
  463. package/packages/select-label/select-label.vue +581 -581
  464. package/packages/select-person/index.js +10 -10
  465. package/packages/select-person/search-tree.vue +373 -373
  466. package/packages/select-person/select-person.vue +1696 -1696
  467. package/packages/shortcut-setter/index.js +12 -12
  468. package/packages/shortcut-setter/src/ShortcutSetter.vue +55 -55
  469. package/packages/shortcut-setter/src/ShortcutSetterItem.vue +84 -84
  470. package/packages/shortcut-setter/src/utils/index.js +63 -63
  471. package/packages/skeleton/index.js +12 -12
  472. package/packages/skeleton/src/Skeleton.jsx +11 -11
  473. package/packages/slider/index.js +12 -12
  474. package/packages/slider/src/Slider.jsx +11 -11
  475. package/packages/space/index.js +12 -12
  476. package/packages/space/src/Space.jsx +11 -11
  477. package/packages/spin/index.js +12 -12
  478. package/packages/spin/src/Spin.jsx +11 -11
  479. package/packages/statistic/index.js +18 -18
  480. package/packages/statistic/src/Countdown.jsx +11 -11
  481. package/packages/statistic/src/Statistic.jsx +11 -11
  482. package/packages/steps/index.js +18 -18
  483. package/packages/steps/src/Step.jsx +11 -11
  484. package/packages/steps/src/Steps.jsx +11 -11
  485. package/packages/switch/index.js +12 -12
  486. package/packages/switch/src/Switch.jsx +11 -11
  487. package/packages/table-filter/index.js +27 -27
  488. package/packages/table-filter/src/base-search-com/BaseSearch.vue +2572 -2572
  489. package/packages/table-filter/src/classification/Classification-com.vue +1756 -1756
  490. package/packages/table-filter/src/classification/search-class-name.vue +266 -266
  491. package/packages/table-filter/src/classification/search-professional-model.vue +680 -680
  492. package/packages/table-filter/src/components/TextOverTooltip.vue +107 -107
  493. package/packages/table-filter/src/components/age-com/index.vue +205 -205
  494. package/packages/table-filter/src/components/button-group/ButtonGroup.vue +162 -162
  495. package/packages/table-filter/src/components/button-icon/button-icon.js +33 -33
  496. package/packages/table-filter/src/components/button-icon/getBtnIcon.js +34 -34
  497. package/packages/table-filter/src/components/c-tree-select/tree-select.vue +336 -336
  498. package/packages/table-filter/src/components/drop-button/drop-button.vue +224 -224
  499. package/packages/table-filter/src/components/drop-button/head-btn-icon.js +33 -33
  500. package/packages/table-filter/src/components/drop-view/drop-view.vue +89 -89
  501. package/packages/table-filter/src/components/multi-select/multi-select.vue +227 -227
  502. package/packages/table-filter/src/components/out-quick-search/out-quick-search.vue +340 -340
  503. package/packages/table-filter/src/components/range-age/index.vue +172 -172
  504. package/packages/table-filter/src/components/search-condition/SearchCondition.vue +1897 -1897
  505. package/packages/table-filter/src/components/search-condition/fieldTypeList.js +169 -169
  506. package/packages/table-filter/src/components/search-filter/SearchFilter.vue +278 -278
  507. package/packages/table-filter/src/components/search-modal/set-classification.vue +310 -310
  508. package/packages/table-filter/src/components/table-modal/TableModal.vue +463 -463
  509. package/packages/table-filter/src/const/dataOptions.js +43 -43
  510. package/packages/table-filter/src/const/index.js +1 -1
  511. package/packages/table-filter/src/index.vue +584 -584
  512. package/packages/table-filter/src/mixins/mixins.js +694 -694
  513. package/packages/table-filter/src/mixins/tableSearchCon.js +128 -128
  514. package/packages/table-filter/src/mixins/wordBookutils.js +102 -102
  515. package/packages/table-filter/src/quick-search/QuickSearch.vue +2125 -2125
  516. package/packages/tabs/index.js +18 -18
  517. package/packages/tabs/src/TabPane.jsx +11 -11
  518. package/packages/tabs/src/Tabs.jsx +11 -11
  519. package/packages/tag/index.js +21 -21
  520. package/packages/tag/src/CheckableTag.jsx +11 -11
  521. package/packages/tag/src/Tag.jsx +11 -11
  522. package/packages/tag/src/TagGroup.vue +621 -621
  523. package/packages/time-picker/index.js +12 -12
  524. package/packages/time-picker/src/TimePicker.jsx +11 -11
  525. package/packages/timeline/index.js +14 -14
  526. package/packages/timeline/src/Item.jsx +11 -11
  527. package/packages/timeline/src/Timeline.jsx +11 -11
  528. package/packages/tooltip/index.js +12 -12
  529. package/packages/tooltip/src/Tooltip.jsx +11 -11
  530. package/packages/transfer/index.js +12 -12
  531. package/packages/transfer/src/Transfer.jsx +11 -11
  532. package/packages/tree/index.js +18 -18
  533. package/packages/tree/src/Tree.jsx +11 -11
  534. package/packages/tree/src/TreeNode.jsx +11 -11
  535. package/packages/tree-select/index.js +18 -18
  536. package/packages/tree-select/src/TreeNode.jsx +11 -11
  537. package/packages/tree-select/src/TreeSelect.jsx +11 -11
  538. package/packages/upload/chunk-upload/chunk-upload-new.vue +1001 -1001
  539. package/packages/upload/chunk-upload/vod-chunk-upload.vue +749 -749
  540. package/packages/upload/chunk-upload/vod-upload-modal.vue +100 -100
  541. package/packages/upload/index.js +12 -12
  542. package/packages/upload/src/Upload.jsx +11 -11
  543. package/packages/verification-code/SlideVerify.vue +306 -306
  544. package/packages/verification-code/index.js +17 -17
  545. package/packages/verification-code/verification-code.vue +147 -147
  546. package/src/assets/img/nodata.png +0 -0
  547. package/src/component/player-vod/index.vue +57 -57
  548. package/src/component/player-vod/player.vue +188 -188
  549. package/src/component/player-vod/video-list.vue +262 -262
  550. package/src/component/player-vod/video-modal.vue +128 -128
  551. package/src/component/select-options/index.vue +430 -0
  552. package/src/component/select-pages/index.vue +95 -74
  553. package/src/component/svg/index.vue +59 -59
  554. package/src/core/create.js +6 -6
  555. package/src/core/event.js +23 -23
  556. package/src/core/table-methods.js +444 -444
  557. package/src/directive/flexibleResize.js +151 -151
  558. package/src/directive/preventReClick.js +12 -12
  559. package/src/directive/scroll.js +230 -230
  560. package/src/global/variable.js +2 -2
  561. package/src/style/normalize.css +424 -424
  562. package/src/style/style.less +49 -49
  563. package/src/utils/UniRTCv2.js +626 -626
  564. package/src/utils/chatFetch.js +61 -61
  565. package/src/utils/clickoutside.js +75 -75
  566. package/src/utils/crypto.js +25 -25
  567. package/src/utils/index.js +81 -81
  568. package/src/utils/kty-sdk.js +582 -582
  569. package/src/utils/kty.min-1.0.0.js +14378 -14378
  570. package/src/utils/sip-device.js +79 -79
  571. package/src/utils/time-domain.js +193 -193
  572. package/src/utils/trtc.js +1 -1
  573. package/src/utils/utils-map.js +484 -484
  574. package/src/utils/vexutils.js +836 -836
@@ -1,6 +1,6 @@
1
- "use strict";!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n){("object"==typeof exports?exports:e)[r]=n[r];}}}(window,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports;}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r});},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0});},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e){n.d(r,i,function(t){return e[t];}.bind(null,i));}return r;},n.n=function(e){var t=e&&e.__esModule?function(){return e.default;}:function(){return e;};return n.d(t,"a",t),t;},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t);},n.p="",n(n.s=55);}([function(e,t,n){e.exports=n(56);},function(e,t,n){"use strict";var r=function(){var e=function e(){},t={DEBUG:0,TRACE:1,INFO:2,WARNING:3,ERROR:4,NONE:5};t.log=window.console.log.bind(window.console);var n=function n(e){return"function"==typeof window.console[e]?window.console[e].bind(window.console):window.console.log.bind(window.console);},r=function r(_r2){t.debug=_r2<=0?n("log"):e,t.trace=_r2<=1?n("trace"):e,t.info=_r2<=2?n("info"):e,t.warning=_r2<=3?n("warn"):e,t.error=_r2<=4?n("error"):e;};return r(0),t.setLogLevel=r,t;}();t.a=r;},function(e,t){function n(e,t,n,r,i,o,a){try{var c=e[o](a),s=c.value;}catch(e){return void n(e);}c.done?t(s):Promise.resolve(s).then(r,i);}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise(function(i,o){var a=e.apply(t,r);function c(e){n(a,i,o,c,s,"next",e);}function s(e){n(a,i,o,c,s,"throw",e);}c(void 0);});};},e.exports.default=e.exports,e.exports.__esModule=!0;},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n){Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}}return e;},e.exports.default=e.exports,e.exports.__esModule=!0,n.apply(this,arguments);}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0;},function(e,t,n){"use strict";n.d(t,"b",function(){return o;}),n.d(t,"e",function(){return a;}),n.d(t,"c",function(){return c;}),n.d(t,"a",function(){return s;}),n.d(t,"d",function(){return u;});var r=n(8),i=n.n(r),o=function o(){var e={dispatcher:{}};e.dispatcher.eventListeners={},this.addEventListener=function(t,n){void 0===e.dispatcher.eventListeners[t]&&(e.dispatcher.eventListeners[t]=[]),e.dispatcher.eventListeners[t].push(n);},this.removeEventListener=function(t,n){if(e.dispatcher.eventListeners[t]){var r=e.dispatcher.eventListeners[t].indexOf(n);-1!==r&&e.dispatcher.eventListeners[t].splice(r,1);}},this.clearEventListener=function(t){e.dispatcher.eventListeners[t]=[];},this.dispatchEvent=function(t){e.dispatcher.eventListeners[t.type]&&e.dispatcher.eventListeners[t.type].map(function(e){e(t);});};},a=function a(e){this.type=e;},c=function(e){function t(t,n){var r;return(r=e.call(this,t)||this).origin=n.origin,r.message=n.message,r.to=n.to,r.mSeq=n.mSeq,r;}return i()(t,e),t;}(a),s=function(e){function t(t,n){var r;return(r=e.call(this,t)||this).error=n.error,r;}return i()(t,e),t;}(a),u=function(e){function t(t,n){var r;return(r=e.call(this,t)||this).kind=n.kind,r;}return i()(t,e),t;}(a);},function(e,t,n){(function(n){var r;!function(n,i){e.exports=function(n){"use strict";var i,o=(n=n||{}).Base64,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=function(e){for(var t={},n=0,r=e.length;n<r;n++){t[e.charAt(n)]=n;}return t;}(a),s=String.fromCharCode,u=function u(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?s(192|t>>>6)+s(128|63&t):s(224|t>>>12&15)+s(128|t>>>6&63)+s(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return s(240|t>>>18&7)+s(128|t>>>12&63)+s(128|t>>>6&63)+s(128|63&t);},d=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,f=function f(e){return e.replace(d,u);},l=function l(e){var t=[0,2,1][e.length%3],n=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[a.charAt(n>>>18),a.charAt(n>>>12&63),t>=2?"=":a.charAt(n>>>6&63),t>=1?"=":a.charAt(63&n)].join("");},p=n.btoa&&"function"==typeof n.btoa?function(e){return n.btoa(e);}:function(e){if(e.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return e.replace(/[\s\S]{1,3}/g,l);},m=function m(e){return p(f(String(e)));},h=function h(e){return e.replace(/[+\/]/g,function(e){return"+"==e?"-":"_";}).replace(/=/g,"");},v=function v(e,t){return t?h(m(e)):m(e);};n.Uint8Array&&(i=function i(e,t){for(var n="",r=0,i=e.length;r<i;r+=3){var o=e[r],c=e[r+1],s=e[r+2],u=o<<16|c<<8|s;n+=a.charAt(u>>>18)+a.charAt(u>>>12&63)+(void 0!==c?a.charAt(u>>>6&63):"=")+(void 0!==s?a.charAt(63&u):"=");}return t?h(n):n;});var g,b=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,y=function y(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return s(55296+(t>>>10))+s(56320+(1023&t));case 3:return s((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return s((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1));}},S=function S(e){return e.replace(b,y);},w=function w(e){var t=e.length,n=t%4,r=(t>0?c[e.charAt(0)]<<18:0)|(t>1?c[e.charAt(1)]<<12:0)|(t>2?c[e.charAt(2)]<<6:0)|(t>3?c[e.charAt(3)]:0),i=[s(r>>>16),s(r>>>8&255),s(255&r)];return i.length-=[0,0,2,1][n],i.join("");},_=n.atob&&"function"==typeof n.atob?function(e){return n.atob(e);}:function(e){return e.replace(/\S{1,4}/g,w);},I=function I(e){return _(String(e).replace(/[^A-Za-z0-9\+\/]/g,""));},x=function x(e){return String(e).replace(/[-_]/g,function(e){return"-"==e?"+":"/";}).replace(/[^A-Za-z0-9\+\/]/g,"");},P=function P(e){return function(e){return S(_(e));}(x(e));};n.Uint8Array&&(g=function g(e){return Uint8Array.from(I(x(e)),function(e){return e.charCodeAt(0);});});var k=function k(){var e=n.Base64;return n.Base64=o,e;};if(n.Base64={VERSION:"2.6.4",atob:I,btoa:p,fromBase64:P,toBase64:v,utob:f,encode:v,encodeURI:function encodeURI(e){return v(e,!0);},btou:S,decode:P,noConflict:k,fromUint8Array:i,toUint8Array:g},"function"==typeof Object.defineProperty){var E=function E(e){return{value:e,enumerable:!1,writable:!0,configurable:!0};};n.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",E(function(){return P(this);})),Object.defineProperty(String.prototype,"toBase64",E(function(e){return v(this,e);})),Object.defineProperty(String.prototype,"toBase64URI",E(function(){return v(this,!0);}));};}n.Meteor&&(Base64=n.Base64);e.exports?e.exports.Base64=n.Base64:void 0===(r=function(){return n.Base64;}.apply(t,[]))||(e.exports=r);return{Base64:n.Base64};}(n);}("undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n?n:this);}).call(this,n(39));},function(e,t,n){"use strict";n.r(t);n(41);var r=function r(){this.allPars=[],this._activeAudio="",this.conference=null,this.gridCameraListResolutionHeight="",this.hasSubscribedStreamIds=[],this.activeStreamId="",this.joinType="",this.cachedCommands=[],this.commandLocked=!1,this.showCameraList=null,this.seqTimer=null;},i=null;t.default=function(){return i||(i=new r()),i;};},function(e,t,n){"use strict";n.r(t);var r,i=n(34),o=Object({RUN_ENV:"meet"}).PLATFORM_ENV;t.default=function(e){if(r)return r;var t="electron"===o||"sdk"===e.params.from,n=i.publicPath;"sdk"===e.params.from&&(n=e.host);var a=t?"https://"+n+"/conf":"/conf",c=t?"https://"+n+"/rest":"/rest";return r={startRecordings:function startRecordings(e){return a+"/rooms/"+e+"/recordings";},updateStream:function updateStream(e,t){return a+"/rooms/"+e+"/streams/"+t;},createRome:function createRome(){return a+"/createRoom";},createToken:function createToken(){return a+"/tokens";},getStreamsList:function getStreamsList(e){return a+"/rooms/"+e+"/streams";},delStream:function delStream(e,t){return a+"/rooms/"+e+"/streams/"+t;},getParticipantsList:function getParticipantsList(e){return a+"/rooms/"+e+"/participants";},delParticipant:function delParticipant(e,t){return a+"/rooms/"+e+"/participants/"+t;},delRoom:function delRoom(e){return a+"/rooms/"+e;},allServices:function allServices(){return a+"/services";},updateAllStreams:function updateAllStreams(e,t){return a+"/rooms/"+e+"/streams/except/"+t;},getStreamInfo:function getStreamInfo(e,t){return a+"/rooms/"+e+"/streams/"+t;},getRoom:function getRoom(e){return a+"/rooms/"+e;},streamOut:function streamOut(e){return a+"/rooms/"+e+"/streaming-outs";},deleteStreamOut:function deleteStreamOut(e,t){return a+"/rooms/"+e+"/streaming-outs/"+t;},translateWsStart:function translateWsStart(){return c+"/conference/translate/start";},translateWsStop:function translateWsStop(){return c+"/conference/translate/stop";},translateWs:function translateWs(e){return"wss://"+n+"/translate/?roomId="+e;},login:function login(){return c+"/login";},conferenceCreate:function conferenceCreate(){return c+"/api/conference/create";},conferenceJoin:function conferenceJoin(){return c+"/conference/join";},conferenceLeave:function conferenceLeave(e){return c+"/conference/leave?roomId="+e;},conferenceEnd:function conferenceEnd(){return c+"/conference/end";},orgContacts:function orgContacts(e){return c+"/contact/v1/all/user/"+e;},groupContacts:function groupContacts(e){return c+"/contact/v1/all/group/user/"+e;},selfContacts:function selfContacts(e){return c+"/contact/v1/contact/"+e;},conferenceInvite:function conferenceInvite(){return c+"/conference/invite";},conferenceParticipant:function conferenceParticipant(e){return c+"/conference/participant/list/"+e;},callbackPstn:function callbackPstn(){return c+"/conference/callback";},userInfo:function userInfo(){return c+"/api/conference/user/info";},sipTerminalList:function sipTerminalList(e){return c+"/conference/sip/terminal/list/"+e;},inviteSip:function inviteSip(){return c+"/conference/invite/sip";},conferenceLock:function conferenceLock(){return c+"/conference/lock";},conferenceUnlock:function conferenceUnlock(){return c+"/conference/unlock";},conferenceRecord:function conferenceRecord(){return c+"/conference/record";},deleteErecord:function deleteErecord(e,t){return c+"/conference/record/"+e+"/"+t;},enterMute:function enterMute(){return c+"/conference/enter/mute";},assignHost:function assignHost(){return c+"/conference/allocate/host";},parInfo:function parInfo(){return c+"/conference/participant/info";},allowUnmute:function allowUnmute(){return c+"/conference/allow/unmute";},startShare:function startShare(e){return c+"/conference/share/"+e;},stopShare:function stopShare(e){return c+"/conference/share/"+e;},getSdkInfo:function getSdkInfo(){return c+"/sdk/login";},focusVideo:function focusVideo(){return c+"/conference/focus/video";},joinStatistics:function joinStatistics(){return c+"/conference/join/statistics";},conferenceInfo:function conferenceInfo(e){return c+"/conference/info/"+e;},updateControl:function updateControl(e){return c+"/conference/share/"+e;},handsUp:function handsUp(e){return c+"/conference/hands/up/"+e;},handsDown:function handsDown(e){return c+"/conference/hands/down/"+e;},manyHandsDown:function manyHandsDown(){return c+"/conference/hands/down";},rename:function rename(){return c+"/conference/participant/name";},hideNonVideo:function hideNonVideo(){return c+"/api/contact/v1/hideNonVideo";},participantReconnect:function participantReconnect(){return c+"/conference/participant/reconnect";},toggleWaitingRoom:function toggleWaitingRoom(){return c+"/conference/ongoing/waiting";},moveToWaitingRoom:function moveToWaitingRoom(){return c+"/conference/ongoing/move/waiting";},moveToMeetingRoom:function moveToMeetingRoom(){return c+"/conference/ongoing/move/meeting";},removeFromWaitingRoom:function removeFromWaitingRoom(){return c+"/conference/ongoing/remove/waiting";},conferenceOngoingJoin:function conferenceOngoingJoin(){return c+"/api/conference/ongoing/join";},allowParticipantUpload:function allowParticipantUpload(){return c+"/conference/ongoing/participant/upload";},deleteMeetingFiles:function deleteMeetingFiles(e,t){return c+"/conference/ongoing/file/"+e+"/"+t;},allowParticipantShare:function allowParticipantShare(){return c+"/conference/ongoing/participant/share";},allowParticipantRecord:function allowParticipantRecord(){return c+"/conference/ongoing/participant/local/record";},startLocalRecord:function startLocalRecord(e,t){return c+"/conference/ongoing/local/record/"+e+"/"+t;},stopLocalRecord:function stopLocalRecord(e,t){return c+"/conference/ongoing/local/record/"+e+"/"+t;}};};},function(e,t,n){var r=n(36);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t);},e.exports.default=e.exports,e.exports.__esModule=!0;},function(e,t,n){"use strict";n.d(t,"e",function(){return d;}),n.d(t,"c",function(){return f;}),n.d(t,"a",function(){return l;}),n.d(t,"b",function(){return p;}),n.d(t,"d",function(){return m;});var r=n(12),i=n.n(r),o=n(8),a=n.n(o),c=(n(1),n(4)),s=n(10);function u(e,t){return t.some(function(t){return t===e;});}var d=function d(e,t){if(!u(e,[void 0,"mic","screen-cast","file","mixed"]))throw new TypeError("Incorrect value for audioSourceInfo");if(!u(t,[void 0,"camera","screen-cast","file","encoded-file","raw-file","mixed"]))throw new TypeError("Incorrect value for videoSourceInfo");this.audio=e,this.video=t;},f=function(e){function t(t,n,r){var o;if(o=e.call(this)||this,t&&!(t instanceof MediaStream)||"object"!=typeof n)throw new TypeError("Invalid stream or sourceInfo.");if(t&&(t.getAudioTracks().length>0&&!n.audio||t.getVideoTracks().length>0&&!n.video))throw new TypeError("Missing audio source info or video source info.");return Object.defineProperty(i()(o),"mediaStream",{configurable:!1,writable:!0,value:t}),Object.defineProperty(i()(o),"source",{configurable:!1,writable:!1,value:n}),Object.defineProperty(i()(o),"attributes",{configurable:!0,writable:!0,value:r}),o;}return a()(t,e),t;}(c.b),l=function(e){function t(t,n,r){var o;if(!(t instanceof MediaStream))throw new TypeError("Invalid stream.");return o=e.call(this,t,n,r)||this,Object.defineProperty(i()(o),"id",{configurable:!1,writable:!1,value:s.a()}),o;}return a()(t,e),t;}(f),p=function(e){function t(t,n,r,o,a){var c;return c=e.call(this,r,o,a)||this,Object.defineProperty(i()(c),"id",{configurable:!1,writable:!1,value:t||s.a()}),Object.defineProperty(i()(c),"origin",{configurable:!1,writable:!1,value:n}),c.settings=void 0,c.capabilities=void 0,c;}return a()(t,e),t;}(f),m=function(e){function t(t,n){var r;return(r=e.call(this,t)||this).stream=n.stream,r;}return a()(t,e),t;}(c.e);},function(e,t,n){"use strict";n.d(t,"d",function(){return r;}),n.d(t,"b",function(){return i;}),n.d(t,"e",function(){return o;}),n.d(t,"c",function(){return a;}),n.d(t,"a",function(){return c;}),n.d(t,"f",function(){return s;});function r(){return null!==window.navigator.userAgent.match("Firefox");}function i(){return null!==window.navigator.userAgent.match("Chrome");}function o(){return /^((?!chrome|android).)*safari/i.test(window.navigator.userAgent);}function a(){return null!==window.navigator.userAgent.match(/Edge\/(\d+).(\d+)$/);}function c(){return"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16);});}function s(){var e=Object.create({});e.sdk={version:"4.2.1",type:"JavaScript"};var t=navigator.userAgent,n=/Chrome\/([0-9\.]+)/.exec(t);n?e.runtime={name:"Chrome",version:n[1]}:(n=/Firefox\/([0-9\.]+)/.exec(t))?e.runtime={name:"Firefox",version:n[1]}:(n=/Edge\/([0-9\.]+)/.exec(t))?e.runtime={name:"Edge",version:n[1]}:o()?(n=/Version\/([0-9\.]+) Safari/.exec(t),e.runtime={name:"Safari"},e.runtime.version=n?n[1]:"Unknown"):e.runtime={name:"Unknown",version:"Unknown"};return(n=/Windows NT ([0-9\.]+)/.exec(t))?e.os={name:"Windows NT",version:n[1]}:(n=/Intel Mac OS X ([0-9_\.]+)/.exec(t))?e.os={name:"Mac OS X",version:n[1].replace(/_/g,".")}:(n=/iPhone OS ([0-9_\.]+)/.exec(t))?e.os={name:"iPhone OS",version:n[1].replace(/_/g,".")}:(n=/X11; Linux/.exec(t))?e.os={name:"Linux",version:"Unknown"}:(n=/Android( ([0-9\.]+))?/.exec(t))?e.os={name:"Android",version:n[1]||"Unknown"}:(n=/CrOS/.exec(t))?e.os={name:"Chrome OS",version:"Unknown"}:e.os={name:"Unknown",version:"Unknown"},e.capabilities={continualIceGathering:!1,unifiedPlan:!0,streamRemovable:"Firefox"!==e.runtime.name},e.compatibility=1,e;}},function(e,t,n){"use strict";n.d(t,"a",function(){return r;}),n.d(t,"d",function(){return i;}),n.d(t,"c",function(){return o;}),n.d(t,"b",function(){return a;});var r={MIC:"mic",SCREENCAST:"screen-cast",FILE:"file",MIXED:"mixed"},i={CAMERA:"camera",SCREENCAST:"screen-cast",FILE:"file",MIXED:"mixed"},o={AUDIO:"audio",VIDEO:"video",AUDIO_AND_VIDEO:"av"},a=function a(e,t){this.width=e,this.height=t;};},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;},e.exports.default=e.exports,e.exports.__esModule=!0;},function(e,t,n){"use strict";n.d(t,"a",function(){return xe;}),n.d(t,"b",function(){return Pe;});var r={};n.r(r),n.d(r,"AudioTrackConstraints",function(){return s;}),n.d(r,"VideoTrackConstraints",function(){return u;}),n.d(r,"StreamConstraints",function(){return d;}),n.d(r,"MediaStreamFactory",function(){return l;}),n.d(r,"StreamSourceInfo",function(){return p.e;}),n.d(r,"Stream",function(){return p.c;}),n.d(r,"LocalStream",function(){return p.a;}),n.d(r,"RemoteStream",function(){return p.b;}),n.d(r,"StreamEvent",function(){return p.d;}),n.d(r,"AudioSourceInfo",function(){return c.a;}),n.d(r,"VideoSourceInfo",function(){return c.d;}),n.d(r,"TrackKind",function(){return c.c;}),n.d(r,"Resolution",function(){return c.b;});var i={};n.r(i),n.d(i,"P2PClient",function(){return te;}),n.d(i,"P2PError",function(){return _;});var o={};n.r(o),n.d(o,"ConferenceClient",function(){return Ie;}),n.d(o,"SioSignaling",function(){return oe;});var a=n(10),c=n(11),s=function s(e){if(!Object.values(c.a).some(function(t){return t===e;}))throw new TypeError("Invalid source.");this.source=e,this.deviceId=void 0;},u=function u(e){if(!Object.values(c.d).some(function(t){return t===e;}))throw new TypeError("Invalid source.");this.source=e,this.deviceId=void 0,this.resolution=void 0,this.frameRate=void 0;},d=function d(e,t){void 0===e&&(e=!1),void 0===t&&(t=!1),this.audio=e,this.video=t;};function f(e){return"object"==typeof e.video&&e.video.source===c.d.SCREENCAST;}var l=function(){function e(){}return e.createMediaStream=function(e){if("object"!=typeof e||!e.audio&&!e.video)return Promise.reject(new TypeError("Invalid constrains"));if(!f(e)&&"object"==typeof e.audio&&e.audio.source===c.a.SCREENCAST)return Promise.reject(new TypeError("Cannot share screen without video."));if(f(e)&&"object"==typeof e.audio&&e.audio.source!==c.a.SCREENCAST)return Promise.reject(new TypeError("Cannot capture video from screen cast while capture audio from other source."));if(!e.audio&&!e.video)return Promise.reject(new TypeError("At least one of audio and video must be requested."));var t=Object.create({});return"object"==typeof e.audio&&e.audio.source===c.a.MIC?(t.audio=Object.create({}),a.c()?t.audio.deviceId=e.audio.deviceId:t.audio.deviceId={exact:e.audio.deviceId}):e.audio.source===c.a.SCREENCAST?t.audio=!0:t.audio=e.audio,"object"==typeof e.video?(t.video=Object.create({}),"number"==typeof e.video.frameRate&&(t.video.frameRate=e.video.frameRate),e.video.resolution&&e.video.resolution.width&&e.video.resolution.height&&(e.video.source===c.d.SCREENCAST?(t.video.width=e.video.resolution.width,t.video.height=e.video.resolution.height):(t.video.width=Object.create({}),t.video.width.exact=e.video.resolution.width,t.video.height=Object.create({}),t.video.height.exact=e.video.resolution.height)),"string"==typeof e.video.deviceId&&(t.video.deviceId={exact:e.video.deviceId}),a.d()&&e.video.source===c.d.SCREENCAST&&(t.video.mediaSource="screen")):t.video=e.video,f(e)?navigator.mediaDevices.getDisplayMedia(t):navigator.mediaDevices.getUserMedia(t);},e;}(),p=n(9),m=n(1),h=n(4),v=n(8),g=n.n(v),b=n(21),y=n.n(b),S={P2P_CONN_SERVER_UNKNOWN:{code:2100,message:"Server unknown error."},P2P_CONN_SERVER_UNAVAILABLE:{code:2101,message:"Server is unavaliable."},P2P_CONN_SERVER_BUSY:{code:2102,message:"Server is too busy."},P2P_CONN_SERVER_NOT_SUPPORTED:{code:2103,message:"Method has not been supported by server."},P2P_CONN_CLIENT_UNKNOWN:{code:2110,message:"Client unknown error."},P2P_CONN_CLIENT_NOT_INITIALIZED:{code:2111,message:"Connection is not initialized."},P2P_CONN_AUTH_UNKNOWN:{code:2120,message:"Authentication unknown error."},P2P_CONN_AUTH_FAILED:{code:2121,message:"Wrong username or token."},P2P_MESSAGING_TARGET_UNREACHABLE:{code:2201,message:"Remote user cannot be reached."},P2P_CLIENT_DENIED:{code:2202,message:"User is denied."},P2P_CLIENT_UNKNOWN:{code:2400,message:"Unknown errors."},P2P_CLIENT_UNSUPPORTED_METHOD:{code:2401,message:"This method is unsupported in current browser."},P2P_CLIENT_ILLEGAL_ARGUMENT:{code:2402,message:"Illegal argument."},P2P_CLIENT_INVALID_STATE:{code:2403,message:"Invalid peer state."},P2P_CLIENT_NOT_ALLOWED:{code:2404,message:"Remote user is not allowed."},P2P_WEBRTC_UNKNOWN:{code:2500,message:"WebRTC error."},P2P_WEBRTC_SDP:{code:2502,message:"SDP error."}};function w(e){return{2100:S.P2P_CONN_SERVER_UNKNOWN,2101:S.P2P_CONN_SERVER_UNAVAILABLE,2102:S.P2P_CONN_SERVER_BUSY,2103:S.P2P_CONN_SERVER_NOT_SUPPORTED,2110:S.P2P_CONN_CLIENT_UNKNOWN,2111:S.P2P_CONN_CLIENT_NOT_INITIALIZED,2120:S.P2P_CONN_AUTH_UNKNOWN,2121:S.P2P_CONN_AUTH_FAILED,2201:S.P2P_MESSAGING_TARGET_UNREACHABLE,2400:S.P2P_CLIENT_UNKNOWN,2401:S.P2P_CLIENT_UNSUPPORTED_METHOD,2402:S.P2P_CLIENT_ILLEGAL_ARGUMENT,2403:S.P2P_CLIENT_INVALID_STATE,2404:S.P2P_CLIENT_NOT_ALLOWED,2500:S.P2P_WEBRTC_UNKNOWN,2501:S.P2P_WEBRTC_SDP}[e];}var _=function(e){function t(t,n){var r;return(r=e.call(this,n)||this).code="number"==typeof t?t:t.code,r;}return g()(t,e),t;}(y()(Error)),I=n(17);function x(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return P(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return P(e,t);}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]};};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}return(n=e[Symbol.iterator]()).next.bind(n);}function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++){r[n]=e[n];}return r;}function k(e,t,n,r){var i=e.split("\r\n");i.length<=1&&(i=e.split("\n"));var o=j(i,t),a={};if(null===o){var c=T(i,"a=rtpmap",t);if(null===c)return e;var s=O(i[c]);a.pt=s.toString(),a.params={},a.params[n]=r,i.splice(c+1,0,A(a));}else(a=E(i[o])).params[n]=r,i[o]=A(a);return e=i.join("\r\n");}function E(e){var t={},n=e.indexOf(" "),r=e.substring(n+1).split(";"),i=new RegExp("a=fmtp:(\\d+)"),o=e.match(i);if(!o||2!==o.length)return null;t.pt=o[1];for(var a={},c=0;c<r.length;++c){var s=r[c].split("=");2===s.length&&(a[s[0]]=s[1]);}return t.params=a,t;}function A(e){if(!e.hasOwnProperty("pt")||!e.hasOwnProperty("params"))return null;var t=e.pt,n=e.params,r=[],i=0;for(var o in n){r[i]=o+"="+n[o],++i;}return 0===i?null:"a=fmtp:"+t.toString()+" "+r.join(";");}function j(e,t){var n=function(e,t){var n=T(e,"a=rtpmap",t);return n?O(e[n]):null;}(e,t);return n?T(e,"a=fmtp:"+n.toString()):null;}function T(e,t,n){return C(e,0,-1,t,n);}function C(e,t,n,r,i){for(var o=-1!==n?n:e.length,a=t;a<o;++a){if(0===e[a].indexOf(r)&&(!i||-1!==e[a].toLowerCase().indexOf(i.toLowerCase())))return a;}return null;}function O(e){var t=new RegExp("a=rtpmap:(\\d+) [a-zA-Z0-9-]+\\/\\d+"),n=e.match(t);return n&&2===n.length?n[1]:null;}var R=["CN","telephone-event"],L=["red","ulpfec","flexfec"];function M(e,t){for(var n=new RegExp("a=(rtpmap|rtcp-fb|fmtp):"+t+"\\s"),r=e.length-1;r>0;r--){e[r].match(n)&&e.splice(r,1);}return e;}function N(e,t,n){if(!n||0===n.length)return e;n="audio"===t?n.concat(R):n.concat(L);var r=e.split("\r\n"),i=T(r,"m=",t);if(null===i)return e;var o=r[i].split(" ");o.splice(0,3);for(var a,c=[],s=x(n);!(a=s()).done;){for(var u=a.value,d=0;d<r.length;d++){var f=C(r,d,-1,"a=rtpmap",u);if(null!==f){var l=O(r[f]);l&&(c.push(l),d=f);}}}c=function(e,t){for(var n,r=x(t);!(n=r()).done;){var i=T(e,"a=fmtp","apt="+n.value);if(null!==i){var o=E(e[i]);t.push(o.pt);}}return t;}(r,c),r[i]=function(e,t){var n=e.split(" ").slice(0,3);return(n=n.concat(t)).join(" ");}(r[i],c);for(var p,m=x(o);!(p=m()).done;){var h=p.value;-1===c.indexOf(h)&&(r=M(r,h));}return e=r.join("\r\n");}function B(e,t){for(var n,r=x(t);!(n=r()).done;){var i=n.value;i.maxBitrate&&(e=k(e,i.codec.name,"x-google-max-bitrate",i.maxBitrate.toString()),e=k(e,i.codec.name,"x-google-start-bitrate",i.maxBitrate.toString())),i.minBitrate&&(e=k(e,i.codec.name,"x-google-min-bitrate",i.minBitrate.toString()));}return e;}function D(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return U(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return U(e,t);}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]};};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}return(n=e[Symbol.iterator]()).next.bind(n);}function U(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++){r[n]=e[n];}return r;}Event;var V,F="message",W="chat-closed",$="chat-track-sources",H="chat-stream-info",z="chat-signal",q="chat-tracks-added",J="chat-tracks-removed",G="chat-data-received",K="chat-ua",X=a.f(),Y=function(e){function t(t,n,r,i){var o;return(o=e.call(this)||this)._config=t,o._localId=n,o._remoteId=r,o._signaling=i,o._pc=null,o._publishedStreams=new Map(),o._pendingStreams=[],o._publishingStreams=[],o._pendingUnpublishStreams=[],o._remoteStreamInfo=new Map(),o._remoteStreams=[],o._remoteTrackSourceInfo=new Map(),o._publishPromises=new Map(),o._unpublishPromises=new Map(),o._publishingStreamTracks=new Map(),o._publishedStreamTracks=new Map(),o._isNegotiationNeeded=!1,o._remoteSideSupportsRemoveStream=!0,o._remoteSideSupportsPlanB=!0,o._remoteSideSupportsUnifiedPlan=!0,o._remoteIceCandidates=[],o._dataChannels=new Map(),o._pendingMessages=[],o._dataSeq=1,o._sendDataPromises=new Map(),o._addedTrackIds=[],o._isCaller=!0,o._infoSent=!1,o._disposed=!1,o._createPeerConnection(),o;}g()(t,e);var n=t.prototype;return n.publish=function(e){var t=this;return e instanceof p.a?this._publishedStreams.has(e)?Promise.reject(new _(S.P2P_CLIENT_ILLEGAL_ARGUMENT,"Duplicated stream.")):this._areAllTracksEnded(e.mediaStream)?Promise.reject(new _(S.P2P_CLIENT_INVALID_STATE,"All tracks are ended.")):Promise.all([this._sendClosedMsgIfNecessary(),this._sendSysInfoIfNecessary(),this._sendStreamInfo(e)]).then(function(){return new Promise(function(n,r){for(var i,o=D(e.mediaStream.getTracks());!(i=o()).done;){var a=i.value;t._pc.addTrack(a,e.mediaStream);}t._onNegotiationneeded(),t._publishingStreams.push(e);var c=Array.from(e.mediaStream.getTracks(),function(e){return e.id;});t._publishingStreamTracks.set(e.mediaStream.id,c),t._publishPromises.set(e.mediaStream.id,{resolve:n,reject:r});});}):Promise.reject(new TypeError("Invalid stream."));},n.send=function(e){var t=this;if("string"!=typeof e)return Promise.reject(new TypeError("Invalid message."));var n={id:this._dataSeq++,data:e},r=new Promise(function(e,r){t._sendDataPromises.set(n.id,{resolve:e,reject:r});});return this._dataChannels.has(F)||this._createDataChannel(F),this._sendClosedMsgIfNecessary().catch(function(e){m.a.debug("Failed to send closed message."+e.message);}),this._sendSysInfoIfNecessary().catch(function(e){m.a.debug("Failed to send sysInfo."+e.message);}),"open"===this._dataChannels.get(F).readyState?this._dataChannels.get(F).send(JSON.stringify(n)):this._pendingMessages.push(n),r;},n.stop=function(){this._stop(void 0,!0);},n.getStats=function(e){var t=this;if(this._pc){if(void 0===e)return this._pc.getStats();var n=[];return Promise.all([e.getTracks().forEach(function(e){t._getStats(e,n);})]).then(function(){return new Promise(function(e,t){e(n);});});}return Promise.reject(new _(S.P2P_CLIENT_INVALID_STATE));},n._getStats=function(e,t){return this._pc.getStats(e).then(function(e){t.push(e);});},n.onMessage=function(e){this._SignalingMesssageHandler(e);},n._sendSdp=function(e){return this._signaling.sendSignalingMessage(this._remoteId,z,e);},n._sendSignalingMessage=function(e,t){return this._signaling.sendSignalingMessage(this._remoteId,e,t);},n._SignalingMesssageHandler=function(e){switch(m.a.debug("Channel received message: "+e),e.type){case K:this._handleRemoteCapability(e.data),this._sendSysInfoIfNecessary();break;case $:this._trackSourcesHandler(e.data);break;case H:this._streamInfoHandler(e.data);break;case z:this._sdpHandler(e.data);break;case q:this._tracksAddedHandler(e.data);break;case J:this._tracksRemovedHandler(e.data);break;case G:this._dataReceivedHandler(e.data);break;case W:this._chatClosedHandler(e.data);break;default:m.a.error("Invalid signaling message received. Type: "+e.type);}},n._tracksAddedHandler=function(e){for(var t,n=this,r=function r(){var e=t.value;n._publishingStreamTracks.forEach(function(t,r){for(var i=0;i<t.length;i++){if(t[i]===e&&(n._publishedStreamTracks.has(r)||n._publishedStreamTracks.set(r,[]),n._publishedStreamTracks.get(r).push(t[i]),t.splice(i,1)),0==t.length)if("continue"===function(){if(!n._publishPromises.has(r))return m.a.warning("Cannot find the promise for publishing "+r),"continue";var t=n._publishingStreams.findIndex(function(e){return e.mediaStream.id==r;}),i=n._publishingStreams[t];n._publishingStreams.splice(t,1);var o=new I.b(e,function(){n._unpublish(i).then(function(){o.dispatchEvent(new h.e("ended"));},function(e){m.a.debug("Something wrong happened during stopping a publication. "+e.message);});},function(){return i&&i.mediaStream?n.getStats(i.mediaStream):Promise.reject(new _(S.P2P_CLIENT_INVALID_STATE,"Publication is not available."));});n._publishedStreams.set(i,o),n._publishPromises.get(r).resolve(o),n._publishPromises.delete(r);}())continue;}});},i=D(e);!(t=i()).done;){r();}},n._tracksRemovedHandler=function(e){for(var t,n=this,r=function r(){var e=t.value;n._publishedStreamTracks.forEach(function(t,n){for(var r=0;r<t.length;r++){t[r]===e&&t.splice(r,1);}});},i=D(e);!(t=i()).done;){r();}},n._dataReceivedHandler=function(e){this._sendDataPromises.has(e)?this._sendDataPromises.get(e).resolve():m.a.warning("Received unknown data received message. ID: "+e);},n._sdpHandler=function(e){"offer"===e.type?this._onOffer(e):"answer"===e.type?this._onAnswer(e):"candidates"===e.type&&this._onRemoteIceCandidate(e);},n._trackSourcesHandler=function(e){for(var t,n=D(e);!(t=n()).done;){var r=t.value;this._remoteTrackSourceInfo.set(r.id,r.source);}},n._streamInfoHandler=function(e){e?this._remoteStreamInfo.set(e.id,{source:e.source,attributes:e.attributes,stream:null,mediaStream:null,trackIds:e.tracks}):m.a.warning("Unexpected stream info.");},n._chatClosedHandler=function(e){this._disposed=!0,this._stop(e,!1);},n._onOffer=function(e){var t=this;m.a.debug("About to set remote description. Signaling state: "+this._pc.signalingState),e.sdp=this._setRtpSenderOptions(e.sdp,this._config),a.d()&&(e.sdp=this._setCodecOrder(e.sdp));var n=new RTCSessionDescription(e);this._pc.setRemoteDescription(n).then(function(){t._createAndSendAnswer();},function(e){m.a.debug("Set remote description failed. Message: "+e.message),t._stop(e,!0);});},n._onAnswer=function(e){var t=this;m.a.debug("About to set remote description. Signaling state: "+this._pc.signalingState),e.sdp=this._setRtpSenderOptions(e.sdp,this._config);var n=new RTCSessionDescription(e);this._pc.setRemoteDescription(new RTCSessionDescription(n)).then(function(){m.a.debug("Set remote descripiton successfully."),t._drainPendingMessages();},function(e){m.a.debug("Set remote description failed. Message: "+e.message),t._stop(e,!0);});},n._onLocalIceCandidate=function(e){e.candidate?this._sendSdp({type:"candidates",candidate:e.candidate.candidate,sdpMid:e.candidate.sdpMid,sdpMLineIndex:e.candidate.sdpMLineIndex}).catch(function(e){m.a.warning("Failed to send candidate.");}):m.a.debug("Empty candidate1.");},n._onRemoteTrackAdded=function(e){m.a.debug("Remote track added.");for(var t,n=D(e.streams);!(t=n()).done;){var r=t.value;if(!this._remoteStreamInfo.has(r.id))return void m.a.warning("Missing stream info.");this._remoteStreamInfo.get(r.id).stream||this._setStreamToRemoteStreamInfo(r);}"connected"===this._pc.iceConnectionState||"completed"===this._pc.iceConnectionState?this._checkIceConnectionStateAndFireEvent():this._addedTrackIds.concat(e.track.id);},n._onRemoteStreamAdded=function(e){if(m.a.debug("Remote stream added."),this._remoteStreamInfo.has(e.stream.id)){"connected"===this._pc.iceConnectionState||"completed"===this._pc.iceConnectionState?this._sendSignalingMessage(q,this._remoteStreamInfo.get(e.stream.id).trackIds):this._addedTrackIds=this._addedTrackIds.concat(this._remoteStreamInfo.get(e.stream.id).trackIds);var t=this._remoteStreamInfo.get(e.stream.id).source.audio,n=this._remoteStreamInfo.get(e.stream.id).source.video,r=new p.e(t,n);a.e()&&(r.audio||e.stream.getAudioTracks().forEach(function(t){e.stream.removeTrack(t);}),r.video||e.stream.getVideoTracks().forEach(function(t){e.stream.removeTrack(t);}));var i=this._remoteStreamInfo.get(e.stream.id).attributes,o=new p.b(void 0,this._remoteId,e.stream,r,i);if(o){this._remoteStreams.push(o);var c=new p.d("streamadded",{stream:o});this.dispatchEvent(c);}}else m.a.warning("Cannot find source info for stream "+e.stream.id);},n._onRemoteStreamRemoved=function(e){m.a.debug("Remote stream removed.");var t=this._remoteStreams.findIndex(function(t){return t.mediaStream.id===e.stream.id;});if(-1!==t){var n=this._remoteStreams[t];this._streamRemoved(n),this._remoteStreams.splice(t,1);}},n._onNegotiationneeded=function(){m.a.debug("On negotiation needed."),"stable"===this._pc.signalingState?this._doNegotiate():this._isNegotiationNeeded=!0;},n._onRemoteIceCandidate=function(e){var t=new RTCIceCandidate({candidate:e.candidate,sdpMid:e.sdpMid,sdpMLineIndex:e.sdpMLineIndex});this._pc.remoteDescription&&""!==this._pc.remoteDescription.sdp?(m.a.debug("Add remote ice candidates."),this._pc.addIceCandidate(t).catch(function(e){m.a.warning("Error processing ICE candidate: "+e);})):(m.a.debug("Cache remote ice candidates."),this._remoteIceCandidates.push(t));},n._onSignalingStateChange=function(e){m.a.debug("Signaling state changed: "+this._pc.signalingState),"closed"===this._pc.signalingState||("stable"===this._pc.signalingState?(this._negotiating=!1,this._isNegotiationNeeded?this._onNegotiationneeded():(this._drainPendingStreams(),this._drainPendingMessages())):"have-remote-offer"===this._pc.signalingState&&this._drainPendingRemoteIceCandidates());},n._onIceConnectionStateChange=function(e){if("closed"===e.currentTarget.iceConnectionState||"failed"===e.currentTarget.iceConnectionState){var t=new _(S.P2P_WEBRTC_UNKNOWN,"ICE connection failed or closed.");this._stop(t,!0);}else"connected"!==e.currentTarget.iceConnectionState&&"completed"!==e.currentTarget.iceConnectionState||(this._sendSignalingMessage(q,this._addedTrackIds),this._addedTrackIds=[],this._checkIceConnectionStateAndFireEvent());},n._onDataChannelMessage=function(e){var t=JSON.parse(e.data);m.a.debug("Data channel message received: "+t.data),this._sendSignalingMessage(G,t.id);var n=new h.c("messagereceived",{message:t.data,origin:this._remoteId});this.dispatchEvent(n);},n._onDataChannelOpen=function(e){m.a.debug("Data Channel is opened."),e.target.label===F&&(m.a.debug("Data channel for messages is opened."),this._drainPendingMessages());},n._onDataChannelClose=function(e){m.a.debug("Data Channel is closed.");},n._streamRemoved=function(e){this._remoteStreamInfo.has(e.mediaStream.id)||m.a.warning("Cannot find stream info."),this._sendSignalingMessage(J,this._remoteStreamInfo.get(e.mediaStream.id).trackIds);var t=new h.e("ended");e.dispatchEvent(t);},n._isUnifiedPlan=function(){if(a.d())return!0;var e=new RTCPeerConnection({sdpSemantics:"unified-plan"});return e.getConfiguration()&&"plan-b"===e.getConfiguration().sdpSemantics;},n._createPeerConnection=function(){var e=this,t=this._config.rtcConfiguration||{};a.b()&&(t.sdpSemantics="unified-plan"),this._pc=new RTCPeerConnection(t),"function"==typeof this._pc.addTransceiver&&a.e()&&(this._pc.addTransceiver("audio"),this._pc.addTransceiver("video")),this._isUnifiedPlan()?this._pc.ontrack=function(t){e._onRemoteTrackAdded.apply(e,[t]);}:(this._pc.onaddstream=function(t){e._onRemoteStreamAdded.apply(e,[t]);},this._pc.onremovestream=function(t){e._onRemoteStreamRemoved.apply(e,[t]);}),this._pc.onicecandidate=function(t){e._onLocalIceCandidate.apply(e,[t]);},this._pc.onsignalingstatechange=function(t){e._onSignalingStateChange.apply(e,[t]);},this._pc.ondatachannel=function(t){m.a.debug("On data channel."),e._dataChannels.has(t.channel.label)||(e._dataChannels.set(t.channel.label,t.channel),m.a.debug("Save remote created data channel.")),e._bindEventsToDataChannel(t.channel);},this._pc.oniceconnectionstatechange=function(t){e._onIceConnectionStateChange.apply(e,[t]);};},n._drainPendingStreams=function(){var e=!1;if(m.a.debug("Draining pending streams."),this._pc&&"stable"===this._pc.signalingState){m.a.debug("Peer connection is ready for draining pending streams.");for(var t=0;t<this._pendingStreams.length;t++){var n=this._pendingStreams[t];if(this._pendingStreams.shift(),n.mediaStream){for(var r,i=D(n.mediaStream.getTracks());!(r=i()).done;){var o=r.value;this._pc.addTrack(o,n.mediaStream),e=!0;}m.a.debug("Added stream to peer connection."),this._publishingStreams.push(n);}}this._pendingStreams.length=0;for(var a=0;a<this._pendingUnpublishStreams.length;a++){this._pendingUnpublishStreams[a].mediaStream&&(this._pc.removeStream(this._pendingUnpublishStreams[a].mediaStream),e=!0,this._unpublishPromises.get(this._pendingUnpublishStreams[a].mediaStream.id).resolve(),this._publishedStreams.delete(this._pendingUnpublishStreams[a]),m.a.debug("Remove stream."));}this._pendingUnpublishStreams.length=0;}e&&this._onNegotiationneeded();},n._drainPendingRemoteIceCandidates=function(){for(var e=0;e<this._remoteIceCandidates.length;e++){m.a.debug("Add candidate"),this._pc.addIceCandidate(this._remoteIceCandidates[e]).catch(function(e){m.a.warning("Error processing ICE candidate: "+e);});}this._remoteIceCandidates.length=0;},n._drainPendingMessages=function(){if(m.a.debug("Draining pending messages."),0!=this._pendingMessages.length){var e=this._dataChannels.get(F);if(e&&"open"===e.readyState){for(var t=0;t<this._pendingMessages.length;t++){m.a.debug("Sending message via data channel: "+this._pendingMessages[t]),e.send(JSON.stringify(this._pendingMessages[t]));}this._pendingMessages.length=0;}else this._pc&&!e&&this._createDataChannel(F);}},n._sendStreamInfo=function(e){if(!e||!e.mediaStream)return new _(S.P2P_CLIENT_ILLEGAL_ARGUMENT);var t=[];return e.mediaStream.getTracks().map(function(n){t.push({id:n.id,source:e.source[n.kind]});}),Promise.all([this._sendSignalingMessage($,t),this._sendSignalingMessage(H,{id:e.mediaStream.id,attributes:e.attributes,tracks:Array.from(t,function(e){return e.id;}),source:e.source})]);},n._sendSysInfoIfNecessary=function(){return this._infoSent?Promise.resolve():(this._infoSent=!0,this._sendSignalingMessage(K,X));},n._sendClosedMsgIfNecessary=function(){return null===this._pc.remoteDescription||""===this._pc.remoteDescription.sdp?this._sendSignalingMessage(W):Promise.resolve();},n._handleRemoteCapability=function(e){e.sdk&&e.sdk&&"JavaScript"===e.sdk.type&&e.runtime&&"Firefox"===e.runtime.name?(this._remoteSideSupportsRemoveStream=!1,this._remoteSideSupportsPlanB=!1,this._remoteSideSupportsUnifiedPlan=!0):(this._remoteSideSupportsRemoveStream=!0,this._remoteSideSupportsPlanB=!0,this._remoteSideSupportsUnifiedPlan=!1);},n._doNegotiate=function(){this._createAndSendOffer();},n._setCodecOrder=function(e){this._config.audioEncodings&&(e=N(e,"audio",Array.from(this._config.audioEncodings,function(e){return e.codec.name;})));this._config.videoEncodings&&(e=N(e,"video",Array.from(this._config.videoEncodings,function(e){return e.codec.name;})));return e;},n._setMaxBitrate=function(e,t){return"object"==typeof t.audioEncodings&&(e=B(e,t.audioEncodings)),"object"==typeof t.videoEncodings&&(e=B(e,t.videoEncodings)),e;},n._setRtpSenderOptions=function(e,t){return e=this._setMaxBitrate(e,t);},n._setRtpReceiverOptions=function(e){return e=this._setCodecOrder(e);},n._createAndSendOffer=function(){var e,t=this;this._pc?(this._isNegotiationNeeded=!1,this._isCaller=!0,this._pc.createOffer().then(function(n){if(n.sdp=t._setRtpReceiverOptions(n.sdp),e=n,"stable"===t._pc.signalingState)return t._pc.setLocalDescription(n).then(function(){return t._sendSdp(e);});}).catch(function(e){m.a.error(e.message+" Please check your codec settings.");var n=new _(S.P2P_WEBRTC_SDP,e.message);t._stop(n,!0);})):m.a.error("Peer connection have not been created.");},n._createAndSendAnswer=function(){var e,t=this;this._drainPendingStreams(),this._isNegotiationNeeded=!1,this._isCaller=!1,this._pc.createAnswer().then(function(n){return n.sdp=t._setRtpReceiverOptions(n.sdp),e=n,t._logCurrentAndPendingLocalDescription(),t._pc.setLocalDescription(n);}).then(function(){return t._sendSdp(e);}).catch(function(e){m.a.error(e.message+" Please check your codec settings.");var n=new _(S.P2P_WEBRTC_SDP,e.message);t._stop(n,!0);});},n._logCurrentAndPendingLocalDescription=function(){m.a.info("Current description: "+this._pc.currentLocalDescription),m.a.info("Pending description: "+this._pc.pendingLocalDescription);},n._getAndDeleteTrackSourceInfo=function(e){if(e.length>0){var t=e[0].id;if(this._remoteTrackSourceInfo.has(t)){var n=this._remoteTrackSourceInfo.get(t);return this._remoteTrackSourceInfo.delete(t),n;}m.a.warning("Cannot find source info for "+t);}},n._unpublish=function(e){var t=this;return navigator.mozGetUserMedia||!this._remoteSideSupportsRemoveStream?(m.a.error("Stopping a publication is not supported on Firefox. Please use P2PClient.stop() to stop the connection with remote endpoint."),Promise.reject(new _(S.P2P_CLIENT_UNSUPPORTED_METHOD))):this._publishedStreams.has(e)?(this._pendingUnpublishStreams.push(e),new Promise(function(n,r){t._unpublishPromises.set(e.mediaStream.id,{resolve:n,reject:r}),t._drainPendingStreams();})):Promise.reject(new _(S.P2P_CLIENT_ILLEGAL_ARGUMENT));},n._createDataChannel=function(e){if(this._dataChannels.has(e))m.a.warning("Data channel labeled "+e+" already exists.");else if(this._pc){m.a.debug("Create data channel.");var t=this._pc.createDataChannel(e);this._bindEventsToDataChannel(t),this._dataChannels.set(F,t),this._onNegotiationneeded();}else m.a.debug("PeerConnection is not available before creating DataChannel.");},n._bindEventsToDataChannel=function(e){var t=this;e.onmessage=function(e){t._onDataChannelMessage.apply(t,[e]);},e.onopen=function(e){t._onDataChannelOpen.apply(t,[e]);},e.onclose=function(e){t._onDataChannelClose.apply(t,[e]);},e.onerror=function(e){m.a.debug("Data Channel Error:",error);};},n._getStreamByTrack=function(e){for(var t,n=[],r=D(this._remoteStreamInfo);!(t=r()).done;){var i=t.value,o=(i[0],i[1]);if(o.stream&&o.stream.mediaStream)for(var a,c=D(o.stream.mediaStream.getTracks());!(a=c()).done;){e===a.value&&n.push(o.stream.mediaStream);}}return n;},n._areAllTracksEnded=function(e){for(var t,n=D(e.getTracks());!(t=n()).done;){if("live"===t.value.readyState)return!1;}return!0;},n._stop=function(e,t){var n=e;n||(n=new _(S.P2P_CLIENT_UNKNOWN));for(var r,i=D(this._dataChannels);!(r=i()).done;){var o=r.value;o[0];o[1].close();}this._dataChannels.clear(),this._pc&&"closed"!==this._pc.iceConnectionState&&this._pc.close();for(var a,c=D(this._publishPromises);!(a=c()).done;){var s=a.value;s[0];s[1].reject(n);}this._publishPromises.clear();for(var u,d=D(this._unpublishPromises);!(u=d()).done;){var f=u.value;f[0];f[1].reject(n);}this._unpublishPromises.clear();for(var l,p=D(this._sendDataPromises);!(l=p()).done;){var v=l.value;v[0];v[1].reject(n);}if(this._sendDataPromises.clear(),this._publishedStreams.forEach(function(e){e.dispatchEvent(new h.e("ended"));}),this._publishedStreams.clear(),this._remoteStreams.forEach(function(e){e.dispatchEvent(new h.e("ended"));}),this._remoteStreams=[],!this._disposed){var g;if(t)e&&((g=JSON.parse(JSON.stringify(e))).message="Error happened at remote side."),this._sendSignalingMessage(W,g).catch(function(e){m.a.debug("Failed to send close."+e.message);});this.dispatchEvent(new Event("ended"));}},n._setStreamToRemoteStreamInfo=function(e){var t=this._remoteStreamInfo.get(e.id),n=t.attributes,r=new p.e(this._remoteStreamInfo.get(e.id).source.audio,this._remoteStreamInfo.get(e.id).source.video);t.stream=new p.b(void 0,this._remoteId,e,r,n),t.mediaStream=e;var i=t.stream;i?this._remoteStreams.push(i):m.a.warning("Failed to create RemoteStream.");},n._checkIceConnectionStateAndFireEvent=function(){var e=this;if("connected"===this._pc.iceConnectionState||"completed"===this._pc.iceConnectionState)for(var t,n=D(this._remoteStreamInfo);!(t=n()).done;){var r=t.value,i=(r[0],r[1]);if(i.mediaStream){var o=new p.d("streamadded",{stream:i.stream});if(this._isUnifiedPlan())for(var a,c=D(i.mediaStream.getTracks());!(a=c()).done;){a.value.addEventListener("ended",function(t){for(var n,r=D(e._getStreamByTrack(t.target));!(n=r()).done;){var i=n.value;e._areAllTracksEnded(i)&&e._onRemoteStreamRemoved(i);}});}this._sendSignalingMessage(q,i.trackIds),this._remoteStreamInfo.get(i.mediaStream.id).mediaStream=null,this.dispatchEvent(o);}}},t;}(h.b),Z=1,Q=2,ee=3,te=function te(e,t){Object.setPrototypeOf(this,new h.b());var n,r=e,i=t,o=new Map(),a=this,c=Z;i.onMessage=function(e,t){m.a.debug("Received signaling message from "+e+": "+t);var n=JSON.parse(t);"chat-closed"!==n.type?a.allowedRemoteIds.indexOf(e)>=0?u(e).onMessage(n):s(e,"chat-closed",S.P2P_CLIENT_DENIED):o.has(e)&&(u(e).onMessage(n),o.delete(e));},i.onServerDisconnected=function(){c=Z,a.dispatchEvent(new h.e("serverdisconnected"));},this.allowedRemoteIds=[],this.connect=function(e){return c!==Z?(m.a.warning("Invalid connection state: "+c),Promise.reject(new _(S.P2P_CLIENT_INVALID_STATE))):(c=Q,new Promise(function(t,r){i.connect(e).then(function(e){c=ee,t(n=e);},function(e){r(new _(w(e)));});}));},this.disconnect=function(){c!=Z&&(o.forEach(function(e){e.stop();}),o.clear(),i.disconnect());},this.publish=function(e,t){return c!==ee?Promise.reject(new _(S.P2P_CLIENT_INVALID_STATE,"P2P Client is not connected to signaling channel.")):this.allowedRemoteIds.indexOf(e)<0?Promise.reject(new _(S.P2P_CLIENT_NOT_ALLOWED)):Promise.resolve(u(e).publish(t));},this.send=function(e,t){return c!==ee?Promise.reject(new _(S.P2P_CLIENT_INVALID_STATE,"P2P Client is not connected to signaling channel.")):this.allowedRemoteIds.indexOf(e)<0?Promise.reject(new _(S.P2P_CLIENT_NOT_ALLOWED)):Promise.resolve(u(e).send(t));},this.stop=function(e){o.has(e)?(o.get(e).stop(),o.delete(e)):m.a.warning("No PeerConnection between current endpoint and specific remote endpoint.");},this.getStats=function(e){return o.has(e)?o.get(e).getStats():Promise.reject(new _(S.P2P_CLIENT_INVALID_STATE,"No PeerConnection between current endpoint and specific remote endpoint."));};var s=function s(e,t,n){var r={type:t};return n&&(r.data=n),i.send(e,JSON.stringify(r)).catch(function(e){if("number"==typeof e)throw w(e);});},u=function u(e){if(!o.has(e)){var t=Object.create(h.b);t.sendSignalingMessage=s;var i=new Y(r,n,e,t);i.addEventListener("streamadded",function(e){a.dispatchEvent(e);}),i.addEventListener("messagereceived",function(e){a.dispatchEvent(e);}),i.addEventListener("ended",function(){o.delete(e);}),o.set(e,i);}return o.get(e);};},ne=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).code=n,r;}return g()(t,e),t;}(y()(Error)),re=function(){var e,t,n,r=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/"],i=[];for(n=0;n<r.length;n+=1){i[r[n]]=n;}var o=function o(n){e=n,t=0;},a=function a(){if(!e)return-1;if(t>=e.length)return-1;var n=255&e.charCodeAt(t);return t+=1,n;},c=function c(){if(!e)return-1;for(;;){if(t>=e.length)return-1;var n=e.charAt(t);if(t+=1,i[n])return i[n];if("A"===n)return 0;}},s=function s(e){return 1===(e=e.toString(16)).length&&(e="0"+e),e="%"+e,unescape(e);};return{encodeBase64:function encodeBase64(e){var t,n;o(e),t="";var i=new Array(3);for(n=!1;!n&&-1!==(i[0]=a());){i[1]=a(),i[2]=a(),t+=r[i[0]>>2],-1!==i[1]?(t+=r[i[0]<<4&48|i[1]>>4],-1!==i[2]?(t+=r[i[1]<<2&60|i[2]>>6],t+=r[63&i[2]]):(t+=r[i[1]<<2&60],t+="=",n=!0)):(t+=r[i[0]<<4&48],t+="=",t+="=",n=!0);}return t;},decodeBase64:function decodeBase64(e){var t,n;o(e),t="";var r=new Array(4);for(n=!1;!n&&-1!==(r[0]=c())&&-1!==(r[1]=c());){r[2]=c(),r[3]=c(),t+=s(r[0]<<2&255|r[1]>>4),-1!==r[2]?(t+=s(r[1]<<4&255|r[2]>>2),-1!==r[3]?t+=s(r[2]<<6&255|r[3]):n=!0):n=!0;}return t;}};}();function ie(e,t,n,r){"ok"===e||"success"===e?n(t):"error"===e?r(t):m.a.error("MCU returns unknown ack.");}var oe=function(e){function t(){var t;return(t=e.call(this)||this)._socket=null,t._loggedIn=!1,t._reconnectTimes=0,t._reconnectionTicket=null,t._refreshReconnectionTicket=null,t;}g()(t,e);var n=t.prototype;return n.connect=function(e,t,n){var r=this;return new Promise(function(t,i){var o={reconnection:!0,reconnectionAttempts:25,"force new connection":!0,transports:["websocket"],reconnectionDelayMax:5e3};r._socket=io(e,o),["participant","text","stream","progress","sipAndPstnJoin"].forEach(function(e){r._socket.on(e,function(t){r.dispatchEvent(new h.c("data",{message:{notification:e,data:t}}));});}),r._socket.on("reconnect_attempt",function(){console.info("=> reconnect_attempt");}),r._socket.on("reconnecting",function(){V||(V=setTimeout(function(){r.dispatchEvent(new h.e("disconnect"));},12e4)),window._socket_status_=!1,console.log("=> reconnecting",new Date().toLocaleString()),r._reconnectTimes++,r.dispatchEvent(new h.e("reconnecting"));}),r._socket.on("reconnect_failed",function(){console.log("=> reconnect_failed"),r._reconnectTimes>=25&&r.dispatchEvent(new h.e("disconnect"));}),r._socket.on("reconnect_error",function(){console.log("=> reconnect_error");}),r._socket.on("connect_error",function(e){console.error("=> connect_error",e,new Date().toLocaleString()),r._reconnectTimes>=15&&i(new ne("connect_error:"+(e&&e.message)));}),r._socket.on("drop",function(){console.log("=> drop"),r._reconnectTimes=25;}),r._socket.on("disconnect",function(e){window._socket_status_=!1,console.log("=> disconnect",e,new Date().toLocaleString()),r._clearReconnectionTask(),r._reconnectTimes>=25&&(r._loggedIn=!1,r.dispatchEvent(new h.e("disconnect")));}),r._socket.on("action",function(e){r._socket.emit("stillalive",e);}),r._socket.emit("login",n,function(e,n){"ok"===e&&(r._loggedIn=!0,r._onReconnectionTicket(n.reconnectionTicket),r._socket.on("connect",function(){r._socket.emit("relogin",r._reconnectionTicket,function(e,t){"ok"===e?(window._socket_status_=!0,r._reconnectTimes=0,r._onReconnectionTicket(t),r.dispatchEvent(new h.e("relogin")),clearTimeout(V)):t.includes("400002")?r.dispatchEvent(new h.e("droped")):r.dispatchEvent(new h.e("disconnect"));});})),ie(e,n,t,i);});});},n.disconnect=function(){var e=this;return!this._socket||this._socket.disconnected?Promise.reject(new ne("Portal is not connected.")):new Promise(function(t,n){e._socket.emit("logout",function(r,i){e._reconnectTimes=25,e._socket.disconnect(),ie(r,i,t,n);});});},n.send=function(e,t){var n=this;return new Promise(function(r,i){void 0===t?n._socket.emit(e,function(e,t){ie(e,t,r,i);}):n._socket.emit(e,t,function(t,o){switch(e){case"getParticipantsList":return n.dispatchEvent({type:"getParticipantsList",list:t}),void r();case"room-infos":case"controlStreams":case"change-name":case"assignHost":return void r({status:t,data:o});}ie(t,o,r,i);});});},n._onReconnectionTicket=function(e){var t=this;this._reconnectionTicket=e;var n=JSON.parse(re.decodeBase64(e)),r=Date.now();if(n.notAfter<=r-1e4)m.a.warning("Reconnection ticket expires too soon.");else{var i=n.notAfter-r-6e4;i<0&&(i=n.notAfter-r-1e4),this._clearReconnectionTask(),this._refreshReconnectionTicket=setTimeout(function(){t._socket.emit("refreshReconnectionTicket",function(e,n){"ok"===e?t._onReconnectionTicket(n):m.a.warning("Failed to refresh reconnection ticket.");});},i);}},n._clearReconnectionTask=function(){clearTimeout(this._refreshReconnectionTicket),this._refreshReconnectionTicket=null;},t;}(h.b),ae=n(25),ce=function ce(e,t,n,r){this.id=e,this.participants=t,this.remoteStreams=n,this.self=r;},se=n(3),ue=n.n(se),de=n(23);function fe(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return le(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return le(e,t);}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]};};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}return(n=e[Symbol.iterator]()).next.bind(n);}function le(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++){r[n]=e[n];}return r;}var pe=function(e){function t(t,n){var r;return(r=e.call(this)||this)._config=t,r._options=null,r._signaling=n,r._pc=null,r._internalId=null,r._pendingCandidates=[],r._subscribePromise=null,r._publishPromise=null,r._subscribedStream=null,r._publishedStream=null,r._publication=null,r._subscription=null,r._disconnectTimer=null,r._ended=!1,r.iceDisconnectedTimer=null,r.iceStatus="",r.offerOptions=null,r.iceTimer=null,r._trackStream=!1,r._videoSender=null,r._audioSender=null,r;}g()(t,e);var n=t.prototype;return n.onMessage=function(e,t){switch(e){case"progress":"soac"===t.status?this._sdpHandler(t.data):"ready"===t.status?this._readyHandler():"error"===t.status&&this._errorHandler(t);break;case"stream":this._onStreamEvent(t);break;default:m.a.warning("Unknown notification from MCU.");}},n.publish=function(e,t){var n=this,r="screen-cast"===e.source.audio||"screen-cast"===e.source.video;if(void 0===t&&(t={audio:!!e.mediaStream.getAudioTracks().length,video:!!e.mediaStream.getVideoTracks().length}),"object"!=typeof t)return Promise.reject(new TypeError("Options should be an object."));if(this._isRtpEncodingParameters(t.audio)&&this._isOwtEncodingParameters(t.video)||this._isOwtEncodingParameters(t.audio)&&this._isRtpEncodingParameters(t.video))return Promise.reject(new ne("Mixing RTCRtpEncodingParameters and AudioEncodingParameters/VideoEncodingParameters is not allowed."));if(void 0===t.audio&&(t.audio=!!e.mediaStream.getAudioTracks().length),void 0===t.video&&(t.video=!!e.mediaStream.getVideoTracks().length),!(!1!==t.audio&&null!==t.audio||!1!==t.video&&null!==t.video))return Promise.reject(new ne("Cannot publish a stream without audio and video."));if("object"==typeof t.audio){if(!Array.isArray(t.audio))return Promise.reject(new TypeError("options.audio should be a boolean or an array."));for(var i,o=fe(t.audio);!(i=o()).done;){var a=i.value;if(!a.codec||"string"!=typeof a.codec.name||void 0!==a.maxBitrate&&"number"!=typeof a.maxBitrate)return Promise.reject(new TypeError("options.audio has incorrect parameters."));}}if("object"==typeof t.video&&!Array.isArray(t.video))return Promise.reject(new TypeError("options.video should be a boolean or an array."));if(this._isOwtEncodingParameters(t.video))for(var c,s=fe(t.video);!(c=s()).done;){var u=c.value;if(!u.codec||"string"!=typeof u.codec.name||void 0!==u.maxBitrate&&"number"!=typeof u.maxBitrate||void 0!==u.codec.profile&&"string"!=typeof u.codec.profile)return Promise.reject(new TypeError("options.video has incorrect parameters."));}this._options=t;var d={};if(this._createPeerConnection("publish"),e.mediaStream.getAudioTracks().length>0&&!1!==t.audio&&null!==t.audio&&(e.mediaStream.getAudioTracks().length>1&&m.a.warning("Publishing a stream with multiple audio tracks is not fully supported."),"boolean"!=typeof t.audio&&"object"!=typeof t.audio))return Promise.reject(new ne("Type of audio options should be boolean or an object."));d.audio={},d.audio.source=r?"screen-cast":"mic",e.mediaStream.getVideoTracks().length>1&&m.a.warning("Publishing a stream with multiple video tracks is not fully supported."),d.video={},d.video.source=r?"screen-cast":"camera";var f={resolution:{width:1280,height:720},framerate:15};if(e.mediaStream.getVideoTracks()[0]){var l=e.mediaStream.getVideoTracks()[0].getSettings();f={resolution:{width:l.width,height:l.height},framerate:l.frameRate};}return d.video.parameters=f,this._publishedStream=e,this._signaling.sendSignalingMessage("publish",{media:d,attributes:e.attributes}).then(function(r){var i=new h.c("id",{message:r.id,origin:n._remoteId});n.dispatchEvent(i),n._internalId=r.id;if("function"==typeof n._pc.addTransceiver){var o={direction:"sendonly"};if(n._isRtpEncodingParameters(t.audio)&&(o.sendEncodings=t.audio),d.audio&&e.mediaStream.getAudioTracks().length>0){var a=n._pc.addTransceiver(e.mediaStream.getAudioTracks()[0],o);n._audioSender=a;}else n._audioSender=n._pc.addTransceiver("audio",o);var c={direction:"sendonly"};if(n._isRtpEncodingParameters(t.video)&&(c.sendEncodings=t.video,n._videoCodecs=t.video[0].codec.name),d.video&&e.mediaStream.getVideoTracks().length>0){var s=n._pc.addTransceiver(e.mediaStream.getVideoTracks()[0],c);n._videoSender=s;}else n._videoSender=n._pc.addTransceiver("video",c);return Promise.resolve({});}}).then(function(e){n.offerOptions=e,n._publishMakeIce(e,t);}).catch(function(e){n._unpublish(),n._rejectPromise(e),n._fireEndedEventOnPublicationOrSubscription();}),new Promise(function(e,t){n._publishPromise={resolve:e,reject:t};});},n._publishMakeIce=function(e,t){var n,r=this;this._pc.createOffer(e).then(function(e){return t&&(e.sdp=r._setRtpReceiverOptions(e.sdp,t)),e;}).then(function(e){return n=e,r._pc.setLocalDescription(e);}).then(function(){r._signaling.sendSignalingMessage("soac",{id:r._internalId,signaling:n});}).catch(function(e){m.a.error("Failed to create offer or set SDP. Message: "+e.message),r._restartPublishIce();});},n.subscribe=function(e,t){var n=this;if(void 0===t&&(t={audio:!!e.capabilities.audio,video:!!e.capabilities.video}),"object"!=typeof t)return Promise.reject(new TypeError("Options should be an object."));if(void 0===t.audio&&(t.audio=!!e.capabilities.audio),void 0===t.video&&(t.video=!!e.capabilities.video),void 0!==t.audio&&"object"!=typeof t.audio&&"boolean"!=typeof t.audio&&null!==t.audio||void 0!==t.video&&"object"!=typeof t.video&&"boolean"!=typeof t.video&&null!==t.video)return Promise.reject(new TypeError("Invalid options type."));if(t.audio&&!e.capabilities.audio||t.video&&!e.capabilities.video)return Promise.reject(new ne("options.audio/video cannot be true or an object if there is no audio/video track in remote stream."));if(!1===t.audio&&!1===t.video)return Promise.reject(new ne("Cannot subscribe a stream without audio and video."));this._options=t;var r={};if(t.audio){if("object"==typeof t.audio&&Array.isArray(t.audio.codecs)&&0===t.audio.codecs.length)return Promise.reject(new TypeError("Audio codec cannot be an empty array."));r.audio={},r.audio.from=e.id;}else r.audio=!1;if(t.video){if("object"==typeof t.video&&Array.isArray(t.video.codecs)&&0===t.video.codecs.length)return Promise.reject(new TypeError("Video codec cannot be an empty array."));r.video={},r.video.from=e.id,(t.video.resolution||t.video.frameRate||t.video.bitrateMultiplier&&1!==t.video.bitrateMultiplier||t.video.keyFrameInterval)&&(r.video.parameters={resolution:t.video.resolution,framerate:t.video.frameRate,bitrate:t.video.bitrateMultiplier?"x"+t.video.bitrateMultiplier.toString():void 0,keyFrameInterval:t.video.keyFrameInterval});}else r.video=!1;return this._subscribedStream=e,this._signaling.sendSignalingMessage("subscribe",{media:r}).then(function(e){var i=new h.c("id",{message:e.id,origin:n._remoteId});n.dispatchEvent(i),n._internalId=e.id,n._createPeerConnection("subscribe");var o={offerToReceiveAudio:!!t.audio,offerToReceiveVideo:!!t.video};"function"==typeof n._pc.addTransceiver&&(r.audio&&n._pc.addTransceiver("audio",{direction:"recvonly"}),r.video&&n._pc.addTransceiver("video",{direction:"recvonly"})),n.offerOptions=o,n._makeSubscribeIce(o,t);}).catch(function(e){n._unsubscribe(),n._rejectPromise(e),n._fireEndedEventOnPublicationOrSubscription();}),new Promise(function(e,t){n._subscribePromise={resolve:e,reject:t};});},n._makeSubscribeIce=function(e,t){var n=this;return new Promise(function(r){n._pc.createOffer(e).then(function(e){t&&(e.sdp=n._setRtpReceiverOptions(e.sdp,t)),n._pc.setLocalDescription(e).then(function(){n._signaling.sendSignalingMessage("soac",{id:n._internalId,signaling:e}),r();},function(e){m.a.error("Set local description failed. Message: "+JSON.stringify(e));});},function(e){m.a.error("Create offer failed. Error info: "+JSON.stringify(e));}).catch(function(e){m.a.error("Failed to create offer or set SDP. Message: "+e.message),n._restartSubscribeIce();});});},n._debounce=function(e,t){clearTimeout(this.iceTimer),this.iceTimer=setTimeout(function(){e(),clearTimeout(this.iceTimer);},t);},n._restartSubscribeIce=function(){var e=this;return new Promise(function(t){if(!e._pc||"closed"==e._pc.signalingState)return t({pcStatus:"closed"});e._debounce(function(){e._pendingCandidates=[],e._makeSubscribeIce(ue()({},e.offerOptions,{iceRestart:!0}),e._options).then(function(){e._subscription.dispatchEvent(new h.e("restartIce")),t();});},2e3);});},n._restartPublishIce=function(){var e=this;this._debounce(function(){e._pendingCandidates=[],e._publishMakeIce(ue()({},e.offerOptions,{iceRestart:!0}),e._options);},2e3);},n._unpublish=function(){var e=this;return new Promise(function(t,n){e._signaling.sendSignalingMessage("unpublish",{id:e._internalId}).then(function(){t();}).catch(function(e){m.a.warning("MCU returns negative ack for unpublishing, "+e);}),e._pc&&"closed"!==e._pc.signalingState&&(e._pc.close(),e._pc=null,clearInterval(e.iceDisconnectedTimer));});},n._unsubscribe=function(){var e=this,t=this._subscribedStream.mediaStream;if(t)for(var n,r=fe(t.getTracks());!(n=r()).done;){n.value.stop();}return new Promise(function(t){e._signaling.sendSignalingMessage("unsubscribe",{id:e._internalId}).then(function(){t();}).catch(function(e){t(),m.a.warning("MCU returns negative ack for unsubscribing, "+e);}),e._pc&&"closed"!==e._pc.signalingState&&(e._pc.close(),clearInterval(e.iceDisconnectedTimer),e._pc=null);});},n._muteOrUnmute=function(e,t,n,r){var i=this,o=t?"stream-control":"subscription-control",a=e?"pause":"play";return"notConnect"===r&&(a=r),this._signaling.sendSignalingMessage(o,{id:this._internalId,operation:a,data:n}).then(function(){if(!t){var r=e?"mute":"unmute";i._subscription.dispatchEvent(new h.d(r,{kind:n}));}});},n._applyOptions=function(e){if(!e.video&&!e.audio)return Promise.reject(new ne("Options should need video or audio"));var t={};t.resolution=e.video.resolution,t.framerate=e.video.frameRate,t.bitrate=e.video.bitrateMultiplier?"x"+e.video.bitrateMultiplier.toString():void 0,t.keyFrameInterval=e.video.keyFrameInterval;var n={video:{from:e.from,parameters:t}};return e.audio&&(n.audio={from:e.from}),this._signaling.sendSignalingMessage("subscription-control",{id:this._internalId,operation:"update",data:n});},n._onRemoteStreamAdded=function(e){this._subscribedStream?(this._trackStream=!0,this._subscribedStream.mediaStream=e.streams[0],this._subscription&&this._subscribePromise.resolve(this._subscription)):m.a.warning("Received remote stream without subscription.");},n._onLocalIceCandidate=function(e){e.candidate?"stable"!==this._pc.signalingState?this._pendingCandidates.push(e.candidate):this._sendCandidate(e.candidate):m.a.debug("Empty candidate2.");},n._fireEndedEventOnPublicationOrSubscription=function(){if(!this._ended){this._ended=!0;var e=new h.e("ended");this._publication?(this._publication.dispatchEvent(e),this._publication.stop()):this._subscription&&(this._subscription.dispatchEvent(e),this._subscription.stop(),this._subscription.dispatchEvent("ended",new h.e("ended")));}},n._rejectPromise=function(e){if(!e)new ne("Connection failed or closed.");this._publishPromise?(this._publishPromise.reject(e),this._publishPromise=void 0):this._subscribePromise&&(this._subscribePromise.reject(e),this._subscribePromise=void 0);},n._onIceConnectionStateChange=function(e){e&&e.currentTarget&&(this.iceStatus=e.currentTarget.iceConnectionState,m.a.debug("ICE connection state changed to "+e.currentTarget.iceConnectionState),"closed"!==e.currentTarget.iceConnectionState&&"failed"!==e.currentTarget.iceConnectionState||"failed"===e.currentTarget.iceConnectionState&&this._handleError({data:"ICE connection failed",code:401}));},n._sendCandidate=function(e){this._signaling.sendSignalingMessage("soac",{id:this._internalId,signaling:{type:"candidate",candidate:{candidate:"a="+e.candidate,sdpMid:e.sdpMid,sdpMLineIndex:e.sdpMLineIndex}}});},n._createPeerConnection=function(e){var t=this,n=this._config.rtcConfiguration||{};a.b()&&(n.sdpSemantics="unified-plan"),this._pc=new RTCPeerConnection(n),this._pc.onicecandidate=function(e){t._onLocalIceCandidate.apply(t,[e]);},this._pc.ontrack=function(e){t._onRemoteStreamAdded.apply(t,[e]);},this._pc.oniceconnectionstatechange=function(e){t._onIceConnectionStateChange.apply(t,[e]);},this._pc.onremoteqosupdated=function(e){t._subscription&&t._subscription.dispatchEvent({type:"qosupdated",qos:e});};},n._getStats=function(e){var t=this;return void 0===e&&(e="landing"),this._pc?"analysis"==e?new Promise(function(e){t._pc.getStats(function(t){e(t.result());});}):this._pc.getStats():Promise.reject(new ne("PeerConnection is not available."));},n._replaceTrack=function(e,t){"video"===e&&this._videoSender.sender.replaceTrack(t),"audio"===e&&this._audioSender.sender.replaceTrack(t);},n._readyHandler=function(){var e=this;if(this._subscribePromise){this._subscription=new de.b(this._internalId,function(){return e._unsubscribe();},function(t){return e._getStats(t);},function(t){return e._muteOrUnmute(!0,!1,t);},function(t){return e._muteOrUnmute(!1,!1,t);},function(t){return e._applyOptions(t);},function(){return e._restartSubscribeIce();}),this._subscribedStream.addEventListener("ended",function(){e._subscription.dispatchEvent("ended",new h.e("ended"));}),this._trackStream&&this._subscribePromise.resolve(this._subscription);var t=setTimeout(function(){e._subscription.dispatchEvent(new h.e("ready")),clearTimeout(t);},800);}else this._publishPromise&&(this._publication=new I.b(this._internalId,function(){return e._unpublish();},function(t){return e._getStats(t);},function(t,n){return e._muteOrUnmute(!0,!0,t,n);},function(t){return e._muteOrUnmute(!1,!0,t);},function(){return e._restartPublishIce();},function(t,n){return e._replaceTrack(t,n);}),this._publishPromise.resolve(this._publication));this._publishPromise=null,this._subscribePromise=null;},n._sdpHandler=function(e){var t=this;"answer"===e.type&&((this._publication||this._publishPromise)&&this._options&&(e.sdp=this._setRtpSenderOptions(e.sdp,this._options)),this._pc.setRemoteDescription(e).then(function(){if(t._pendingCandidates.length>0)for(var e,n=fe(t._pendingCandidates);!(e=n()).done;){var r=e.value;t._sendCandidate(r);}},function(e){m.a.error("Set remote description failed: "+e),(t._publication||t._publishPromise)&&t._restartPublishIce(),(t._subscribePromise||t._subscription)&&t._restartSubscribeIce();}));},n._errorHandler=function(e){return this._handleError(e);},n._handleError=function(e){var t=new ne(e.data,e.code);if(this._publishPromise||this._subscribePromise)return this._rejectPromise(t);if(!this._ended){var n=this._publication||this._subscription;if(n){var r=new h.a("error",{error:t});n.dispatchEvent(r);}else m.a.warning("Neither publication nor subscription is available.");}},n._setCodecOrder=function(e,t){if(this._publication||this._publishPromise){if(t.audio)e=N(e,"audio",Array.from(t.audio,function(e){return e.codec.name;}));if(t.video)e=N(e,"video",Array.from(t.video,function(e){return e.codec.name;}));}else{if(t.audio&&t.audio.codecs)e=N(e,"audio",Array.from(t.audio.codecs,function(e){return e.name;}));if(t.video&&t.video.codecs)e=N(e,"video",Array.from(t.video.codecs,function(e){return e.name;}));}return e;},n._setMaxBitrate=function(e,t){return"object"==typeof t.audio&&(e=B(e,t.audio)),"object"==typeof t.video&&(e=B(e,t.video)),e;},n._setRtpSenderOptions=function(e,t){return this._isRtpEncodingParameters(t.audio)||this._isRtpEncodingParameters(t.video)?e:e=this._setMaxBitrate(e,t);},n._setRtpReceiverOptions=function(e,t){return this._isRtpEncodingParameters(t.video)&&a.e()&&t.video.length>1&&(e=function(e,t,n){var r,i;if(!(n&&n>1))return e;var o=e.split("\r\n"),a=T(o,"m=",t);if(null===a)return e;var c=C(o,a+1,-1,"m=");null===c&&(c=o.length);for(var s=function s(e){return e.split(" ")[0].split(":")[1];},u=new Set(),d=new Set(),f=new Set(),l=[],p=[],m=a+1;m<c;){var h=o[m];if(""===h)break;if(h.indexOf("a=ssrc:")>-1){var v=s(o[m]);if(d.add(v),h.indexOf("cname")>-1||h.indexOf("msid")>-1)for(var g=1;g<n;g++){var b=parseInt(v)+g+"";l.push(h.replace(v,b));}else u.add(h);}if(h.indexOf("a=ssrc-group:FID")>-1){var y=h.split(" ");f.add(y[2]);for(var S=1;S<n;S++){var w=parseInt(y[1])+S+"",_=parseInt(y[2])+S+"";p.push(h.replace(y[1],w).replace(y[2],_));}}m++;}var I=m;return d.forEach(function(e){if(!f.has(e)){var t="a=ssrc-group:SIM";t=t+" "+e;for(var r=1;r<n;r++){t=t+" "+(parseInt(e)+r);}p.push(t);}}),l.sort(),(r=o).splice.apply(r,[I,0].concat(p)),(i=o).splice.apply(i,[I,0].concat(l)),e=(o=o.filter(function(e){return!u.has(e);})).join("\r\n");}(e,"video",t.video.length)),this._isRtpEncodingParameters(t.video)&&this._videoCodecs?e=N(e,"video",this._videoCodecs):this._isRtpEncodingParameters(t.audio)||this._isRtpEncodingParameters(t.video)?e:e=this._setCodecOrder(e,t);},n._onStreamEvent=function(e){var t,n;(this._publication&&e.id===this._publication.id?t=this._publication:this._subscribedStream&&e.id===this._subscribedStream.id&&(t=this._subscription),t)&&("audio.status"===e.data.field?n=c.c.AUDIO:"video.status"===e.data.field?n=c.c.VIDEO:m.a.warning("Invalid data field for stream update info."),"active"===e.data.value?t.dispatchEvent(new h.d("unmute",{kind:n})):"inactive"===e.data.value?t.dispatchEvent(new h.d("mute",{kind:n})):m.a.warning("Invalid data value for stream update info."));},n._isRtpEncodingParameters=function(e){if(!Array.isArray(e))return!1;var t=e[0];return t.codecPayloadType||t.dtx||t.active||t.ptime||t.maxFramerate||t.scaleResolutionDownBy||t.rid;},n._isOwtEncodingParameters=function(e){return!!Array.isArray(e)&&!!e[0].codec;},t;}(h.b),me=n(24),he=n(15);function ve(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return ge(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ge(e,t);}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]};};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}return(n=e[Symbol.iterator]()).next.bind(n);}function ge(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++){r[n]=e[n];}return r;}var be=function be(e){var t={};try{t=JSON.parse(e.metadata);}catch(e){console.error(e);}return t;},ye=1,Se=2,we=3,_e=function _e(e,t){var n=new h.e(e,t);return n.participant=t.participant,n;},Ie=function Ie(e,t){Object.setPrototypeOf(this,new h.b()),e=e||{};var n,r,i=this,o=ye,c=t||new oe();i.remoteStreams=new Map(),i.participants=new Map();var s=new Map(),u=new Map();function d(e,t){if("soac"===e||"progress"===e){if(!u.has(t.id))return void m.a.warning("Cannot find a channel for incoming data.");u.get(t.id).onMessage(e,t);}else"stream"===e?"add"===t.status?function(e){var t=f(e);i.remoteStreams.set(t.id,t);var n=new p.d("streamadded",{stream:t});i.dispatchEvent(n);}(t.data):"remove"===t.status?function(e){if(!i.remoteStreams.has(e.id))return void m.a.warning("Cannot find specific remote stream.");var t=i.remoteStreams.get(e.id),n=new h.e("ended");i.remoteStreams.delete(t.id),t.dispatchEvent(n),i.dispatchEvent({type:"streamended",stream:t,isHost:e.isHost});}(t):"update"===t.status&&(i.dispatchEvent({type:"streamUpdate",data:t}),"audio.status"===t.data.field||"video.status"===t.data.field?u.forEach(function(n){n.onMessage(e,t);}):"activeInput"===t.data.field?function(e){if(!i.remoteStreams.has(e.id))return void m.a.warning("Cannot find specific remote stream.");var t=i.remoteStreams.get(e.id),n=new me.a("activeaudioinputchange",{activeAudioInputStreamId:e.data.value});t.dispatchEvent(n),i.dispatchEvent({type:"activeaudioinputchange",activeAudioInputStreamId:e.data.value});}(t):"video.layout"===t.data.field?function(e){if(!i.remoteStreams.has(e.id))return void m.a.warning("Cannot find specific remote stream.");var t=i.remoteStreams.get(e.id),n=new me.b("layoutchange",{layout:e.data.value});t.dispatchEvent(n);}(t):"."===t.data.field?function(e){if(!i.remoteStreams.has(e.id))return void m.a.warning("Cannot find specific remote stream.");var t=i.remoteStreams.get(e.id);t.settings=he.a(e.media),t.capabilities=he.b(e.media);var n=new h.e("updated");t.dispatchEvent(n);}(t.data.value):m.a.warning("Unknown stream event from MCU.")):"text"===e?function(e){var t=new h.c("messagereceived",{message:e.message,origin:e.from,to:e.to,mSeq:e.m_seq});i.dispatchEvent(t);}(t):"participant"===e?function(e){if("join"===e.action){e=e.data;var t=be(e),n=new ae.a(e.id,e.role,e.user,t.joinMeetWait,t.photo,t.type,t.deviceType,Boolean(t.localRecord));i.participants.set(e.id,n);var r=new _e("participantjoined",{participant:n});i.dispatchEvent(r);}else if("leave"===e.action){var o=e.data;if(!i.participants.has(o))return void m.a.warning("Received leave message from MCU for an unknown participant.");var a=i.participants.get(o);i.participants.delete(o),a.dispatchEvent(new h.e("left")),i.dispatchEvent({type:"participantLeft",participant:a});}}(t):"sipAndPstnJoin"===e&&i.dispatchEvent({type:"sipAndPstnJoin",data:t});}function f(e){if("mixed"===e.type)return new me.c(e);var t,n;e.media.audio&&(t=e.media.audio.source),e.media.video&&(n=e.media.video.source);var r=new p.b(e.id,e.info.owner,void 0,new p.e(t,n),e.info.attributes);return r.settings=he.a(e.media),r.capabilities=he.b(e.media),r;}function l(e,t){return c.send(e,t);}function v(){var t=Object.create(h.b);t.sendSignalingMessage=l;var n=new pe(e,t);return n.addEventListener("id",function(e){u.set(e.message,n);}),n;}function g(){i.participants.clear(),i.remoteStreams.clear();}c.addEventListener("data",function(e){var t=e.message.data;d(e.message.notification,t),i.dispatchEvent({type:"data",event:e});}),c.addEventListener("disconnect",function(){g(),o=ye,i.dispatchEvent(new h.e("serverdisconnected"));}),c.addEventListener("getParticipantsList",function(e){e.list.forEach(function(e){var t=be(e);Object.assign(e,{joinMeetWait:t.joinMeetWait,photo:t.photo,deviceType:t.deviceType,localRecord:Boolean(t.localRecord)});}),i.dispatchEvent({type:"getParticipantsList",list:e.list});}),c.addEventListener("room-infos",function(e){i.dispatchEvent({type:"room-infos",info:e.info});}),c.addEventListener("reconnecting",function(){i.dispatchEvent(new h.e("reconnecting"));}),c.addEventListener("relogin",function(){i.dispatchEvent(new h.e("relogin"));}),c.addEventListener("droped",function(){i.dispatchEvent(new h.e("droped"));}),Object.defineProperty(this,"info",{configurable:!1,get:function get(){return r?new ce(r.id,Array.from(i.participants,function(e){return e[1];}),Array.from(i.remoteStreams,function(e){return e[1];}),n):null;}}),this.join=function(e){return new Promise(function(t,s){var u=JSON.parse(re.decodeBase64(e)),d=!0===u.secure,l=u.host;if("string"==typeof l){if(-1===l.indexOf("http")&&(l=d?"https://"+l:"http://"+l),o===ye){o=Se;var p={token:e,userAgent:a.f(),protocol:"1.0"};c.connect(l,d,p).then(function(e){if(o=we,void 0!==(r=e.room).streams)for(var a,c=ve(r.streams);!(a=c()).done;){var s=a.value;"mixed"===s.type&&(s.viewport=s.info.label),i.remoteStreams.set(s.id,f(s));}if(e.room&&void 0!==e.room.participants)for(var u,d=ve(e.room.participants);!(u=d()).done;){var l=u.value;i.participants.set(l.id,new ae.a(l.id,l.role,l.user)),l.id===e.id&&(n=i.participants.get(l.id));}t(new ce(e.room.id,Array.from(i.participants.values()),Array.from(i.remoteStreams.values()),n));},function(e){o=ye,s(new ne(e));});}else s(new ne("connection state invalid"));}else s(new ne("Invalid host."));});},this.publish=function(e,t){return e instanceof p.a?s.has(e.mediaStream.id)?Promise.reject(new ne("Cannot publish a published stream.")):v().publish(e,t):Promise.reject(new ne("Invalid stream."));},this.subscribe=function(e,t){return e instanceof p.b?v().subscribe(e,t):Promise.reject(new ne("Invalid stream."));},this.send=function(e,t){return void 0===t&&(t="all"),l("text",{to:t,message:e});},this.sendCommand=function(e,t){return l(e,t);},this.leave=function(){return c.disconnect().then(function(){g(),o=ye;});};},xe=r,Pe=o;},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable;})),n.push.apply(n,r);}return n;}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach(function(t){r(e,t,n[t]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t));});}return e;}function a(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. ";}var c="function"==typeof Symbol&&Symbol.observable||"@@observable",s=function s(){return Math.random().toString(36).substring(7).split("").join(".");},u={INIT:"@@redux/INIT"+s(),REPLACE:"@@redux/REPLACE"+s(),PROBE_UNKNOWN_ACTION:function PROBE_UNKNOWN_ACTION(){return"@@redux/PROBE_UNKNOWN_ACTION"+s();}};function d(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);){t=Object.getPrototypeOf(t);}return Object.getPrototypeOf(e)===t;}function f(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++){t[n]=arguments[n];}return 0===t.length?function(e){return e;}:1===t.length?t[0]:t.reduce(function(e,t){return function(){return e(t.apply(void 0,arguments));};});}function l(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(i){return"function"==typeof i?i(n,r,e):t(i);};};};}var p=l();p.withExtraArgument=l;var m=p,h=n(3),v=n.n(h),g=n(35),b={share:!1,recording:!1,participant:!1,translate:!1,docshare:!1,chat:!1,participantTab:"meetingRoom"},y=function y(e,t){switch(void 0===e&&(e=b),t.type){case g.a:return v()({},e,t.playload);default:return e;}},S=n(26),w={mirror:Object(S.b)("mirror"),hideTags:!1,audioTipEnabled:!1,allMuted:!1},_={hasRequesting:!1,getRequesting:!1,controllerId:"",sharerId:"",beControled:!1,controled:!1,shareWhRatio:null,shareType:"",shareOs:""},I={showUnmuteModal:!1,showLocalRecordingModal:!1,showRecordPathError:!1,recordPathError:""},x={show:!1,placement:"",confirm:""},P=function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var i=t[r];0,"function"==typeof e[i]&&(n[i]=e[i]);}var o,c=Object.keys(n);try{!function(e){Object.keys(e).forEach(function(t){var n=e[t];if(void 0===n(void 0,{type:u.INIT}))throw new Error(a(12));if(void 0===n(void 0,{type:u.PROBE_UNKNOWN_ACTION()}))throw new Error(a(13));});}(n);}catch(e){o=e;}return function(e,t){if(void 0===e&&(e={}),o)throw o;for(var r=!1,i={},s=0;s<c.length;s++){var u=c[s],d=n[u],f=e[u],l=d(f,t);if(void 0===l){t&&t.type;throw new Error(a(14));}i[u]=l,r=r||l!==f;}return(r=r||c.length!==Object.keys(e).length)?i:e;};}({tagStatus:y,kty:function kty(e,t){switch(void 0===e&&(e={}),t.type){case"KTY":return v()({},e,t.playLoad);default:return e;}},settings:function settings(e,t){switch(void 0===e&&(e=w),t.type){case"SETTINGS":return v()({},e,t.playload);case"EnableAudioTip":return v()({},e,{audioTipEnabled:t.payload});case"AllMuted":return v()({},e,{allMuted:t.payload});default:return e;}},desktopControl:function desktopControl(e,t){switch(void 0===e&&(e=_),t.type){case"Desktop_Control":return v()({},e,t.playload);default:return e;}},chatId:function chatId(e,t){switch(void 0===e&&(e="all"),t.type){case"Chat_Id":return t.payload;default:return e;}},ui:function ui(e,t){switch(void 0===e&&(e=I),t.type){case"Show_Unmute_Modal":return v()({},e,{showUnmuteModal:t.payload});case"show_local_recording_modal":return v()({},e,{showLocalRecordingModal:t.payload});case"record_path_error":var n=t.payload;return v()({},e,{showRecordPathError:n.show,recordPathError:n.error});default:return e;}},tipShow:function tipShow(e,t){switch(void 0===e&&(e={midNetwork:!1,topNetwork:!1}),t.type){case"Network_TipShow":return v()({},e,{midNetwork:t.payload});case"Network_Top_TipShow":return v()({},e,{topNetwork:t.payload});default:return e;}},leaveModalShow:function leaveModalShow(e,t){switch(void 0===e&&(e=x),t.type){case"Leave_modal_show":return v()({},e,t.payload);default:return e;}},winFullScreen:function winFullScreen(e,t){switch(void 0===e&&(e=!1),t.type){case"Win_Full_Screen":return t.payload;default:return e;}},deviceTip:function deviceTip(e,t){switch(void 0===e&&(e=""),t.type){case"Device_err_Type":return t.payLoad;default:return e;}}}),k=(n(132),Object({RUN_ENV:"meet"}).PLATFORM_ENV),E=function e(t,n,r){var i;if("function"==typeof n&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw new Error(a(0));if("function"==typeof n&&void 0===r&&(r=n,n=void 0),void 0!==r){if("function"!=typeof r)throw new Error(a(1));return r(e)(t,n);}if("function"!=typeof t)throw new Error(a(2));var o=t,s=n,f=[],l=f,p=!1;function m(){l===f&&(l=f.slice());}function h(){if(p)throw new Error(a(3));return s;}function v(e){if("function"!=typeof e)throw new Error(a(4));if(p)throw new Error(a(5));var t=!0;return m(),l.push(e),function(){if(t){if(p)throw new Error(a(6));t=!1,m();var n=l.indexOf(e);l.splice(n,1),f=null;}};}function g(e){if(!d(e))throw new Error(a(7));if(void 0===e.type)throw new Error(a(8));if(p)throw new Error(a(9));try{p=!0,s=o(s,e);}finally{p=!1;}for(var t=f=l,n=0;n<t.length;n++){(0,t[n])();}return e;}function b(e){if("function"!=typeof e)throw new Error(a(10));o=e,g({type:u.REPLACE});}function y(){var e,t=v;return(e={subscribe:function subscribe(e){if("object"!=typeof e||null===e)throw new Error(a(11));function n(){e.next&&e.next(h());}return n(),{unsubscribe:t(n)};}})[c]=function(){return this;},e;}return g({type:u.INIT}),(i={dispatch:g,subscribe:v,getState:h,replaceReducer:b})[c]=y,i;}(P,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++){t[n]=arguments[n];}return function(e){return function(){var n=e.apply(void 0,arguments),r=function r(){throw new Error(a(15));},i={getState:n.getState,dispatch:function dispatch(){return r.apply(void 0,arguments);}},c=t.map(function(e){return e(i);});return r=f.apply(void 0,c)(n.dispatch),o(o({},n),{},{dispatch:r});};};}.apply(void 0,[m]));E.subscribe(function(){"electron"===k&&(0,n(133).syncStatus)();});t.a=E;},function(e,t,n){"use strict";n.d(t,"a",function(){return f;}),n.d(t,"b",function(){return l;});var r=n(17),i=n(11),o=n(18),a=n(23);function c(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t);}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]};};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}return(n=e[Symbol.iterator]()).next.bind(n);}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++){r[n]=e[n];}return r;}function u(e,t){return e-t;}function d(e,t){return e.width!==t.width?e.width-t.width:e.height-t.height;}function f(e){var t,n,a,c,s,u,d,f;return e.audio&&(e.audio.format&&(n=new o.a(e.audio.format.codec,e.audio.format.channelNum,e.audio.format.sampleRate)),t=new r.a(n)),e.video&&(e.video.format&&(c=new o.b(e.video.format.codec,e.video.format.profile)),e.video.parameters&&(e.video.parameters.resolution&&(s=new i.b(e.video.parameters.resolution.width,e.video.parameters.resolution.height)),u=e.video.parameters.framerate,d=1e3*e.video.parameters.bitrate,f=e.video.parameters.keyFrameInterval),a=new r.d(c,s,u,d,f)),new r.c(t,a);}function l(e){var t,n;if(e.audio){var r=[];if(e.audio&&e.audio.format&&r.push(new o.a(e.audio.format.codec,e.audio.format.channelNum,e.audio.format.sampleRate)),e.audio&&e.audio.optional&&e.audio.optional.format)for(var s,f=c(e.audio.optional.format);!(s=f()).done;){var l=s.value,p=new o.a(l.codec,l.channelNum,l.sampleRate);r.push(p);}r.sort(),t=new a.a(r);}if(e.video){var m=[];if(e.video&&e.video.format&&m.push(new o.b(e.video.format.codec,e.video.format.profile)),e.video&&e.video.optional&&e.video.optional.format)for(var h,v=c(e.video.optional.format);!(h=v()).done;){var g=h.value,b=new o.b(g.codec,g.profile);m.push(b);}m.sort();var y=Array.from(e.video.optional.parameters.resolution,function(e){return new i.b(e.width,e.height);});e.video&&e.video.parameters&&e.video.parameters.resolution&&y.push(new i.b(e.video.parameters.resolution.width,e.video.parameters.resolution.height)),y.sort(d);var S=Array.from(e.video.optional.parameters.bitrate,function(e){return"string"==typeof(t=e)&&t.startsWith("x")?Number.parseFloat(t.replace(/^x/,"")):(L.Logger.warning("Invalid bitrate multiplier input."),0);var t;});S.push(1),S.sort(u);var w=JSON.parse(JSON.stringify(e.video.optional.parameters.framerate));e.video&&e.video.parameters&&e.video.parameters.framerate&&w.push(e.video.parameters.framerate),w.sort(u);var _=JSON.parse(JSON.stringify(e.video.optional.parameters.keyFrameInterval));e.video&&e.video.parameters&&e.video.parameters.keyFrameInterval&&_.push(e.video.parameters.keyFrameInterval),_.sort(u),n=new a.d(m,y,w,S,_);}return new a.c(t,n);}},function(e,t,n){var r=n(45),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o;},function(e,t,n){"use strict";n.d(t,"a",function(){return u;}),n.d(t,"d",function(){return d;}),n.d(t,"c",function(){return f;}),n.d(t,"b",function(){return l;});var r=n(12),i=n.n(r),o=n(8),a=n.n(o),c=n(10),s=(n(11),n(4)),u=function u(e){this.codec=e;},d=function d(e,t,n,r,i){this.codec=e,this.resolution=t,this.frameRate=n,this.bitrate=r,this.keyFrameInterval=i;},f=function f(e,t){this.audio=e,this.video=t;},l=function(e){function t(t,n,r,o,a,s,u){var d;return d=e.call(this)||this,Object.defineProperty(i()(d),"id",{configurable:!1,writable:!1,value:t||c.a()}),d.stop=n,d.getStats=r,d.mute=o,d.unmute=a,d.restartIce=s,d.replaceTrack=u,d;}return a()(t,e),t;}(s.b);},function(e,t,n){"use strict";n.d(t,"a",function(){return r;}),n.d(t,"b",function(){return i;});var r=function r(e,t,n){this.name=e,this.channelCount=t,this.clockRate=n;},i=function i(e,t){this.name=e,this.profile=t;};},function(e,t,n){"use strict";t.decode=t.parse=n(130),t.encode=t.stringify=n(131);},function(e,t,n){var r=n(74),i=n(79);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0;};},function(e,t,n){var r=n(57),i=n(36),o=n(58),a=n(59);function c(t){var n="function"==typeof Map?new Map():void 0;return e.exports=c=function c(e){if(null===e||!o(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t);}function t(){return a(e,arguments,r(this).constructor);}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),i(t,e);},e.exports.default=e.exports,e.exports.__esModule=!0,c(t);}e.exports=c,e.exports.default=e.exports,e.exports.__esModule=!0;},function(e,t,n){var r=n(61);e.exports=function(e,t){return r(e,t);};},function(e,t,n){"use strict";n.d(t,"a",function(){return s;}),n.d(t,"d",function(){return u;}),n.d(t,"c",function(){return d;}),n.d(t,"b",function(){return f;});var r=n(12),i=n.n(r),o=n(8),a=n.n(o),c=(n(11),n(18),n(4)),s=function s(e){this.codecs=e;},u=function u(e,t,n,r,i){this.codecs=e,this.resolutions=t,this.frameRates=n,this.bitrateMultipliers=r,this.keyFrameIntervals=i;},d=function d(e,t){this.audio=e,this.video=t;},f=function(e){function t(t,n,r,o,a,c,s){var u;if(u=e.call(this)||this,!t)throw new TypeError("ID cannot be null or undefined.");return Object.defineProperty(i()(u),"id",{configurable:!1,writable:!1,value:t}),u.stop=n,u.getStats=r,u.mute=o,u.unmute=a,u.applyOptions=c,u.restartIce=s,u;}return a()(t,e),t;}(c.b);},function(e,t,n){"use strict";n.d(t,"c",function(){return s;}),n.d(t,"a",function(){return u;}),n.d(t,"b",function(){return d;});var r=n(8),i=n.n(r),o=n(9),a=n(15),c=n(4),s=function(e){function t(t){var n;if("mixed"!==t.type)throw new TypeError("Not a mixed stream");return(n=e.call(this,t.id,void 0,void 0,new o.e("mixed","mixed"))||this).settings=a.a(t.media),n.capabilities=new a.b(t.media),n;}return i()(t,e),t;}(o.b),u=function(e){function t(t,n){var r;return(r=e.call(this,t)||this).activeAudioInputStreamId=n.activeAudioInputStreamId,r;}return i()(t,e),t;}(c.e),d=function(e){function t(t,n){var r;return(r=e.call(this,t)||this).layout=n.layout,r;}return i()(t,e),t;}(c.e);},function(e,t,n){"use strict";n.d(t,"a",function(){return c;});var r=n(12),i=n.n(r),o=n(8),a=n.n(o),c=function(e){function t(t,n,r,o,a,c,s,u){var d;return void 0===o&&(o=""),void 0===a&&(a=""),d=e.call(this)||this,Object.defineProperty(i()(d),"id",{configurable:!1,writable:!1,value:t}),Object.defineProperty(i()(d),"role",{configurable:!1,writable:!1,value:n}),Object.defineProperty(i()(d),"userId",{configurable:!1,writable:!1,value:r}),Object.defineProperty(i()(d),"joinMeetWait",{configurable:!1,writable:!1,value:o}),Object.defineProperty(i()(d),"photo",{configurable:!1,writable:!1,value:a}),Object.defineProperty(i()(d),"type",{configurable:!1,writable:!1,value:c}),Object.defineProperty(i()(d),"deviceType",{configurable:!1,writable:!1,value:s}),Object.defineProperty(i()(d),"localRecord",{configurable:!1,writable:!1,value:u}),d;}return a()(t,e),t;}(n(4).b);},function(e,t,n){"use strict";n.d(t,"a",function(){return r;}),n.d(t,"b",function(){return i;});var r=function r(e,t){return void 0===t&&(t=2),"number"!=typeof e?e:parseFloat(e.toFixed(t));},i=function i(e){var t=localStorage.getItem("pre_setting_video");return!!t&&JSON.parse(t)[e];};},function(e){e.exports=JSON.parse('{"name":"OctoMeeting","version":"1.19.9","sdkVersion":"KTY-web-release-20210223-1","description":"Octo Meeting application","main":"app.js","scripts":{"start":"cross-env PLATFORM_ENV=web RUN_ENV=local NODE_OPTIONS=--max_old_space_size=4096 luban-pack dev","build:dev":"cross-env RUN_ENV=dev PLATFORM_ENV=web NODE_OPTIONS=--max_old_space_size=4096 luban-pack build","build:go":"cross-env RUN_ENV=go PLATFORM_ENV=web NODE_OPTIONS=--max_old_space_size=4096 luban-pack build","build:meet":"cross-env RUN_ENV=meet PLATFORM_ENV=web USECDN=meet NODE_OPTIONS=--max_old_space_size=4096 luban-pack build","e:start":"node --max_old_space_size=4096 script/dev/start.js","e:buildgo":"rimraf out && cross-env RUN_ENV=go node script/build/build.js","e:buildgreen":"rimraf out && cross-env RUN_ENV=green node script/build/build.js","e:buildmeet":"rimraf out && cross-env RUN_ENV=meet node script/build/build.js"},"author":"ketianyun","license":"CC0-1.0","dependencies":{"axios":"^0.20.0","babel-plugin-transform-async-to-generator":"^6.24.1","babel-polyfill":"^6.26.0","copy-to-clipboard":"^3.3.1","electron-log":"^4.3.1","electron-squirrel-startup":"^1.0.0","electron-updater":"4.2.0","form-data":"^4.0.0","js-base64":"^2.5.1","react-cropper":"^2.1.7","robotjs":"https://git.ketianyun.com/Terry/robotjs.git"},"devDependencies":{"@babel/plugin-proposal-class-properties":"^7.13.0","@babel/plugin-transform-async-to-generator":"^7.13.0","@sentry/react":"^5.21.1","@tinymce/tinymce-react":"^3.8.1","@types/redux-logger":"^3.0.8","antd":"^4.5.4","axios":"^0.20.0","classnames":"^2.2.6","copy-to-clipboard":"^3.3.1","electron":"11.1.1","electron-builder":"^22.10.5","electron-notarize":"^1.0.0","electron-rebuild":"^1.11.0","js-yaml":"^4.1.0","lodash":"^4.17.15","luban-class":"^1.0.1","luban-pack":"^7.0.1","luban-view":"^1.8.14","md5":"^2.2.1","naming-style":"^1.0.1","prop-types":"^15.7.2","pubsub-js":"^1.9.0","qrcode.react":"^1.0.1","qs":"^6.9.4","react":"^16.13.1","react-checkbox-tree":"^1.6.0","react-contextmenu":"^2.14.0","react-dom":"^16.8.6","react-intl":"^5.9.2","react-intl-universal":"^2.4.2","react-redux":"^7.1.0","react-router":"^5.1.2","react-router-dom":"^5.0.1","redux":"^4.0.4","redux-logger":"^3.0.6","redux-thunk":"^2.3.0","rimraf":"^3.0.0"}}');},function(e,t,n){var r=n(64),i=n(65),o=n(66),a=n(67),c=n(68);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1]);}}s.prototype.clear=r,s.prototype.delete=i,s.prototype.get=o,s.prototype.has=a,s.prototype.set=c,e.exports=s;},function(e,t,n){var r=n(43);e.exports=function(e,t){for(var n=e.length;n--;){if(r(e[n][0],t))return n;}return-1;};},function(e,t,n){var r=n(38),i=n(75),o=n(76),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e);};},function(e,t,n){var r=n(20)(Object,"create");e.exports=r;},function(e,t,n){var r=n(88);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map;};},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e;};},function(e,t){var n="",r="";n="meet.ketianyun.com",r="https://log.ketianyun.com";e.exports={publicPath:n,customerService:"https://tky.ketianyun.com/im/text/4028838b5ac815e3015ac81645f90000.html",downLoadWin:"https://www.ketianyun.com/meeting/octopus/app/download/windows/meetingSetup.exe",downLoadMac:"https://www.ketianyun.com/meeting/octopus/app/download/mac/ktymeeting.dmg",downLoadAll:"https://www.ketianyun.com/meeting/octopus/app/pc.html",whiteBoardPath:"wb.ketianyun.com",cdnPath:"https://meetcdn.ketianyun.com/meet",modalErrCode:[-100,-101,-102,-107,-205,-601,-600,-604,-605,-703],analysisUrl:r};},function(e,t,n){"use strict";n.d(t,"a",function(){return r;});var r="Tag_Status";},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e;},e.exports.default=e.exports,e.exports.__esModule=!0,n(t,r);}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0;},function(e,t,n){var r=n(20)(n(16),"Map");e.exports=r;},function(e,t,n){var r=n(16).Symbol;e.exports=r;},function(e,t){var n;n=function(){return this;}();try{n=n||new Function("return this")();}catch(e){"object"==typeof window&&(n=window);}e.exports=n;},function(e,t){var n=Array.isArray;e.exports=n;},function(e,t,n){"use strict";var r=n(13);t.a=function(){return new r.b.ConferenceClient({rtcConfiguration:{iceServers:[{urls:["stun:stun1.ketianyun.com:3478"]}]}},void 0);};},function(e,t,n){var r,i,o,a,_c;r=n(128),i=n(54).utf8,o=n(129),a=n(54).bin,(_c=function c(e,t){e.constructor==String?e=t&&"binary"===t.encoding?a.stringToBytes(e):i.stringToBytes(e):o(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var n=r.bytesToWords(e),s=8*e.length,u=1732584193,d=-271733879,f=-1732584194,l=271733878,p=0;p<n.length;p++){n[p]=16711935&(n[p]<<8|n[p]>>>24)|4278255360&(n[p]<<24|n[p]>>>8);}n[s>>>5]|=128<<s%32,n[14+(s+64>>>9<<4)]=s;var m=_c._ff,h=_c._gg,v=_c._hh,g=_c._ii;for(p=0;p<n.length;p+=16){var b=u,y=d,S=f,w=l;u=m(u,d,f,l,n[p+0],7,-680876936),l=m(l,u,d,f,n[p+1],12,-389564586),f=m(f,l,u,d,n[p+2],17,606105819),d=m(d,f,l,u,n[p+3],22,-1044525330),u=m(u,d,f,l,n[p+4],7,-176418897),l=m(l,u,d,f,n[p+5],12,1200080426),f=m(f,l,u,d,n[p+6],17,-1473231341),d=m(d,f,l,u,n[p+7],22,-45705983),u=m(u,d,f,l,n[p+8],7,1770035416),l=m(l,u,d,f,n[p+9],12,-1958414417),f=m(f,l,u,d,n[p+10],17,-42063),d=m(d,f,l,u,n[p+11],22,-1990404162),u=m(u,d,f,l,n[p+12],7,1804603682),l=m(l,u,d,f,n[p+13],12,-40341101),f=m(f,l,u,d,n[p+14],17,-1502002290),u=h(u,d=m(d,f,l,u,n[p+15],22,1236535329),f,l,n[p+1],5,-165796510),l=h(l,u,d,f,n[p+6],9,-1069501632),f=h(f,l,u,d,n[p+11],14,643717713),d=h(d,f,l,u,n[p+0],20,-373897302),u=h(u,d,f,l,n[p+5],5,-701558691),l=h(l,u,d,f,n[p+10],9,38016083),f=h(f,l,u,d,n[p+15],14,-660478335),d=h(d,f,l,u,n[p+4],20,-405537848),u=h(u,d,f,l,n[p+9],5,568446438),l=h(l,u,d,f,n[p+14],9,-1019803690),f=h(f,l,u,d,n[p+3],14,-187363961),d=h(d,f,l,u,n[p+8],20,1163531501),u=h(u,d,f,l,n[p+13],5,-1444681467),l=h(l,u,d,f,n[p+2],9,-51403784),f=h(f,l,u,d,n[p+7],14,1735328473),u=v(u,d=h(d,f,l,u,n[p+12],20,-1926607734),f,l,n[p+5],4,-378558),l=v(l,u,d,f,n[p+8],11,-2022574463),f=v(f,l,u,d,n[p+11],16,1839030562),d=v(d,f,l,u,n[p+14],23,-35309556),u=v(u,d,f,l,n[p+1],4,-1530992060),l=v(l,u,d,f,n[p+4],11,1272893353),f=v(f,l,u,d,n[p+7],16,-155497632),d=v(d,f,l,u,n[p+10],23,-1094730640),u=v(u,d,f,l,n[p+13],4,681279174),l=v(l,u,d,f,n[p+0],11,-358537222),f=v(f,l,u,d,n[p+3],16,-722521979),d=v(d,f,l,u,n[p+6],23,76029189),u=v(u,d,f,l,n[p+9],4,-640364487),l=v(l,u,d,f,n[p+12],11,-421815835),f=v(f,l,u,d,n[p+15],16,530742520),u=g(u,d=v(d,f,l,u,n[p+2],23,-995338651),f,l,n[p+0],6,-198630844),l=g(l,u,d,f,n[p+7],10,1126891415),f=g(f,l,u,d,n[p+14],15,-1416354905),d=g(d,f,l,u,n[p+5],21,-57434055),u=g(u,d,f,l,n[p+12],6,1700485571),l=g(l,u,d,f,n[p+3],10,-1894986606),f=g(f,l,u,d,n[p+10],15,-1051523),d=g(d,f,l,u,n[p+1],21,-2054922799),u=g(u,d,f,l,n[p+8],6,1873313359),l=g(l,u,d,f,n[p+15],10,-30611744),f=g(f,l,u,d,n[p+6],15,-1560198380),d=g(d,f,l,u,n[p+13],21,1309151649),u=g(u,d,f,l,n[p+4],6,-145523070),l=g(l,u,d,f,n[p+11],10,-1120210379),f=g(f,l,u,d,n[p+2],15,718787259),d=g(d,f,l,u,n[p+9],21,-343485551),u=u+b>>>0,d=d+y>>>0,f=f+S>>>0,l=l+w>>>0;}return r.endian([u,d,f,l]);})._ff=function(e,t,n,r,i,o,a){var c=e+(t&n|~t&r)+(i>>>0)+a;return(c<<o|c>>>32-o)+t;},_c._gg=function(e,t,n,r,i,o,a){var c=e+(t&r|n&~r)+(i>>>0)+a;return(c<<o|c>>>32-o)+t;},_c._hh=function(e,t,n,r,i,o,a){var c=e+(t^n^r)+(i>>>0)+a;return(c<<o|c>>>32-o)+t;},_c._ii=function(e,t,n,r,i,o,a){var c=e+(n^(t|~r))+(i>>>0)+a;return(c<<o|c>>>32-o)+t;},_c._blocksize=16,_c._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var n=r.wordsToBytes(_c(e,t));return t&&t.asBytes?n:t&&t.asString?a.bytesToString(n):r.bytesToHex(n);};},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t;};},function(e,t,n){var r=n(30),i=n(46);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t;};},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n;}).call(this,n(39));},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t);};},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e);}catch(e){}try{return e+"";}catch(e){}}return"";};},function(e,t,n){var r=n(80),i=n(87),o=n(89),a=n(90),c=n(91);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1]);}}s.prototype.clear=r,s.prototype.delete=i,s.prototype.get=o,s.prototype.has=a,s.prototype.set=c,e.exports=s;},function(e,t,n){var r=n(92),i=n(95),o=n(96);e.exports=function(e,t,n,a,c,s){var u=1&n,d=e.length,f=t.length;if(d!=f&&!(u&&f>d))return!1;var l=s.get(e),p=s.get(t);if(l&&p)return l==t&&p==e;var m=-1,h=!0,v=2&n?new r():void 0;for(s.set(e,t),s.set(t,e);++m<d;){var g=e[m],b=t[m];if(a)var y=u?a(b,g,m,t,e,s):a(g,b,m,e,t,s);if(void 0!==y){if(y)continue;h=!1;break;}if(v){if(!i(t,function(e,t){if(!o(v,t)&&(g===e||c(g,e,n,a,s)))return v.push(t);})){h=!1;break;}}else if(g!==b&&!c(g,b,n,a,s)){h=!1;break;}}return s.delete(e),s.delete(t),h;};},function(e,t,n){(function(e){var r=n(16),i=n(113),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,c=a&&a.exports===o?r.Buffer:void 0,s=(c?c.isBuffer:void 0)||i;e.exports=s;}).call(this,n(51)(e));},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function get(){return e.l;}}),Object.defineProperty(e,"id",{enumerable:!0,get:function get(){return e.i;}}),e.webpackPolyfill=1),e;};},function(e,t,n){var r=n(115),i=n(116),o=n(117),a=o&&o.isTypedArray,c=a?i(a):r;e.exports=c;},function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991;};},function(e,t){var n={utf8:{stringToBytes:function stringToBytes(e){return n.bin.stringToBytes(unescape(encodeURIComponent(e)));},bytesToString:function bytesToString(e){return decodeURIComponent(escape(n.bin.bytesToString(e)));}},bin:{stringToBytes:function stringToBytes(e){for(var t=[],n=0;n<e.length;n++){t.push(255&e.charCodeAt(n));}return t;},bytesToString:function bytesToString(e){for(var t=[],n=0;n<e.length;n++){t.push(String.fromCharCode(e[n]));}return t.join("");}}};e.exports=n;},function(e,t,n){e.exports=n(134);},function(e,t,n){var r=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t];}try{c({},"");}catch(e){c=function c(e,t,n){return e[t]=n;};}function s(e,t,n,r){var i=t&&t.prototype instanceof f?t:f,o=Object.create(i.prototype),a=new I(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return P();}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var c=S(a,n);if(c){if(c===d)continue;return c;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=u(e,t,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===d)continue;return{value:s.arg,done:n.done};}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg);}};}(e,n,a),o;}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)};}catch(e){return{type:"throw",arg:e};}}e.wrap=s;var d={};function f(){}function l(){}function p(){}var m={};m[i]=function(){return this;};var h=Object.getPrototypeOf,v=h&&h(h(x([])));v&&v!==t&&n.call(v,i)&&(m=v);var g=p.prototype=f.prototype=Object.create(m);function b(e){["next","throw","return"].forEach(function(t){c(e,t,function(e){return this._invoke(t,e);});});}function y(e,t){var r;this._invoke=function(i,o){function a(){return new t(function(r,a){!function r(i,o,a,c){var s=u(e[i],e,o);if("throw"!==s.type){var d=s.arg,f=d.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then(function(e){r("next",e,a,c);},function(e){r("throw",e,a,c);}):t.resolve(f).then(function(e){d.value=e,a(d);},function(e){return r("throw",e,a,c);});}c(s.arg);}(i,o,r,a);});}return r=r?r.then(a,a):a();};}function S(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method))return d;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method");}return d;}var r=u(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,d;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d);}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t);}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t;}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0);}function x(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;){if(n.call(e,r))return t.value=e[r],t.done=!1,t;}return t.value=void 0,t.done=!0,t;};return o.next=o;}}return{next:P};}function P(){return{value:void 0,done:!0};}return l.prototype=g.constructor=p,p.constructor=l,l.displayName=c(p,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===l||"GeneratorFunction"===(t.displayName||t.name));},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,c(e,a,"GeneratorFunction")),e.prototype=Object.create(g),e;},e.awrap=function(e){return{__await:e};},b(y.prototype),y.prototype[o]=function(){return this;},e.AsyncIterator=y,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new y(s(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then(function(e){return e.done?e.value:a.next();});},b(g),c(g,a,"Generator"),g[i]=function(){return this;},g.toString=function(){return"[object Generator]";},e.keys=function(e){var t=[];for(var n in e){t.push(n);}return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n;}return n.done=!0,n;};},e.values=x,I.prototype={constructor:I,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!e)for(var t in this){"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0);}},stop:function stop(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval;},dispatchException:function dispatchException(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r;}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),s=n.call(o,"finallyLoc");if(c&&s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc);}else if(c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc);}}}},abrupt:function abrupt(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break;}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(a);},complete:function complete(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d;},finish:function finish(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),d;}},catch:function _catch(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;_(n);}return i;}}throw new Error("illegal catch attempt");},delegateYield:function delegateYield(e,t,n){return this.delegate={iterator:x(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d;}},e;}(e.exports);try{regeneratorRuntime=r;}catch(e){Function("r","regeneratorRuntime = r")(r);}},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e);},e.exports.default=e.exports,e.exports.__esModule=!0,n(t);}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0;},function(e,t){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]");},e.exports.default=e.exports,e.exports.__esModule=!0;},function(e,t,n){var r=n(36),i=n(60);function o(t,n,a){return i()?(e.exports=o=Reflect.construct,e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=o=function o(e,t,n){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i))();return n&&r(o,n.prototype),o;},e.exports.default=e.exports,e.exports.__esModule=!0),o.apply(null,arguments);}e.exports=o,e.exports.default=e.exports,e.exports.__esModule=!0;},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0;}catch(e){return!1;}},e.exports.default=e.exports,e.exports.__esModule=!0;},function(e,t,n){var r=n(62),i=n(33);e.exports=function e(t,n,o,a,c){return t===n||(null==t||null==n||!i(t)&&!i(n)?t!=t&&n!=n:r(t,n,o,a,e,c));};},function(e,t,n){var r=n(63),i=n(49),o=n(97),a=n(101),c=n(123),s=n(40),u=n(50),d=n(52),f="[object Object]",l=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,p,m,h){var v=s(e),g=s(t),b=v?"[object Array]":c(e),y=g?"[object Array]":c(t),S=(b="[object Arguments]"==b?f:b)==f,w=(y="[object Arguments]"==y?f:y)==f,_=b==y;if(_&&u(e)){if(!u(t))return!1;v=!0,S=!1;}if(_&&!S)return h||(h=new r()),v||d(e)?i(e,t,n,p,m,h):o(e,t,b,n,p,m,h);if(!(1&n)){var I=S&&l.call(e,"__wrapped__"),x=w&&l.call(t,"__wrapped__");if(I||x){var P=I?e.value():e,k=x?t.value():t;return h||(h=new r()),m(P,k,n,p,h);}}return!!_&&(h||(h=new r()),a(e,t,n,p,m,h));};},function(e,t,n){var r=n(28),i=n(69),o=n(70),a=n(71),c=n(72),s=n(73);function u(e){var t=this.__data__=new r(e);this.size=t.size;}u.prototype.clear=i,u.prototype.delete=o,u.prototype.get=a,u.prototype.has=c,u.prototype.set=s,e.exports=u;},function(e,t){e.exports=function(){this.__data__=[],this.size=0;};},function(e,t,n){var r=n(29),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():i.call(t,n,1),--this.size,!0);};},function(e,t,n){var r=n(29);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1];};},function(e,t,n){var r=n(29);e.exports=function(e){return r(this.__data__,e)>-1;};},function(e,t,n){var r=n(29);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this;};},function(e,t,n){var r=n(28);e.exports=function(){this.__data__=new r(),this.size=0;};},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n;};},function(e,t){e.exports=function(e){return this.__data__.get(e);};},function(e,t){e.exports=function(e){return this.__data__.has(e);};},function(e,t,n){var r=n(28),i=n(37),o=n(48);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(a);}return n.set(e,t),this.size=n.size,this;};},function(e,t,n){var r=n(44),i=n(77),o=n(46),a=n(47),c=/^\[object .+?Constructor\]$/,s=Function.prototype,u=Object.prototype,d=s.toString,f=u.hasOwnProperty,l=RegExp("^"+d.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(r(e)?l:c).test(a(e));};},function(e,t,n){var r=n(38),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,c=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,c),n=e[c];try{e[c]=void 0;var r=!0;}catch(e){}var i=a.call(e);return r&&(t?e[c]=n:delete e[c]),i;};},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e);};},function(e,t,n){var r,i=n(78),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!o&&o in e;};},function(e,t,n){var r=n(16)["__core-js_shared__"];e.exports=r;},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t];};},function(e,t,n){var r=n(81),i=n(28),o=n(37);e.exports=function(){this.size=0,this.__data__={hash:new r(),map:new(o||i)(),string:new r()};};},function(e,t,n){var r=n(82),i=n(83),o=n(84),a=n(85),c=n(86);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1]);}}s.prototype.clear=r,s.prototype.delete=i,s.prototype.get=o,s.prototype.has=a,s.prototype.set=c,e.exports=s;},function(e,t,n){var r=n(31);e.exports=function(){this.__data__=r?r(null):{},this.size=0;};},function(e,t){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t;};},function(e,t,n){var r=n(31),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n;}return i.call(t,e)?t[e]:void 0;};},function(e,t,n){var r=n(31),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e);};},function(e,t,n){var r=n(31);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this;};},function(e,t,n){var r=n(32);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t;};},function(e,t){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e;};},function(e,t,n){var r=n(32);e.exports=function(e){return r(this,e).get(e);};},function(e,t,n){var r=n(32);e.exports=function(e){return r(this,e).has(e);};},function(e,t,n){var r=n(32);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this;};},function(e,t,n){var r=n(48),i=n(93),o=n(94);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r();++t<n;){this.add(e[t]);}}a.prototype.add=a.prototype.push=i,a.prototype.has=o,e.exports=a;},function(e,t){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this;};},function(e,t){e.exports=function(e){return this.__data__.has(e);};},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;){if(t(e[n],n,e))return!0;}return!1;};},function(e,t){e.exports=function(e,t){return e.has(t);};},function(e,t,n){var r=n(38),i=n(98),o=n(43),a=n(49),c=n(99),s=n(100),u=r?r.prototype:void 0,d=u?u.valueOf:void 0;e.exports=function(e,t,n,r,u,f,l){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!f(new i(e),new i(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=c;case"[object Set]":var m=1&r;if(p||(p=s),e.size!=t.size&&!m)return!1;var h=l.get(e);if(h)return h==t;r|=2,l.set(e,t);var v=a(p(e),p(t),r,u,f,l);return l.delete(e),v;case"[object Symbol]":if(d)return d.call(e)==d.call(t);}return!1;};},function(e,t,n){var r=n(16).Uint8Array;e.exports=r;},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e];}),n;};},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e;}),n;};},function(e,t,n){var r=n(102),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,a,c){var s=1&n,u=r(e),d=u.length;if(d!=r(t).length&&!s)return!1;for(var f=d;f--;){var l=u[f];if(!(s?l in t:i.call(t,l)))return!1;}var p=c.get(e),m=c.get(t);if(p&&m)return p==t&&m==e;var h=!0;c.set(e,t),c.set(t,e);for(var v=s;++f<d;){var g=e[l=u[f]],b=t[l];if(o)var y=s?o(b,g,l,t,e,c):o(g,b,l,e,t,c);if(!(void 0===y?g===b||a(g,b,n,o,c):y)){h=!1;break;}v||(v="constructor"==l);}if(h&&!v){var S=e.constructor,w=t.constructor;S==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof S&&S instanceof S&&"function"==typeof w&&w instanceof w||(h=!1);}return c.delete(e),c.delete(t),h;};},function(e,t,n){var r=n(103),i=n(105),o=n(108);e.exports=function(e){return r(e,o,i);};},function(e,t,n){var r=n(104),i=n(40);e.exports=function(e,t,n){var o=t(e);return i(e)?o:r(o,n(e));};},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;){e[i+n]=t[n];}return e;};},function(e,t,n){var r=n(106),i=n(107),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,c=a?function(e){return null==e?[]:(e=Object(e),r(a(e),function(t){return o.call(e,t);}));}:i;e.exports=c;},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a);}return o;};},function(e,t){e.exports=function(){return[];};},function(e,t,n){var r=n(109),i=n(118),o=n(122);e.exports=function(e){return o(e)?r(e):i(e);};},function(e,t,n){var r=n(110),i=n(111),o=n(40),a=n(50),c=n(114),s=n(52),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),d=!n&&i(e),f=!n&&!d&&a(e),l=!n&&!d&&!f&&s(e),p=n||d||f||l,m=p?r(e.length,String):[],h=m.length;for(var v in e){!t&&!u.call(e,v)||p&&("length"==v||f&&("offset"==v||"parent"==v)||l&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||c(v,h))||m.push(v);}return m;};},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;){r[n]=t(n);}return r;};},function(e,t,n){var r=n(112),i=n(33),o=Object.prototype,a=o.hasOwnProperty,c=o.propertyIsEnumerable,s=r(function(){return arguments;}())?r:function(e){return i(e)&&a.call(e,"callee")&&!c.call(e,"callee");};e.exports=s;},function(e,t,n){var r=n(30),i=n(33);e.exports=function(e){return i(e)&&"[object Arguments]"==r(e);};},function(e,t){e.exports=function(){return!1;};},function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&e<t;};},function(e,t,n){var r=n(30),i=n(53),o=n(33),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&i(e.length)&&!!a[r(e)];};},function(e,t){e.exports=function(e){return function(t){return e(t);};};},function(e,t,n){(function(e){var r=n(45),i=t&&!t.nodeType&&t,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,a=o&&o.exports===i&&r.process,c=function(){try{var e=o&&o.require&&o.require("util").types;return e||a&&a.binding&&a.binding("util");}catch(e){}}();e.exports=c;}).call(this,n(51)(e));},function(e,t,n){var r=n(119),i=n(120),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e)){o.call(e,n)&&"constructor"!=n&&t.push(n);}return t;};},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n);};},function(e,t,n){var r=n(121)(Object.keys,Object);e.exports=r;},function(e,t){e.exports=function(e,t){return function(n){return e(t(n));};};},function(e,t,n){var r=n(44),i=n(53);e.exports=function(e){return null!=e&&i(e.length)&&!r(e);};},function(e,t,n){var r=n(124),i=n(37),o=n(125),a=n(126),c=n(127),s=n(30),u=n(47),d=u(r),f=u(i),l=u(o),p=u(a),m=u(c),h=s;(r&&"[object DataView]"!=h(new r(new ArrayBuffer(1)))||i&&"[object Map]"!=h(new i())||o&&"[object Promise]"!=h(o.resolve())||a&&"[object Set]"!=h(new a())||c&&"[object WeakMap]"!=h(new c()))&&(h=function h(e){var t=s(e),n="[object Object]"==t?e.constructor:void 0,r=n?u(n):"";if(r)switch(r){case d:return"[object DataView]";case f:return"[object Map]";case l:return"[object Promise]";case p:return"[object Set]";case m:return"[object WeakMap]";}return t;}),e.exports=h;},function(e,t,n){var r=n(20)(n(16),"DataView");e.exports=r;},function(e,t,n){var r=n(20)(n(16),"Promise");e.exports=r;},function(e,t,n){var r=n(20)(n(16),"Set");e.exports=r;},function(e,t,n){var r=n(20)(n(16),"WeakMap");e.exports=r;},function(e,t){var n,r;n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function rotl(e,t){return e<<t|e>>>32-t;},rotr:function rotr(e,t){return e<<32-t|e>>>t;},endian:function endian(e){if(e.constructor==Number)return 16711935&r.rotl(e,8)|4278255360&r.rotl(e,24);for(var t=0;t<e.length;t++){e[t]=r.endian(e[t]);}return e;},randomBytes:function randomBytes(e){for(var t=[];e>0;e--){t.push(Math.floor(256*Math.random()));}return t;},bytesToWords:function bytesToWords(e){for(var t=[],n=0,r=0;n<e.length;n++,r+=8){t[r>>>5]|=e[n]<<24-r%32;}return t;},wordsToBytes:function wordsToBytes(e){for(var t=[],n=0;n<32*e.length;n+=8){t.push(e[n>>>5]>>>24-n%32&255);}return t;},bytesToHex:function bytesToHex(e){for(var t=[],n=0;n<e.length;n++){t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));}return t.join("");},hexToBytes:function hexToBytes(e){for(var t=[],n=0;n<e.length;n+=2){t.push(parseInt(e.substr(n,2),16));}return t;},bytesToBase64:function bytesToBase64(e){for(var t=[],r=0;r<e.length;r+=3){for(var i=e[r]<<16|e[r+1]<<8|e[r+2],o=0;o<4;o++){8*r+6*o<=8*e.length?t.push(n.charAt(i>>>6*(3-o)&63)):t.push("=");}}return t.join("");},base64ToBytes:function base64ToBytes(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var t=[],r=0,i=0;r<e.length;i=++r%4){0!=i&&t.push((n.indexOf(e.charAt(r-1))&Math.pow(2,-2*i+8)-1)<<2*i|n.indexOf(e.charAt(r))>>>6-2*i);}return t;}},e.exports=r;},function(e,t){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e);}/*!
2
- * Determine if an object is a Buffer
3
- *
4
- * @author Feross Aboukhadijeh <https://feross.org>
5
- * @license MIT
1
+ "use strict";!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n){("object"==typeof exports?exports:e)[r]=n[r];}}}(window,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports;}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r});},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0});},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e){n.d(r,i,function(t){return e[t];}.bind(null,i));}return r;},n.n=function(e){var t=e&&e.__esModule?function(){return e.default;}:function(){return e;};return n.d(t,"a",t),t;},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t);},n.p="",n(n.s=55);}([function(e,t,n){e.exports=n(56);},function(e,t,n){"use strict";var r=function(){var e=function e(){},t={DEBUG:0,TRACE:1,INFO:2,WARNING:3,ERROR:4,NONE:5};t.log=window.console.log.bind(window.console);var n=function n(e){return"function"==typeof window.console[e]?window.console[e].bind(window.console):window.console.log.bind(window.console);},r=function r(_r2){t.debug=_r2<=0?n("log"):e,t.trace=_r2<=1?n("trace"):e,t.info=_r2<=2?n("info"):e,t.warning=_r2<=3?n("warn"):e,t.error=_r2<=4?n("error"):e;};return r(0),t.setLogLevel=r,t;}();t.a=r;},function(e,t){function n(e,t,n,r,i,o,a){try{var c=e[o](a),s=c.value;}catch(e){return void n(e);}c.done?t(s):Promise.resolve(s).then(r,i);}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise(function(i,o){var a=e.apply(t,r);function c(e){n(a,i,o,c,s,"next",e);}function s(e){n(a,i,o,c,s,"throw",e);}c(void 0);});};},e.exports.default=e.exports,e.exports.__esModule=!0;},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n){Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);}}return e;},e.exports.default=e.exports,e.exports.__esModule=!0,n.apply(this,arguments);}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0;},function(e,t,n){"use strict";n.d(t,"b",function(){return o;}),n.d(t,"e",function(){return a;}),n.d(t,"c",function(){return c;}),n.d(t,"a",function(){return s;}),n.d(t,"d",function(){return u;});var r=n(8),i=n.n(r),o=function o(){var e={dispatcher:{}};e.dispatcher.eventListeners={},this.addEventListener=function(t,n){void 0===e.dispatcher.eventListeners[t]&&(e.dispatcher.eventListeners[t]=[]),e.dispatcher.eventListeners[t].push(n);},this.removeEventListener=function(t,n){if(e.dispatcher.eventListeners[t]){var r=e.dispatcher.eventListeners[t].indexOf(n);-1!==r&&e.dispatcher.eventListeners[t].splice(r,1);}},this.clearEventListener=function(t){e.dispatcher.eventListeners[t]=[];},this.dispatchEvent=function(t){e.dispatcher.eventListeners[t.type]&&e.dispatcher.eventListeners[t.type].map(function(e){e(t);});};},a=function a(e){this.type=e;},c=function(e){function t(t,n){var r;return(r=e.call(this,t)||this).origin=n.origin,r.message=n.message,r.to=n.to,r.mSeq=n.mSeq,r;}return i()(t,e),t;}(a),s=function(e){function t(t,n){var r;return(r=e.call(this,t)||this).error=n.error,r;}return i()(t,e),t;}(a),u=function(e){function t(t,n){var r;return(r=e.call(this,t)||this).kind=n.kind,r;}return i()(t,e),t;}(a);},function(e,t,n){(function(n){var r;!function(n,i){e.exports=function(n){"use strict";var i,o=(n=n||{}).Base64,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=function(e){for(var t={},n=0,r=e.length;n<r;n++){t[e.charAt(n)]=n;}return t;}(a),s=String.fromCharCode,u=function u(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?s(192|t>>>6)+s(128|63&t):s(224|t>>>12&15)+s(128|t>>>6&63)+s(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return s(240|t>>>18&7)+s(128|t>>>12&63)+s(128|t>>>6&63)+s(128|63&t);},d=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,f=function f(e){return e.replace(d,u);},l=function l(e){var t=[0,2,1][e.length%3],n=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[a.charAt(n>>>18),a.charAt(n>>>12&63),t>=2?"=":a.charAt(n>>>6&63),t>=1?"=":a.charAt(63&n)].join("");},p=n.btoa&&"function"==typeof n.btoa?function(e){return n.btoa(e);}:function(e){if(e.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return e.replace(/[\s\S]{1,3}/g,l);},m=function m(e){return p(f(String(e)));},h=function h(e){return e.replace(/[+\/]/g,function(e){return"+"==e?"-":"_";}).replace(/=/g,"");},v=function v(e,t){return t?h(m(e)):m(e);};n.Uint8Array&&(i=function i(e,t){for(var n="",r=0,i=e.length;r<i;r+=3){var o=e[r],c=e[r+1],s=e[r+2],u=o<<16|c<<8|s;n+=a.charAt(u>>>18)+a.charAt(u>>>12&63)+(void 0!==c?a.charAt(u>>>6&63):"=")+(void 0!==s?a.charAt(63&u):"=");}return t?h(n):n;});var g,b=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,y=function y(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return s(55296+(t>>>10))+s(56320+(1023&t));case 3:return s((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return s((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1));}},S=function S(e){return e.replace(b,y);},w=function w(e){var t=e.length,n=t%4,r=(t>0?c[e.charAt(0)]<<18:0)|(t>1?c[e.charAt(1)]<<12:0)|(t>2?c[e.charAt(2)]<<6:0)|(t>3?c[e.charAt(3)]:0),i=[s(r>>>16),s(r>>>8&255),s(255&r)];return i.length-=[0,0,2,1][n],i.join("");},_=n.atob&&"function"==typeof n.atob?function(e){return n.atob(e);}:function(e){return e.replace(/\S{1,4}/g,w);},I=function I(e){return _(String(e).replace(/[^A-Za-z0-9\+\/]/g,""));},x=function x(e){return String(e).replace(/[-_]/g,function(e){return"-"==e?"+":"/";}).replace(/[^A-Za-z0-9\+\/]/g,"");},P=function P(e){return function(e){return S(_(e));}(x(e));};n.Uint8Array&&(g=function g(e){return Uint8Array.from(I(x(e)),function(e){return e.charCodeAt(0);});});var k=function k(){var e=n.Base64;return n.Base64=o,e;};if(n.Base64={VERSION:"2.6.4",atob:I,btoa:p,fromBase64:P,toBase64:v,utob:f,encode:v,encodeURI:function encodeURI(e){return v(e,!0);},btou:S,decode:P,noConflict:k,fromUint8Array:i,toUint8Array:g},"function"==typeof Object.defineProperty){var E=function E(e){return{value:e,enumerable:!1,writable:!0,configurable:!0};};n.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",E(function(){return P(this);})),Object.defineProperty(String.prototype,"toBase64",E(function(e){return v(this,e);})),Object.defineProperty(String.prototype,"toBase64URI",E(function(){return v(this,!0);}));};}n.Meteor&&(Base64=n.Base64);e.exports?e.exports.Base64=n.Base64:void 0===(r=function(){return n.Base64;}.apply(t,[]))||(e.exports=r);return{Base64:n.Base64};}(n);}("undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n?n:this);}).call(this,n(39));},function(e,t,n){"use strict";n.r(t);n(41);var r=function r(){this.allPars=[],this._activeAudio="",this.conference=null,this.gridCameraListResolutionHeight="",this.hasSubscribedStreamIds=[],this.activeStreamId="",this.joinType="",this.cachedCommands=[],this.commandLocked=!1,this.showCameraList=null,this.seqTimer=null;},i=null;t.default=function(){return i||(i=new r()),i;};},function(e,t,n){"use strict";n.r(t);var r,i=n(34),o=Object({RUN_ENV:"meet"}).PLATFORM_ENV;t.default=function(e){if(r)return r;var t="electron"===o||"sdk"===e.params.from,n=i.publicPath;"sdk"===e.params.from&&(n=e.host);var a=t?"https://"+n+"/conf":"/conf",c=t?"https://"+n+"/rest":"/rest";return r={startRecordings:function startRecordings(e){return a+"/rooms/"+e+"/recordings";},updateStream:function updateStream(e,t){return a+"/rooms/"+e+"/streams/"+t;},createRome:function createRome(){return a+"/createRoom";},createToken:function createToken(){return a+"/tokens";},getStreamsList:function getStreamsList(e){return a+"/rooms/"+e+"/streams";},delStream:function delStream(e,t){return a+"/rooms/"+e+"/streams/"+t;},getParticipantsList:function getParticipantsList(e){return a+"/rooms/"+e+"/participants";},delParticipant:function delParticipant(e,t){return a+"/rooms/"+e+"/participants/"+t;},delRoom:function delRoom(e){return a+"/rooms/"+e;},allServices:function allServices(){return a+"/services";},updateAllStreams:function updateAllStreams(e,t){return a+"/rooms/"+e+"/streams/except/"+t;},getStreamInfo:function getStreamInfo(e,t){return a+"/rooms/"+e+"/streams/"+t;},getRoom:function getRoom(e){return a+"/rooms/"+e;},streamOut:function streamOut(e){return a+"/rooms/"+e+"/streaming-outs";},deleteStreamOut:function deleteStreamOut(e,t){return a+"/rooms/"+e+"/streaming-outs/"+t;},translateWsStart:function translateWsStart(){return c+"/conference/translate/start";},translateWsStop:function translateWsStop(){return c+"/conference/translate/stop";},translateWs:function translateWs(e){return"wss://"+n+"/translate/?roomId="+e;},login:function login(){return c+"/login";},conferenceCreate:function conferenceCreate(){return c+"/api/conference/create";},conferenceJoin:function conferenceJoin(){return c+"/conference/join";},conferenceLeave:function conferenceLeave(e){return c+"/conference/leave?roomId="+e;},conferenceEnd:function conferenceEnd(){return c+"/conference/end";},orgContacts:function orgContacts(e){return c+"/contact/v1/all/user/"+e;},groupContacts:function groupContacts(e){return c+"/contact/v1/all/group/user/"+e;},selfContacts:function selfContacts(e){return c+"/contact/v1/contact/"+e;},conferenceInvite:function conferenceInvite(){return c+"/conference/invite";},conferenceParticipant:function conferenceParticipant(e){return c+"/conference/participant/list/"+e;},callbackPstn:function callbackPstn(){return c+"/conference/callback";},userInfo:function userInfo(){return c+"/api/conference/user/info";},sipTerminalList:function sipTerminalList(e){return c+"/conference/sip/terminal/list/"+e;},inviteSip:function inviteSip(){return c+"/conference/invite/sip";},conferenceLock:function conferenceLock(){return c+"/conference/lock";},conferenceUnlock:function conferenceUnlock(){return c+"/conference/unlock";},conferenceRecord:function conferenceRecord(){return c+"/conference/record";},deleteErecord:function deleteErecord(e,t){return c+"/conference/record/"+e+"/"+t;},enterMute:function enterMute(){return c+"/conference/enter/mute";},assignHost:function assignHost(){return c+"/conference/allocate/host";},parInfo:function parInfo(){return c+"/conference/participant/info";},allowUnmute:function allowUnmute(){return c+"/conference/allow/unmute";},startShare:function startShare(e){return c+"/conference/share/"+e;},stopShare:function stopShare(e){return c+"/conference/share/"+e;},getSdkInfo:function getSdkInfo(){return c+"/sdk/login";},focusVideo:function focusVideo(){return c+"/conference/focus/video";},joinStatistics:function joinStatistics(){return c+"/conference/join/statistics";},conferenceInfo:function conferenceInfo(e){return c+"/conference/info/"+e;},updateControl:function updateControl(e){return c+"/conference/share/"+e;},handsUp:function handsUp(e){return c+"/conference/hands/up/"+e;},handsDown:function handsDown(e){return c+"/conference/hands/down/"+e;},manyHandsDown:function manyHandsDown(){return c+"/conference/hands/down";},rename:function rename(){return c+"/conference/participant/name";},hideNonVideo:function hideNonVideo(){return c+"/api/contact/v1/hideNonVideo";},participantReconnect:function participantReconnect(){return c+"/conference/participant/reconnect";},toggleWaitingRoom:function toggleWaitingRoom(){return c+"/conference/ongoing/waiting";},moveToWaitingRoom:function moveToWaitingRoom(){return c+"/conference/ongoing/move/waiting";},moveToMeetingRoom:function moveToMeetingRoom(){return c+"/conference/ongoing/move/meeting";},removeFromWaitingRoom:function removeFromWaitingRoom(){return c+"/conference/ongoing/remove/waiting";},conferenceOngoingJoin:function conferenceOngoingJoin(){return c+"/api/conference/ongoing/join";},allowParticipantUpload:function allowParticipantUpload(){return c+"/conference/ongoing/participant/upload";},deleteMeetingFiles:function deleteMeetingFiles(e,t){return c+"/conference/ongoing/file/"+e+"/"+t;},allowParticipantShare:function allowParticipantShare(){return c+"/conference/ongoing/participant/share";},allowParticipantRecord:function allowParticipantRecord(){return c+"/conference/ongoing/participant/local/record";},startLocalRecord:function startLocalRecord(e,t){return c+"/conference/ongoing/local/record/"+e+"/"+t;},stopLocalRecord:function stopLocalRecord(e,t){return c+"/conference/ongoing/local/record/"+e+"/"+t;}};};},function(e,t,n){var r=n(36);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t);},e.exports.default=e.exports,e.exports.__esModule=!0;},function(e,t,n){"use strict";n.d(t,"e",function(){return d;}),n.d(t,"c",function(){return f;}),n.d(t,"a",function(){return l;}),n.d(t,"b",function(){return p;}),n.d(t,"d",function(){return m;});var r=n(12),i=n.n(r),o=n(8),a=n.n(o),c=(n(1),n(4)),s=n(10);function u(e,t){return t.some(function(t){return t===e;});}var d=function d(e,t){if(!u(e,[void 0,"mic","screen-cast","file","mixed"]))throw new TypeError("Incorrect value for audioSourceInfo");if(!u(t,[void 0,"camera","screen-cast","file","encoded-file","raw-file","mixed"]))throw new TypeError("Incorrect value for videoSourceInfo");this.audio=e,this.video=t;},f=function(e){function t(t,n,r){var o;if(o=e.call(this)||this,t&&!(t instanceof MediaStream)||"object"!=typeof n)throw new TypeError("Invalid stream or sourceInfo.");if(t&&(t.getAudioTracks().length>0&&!n.audio||t.getVideoTracks().length>0&&!n.video))throw new TypeError("Missing audio source info or video source info.");return Object.defineProperty(i()(o),"mediaStream",{configurable:!1,writable:!0,value:t}),Object.defineProperty(i()(o),"source",{configurable:!1,writable:!1,value:n}),Object.defineProperty(i()(o),"attributes",{configurable:!0,writable:!0,value:r}),o;}return a()(t,e),t;}(c.b),l=function(e){function t(t,n,r){var o;if(!(t instanceof MediaStream))throw new TypeError("Invalid stream.");return o=e.call(this,t,n,r)||this,Object.defineProperty(i()(o),"id",{configurable:!1,writable:!1,value:s.a()}),o;}return a()(t,e),t;}(f),p=function(e){function t(t,n,r,o,a){var c;return c=e.call(this,r,o,a)||this,Object.defineProperty(i()(c),"id",{configurable:!1,writable:!1,value:t||s.a()}),Object.defineProperty(i()(c),"origin",{configurable:!1,writable:!1,value:n}),c.settings=void 0,c.capabilities=void 0,c;}return a()(t,e),t;}(f),m=function(e){function t(t,n){var r;return(r=e.call(this,t)||this).stream=n.stream,r;}return a()(t,e),t;}(c.e);},function(e,t,n){"use strict";n.d(t,"d",function(){return r;}),n.d(t,"b",function(){return i;}),n.d(t,"e",function(){return o;}),n.d(t,"c",function(){return a;}),n.d(t,"a",function(){return c;}),n.d(t,"f",function(){return s;});function r(){return null!==window.navigator.userAgent.match("Firefox");}function i(){return null!==window.navigator.userAgent.match("Chrome");}function o(){return /^((?!chrome|android).)*safari/i.test(window.navigator.userAgent);}function a(){return null!==window.navigator.userAgent.match(/Edge\/(\d+).(\d+)$/);}function c(){return"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16);});}function s(){var e=Object.create({});e.sdk={version:"4.2.1",type:"JavaScript"};var t=navigator.userAgent,n=/Chrome\/([0-9\.]+)/.exec(t);n?e.runtime={name:"Chrome",version:n[1]}:(n=/Firefox\/([0-9\.]+)/.exec(t))?e.runtime={name:"Firefox",version:n[1]}:(n=/Edge\/([0-9\.]+)/.exec(t))?e.runtime={name:"Edge",version:n[1]}:o()?(n=/Version\/([0-9\.]+) Safari/.exec(t),e.runtime={name:"Safari"},e.runtime.version=n?n[1]:"Unknown"):e.runtime={name:"Unknown",version:"Unknown"};return(n=/Windows NT ([0-9\.]+)/.exec(t))?e.os={name:"Windows NT",version:n[1]}:(n=/Intel Mac OS X ([0-9_\.]+)/.exec(t))?e.os={name:"Mac OS X",version:n[1].replace(/_/g,".")}:(n=/iPhone OS ([0-9_\.]+)/.exec(t))?e.os={name:"iPhone OS",version:n[1].replace(/_/g,".")}:(n=/X11; Linux/.exec(t))?e.os={name:"Linux",version:"Unknown"}:(n=/Android( ([0-9\.]+))?/.exec(t))?e.os={name:"Android",version:n[1]||"Unknown"}:(n=/CrOS/.exec(t))?e.os={name:"Chrome OS",version:"Unknown"}:e.os={name:"Unknown",version:"Unknown"},e.capabilities={continualIceGathering:!1,unifiedPlan:!0,streamRemovable:"Firefox"!==e.runtime.name},e.compatibility=1,e;}},function(e,t,n){"use strict";n.d(t,"a",function(){return r;}),n.d(t,"d",function(){return i;}),n.d(t,"c",function(){return o;}),n.d(t,"b",function(){return a;});var r={MIC:"mic",SCREENCAST:"screen-cast",FILE:"file",MIXED:"mixed"},i={CAMERA:"camera",SCREENCAST:"screen-cast",FILE:"file",MIXED:"mixed"},o={AUDIO:"audio",VIDEO:"video",AUDIO_AND_VIDEO:"av"},a=function a(e,t){this.width=e,this.height=t;};},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;},e.exports.default=e.exports,e.exports.__esModule=!0;},function(e,t,n){"use strict";n.d(t,"a",function(){return xe;}),n.d(t,"b",function(){return Pe;});var r={};n.r(r),n.d(r,"AudioTrackConstraints",function(){return s;}),n.d(r,"VideoTrackConstraints",function(){return u;}),n.d(r,"StreamConstraints",function(){return d;}),n.d(r,"MediaStreamFactory",function(){return l;}),n.d(r,"StreamSourceInfo",function(){return p.e;}),n.d(r,"Stream",function(){return p.c;}),n.d(r,"LocalStream",function(){return p.a;}),n.d(r,"RemoteStream",function(){return p.b;}),n.d(r,"StreamEvent",function(){return p.d;}),n.d(r,"AudioSourceInfo",function(){return c.a;}),n.d(r,"VideoSourceInfo",function(){return c.d;}),n.d(r,"TrackKind",function(){return c.c;}),n.d(r,"Resolution",function(){return c.b;});var i={};n.r(i),n.d(i,"P2PClient",function(){return te;}),n.d(i,"P2PError",function(){return _;});var o={};n.r(o),n.d(o,"ConferenceClient",function(){return Ie;}),n.d(o,"SioSignaling",function(){return oe;});var a=n(10),c=n(11),s=function s(e){if(!Object.values(c.a).some(function(t){return t===e;}))throw new TypeError("Invalid source.");this.source=e,this.deviceId=void 0;},u=function u(e){if(!Object.values(c.d).some(function(t){return t===e;}))throw new TypeError("Invalid source.");this.source=e,this.deviceId=void 0,this.resolution=void 0,this.frameRate=void 0;},d=function d(e,t){void 0===e&&(e=!1),void 0===t&&(t=!1),this.audio=e,this.video=t;};function f(e){return"object"==typeof e.video&&e.video.source===c.d.SCREENCAST;}var l=function(){function e(){}return e.createMediaStream=function(e){if("object"!=typeof e||!e.audio&&!e.video)return Promise.reject(new TypeError("Invalid constrains"));if(!f(e)&&"object"==typeof e.audio&&e.audio.source===c.a.SCREENCAST)return Promise.reject(new TypeError("Cannot share screen without video."));if(f(e)&&"object"==typeof e.audio&&e.audio.source!==c.a.SCREENCAST)return Promise.reject(new TypeError("Cannot capture video from screen cast while capture audio from other source."));if(!e.audio&&!e.video)return Promise.reject(new TypeError("At least one of audio and video must be requested."));var t=Object.create({});return"object"==typeof e.audio&&e.audio.source===c.a.MIC?(t.audio=Object.create({}),a.c()?t.audio.deviceId=e.audio.deviceId:t.audio.deviceId={exact:e.audio.deviceId}):e.audio.source===c.a.SCREENCAST?t.audio=!0:t.audio=e.audio,"object"==typeof e.video?(t.video=Object.create({}),"number"==typeof e.video.frameRate&&(t.video.frameRate=e.video.frameRate),e.video.resolution&&e.video.resolution.width&&e.video.resolution.height&&(e.video.source===c.d.SCREENCAST?(t.video.width=e.video.resolution.width,t.video.height=e.video.resolution.height):(t.video.width=Object.create({}),t.video.width.exact=e.video.resolution.width,t.video.height=Object.create({}),t.video.height.exact=e.video.resolution.height)),"string"==typeof e.video.deviceId&&(t.video.deviceId={exact:e.video.deviceId}),a.d()&&e.video.source===c.d.SCREENCAST&&(t.video.mediaSource="screen")):t.video=e.video,f(e)?navigator.mediaDevices.getDisplayMedia(t):navigator.mediaDevices.getUserMedia(t);},e;}(),p=n(9),m=n(1),h=n(4),v=n(8),g=n.n(v),b=n(21),y=n.n(b),S={P2P_CONN_SERVER_UNKNOWN:{code:2100,message:"Server unknown error."},P2P_CONN_SERVER_UNAVAILABLE:{code:2101,message:"Server is unavaliable."},P2P_CONN_SERVER_BUSY:{code:2102,message:"Server is too busy."},P2P_CONN_SERVER_NOT_SUPPORTED:{code:2103,message:"Method has not been supported by server."},P2P_CONN_CLIENT_UNKNOWN:{code:2110,message:"Client unknown error."},P2P_CONN_CLIENT_NOT_INITIALIZED:{code:2111,message:"Connection is not initialized."},P2P_CONN_AUTH_UNKNOWN:{code:2120,message:"Authentication unknown error."},P2P_CONN_AUTH_FAILED:{code:2121,message:"Wrong username or token."},P2P_MESSAGING_TARGET_UNREACHABLE:{code:2201,message:"Remote user cannot be reached."},P2P_CLIENT_DENIED:{code:2202,message:"User is denied."},P2P_CLIENT_UNKNOWN:{code:2400,message:"Unknown errors."},P2P_CLIENT_UNSUPPORTED_METHOD:{code:2401,message:"This method is unsupported in current browser."},P2P_CLIENT_ILLEGAL_ARGUMENT:{code:2402,message:"Illegal argument."},P2P_CLIENT_INVALID_STATE:{code:2403,message:"Invalid peer state."},P2P_CLIENT_NOT_ALLOWED:{code:2404,message:"Remote user is not allowed."},P2P_WEBRTC_UNKNOWN:{code:2500,message:"WebRTC error."},P2P_WEBRTC_SDP:{code:2502,message:"SDP error."}};function w(e){return{2100:S.P2P_CONN_SERVER_UNKNOWN,2101:S.P2P_CONN_SERVER_UNAVAILABLE,2102:S.P2P_CONN_SERVER_BUSY,2103:S.P2P_CONN_SERVER_NOT_SUPPORTED,2110:S.P2P_CONN_CLIENT_UNKNOWN,2111:S.P2P_CONN_CLIENT_NOT_INITIALIZED,2120:S.P2P_CONN_AUTH_UNKNOWN,2121:S.P2P_CONN_AUTH_FAILED,2201:S.P2P_MESSAGING_TARGET_UNREACHABLE,2400:S.P2P_CLIENT_UNKNOWN,2401:S.P2P_CLIENT_UNSUPPORTED_METHOD,2402:S.P2P_CLIENT_ILLEGAL_ARGUMENT,2403:S.P2P_CLIENT_INVALID_STATE,2404:S.P2P_CLIENT_NOT_ALLOWED,2500:S.P2P_WEBRTC_UNKNOWN,2501:S.P2P_WEBRTC_SDP}[e];}var _=function(e){function t(t,n){var r;return(r=e.call(this,n)||this).code="number"==typeof t?t:t.code,r;}return g()(t,e),t;}(y()(Error)),I=n(17);function x(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return P(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return P(e,t);}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]};};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}return(n=e[Symbol.iterator]()).next.bind(n);}function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++){r[n]=e[n];}return r;}function k(e,t,n,r){var i=e.split("\r\n");i.length<=1&&(i=e.split("\n"));var o=j(i,t),a={};if(null===o){var c=T(i,"a=rtpmap",t);if(null===c)return e;var s=O(i[c]);a.pt=s.toString(),a.params={},a.params[n]=r,i.splice(c+1,0,A(a));}else(a=E(i[o])).params[n]=r,i[o]=A(a);return e=i.join("\r\n");}function E(e){var t={},n=e.indexOf(" "),r=e.substring(n+1).split(";"),i=new RegExp("a=fmtp:(\\d+)"),o=e.match(i);if(!o||2!==o.length)return null;t.pt=o[1];for(var a={},c=0;c<r.length;++c){var s=r[c].split("=");2===s.length&&(a[s[0]]=s[1]);}return t.params=a,t;}function A(e){if(!e.hasOwnProperty("pt")||!e.hasOwnProperty("params"))return null;var t=e.pt,n=e.params,r=[],i=0;for(var o in n){r[i]=o+"="+n[o],++i;}return 0===i?null:"a=fmtp:"+t.toString()+" "+r.join(";");}function j(e,t){var n=function(e,t){var n=T(e,"a=rtpmap",t);return n?O(e[n]):null;}(e,t);return n?T(e,"a=fmtp:"+n.toString()):null;}function T(e,t,n){return C(e,0,-1,t,n);}function C(e,t,n,r,i){for(var o=-1!==n?n:e.length,a=t;a<o;++a){if(0===e[a].indexOf(r)&&(!i||-1!==e[a].toLowerCase().indexOf(i.toLowerCase())))return a;}return null;}function O(e){var t=new RegExp("a=rtpmap:(\\d+) [a-zA-Z0-9-]+\\/\\d+"),n=e.match(t);return n&&2===n.length?n[1]:null;}var R=["CN","telephone-event"],L=["red","ulpfec","flexfec"];function M(e,t){for(var n=new RegExp("a=(rtpmap|rtcp-fb|fmtp):"+t+"\\s"),r=e.length-1;r>0;r--){e[r].match(n)&&e.splice(r,1);}return e;}function N(e,t,n){if(!n||0===n.length)return e;n="audio"===t?n.concat(R):n.concat(L);var r=e.split("\r\n"),i=T(r,"m=",t);if(null===i)return e;var o=r[i].split(" ");o.splice(0,3);for(var a,c=[],s=x(n);!(a=s()).done;){for(var u=a.value,d=0;d<r.length;d++){var f=C(r,d,-1,"a=rtpmap",u);if(null!==f){var l=O(r[f]);l&&(c.push(l),d=f);}}}c=function(e,t){for(var n,r=x(t);!(n=r()).done;){var i=T(e,"a=fmtp","apt="+n.value);if(null!==i){var o=E(e[i]);t.push(o.pt);}}return t;}(r,c),r[i]=function(e,t){var n=e.split(" ").slice(0,3);return(n=n.concat(t)).join(" ");}(r[i],c);for(var p,m=x(o);!(p=m()).done;){var h=p.value;-1===c.indexOf(h)&&(r=M(r,h));}return e=r.join("\r\n");}function B(e,t){for(var n,r=x(t);!(n=r()).done;){var i=n.value;i.maxBitrate&&(e=k(e,i.codec.name,"x-google-max-bitrate",i.maxBitrate.toString()),e=k(e,i.codec.name,"x-google-start-bitrate",i.maxBitrate.toString())),i.minBitrate&&(e=k(e,i.codec.name,"x-google-min-bitrate",i.minBitrate.toString()));}return e;}function D(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return U(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return U(e,t);}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]};};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}return(n=e[Symbol.iterator]()).next.bind(n);}function U(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++){r[n]=e[n];}return r;}Event;var V,F="message",W="chat-closed",$="chat-track-sources",H="chat-stream-info",z="chat-signal",q="chat-tracks-added",J="chat-tracks-removed",G="chat-data-received",K="chat-ua",X=a.f(),Y=function(e){function t(t,n,r,i){var o;return(o=e.call(this)||this)._config=t,o._localId=n,o._remoteId=r,o._signaling=i,o._pc=null,o._publishedStreams=new Map(),o._pendingStreams=[],o._publishingStreams=[],o._pendingUnpublishStreams=[],o._remoteStreamInfo=new Map(),o._remoteStreams=[],o._remoteTrackSourceInfo=new Map(),o._publishPromises=new Map(),o._unpublishPromises=new Map(),o._publishingStreamTracks=new Map(),o._publishedStreamTracks=new Map(),o._isNegotiationNeeded=!1,o._remoteSideSupportsRemoveStream=!0,o._remoteSideSupportsPlanB=!0,o._remoteSideSupportsUnifiedPlan=!0,o._remoteIceCandidates=[],o._dataChannels=new Map(),o._pendingMessages=[],o._dataSeq=1,o._sendDataPromises=new Map(),o._addedTrackIds=[],o._isCaller=!0,o._infoSent=!1,o._disposed=!1,o._createPeerConnection(),o;}g()(t,e);var n=t.prototype;return n.publish=function(e){var t=this;return e instanceof p.a?this._publishedStreams.has(e)?Promise.reject(new _(S.P2P_CLIENT_ILLEGAL_ARGUMENT,"Duplicated stream.")):this._areAllTracksEnded(e.mediaStream)?Promise.reject(new _(S.P2P_CLIENT_INVALID_STATE,"All tracks are ended.")):Promise.all([this._sendClosedMsgIfNecessary(),this._sendSysInfoIfNecessary(),this._sendStreamInfo(e)]).then(function(){return new Promise(function(n,r){for(var i,o=D(e.mediaStream.getTracks());!(i=o()).done;){var a=i.value;t._pc.addTrack(a,e.mediaStream);}t._onNegotiationneeded(),t._publishingStreams.push(e);var c=Array.from(e.mediaStream.getTracks(),function(e){return e.id;});t._publishingStreamTracks.set(e.mediaStream.id,c),t._publishPromises.set(e.mediaStream.id,{resolve:n,reject:r});});}):Promise.reject(new TypeError("Invalid stream."));},n.send=function(e){var t=this;if("string"!=typeof e)return Promise.reject(new TypeError("Invalid message."));var n={id:this._dataSeq++,data:e},r=new Promise(function(e,r){t._sendDataPromises.set(n.id,{resolve:e,reject:r});});return this._dataChannels.has(F)||this._createDataChannel(F),this._sendClosedMsgIfNecessary().catch(function(e){m.a.debug("Failed to send closed message."+e.message);}),this._sendSysInfoIfNecessary().catch(function(e){m.a.debug("Failed to send sysInfo."+e.message);}),"open"===this._dataChannels.get(F).readyState?this._dataChannels.get(F).send(JSON.stringify(n)):this._pendingMessages.push(n),r;},n.stop=function(){this._stop(void 0,!0);},n.getStats=function(e){var t=this;if(this._pc){if(void 0===e)return this._pc.getStats();var n=[];return Promise.all([e.getTracks().forEach(function(e){t._getStats(e,n);})]).then(function(){return new Promise(function(e,t){e(n);});});}return Promise.reject(new _(S.P2P_CLIENT_INVALID_STATE));},n._getStats=function(e,t){return this._pc.getStats(e).then(function(e){t.push(e);});},n.onMessage=function(e){this._SignalingMesssageHandler(e);},n._sendSdp=function(e){return this._signaling.sendSignalingMessage(this._remoteId,z,e);},n._sendSignalingMessage=function(e,t){return this._signaling.sendSignalingMessage(this._remoteId,e,t);},n._SignalingMesssageHandler=function(e){switch(m.a.debug("Channel received message: "+e),e.type){case K:this._handleRemoteCapability(e.data),this._sendSysInfoIfNecessary();break;case $:this._trackSourcesHandler(e.data);break;case H:this._streamInfoHandler(e.data);break;case z:this._sdpHandler(e.data);break;case q:this._tracksAddedHandler(e.data);break;case J:this._tracksRemovedHandler(e.data);break;case G:this._dataReceivedHandler(e.data);break;case W:this._chatClosedHandler(e.data);break;default:m.a.error("Invalid signaling message received. Type: "+e.type);}},n._tracksAddedHandler=function(e){for(var t,n=this,r=function r(){var e=t.value;n._publishingStreamTracks.forEach(function(t,r){for(var i=0;i<t.length;i++){if(t[i]===e&&(n._publishedStreamTracks.has(r)||n._publishedStreamTracks.set(r,[]),n._publishedStreamTracks.get(r).push(t[i]),t.splice(i,1)),0==t.length)if("continue"===function(){if(!n._publishPromises.has(r))return m.a.warning("Cannot find the promise for publishing "+r),"continue";var t=n._publishingStreams.findIndex(function(e){return e.mediaStream.id==r;}),i=n._publishingStreams[t];n._publishingStreams.splice(t,1);var o=new I.b(e,function(){n._unpublish(i).then(function(){o.dispatchEvent(new h.e("ended"));},function(e){m.a.debug("Something wrong happened during stopping a publication. "+e.message);});},function(){return i&&i.mediaStream?n.getStats(i.mediaStream):Promise.reject(new _(S.P2P_CLIENT_INVALID_STATE,"Publication is not available."));});n._publishedStreams.set(i,o),n._publishPromises.get(r).resolve(o),n._publishPromises.delete(r);}())continue;}});},i=D(e);!(t=i()).done;){r();}},n._tracksRemovedHandler=function(e){for(var t,n=this,r=function r(){var e=t.value;n._publishedStreamTracks.forEach(function(t,n){for(var r=0;r<t.length;r++){t[r]===e&&t.splice(r,1);}});},i=D(e);!(t=i()).done;){r();}},n._dataReceivedHandler=function(e){this._sendDataPromises.has(e)?this._sendDataPromises.get(e).resolve():m.a.warning("Received unknown data received message. ID: "+e);},n._sdpHandler=function(e){"offer"===e.type?this._onOffer(e):"answer"===e.type?this._onAnswer(e):"candidates"===e.type&&this._onRemoteIceCandidate(e);},n._trackSourcesHandler=function(e){for(var t,n=D(e);!(t=n()).done;){var r=t.value;this._remoteTrackSourceInfo.set(r.id,r.source);}},n._streamInfoHandler=function(e){e?this._remoteStreamInfo.set(e.id,{source:e.source,attributes:e.attributes,stream:null,mediaStream:null,trackIds:e.tracks}):m.a.warning("Unexpected stream info.");},n._chatClosedHandler=function(e){this._disposed=!0,this._stop(e,!1);},n._onOffer=function(e){var t=this;m.a.debug("About to set remote description. Signaling state: "+this._pc.signalingState),e.sdp=this._setRtpSenderOptions(e.sdp,this._config),a.d()&&(e.sdp=this._setCodecOrder(e.sdp));var n=new RTCSessionDescription(e);this._pc.setRemoteDescription(n).then(function(){t._createAndSendAnswer();},function(e){m.a.debug("Set remote description failed. Message: "+e.message),t._stop(e,!0);});},n._onAnswer=function(e){var t=this;m.a.debug("About to set remote description. Signaling state: "+this._pc.signalingState),e.sdp=this._setRtpSenderOptions(e.sdp,this._config);var n=new RTCSessionDescription(e);this._pc.setRemoteDescription(new RTCSessionDescription(n)).then(function(){m.a.debug("Set remote descripiton successfully."),t._drainPendingMessages();},function(e){m.a.debug("Set remote description failed. Message: "+e.message),t._stop(e,!0);});},n._onLocalIceCandidate=function(e){e.candidate?this._sendSdp({type:"candidates",candidate:e.candidate.candidate,sdpMid:e.candidate.sdpMid,sdpMLineIndex:e.candidate.sdpMLineIndex}).catch(function(e){m.a.warning("Failed to send candidate.");}):m.a.debug("Empty candidate1.");},n._onRemoteTrackAdded=function(e){m.a.debug("Remote track added.");for(var t,n=D(e.streams);!(t=n()).done;){var r=t.value;if(!this._remoteStreamInfo.has(r.id))return void m.a.warning("Missing stream info.");this._remoteStreamInfo.get(r.id).stream||this._setStreamToRemoteStreamInfo(r);}"connected"===this._pc.iceConnectionState||"completed"===this._pc.iceConnectionState?this._checkIceConnectionStateAndFireEvent():this._addedTrackIds.concat(e.track.id);},n._onRemoteStreamAdded=function(e){if(m.a.debug("Remote stream added."),this._remoteStreamInfo.has(e.stream.id)){"connected"===this._pc.iceConnectionState||"completed"===this._pc.iceConnectionState?this._sendSignalingMessage(q,this._remoteStreamInfo.get(e.stream.id).trackIds):this._addedTrackIds=this._addedTrackIds.concat(this._remoteStreamInfo.get(e.stream.id).trackIds);var t=this._remoteStreamInfo.get(e.stream.id).source.audio,n=this._remoteStreamInfo.get(e.stream.id).source.video,r=new p.e(t,n);a.e()&&(r.audio||e.stream.getAudioTracks().forEach(function(t){e.stream.removeTrack(t);}),r.video||e.stream.getVideoTracks().forEach(function(t){e.stream.removeTrack(t);}));var i=this._remoteStreamInfo.get(e.stream.id).attributes,o=new p.b(void 0,this._remoteId,e.stream,r,i);if(o){this._remoteStreams.push(o);var c=new p.d("streamadded",{stream:o});this.dispatchEvent(c);}}else m.a.warning("Cannot find source info for stream "+e.stream.id);},n._onRemoteStreamRemoved=function(e){m.a.debug("Remote stream removed.");var t=this._remoteStreams.findIndex(function(t){return t.mediaStream.id===e.stream.id;});if(-1!==t){var n=this._remoteStreams[t];this._streamRemoved(n),this._remoteStreams.splice(t,1);}},n._onNegotiationneeded=function(){m.a.debug("On negotiation needed."),"stable"===this._pc.signalingState?this._doNegotiate():this._isNegotiationNeeded=!0;},n._onRemoteIceCandidate=function(e){var t=new RTCIceCandidate({candidate:e.candidate,sdpMid:e.sdpMid,sdpMLineIndex:e.sdpMLineIndex});this._pc.remoteDescription&&""!==this._pc.remoteDescription.sdp?(m.a.debug("Add remote ice candidates."),this._pc.addIceCandidate(t).catch(function(e){m.a.warning("Error processing ICE candidate: "+e);})):(m.a.debug("Cache remote ice candidates."),this._remoteIceCandidates.push(t));},n._onSignalingStateChange=function(e){m.a.debug("Signaling state changed: "+this._pc.signalingState),"closed"===this._pc.signalingState||("stable"===this._pc.signalingState?(this._negotiating=!1,this._isNegotiationNeeded?this._onNegotiationneeded():(this._drainPendingStreams(),this._drainPendingMessages())):"have-remote-offer"===this._pc.signalingState&&this._drainPendingRemoteIceCandidates());},n._onIceConnectionStateChange=function(e){if("closed"===e.currentTarget.iceConnectionState||"failed"===e.currentTarget.iceConnectionState){var t=new _(S.P2P_WEBRTC_UNKNOWN,"ICE connection failed or closed.");this._stop(t,!0);}else"connected"!==e.currentTarget.iceConnectionState&&"completed"!==e.currentTarget.iceConnectionState||(this._sendSignalingMessage(q,this._addedTrackIds),this._addedTrackIds=[],this._checkIceConnectionStateAndFireEvent());},n._onDataChannelMessage=function(e){var t=JSON.parse(e.data);m.a.debug("Data channel message received: "+t.data),this._sendSignalingMessage(G,t.id);var n=new h.c("messagereceived",{message:t.data,origin:this._remoteId});this.dispatchEvent(n);},n._onDataChannelOpen=function(e){m.a.debug("Data Channel is opened."),e.target.label===F&&(m.a.debug("Data channel for messages is opened."),this._drainPendingMessages());},n._onDataChannelClose=function(e){m.a.debug("Data Channel is closed.");},n._streamRemoved=function(e){this._remoteStreamInfo.has(e.mediaStream.id)||m.a.warning("Cannot find stream info."),this._sendSignalingMessage(J,this._remoteStreamInfo.get(e.mediaStream.id).trackIds);var t=new h.e("ended");e.dispatchEvent(t);},n._isUnifiedPlan=function(){if(a.d())return!0;var e=new RTCPeerConnection({sdpSemantics:"unified-plan"});return e.getConfiguration()&&"plan-b"===e.getConfiguration().sdpSemantics;},n._createPeerConnection=function(){var e=this,t=this._config.rtcConfiguration||{};a.b()&&(t.sdpSemantics="unified-plan"),this._pc=new RTCPeerConnection(t),"function"==typeof this._pc.addTransceiver&&a.e()&&(this._pc.addTransceiver("audio"),this._pc.addTransceiver("video")),this._isUnifiedPlan()?this._pc.ontrack=function(t){e._onRemoteTrackAdded.apply(e,[t]);}:(this._pc.onaddstream=function(t){e._onRemoteStreamAdded.apply(e,[t]);},this._pc.onremovestream=function(t){e._onRemoteStreamRemoved.apply(e,[t]);}),this._pc.onicecandidate=function(t){e._onLocalIceCandidate.apply(e,[t]);},this._pc.onsignalingstatechange=function(t){e._onSignalingStateChange.apply(e,[t]);},this._pc.ondatachannel=function(t){m.a.debug("On data channel."),e._dataChannels.has(t.channel.label)||(e._dataChannels.set(t.channel.label,t.channel),m.a.debug("Save remote created data channel.")),e._bindEventsToDataChannel(t.channel);},this._pc.oniceconnectionstatechange=function(t){e._onIceConnectionStateChange.apply(e,[t]);};},n._drainPendingStreams=function(){var e=!1;if(m.a.debug("Draining pending streams."),this._pc&&"stable"===this._pc.signalingState){m.a.debug("Peer connection is ready for draining pending streams.");for(var t=0;t<this._pendingStreams.length;t++){var n=this._pendingStreams[t];if(this._pendingStreams.shift(),n.mediaStream){for(var r,i=D(n.mediaStream.getTracks());!(r=i()).done;){var o=r.value;this._pc.addTrack(o,n.mediaStream),e=!0;}m.a.debug("Added stream to peer connection."),this._publishingStreams.push(n);}}this._pendingStreams.length=0;for(var a=0;a<this._pendingUnpublishStreams.length;a++){this._pendingUnpublishStreams[a].mediaStream&&(this._pc.removeStream(this._pendingUnpublishStreams[a].mediaStream),e=!0,this._unpublishPromises.get(this._pendingUnpublishStreams[a].mediaStream.id).resolve(),this._publishedStreams.delete(this._pendingUnpublishStreams[a]),m.a.debug("Remove stream."));}this._pendingUnpublishStreams.length=0;}e&&this._onNegotiationneeded();},n._drainPendingRemoteIceCandidates=function(){for(var e=0;e<this._remoteIceCandidates.length;e++){m.a.debug("Add candidate"),this._pc.addIceCandidate(this._remoteIceCandidates[e]).catch(function(e){m.a.warning("Error processing ICE candidate: "+e);});}this._remoteIceCandidates.length=0;},n._drainPendingMessages=function(){if(m.a.debug("Draining pending messages."),0!=this._pendingMessages.length){var e=this._dataChannels.get(F);if(e&&"open"===e.readyState){for(var t=0;t<this._pendingMessages.length;t++){m.a.debug("Sending message via data channel: "+this._pendingMessages[t]),e.send(JSON.stringify(this._pendingMessages[t]));}this._pendingMessages.length=0;}else this._pc&&!e&&this._createDataChannel(F);}},n._sendStreamInfo=function(e){if(!e||!e.mediaStream)return new _(S.P2P_CLIENT_ILLEGAL_ARGUMENT);var t=[];return e.mediaStream.getTracks().map(function(n){t.push({id:n.id,source:e.source[n.kind]});}),Promise.all([this._sendSignalingMessage($,t),this._sendSignalingMessage(H,{id:e.mediaStream.id,attributes:e.attributes,tracks:Array.from(t,function(e){return e.id;}),source:e.source})]);},n._sendSysInfoIfNecessary=function(){return this._infoSent?Promise.resolve():(this._infoSent=!0,this._sendSignalingMessage(K,X));},n._sendClosedMsgIfNecessary=function(){return null===this._pc.remoteDescription||""===this._pc.remoteDescription.sdp?this._sendSignalingMessage(W):Promise.resolve();},n._handleRemoteCapability=function(e){e.sdk&&e.sdk&&"JavaScript"===e.sdk.type&&e.runtime&&"Firefox"===e.runtime.name?(this._remoteSideSupportsRemoveStream=!1,this._remoteSideSupportsPlanB=!1,this._remoteSideSupportsUnifiedPlan=!0):(this._remoteSideSupportsRemoveStream=!0,this._remoteSideSupportsPlanB=!0,this._remoteSideSupportsUnifiedPlan=!1);},n._doNegotiate=function(){this._createAndSendOffer();},n._setCodecOrder=function(e){this._config.audioEncodings&&(e=N(e,"audio",Array.from(this._config.audioEncodings,function(e){return e.codec.name;})));this._config.videoEncodings&&(e=N(e,"video",Array.from(this._config.videoEncodings,function(e){return e.codec.name;})));return e;},n._setMaxBitrate=function(e,t){return"object"==typeof t.audioEncodings&&(e=B(e,t.audioEncodings)),"object"==typeof t.videoEncodings&&(e=B(e,t.videoEncodings)),e;},n._setRtpSenderOptions=function(e,t){return e=this._setMaxBitrate(e,t);},n._setRtpReceiverOptions=function(e){return e=this._setCodecOrder(e);},n._createAndSendOffer=function(){var e,t=this;this._pc?(this._isNegotiationNeeded=!1,this._isCaller=!0,this._pc.createOffer().then(function(n){if(n.sdp=t._setRtpReceiverOptions(n.sdp),e=n,"stable"===t._pc.signalingState)return t._pc.setLocalDescription(n).then(function(){return t._sendSdp(e);});}).catch(function(e){m.a.error(e.message+" Please check your codec settings.");var n=new _(S.P2P_WEBRTC_SDP,e.message);t._stop(n,!0);})):m.a.error("Peer connection have not been created.");},n._createAndSendAnswer=function(){var e,t=this;this._drainPendingStreams(),this._isNegotiationNeeded=!1,this._isCaller=!1,this._pc.createAnswer().then(function(n){return n.sdp=t._setRtpReceiverOptions(n.sdp),e=n,t._logCurrentAndPendingLocalDescription(),t._pc.setLocalDescription(n);}).then(function(){return t._sendSdp(e);}).catch(function(e){m.a.error(e.message+" Please check your codec settings.");var n=new _(S.P2P_WEBRTC_SDP,e.message);t._stop(n,!0);});},n._logCurrentAndPendingLocalDescription=function(){m.a.info("Current description: "+this._pc.currentLocalDescription),m.a.info("Pending description: "+this._pc.pendingLocalDescription);},n._getAndDeleteTrackSourceInfo=function(e){if(e.length>0){var t=e[0].id;if(this._remoteTrackSourceInfo.has(t)){var n=this._remoteTrackSourceInfo.get(t);return this._remoteTrackSourceInfo.delete(t),n;}m.a.warning("Cannot find source info for "+t);}},n._unpublish=function(e){var t=this;return navigator.mozGetUserMedia||!this._remoteSideSupportsRemoveStream?(m.a.error("Stopping a publication is not supported on Firefox. Please use P2PClient.stop() to stop the connection with remote endpoint."),Promise.reject(new _(S.P2P_CLIENT_UNSUPPORTED_METHOD))):this._publishedStreams.has(e)?(this._pendingUnpublishStreams.push(e),new Promise(function(n,r){t._unpublishPromises.set(e.mediaStream.id,{resolve:n,reject:r}),t._drainPendingStreams();})):Promise.reject(new _(S.P2P_CLIENT_ILLEGAL_ARGUMENT));},n._createDataChannel=function(e){if(this._dataChannels.has(e))m.a.warning("Data channel labeled "+e+" already exists.");else if(this._pc){m.a.debug("Create data channel.");var t=this._pc.createDataChannel(e);this._bindEventsToDataChannel(t),this._dataChannels.set(F,t),this._onNegotiationneeded();}else m.a.debug("PeerConnection is not available before creating DataChannel.");},n._bindEventsToDataChannel=function(e){var t=this;e.onmessage=function(e){t._onDataChannelMessage.apply(t,[e]);},e.onopen=function(e){t._onDataChannelOpen.apply(t,[e]);},e.onclose=function(e){t._onDataChannelClose.apply(t,[e]);},e.onerror=function(e){m.a.debug("Data Channel Error:",error);};},n._getStreamByTrack=function(e){for(var t,n=[],r=D(this._remoteStreamInfo);!(t=r()).done;){var i=t.value,o=(i[0],i[1]);if(o.stream&&o.stream.mediaStream)for(var a,c=D(o.stream.mediaStream.getTracks());!(a=c()).done;){e===a.value&&n.push(o.stream.mediaStream);}}return n;},n._areAllTracksEnded=function(e){for(var t,n=D(e.getTracks());!(t=n()).done;){if("live"===t.value.readyState)return!1;}return!0;},n._stop=function(e,t){var n=e;n||(n=new _(S.P2P_CLIENT_UNKNOWN));for(var r,i=D(this._dataChannels);!(r=i()).done;){var o=r.value;o[0];o[1].close();}this._dataChannels.clear(),this._pc&&"closed"!==this._pc.iceConnectionState&&this._pc.close();for(var a,c=D(this._publishPromises);!(a=c()).done;){var s=a.value;s[0];s[1].reject(n);}this._publishPromises.clear();for(var u,d=D(this._unpublishPromises);!(u=d()).done;){var f=u.value;f[0];f[1].reject(n);}this._unpublishPromises.clear();for(var l,p=D(this._sendDataPromises);!(l=p()).done;){var v=l.value;v[0];v[1].reject(n);}if(this._sendDataPromises.clear(),this._publishedStreams.forEach(function(e){e.dispatchEvent(new h.e("ended"));}),this._publishedStreams.clear(),this._remoteStreams.forEach(function(e){e.dispatchEvent(new h.e("ended"));}),this._remoteStreams=[],!this._disposed){var g;if(t)e&&((g=JSON.parse(JSON.stringify(e))).message="Error happened at remote side."),this._sendSignalingMessage(W,g).catch(function(e){m.a.debug("Failed to send close."+e.message);});this.dispatchEvent(new Event("ended"));}},n._setStreamToRemoteStreamInfo=function(e){var t=this._remoteStreamInfo.get(e.id),n=t.attributes,r=new p.e(this._remoteStreamInfo.get(e.id).source.audio,this._remoteStreamInfo.get(e.id).source.video);t.stream=new p.b(void 0,this._remoteId,e,r,n),t.mediaStream=e;var i=t.stream;i?this._remoteStreams.push(i):m.a.warning("Failed to create RemoteStream.");},n._checkIceConnectionStateAndFireEvent=function(){var e=this;if("connected"===this._pc.iceConnectionState||"completed"===this._pc.iceConnectionState)for(var t,n=D(this._remoteStreamInfo);!(t=n()).done;){var r=t.value,i=(r[0],r[1]);if(i.mediaStream){var o=new p.d("streamadded",{stream:i.stream});if(this._isUnifiedPlan())for(var a,c=D(i.mediaStream.getTracks());!(a=c()).done;){a.value.addEventListener("ended",function(t){for(var n,r=D(e._getStreamByTrack(t.target));!(n=r()).done;){var i=n.value;e._areAllTracksEnded(i)&&e._onRemoteStreamRemoved(i);}});}this._sendSignalingMessage(q,i.trackIds),this._remoteStreamInfo.get(i.mediaStream.id).mediaStream=null,this.dispatchEvent(o);}}},t;}(h.b),Z=1,Q=2,ee=3,te=function te(e,t){Object.setPrototypeOf(this,new h.b());var n,r=e,i=t,o=new Map(),a=this,c=Z;i.onMessage=function(e,t){m.a.debug("Received signaling message from "+e+": "+t);var n=JSON.parse(t);"chat-closed"!==n.type?a.allowedRemoteIds.indexOf(e)>=0?u(e).onMessage(n):s(e,"chat-closed",S.P2P_CLIENT_DENIED):o.has(e)&&(u(e).onMessage(n),o.delete(e));},i.onServerDisconnected=function(){c=Z,a.dispatchEvent(new h.e("serverdisconnected"));},this.allowedRemoteIds=[],this.connect=function(e){return c!==Z?(m.a.warning("Invalid connection state: "+c),Promise.reject(new _(S.P2P_CLIENT_INVALID_STATE))):(c=Q,new Promise(function(t,r){i.connect(e).then(function(e){c=ee,t(n=e);},function(e){r(new _(w(e)));});}));},this.disconnect=function(){c!=Z&&(o.forEach(function(e){e.stop();}),o.clear(),i.disconnect());},this.publish=function(e,t){return c!==ee?Promise.reject(new _(S.P2P_CLIENT_INVALID_STATE,"P2P Client is not connected to signaling channel.")):this.allowedRemoteIds.indexOf(e)<0?Promise.reject(new _(S.P2P_CLIENT_NOT_ALLOWED)):Promise.resolve(u(e).publish(t));},this.send=function(e,t){return c!==ee?Promise.reject(new _(S.P2P_CLIENT_INVALID_STATE,"P2P Client is not connected to signaling channel.")):this.allowedRemoteIds.indexOf(e)<0?Promise.reject(new _(S.P2P_CLIENT_NOT_ALLOWED)):Promise.resolve(u(e).send(t));},this.stop=function(e){o.has(e)?(o.get(e).stop(),o.delete(e)):m.a.warning("No PeerConnection between current endpoint and specific remote endpoint.");},this.getStats=function(e){return o.has(e)?o.get(e).getStats():Promise.reject(new _(S.P2P_CLIENT_INVALID_STATE,"No PeerConnection between current endpoint and specific remote endpoint."));};var s=function s(e,t,n){var r={type:t};return n&&(r.data=n),i.send(e,JSON.stringify(r)).catch(function(e){if("number"==typeof e)throw w(e);});},u=function u(e){if(!o.has(e)){var t=Object.create(h.b);t.sendSignalingMessage=s;var i=new Y(r,n,e,t);i.addEventListener("streamadded",function(e){a.dispatchEvent(e);}),i.addEventListener("messagereceived",function(e){a.dispatchEvent(e);}),i.addEventListener("ended",function(){o.delete(e);}),o.set(e,i);}return o.get(e);};},ne=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).code=n,r;}return g()(t,e),t;}(y()(Error)),re=function(){var e,t,n,r=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/"],i=[];for(n=0;n<r.length;n+=1){i[r[n]]=n;}var o=function o(n){e=n,t=0;},a=function a(){if(!e)return-1;if(t>=e.length)return-1;var n=255&e.charCodeAt(t);return t+=1,n;},c=function c(){if(!e)return-1;for(;;){if(t>=e.length)return-1;var n=e.charAt(t);if(t+=1,i[n])return i[n];if("A"===n)return 0;}},s=function s(e){return 1===(e=e.toString(16)).length&&(e="0"+e),e="%"+e,unescape(e);};return{encodeBase64:function encodeBase64(e){var t,n;o(e),t="";var i=new Array(3);for(n=!1;!n&&-1!==(i[0]=a());){i[1]=a(),i[2]=a(),t+=r[i[0]>>2],-1!==i[1]?(t+=r[i[0]<<4&48|i[1]>>4],-1!==i[2]?(t+=r[i[1]<<2&60|i[2]>>6],t+=r[63&i[2]]):(t+=r[i[1]<<2&60],t+="=",n=!0)):(t+=r[i[0]<<4&48],t+="=",t+="=",n=!0);}return t;},decodeBase64:function decodeBase64(e){var t,n;o(e),t="";var r=new Array(4);for(n=!1;!n&&-1!==(r[0]=c())&&-1!==(r[1]=c());){r[2]=c(),r[3]=c(),t+=s(r[0]<<2&255|r[1]>>4),-1!==r[2]?(t+=s(r[1]<<4&255|r[2]>>2),-1!==r[3]?t+=s(r[2]<<6&255|r[3]):n=!0):n=!0;}return t;}};}();function ie(e,t,n,r){"ok"===e||"success"===e?n(t):"error"===e?r(t):m.a.error("MCU returns unknown ack.");}var oe=function(e){function t(){var t;return(t=e.call(this)||this)._socket=null,t._loggedIn=!1,t._reconnectTimes=0,t._reconnectionTicket=null,t._refreshReconnectionTicket=null,t;}g()(t,e);var n=t.prototype;return n.connect=function(e,t,n){var r=this;return new Promise(function(t,i){var o={reconnection:!0,reconnectionAttempts:25,"force new connection":!0,transports:["websocket"],reconnectionDelayMax:5e3};r._socket=io(e,o),["participant","text","stream","progress","sipAndPstnJoin"].forEach(function(e){r._socket.on(e,function(t){r.dispatchEvent(new h.c("data",{message:{notification:e,data:t}}));});}),r._socket.on("reconnect_attempt",function(){console.info("=> reconnect_attempt");}),r._socket.on("reconnecting",function(){V||(V=setTimeout(function(){r.dispatchEvent(new h.e("disconnect"));},12e4)),window._socket_status_=!1,console.log("=> reconnecting",new Date().toLocaleString()),r._reconnectTimes++,r.dispatchEvent(new h.e("reconnecting"));}),r._socket.on("reconnect_failed",function(){console.log("=> reconnect_failed"),r._reconnectTimes>=25&&r.dispatchEvent(new h.e("disconnect"));}),r._socket.on("reconnect_error",function(){console.log("=> reconnect_error");}),r._socket.on("connect_error",function(e){console.error("=> connect_error",e,new Date().toLocaleString()),r._reconnectTimes>=15&&i(new ne("connect_error:"+(e&&e.message)));}),r._socket.on("drop",function(){console.log("=> drop"),r._reconnectTimes=25;}),r._socket.on("disconnect",function(e){window._socket_status_=!1,console.log("=> disconnect",e,new Date().toLocaleString()),r._clearReconnectionTask(),r._reconnectTimes>=25&&(r._loggedIn=!1,r.dispatchEvent(new h.e("disconnect")));}),r._socket.on("action",function(e){r._socket.emit("stillalive",e);}),r._socket.emit("login",n,function(e,n){"ok"===e&&(r._loggedIn=!0,r._onReconnectionTicket(n.reconnectionTicket),r._socket.on("connect",function(){r._socket.emit("relogin",r._reconnectionTicket,function(e,t){"ok"===e?(window._socket_status_=!0,r._reconnectTimes=0,r._onReconnectionTicket(t),r.dispatchEvent(new h.e("relogin")),clearTimeout(V)):t.includes("400002")?r.dispatchEvent(new h.e("droped")):r.dispatchEvent(new h.e("disconnect"));});})),ie(e,n,t,i);});});},n.disconnect=function(){var e=this;return!this._socket||this._socket.disconnected?Promise.reject(new ne("Portal is not connected.")):new Promise(function(t,n){e._socket.emit("logout",function(r,i){e._reconnectTimes=25,e._socket.disconnect(),ie(r,i,t,n);});});},n.send=function(e,t){var n=this;return new Promise(function(r,i){void 0===t?n._socket.emit(e,function(e,t){ie(e,t,r,i);}):n._socket.emit(e,t,function(t,o){switch(e){case"getParticipantsList":return n.dispatchEvent({type:"getParticipantsList",list:t}),void r();case"room-infos":case"controlStreams":case"change-name":case"assignHost":return void r({status:t,data:o});}ie(t,o,r,i);});});},n._onReconnectionTicket=function(e){var t=this;this._reconnectionTicket=e;var n=JSON.parse(re.decodeBase64(e)),r=Date.now();if(n.notAfter<=r-1e4)m.a.warning("Reconnection ticket expires too soon.");else{var i=n.notAfter-r-6e4;i<0&&(i=n.notAfter-r-1e4),this._clearReconnectionTask(),this._refreshReconnectionTicket=setTimeout(function(){t._socket.emit("refreshReconnectionTicket",function(e,n){"ok"===e?t._onReconnectionTicket(n):m.a.warning("Failed to refresh reconnection ticket.");});},i);}},n._clearReconnectionTask=function(){clearTimeout(this._refreshReconnectionTicket),this._refreshReconnectionTicket=null;},t;}(h.b),ae=n(25),ce=function ce(e,t,n,r){this.id=e,this.participants=t,this.remoteStreams=n,this.self=r;},se=n(3),ue=n.n(se),de=n(23);function fe(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return le(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return le(e,t);}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]};};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}return(n=e[Symbol.iterator]()).next.bind(n);}function le(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++){r[n]=e[n];}return r;}var pe=function(e){function t(t,n){var r;return(r=e.call(this)||this)._config=t,r._options=null,r._signaling=n,r._pc=null,r._internalId=null,r._pendingCandidates=[],r._subscribePromise=null,r._publishPromise=null,r._subscribedStream=null,r._publishedStream=null,r._publication=null,r._subscription=null,r._disconnectTimer=null,r._ended=!1,r.iceDisconnectedTimer=null,r.iceStatus="",r.offerOptions=null,r.iceTimer=null,r._trackStream=!1,r._videoSender=null,r._audioSender=null,r;}g()(t,e);var n=t.prototype;return n.onMessage=function(e,t){switch(e){case"progress":"soac"===t.status?this._sdpHandler(t.data):"ready"===t.status?this._readyHandler():"error"===t.status&&this._errorHandler(t);break;case"stream":this._onStreamEvent(t);break;default:m.a.warning("Unknown notification from MCU.");}},n.publish=function(e,t){var n=this,r="screen-cast"===e.source.audio||"screen-cast"===e.source.video;if(void 0===t&&(t={audio:!!e.mediaStream.getAudioTracks().length,video:!!e.mediaStream.getVideoTracks().length}),"object"!=typeof t)return Promise.reject(new TypeError("Options should be an object."));if(this._isRtpEncodingParameters(t.audio)&&this._isOwtEncodingParameters(t.video)||this._isOwtEncodingParameters(t.audio)&&this._isRtpEncodingParameters(t.video))return Promise.reject(new ne("Mixing RTCRtpEncodingParameters and AudioEncodingParameters/VideoEncodingParameters is not allowed."));if(void 0===t.audio&&(t.audio=!!e.mediaStream.getAudioTracks().length),void 0===t.video&&(t.video=!!e.mediaStream.getVideoTracks().length),!(!1!==t.audio&&null!==t.audio||!1!==t.video&&null!==t.video))return Promise.reject(new ne("Cannot publish a stream without audio and video."));if("object"==typeof t.audio){if(!Array.isArray(t.audio))return Promise.reject(new TypeError("options.audio should be a boolean or an array."));for(var i,o=fe(t.audio);!(i=o()).done;){var a=i.value;if(!a.codec||"string"!=typeof a.codec.name||void 0!==a.maxBitrate&&"number"!=typeof a.maxBitrate)return Promise.reject(new TypeError("options.audio has incorrect parameters."));}}if("object"==typeof t.video&&!Array.isArray(t.video))return Promise.reject(new TypeError("options.video should be a boolean or an array."));if(this._isOwtEncodingParameters(t.video))for(var c,s=fe(t.video);!(c=s()).done;){var u=c.value;if(!u.codec||"string"!=typeof u.codec.name||void 0!==u.maxBitrate&&"number"!=typeof u.maxBitrate||void 0!==u.codec.profile&&"string"!=typeof u.codec.profile)return Promise.reject(new TypeError("options.video has incorrect parameters."));}this._options=t;var d={};if(this._createPeerConnection("publish"),e.mediaStream.getAudioTracks().length>0&&!1!==t.audio&&null!==t.audio&&(e.mediaStream.getAudioTracks().length>1&&m.a.warning("Publishing a stream with multiple audio tracks is not fully supported."),"boolean"!=typeof t.audio&&"object"!=typeof t.audio))return Promise.reject(new ne("Type of audio options should be boolean or an object."));d.audio={},d.audio.source=r?"screen-cast":"mic",e.mediaStream.getVideoTracks().length>1&&m.a.warning("Publishing a stream with multiple video tracks is not fully supported."),d.video={},d.video.source=r?"screen-cast":"camera";var f={resolution:{width:1280,height:720},framerate:15};if(e.mediaStream.getVideoTracks()[0]){var l=e.mediaStream.getVideoTracks()[0].getSettings();f={resolution:{width:l.width,height:l.height},framerate:l.frameRate};}return d.video.parameters=f,this._publishedStream=e,this._signaling.sendSignalingMessage("publish",{media:d,attributes:e.attributes}).then(function(r){var i=new h.c("id",{message:r.id,origin:n._remoteId});n.dispatchEvent(i),n._internalId=r.id;if("function"==typeof n._pc.addTransceiver){var o={direction:"sendonly"};if(n._isRtpEncodingParameters(t.audio)&&(o.sendEncodings=t.audio),d.audio&&e.mediaStream.getAudioTracks().length>0){var a=n._pc.addTransceiver(e.mediaStream.getAudioTracks()[0],o);n._audioSender=a;}else n._audioSender=n._pc.addTransceiver("audio",o);var c={direction:"sendonly"};if(n._isRtpEncodingParameters(t.video)&&(c.sendEncodings=t.video,n._videoCodecs=t.video[0].codec.name),d.video&&e.mediaStream.getVideoTracks().length>0){var s=n._pc.addTransceiver(e.mediaStream.getVideoTracks()[0],c);n._videoSender=s;}else n._videoSender=n._pc.addTransceiver("video",c);return Promise.resolve({});}}).then(function(e){n.offerOptions=e,n._publishMakeIce(e,t);}).catch(function(e){n._unpublish(),n._rejectPromise(e),n._fireEndedEventOnPublicationOrSubscription();}),new Promise(function(e,t){n._publishPromise={resolve:e,reject:t};});},n._publishMakeIce=function(e,t){var n,r=this;this._pc.createOffer(e).then(function(e){return t&&(e.sdp=r._setRtpReceiverOptions(e.sdp,t)),e;}).then(function(e){return n=e,r._pc.setLocalDescription(e);}).then(function(){r._signaling.sendSignalingMessage("soac",{id:r._internalId,signaling:n});}).catch(function(e){m.a.error("Failed to create offer or set SDP. Message: "+e.message),r._restartPublishIce();});},n.subscribe=function(e,t){var n=this;if(void 0===t&&(t={audio:!!e.capabilities.audio,video:!!e.capabilities.video}),"object"!=typeof t)return Promise.reject(new TypeError("Options should be an object."));if(void 0===t.audio&&(t.audio=!!e.capabilities.audio),void 0===t.video&&(t.video=!!e.capabilities.video),void 0!==t.audio&&"object"!=typeof t.audio&&"boolean"!=typeof t.audio&&null!==t.audio||void 0!==t.video&&"object"!=typeof t.video&&"boolean"!=typeof t.video&&null!==t.video)return Promise.reject(new TypeError("Invalid options type."));if(t.audio&&!e.capabilities.audio||t.video&&!e.capabilities.video)return Promise.reject(new ne("options.audio/video cannot be true or an object if there is no audio/video track in remote stream."));if(!1===t.audio&&!1===t.video)return Promise.reject(new ne("Cannot subscribe a stream without audio and video."));this._options=t;var r={};if(t.audio){if("object"==typeof t.audio&&Array.isArray(t.audio.codecs)&&0===t.audio.codecs.length)return Promise.reject(new TypeError("Audio codec cannot be an empty array."));r.audio={},r.audio.from=e.id;}else r.audio=!1;if(t.video){if("object"==typeof t.video&&Array.isArray(t.video.codecs)&&0===t.video.codecs.length)return Promise.reject(new TypeError("Video codec cannot be an empty array."));r.video={},r.video.from=e.id,(t.video.resolution||t.video.frameRate||t.video.bitrateMultiplier&&1!==t.video.bitrateMultiplier||t.video.keyFrameInterval)&&(r.video.parameters={resolution:t.video.resolution,framerate:t.video.frameRate,bitrate:t.video.bitrateMultiplier?"x"+t.video.bitrateMultiplier.toString():void 0,keyFrameInterval:t.video.keyFrameInterval});}else r.video=!1;return this._subscribedStream=e,this._signaling.sendSignalingMessage("subscribe",{media:r}).then(function(e){var i=new h.c("id",{message:e.id,origin:n._remoteId});n.dispatchEvent(i),n._internalId=e.id,n._createPeerConnection("subscribe");var o={offerToReceiveAudio:!!t.audio,offerToReceiveVideo:!!t.video};"function"==typeof n._pc.addTransceiver&&(r.audio&&n._pc.addTransceiver("audio",{direction:"recvonly"}),r.video&&n._pc.addTransceiver("video",{direction:"recvonly"})),n.offerOptions=o,n._makeSubscribeIce(o,t);}).catch(function(e){n._unsubscribe(),n._rejectPromise(e),n._fireEndedEventOnPublicationOrSubscription();}),new Promise(function(e,t){n._subscribePromise={resolve:e,reject:t};});},n._makeSubscribeIce=function(e,t){var n=this;return new Promise(function(r){n._pc.createOffer(e).then(function(e){t&&(e.sdp=n._setRtpReceiverOptions(e.sdp,t)),n._pc.setLocalDescription(e).then(function(){n._signaling.sendSignalingMessage("soac",{id:n._internalId,signaling:e}),r();},function(e){m.a.error("Set local description failed. Message: "+JSON.stringify(e));});},function(e){m.a.error("Create offer failed. Error info: "+JSON.stringify(e));}).catch(function(e){m.a.error("Failed to create offer or set SDP. Message: "+e.message),n._restartSubscribeIce();});});},n._debounce=function(e,t){clearTimeout(this.iceTimer),this.iceTimer=setTimeout(function(){e(),clearTimeout(this.iceTimer);},t);},n._restartSubscribeIce=function(){var e=this;return new Promise(function(t){if(!e._pc||"closed"==e._pc.signalingState)return t({pcStatus:"closed"});e._debounce(function(){e._pendingCandidates=[],e._makeSubscribeIce(ue()({},e.offerOptions,{iceRestart:!0}),e._options).then(function(){e._subscription.dispatchEvent(new h.e("restartIce")),t();});},2e3);});},n._restartPublishIce=function(){var e=this;this._debounce(function(){e._pendingCandidates=[],e._publishMakeIce(ue()({},e.offerOptions,{iceRestart:!0}),e._options);},2e3);},n._unpublish=function(){var e=this;return new Promise(function(t,n){e._signaling.sendSignalingMessage("unpublish",{id:e._internalId}).then(function(){t();}).catch(function(e){m.a.warning("MCU returns negative ack for unpublishing, "+e);}),e._pc&&"closed"!==e._pc.signalingState&&(e._pc.close(),e._pc=null,clearInterval(e.iceDisconnectedTimer));});},n._unsubscribe=function(){var e=this,t=this._subscribedStream.mediaStream;if(t)for(var n,r=fe(t.getTracks());!(n=r()).done;){n.value.stop();}return new Promise(function(t){e._signaling.sendSignalingMessage("unsubscribe",{id:e._internalId}).then(function(){t();}).catch(function(e){t(),m.a.warning("MCU returns negative ack for unsubscribing, "+e);}),e._pc&&"closed"!==e._pc.signalingState&&(e._pc.close(),clearInterval(e.iceDisconnectedTimer),e._pc=null);});},n._muteOrUnmute=function(e,t,n,r){var i=this,o=t?"stream-control":"subscription-control",a=e?"pause":"play";return"notConnect"===r&&(a=r),this._signaling.sendSignalingMessage(o,{id:this._internalId,operation:a,data:n}).then(function(){if(!t){var r=e?"mute":"unmute";i._subscription.dispatchEvent(new h.d(r,{kind:n}));}});},n._applyOptions=function(e){if(!e.video&&!e.audio)return Promise.reject(new ne("Options should need video or audio"));var t={};t.resolution=e.video.resolution,t.framerate=e.video.frameRate,t.bitrate=e.video.bitrateMultiplier?"x"+e.video.bitrateMultiplier.toString():void 0,t.keyFrameInterval=e.video.keyFrameInterval;var n={video:{from:e.from,parameters:t}};return e.audio&&(n.audio={from:e.from}),this._signaling.sendSignalingMessage("subscription-control",{id:this._internalId,operation:"update",data:n});},n._onRemoteStreamAdded=function(e){this._subscribedStream?(this._trackStream=!0,this._subscribedStream.mediaStream=e.streams[0],this._subscription&&this._subscribePromise.resolve(this._subscription)):m.a.warning("Received remote stream without subscription.");},n._onLocalIceCandidate=function(e){e.candidate?"stable"!==this._pc.signalingState?this._pendingCandidates.push(e.candidate):this._sendCandidate(e.candidate):m.a.debug("Empty candidate2.");},n._fireEndedEventOnPublicationOrSubscription=function(){if(!this._ended){this._ended=!0;var e=new h.e("ended");this._publication?(this._publication.dispatchEvent(e),this._publication.stop()):this._subscription&&(this._subscription.dispatchEvent(e),this._subscription.stop(),this._subscription.dispatchEvent("ended",new h.e("ended")));}},n._rejectPromise=function(e){if(!e)new ne("Connection failed or closed.");this._publishPromise?(this._publishPromise.reject(e),this._publishPromise=void 0):this._subscribePromise&&(this._subscribePromise.reject(e),this._subscribePromise=void 0);},n._onIceConnectionStateChange=function(e){e&&e.currentTarget&&(this.iceStatus=e.currentTarget.iceConnectionState,m.a.debug("ICE connection state changed to "+e.currentTarget.iceConnectionState),"closed"!==e.currentTarget.iceConnectionState&&"failed"!==e.currentTarget.iceConnectionState||"failed"===e.currentTarget.iceConnectionState&&this._handleError({data:"ICE connection failed",code:401}));},n._sendCandidate=function(e){this._signaling.sendSignalingMessage("soac",{id:this._internalId,signaling:{type:"candidate",candidate:{candidate:"a="+e.candidate,sdpMid:e.sdpMid,sdpMLineIndex:e.sdpMLineIndex}}});},n._createPeerConnection=function(e){var t=this,n=this._config.rtcConfiguration||{};a.b()&&(n.sdpSemantics="unified-plan"),this._pc=new RTCPeerConnection(n),this._pc.onicecandidate=function(e){t._onLocalIceCandidate.apply(t,[e]);},this._pc.ontrack=function(e){t._onRemoteStreamAdded.apply(t,[e]);},this._pc.oniceconnectionstatechange=function(e){t._onIceConnectionStateChange.apply(t,[e]);},this._pc.onremoteqosupdated=function(e){t._subscription&&t._subscription.dispatchEvent({type:"qosupdated",qos:e});};},n._getStats=function(e){var t=this;return void 0===e&&(e="landing"),this._pc?"analysis"==e?new Promise(function(e){t._pc.getStats(function(t){e(t.result());});}):this._pc.getStats():Promise.reject(new ne("PeerConnection is not available."));},n._replaceTrack=function(e,t){"video"===e&&this._videoSender.sender.replaceTrack(t),"audio"===e&&this._audioSender.sender.replaceTrack(t);},n._readyHandler=function(){var e=this;if(this._subscribePromise){this._subscription=new de.b(this._internalId,function(){return e._unsubscribe();},function(t){return e._getStats(t);},function(t){return e._muteOrUnmute(!0,!1,t);},function(t){return e._muteOrUnmute(!1,!1,t);},function(t){return e._applyOptions(t);},function(){return e._restartSubscribeIce();}),this._subscribedStream.addEventListener("ended",function(){e._subscription.dispatchEvent("ended",new h.e("ended"));}),this._trackStream&&this._subscribePromise.resolve(this._subscription);var t=setTimeout(function(){e._subscription.dispatchEvent(new h.e("ready")),clearTimeout(t);},800);}else this._publishPromise&&(this._publication=new I.b(this._internalId,function(){return e._unpublish();},function(t){return e._getStats(t);},function(t,n){return e._muteOrUnmute(!0,!0,t,n);},function(t){return e._muteOrUnmute(!1,!0,t);},function(){return e._restartPublishIce();},function(t,n){return e._replaceTrack(t,n);}),this._publishPromise.resolve(this._publication));this._publishPromise=null,this._subscribePromise=null;},n._sdpHandler=function(e){var t=this;"answer"===e.type&&((this._publication||this._publishPromise)&&this._options&&(e.sdp=this._setRtpSenderOptions(e.sdp,this._options)),this._pc.setRemoteDescription(e).then(function(){if(t._pendingCandidates.length>0)for(var e,n=fe(t._pendingCandidates);!(e=n()).done;){var r=e.value;t._sendCandidate(r);}},function(e){m.a.error("Set remote description failed: "+e),(t._publication||t._publishPromise)&&t._restartPublishIce(),(t._subscribePromise||t._subscription)&&t._restartSubscribeIce();}));},n._errorHandler=function(e){return this._handleError(e);},n._handleError=function(e){var t=new ne(e.data,e.code);if(this._publishPromise||this._subscribePromise)return this._rejectPromise(t);if(!this._ended){var n=this._publication||this._subscription;if(n){var r=new h.a("error",{error:t});n.dispatchEvent(r);}else m.a.warning("Neither publication nor subscription is available.");}},n._setCodecOrder=function(e,t){if(this._publication||this._publishPromise){if(t.audio)e=N(e,"audio",Array.from(t.audio,function(e){return e.codec.name;}));if(t.video)e=N(e,"video",Array.from(t.video,function(e){return e.codec.name;}));}else{if(t.audio&&t.audio.codecs)e=N(e,"audio",Array.from(t.audio.codecs,function(e){return e.name;}));if(t.video&&t.video.codecs)e=N(e,"video",Array.from(t.video.codecs,function(e){return e.name;}));}return e;},n._setMaxBitrate=function(e,t){return"object"==typeof t.audio&&(e=B(e,t.audio)),"object"==typeof t.video&&(e=B(e,t.video)),e;},n._setRtpSenderOptions=function(e,t){return this._isRtpEncodingParameters(t.audio)||this._isRtpEncodingParameters(t.video)?e:e=this._setMaxBitrate(e,t);},n._setRtpReceiverOptions=function(e,t){return this._isRtpEncodingParameters(t.video)&&a.e()&&t.video.length>1&&(e=function(e,t,n){var r,i;if(!(n&&n>1))return e;var o=e.split("\r\n"),a=T(o,"m=",t);if(null===a)return e;var c=C(o,a+1,-1,"m=");null===c&&(c=o.length);for(var s=function s(e){return e.split(" ")[0].split(":")[1];},u=new Set(),d=new Set(),f=new Set(),l=[],p=[],m=a+1;m<c;){var h=o[m];if(""===h)break;if(h.indexOf("a=ssrc:")>-1){var v=s(o[m]);if(d.add(v),h.indexOf("cname")>-1||h.indexOf("msid")>-1)for(var g=1;g<n;g++){var b=parseInt(v)+g+"";l.push(h.replace(v,b));}else u.add(h);}if(h.indexOf("a=ssrc-group:FID")>-1){var y=h.split(" ");f.add(y[2]);for(var S=1;S<n;S++){var w=parseInt(y[1])+S+"",_=parseInt(y[2])+S+"";p.push(h.replace(y[1],w).replace(y[2],_));}}m++;}var I=m;return d.forEach(function(e){if(!f.has(e)){var t="a=ssrc-group:SIM";t=t+" "+e;for(var r=1;r<n;r++){t=t+" "+(parseInt(e)+r);}p.push(t);}}),l.sort(),(r=o).splice.apply(r,[I,0].concat(p)),(i=o).splice.apply(i,[I,0].concat(l)),e=(o=o.filter(function(e){return!u.has(e);})).join("\r\n");}(e,"video",t.video.length)),this._isRtpEncodingParameters(t.video)&&this._videoCodecs?e=N(e,"video",this._videoCodecs):this._isRtpEncodingParameters(t.audio)||this._isRtpEncodingParameters(t.video)?e:e=this._setCodecOrder(e,t);},n._onStreamEvent=function(e){var t,n;(this._publication&&e.id===this._publication.id?t=this._publication:this._subscribedStream&&e.id===this._subscribedStream.id&&(t=this._subscription),t)&&("audio.status"===e.data.field?n=c.c.AUDIO:"video.status"===e.data.field?n=c.c.VIDEO:m.a.warning("Invalid data field for stream update info."),"active"===e.data.value?t.dispatchEvent(new h.d("unmute",{kind:n})):"inactive"===e.data.value?t.dispatchEvent(new h.d("mute",{kind:n})):m.a.warning("Invalid data value for stream update info."));},n._isRtpEncodingParameters=function(e){if(!Array.isArray(e))return!1;var t=e[0];return t.codecPayloadType||t.dtx||t.active||t.ptime||t.maxFramerate||t.scaleResolutionDownBy||t.rid;},n._isOwtEncodingParameters=function(e){return!!Array.isArray(e)&&!!e[0].codec;},t;}(h.b),me=n(24),he=n(15);function ve(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return ge(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ge(e,t);}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]};};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}return(n=e[Symbol.iterator]()).next.bind(n);}function ge(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++){r[n]=e[n];}return r;}var be=function be(e){var t={};try{t=JSON.parse(e.metadata);}catch(e){console.error(e);}return t;},ye=1,Se=2,we=3,_e=function _e(e,t){var n=new h.e(e,t);return n.participant=t.participant,n;},Ie=function Ie(e,t){Object.setPrototypeOf(this,new h.b()),e=e||{};var n,r,i=this,o=ye,c=t||new oe();i.remoteStreams=new Map(),i.participants=new Map();var s=new Map(),u=new Map();function d(e,t){if("soac"===e||"progress"===e){if(!u.has(t.id))return void m.a.warning("Cannot find a channel for incoming data.");u.get(t.id).onMessage(e,t);}else"stream"===e?"add"===t.status?function(e){var t=f(e);i.remoteStreams.set(t.id,t);var n=new p.d("streamadded",{stream:t});i.dispatchEvent(n);}(t.data):"remove"===t.status?function(e){if(!i.remoteStreams.has(e.id))return void m.a.warning("Cannot find specific remote stream.");var t=i.remoteStreams.get(e.id),n=new h.e("ended");i.remoteStreams.delete(t.id),t.dispatchEvent(n),i.dispatchEvent({type:"streamended",stream:t,isHost:e.isHost});}(t):"update"===t.status&&(i.dispatchEvent({type:"streamUpdate",data:t}),"audio.status"===t.data.field||"video.status"===t.data.field?u.forEach(function(n){n.onMessage(e,t);}):"activeInput"===t.data.field?function(e){if(!i.remoteStreams.has(e.id))return void m.a.warning("Cannot find specific remote stream.");var t=i.remoteStreams.get(e.id),n=new me.a("activeaudioinputchange",{activeAudioInputStreamId:e.data.value});t.dispatchEvent(n),i.dispatchEvent({type:"activeaudioinputchange",activeAudioInputStreamId:e.data.value});}(t):"video.layout"===t.data.field?function(e){if(!i.remoteStreams.has(e.id))return void m.a.warning("Cannot find specific remote stream.");var t=i.remoteStreams.get(e.id),n=new me.b("layoutchange",{layout:e.data.value});t.dispatchEvent(n);}(t):"."===t.data.field?function(e){if(!i.remoteStreams.has(e.id))return void m.a.warning("Cannot find specific remote stream.");var t=i.remoteStreams.get(e.id);t.settings=he.a(e.media),t.capabilities=he.b(e.media);var n=new h.e("updated");t.dispatchEvent(n);}(t.data.value):m.a.warning("Unknown stream event from MCU.")):"text"===e?function(e){var t=new h.c("messagereceived",{message:e.message,origin:e.from,to:e.to,mSeq:e.m_seq});i.dispatchEvent(t);}(t):"participant"===e?function(e){if("join"===e.action){e=e.data;var t=be(e),n=new ae.a(e.id,e.role,e.user,t.joinMeetWait,t.photo,t.type,t.deviceType,Boolean(t.localRecord));i.participants.set(e.id,n);var r=new _e("participantjoined",{participant:n});i.dispatchEvent(r);}else if("leave"===e.action){var o=e.data;if(!i.participants.has(o))return void m.a.warning("Received leave message from MCU for an unknown participant.");var a=i.participants.get(o);i.participants.delete(o),a.dispatchEvent(new h.e("left")),i.dispatchEvent({type:"participantLeft",participant:a});}}(t):"sipAndPstnJoin"===e&&i.dispatchEvent({type:"sipAndPstnJoin",data:t});}function f(e){if("mixed"===e.type)return new me.c(e);var t,n;e.media.audio&&(t=e.media.audio.source),e.media.video&&(n=e.media.video.source);var r=new p.b(e.id,e.info.owner,void 0,new p.e(t,n),e.info.attributes);return r.settings=he.a(e.media),r.capabilities=he.b(e.media),r;}function l(e,t){return c.send(e,t);}function v(){var t=Object.create(h.b);t.sendSignalingMessage=l;var n=new pe(e,t);return n.addEventListener("id",function(e){u.set(e.message,n);}),n;}function g(){i.participants.clear(),i.remoteStreams.clear();}c.addEventListener("data",function(e){var t=e.message.data;d(e.message.notification,t),i.dispatchEvent({type:"data",event:e});}),c.addEventListener("disconnect",function(){g(),o=ye,i.dispatchEvent(new h.e("serverdisconnected"));}),c.addEventListener("getParticipantsList",function(e){e.list.forEach(function(e){var t=be(e);Object.assign(e,{joinMeetWait:t.joinMeetWait,photo:t.photo,deviceType:t.deviceType,localRecord:Boolean(t.localRecord)});}),i.dispatchEvent({type:"getParticipantsList",list:e.list});}),c.addEventListener("room-infos",function(e){i.dispatchEvent({type:"room-infos",info:e.info});}),c.addEventListener("reconnecting",function(){i.dispatchEvent(new h.e("reconnecting"));}),c.addEventListener("relogin",function(){i.dispatchEvent(new h.e("relogin"));}),c.addEventListener("droped",function(){i.dispatchEvent(new h.e("droped"));}),Object.defineProperty(this,"info",{configurable:!1,get:function get(){return r?new ce(r.id,Array.from(i.participants,function(e){return e[1];}),Array.from(i.remoteStreams,function(e){return e[1];}),n):null;}}),this.join=function(e){return new Promise(function(t,s){var u=JSON.parse(re.decodeBase64(e)),d=!0===u.secure,l=u.host;if("string"==typeof l){if(-1===l.indexOf("http")&&(l=d?"https://"+l:"http://"+l),o===ye){o=Se;var p={token:e,userAgent:a.f(),protocol:"1.0"};c.connect(l,d,p).then(function(e){if(o=we,void 0!==(r=e.room).streams)for(var a,c=ve(r.streams);!(a=c()).done;){var s=a.value;"mixed"===s.type&&(s.viewport=s.info.label),i.remoteStreams.set(s.id,f(s));}if(e.room&&void 0!==e.room.participants)for(var u,d=ve(e.room.participants);!(u=d()).done;){var l=u.value;i.participants.set(l.id,new ae.a(l.id,l.role,l.user)),l.id===e.id&&(n=i.participants.get(l.id));}t(new ce(e.room.id,Array.from(i.participants.values()),Array.from(i.remoteStreams.values()),n));},function(e){o=ye,s(new ne(e));});}else s(new ne("connection state invalid"));}else s(new ne("Invalid host."));});},this.publish=function(e,t){return e instanceof p.a?s.has(e.mediaStream.id)?Promise.reject(new ne("Cannot publish a published stream.")):v().publish(e,t):Promise.reject(new ne("Invalid stream."));},this.subscribe=function(e,t){return e instanceof p.b?v().subscribe(e,t):Promise.reject(new ne("Invalid stream."));},this.send=function(e,t){return void 0===t&&(t="all"),l("text",{to:t,message:e});},this.sendCommand=function(e,t){return l(e,t);},this.leave=function(){return c.disconnect().then(function(){g(),o=ye;});};},xe=r,Pe=o;},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable;})),n.push.apply(n,r);}return n;}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach(function(t){r(e,t,n[t]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t));});}return e;}function a(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. ";}var c="function"==typeof Symbol&&Symbol.observable||"@@observable",s=function s(){return Math.random().toString(36).substring(7).split("").join(".");},u={INIT:"@@redux/INIT"+s(),REPLACE:"@@redux/REPLACE"+s(),PROBE_UNKNOWN_ACTION:function PROBE_UNKNOWN_ACTION(){return"@@redux/PROBE_UNKNOWN_ACTION"+s();}};function d(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);){t=Object.getPrototypeOf(t);}return Object.getPrototypeOf(e)===t;}function f(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++){t[n]=arguments[n];}return 0===t.length?function(e){return e;}:1===t.length?t[0]:t.reduce(function(e,t){return function(){return e(t.apply(void 0,arguments));};});}function l(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(i){return"function"==typeof i?i(n,r,e):t(i);};};};}var p=l();p.withExtraArgument=l;var m=p,h=n(3),v=n.n(h),g=n(35),b={share:!1,recording:!1,participant:!1,translate:!1,docshare:!1,chat:!1,participantTab:"meetingRoom"},y=function y(e,t){switch(void 0===e&&(e=b),t.type){case g.a:return v()({},e,t.playload);default:return e;}},S=n(26),w={mirror:Object(S.b)("mirror"),hideTags:!1,audioTipEnabled:!1,allMuted:!1},_={hasRequesting:!1,getRequesting:!1,controllerId:"",sharerId:"",beControled:!1,controled:!1,shareWhRatio:null,shareType:"",shareOs:""},I={showUnmuteModal:!1,showLocalRecordingModal:!1,showRecordPathError:!1,recordPathError:""},x={show:!1,placement:"",confirm:""},P=function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var i=t[r];0,"function"==typeof e[i]&&(n[i]=e[i]);}var o,c=Object.keys(n);try{!function(e){Object.keys(e).forEach(function(t){var n=e[t];if(void 0===n(void 0,{type:u.INIT}))throw new Error(a(12));if(void 0===n(void 0,{type:u.PROBE_UNKNOWN_ACTION()}))throw new Error(a(13));});}(n);}catch(e){o=e;}return function(e,t){if(void 0===e&&(e={}),o)throw o;for(var r=!1,i={},s=0;s<c.length;s++){var u=c[s],d=n[u],f=e[u],l=d(f,t);if(void 0===l){t&&t.type;throw new Error(a(14));}i[u]=l,r=r||l!==f;}return(r=r||c.length!==Object.keys(e).length)?i:e;};}({tagStatus:y,kty:function kty(e,t){switch(void 0===e&&(e={}),t.type){case"KTY":return v()({},e,t.playLoad);default:return e;}},settings:function settings(e,t){switch(void 0===e&&(e=w),t.type){case"SETTINGS":return v()({},e,t.playload);case"EnableAudioTip":return v()({},e,{audioTipEnabled:t.payload});case"AllMuted":return v()({},e,{allMuted:t.payload});default:return e;}},desktopControl:function desktopControl(e,t){switch(void 0===e&&(e=_),t.type){case"Desktop_Control":return v()({},e,t.playload);default:return e;}},chatId:function chatId(e,t){switch(void 0===e&&(e="all"),t.type){case"Chat_Id":return t.payload;default:return e;}},ui:function ui(e,t){switch(void 0===e&&(e=I),t.type){case"Show_Unmute_Modal":return v()({},e,{showUnmuteModal:t.payload});case"show_local_recording_modal":return v()({},e,{showLocalRecordingModal:t.payload});case"record_path_error":var n=t.payload;return v()({},e,{showRecordPathError:n.show,recordPathError:n.error});default:return e;}},tipShow:function tipShow(e,t){switch(void 0===e&&(e={midNetwork:!1,topNetwork:!1}),t.type){case"Network_TipShow":return v()({},e,{midNetwork:t.payload});case"Network_Top_TipShow":return v()({},e,{topNetwork:t.payload});default:return e;}},leaveModalShow:function leaveModalShow(e,t){switch(void 0===e&&(e=x),t.type){case"Leave_modal_show":return v()({},e,t.payload);default:return e;}},winFullScreen:function winFullScreen(e,t){switch(void 0===e&&(e=!1),t.type){case"Win_Full_Screen":return t.payload;default:return e;}},deviceTip:function deviceTip(e,t){switch(void 0===e&&(e=""),t.type){case"Device_err_Type":return t.payLoad;default:return e;}}}),k=(n(132),Object({RUN_ENV:"meet"}).PLATFORM_ENV),E=function e(t,n,r){var i;if("function"==typeof n&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw new Error(a(0));if("function"==typeof n&&void 0===r&&(r=n,n=void 0),void 0!==r){if("function"!=typeof r)throw new Error(a(1));return r(e)(t,n);}if("function"!=typeof t)throw new Error(a(2));var o=t,s=n,f=[],l=f,p=!1;function m(){l===f&&(l=f.slice());}function h(){if(p)throw new Error(a(3));return s;}function v(e){if("function"!=typeof e)throw new Error(a(4));if(p)throw new Error(a(5));var t=!0;return m(),l.push(e),function(){if(t){if(p)throw new Error(a(6));t=!1,m();var n=l.indexOf(e);l.splice(n,1),f=null;}};}function g(e){if(!d(e))throw new Error(a(7));if(void 0===e.type)throw new Error(a(8));if(p)throw new Error(a(9));try{p=!0,s=o(s,e);}finally{p=!1;}for(var t=f=l,n=0;n<t.length;n++){(0,t[n])();}return e;}function b(e){if("function"!=typeof e)throw new Error(a(10));o=e,g({type:u.REPLACE});}function y(){var e,t=v;return(e={subscribe:function subscribe(e){if("object"!=typeof e||null===e)throw new Error(a(11));function n(){e.next&&e.next(h());}return n(),{unsubscribe:t(n)};}})[c]=function(){return this;},e;}return g({type:u.INIT}),(i={dispatch:g,subscribe:v,getState:h,replaceReducer:b})[c]=y,i;}(P,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++){t[n]=arguments[n];}return function(e){return function(){var n=e.apply(void 0,arguments),r=function r(){throw new Error(a(15));},i={getState:n.getState,dispatch:function dispatch(){return r.apply(void 0,arguments);}},c=t.map(function(e){return e(i);});return r=f.apply(void 0,c)(n.dispatch),o(o({},n),{},{dispatch:r});};};}.apply(void 0,[m]));E.subscribe(function(){"electron"===k&&(0,n(133).syncStatus)();});t.a=E;},function(e,t,n){"use strict";n.d(t,"a",function(){return f;}),n.d(t,"b",function(){return l;});var r=n(17),i=n(11),o=n(18),a=n(23);function c(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t);}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]};};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}return(n=e[Symbol.iterator]()).next.bind(n);}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++){r[n]=e[n];}return r;}function u(e,t){return e-t;}function d(e,t){return e.width!==t.width?e.width-t.width:e.height-t.height;}function f(e){var t,n,a,c,s,u,d,f;return e.audio&&(e.audio.format&&(n=new o.a(e.audio.format.codec,e.audio.format.channelNum,e.audio.format.sampleRate)),t=new r.a(n)),e.video&&(e.video.format&&(c=new o.b(e.video.format.codec,e.video.format.profile)),e.video.parameters&&(e.video.parameters.resolution&&(s=new i.b(e.video.parameters.resolution.width,e.video.parameters.resolution.height)),u=e.video.parameters.framerate,d=1e3*e.video.parameters.bitrate,f=e.video.parameters.keyFrameInterval),a=new r.d(c,s,u,d,f)),new r.c(t,a);}function l(e){var t,n;if(e.audio){var r=[];if(e.audio&&e.audio.format&&r.push(new o.a(e.audio.format.codec,e.audio.format.channelNum,e.audio.format.sampleRate)),e.audio&&e.audio.optional&&e.audio.optional.format)for(var s,f=c(e.audio.optional.format);!(s=f()).done;){var l=s.value,p=new o.a(l.codec,l.channelNum,l.sampleRate);r.push(p);}r.sort(),t=new a.a(r);}if(e.video){var m=[];if(e.video&&e.video.format&&m.push(new o.b(e.video.format.codec,e.video.format.profile)),e.video&&e.video.optional&&e.video.optional.format)for(var h,v=c(e.video.optional.format);!(h=v()).done;){var g=h.value,b=new o.b(g.codec,g.profile);m.push(b);}m.sort();var y=Array.from(e.video.optional.parameters.resolution,function(e){return new i.b(e.width,e.height);});e.video&&e.video.parameters&&e.video.parameters.resolution&&y.push(new i.b(e.video.parameters.resolution.width,e.video.parameters.resolution.height)),y.sort(d);var S=Array.from(e.video.optional.parameters.bitrate,function(e){return"string"==typeof(t=e)&&t.startsWith("x")?Number.parseFloat(t.replace(/^x/,"")):(L.Logger.warning("Invalid bitrate multiplier input."),0);var t;});S.push(1),S.sort(u);var w=JSON.parse(JSON.stringify(e.video.optional.parameters.framerate));e.video&&e.video.parameters&&e.video.parameters.framerate&&w.push(e.video.parameters.framerate),w.sort(u);var _=JSON.parse(JSON.stringify(e.video.optional.parameters.keyFrameInterval));e.video&&e.video.parameters&&e.video.parameters.keyFrameInterval&&_.push(e.video.parameters.keyFrameInterval),_.sort(u),n=new a.d(m,y,w,S,_);}return new a.c(t,n);}},function(e,t,n){var r=n(45),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o;},function(e,t,n){"use strict";n.d(t,"a",function(){return u;}),n.d(t,"d",function(){return d;}),n.d(t,"c",function(){return f;}),n.d(t,"b",function(){return l;});var r=n(12),i=n.n(r),o=n(8),a=n.n(o),c=n(10),s=(n(11),n(4)),u=function u(e){this.codec=e;},d=function d(e,t,n,r,i){this.codec=e,this.resolution=t,this.frameRate=n,this.bitrate=r,this.keyFrameInterval=i;},f=function f(e,t){this.audio=e,this.video=t;},l=function(e){function t(t,n,r,o,a,s,u){var d;return d=e.call(this)||this,Object.defineProperty(i()(d),"id",{configurable:!1,writable:!1,value:t||c.a()}),d.stop=n,d.getStats=r,d.mute=o,d.unmute=a,d.restartIce=s,d.replaceTrack=u,d;}return a()(t,e),t;}(s.b);},function(e,t,n){"use strict";n.d(t,"a",function(){return r;}),n.d(t,"b",function(){return i;});var r=function r(e,t,n){this.name=e,this.channelCount=t,this.clockRate=n;},i=function i(e,t){this.name=e,this.profile=t;};},function(e,t,n){"use strict";t.decode=t.parse=n(130),t.encode=t.stringify=n(131);},function(e,t,n){var r=n(74),i=n(79);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0;};},function(e,t,n){var r=n(57),i=n(36),o=n(58),a=n(59);function c(t){var n="function"==typeof Map?new Map():void 0;return e.exports=c=function c(e){if(null===e||!o(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t);}function t(){return a(e,arguments,r(this).constructor);}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),i(t,e);},e.exports.default=e.exports,e.exports.__esModule=!0,c(t);}e.exports=c,e.exports.default=e.exports,e.exports.__esModule=!0;},function(e,t,n){var r=n(61);e.exports=function(e,t){return r(e,t);};},function(e,t,n){"use strict";n.d(t,"a",function(){return s;}),n.d(t,"d",function(){return u;}),n.d(t,"c",function(){return d;}),n.d(t,"b",function(){return f;});var r=n(12),i=n.n(r),o=n(8),a=n.n(o),c=(n(11),n(18),n(4)),s=function s(e){this.codecs=e;},u=function u(e,t,n,r,i){this.codecs=e,this.resolutions=t,this.frameRates=n,this.bitrateMultipliers=r,this.keyFrameIntervals=i;},d=function d(e,t){this.audio=e,this.video=t;},f=function(e){function t(t,n,r,o,a,c,s){var u;if(u=e.call(this)||this,!t)throw new TypeError("ID cannot be null or undefined.");return Object.defineProperty(i()(u),"id",{configurable:!1,writable:!1,value:t}),u.stop=n,u.getStats=r,u.mute=o,u.unmute=a,u.applyOptions=c,u.restartIce=s,u;}return a()(t,e),t;}(c.b);},function(e,t,n){"use strict";n.d(t,"c",function(){return s;}),n.d(t,"a",function(){return u;}),n.d(t,"b",function(){return d;});var r=n(8),i=n.n(r),o=n(9),a=n(15),c=n(4),s=function(e){function t(t){var n;if("mixed"!==t.type)throw new TypeError("Not a mixed stream");return(n=e.call(this,t.id,void 0,void 0,new o.e("mixed","mixed"))||this).settings=a.a(t.media),n.capabilities=new a.b(t.media),n;}return i()(t,e),t;}(o.b),u=function(e){function t(t,n){var r;return(r=e.call(this,t)||this).activeAudioInputStreamId=n.activeAudioInputStreamId,r;}return i()(t,e),t;}(c.e),d=function(e){function t(t,n){var r;return(r=e.call(this,t)||this).layout=n.layout,r;}return i()(t,e),t;}(c.e);},function(e,t,n){"use strict";n.d(t,"a",function(){return c;});var r=n(12),i=n.n(r),o=n(8),a=n.n(o),c=function(e){function t(t,n,r,o,a,c,s,u){var d;return void 0===o&&(o=""),void 0===a&&(a=""),d=e.call(this)||this,Object.defineProperty(i()(d),"id",{configurable:!1,writable:!1,value:t}),Object.defineProperty(i()(d),"role",{configurable:!1,writable:!1,value:n}),Object.defineProperty(i()(d),"userId",{configurable:!1,writable:!1,value:r}),Object.defineProperty(i()(d),"joinMeetWait",{configurable:!1,writable:!1,value:o}),Object.defineProperty(i()(d),"photo",{configurable:!1,writable:!1,value:a}),Object.defineProperty(i()(d),"type",{configurable:!1,writable:!1,value:c}),Object.defineProperty(i()(d),"deviceType",{configurable:!1,writable:!1,value:s}),Object.defineProperty(i()(d),"localRecord",{configurable:!1,writable:!1,value:u}),d;}return a()(t,e),t;}(n(4).b);},function(e,t,n){"use strict";n.d(t,"a",function(){return r;}),n.d(t,"b",function(){return i;});var r=function r(e,t){return void 0===t&&(t=2),"number"!=typeof e?e:parseFloat(e.toFixed(t));},i=function i(e){var t=localStorage.getItem("pre_setting_video");return!!t&&JSON.parse(t)[e];};},function(e){e.exports=JSON.parse('{"name":"OctoMeeting","version":"1.19.9","sdkVersion":"KTY-web-release-20210223-1","description":"Octo Meeting application","main":"app.js","scripts":{"start":"cross-env PLATFORM_ENV=web RUN_ENV=local NODE_OPTIONS=--max_old_space_size=4096 luban-pack dev","build:dev":"cross-env RUN_ENV=dev PLATFORM_ENV=web NODE_OPTIONS=--max_old_space_size=4096 luban-pack build","build:go":"cross-env RUN_ENV=go PLATFORM_ENV=web NODE_OPTIONS=--max_old_space_size=4096 luban-pack build","build:meet":"cross-env RUN_ENV=meet PLATFORM_ENV=web USECDN=meet NODE_OPTIONS=--max_old_space_size=4096 luban-pack build","e:start":"node --max_old_space_size=4096 script/dev/start.js","e:buildgo":"rimraf out && cross-env RUN_ENV=go node script/build/build.js","e:buildgreen":"rimraf out && cross-env RUN_ENV=green node script/build/build.js","e:buildmeet":"rimraf out && cross-env RUN_ENV=meet node script/build/build.js"},"author":"ketianyun","license":"CC0-1.0","dependencies":{"axios":"^0.20.0","babel-plugin-transform-async-to-generator":"^6.24.1","babel-polyfill":"^6.26.0","copy-to-clipboard":"^3.3.1","electron-log":"^4.3.1","electron-squirrel-startup":"^1.0.0","electron-updater":"4.2.0","form-data":"^4.0.0","js-base64":"^2.5.1","react-cropper":"^2.1.7","robotjs":"https://git.ketianyun.com/Terry/robotjs.git"},"devDependencies":{"@babel/plugin-proposal-class-properties":"^7.13.0","@babel/plugin-transform-async-to-generator":"^7.13.0","@sentry/react":"^5.21.1","@tinymce/tinymce-react":"^3.8.1","@types/redux-logger":"^3.0.8","antd":"^4.5.4","axios":"^0.20.0","classnames":"^2.2.6","copy-to-clipboard":"^3.3.1","electron":"11.1.1","electron-builder":"^22.10.5","electron-notarize":"^1.0.0","electron-rebuild":"^1.11.0","js-yaml":"^4.1.0","lodash":"^4.17.15","luban-class":"^1.0.1","luban-pack":"^7.0.1","luban-view":"^1.8.14","md5":"^2.2.1","naming-style":"^1.0.1","prop-types":"^15.7.2","pubsub-js":"^1.9.0","qrcode.react":"^1.0.1","qs":"^6.9.4","react":"^16.13.1","react-checkbox-tree":"^1.6.0","react-contextmenu":"^2.14.0","react-dom":"^16.8.6","react-intl":"^5.9.2","react-intl-universal":"^2.4.2","react-redux":"^7.1.0","react-router":"^5.1.2","react-router-dom":"^5.0.1","redux":"^4.0.4","redux-logger":"^3.0.6","redux-thunk":"^2.3.0","rimraf":"^3.0.0"}}');},function(e,t,n){var r=n(64),i=n(65),o=n(66),a=n(67),c=n(68);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1]);}}s.prototype.clear=r,s.prototype.delete=i,s.prototype.get=o,s.prototype.has=a,s.prototype.set=c,e.exports=s;},function(e,t,n){var r=n(43);e.exports=function(e,t){for(var n=e.length;n--;){if(r(e[n][0],t))return n;}return-1;};},function(e,t,n){var r=n(38),i=n(75),o=n(76),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e);};},function(e,t,n){var r=n(20)(Object,"create");e.exports=r;},function(e,t,n){var r=n(88);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map;};},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e;};},function(e,t){var n="",r="";n="meet.ketianyun.com",r="https://log.ketianyun.com";e.exports={publicPath:n,customerService:"https://tky.ketianyun.com/im/text/4028838b5ac815e3015ac81645f90000.html",downLoadWin:"https://www.ketianyun.com/meeting/octopus/app/download/windows/meetingSetup.exe",downLoadMac:"https://www.ketianyun.com/meeting/octopus/app/download/mac/ktymeeting.dmg",downLoadAll:"https://www.ketianyun.com/meeting/octopus/app/pc.html",whiteBoardPath:"wb.ketianyun.com",cdnPath:"https://meetcdn.ketianyun.com/meet",modalErrCode:[-100,-101,-102,-107,-205,-601,-600,-604,-605,-703],analysisUrl:r};},function(e,t,n){"use strict";n.d(t,"a",function(){return r;});var r="Tag_Status";},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e;},e.exports.default=e.exports,e.exports.__esModule=!0,n(t,r);}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0;},function(e,t,n){var r=n(20)(n(16),"Map");e.exports=r;},function(e,t,n){var r=n(16).Symbol;e.exports=r;},function(e,t){var n;n=function(){return this;}();try{n=n||new Function("return this")();}catch(e){"object"==typeof window&&(n=window);}e.exports=n;},function(e,t){var n=Array.isArray;e.exports=n;},function(e,t,n){"use strict";var r=n(13);t.a=function(){return new r.b.ConferenceClient({rtcConfiguration:{iceServers:[{urls:["stun:stun1.ketianyun.com:3478"]}]}},void 0);};},function(e,t,n){var r,i,o,a,_c;r=n(128),i=n(54).utf8,o=n(129),a=n(54).bin,(_c=function c(e,t){e.constructor==String?e=t&&"binary"===t.encoding?a.stringToBytes(e):i.stringToBytes(e):o(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var n=r.bytesToWords(e),s=8*e.length,u=1732584193,d=-271733879,f=-1732584194,l=271733878,p=0;p<n.length;p++){n[p]=16711935&(n[p]<<8|n[p]>>>24)|4278255360&(n[p]<<24|n[p]>>>8);}n[s>>>5]|=128<<s%32,n[14+(s+64>>>9<<4)]=s;var m=_c._ff,h=_c._gg,v=_c._hh,g=_c._ii;for(p=0;p<n.length;p+=16){var b=u,y=d,S=f,w=l;u=m(u,d,f,l,n[p+0],7,-680876936),l=m(l,u,d,f,n[p+1],12,-389564586),f=m(f,l,u,d,n[p+2],17,606105819),d=m(d,f,l,u,n[p+3],22,-1044525330),u=m(u,d,f,l,n[p+4],7,-176418897),l=m(l,u,d,f,n[p+5],12,1200080426),f=m(f,l,u,d,n[p+6],17,-1473231341),d=m(d,f,l,u,n[p+7],22,-45705983),u=m(u,d,f,l,n[p+8],7,1770035416),l=m(l,u,d,f,n[p+9],12,-1958414417),f=m(f,l,u,d,n[p+10],17,-42063),d=m(d,f,l,u,n[p+11],22,-1990404162),u=m(u,d,f,l,n[p+12],7,1804603682),l=m(l,u,d,f,n[p+13],12,-40341101),f=m(f,l,u,d,n[p+14],17,-1502002290),u=h(u,d=m(d,f,l,u,n[p+15],22,1236535329),f,l,n[p+1],5,-165796510),l=h(l,u,d,f,n[p+6],9,-1069501632),f=h(f,l,u,d,n[p+11],14,643717713),d=h(d,f,l,u,n[p+0],20,-373897302),u=h(u,d,f,l,n[p+5],5,-701558691),l=h(l,u,d,f,n[p+10],9,38016083),f=h(f,l,u,d,n[p+15],14,-660478335),d=h(d,f,l,u,n[p+4],20,-405537848),u=h(u,d,f,l,n[p+9],5,568446438),l=h(l,u,d,f,n[p+14],9,-1019803690),f=h(f,l,u,d,n[p+3],14,-187363961),d=h(d,f,l,u,n[p+8],20,1163531501),u=h(u,d,f,l,n[p+13],5,-1444681467),l=h(l,u,d,f,n[p+2],9,-51403784),f=h(f,l,u,d,n[p+7],14,1735328473),u=v(u,d=h(d,f,l,u,n[p+12],20,-1926607734),f,l,n[p+5],4,-378558),l=v(l,u,d,f,n[p+8],11,-2022574463),f=v(f,l,u,d,n[p+11],16,1839030562),d=v(d,f,l,u,n[p+14],23,-35309556),u=v(u,d,f,l,n[p+1],4,-1530992060),l=v(l,u,d,f,n[p+4],11,1272893353),f=v(f,l,u,d,n[p+7],16,-155497632),d=v(d,f,l,u,n[p+10],23,-1094730640),u=v(u,d,f,l,n[p+13],4,681279174),l=v(l,u,d,f,n[p+0],11,-358537222),f=v(f,l,u,d,n[p+3],16,-722521979),d=v(d,f,l,u,n[p+6],23,76029189),u=v(u,d,f,l,n[p+9],4,-640364487),l=v(l,u,d,f,n[p+12],11,-421815835),f=v(f,l,u,d,n[p+15],16,530742520),u=g(u,d=v(d,f,l,u,n[p+2],23,-995338651),f,l,n[p+0],6,-198630844),l=g(l,u,d,f,n[p+7],10,1126891415),f=g(f,l,u,d,n[p+14],15,-1416354905),d=g(d,f,l,u,n[p+5],21,-57434055),u=g(u,d,f,l,n[p+12],6,1700485571),l=g(l,u,d,f,n[p+3],10,-1894986606),f=g(f,l,u,d,n[p+10],15,-1051523),d=g(d,f,l,u,n[p+1],21,-2054922799),u=g(u,d,f,l,n[p+8],6,1873313359),l=g(l,u,d,f,n[p+15],10,-30611744),f=g(f,l,u,d,n[p+6],15,-1560198380),d=g(d,f,l,u,n[p+13],21,1309151649),u=g(u,d,f,l,n[p+4],6,-145523070),l=g(l,u,d,f,n[p+11],10,-1120210379),f=g(f,l,u,d,n[p+2],15,718787259),d=g(d,f,l,u,n[p+9],21,-343485551),u=u+b>>>0,d=d+y>>>0,f=f+S>>>0,l=l+w>>>0;}return r.endian([u,d,f,l]);})._ff=function(e,t,n,r,i,o,a){var c=e+(t&n|~t&r)+(i>>>0)+a;return(c<<o|c>>>32-o)+t;},_c._gg=function(e,t,n,r,i,o,a){var c=e+(t&r|n&~r)+(i>>>0)+a;return(c<<o|c>>>32-o)+t;},_c._hh=function(e,t,n,r,i,o,a){var c=e+(t^n^r)+(i>>>0)+a;return(c<<o|c>>>32-o)+t;},_c._ii=function(e,t,n,r,i,o,a){var c=e+(n^(t|~r))+(i>>>0)+a;return(c<<o|c>>>32-o)+t;},_c._blocksize=16,_c._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var n=r.wordsToBytes(_c(e,t));return t&&t.asBytes?n:t&&t.asString?a.bytesToString(n):r.bytesToHex(n);};},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t;};},function(e,t,n){var r=n(30),i=n(46);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t;};},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n;}).call(this,n(39));},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t);};},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e);}catch(e){}try{return e+"";}catch(e){}}return"";};},function(e,t,n){var r=n(80),i=n(87),o=n(89),a=n(90),c=n(91);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1]);}}s.prototype.clear=r,s.prototype.delete=i,s.prototype.get=o,s.prototype.has=a,s.prototype.set=c,e.exports=s;},function(e,t,n){var r=n(92),i=n(95),o=n(96);e.exports=function(e,t,n,a,c,s){var u=1&n,d=e.length,f=t.length;if(d!=f&&!(u&&f>d))return!1;var l=s.get(e),p=s.get(t);if(l&&p)return l==t&&p==e;var m=-1,h=!0,v=2&n?new r():void 0;for(s.set(e,t),s.set(t,e);++m<d;){var g=e[m],b=t[m];if(a)var y=u?a(b,g,m,t,e,s):a(g,b,m,e,t,s);if(void 0!==y){if(y)continue;h=!1;break;}if(v){if(!i(t,function(e,t){if(!o(v,t)&&(g===e||c(g,e,n,a,s)))return v.push(t);})){h=!1;break;}}else if(g!==b&&!c(g,b,n,a,s)){h=!1;break;}}return s.delete(e),s.delete(t),h;};},function(e,t,n){(function(e){var r=n(16),i=n(113),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,c=a&&a.exports===o?r.Buffer:void 0,s=(c?c.isBuffer:void 0)||i;e.exports=s;}).call(this,n(51)(e));},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function get(){return e.l;}}),Object.defineProperty(e,"id",{enumerable:!0,get:function get(){return e.i;}}),e.webpackPolyfill=1),e;};},function(e,t,n){var r=n(115),i=n(116),o=n(117),a=o&&o.isTypedArray,c=a?i(a):r;e.exports=c;},function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991;};},function(e,t){var n={utf8:{stringToBytes:function stringToBytes(e){return n.bin.stringToBytes(unescape(encodeURIComponent(e)));},bytesToString:function bytesToString(e){return decodeURIComponent(escape(n.bin.bytesToString(e)));}},bin:{stringToBytes:function stringToBytes(e){for(var t=[],n=0;n<e.length;n++){t.push(255&e.charCodeAt(n));}return t;},bytesToString:function bytesToString(e){for(var t=[],n=0;n<e.length;n++){t.push(String.fromCharCode(e[n]));}return t.join("");}}};e.exports=n;},function(e,t,n){e.exports=n(134);},function(e,t,n){var r=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t];}try{c({},"");}catch(e){c=function c(e,t,n){return e[t]=n;};}function s(e,t,n,r){var i=t&&t.prototype instanceof f?t:f,o=Object.create(i.prototype),a=new I(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return P();}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var c=S(a,n);if(c){if(c===d)continue;return c;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=u(e,t,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===d)continue;return{value:s.arg,done:n.done};}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg);}};}(e,n,a),o;}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)};}catch(e){return{type:"throw",arg:e};}}e.wrap=s;var d={};function f(){}function l(){}function p(){}var m={};m[i]=function(){return this;};var h=Object.getPrototypeOf,v=h&&h(h(x([])));v&&v!==t&&n.call(v,i)&&(m=v);var g=p.prototype=f.prototype=Object.create(m);function b(e){["next","throw","return"].forEach(function(t){c(e,t,function(e){return this._invoke(t,e);});});}function y(e,t){var r;this._invoke=function(i,o){function a(){return new t(function(r,a){!function r(i,o,a,c){var s=u(e[i],e,o);if("throw"!==s.type){var d=s.arg,f=d.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then(function(e){r("next",e,a,c);},function(e){r("throw",e,a,c);}):t.resolve(f).then(function(e){d.value=e,a(d);},function(e){return r("throw",e,a,c);});}c(s.arg);}(i,o,r,a);});}return r=r?r.then(a,a):a();};}function S(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method))return d;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method");}return d;}var r=u(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,d;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d);}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t);}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t;}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0);}function x(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;){if(n.call(e,r))return t.value=e[r],t.done=!1,t;}return t.value=void 0,t.done=!0,t;};return o.next=o;}}return{next:P};}function P(){return{value:void 0,done:!0};}return l.prototype=g.constructor=p,p.constructor=l,l.displayName=c(p,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===l||"GeneratorFunction"===(t.displayName||t.name));},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,c(e,a,"GeneratorFunction")),e.prototype=Object.create(g),e;},e.awrap=function(e){return{__await:e};},b(y.prototype),y.prototype[o]=function(){return this;},e.AsyncIterator=y,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new y(s(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then(function(e){return e.done?e.value:a.next();});},b(g),c(g,a,"Generator"),g[i]=function(){return this;},g.toString=function(){return"[object Generator]";},e.keys=function(e){var t=[];for(var n in e){t.push(n);}return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n;}return n.done=!0,n;};},e.values=x,I.prototype={constructor:I,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!e)for(var t in this){"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0);}},stop:function stop(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval;},dispatchException:function dispatchException(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r;}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),s=n.call(o,"finallyLoc");if(c&&s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc);}else if(c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc);}}}},abrupt:function abrupt(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break;}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(a);},complete:function complete(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d;},finish:function finish(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),d;}},catch:function _catch(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;_(n);}return i;}}throw new Error("illegal catch attempt");},delegateYield:function delegateYield(e,t,n){return this.delegate={iterator:x(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d;}},e;}(e.exports);try{regeneratorRuntime=r;}catch(e){Function("r","regeneratorRuntime = r")(r);}},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e);},e.exports.default=e.exports,e.exports.__esModule=!0,n(t);}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0;},function(e,t){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]");},e.exports.default=e.exports,e.exports.__esModule=!0;},function(e,t,n){var r=n(36),i=n(60);function o(t,n,a){return i()?(e.exports=o=Reflect.construct,e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=o=function o(e,t,n){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i))();return n&&r(o,n.prototype),o;},e.exports.default=e.exports,e.exports.__esModule=!0),o.apply(null,arguments);}e.exports=o,e.exports.default=e.exports,e.exports.__esModule=!0;},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0;}catch(e){return!1;}},e.exports.default=e.exports,e.exports.__esModule=!0;},function(e,t,n){var r=n(62),i=n(33);e.exports=function e(t,n,o,a,c){return t===n||(null==t||null==n||!i(t)&&!i(n)?t!=t&&n!=n:r(t,n,o,a,e,c));};},function(e,t,n){var r=n(63),i=n(49),o=n(97),a=n(101),c=n(123),s=n(40),u=n(50),d=n(52),f="[object Object]",l=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,p,m,h){var v=s(e),g=s(t),b=v?"[object Array]":c(e),y=g?"[object Array]":c(t),S=(b="[object Arguments]"==b?f:b)==f,w=(y="[object Arguments]"==y?f:y)==f,_=b==y;if(_&&u(e)){if(!u(t))return!1;v=!0,S=!1;}if(_&&!S)return h||(h=new r()),v||d(e)?i(e,t,n,p,m,h):o(e,t,b,n,p,m,h);if(!(1&n)){var I=S&&l.call(e,"__wrapped__"),x=w&&l.call(t,"__wrapped__");if(I||x){var P=I?e.value():e,k=x?t.value():t;return h||(h=new r()),m(P,k,n,p,h);}}return!!_&&(h||(h=new r()),a(e,t,n,p,m,h));};},function(e,t,n){var r=n(28),i=n(69),o=n(70),a=n(71),c=n(72),s=n(73);function u(e){var t=this.__data__=new r(e);this.size=t.size;}u.prototype.clear=i,u.prototype.delete=o,u.prototype.get=a,u.prototype.has=c,u.prototype.set=s,e.exports=u;},function(e,t){e.exports=function(){this.__data__=[],this.size=0;};},function(e,t,n){var r=n(29),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():i.call(t,n,1),--this.size,!0);};},function(e,t,n){var r=n(29);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1];};},function(e,t,n){var r=n(29);e.exports=function(e){return r(this.__data__,e)>-1;};},function(e,t,n){var r=n(29);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this;};},function(e,t,n){var r=n(28);e.exports=function(){this.__data__=new r(),this.size=0;};},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n;};},function(e,t){e.exports=function(e){return this.__data__.get(e);};},function(e,t){e.exports=function(e){return this.__data__.has(e);};},function(e,t,n){var r=n(28),i=n(37),o=n(48);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(a);}return n.set(e,t),this.size=n.size,this;};},function(e,t,n){var r=n(44),i=n(77),o=n(46),a=n(47),c=/^\[object .+?Constructor\]$/,s=Function.prototype,u=Object.prototype,d=s.toString,f=u.hasOwnProperty,l=RegExp("^"+d.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(r(e)?l:c).test(a(e));};},function(e,t,n){var r=n(38),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,c=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,c),n=e[c];try{e[c]=void 0;var r=!0;}catch(e){}var i=a.call(e);return r&&(t?e[c]=n:delete e[c]),i;};},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e);};},function(e,t,n){var r,i=n(78),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!o&&o in e;};},function(e,t,n){var r=n(16)["__core-js_shared__"];e.exports=r;},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t];};},function(e,t,n){var r=n(81),i=n(28),o=n(37);e.exports=function(){this.size=0,this.__data__={hash:new r(),map:new(o||i)(),string:new r()};};},function(e,t,n){var r=n(82),i=n(83),o=n(84),a=n(85),c=n(86);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1]);}}s.prototype.clear=r,s.prototype.delete=i,s.prototype.get=o,s.prototype.has=a,s.prototype.set=c,e.exports=s;},function(e,t,n){var r=n(31);e.exports=function(){this.__data__=r?r(null):{},this.size=0;};},function(e,t){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t;};},function(e,t,n){var r=n(31),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n;}return i.call(t,e)?t[e]:void 0;};},function(e,t,n){var r=n(31),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e);};},function(e,t,n){var r=n(31);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this;};},function(e,t,n){var r=n(32);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t;};},function(e,t){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e;};},function(e,t,n){var r=n(32);e.exports=function(e){return r(this,e).get(e);};},function(e,t,n){var r=n(32);e.exports=function(e){return r(this,e).has(e);};},function(e,t,n){var r=n(32);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this;};},function(e,t,n){var r=n(48),i=n(93),o=n(94);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r();++t<n;){this.add(e[t]);}}a.prototype.add=a.prototype.push=i,a.prototype.has=o,e.exports=a;},function(e,t){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this;};},function(e,t){e.exports=function(e){return this.__data__.has(e);};},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;){if(t(e[n],n,e))return!0;}return!1;};},function(e,t){e.exports=function(e,t){return e.has(t);};},function(e,t,n){var r=n(38),i=n(98),o=n(43),a=n(49),c=n(99),s=n(100),u=r?r.prototype:void 0,d=u?u.valueOf:void 0;e.exports=function(e,t,n,r,u,f,l){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!f(new i(e),new i(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=c;case"[object Set]":var m=1&r;if(p||(p=s),e.size!=t.size&&!m)return!1;var h=l.get(e);if(h)return h==t;r|=2,l.set(e,t);var v=a(p(e),p(t),r,u,f,l);return l.delete(e),v;case"[object Symbol]":if(d)return d.call(e)==d.call(t);}return!1;};},function(e,t,n){var r=n(16).Uint8Array;e.exports=r;},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e];}),n;};},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e;}),n;};},function(e,t,n){var r=n(102),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,a,c){var s=1&n,u=r(e),d=u.length;if(d!=r(t).length&&!s)return!1;for(var f=d;f--;){var l=u[f];if(!(s?l in t:i.call(t,l)))return!1;}var p=c.get(e),m=c.get(t);if(p&&m)return p==t&&m==e;var h=!0;c.set(e,t),c.set(t,e);for(var v=s;++f<d;){var g=e[l=u[f]],b=t[l];if(o)var y=s?o(b,g,l,t,e,c):o(g,b,l,e,t,c);if(!(void 0===y?g===b||a(g,b,n,o,c):y)){h=!1;break;}v||(v="constructor"==l);}if(h&&!v){var S=e.constructor,w=t.constructor;S==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof S&&S instanceof S&&"function"==typeof w&&w instanceof w||(h=!1);}return c.delete(e),c.delete(t),h;};},function(e,t,n){var r=n(103),i=n(105),o=n(108);e.exports=function(e){return r(e,o,i);};},function(e,t,n){var r=n(104),i=n(40);e.exports=function(e,t,n){var o=t(e);return i(e)?o:r(o,n(e));};},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;){e[i+n]=t[n];}return e;};},function(e,t,n){var r=n(106),i=n(107),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,c=a?function(e){return null==e?[]:(e=Object(e),r(a(e),function(t){return o.call(e,t);}));}:i;e.exports=c;},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a);}return o;};},function(e,t){e.exports=function(){return[];};},function(e,t,n){var r=n(109),i=n(118),o=n(122);e.exports=function(e){return o(e)?r(e):i(e);};},function(e,t,n){var r=n(110),i=n(111),o=n(40),a=n(50),c=n(114),s=n(52),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),d=!n&&i(e),f=!n&&!d&&a(e),l=!n&&!d&&!f&&s(e),p=n||d||f||l,m=p?r(e.length,String):[],h=m.length;for(var v in e){!t&&!u.call(e,v)||p&&("length"==v||f&&("offset"==v||"parent"==v)||l&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||c(v,h))||m.push(v);}return m;};},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;){r[n]=t(n);}return r;};},function(e,t,n){var r=n(112),i=n(33),o=Object.prototype,a=o.hasOwnProperty,c=o.propertyIsEnumerable,s=r(function(){return arguments;}())?r:function(e){return i(e)&&a.call(e,"callee")&&!c.call(e,"callee");};e.exports=s;},function(e,t,n){var r=n(30),i=n(33);e.exports=function(e){return i(e)&&"[object Arguments]"==r(e);};},function(e,t){e.exports=function(){return!1;};},function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&e<t;};},function(e,t,n){var r=n(30),i=n(53),o=n(33),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&i(e.length)&&!!a[r(e)];};},function(e,t){e.exports=function(e){return function(t){return e(t);};};},function(e,t,n){(function(e){var r=n(45),i=t&&!t.nodeType&&t,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,a=o&&o.exports===i&&r.process,c=function(){try{var e=o&&o.require&&o.require("util").types;return e||a&&a.binding&&a.binding("util");}catch(e){}}();e.exports=c;}).call(this,n(51)(e));},function(e,t,n){var r=n(119),i=n(120),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e)){o.call(e,n)&&"constructor"!=n&&t.push(n);}return t;};},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n);};},function(e,t,n){var r=n(121)(Object.keys,Object);e.exports=r;},function(e,t){e.exports=function(e,t){return function(n){return e(t(n));};};},function(e,t,n){var r=n(44),i=n(53);e.exports=function(e){return null!=e&&i(e.length)&&!r(e);};},function(e,t,n){var r=n(124),i=n(37),o=n(125),a=n(126),c=n(127),s=n(30),u=n(47),d=u(r),f=u(i),l=u(o),p=u(a),m=u(c),h=s;(r&&"[object DataView]"!=h(new r(new ArrayBuffer(1)))||i&&"[object Map]"!=h(new i())||o&&"[object Promise]"!=h(o.resolve())||a&&"[object Set]"!=h(new a())||c&&"[object WeakMap]"!=h(new c()))&&(h=function h(e){var t=s(e),n="[object Object]"==t?e.constructor:void 0,r=n?u(n):"";if(r)switch(r){case d:return"[object DataView]";case f:return"[object Map]";case l:return"[object Promise]";case p:return"[object Set]";case m:return"[object WeakMap]";}return t;}),e.exports=h;},function(e,t,n){var r=n(20)(n(16),"DataView");e.exports=r;},function(e,t,n){var r=n(20)(n(16),"Promise");e.exports=r;},function(e,t,n){var r=n(20)(n(16),"Set");e.exports=r;},function(e,t,n){var r=n(20)(n(16),"WeakMap");e.exports=r;},function(e,t){var n,r;n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function rotl(e,t){return e<<t|e>>>32-t;},rotr:function rotr(e,t){return e<<32-t|e>>>t;},endian:function endian(e){if(e.constructor==Number)return 16711935&r.rotl(e,8)|4278255360&r.rotl(e,24);for(var t=0;t<e.length;t++){e[t]=r.endian(e[t]);}return e;},randomBytes:function randomBytes(e){for(var t=[];e>0;e--){t.push(Math.floor(256*Math.random()));}return t;},bytesToWords:function bytesToWords(e){for(var t=[],n=0,r=0;n<e.length;n++,r+=8){t[r>>>5]|=e[n]<<24-r%32;}return t;},wordsToBytes:function wordsToBytes(e){for(var t=[],n=0;n<32*e.length;n+=8){t.push(e[n>>>5]>>>24-n%32&255);}return t;},bytesToHex:function bytesToHex(e){for(var t=[],n=0;n<e.length;n++){t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));}return t.join("");},hexToBytes:function hexToBytes(e){for(var t=[],n=0;n<e.length;n+=2){t.push(parseInt(e.substr(n,2),16));}return t;},bytesToBase64:function bytesToBase64(e){for(var t=[],r=0;r<e.length;r+=3){for(var i=e[r]<<16|e[r+1]<<8|e[r+2],o=0;o<4;o++){8*r+6*o<=8*e.length?t.push(n.charAt(i>>>6*(3-o)&63)):t.push("=");}}return t.join("");},base64ToBytes:function base64ToBytes(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var t=[],r=0,i=0;r<e.length;i=++r%4){0!=i&&t.push((n.indexOf(e.charAt(r-1))&Math.pow(2,-2*i+8)-1)<<2*i|n.indexOf(e.charAt(r))>>>6-2*i);}return t;}},e.exports=r;},function(e,t){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e);}/*!
2
+ * Determine if an object is a Buffer
3
+ *
4
+ * @author Feross Aboukhadijeh <https://feross.org>
5
+ * @license MIT
6
6
  */e.exports=function(e){return null!=e&&(n(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0));}(e)||!!e._isBuffer);};},function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t);}e.exports=function(e,t,n,o){t=t||"&",n=n||"=";var a={};if("string"!=typeof e||0===e.length)return a;var c=/\+/g;e=e.split(t);var s=1e3;o&&"number"==typeof o.maxKeys&&(s=o.maxKeys);var u=e.length;s>0&&u>s&&(u=s);for(var d=0;d<u;++d){var f,l,p,m,h=e[d].replace(c,"%20"),v=h.indexOf(n);v>=0?(f=h.substr(0,v),l=h.substr(v+1)):(f=h,l=""),p=decodeURIComponent(f),m=decodeURIComponent(l),r(a,p)?i(a[p])?a[p].push(m):a[p]=[a[p],m]:a[p]=m;}return a;};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e);};},function(e,t,n){"use strict";var r=function r(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return"";}};e.exports=function(e,t,n,c){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?o(a(e),function(a){var c=encodeURIComponent(r(a))+n;return i(e[a])?o(e[a],function(e){return c+encodeURIComponent(r(e));}).join(t):c+encodeURIComponent(r(e[a]));}).join(t):c?encodeURIComponent(r(c))+n+encodeURIComponent(r(e)):"";};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e);};function o(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++){n.push(t(e[r],r));}return n;}var a=Object.keys||function(e){var t=[];for(var n in e){Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);}return t;};},function(e,t,n){(function(e){!function(t){"use strict";function n(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});}function r(e,t){Object.defineProperty(this,"kind",{value:e,enumerable:!0}),t&&t.length&&Object.defineProperty(this,"path",{value:t,enumerable:!0});}function i(e,t,n){i.super_.call(this,"E",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0}),Object.defineProperty(this,"rhs",{value:n,enumerable:!0});}function o(e,t){o.super_.call(this,"N",e),Object.defineProperty(this,"rhs",{value:t,enumerable:!0});}function a(e,t){a.super_.call(this,"D",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0});}function c(e,t,n){c.super_.call(this,"A",e),Object.defineProperty(this,"index",{value:t,enumerable:!0}),Object.defineProperty(this,"item",{value:n,enumerable:!0});}function s(e,t,n){var r=e.slice((n||t)+1||e.length);return e.length=t<0?e.length+t:t,e.push.apply(e,r),e;}function u(e){var t=void 0===e?"undefined":I(e);return"object"!==t?t:e===Math?"math":null===e?"null":Array.isArray(e)?"array":"[object Date]"===Object.prototype.toString.call(e)?"date":"function"==typeof e.toString&&/^\/.*\//.test(e.toString())?"regexp":"object";}function d(e,t,n,r,f,l,p){p=p||[];var m=(f=f||[]).slice(0);if(void 0!==l){if(r){if("function"==typeof r&&r(m,l))return;if("object"===(void 0===r?"undefined":I(r))){if(r.prefilter&&r.prefilter(m,l))return;if(r.normalize){var h=r.normalize(m,l,e,t);h&&(e=h[0],t=h[1]);}}}m.push(l);}"regexp"===u(e)&&"regexp"===u(t)&&(e=e.toString(),t=t.toString());var v=void 0===e?"undefined":I(e),g=void 0===t?"undefined":I(t),b="undefined"!==v||p&&p[p.length-1].lhs&&p[p.length-1].lhs.hasOwnProperty(l),y="undefined"!==g||p&&p[p.length-1].rhs&&p[p.length-1].rhs.hasOwnProperty(l);if(!b&&y)n(new o(m,t));else if(!y&&b)n(new a(m,e));else if(u(e)!==u(t))n(new i(m,e,t));else if("date"===u(e)&&e-t!=0)n(new i(m,e,t));else if("object"===v&&null!==e&&null!==t){if(p.filter(function(t){return t.lhs===e;}).length)e!==t&&n(new i(m,e,t));else{if(p.push({lhs:e,rhs:t}),Array.isArray(e)){var S;for(e.length,S=0;S<e.length;S++){S>=t.length?n(new c(m,S,new a(void 0,e[S]))):d(e[S],t[S],n,r,m,S,p);}for(;S<t.length;){n(new c(m,S,new o(void 0,t[S++])));}}else{var w=Object.keys(e),_=Object.keys(t);w.forEach(function(i,o){var a=_.indexOf(i);a>=0?(d(e[i],t[i],n,r,m,i,p),_=s(_,a)):d(e[i],void 0,n,r,m,i,p);}),_.forEach(function(e){d(void 0,t[e],n,r,m,e,p);});}p.length=p.length-1;}}else e!==t&&("number"===v&&isNaN(e)&&isNaN(t)||n(new i(m,e,t)));}function f(e,t,n,r){return r=r||[],d(e,t,function(e){e&&r.push(e);},n),r.length?r:void 0;}function l(e,t,n){if(e&&t&&n&&n.kind){for(var r=e,i=-1,o=n.path?n.path.length-1:0;++i<o;){void 0===r[n.path[i]]&&(r[n.path[i]]="number"==typeof n.path[i]?[]:{}),r=r[n.path[i]];}switch(n.kind){case"A":!function e(t,n,r){if(r.path&&r.path.length){var i,o=t[n],a=r.path.length-1;for(i=0;i<a;i++){o=o[r.path[i]];}switch(r.kind){case"A":e(o[r.path[i]],r.index,r.item);break;case"D":delete o[r.path[i]];break;case"E":case"N":o[r.path[i]]=r.rhs;}}else switch(r.kind){case"A":e(t[n],r.index,r.item);break;case"D":t=s(t,n);break;case"E":case"N":t[n]=r.rhs;}return t;}(n.path?r[n.path[i]]:r,n.index,n.item);break;case"D":delete r[n.path[i]];break;case"E":case"N":r[n.path[i]]=n.rhs;}}}function p(e){return"color: "+k[e].color+"; font-weight: bold";}function m(e,t,n,r){var i=f(e,t);try{r?n.groupCollapsed("diff"):n.group("diff");}catch(e){n.log("diff");}i?i.forEach(function(e){var t=e.kind,r=function(e){var t=e.kind,n=e.path,r=e.lhs,i=e.rhs,o=e.index,a=e.item;switch(t){case"E":return[n.join("."),r,"→",i];case"N":return[n.join("."),i];case"D":return[n.join(".")];case"A":return[n.join(".")+"["+o+"]",a];default:return[];}}(e);n.log.apply(n,["%c "+k[t].text,p(t)].concat(x(r)));}):n.log("—— no diff ——");try{n.groupEnd();}catch(e){n.log("—— diff end —— ");}}function h(e,t,n,r){switch(void 0===e?"undefined":I(e)){case"object":return"function"==typeof e[r]?e[r].apply(e,x(n)):e[r];case"function":return e(t);default:return e;}}function v(e,t){var n=t.logger,r=t.actionTransformer,i=t.titleFormatter,o=void 0===i?function(e){var t=e.timestamp,n=e.duration;return function(e,r,i){var o=["action"];return o.push("%c"+String(e.type)),t&&o.push("%c@ "+r),n&&o.push("%c(in "+i.toFixed(2)+" ms)"),o.join(" ");};}(t):i,a=t.collapsed,c=t.colors,s=t.level,u=t.diff,d=void 0===t.titleFormatter;e.forEach(function(i,f){var l=i.started,p=i.startedTime,v=i.action,g=i.prevState,b=i.error,y=i.took,S=i.nextState,_=e[f+1];_&&(S=_.prevState,y=_.started-l);var I=r(v),x="function"==typeof a?a(function(){return S;},v,i):a,P=w(p),k=c.title?"color: "+c.title(I)+";":"",E=["color: gray; font-weight: lighter;"];E.push(k),t.timestamp&&E.push("color: gray; font-weight: lighter;"),t.duration&&E.push("color: gray; font-weight: lighter;");var A=o(I,P,y);try{x?c.title&&d?n.groupCollapsed.apply(n,["%c "+A].concat(E)):n.groupCollapsed(A):c.title&&d?n.group.apply(n,["%c "+A].concat(E)):n.group(A);}catch(e){n.log(A);}var j=h(s,I,[g],"prevState"),T=h(s,I,[I],"action"),C=h(s,I,[b,g],"error"),O=h(s,I,[S],"nextState");if(j)if(c.prevState){var R="color: "+c.prevState(g)+"; font-weight: bold";n[j]("%c prev state",R,g);}else n[j]("prev state",g);if(T)if(c.action){var L="color: "+c.action(I)+"; font-weight: bold";n[T]("%c action ",L,I);}else n[T]("action ",I);if(b&&C)if(c.error){var M="color: "+c.error(b,g)+"; font-weight: bold;";n[C]("%c error ",M,b);}else n[C]("error ",b);if(O)if(c.nextState){var N="color: "+c.nextState(S)+"; font-weight: bold";n[O]("%c next state",N,S);}else n[O]("next state",S);u&&m(g,S,n,x);try{n.groupEnd();}catch(e){n.log("—— log end ——");}});}function g(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign({},E,e),n=t.logger,r=t.stateTransformer,i=t.errorTransformer,o=t.predicate,a=t.logErrors,c=t.diffPredicate;if(void 0===n)return function(){return function(e){return function(t){return e(t);};};};if(e.getState&&e.dispatch)return console.error("[redux-logger] redux-logger not installed. Make sure to pass logger instance as middleware:\n// Logger with default options\nimport { logger } from 'redux-logger'\nconst store = createStore(\n reducer,\n applyMiddleware(logger)\n)\n// Or you can create your own logger with custom options http://bit.ly/redux-logger-options\nimport createLogger from 'redux-logger'\nconst logger = createLogger({\n // ...options\n});\nconst store = createStore(\n reducer,\n applyMiddleware(logger)\n)\n"),function(){return function(e){return function(t){return e(t);};};};var s=[];return function(e){var n=e.getState;return function(e){return function(u){if("function"==typeof o&&!o(n,u))return e(u);var d={};s.push(d),d.started=_.now(),d.startedTime=new Date(),d.prevState=r(n()),d.action=u;var f=void 0;if(a)try{f=e(u);}catch(e){d.error=i(e);}else f=e(u);d.took=_.now()-d.started,d.nextState=r(n());var l=t.diff&&"function"==typeof c?c(n,u):t.diff;if(v(s,Object.assign({},t,{diff:l})),s.length=0,d.error)throw d.error;return f;};};};}var b,y,S=function S(e,t){return function(e,t){return new Array(t+1).join(e);}("0",t-e.toString().length)+e;},w=function w(e){return S(e.getHours(),2)+":"+S(e.getMinutes(),2)+":"+S(e.getSeconds(),2)+"."+S(e.getMilliseconds(),3);},_="undefined"!=typeof performance&&null!==performance&&"function"==typeof performance.now?performance:Date,I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e;}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e;},x=function x(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++){n[t]=e[t];}return n;}return Array.from(e);},P=[];b="object"===(void 0===e?"undefined":I(e))&&e?e:"undefined"!=typeof window?window:{},(y=b.DeepDiff)&&P.push(function(){void 0!==y&&b.DeepDiff===f&&(b.DeepDiff=y,y=void 0);}),n(i,r),n(o,r),n(a,r),n(c,r),Object.defineProperties(f,{diff:{value:f,enumerable:!0},observableDiff:{value:d,enumerable:!0},applyDiff:{value:function value(e,t,n){e&&t&&d(e,t,function(r){n&&!n(e,t,r)||l(e,t,r);});},enumerable:!0},applyChange:{value:l,enumerable:!0},revertChange:{value:function value(e,t,n){if(e&&t&&n&&n.kind){var r,i,o=e;for(i=n.path.length-1,r=0;r<i;r++){void 0===o[n.path[r]]&&(o[n.path[r]]={}),o=o[n.path[r]];}switch(n.kind){case"A":!function e(t,n,r){if(r.path&&r.path.length){var i,o=t[n],a=r.path.length-1;for(i=0;i<a;i++){o=o[r.path[i]];}switch(r.kind){case"A":e(o[r.path[i]],r.index,r.item);break;case"D":case"E":o[r.path[i]]=r.lhs;break;case"N":delete o[r.path[i]];}}else switch(r.kind){case"A":e(t[n],r.index,r.item);break;case"D":case"E":t[n]=r.lhs;break;case"N":t=s(t,n);}return t;}(o[n.path[r]],n.index,n.item);break;case"D":case"E":o[n.path[r]]=n.lhs;break;case"N":delete o[n.path[r]];}}},enumerable:!0},isConflict:{value:function value(){return void 0!==y;},enumerable:!0},noConflict:{value:function value(){return P&&(P.forEach(function(e){e();}),P=null),f;},enumerable:!0}});var k={E:{color:"#2196F3",text:"CHANGED:"},N:{color:"#4CAF50",text:"ADDED:"},D:{color:"#F44336",text:"DELETED:"},A:{color:"#2196F3",text:"ARRAY:"}},E={level:"log",logger:console,logErrors:!0,collapsed:void 0,predicate:void 0,duration:!1,timestamp:!0,stateTransformer:function stateTransformer(e){return e;},actionTransformer:function actionTransformer(e){return e;},errorTransformer:function errorTransformer(e){return e;},colors:{title:function title(){return"inherit";},prevState:function prevState(){return"#9E9E9E";},action:function action(){return"#03A9F4";},nextState:function nextState(){return"#4CAF50";},error:function error(){return"#F20404";}},diff:!1,diffPredicate:void 0,transformer:void 0},A=function A(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.dispatch,n=e.getState;return"function"==typeof t||"function"==typeof n?g()({dispatch:t,getState:n}):void console.error("\n[redux-logger v3] BREAKING CHANGE\n[redux-logger v3] Since 3.0.0 redux-logger exports by default logger with default settings.\n[redux-logger v3] Change\n[redux-logger v3] import createLogger from 'redux-logger'\n[redux-logger v3] to\n[redux-logger v3] import { createLogger } from 'redux-logger'\n");};t.defaults=E,t.createLogger=g,t.logger=A,t.default=A,Object.defineProperty(t,"__esModule",{value:!0});}(t);}).call(this,n(39));},function(e,t,n){"use strict";n.r(t),n.d(t,"syncStatus",function(){return o;});var r=n(14),i=window.nodeRequire("electron").ipcRenderer,o=function o(){var e=r.a.getState(),t=e.kty,n=e.settings,o=e.desktopControl,a={tagStatus:e.tagStatus,kty:{allParticipants:t.allParticipants,self:t.self,joinInfo:t.joinInfo,focusParticipantId:t.focusParticipantId,lockParticipantId:t.lockParticipantId,agent:t.agent,waitingList:t.waitingList,accountInfo:t.accountInfo,allAddStreams:t.allAddStreams.map(function(e){return{id:e.id,source:e.source,origin:e.origin};}),local:{audioStatus:t.local.audioStatus,videoStatus:t.local.videoStatus},record:{share:t.record.share,mix:t.record.mix},whiteBoard:t.whiteBoard},desktopControl:o,settings:{audioTipEnabled:n.audioTipEnabled,allMuted:n.allMuted}};i.send("syncStatus",a);};},function(e,t,n){"use strict";n.r(t);var r=n(0),i=n.n(r),o=n(2),a=n.n(o),c=n(3),s=n.n(c),u=n(8),d=n.n(u),f={video:void 0,frameRate:void 0,share:void 0,priorityShare:void 0,frameRateShare:void 0,frameRatePriorityShare:void 0,sharePriorityMinBitrate:void 0,sharePriorityMaxBitrate:void 0,maxBitrate:void 0,minBitrate:void 0,shareMinBitrate:void 0,shareMaxBitrate:void 0,params:{key:"",user:"",from:"kty",token:"",invitecb:"",leavecb:"",audio:"active",video:"active",appId:"",appToken:"",username:"",password:""},showCameraList:5,host:"meet.ketianyun.com",platform:"web",sipBitrateMultiplier:void 0,showActiveStreamAfterShare:!1,showCameraListStreamAfterShare:!0,showCameraListStream:!0};function l(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t);}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]};};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}return(n=e[Symbol.iterator]()).next.bind(n);}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++){r[n]=e[n];}return r;}function m(e,t){var n,r=[];return function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++){o[a]=arguments[a];}clearTimeout(n);var c=this;return new Promise(function(i){r.push(i),n=setTimeout(function(){e.apply(c,o).then(function(e){i(e);for(var t,n=l(r);!(t=n()).done;){(0,t.value)(e);}r=[];});},t);});};}var h={option:{},device:{},matchAgent:{},agent:null,joinInfo:{},accountInfo:{},self:{},allParticipants:[],waitingList:[],hasVideoParticipants:[],allAddStreams:[],mSeq:0,local:{whiteBoardStream:null,whiteBoardPublication:null,shareStream:null,sharePublication:null,audioStatus:"notConnect",videoStatus:"inactive",localStream:null,publication:null,type:""},switch:{locked:void 0},record:{share:"",mix:""},subscribeStream:{shareStream:{apply:{from:""}},activeStream:null,cameraList:[],mixedStream:null},activeAudio:"",streamOut:{},conferenceStatus:"ongoing",serverDisconnected:!1,whiteBoard:{},desktopControl:{},index:0,mode:"speaker",lockParticipantId:"",focusParticipantId:""};function v(){return h;}var g=n(6).default();function b(e){e.video&&(e.video.bitrateMultiplier=0.6);}var y=v();function S(e,t,n,r){return void 0===r&&(r=1),new Promise(function(i){g.conference.subscribe(t,n).then(function(o){var a={muteStatus:!1,subscribtion:o,stream:t,apply:s()({from:t.id},n)};Me(t)||Ce(t)||("video",(Oe(t)||Re(t))&&(a.apply={}),g.activeStreamId==t.id?y.subscribeStream.activeStream=a:y.subscribeStream.cameraList.push(a)),Me(t)&&(a.apply={},y.subscribeStream.shareStream=a,"share"),Ce(t)&&(y.subscribeStream.mixedStream=a,"audio"),o.addEventListener("ready",function(){r=1,i(o);}),function(e,t,n){e.addEventListener("error",function(n){var r=n.error.message;Ee(r,e,t)||Ae(r,t)&&e.restartIce();});}(o,e);},function(i){if(console.error("subscribeStream err",i),i&&Ae(i,e),"end"!==y.conferenceStatus&&r<4){r++;var o=setTimeout(function(){clearTimeout(o),g.hasSubscribedStreamIds=g.hasSubscribedStreamIds.filter(function(e){return e!==t.id;}),S(e,t,n,r).then(function(){return g.hasSubscribedStreamIds.push(t.id);});},3e3);}});});}var w=function(){var e=a()(i.a.mark(function e(t,n){var r,o,a,c,s,u,d;return i.a.wrap(function(e){for(;;){switch(e.prev=e.next){case 0:if("admin"!==y.accountInfo._joinType_){e.next=2;break;}return e.abrupt("return");case 2:if(t&&(Ce(t)||Ne(t))){e.next=4;break;}return e.abrupt("return",Promise.resolve());case 4:if(!g.hasSubscribedStreamIds.includes(t.id)){e.next=13;break;}if(!(r=y.allAddStreams.find(function(e){return Ne(e)&&!g.hasSubscribedStreamIds.includes(e.id)&&!Me(e)&&!Ce(e);}))){e.next=12;break;}return e.next=9,w(r,n);case 9:return e.abrupt("return",e.sent);case 12:return e.abrupt("return",Promise.resolve());case 13:return g.hasSubscribedStreamIds.push(t.id),o={},Ce(t)||Me(t)||(a=t.capabilities.video,c=a.resolutions,s=a.frameRates,u=c[0],d=s.find(function(e){return 15==e;}),o={video:{resolution:g.activeStreamId?u:void 0,frameRate:d},audio:!1},g.activeStreamId||(g.activeStreamId=t.id),Te(t)&&b(o)),Me(t)&&(o={video:!0,audio:!1}),Ce(t)&&(o={video:!1,audio:!0}),e.abrupt("return",S(n,t,o));case 19:case"end":return e.stop();}}},e);}));return function(t,n){return e.apply(this,arguments);};}(),_=w,I=n(22),x=n.n(I),P=n(6).default(),k=v();function E(e){var t=k.subscribeStream.cameraList;return 0==t.length?Promise.resolve():new Promise(function(n){var r=t.map(function(t){return new Promise(function(n){if(t.apply.from){var r=k.allAddStreams.find(function(e){return e.id==t.apply.from;});if(r){var i=r.capabilities.video.frameRates,o=r.capabilities.video.resolutions,a=r.attributes&&r.attributes.from,c=A({obj:t,resolutions:o,client:a});c.width=parseInt(c.width),c.height=parseInt(c.height);var s={from:t.apply.from,video:{resolution:c,frameRate:Be(e,i)},audio:!1},u=t.apply;!x()(u,s)||t.muteStatus?$e(t,s,e).then(n).catch(function(e){return console.error("applyOptions camera list error: ",e);}):n();}else n();}else n();});});Promise.all(r).then(function(){n();});});}var A=function A(e){var t=e.obj,n=e.resolutions,r=e.client,i=n[0];if("speaker"===k.mode)return"ios"===r||"android"===r?n.find(function(e){return e.height>=320;})||i:n.find(function(e){return e.height>=180;})||i;if("grid"===k.mode){var o=P.gridCameraListResolutionHeight;if("ios"===r||"android"===r)return{width:1,height:1};var a=function a(e){var t=n.find(function(t){return t.height>=e;});return t&&c&&t.height>c.height?c:t||i;},c=t.qos&&t.qos._resolution;return a(o>=400?540:360);}},j=v();function T(e,t){var n=j.subscribeStream.activeStream;return e&&n?new Promise(function(r){function i(i){var o,a=e.capabilities.video.frameRates,c=Be(t,a);i.max&&(o={frameRate:c,resolution:n.qos&&n.qos._resolution||i.max}),i.min&&(o={frameRate:c,resolution:i.min}),Te(e)&&(o.bitrateMultiplier=j.option.sipBitrateMultiplier),o.resolution.width=parseInt(o.resolution.width),o.resolution.height=parseInt(o.resolution.height);var s={from:e.id,video:o,audio:!1},u=n.apply;!x()(s,u)||n.muteStatus?$e(n,s,t).then(r).catch(function(e){return console.error("applyOptions active error: ",e);}):r();}e.capabilities.video||r();var o=e.capabilities.video.resolutions,a=o[o.length-1],c=o[0],s=j.subscribeStream.shareStream;s&&s.apply.from?(c&&c.height<200&&(c=o[1]),c&&i({min:c})):a&&i({max:a});}):Promise.resolve();}var C=v(),O=function O(e){return new Promise(function(t){var n=C.allAddStreams.find(function(e){return Re(e);}),r=C.self.myId,i=C.subscribeStream.shareStream,o=i.apply.from,a=i.subscribtion;if(!n||n&&n.origin==r)return o&&(C.subscribeStream.shareStream.apply.from=""),t();n.capabilities.video.frameRates;if(a){var c={from:n.id,video:!0,audio:!1},s=i.apply;x()(c,s)&&!i.muteStatus||(C.mode="speaker",$e(i,c,e).then(t).catch(function(e){return console.error("applyOptions share error: ",e);}));}});};var R=0,L=1;function M(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return N(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return N(e,t);}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]};};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}return(n=e[Symbol.iterator]()).next.bind(n);}function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++){r[n]=e[n];}return r;}var B=n(6).default(),D=v();function U(e){var t=null,n=D.self.myId;if(t=D.allAddStreams.find(function(e){return B._activeAudio&&e.id==B._activeAudio&&Ne(e);})){var r=D.allParticipants.find(function(e){return e.id==t.origin;});r&&"inactive"===r.videoStatus&&(t=null);}if(D.allParticipants.length>=2&&!B._activeAudio||2==D.allParticipants.length){var i=D.allParticipants.find(function(e){return e.id!==n;});"active"==i.videoStatus&&(t=D.allAddStreams.find(function(e){return e.origin==i.id&&!Re(e);}))&&(B._activeAudio=t.id);}var o=D.lockParticipantId,a=o&&o!==n&&D.allParticipants.find(function(e){return e.id==o;});a&&(t="active"==a.videoStatus?D.allAddStreams.find(function(e){return e.id==a.streamId&&Ne(e);}):null);var c=D.focusParticipantId,s=c&&c!==n&&D.allParticipants.find(function(e){return e.id==c;});return s&&(t="active"==s.videoStatus?D.allAddStreams.find(function(e){return e.id==s.streamId&&Ne(e);}):null),c!==n&&o!==n||(t=null),De(e)&&!D.option.showActiveStreamAfterShare?null:("grid"!==D.mode||De(e)||(t=null),t);}function V(e){var t=[],n=D.self.myId,r=D.accountInfo.hideNonVideo?D.hasVideoParticipants:D.allParticipants;return"speaker"===D.mode&&(t=r.slice(D.index,D.index+D.option.showCameraList).filter(function(e){return e.id!==n;})),"grid"===D.mode&&(t=r.slice(D.index,D.index+D.option.showCameraList).filter(function(e){return e.id!==n;})),(De(e)&&!D.option.showCameraListStreamAfterShare||!D.option.showCameraListStream)&&(t=[]),t;}function F(e){!e.apply.from&&e.muteStatus||(e.apply={},e.subscribtion.mute("video"),e.muteStatus=!0);}function W(e,t){var n=D.subscribeStream,r=n.activeStream,i=n.cameraList,o=n.mixedStream,a=n.shareStream,c=[].concat(r).concat(i).concat(a);t||c.push(o);for(var s,u=M(c);!(s=u()).done;){var d=s.value;if(d&&d.subscribtion&&!d.muteStatus){if(d.muteStatus=!0,Ce(d.stream)){d.subscribtion.mute("audio");continue;}d.subscribtion.mute("video");}}}var $=function(e,t){var n=!0;return function(){if(n){n=!1;for(var r=arguments.length,i=new Array(r),o=0;o<r;o++){i[o]=arguments[o];}e.apply(this,i);var a=setTimeout(function(){n=!0,clearTimeout(a);},t);}};}(function(e){var t=D.subscribeStream,n=t.mixedStream,r=t.shareStream;if(!n||n&&!n.subscribtion){var i=D.allAddStreams.find(function(e){return Ce(e);});B.hasSubscribedStreamIds=B.hasSubscribedStreamIds.filter(function(e){return e!==i.id;}),_(i,e);}if(!r||r&&!r.subscribtion){var o=D.allAddStreams.find(function(e){return Me(e);});B.hasSubscribedStreamIds=B.hasSubscribedStreamIds.filter(function(e){return e!==o.id;}),_(o,e);}!function(e){var t=D.local,n=t.shareStream,r=t.sharePublication;!n&&r&&r.stop().then(function(){D.local.sharePublication=null;});}();},2e4);function H(){return(H=a()(i.a.mark(function e(t){var n,r,o,a,c,s,u,d,f,l,p,m,h,v,g,b,y,S;return i.a.wrap(function(e){for(;;){switch(e.prev=e.next){case 0:if("end"!=D.conferenceStatus){e.next=2;break;}return e.abrupt("return");case 2:if("admin"!==D.accountInfo._joinType_){e.next=4;break;}return e.abrupt("return");case 4:if(D.joinInfo.joinMeetWait!==L){e.next=7;break;}return W(0,!1),e.abrupt("return");case 7:if(!D.whiteBoard.name){e.next=10;break;}return W(0,!0),e.abrupt("return");case 10:if("speaker"===D.mode&&(D.option.showCameraList=B.showCameraList),n=D.self.myId,r=B.allPars.find(function(e){return e.id==n;})){e.next=15;break;}return e.abrupt("return");case 15:if(o=r.streamId,D.activeAudio!==o&&(B._activeAudio=D.activeAudio),a=D.subscribeStream,c=a.cameraList,s=a.activeStream,u=U(t),d=V(t),!u){e.next=30;break;}if(s){e.next=30;break;}if(!(f=c.find(function(e){return!e.apply.from;}))){e.next=28;break;}D.subscribeStream.cameraList=c.filter(function(e){return e.subscribtion.id!==f.subscribtion.id;}),D.subscribeStream.activeStream=f,e.next=30;break;case 28:return e.next=30,_(u,t);case 30:for(!u&&s&&(F(s),D.subscribeStream.activeStream=s),l=[],p=function p(){var e=h.value;e.apply.from?l.includes(e.apply.from)?(e.apply={},e.subscribtion.mute("video"),e.muteStatus=!0):(l.push(e.apply.from),d.find(function(t){return e.apply.from==t.streamId;})||F(e)):F(e);},m=M(D.subscribeStream.cameraList);!(h=m()).done;){p();}v=D.subscribeStream.cameraList,g=i.a.mark(function e(){var n,r,o;return i.a.wrap(function(e){for(;;){switch(e.prev=e.next){case 0:if("active"!==(n=y.value).videoStatus){e.next=12;break;}if(v.find(function(e){return e.apply.from===n.streamId;})){e.next=12;break;}if(!(r=v.find(function(e){return!e.apply.from;}))){e.next=9;break;}r.apply.from=n.streamId,e.next=12;break;case 9:return o=D.allAddStreams.find(function(e){return e.id==n.streamId;}),e.next=12,_(o,t);case 12:case"end":return e.stop();}}},e);}),b=M(d);case 37:if((y=b()).done){e.next=41;break;}return e.delegateYield(g(),"t0",39);case 39:e.next=37;break;case 41:return S=[],De(t)?S.push(E(t)):S.push.apply(S,[E(t),T(u,t)]),$(t),O(t),e.next=47,Promise.all(S);case 47:t.dispatchEvent({type:"activeaudioinputchange",activeAudio:D.activeAudio,subscribeStream:q()});case 48:case"end":return e.stop();}}},e);}))).apply(this,arguments);}var z=m(function(e){return H.apply(this,arguments);},300),q=function q(){var e=D.subscribeStream,t=e.activeStream,n=e.cameraList,r=e.mixedStream,i=e.shareStream;function o(e){if(!e)return e;var t=e.stream,n={mediaStream:t&&t.mediaStream,source:t&&t.source};return{apply:e.apply,stream:n};}return{activeStream:o(t),cameraList:n.map(function(e){return o(e);}),mixedStream:o(r),shareStream:o(i)};},J=n(13),G=[{code:-1,zh:"操作失败",en:"Failed"},{code:-100,zh:"会议号为空",en:"Meeting key is empty"},{code:-101,zh:"会议室已被主持人锁定",en:"Meeting room locked by moderator"},{code:-102,zh:"会议方数已满",en:"Meeting full"},{code:-200,zh:"邮箱和电话号码为空",en:"Email and phone number are empty"},{code:-201,zh:"邮箱格式不对",en:"Incorrect email format"},{code:-202,zh:"邮箱不存在 ",en:"Mail does not exist"},{code:-203,zh:"电话号码不存在",en:"Phone number does not exist"},{code:-204,zh:"密码错误",en:"Password error"},{code:-205,zh:"账号无效",en:"Invalid account number"},{code:-206,zh:"账号无效",en:"Invalid account number"},{code:-207,zh:"用户名或密码错误",en:"Wrong user name or password"},{code:-300,zh:"电话号码已存在 ",en:"Phone number already exists"},{code:-301,zh:"账号不存在",en:"Account does not exist"},{code:-302,zh:"邮箱已存在",en:"Mailbox already exists"},{code:-600,zh:"会议未开始",en:"Meeting not started"},{code:-601,zh:"会议码无效",en:"Invalid conference code"},{code:-602,zh:"该时间段内已经有会议了",en:"There are already meetings in this period"},{code:-604,zh:"创建会议 ID 为空 ",en:"Create conference ID is empty"},{code:-605,zh:"服务出错!",en:"Server error!",message:"创建会议 Token 为空"},{code:-700,zh:"App id 为空",en:"App ID is empty"},{code:-701,zh:"App token 为空",en:"App token is empty"},{code:-703,zh:"姓名为空",en:"Name is empty"},{code:-702,zh:"App id 和 app token 无效",en:"Invalid app id and app token "},{code:-704,zh:"电话和邮箱为空",en:"Phone and email are empty"},{code:-617,zh:"会议中有人共享白板!",en:"White board has already exist!"},{code:-104,zh:"此账号正在召开其它会议!",en:"This account is holding another meeting!"}];function K(e,t){if(e.status>=200&&e.status<300)return e;t.dispatchEvent({type:"error",status:e.status,message:e.statusText});}function X(e,t){var n=e&&e.code;if(n&&0!=n){var r=G.find(function(e){return e.code==n;});r&&t.dispatchEvent({type:"error",code:n,message:r.en});}}function Y(){return(Y=a()(i.a.mark(function e(t,n,r){var o,a,c,u,d,f;return i.a.wrap(function(e){for(;;){switch(e.prev=e.next){case 0:return void 0===n&&(n={}),o={cache:"no-cache",method:"GET",mode:"cors",redirect:"follow",referrer:"no-referrer"},a=s()({},o,n,{headers:s()({"content-type":"application/json"},n.headers)}),n.body&&(a.body=JSON.stringify(n.body)),e.next=6,fetch(t,a);case 6:if(K(c=e.sent,r),!(u=c.headers.get("content-type")).includes("application/json")){e.next=13;break;}return e.next=12,c.json();case 12:d=e.sent;case 13:if(!u.includes("text/html")){e.next=17;break;}return e.next=16,c.text();case 16:d=e.sent;case 17:return X(d,r),f={data:d,response:c},e.abrupt("return",f);case 20:case"end":return e.stop();}}},e);}))).apply(this,arguments);}var Z=function Z(e,t,n){return Y.apply(this,arguments);};function Q(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return ee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ee(e,t);}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]};};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}return(n=e[Symbol.iterator]()).next.bind(n);}function ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++){r[n]=e[n];}return r;}var te=v(),ne=n(7).default;function re(e){return ie.apply(this,arguments);}function ie(){return(ie=a()(i.a.mark(function e(t){return i.a.wrap(function(e){for(;;){switch(e.prev=e.next){case 0:return e.next=2,Z(ne().stopShare(te.joinInfo.confId),{method:"DELETE"},t);case 2:case"end":return e.stop();}}},e);}))).apply(this,arguments);}function oe(e){return ae.apply(this,arguments);}function ae(){return(ae=a()(i.a.mark(function e(t){var n,r,o,c,s;return i.a.wrap(function(e){for(;;){switch(e.prev=e.next){case 0:return n=te.local,r=n.sharePublication,o=n.shareStream,c=n.whiteBoardStream,s=n.whiteBoardPublication,e.next=3,new Promise(function(){var e=a()(i.a.mark(function e(n){var a,u,d,f,l,p;return i.a.wrap(function(e){for(;;){switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,re(t);case 3:e.next=7;break;case 5:e.prev=5,e.t0=e.catch(0);case 7:if(o)for(a=Q(o.mediaStream.getTracks());!(u=a()).done;){u.value.stop();}if(c)for(d=Q(c.mediaStream.getTracks());!(f=d()).done;){f.value.stop();}l=te.record.share,te.joinInfo.host&&l&&(te.record.share="",p=te.joinInfo.confId,Z(ne().deleteErecord(p,l),{method:"DELETE"},t)),te.local.shareStream=null,r?r.stop().then(function(){te.local.sharePublication=null;}):te.local.sharePublication=null,s?s.stop().then(function(){te.local.whiteBoardPublication=null;}):te.local.whiteBoardPublication=null,n();case 15:case"end":return e.stop();}}},e,null,[[0,5]]);}));return function(t){return e.apply(this,arguments);};}());case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop();}}},e);}))).apply(this,arguments);}function ce(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return se(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return se(e,t);}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]};};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}return(n=e[Symbol.iterator]()).next.bind(n);}function se(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++){r[n]=e[n];}return r;}var ue=n(6).default(),de=n(7).default,fe=Object({RUN_ENV:"meet"}).PLATFORM_ENV,le=v();function pe(e){var t="electron"==fe?"pc":"web";return"screen"==e?"screen_"+t:"app"==e?"app_"+t:e;}function me(e,t,n){return he.apply(this,arguments);}function he(){return(he=a()(i.a.mark(function e(t,n,r){var o,a,c,s,u,d;return i.a.wrap(function(e){for(;;){switch(e.prev=e.next){case 0:if(!le.local.sharePublication){e.next=2;break;}return e.abrupt("return",Promise.resolve(!1));case 2:if(!le.subscribeStream.shareStream.apply.from){e.next=6;break;}for(o=ce(n.mediaStream.getTracks());!(a=o()).done;){a.value.stop();}return e.abrupt("return",Promise.resolve(!0));case 6:return c=le.joinInfo.confId,e.next=9,Z(de().startShare(c),{method:"POST",body:{shareType:pe(r),confId:c}},t);case 9:if(-617!==(s=e.sent).data.code){e.next=13;break;}for(u=ce(n.mediaStream.getTracks());!(d=u()).done;){d.value.stop();}return e.abrupt("return",Promise.resolve(!0));case 13:if(0==s.data.code){e.next=15;break;}return e.abrupt("return",Promise.resolve(!0));case 15:return e.abrupt("return",Promise.resolve(!1));case 16:case"end":return e.stop();}}},e);}))).apply(this,arguments);}var ve=function ve(e,t,n,r,o){var c=e.mediaStream.getAudioTracks()[0];ue.conference.publish(e,{video:[{codec:{name:"H264",profile:"CB"},minBitrate:c?le.option.sharePriorityMinBitrate:le.option.shareMinBitrate,maxBitrate:c?le.option.sharePriorityMaxBitrate:le.option.shareMaxBitrate}],audio:!0}).then(function(){var o=a()(i.a.mark(function o(a){var c,s;return i.a.wrap(function(i){for(;;){switch(i.prev=i.next){case 0:for("whiteboard"==n?le.local.whiteBoardPublication=a:le.local.sharePublication=a,Pe(a,t,"share"),c=ce(e.mediaStream.getTracks());!(s=c()).done;){s.value.addEventListener("ended",function(){oe(t);});}r&&r();case 4:case"end":return i.stop();}}},o);}));return function(e){return o.apply(this,arguments);};}(),function(e){console.error(e),oe(t),o&&o(e);});},ge=n(6);function be(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return ye(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ye(e,t);}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]};};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}return(n=e[Symbol.iterator]()).next.bind(n);}function ye(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++){r[n]=e[n];}return r;}var Se=Object(ge.default)();function we(){var e;Se.allPars=[],Se._activeAudio="",Se.gridCameraListResolutionHeight="",Se.hasSubscribedStreamIds=[],Se.activeStreamId="",Se.joinType="",Se.cachedCommands=[],Se.commandLocked=!1,Se.showCameraList=null,Se.conference=null,clearTimeout(Se.seqTimer),Se.seqTimer=null;var t=v(),n=t.local,r=n.publication,i=n.sharePublication,o=t.subscribeStream,a=o.shareStream,c=o.activeStream,s=o.cameraList,u=o.mixedStream;r&&r.stop(),i&&i.stop();for(var d,f=be((e=[].concat(a).concat(c).concat(u)).concat.apply(e,s));!(d=f()).done;){var l=d.value;l&&l.subscribtion&&l.subscribtion.stop();}var p={option:{},device:{},matchAgent:{},agent:null,joinInfo:{},accountInfo:{},self:{},allParticipants:[],waitingList:[],hasVideoParticipants:[],allAddStreams:[],mSeq:0,local:{whiteBoardStream:null,whiteBoardPublication:null,shareStream:null,sharePublication:null,audioStatus:"notConnect",videoStatus:"inactive",localStream:null,publication:null,type:""},switch:{locked:void 0},record:{share:"",mix:""},subscribeStream:{shareStream:{apply:{from:""}},activeStream:null,cameraList:[],mixedStream:null},activeAudio:"",streamOut:{},conferenceStatus:"ongoing",serverDisconnected:!1,whiteBoard:{},desktopControl:{},index:0,mode:"speaker",lockParticipantId:"",focusParticipantId:""};Object.assign(v(),p);}var _e=n(6).default(),Ie=v();function xe(e,t){var n="notConnect"===Ie.local.audioStatus?"notConnect":"non_inactive";"share"!==t&&e.publishStream(n,"inactive","");}function Pe(e,t,n){e.addEventListener("error",function(r){var i=r.error.message;if(console.error("Publication error: "+i),Ae(i,t)){if(i.toLowerCase().includes("access node")&&"share"===n)return e&&e.stop(),void ve(Ie.local.shareStream,t,"video");"share"===n?e.restartIce():function(e,t,n){void 0===n&&(n="video");var r=!1;new Promise(function(i,o){t(e).catch(function(t){var n=t.err&&t.err.type;console.error(t),xe(e,n),o(t);}).finally(function(){r=!0,i();});var a=setInterval(function(){r||(o(),xe(e,n)),clearInterval(a);},2e4);});}(t,ke);}});}function ke(e){return e.clearStream().then(function(){var t=Ie.local,n=t.audioStatus,r=t.videoStatus;return e.publishStream(n,r,"");});}function Ee(e,t,n,r){if(void 0===r&&(r=!1),!window._line_status_||!window._socket_status_)return!0;if(r||"string"==typeof e&&(e.toLowerCase().includes("access node")||e.toLowerCase().includes("ice connection broken")||e.toLowerCase().includes("subscription does not exist"))){var i=Ie.subscribeStream,o=i.activeStream,a=i.cameraList,c=i.mixedStream,s=i.shareStream;if(o&&o.subscribtion&&o.subscribtion.id===t.id&&(o.subscribtion.stop(),_e.activeStreamId="",_e.hasSubscribedStreamIds=_e.hasSubscribedStreamIds.filter(function(e){return e!==o.stream.id;}),Ie.subscribeStream.activeStream=null),c&&c.subscribtion&&c.subscribtion.id===t.id){c.subscribtion.stop(),Ie.subscribeStream.mixedStream=null;var u=Ie.allAddStreams.find(function(e){return Ce(e);});_e.hasSubscribedStreamIds=_e.hasSubscribedStreamIds.filter(function(e){return e!==c.stream.id;}),_(u,n);}if(s&&s.subscribtion&&s.subscribtion.id===t.id){s.subscribtion.stop(),Ie.subscribeStream.shareStream={apply:{from:""}};var d=Ie.allAddStreams.find(function(e){return Me(e);});d&&(_e.hasSubscribedStreamIds=_e.hasSubscribedStreamIds.filter(function(e){return e!==d.id;}),d&&_(d,n));}var f=a.find(function(e){return e.subscribtion.id===t.id;});return f&&(f.subscribtion.stop(),_e.hasSubscribedStreamIds=_e.hasSubscribedStreamIds.filter(function(e){return e!==f.stream.id;}),Ie.subscribeStream.cameraList=Ie.subscribeStream.cameraList.filter(function(e){return e.subscribtion.id!=t.id;})),z(n),!0;}return!1;}var Ae=function Ae(e,t){return"string"!=typeof e||!(e.toLowerCase().includes("participant leave")||e.toLowerCase().includes("participant has not joined")&&"end"!==Ie.conferenceStatus)||(Ie.serverDisconnected=!0,Ie.conferenceStatus="end",t.clearStream(),t.dispatchEvent({type:"serverdisconnected",code:603}),_e.conference.leave(),we(),!1);},je=v(),Te=function Te(e){return e.origin&&e.origin.startsWith("SipOut");},Ce=function Ce(e){return e.source&&"mixed"==e.source.audio&&"mixed"==e.source.video&&e.id.endsWith("common");},Oe=function Oe(e){return e.source&&"mixed"==e.source.audio&&"mixed"==e.source.video&&e.id.endsWith("single");},Re=function Re(e){return e.source&&"screen-cast"===e.source.video&&(!e.attributes||"whiteboard"!==e.attributes.type);},Le=function Le(e){return e&&e.attributes&&"whiteboard"===e.attributes.type;},Me=function Me(e){return e.source&&"mixed"===e.source.audio&&"mixed"===e.source.video&&e.id.endsWith("share");},Ne=function Ne(e){return e.settings&&e.settings.video;},Be=function Be(e,t){var n=je.option.frameRate;return t.find(function(e){return e===n;})||1;},De=function De(e){var t=je.subscribeStream.shareStream;return t&&t.apply.from;};function Ue(){return null!==window.navigator.userAgent.match("Firefox");}function Ve(){return null!==window.navigator.userAgent.match("Chrome");}function Fe(){return /^((?!chrome|android).)*safari/i.test(window.navigator.userAgent);}function We(){return null!==window.navigator.userAgent.match(/Edge\/(\d+).(\d+)$/);}var $e=function e(t,n,r,i){return void 0===i&&(i=0),i++,new Promise(function(o,a){t.subscribtion.applyOptions(n).then(function(){t.apply=n,t.muteStatus&&(t.subscribtion.unmute("video"),t.muteStatus=!1,n.audio&&t.subscribtion.unmute("audio")),o();}).catch(function(o){if("target stream does not exist"===o){var c=n.from;return je.allAddStreams=je.allAddStreams.filter(function(e){return e.id!==c;}),void(t.apply.from={});}Ee(o,t.subscribtion,r),i<2?(e(t,n,r,i),console.log("retry applyStream")):a(o);});});};function He(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return ze(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ze(e,t);}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]};};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}return(n=e[Symbol.iterator]()).next.bind(n);}function ze(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++){r[n]=e[n];}return r;}var qe=!0,Je=v(),Ge=function Ge(e){return new Promise(function(e,t){navigator.mediaDevices.enumerateDevices().then(function(t){for(var n,r=[],i=He(t);!(n=i()).done;){var o=n.value,a={};for(var c in o){"getCapabilities"!==c&&"toJSON"!==c&&(a[c]=o[c]);}r.push(a);}var u,d,f,l,p=r.filter(function(e){return"videoinput"==e.kind&&e.label&&-1===e.label.toLowerCase().indexOf("avstream");})||[],m=p[0];if(Ve()){u=r.find(function(e){return"audioinput"==e.kind&&(/默认/.test(e.label)||/default/.test(e.deviceId));}),d=r.find(function(e){return"audiooutput"==e.kind&&(/默认/.test(e.label)||/default/.test(e.deviceId));});try{if(u){var h=u.label.split(" - ")[1].trim();u.label=h;}if(d){var v=d.label.split(" - ")[1].trim();d.label=v;}}catch(e){}f=r.filter(function(e){return"audioinput"==e.kind&&e.label&&!e.label.includes(u.label);})||[],l=r.filter(function(e){return"audiooutput"==e.kind&&e.label&&!e.label.includes(d.label);})||[],u&&f.push(u),d&&l.push(d);}else f=r.filter(function(e){return"audioinput"==e.kind&&e.label;})||[],l=r.filter(function(e){return"audiooutput"==e.kind&&e.label;})||[],u=f[0],d=l[0];qe?(Je.device={audioinput:f,audiooutput:l,videoinput:p,selectAudioInput:u,selectAudioOutPut:d,selectVideoInput:m},qe=!1):Je.device=s()({},Je.device,{audioinput:f,audiooutput:l,videoinput:p}),!Je.device.selectAudioInput&&f.length>0&&(Je.device.selectAudioInput=f[0]),!Je.device.selectAudioOutPut&&l.length>0&&(Je.device.selectAudioOutPut=l[0]),!Je.device.selectVideoInput&&p.length>0&&(Je.device.selectVideoInput=p[0]),e(Je.device);});});},Ke=v(),Xe=n(6).default(),Ye=v(),Ze=function Ze(e,t){return new Promise(function(n,r){e.createAudio().then(function(o){var c,u,d;Ye.local.localStream=o,c=o,u=t.audioStatus,d=t.videoStatus,"inactive"==u&&(c.mediaStream.getAudioTracks()[0].enabled=!1),c.attributes={audioStatus:u,videoStatus:d,from:"web"},Xe.conference.publish(c,{video:[{codec:{name:"H264",profile:"CB"},maxBitrate:Ye.option.maxBitrate,minBitrate:Ye.option.minBitrate}],audio:!0}).then(function(){var t=a()(i.a.mark(function t(r){return i.a.wrap(function(t){for(;;){switch(t.prev=t.next){case 0:Ye.local=s()({},Ye.local,{publication:r,type:"audio",audioStatus:u,videoStatus:d}),Pe(r,e,"audio"),n(r);case 3:case"end":return t.stop();}}},t);}));return function(e){return t.apply(this,arguments);};}(),function(t){Ae(t.message,e),r(s()({},t,{sean:"publishAudio"}));});},function(e){return r(s()({},e,{sean:"createAudio"}));});});},Qe=v(),et=v(),tt=function tt(e){return new Promise(function(e,t){var n={video:{deviceId:et.device.selectVideoInput&&et.device.selectVideoInput.deviceId,source:"camera",resolution:et.option.video,frameRate:et.option.frameRate},audio:!1};J.a.MediaStreamFactory.createMediaStream(n).then(function(t){var n=new J.a.LocalStream(t,new J.a.StreamSourceInfo(void 0,"camera"));e(n);},function(){var e=a()(i.a.mark(function e(n){var r;return i.a.wrap(function(e){for(;;){switch(e.prev=e.next){case 0:r={},"string"==typeof n.message&&-1!=n.message.indexOf("Permission denied")?r.type=1:"string"==typeof n.message&&n.message.indexOf("device not found")>-1?r.type=2:"deviceId"!==n.constraint&&"width"!==n.constraint||"OverconstrainedError"!==n.name?r.type=3:(et.option.video.height>720?et.option.video={width:1280,height:720}:et.option.video=void 0,r.again="width"),r.message=n.message,r.sean="createVideo",t(r);case 5:case"end":return e.stop();}}},e);}));return function(t){return e.apply(this,arguments);};}());});},nt=n(6).default(),rt=v(),it=function it(e,t){return new Promise(function(n,r){var o=t.audioStatus,c=t.videoStatus;e.createVideo().then(function(t){var u;rt.local.localStream=t,(u=t).attributes={audioStatus:o,videoStatus:c,from:"web"},nt.conference.publish(u,{video:[{codec:{name:"H264",profile:"CB"},maxBitrate:rt.option.maxBitrate,minBitrate:rt.option.minBitrate}],audio:!0}).then(function(){var t=a()(i.a.mark(function t(r){return i.a.wrap(function(t){for(;;){switch(t.prev=t.next){case 0:rt.local=s()({},rt.local,{publication:r,type:"video",audioStatus:o,videoStatus:c}),Pe(r,e,"video"),n(r);case 3:case"end":return t.stop();}}},t);}));return function(e){return t.apply(this,arguments);};}(),function(t){Ae(t.message,e),r(s()({},t,{sean:"publishVideo"}));});},function(e){return r(s()({},e,{sean:"createVideo"}));});});};function ot(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return at(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return at(e,t);}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]};};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}return(n=e[Symbol.iterator]()).next.bind(n);}function at(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++){r[n]=e[n];}return r;}var ct=v(),st=v(),ut=function ut(e){return new Promise(function(e,t){var n=st.device.selectVideoInput&&st.device.selectVideoInput.deviceId||void 0,r=st.device.selectAudioInput&&st.device.selectAudioInput.deviceId||void 0,o={video:{deviceId:n,source:"camera",resolution:st.option.video,frameRate:st.option.frameRate},audio:{deviceId:r,source:"mic"}};J.a.MediaStreamFactory.createMediaStream(o).then(function(t){var n=new J.a.LocalStream(t,new J.a.StreamSourceInfo("mic","camera"));e(n);},function(){var e=a()(i.a.mark(function e(n){return i.a.wrap(function(e){for(;;){switch(e.prev=e.next){case 0:"width"!==n.constraint&&"deviceId"!==n.constraint||"OverconstrainedError"!==n.name||(st.option.video.height>720?st.option.video={width:1280,height:720}:st.option.video=void 0,n.again="width"),n.sean="createAudioVideo",t(n);case 3:case"end":return e.stop();}}},e);}));return function(t){return e.apply(this,arguments);};}());});},dt=function dt(e){"string"==typeof e.message&&-1!=e.message.indexOf("Permission denied")?e.type=1:"string"==typeof e.message&&e.message.indexOf("device not found")>-1?e.type=2:"width"===e.constraint&&"OverconstrainedError"===e.name?e.type=5:"deviceId"===e.constraint&&"OverconstrainedError"===e.name?e.type=2:e.type=3;},ft=n(6).default(),lt=v(),pt=function pt(e,t){return new Promise(function(n,r){e.createAudioVideo().then(function(o){var c,u,d;lt.local.localStream=o,c=o,u=t.audioStatus,d=t.videoStatus,"inactive"==u&&(c.mediaStream.getAudioTracks()[0].enabled=!1),c.attributes={audioStatus:u,videoStatus:d,from:"web"},ft.conference.publish(c,{video:[{codec:{name:"H264",profile:"CB"},maxBitrate:lt.option.maxBitrate,minBitrate:lt.option.minBitrate}],audio:!0}).then(function(){var t=a()(i.a.mark(function t(r){return i.a.wrap(function(t){for(;;){switch(t.prev=t.next){case 0:lt.local=s()({},lt.local,{publication:r,type:"audioVideo",audioStatus:u,videoStatus:d}),Pe(r,e,"audioVideo"),n(r);case 3:case"end":return t.stop();}}},t);}));return function(e){return t.apply(this,arguments);};}(),function(e){return r(s()({},e,{sean:"publishAudioVideo"}));});},function(e){return r(s()({},e,{sean:"createAudioVideo"}));});});},mt=n(5),ht=n(42)("kty"),vt=[{id:0,name:"audio",cmd:"!@#$%open&&audio*&^%$",status:!0},{id:1,name:"audio",cmd:"!@#$%close&&audio*&^%$",status:!1},{id:2,name:"video",cmd:"!@#$%open&&video*&^%$",status:!0},{id:3,name:"video",cmd:"!@#$%close&&video*&^%$",status:!1},{id:4,name:"mute",cmd:"!@#$%close&&all&&audio*&^%$",status:!0},{id:5,name:"mute",cmd:"!@#$%open&&all&&audio*&^%$",status:!1},{id:6,name:"kick",cmd:"!@#$%kickoff*&^%$",status:!0},{id:7,name:"end",cmd:"!@#$%endmeeting*&^%$",status:!0},{id:8,name:"translate",cmd:"!@#$%starttranslate*&^%$",status:!0},{id:9,name:"translate",cmd:"!@#$%endtranslate*&^%$",status:!1},{id:10,name:"assignHost",cmd:"!@#$%assign_host*&^%$"},{id:11,name:"docShare",cmd:"!@#$%opendoc_share*&^%$",status:!0},{id:12,name:"docShare",cmd:"!@#$%closedoc_share*&^%$",status:!1},{id:13,name:"allowUnmute",cmd:"!@#$%allow_unmute*&^%$",status:!0},{id:14,name:"allowUnmute",cmd:"!@#$%not_allow_unmute*&^%$",status:!1},{id:15,name:"raiseHand",cmd:"!@#$%raiseHand*&^%$",status:!0},{id:16,name:"raiseHand",status:!1,cmd:"!@#$%lowerHand*&^%$"},{id:17,name:"allHandDown",status:!0,cmd:"!@#$%allHandDown*&^%$"},{id:18,name:"notConnectAudio",cmd:"!@#$%not_connect_audio*&^%$"},{id:19,name:"whiteBoard",cmd:"!@#$%open_white_board*&^%$",status:!0},{id:20,name:"whiteBoard",cmd:"!@#$%close_white_board*&^%$",status:!1},{id:21,name:"recordId",cmd:"!@#$%record_id*&^%$"},{id:22,name:"conferenceLocked",cmd:"!@#$%lock_conference*&^%$",status:!0},{id:23,name:"conferenceLocked",cmd:"!@#$%unLock_conference*&^%$",status:!1},{id:24,name:"remoteControl",cmd:"!@#$%requestControl*&^%$",status:!0},{id:25,name:"remoteControl",cmd:"!@#$%responseControl*&^%$",status:!1},{id:26,name:"desktopInput",cmd:"!@#$%mouseInput*&^%$",status:!0},{id:27,name:"desktopInput",cmd:"!@#$%keyInput*&^%$",status:!1},{id:28,name:"busyControl",cmd:"!@#$%busyControl*&^%$",status:!0},{id:29,cmd:"!@#$%cancelControl*&^%$",status:!0},{id:30},{id:31,name:"stopRemoteControl",cmd:"!@#$%stopRemoteControl*&^%$",status:!0},{id:32,name:"focusSomeone",cmd:"!@#$%focus_Someone*&^%$"},{id:33,name:"enterMuteAudio",cmd:"!@#$%enter_mute_audio*&^%$",status:!0},{id:34,name:"enterMuteAudio",cmd:"!@#$%enter_unmute_audio*&^%$",status:!1},{id:35,name:"agreeUnmute",cmd:"!@#$%agree_unmute*&^%$"},{id:36,name:"refuseUnmute",cmd:"!@#$%refuse_unmute*&^%$"},{id:37,name:"rename",cmd:"!@#$%rename*&^%$"},{id:38,name:"assignHostType",cmd:"!@#$%assign_host_type*&^%$"},{id:39,name:"moveToMeetingRoom",cmd:"!@#$%move_to_meeting_room*&^%$"},{id:40,name:"moveToWaitingRoom",cmd:"!@#$%move_to_waiting_room*&^%$"},{id:41,name:"removeFromWaitingRoom",cmd:"!@#$%remove_to_waiting_room*&^%$"},{id:42,name:"toggleWaitingRoom",cmd:"!@#$%open_waiting_room*&^%$",status:!0},{id:43,name:"toggleWaitingRoom",cmd:"!@#$%close_waiting_room*&^%$",status:!1},{id:44,name:"allowParticipantUpload",cmd:"!@#$%allow_participant_upload*&^%$",status:!0},{id:45,name:"allowParticipantUpload",cmd:"!@#$%not_allow_participant_upload*&^%$",status:!1},{id:46,name:"deleteMeetingFiles",cmd:"!@#$%delete_meeting_files*&^%$-1"},{id:47,name:"uploadMeetingFile",cmd:"!@#$%upload_meeting_file*&^%$1"},{id:48,name:"allowParticipantShare",cmd:"!@#$%allow_participant_share*&^%$"},{id:49,name:"disallowParticipantShare",cmd:"!@#$%disallow_participant_share*&^%$"},{id:50,name:"allowParticipantRecord",cmd:"!@#$%allow_participant_record*&^%$"},{id:51,name:"disallowParticipantRecord",cmd:"!@#$%disallow_participant_record*&^%$"},{id:52,name:"startLocalRecord",cmd:"!@#$%startLocalRecord*&^%$"},{id:53,name:"stopLocalRecord",cmd:"!@#$%stopLocalRecord*&^%$"},{id:54,name:"stopParticipantRecord",cmd:"!@#$%stopParticipantRecord*&^%$"}],gt=function gt(e){return""+ht+mt.Base64.encode(vt[0].cmd+"/"+e);},bt=function bt(e){return""+ht+mt.Base64.encode(vt[1].cmd+"/"+e);},yt=function yt(e){return""+ht+mt.Base64.encode(vt[2].cmd+"/"+e);},St=function St(e){return""+ht+mt.Base64.encode(vt[3].cmd+"/"+e);},wt=""+ht+mt.Base64.encode(vt[4].cmd),_t=""+ht+mt.Base64.encode(vt[5].cmd),It=""+ht+mt.Base64.encode(vt[7].cmd),xt=(mt.Base64.encode(vt[8].cmd),mt.Base64.encode(vt[9].cmd),mt.Base64.encode(vt[11].cmd),mt.Base64.encode(vt[12].cmd),""+ht+mt.Base64.encode(vt[13].cmd)),Pt=""+ht+mt.Base64.encode(vt[14].cmd),kt=""+ht+mt.Base64.encode(vt[17].cmd),Et=""+ht+mt.Base64.encode(vt[20].cmd),At=function At(e,t){return""+ht+mt.Base64.encode(vt[21].cmd+"/mix="+e+"&share="+t);},jt=""+ht+mt.Base64.encode(vt[22].cmd),Tt=""+ht+mt.Base64.encode(vt[23].cmd),Ct=""+ht+mt.Base64.encode(vt[28].cmd),Ot=""+ht+mt.Base64.encode(vt[29].cmd),Rt=""+ht+mt.Base64.encode(""+vt[31].cmd),Lt=""+ht+mt.Base64.encode(vt[33].cmd),Mt=""+ht+mt.Base64.encode(vt[34].cmd),Nt=function Nt(e){return""+ht+mt.Base64.encode(vt[35].cmd+"/"+e);},Bt=""+ht+mt.Base64.encode(""+vt[42].cmd),Dt=""+ht+mt.Base64.encode(""+vt[43].cmd),Ut=""+ht+mt.Base64.encode(""+vt[48].cmd),Vt=""+ht+mt.Base64.encode(""+vt[49].cmd),Ft=""+ht+mt.Base64.encode(""+vt[50].cmd),Wt=""+ht+mt.Base64.encode(""+vt[51].cmd),$t=function $t(e){return""+ht+mt.Base64.encode(vt[52].cmd+"/"+e);},Ht=function Ht(e){return""+ht+mt.Base64.encode(vt[53].cmd+"/"+e);},zt=n(7).default,qt=n(6).default(),Jt=v();function Gt(e){var t=Jt.subscribeStream.mixedStream;t&&!t.muteStatus&&(t.subscribtion.mute("audio"),t.muteStatus=!0);}function Kt(e,t){"audio"===t&&(Jt.local.audioStatus="loading"),"video"===t&&(Jt.local.videoStatus="loading"),""==t&&(Jt.local.audioStatus="loading",Jt.local.videoStatus="loading"),e.dispatchEvent({type:"publishStream"});}function Xt(e){return Yt.apply(this,arguments);}function Yt(){return(Yt=a()(i.a.mark(function e(t){var n,r;return i.a.wrap(function(e){for(;;){switch(e.prev=e.next){case 0:return e.next=2,t.createAudio();case 2:n=e.sent,r=n.mediaStream.getAudioTracks()[0],Jt.local.localStream.mediaStream.addTrack(r),Jt.local.publication.replaceTrack("audio",r);case 6:case"end":return e.stop();}}},e);}))).apply(this,arguments);}function Zt(e){return Qt.apply(this,arguments);}function Qt(){return(Qt=a()(i.a.mark(function e(t){var n,r;return i.a.wrap(function(e){for(;;){switch(e.prev=e.next){case 0:return e.next=2,t.createVideo();case 2:n=e.sent,r=n.mediaStream.getVideoTracks()[0],Jt.local.localStream.mediaStream.addTrack(r),Jt.local.publication.replaceTrack("video",r),Jt.local.publication.unmute("video");case 7:case"end":return e.stop();}}},e);}))).apply(this,arguments);}function en(){var e=Jt.local.localStream.mediaStream,t=e.getVideoTracks()[0];e.removeTrack(t),t.stop();}var tn=function(){var e=a()(i.a.mark(function e(t,n,r,o){var a,c,s,u,d,f,l;return i.a.wrap(function(e){for(;;){switch(e.prev=e.next){case 0:if(Kt(t,o),a={audioStatus:n,videoStatus:r},c=Jt.self.myId,s=Jt.joinInfo.confId,u=qt.allPars.find(function(e){return e.peerId==c;}),"notConnect"!==n&&(m=void 0,(m=Jt.subscribeStream.mixedStream)&&m.muteStatus&&(m.subscribtion.unmute("audio"),m.muteStatus=!1)),"notConnect"==n&&(Gt(),t.handsDown(c),u&&Z(zt().delParticipant(s,u.id),{method:"DELETE"},t)),"active"!=n||"inactive"!=r){e.next=20;break;}if("audio"==Jt.local.type&&(Jt.local.localStream.mediaStream.getAudioTracks()[0].enabled=!0,!u&&Jt.local.publication.unmute("audio")),"audioVideo"==Jt.local.type&&(en(),Jt.local.publication.mute("video"),Jt.local.type="audio"),""!=Jt.local.type){e.next=20;break;}if(u){e.next=20;break;}if(!Jt.local.publication){e.next=18;break;}return e.next=15,Xt(t);case 15:Jt.local.type="audio",e.next=20;break;case 18:return e.next=20,t.publishAudio(a);case 20:if("notConnect"!=n||"active"!=r){e.next=31;break;}if("audioVideo"==Jt.local.type&&(i=void 0,p=void 0,i=Jt.local.localStream.mediaStream,p=i.getAudioTracks()[0],i.removeTrack(p),p.stop(),Jt.local.publication.mute("audio","notConnect"),Jt.local.type="video"),""!=Jt.local.type){e.next=31;break;}if(!Jt.local.publication){e.next=29;break;}return e.next=26,Zt(t);case 26:Jt.local.type="video",e.next=31;break;case 29:return e.next=31,t.publishVideo(a);case 31:if("active"!=n||"active"!=r){e.next=45;break;}if("audioVideo"==Jt.local.type&&(Jt.local.localStream.mediaStream.getAudioTracks()[0].enabled=!0,!u&&Jt.local.publication.unmute("audio")),"audio"!=Jt.local.type){e.next=37;break;}return e.next=36,Zt(t);case 36:Jt.local.type="audioVideo";case 37:if("video"!=Jt.local.type){e.next=42;break;}if(u){e.next=42;break;}return e.next=41,Xt(t);case 41:Jt.local.type="audioVideo";case 42:if(""!=Jt.local.type){e.next=45;break;}return e.next=45,t.publishAudioVideo(a);case 45:if("inactive"!=n||"active"!=r){e.next=62;break;}if("audioVideo"==Jt.local.type&&(Jt.local.localStream.mediaStream.getAudioTracks()[0].enabled=!1,Jt.local.publication.mute("audio")),"audio"!=Jt.local.type){e.next=51;break;}return e.next=50,Zt(t);case 50:Jt.local.type="audioVideo";case 51:if("video"!=Jt.local.type){e.next=57;break;}if(u){e.next=57;break;}return e.next=55,Xt(t);case 55:Jt.local.type="audioVideo",Jt.local.publication.mute("audio");case 57:if(""!=Jt.local.type){e.next=62;break;}return e.next=60,t.publishAudioVideo(a);case 60:e.sent.mute("audio");case 62:if("inactive"!=n||"inactive"!=r){e.next=78;break;}if("audio"===Jt.local.type&&(Jt.local.localStream.mediaStream.getAudioTracks()[0].enabled=!1,Jt.local.publication.mute("audio")),"audioVideo"==Jt.local.type&&(en(),Jt.local.publication.mute("video"),Jt.local.type="audio"),""!=Jt.local.type){e.next=78;break;}if(u){e.next=78;break;}if(!Jt.local.publication){e.next=74;break;}return e.next=70,Xt(t);case 70:Jt.local.type="audio",Jt.local.publication.mute("audio"),e.next=78;break;case 74:return e.next=76,t.publishAudio(a);case 76:e.sent.mute("audio");case 78:if("notConnect"!=n||"inactive"!=r){e.next=83;break;}return e.next=81,t.clearLocalStream(Jt.local.localStream);case 81:(Jt.local.type="audio")&&Jt.local.publication.mute("audio","notConnect"),Jt.local.type="";case 83:if("non_inactive"!==n||"inactive"!==r){e.next=87;break;}return e.next=86,t.clearLocalStream(Jt.local.localStream);case 86:Jt.local.type="";case 87:if("non_inactive"!==n||"active"!==r){e.next=100;break;}if(!Jt.local.publication){e.next=97;break;}return e.next=91,t.createVideo();case 91:d=e.sent,Jt.local.localStream=d,f=d.mediaStream.getVideoTracks()[0],Jt.local.publication.replaceTrack("video",f),e.next=99;break;case 97:return e.next=99,t.publishVideo(a);case 99:Jt.local.type="video";case 100:if(!u){e.next=105;break;}return Jt.local.publication&&Jt.local.publication.mute("audio"),l=[{op:"replace",path:"/media/audio/status",value:n}],e.next=105,Z(zt().updateStream(s,u.streamId),{body:l,method:"PATCH"},t);case 105:case"end":return e.stop();}}var i,p,m;},e);}));return function(t,n,r,i){return e.apply(this,arguments);};}(),nn=function(){var e=a()(i.a.mark(function e(t,n,r,o){var a,c;return i.a.wrap(function(e){for(;;){switch(e.prev=e.next){case 0:if(a=Jt.self.myId,o){e.next=4;break;}return c=setTimeout(function(){z(t),clearTimeout(c);},8e3),e.abrupt("return");case 4:if("audio"!=o){e.next=14;break;}if("active"!=n){e.next=8;break;}return e.next=8,qt.conference.send(gt(a),void 0);case 8:if("inactive"!=n){e.next=11;break;}return e.next=11,qt.conference.send(bt(a),void 0);case 11:if("notConnect"!=n){e.next=14;break;}return e.next=14,qt.conference.send((i=a,""+ht+mt.Base64.encode(vt[18].cmd+"/"+i)),void 0);case 14:if("video"!=o){e.next=21;break;}if("active"!=r){e.next=18;break;}return e.next=18,qt.conference.send(yt(a),void 0);case 18:if("inactive"!==r){e.next=21;break;}return e.next=21,qt.conference.send(St(a),void 0);case 21:case"end":return e.stop();}}var i;},e);}));return function(t,n,r,i){return e.apply(this,arguments);};}(),rn=function(){var e=a()(i.a.mark(function e(t,n,r,o){var a;return i.a.wrap(function(e){for(;;){switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,tn(t,n,r,o);case 3:return Jt.local.videoStatus=r,Jt.local.audioStatus=n,t.dispatchEvent({type:"publishStream"}),e.next=8,nn(t,n,r,o);case 8:e.next=32;break;case 10:if(e.prev=10,e.t0=e.catch(0),"createAudio"===(a=e.t0&&e.t0.sean)&&(Jt.local.audioStatus="non_inactive",Jt.local.videoStatus=r),"createVideo"===a&&(Jt.local.videoStatus="inactive",Jt.local.audioStatus=n),"createAudioVideo"!==a){e.next=30;break;}if(e.prev=16,"audio"!=o){e.next=22;break;}return e.next=20,rn(t,"non_inactive",r,void 0);case 20:e.next=24;break;case 22:return e.next=24,rn(t,n,"inactive",void 0);case 24:e.next=30;break;case 26:return e.prev=26,e.t1=e.catch(16),e.next=30,rn(t,"non_inactive","inactive",void 0);case 30:throw t.dispatchEvent({type:"publishStream"}),e.t0;case 32:return e.next=34,Promise.resolve(Jt.local);case 34:return e.abrupt("return",e.sent);case 35:case"end":return e.stop();}}},e,null,[[0,10],[16,26]]);}));return function(t,n,r,i){return e.apply(this,arguments);};}(),on=rn;var an,cn=function cn(e){if("web"===e){var t={match:!0,platform:"",message:"ok"};return function(){var e=navigator.userAgent,n="Win32"==navigator.platform||"Windows"==navigator.platform,r="Mac68K"==navigator.platform||"MacPPC"==navigator.platform||"MacintuserAgenth"==navigator.platform||"MacIntel"==navigator.platform;if(n&&(t.platform="win"),r&&(t.platform="mac"),Ve())e.split("Chrome/")[1].split(".")[0]<78&&(t.match=!1,t.message="Please use Chrome version 78 up");else if(We()){e.split("Edg/")[1].split(".")[0]<80&&(t.match=!1,t.message="Please use Edge version 80 up");}else if(Fe()){e.toLowerCase().match(/version\/([\d.]+).*safari/)[1].split(".")[0]<14&&(t.match=!1,t.message="Please use Safari version 14 up");}else if(Ue()){e.split("Firefox/")[1].split(".")[0]<85&&(t.match=!1,t.message="Please use Firefox version 85 up");}else t.match=!1,t.message="Please use Chrome/Edge latest version";}(),t;}return{};},sn=n(41),un=n(27),dn=v(),fn=n(7).default,ln=function(){var e=a()(i.a.mark(function e(t,n){var r,o;return i.a.wrap(function(e){for(;;){switch(e.prev=e.next){case 0:return e.next=2,Z(fn().userInfo(),{headers:{token:t.token}},n);case 2:return r=e.sent,o=r.data.data,e.abrupt("return",Promise.resolve(o));case 5:case"end":return e.stop();}}},e);}));return function(t,n){return e.apply(this,arguments);};}(),pn=function(){var e=a()(i.a.mark(function e(t,n){var r;return i.a.wrap(function(e){for(;;){switch(e.prev=e.next){case 0:if(!t.token){e.next=7;break;}return e.next=3,ln(t,n);case 3:return r=e.sent,e.abrupt("return",Promise.resolve(r));case 7:return e.abrupt("return",Promise.resolve({}));case 8:case"end":return e.stop();}}},e);}));return function(t,n){return e.apply(this,arguments);};}(),mn=function(){var e=a()(i.a.mark(function e(t,n){var r,o,a,c,s;return i.a.wrap(function(e){for(;;){switch(e.prev=e.next){case 0:if(!t.token){e.next=7;break;}return e.next=3,ln(t,n);case 3:return r=e.sent,e.abrupt("return",Promise.resolve(r));case 7:if(!t.appId){e.next=25;break;}o={appId:t.appId,appToken:t.appToken,username:t.username,password:t.password},e.t0=i.a.keys(o);case 10:if((e.t1=e.t0()).done){e.next=16;break;}if(a=e.t1.value,t[a]){e.next=14;break;}throw a+" not found!";case 14:e.next=10;break;case 16:return e.next=18,Z(fn().getSdkInfo(),{method:"POST",headers:{"content-type":"application/json"},body:o},n);case 18:return c=e.sent,s=c.data.data,dn.option.params.token=s.token,window.parent.postMessage({type:"accountInfo",key:s.meetingKey,name:s.name},"*"),e.abrupt("return",Promise.resolve(s));case 25:return e.abrupt("return",Promise.resolve({}));case 26:case"end":return e.stop();}}},e);}));return function(t,n){return e.apply(this,arguments);};}(),hn=function(){var e=a()(i.a.mark(function e(t){var n,r;return i.a.wrap(function(e){for(;;){switch(e.prev=e.next){case 0:if((n=dn.option.params).from){e.next=3;break;}throw"params from loss!";case 3:if(r={},"kty"!=n.from&&"thirdparty"!=n.from){e.next=8;break;}return e.next=7,pn(n,t);case 7:r=e.sent;case 8:if("sdk"!=n.from){e.next=12;break;}return e.next=11,mn(n,t);case 11:r=e.sent;case 12:return e.abrupt("return",Promise.resolve(r));case 13:case"end":return e.stop();}}},e);}));return function(t){return e.apply(this,arguments);};}();function vn(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return gn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gn(e,t);}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]};};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}return(n=e[Symbol.iterator]()).next.bind(n);}function gn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++){r[n]=e[n];}return r;}!function(e){e.SIP="sip",e.VOIP="voip",e.PSTN="pstn";}(an||(an={}));var bn=v(),yn=(n(7).default,n(6).default()),Sn=function Sn(e){for(var t,n=yn.allPars,r=bn.self.myId,i=null,o=null,a=[],c=[],s=[],u=[],d=vn(n);!(t=d()).done;){var f=t.value;f.handUp=Boolean(f.handUp),f.peerId?a.push(f):f.joinMeetWait?(f.handUp&&(f.handUp=!1),f.localRecord&&(f.localRecord=!1),f.id===r&&(i=f),u.push(f)):c.push(f);}for(var l=function l(){var e=m[p],t=a.find(function(t){return t.peerId==e.id;});t?(e.callMe=t,a=a.filter(function(e){return e.id!==t.id;})):delete e.callMe,e.host?o=e:e.id==r?i=e:s.push(e),e.host&&(e.handUp=!1);},p=0,m=c;p<m.length;p++){l();}return s.push.apply(s,a),i&&s.unshift(i),o&&s.unshift(o),bn.allParticipants=s,bn.hasVideoParticipants=function(e){var t=bn.lockParticipantId,n=bn.focusParticipantId,r=(bn.allParticipants,bn.self.myId,bn.accountInfo.hideNonVideo,bn.allParticipants.filter(function(e){return"active"===e.videoStatus;}));if("grid"==bn.mode){if(0===r.length){var i=yn._activeAudio&&bn.allParticipants.find(function(e){return e.streamId==yn._activeAudio;}),o=bn.allParticipants.find(function(e){return e.host;});r=n?[bn.allParticipants.find(function(e){return e.id==n;})]:t?[bn.allParticipants.find(function(e){return e.id==t;})]:i?[i]:o?[o]:[bn.allParticipants[0]];}return r;}return r;}(),bn.waitingList=u,s;};var wn=n(6).default(),_n=v(),In=function In(e,t,n,r){var i,o=_n.allParticipants;if(!n||(i=o.find(function(e){return e.id==n;}))){if("audio"==t&&(i&&i.callMe?(i.callMe.audioStatus=r?"active":"inactive","active"===i.audioStatus&&(i.audioStatus="inactive")):(i.audioStatus=r?"active":"inactive",r&&(i.handUp=!1))),"video"==t&&(i.videoStatus=r?"active":"inactive"),"assignHost"==t){var a=o.find(function(e){return e.host;});a&&(a.host=!1),i&&(i.host=!0,i.handUp=!1);}"raiseHand"==t&&(i.handUp=r),"allHandDown"==t&&o.forEach(function(e){return e.handUp=!1;}),"mute"==t&&wn.allPars.forEach(function(e){if(r)e.host||"notConnect"!==e.audioStatus&&(e.audioStatus="inactive");else{if("voip"!==e.joinType)if(e.peerId){var t=wn.allPars.find(function(t){return t.id==e.peerId;});t&&!t.host&&(e.audioStatus="active");}else e.audioStatus="active";e.handUp=!1;}}),"notConnectAudio"==t&&(i.audioStatus="notConnect",i.callMe&&delete i.callMe),Sn();}else Sn();},xn=n(7).default,Pn=n(6).default(),kn=v(),En=function En(e,t){var n=kn.whiteBoard,r=e.userId.split(",")[0];n.name&&r===n.name&&(kn.whiteBoard={});};function An(e,t){return jn.apply(this,arguments);}function jn(){return(jn=a()(i.a.mark(function e(t,n){var r,o,a,c,u;return i.a.wrap(function(e){for(;;){switch(e.prev=e.next){case 0:if(r=kn.joinInfo.confId,o=Pn.allPars.find(function(e){return e.host;}),"end"!=kn.conferenceStatus){e.next=4;break;}return e.abrupt("return");case 4:if(!o||o.id!=t.id){e.next=9;break;}return e.next=7,Z(xn().assignHost(),{method:"POST",body:{confId:r,participantId:"",oldHostId:o.participantId}},n);case 7:0==(a=e.sent).data.code&&(c=a.data.data,(u=Pn.allPars.find(function(e){return e.participantId==c.hostId;}))&&(u.host=!0),kn.self.parId==c.hostId&&(kn.joinInfo=s()({},kn.joinInfo,{host:!0,hostId:c.hostId}),kn.record={mix:c.mixVideoRecordingId||"",share:c.shareRecordingId||""},Pn.conference.send(At(c.mixVideoRecordingId||"",c.shareRecordingId||""),void 0)),In(0,"assignHost",u.id,null),n.dispatchEvent({type:"assignHost",hostId:u.id,name:"hostLeave"}));case 9:case"end":return e.stop();}}},e);}))).apply(this,arguments);}function Tn(e,t){var n=kn.focusParticipantId,r=kn.lockParticipantId;n===e.id&&t.setFocusParticipantId(""),r===e.id&&(kn.lockParticipantId="");}var Cn=function Cn(e){var t=kn.self.myId;Pn.conference.addEventListener("participantLeft",function(){var n=a()(i.a.mark(function n(r){var o,a,c,s,u,d,f;return i.a.wrap(function(n){for(;;){switch(n.prev=n.next){case 0:return o=r.participant,a=o,n.next=4,An(a,e);case 4:Tn(a,e),Ln(a,e),En(a),(c=Pn.allPars.find(function(e){return e.id==a.id;}))&&c.peerId==t&&(s=kn.local,u=s.publication,d=s.audioStatus,f=s.localStream,"active"==d&&(f&&(f.mediaStream.getAudioTracks()[0].enabled=!0),u&&u.unmute("audio"))),Sn(),1==kn.allParticipants.length&&(kn.mode="speaker"),e.dispatchEvent({type:"memberleave",member:a});case 12:case"end":return n.stop();}}},n);}));return function(e){return n.apply(this,arguments);};}());},On=function On(e,t){var n=kn.joinInfo,r=kn.local,i=kn.self,o=r.audioStatus,a=r.publication,c=r.localStream,s=n.allowParticipantUnmute,u=n.host;return new Promise(function(r,d){if(t.peerId===i.myId){var f;if(e.dispatchEvent({type:"myPstnAdd",pstn:t}),"notConnect"==o&&(f="inactive"),"inactive"!=o&&"non_inactive"!==o||(f="inactive"),"active"==o)f="active",a.mute("audio"),c&&(c.mediaStream.getAudioTracks()[0].enabled=!1),Pn.allPars.find(function(e){return e.id==i.myId;}).audioStatus="inactive";if(s||u||(f="inactive"),"inactive"===f){var l=[{op:"replace",path:"/media/audio/status",value:f}];Z(xn().updateStream(n.confId,t.streamId),{body:l,method:"PATCH"},e).then(function(){t.audioStatus="inactive",r(),Pn.conference.send(bt(i.myId),void 0);},function(e){return d(e);});}else r();kn.local.audioStatus=f;}else r();});},Rn=function Rn(e){Pn.conference.addEventListener("participantjoined",function(){var t=a()(i.a.mark(function t(n){var r,o,a,c;return i.a.wrap(function(t){for(;;){switch(t.prev=t.next){case 0:if(r=n.participant,o=r.userId.split(",")[0],a=kn.joinInfo.hostId,2!==r.type){t.next=5;break;}return t.abrupt("return");case 5:r.id.startsWith("SipIn")||r.id.startsWith("SipOut")||(c={host:a==o,participantId:o,joinType:an.VOIP,id:r.id,joinMeetWait:r.joinMeetWait,user:r.userId.split(",").slice(1).join(","),userId:r.userId,type:r.type,photo:r.photo,deviceType:r.deviceType,localRecord:r.localRecord},Pn.allPars.push(c),Sn(),e.dispatchEvent({type:"memberjoin",member:c}));case 6:case"end":return t.stop();}}},t);}));return function(e){return t.apply(this,arguments);};}()),Pn.conference.addEventListener("sipAndPstnJoin",function(){var t=a()(i.a.mark(function t(n){var r,o;return i.a.wrap(function(t){for(;;){switch(t.prev=t.next){case 0:r={};try{r=JSON.parse(n.data);}catch(e){console.error(e);}if(console.log("sipAndPstnJoin",r),r.participantId){t.next=5;break;}return t.abrupt("return");case 5:return t.next=7,On(e,r);case 7:(o=Pn.allPars.find(function(e){return e.id==r.id;}))?Object.assign(o,r):Pn.allPars.push(r),Sn(),e.dispatchEvent({type:"memberjoin",member:r});case 11:case"end":return t.stop();}}},t);}));return function(e){return t.apply(this,arguments);};}());},Ln=function Ln(e,t){var n=Pn.allPars.find(function(t){return t.id==e.id;}),r=kn.self.myId;!function(e,t){var n=Pn.allPars.find(function(t){return t.id==e.id;});Pn.allPars=Pn.allPars.filter(function(t){return t.id!==e.id;}),n&&(kn.allAddStreams=kn.allAddStreams.filter(function(e){return e.origin!==n.id;}));}(e),n&&n.peerId==r&&t.dispatchEvent({type:"myPstnLeft",callMeStatus:n.audioStatus});},Mn=n(7).default,Nn=n(6).default(),Bn=v();function Dn(e){Nn.conference.addEventListener("streamended",function(t){var n=t.stream,r=t.isHost;Bn.allAddStreams=Bn.allAddStreams.filter(function(e){return e.id!=n.id;});var i=Bn.subscribeStream,o=i.cameraList,a=i.shareStream,c=i.activeStream,s=Nn.allPars.find(function(e){return e.streamId==n.id;});s&&!s.id.startsWith("SipIn")&&(s.audioStatus="non_inactive",s.videoStatus="inactive",s.streamId=void 0),Sn(),e.dispatchEvent({type:"streamend",stream:n}),n.id==Bn.activeAudio&&(Bn.activeAudio=""),n.id==Nn._activeAudio&&(Nn._activeAudio=""),n.id==(c&&c.stream.id)&&(c&&(c.apply={}),Bn.subscribeStream.activeStream=c);var u=o.find(function(e){return e.apply.from===n.id;});if(u&&(u.apply={},Bn.subscribeStream.cameraList=[].concat(o)),Le(n)&&(e.dispatchEvent({type:"shareend",stream:n}),Bn.whiteBoard&&Bn.whiteBoard.name&&(Bn.whiteBoard.name===Bn.self.parId&&(e.closeWhiteBoard(),r&&e.dispatchEvent({type:"shareStoppedByHost"})),Bn.whiteBoard={})),Re(n)){var d=Nn.allPars.find(function(e){return e.shareStreamId==n.id;});e.dispatchEvent({type:"shareend",stream:n}),d.id===Bn.self.myId&&r&&(oe(e),e.dispatchEvent({type:"shareStoppedByHost"})),d&&(d.shareStreamId=void 0),a.apply.from&&(a.apply={}),c&&(c.apply={}),Bn.subscribeStream.activeStream=c;var f=setTimeout(function(){z(e),clearTimeout(f);},Math.floor(2e3*Math.random()));}else z(e);});}var Un=function Un(e){Nn.conference.addEventListener("streamadded",function(){var t=a()(i.a.mark(function t(n){var r,o,a,c,s;return i.a.wrap(function(t){for(;;){switch(t.prev=t.next){case 0:if(r=Bn.joinInfo.confId,o=Bn.self.myId,a=n.stream,c=a.origin,Bn.allAddStreams.push(a),s=Nn.allPars.find(function(e){return e.id==c;}),Le(a)||(s&&!Re(a)&&(s.videoStatus=a.attributes&&a.attributes.videoStatus||"inactive",s.audioStatus=a.attributes&&a.attributes.audioStatus,s.streamId=a.id),s&&Re(a)&&(s.shareStreamId=a.id),Sn()),a.origin!=o||!a.source||Re(a)||Le(a)||Z(Mn().updateStream(r,a.id),{method:"PATCH",body:[{op:"add",path:"/info/inViews",value:"common"}]},e).then(function(){e.dispatchEvent({type:"patchCommon",status:!0,stream:a}),console.log("patch stream common");}),1!=Bn.joinInfo.joinMeetWait){t.next=10;break;}return t.abrupt("return");case 10:return t.next=12,Fn(e,a);case 12:z(e),e.dispatchEvent({type:"streamadd",stream:a});case 14:case"end":return t.stop();}}},t);}));return function(e){return t.apply(this,arguments);};}());};function Vn(e,t,n){var r=Bn.joinInfo.confId,i=Bn.record.mix;Bn.joinInfo.host&&i&&Z(Mn().conferenceRecord(),{method:"POST",body:{confId:r,streamId:t.id,type:n}},e).then(function(e){Bn.record.share=e.data.data;});}function Fn(e,t){return Wn.apply(this,arguments);}function Wn(){return(Wn=a()(i.a.mark(function e(t,n){var r,o;return i.a.wrap(function(e){for(;;){switch(e.prev=e.next){case 0:if(r=Bn.self.myId,!Re(n)){e.next=13;break;}if(n.origin===r){e.next=11;break;}if(Bn.subscribeStream.shareStream.subscribtion){e.next=9;break;}return o=Bn.allAddStreams.find(function(e){return Me(e);}),e.next=7,_(o,t);case 7:e.next=10;break;case 9:O(t);case 10:Bn.mode="speaker";case 11:Vn(t,n,1),t.dispatchEvent({type:"shareadd",stream:n});case 13:Le(n)&&Vn(t,n,1);case 14:case"end":return e.stop();}}},e);}))).apply(this,arguments);}function $n(e){setInterval(function(){z(e);},1e4),Nn.conference.addEventListener("activeaudioinputchange",function(){var t=a()(i.a.mark(function t(n){var r,o,a,c;return i.a.wrap(function(t){for(;;){switch(t.prev=t.next){case 0:if(r=n.activeAudioInputStreamId,(o=Nn.allPars.find(function(e){return e.streamId==r;}))&&console.log(o.user+" is talking"),o&&o.joinMeetWait!==L){t.next=5;break;}return t.abrupt("return");case 5:(a=Nn.allPars.find(function(e){return e.streamId==r;})).peerId&&(c=Nn.allPars.find(function(e){return e.id==a.peerId;}))&&c.streamId&&(r=c.streamId),Bn.activeAudio=r,z(e);case 9:case"end":return t.stop();}}},t);}));return function(e){return t.apply(this,arguments);};}());}var Hn=n(19),zn=n.n(Hn),qn=function qn(e,t){var n=e.match(new RegExp("[?&]"+t+"=([^&]*)(&?)"));return n?n[1]:n;},Jn=n(24),Gn=n(9),Kn=n(15),Xn=n(25);function Yn(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Zn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Zn(e,t);}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]};};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}return(n=e[Symbol.iterator]()).next.bind(n);}function Zn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++){r[n]=e[n];}return r;}var Qn=n(6).default(),er=v();function tr(e){if("mixed"===e.type)return new Jn.c(e);var t,n;e.media.audio&&(t=e.media.audio.source),e.media.video&&(n=e.media.video.source);var r=new Gn.b(e.id,e.info.owner,void 0,new Gn.e(t,n),e.info.attributes);return r.settings=Kn.a(e.media),r.capabilities=Kn.b(e.media),r;}var nr,rr=function rr(e,t){for(var n,r=new Map(),i=new Map(),o=e.streams,a=e.participants,c=er.allAddStreams,s=Yn(o);!(n=s()).done;){var u=n.value;"mixed"===u.type&&(u.viewport=u.info.label),r.set(u.id,tr(u));}for(var d,f=Yn(a);!(d=f()).done;){var l=d.value;i.set(l.id,new Xn.a(l.id,l.role,l.user));}var p=[];return r.forEach(function(e){var t=c.find(function(t){return t.id==e.id;});t?p.push(t):p.push(e);}),Qn.conference.remoteStreams=r,Qn.conference.participants=i,p;},ir=n(35),or=n(14);!function(e){e.SIP="sip",e.VOIP="voip",e.PSTN="pstn";}(nr||(nr={}));var ar=function ar(e){return e.kty.joinInfo.host;},cr="electron"===Object({RUN_ENV:"meet"}).PLATFORM_ENV,sr=function sr(){var e,t=window.innerWidth;((e=or.a.getState().tagStatus).participant||e.chat)&&(t-=310);return Math.floor((t-200-241)/80)+2;},ur=function ur(e){var t=or.a.getState().kty.joinInfo.record,n=!or.a.getState().kty.joinInfo.closeParticipantUpload,r=["audio","video","share","participant","chat"],i=cr||ar(or.a.getState());return t&&i&&r.push("record"),n&&r.push("doc"),r.push("more"),r.indexOf(e);};function dr(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return fr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fr(e,t);}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]};};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}return(n=e[Symbol.iterator]()).next.bind(n);}function fr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++){r[n]=e[n];}return r;}var lr=n(7).default,pr=0,mr=n(6).default(),hr=v();function vr(e){var t=hr.self.parId;Z(lr().participantReconnect(),{body:{participantId:t,reconnectNum:pr},method:"POST"},e).then(function(){pr=0;});}function gr(e,t){var n,r,i,o=e.fileList,a=void 0===o?[]:o,c=t.fileList,s=void 0===c?[]:c;a.length>s.length&&or.a.dispatch((n={documentUnread:(r="doc",i=ur(r),!(i<0)&&i>=sr()-1?"more":"document")},{type:ir.a,playload:n}));}function br(e){return yr.apply(this,arguments);}function yr(){return(yr=a()(i.a.mark(function e(t){var n,r,o,a,c,u,d,f,l,p;return i.a.wrap(function(e){for(;;){switch(e.prev=e.next){case 0:return n=hr.joinInfo.confId,e.next=3,Z(lr().conferenceInfo(n),{},t);case 3:r=e.sent,o=hr.self.parId,0==(a=r.data).code&&(c=a.data.focusParticipantId,u=a.data.hostId,d=hr.joinInfo.owner,gr(a.data,hr.joinInfo),hr.joinInfo=s()({},hr.joinInfo,a.data,{focusParticipantId:c,host:u===o,owner:d}),c?(f=hr.allParticipants.find(function(e){return e.participantId==c;}),hr.focusParticipantId=f&&f.id||""):hr.focusParticipantId="",hr.lockParticipantId="",a.data.shareWbUrl?(l=a.data.shareWbUrl.split("?")[1],p={name:zn.a.parse(l).owner,width:zn.a.parse(l).width,height:zn.a.parse(l).height},hr.whiteBoard=p):hr.whiteBoard={},hr.record={mix:a.data.mixVideoRecordingId,share:a.data.shareRecordingId});case 7:case"end":return e.stop();}}},e);}))).apply(this,arguments);}function Sr(e){return wr.apply(this,arguments);}function wr(){return(wr=a()(i.a.mark(function e(t){var n,r,o,a,c;return i.a.wrap(function(e){for(;;){switch(e.prev=e.next){case 0:if(n=hr.waitingList,r=hr.self.myId,!n.find(function(e){return e.id==r;})){e.next=5;break;}return t.clearStream(),e.abrupt("return");case 5:o=hr.local,a=o.sharePublication,c=o.publication,!o.shareStream&&a?t.stopShareScreen():a&&a.restartIce(),c&&c.restartIce();case 8:case"end":return e.stop();}}},e);}))).apply(this,arguments);}function _r(e){for(var t,n=hr.subscribeStream,r=n.activeStream,i=n.cameraList,o=n.mixedStream,a=n.shareStream,c=function c(){var n=t.value;n&&n.subscribtion&&n.subscribtion.restartIce().then(function(t){t&&"closed"==t.pcStatus&&e.reCreatePeerconnection(n.subscribtion);});},s=dr([].concat(r).concat(i).concat(o).concat(a));!(t=s()).done;){c();}}function Ir(e){var t=hr.allParticipants,n=hr.self.myId,r=t.find(function(e){return e.id==n;});if(r){var i=r.callMe,o=i&&i.audioStatus||r.audioStatus;o&&(hr.local.audioStatus=o);}}function xr(e){return Pr.apply(this,arguments);}function Pr(){return(Pr=a()(i.a.mark(function e(t){var n,r,o,a,c,s,u,d;return i.a.wrap(function(e){for(;;){switch(e.prev=e.next){case 0:return n=hr.self.myId,e.next=3,mr.conference.sendCommand("room-infos",{id:n});case 3:return r=e.sent,o=r.data.room,a=rr(o),hr.allAddStreams=a,e.prev=7,e.next=10,br(t);case 10:e.next=32;break;case 12:return e.prev=12,e.t0=e.catch(7),e.prev=14,e.next=17,br(t);case 17:e.next=32;break;case 19:return e.prev=19,e.t1=e.catch(14),e.prev=21,e.next=24,br(t);case 24:e.next=32;break;case 26:e.prev=26,e.t2=e.catch(21),hr.conferenceStatus="end",mr.conference.leave(),t.dispatchEvent({type:"serverdisconnected",code:601}),we();case 32:return c=mr.allPars.find(function(e){return e.id==n;}),s=c.localRecord,e.next=36,mr.conference.sendCommand("getParticipantsList","obj");case 36:if(Sn(),c=mr.allPars.find(function(e){return e.id===n;}),s&&!c.localRecord&&(t.stopRecord(!0).then(),t.dispatchEvent({type:"recordStoppedByHost"})),Ir(),hr.joinInfo.joinMeetWait=c.joinMeetWait,t.dispatchEvent({type:"relogin"}),t.dispatchEvent({type:"online"}),1!=hr.joinInfo.joinMeetWait){e.next=48;break;}return t.dispatchEvent({type:"participantChange"}),e.next=47,Promise.resolve(!0);case 47:return e.abrupt("return",e.sent);case 48:if(_r(t),!(u=hr.allAddStreams.find(function(e){return Re(e);}))){e.next=60;break;}if(hr.subscribeStream.shareStream.subscribtion){e.next=59;break;}if(u.origin===n){e.next=57;break;}return d=hr.allAddStreams.find(function(e){return Me(e);}),e.next=56,_(d,t);case 56:hr.mode="speaker";case 57:e.next=60;break;case 59:O(t);case 60:return e.next=62,Sr(t);case 62:return z(t),e.next=65,Promise.resolve(!0);case 65:return e.abrupt("return",e.sent);case 66:case"end":return e.stop();}}},e,null,[[7,12],[14,19],[21,26]]);}))).apply(this,arguments);}var kr=!1,Er=function(){var e=a()(i.a.mark(function e(t){return i.a.wrap(function(e){for(;;){switch(e.prev=e.next){case 0:if("end"!==hr.conferenceStatus){e.next=2;break;}return e.abrupt("return");case 2:if(!kr){e.next=4;break;}return e.abrupt("return");case 4:return kr=!0,mr.commandLocked=!0,console.log("=> relogin"),e.next=9,xr(t);case 9:kr=!1,mr.commandLocked=!1,Rr(t),vr(t);case 13:case"end":return e.stop();}}},e);}));return function(t){return e.apply(this,arguments);};}(),Ar=Object({RUN_ENV:"meet"}).PLATFORM_ENV,jr=n(6).default(),Tr=v(),Cr="";function Or(e,t){var n=Tr.self.myId,r=t.message.replace(ht.toLowerCase(),""),i=mt.Base64.decode(r),o=i.split("/")[0],a=i.split(/\/|\?/)[1],c=vt.find(function(e){return e.cmd===o;}),u=c.name;if("end"===u)e.isLocalRecording()&&e.stopRecord(!0),Tr.conferenceStatus="end",e.clearStream(),e.dispatchEvent({type:"conferenceend"}),jr.conference.leave(),we();else if("mute"===u){var d=Tr.allParticipants.find(function(e){return e.id===n;});if(In(0,"mute",void 0,c.status),c.status)d&&!d.host&&"active"===Tr.local.audioStatus&&(Cr="active",Tr.local.audioStatus="inactive");else{if(d&&(t.origin===d.id||"inactive"!==d.audioStatus||d.host))return;d&&d.handUp?e.agreeUnmute(d.id):e.dispatchEvent({type:"request_unmute"});}e.dispatchEvent({type:"muteAll",status:c.status});}else if("audio"==u){if(a===n&&"notConnect"!==Tr.local.audioStatus)if(Cr=c.status?"active":"inactive",Tr.local.audioStatus=Cr,Tr.local.localStream)Tr.local.localStream.mediaStream.getAudioTracks()[0].enabled=c.status;In(0,"audio",a,c.status),e.dispatchEvent({type:"audiochange",id:a,status:c.status});}else if("video"==u)In(0,"video",a,c.status),e.dispatchEvent({type:"videochange",status:c.status,id:a}),z(e);else if("kick"==u&&a==n)e.isLocalRecording()&&e.stopRecord(!0),Tr.conferenceStatus="end",e.clearStream(),e.conferenceLeave(),e.dispatchEvent({type:"droped",id:a}),we();else if("assignHostType"==u&&a){var f=zn.a.parse(i.split(/\/|\?/)[2]).type,l=jr.allPars.find(function(e){return e.participantId==a;});if(!l)return;var p=l.id;p===n&&e.handsDown(n),Tr.joinInfo=s()({},Tr.joinInfo,{host:p==n,hostId:l.participantId}),In(0,"assignHost",p,null),e.dispatchEvent({type:"assignHost",hostId:p,name:f,preHostId:t.origin});}else if("allowUnmute"==u)Tr.joinInfo.allowParticipantUnmute=c.status,c.status&&In(0,"allHandDown",void 0,!1),e.dispatchEvent({type:"allowunmute",status:c.status});else if("raiseHand"==u)In(0,"raiseHand",a,c.status),e.dispatchEvent({type:"handschange",id:a,status:c.status});else if("allHandDown"==u)In(0,"allHandDown",void 0,!1),e.dispatchEvent({type:"allhanddown"});else if("notConnectAudio"==u)a===n&&(Cr="notConnect"),In(0,"notConnectAudio",a,!1),e.dispatchEvent({type:"notConnectAudio",id:a});else if("conferenceLocked"==u)Tr.switch.locked=c.status,e.dispatchEvent({type:"conferenceLocked",status:c.status});else if("whiteBoard"===u){var m=qn(i,"width"),h=qn(i,"height");c.status?(Tr.whiteBoard={name:a,width:m,height:h},Tr.mode="speaker"):Tr.whiteBoard={};var v=c.status?"openwhiteboard":"closewhiteboard";e.dispatchEvent({type:v,status:c.status});}else if("busyControl"===u)e.dispatchEvent({type:"busyControlModal"});else if("remoteControl"===u){if("electron"===Ar)if(c.status){var g=Tr.desktopControl,b=g.getRequesting,y=g.beControled;b||y?e.dispatchEvent({type:"busyControl",parId:t.origin}):e.dispatchEvent({type:"userRequestControl",status:c.status,origin:t.origin,controllerId:t.origin,getRequesting:!0});}else{var S=parseFloat(qn(i,"shareWhRatio")),w=qn(i,"shareOs"),_="true"===qn(i,"beControled"),I=S>-1;Tr.desktopControl=s()({},Tr.desktopControl,{sharerId:t.origin,shareWhRatio:S,controled:_,shareOs:w}),e.dispatchEvent({type:"responseControl",status:c.status,origin:t.origin,controled:_,shareWhRatio:S,getRequesting:I,shareOs:w});}}else if("desktopInput"===u){if("electron"===Ar){var x,P=qn(i,"type");if(P.indexOf("key")>-1)x={type:P,key:qn(i,"key")};else x={type:P,button:qn(i,"button"),x:parseFloat(qn(i,"x")),y:parseFloat(qn(i,"y"))};window.nodeRequire("electron").ipcRenderer.send("meeting_event_change",["remoteInput",x]);}}else if("stopRemoteControl"===u)"electron"===Ar&&(Tr.desktopControl={beControled:!1,controled:!1,controllerId:"",getRequesting:!1},e.dispatchEvent({type:"stopRemoteControl"}));else if("cancelControl"===u)"electron"===Ar&&e.dispatchEvent({type:"cancelControl"});else if("focusSomeone"===u)Tr.focusParticipantId=a,Tr.lockParticipantId="",Tr.mode="speaker",z(e),e.dispatchEvent({type:"focusSomeone",id:a});else if("enterMuteAudio"===u)Tr.joinInfo.enterMeetMute=c.status,e.dispatchEvent({type:"entermeetmute",status:c.status});else if("agreeUnmute"===u)Tr.allParticipants.forEach(function(t){t.id===a&&(t.handUp=!1,a===n&&(e.dispatchEvent({type:"myUnmuteAgreed"}),e.openAudio()));}),e.dispatchEvent({type:"handschange",id:a,status:!1});else if("refuseUnmute"===u){var k=a.split(",");Tr.allParticipants.forEach(function(t){(!a||k.indexOf(t.id)>-1)&&(t.handUp&&t.id===n&&e.dispatchEvent({type:"myUnmuteRefused"}),t.handUp=!1);}),e.dispatchEvent({type:"handschange",status:!1});}else if("rename"===u){if(i.indexOf("?name=")>-1){var E=i.split("?name=")[1];Tr.allParticipants.forEach(function(e){a===e.id&&(e.user=E);}),a==n&&(Tr.option.params.user=E),e.dispatchEvent({type:"rename",id:a});}}else if("toggleWaitingRoom"===u)c.status?Tr.joinInfo.openWaitingRoom=!0:Tr.joinInfo.openWaitingRoom=!1,e.dispatchEvent({type:"toggleWaitingRoom"});else if("moveToMeetingRoom"===u){var A=a.split(",");Tr.waitingList.forEach(function(e){(!a||A.indexOf(e.id)>-1)&&(e.joinMeetWait=R,e.id===n&&(Tr.joinInfo.joinMeetWait=R));}),Sn(),e.dispatchEvent({type:"participantChange",id:a});}else if("moveToWaitingRoom"===u){var j=a.split(",");Tr.allParticipants.forEach(function(t){j.indexOf(t.id)>-1&&(t.joinMeetWait=L,Tr.lockParticipantId===t.id&&(Tr.lockParticipantId=null),t.id===n&&(Tr.joinInfo.joinMeetWait=L,e.clearStream(),"loading"===Tr.local.videoStatus&&(Tr.local.audioStatus="inactive",Tr.local.videoStatus="inactive"),Tr.local.shareStream&&e.stopShareScreen(),Tr.whiteBoard&&Tr.whiteBoard.name===Tr.self.parId&&e.closeWhiteBoard(),e.isLocalRecording()&&e.stopRecord(!0)));}),z(e),Sn(),1==Tr.allParticipants.length&&(Tr.mode="speaker"),e.dispatchEvent({type:"participantChange",id:a});}else if("removeFromWaitingRoom"===u){var T=a.split(",");(!a||T.indexOf(n)>-1)&&Tr.joinInfo.joinMeetWait&&(Tr.conferenceStatus="end",e.clearStream(),e.conferenceLeave(),e.dispatchEvent({type:"droped",myId:n}),we());}else if("allowParticipantUpload"===u){Tr.joinInfo=s()({},Tr.joinInfo,{allowParticipantUpload:c.status});var C=qn(i,"participantId");e.dispatchEvent({type:"allowParticipantUpload",participantId:C});}else if("deleteMeetingFiles"===u){var O=qn(i,"ids"),M=qn(i,"participantId");O.split(",").forEach(function(e){var t=Tr.joinInfo.fileList.findIndex(function(t){return t.id===e;});Tr.joinInfo.fileList.splice(t,1);}),e.dispatchEvent({type:"deleteMeetingFiles",participantId:M});}else if("uploadMeetingFile"===u){var N=JSON.parse(i.split("file=")[1]);Tr.joinInfo.fileList?Tr.joinInfo.fileList.unshift(N):Tr.joinInfo.fileList=[N],e.dispatchEvent({type:"uploadMeetingFile",file:N});}else if("allowParticipantShare"===u)Tr.joinInfo.allowParticipantShare=!0,e.dispatchEvent({type:"shareAuthChange",allowParticipantShare:!0});else if("disallowParticipantShare"===u)Tr.joinInfo.allowParticipantShare=!1,e.dispatchEvent({type:"shareAuthChange",allowParticipantShare:!1});else if("allowParticipantRecord"===u)Tr.joinInfo.allowParticipantLocalRecord=!0,e.dispatchEvent({type:"recordAuthChange",allowParticipantRecord:!0});else if("disallowParticipantRecord"===u)Tr.joinInfo.allowParticipantLocalRecord=!1,e.dispatchEvent({type:"recordAuthChange",allowParticipantRecord:!1}),e.isLocalRecording()&&!Tr.joinInfo.host&&(e.stopRecord(!0),e.dispatchEvent({type:"recordStoppedByHost"}));else if("startLocalRecord"===u){var B=Tr.allParticipants.find(function(e){return e.id===a;});B&&(B.localRecord=!0,e.dispatchEvent({type:"recordChange",id:a,status:!0}));}else if("stopLocalRecord"===u){var D=Tr.allParticipants.find(function(e){return e.id===a;});D&&(D.localRecord=!1,e.dispatchEvent({type:"recordChange",id:a,status:!1}));}else if("stopParticipantRecord"===u){var U=Tr.allParticipants.find(function(e){return e.id===a;});U&&(U.localRecord=!1,e.dispatchEvent({type:"recordChange",id:a,status:!1})),a===n&&(e.stopRecord(!0),e.dispatchEvent({type:"recordStoppedByHost"}));}else if("recordId"===u){var V=zn.a.parse(a),F=V.mix||"",W=V.share||"";Tr.record={mix:F,share:W},Tr.joinInfo.recordStartTime=F?Date.now():0;var $=!(!F&&!W),H=e.isLocalRecording();e.dispatchEvent({remote:!0,type:"recordChange",record:Tr.record,status:$||H});}}function Rr(e){jr.cachedCommands.forEach(function(t){Or(e,t);});}var Lr=function Lr(){return new Promise(function(e){jr.conference&&jr.conference.sendCommand("mSeq").then(function(t){e(t.m_seq);});});},Mr=function e(t){"end"!=Tr.conferenceStatus&&(jr.seqTimer&&(clearTimeout(jr.seqTimer),jr.seqTimer=null),jr.seqTimer=setTimeout(a()(i.a.mark(function n(){var r;return i.a.wrap(function(n){for(;;){switch(n.prev=n.next){case 0:return e(t),n.next=3,Lr();case 3:if((r=n.sent)===Tr.mSeq){n.next=8;break;}return Tr.mSeq=r,n.next=8,Er(t);case 8:case"end":return n.stop();}}},n);})),1e4));},Nr=function Nr(e){jr.conference.addEventListener("messagereceived",function(){var t=a()(i.a.mark(function t(n){var r,o;return i.a.wrap(function(t){for(;;){switch(t.prev=t.next){case 0:0===n.message.toLowerCase().indexOf(ht.toLowerCase())?(n.mSeq===Tr.mSeq+1?Tr.mSeq++:(Tr.mSeq=n.mSeq,Er(e).then(function(){console.log("missing message!");})),jr.commandLocked&&jr.cachedCommands.push(n),Or(e,n),Mr(e)):(r=jr.allPars.find(function(e){return e.id==n.origin;}).user,o={message:n.message,time:Date.now(),send:r,to:n.to,origin:n.origin},e.dispatchEvent({type:"messagereceived",message:o}));case 1:case"end":return t.stop();}}},t);}));return function(e){return t.apply(this,arguments);};}());},Br=n(42),Dr=n.n(Br),Ur=n(6).default(),Vr=Dr()("command"),Fr=n(7).default,Wr=v(),$r=function $r(e,t,n){Z(Fr().joinStatistics(),{method:"POST",body:{participantId:Wr.self.parId,failureStep:t,failureReason:n}},e);},Hr=v();var zr=function zr(e,t){-1!==t.receiveSipBitrate&&(Hr.option.sipBitrateMultiplier=t.receiveSipBitrate),-1!==t.shareBitrateLow&&(Hr.option.shareMinBitrate=t.shareBitrateLow),-1!==t.shareFps&&(Hr.option.frameRateShare=t.shareFps),-1!==t.videoBitrateHigh&&(Hr.option.maxBitrate=t.videoBitrateHigh),-1!==t.videoBitrateLow&&(Hr.option.minBitrate=t.videoBitrateLow),-1!==t.videoFps&&(Hr.option.frameRate=t.videoFps),1080===t.shareResolution&&(Hr.option.share={width:1920,height:1080}),720===t.shareResolution&&(Hr.option.share={width:1280,height:720}),1080===t.videoResolution&&(Hr.option.video={width:1920,height:1080}),720===t.videoResolution&&(Hr.option.video={width:1280,height:720}),540===t.videoResolution&&(Hr.option.video={width:960,height:540}),360===t.videoResolution&&(Hr.option.video={width:640,height:360}),1080===t.shareAudioResolution&&(Hr.option.priorityShare={width:1920,height:1080}),720===t.shareAudioResolution&&(Hr.option.priorityShare={width:1280,height:720}),640===t.shareAudioResolution&&(Hr.option.priorityShare={width:640,height:480}),-1!==t.shareAudioBitrateHigh&&(Hr.option.sharePriorityMaxBitrate=t.shareAudioBitrateHigh),-1!==t.shareBitrateHigh&&(Hr.option.shareMaxBitrate=t.shareBitrateHigh),-1!==t.shareAudioFps&&(Hr.option.frameRatePriorityShare=t.shareAudioFps),-1!==t.shareAudioBitrateLow&&(Hr.option.sharePriorityMinBitrate=t.shareAudioBitrateLow);},qr=function qr(e){!function(e){mr.conference.addEventListener("reconnecting",function(){e.dispatchEvent({type:"reconnecting"}),e.dispatchEvent({type:"offline"}),pr++;});}(e),function(e){mr.conference.addEventListener("relogin",a()(i.a.mark(function t(){var n;return i.a.wrap(function(t){for(;;){switch(t.prev=t.next){case 0:return t.next=2,Lr();case 2:return(n=t.sent)!==hr.mSeq&&(hr.mSeq=n),t.next=6,Er(e);case 6:case"end":return t.stop();}}},t);})));}(e),function(e){mr.conference.addEventListener("streamUpdate",function(t){var n=t.data.data.value,r=n&&n.info&&n.info.attributes&&n.info.attributes.from;if("ios"==r||"android"==r){var i=hr.subscribeStream.cameraList.find(function(e){return e.apply.from===t.data.id;});if(!i)return;var o=n.media.video.optional.parameters.resolution,a=n.media.video.optional.parameters.framerate,c=A({obj:i,resolutions:o,client:r}),s={from:i.apply.from,video:{resolution:c,framerate:Be(e,a)}};i.subscribtion.applyOptions(s);}e.dispatchEvent({type:"streamUpdate",data:t});});}(e);},Jr=n(7).default,Gr=n(6).default(),Kr=!0,Xr=v();function Yr(e){return Zr.apply(this,arguments);}function Zr(){return(Zr=a()(i.a.mark(function e(t){var n,r,o,a;return i.a.wrap(function(e){for(;;){switch(e.prev=e.next){case 0:if(!Xr.joinInfo.live){e.next=9;break;}if(n=Xr.allAddStreams,r=n.find(function(e){return Ce(e);}),!Xr.joinInfo.live){e.next=9;break;}return o=Xr.joinInfo.liveUrl,e.next=7,Z(Jr().streamOut(Xr.joinInfo.confId),{method:"POST",body:{protocol:"rtmp",url:o+"/stream/media/"+Xr.option.params.key,media:{audio:{from:r.id},video:{from:r.id}}}},t);case 7:a=e.sent,Xr.streamOut=a.data;case 9:case"end":return e.stop();}}},e);}))).apply(this,arguments);}function Qr(e){Gr.conference.addEventListener("droped",function(){e.dispatchEvent({type:"droped"});}),Gr.conference.addEventListener("getParticipantsList",function(e){Gr.allPars=e.list.filter(function(e){return 2!==e.type;});}),Gr.conference.addEventListener("serverdisconnected",function(){e.clearStream(),"end"!=Xr.conferenceStatus&&e.dispatchEvent({type:"serverdisconnected",code:602});}),qr(e);}var ei=function ei(e,t,n){return new Promise(function(r,o){hn(n).then(function(){var r=a()(i.a.mark(function r(o){var a,c,s,u,d,f;return i.a.wrap(function(r){for(;;){switch(r.prev=r.next){case 0:if(Gr.conference=Object(sn.a)(),o._joinType_=t,Xr.accountInfo=o,a=Xr.accountInfo&&Xr.accountInfo.id||"",c=Xr.option.params,s=e||c.key&&c.key.trim(),Xr.option.params.key=s,u=c.user||Xr.accountInfo.name,Xr.option.params.key||!(c.token||"sdk"==c.from&&c.appId)){r.next=13;break;}return r.next=11,Z(Jr().conferenceCreate(),{headers:{token:c.token},method:"POST",body:{appVersion:un.version,sdkUser:!0,sdkVersion:un.sdkVersion,subject:u+"的快速会议",systemVersion:Xr.agent.systemVersion,userAgent:Xr.agent.userAgent}},n);case 11:d=r.sent,Xr.option.params.key=d.data.data.meetingKey;case 13:if(f={meetingKey:Xr.option.params.key,name:u,userId:a,appVersion:un.version,systemVersion:Xr.agent.systemVersion,userAgent:Xr.agent.userAgent,sdkVersion:un.sdkVersion},"normal"!==t){r.next=16;break;}return r.abrupt("return",Z(Jr().conferenceJoin(),{method:"POST",body:f},n));case 16:if("admin"!=t){r.next=18;break;}return r.abrupt("return",Z(Jr().conferenceOngoingJoin(),{method:"POST",headers:{token:c.token},body:f},n));case 18:case"end":return r.stop();}}},r);}));return function(e){return r.apply(this,arguments);};}(),function(e){n.conferenceLeave(),$r(n,"1.1",e&&e.message||"get account info failed!"),o(e);}).then(function(e){if(0!=e.data.code)return console.error("join => "+e.data.message),o(e.data);var t=e.data.data;zr(n,t),Xr.joinInfo=t,Xr.self.parId=t.participantId,Xr.record={mix:t.mixVideoRecordingId||"",share:t.shareRecordingId||""},t.shareWbUrl&&(Xr.whiteBoard={name:qn(t.shareWbUrl,"owner"),width:qn(t.shareWbUrl,"width"),height:qn(t.shareWbUrl,"height")});var r=t.token,i=setTimeout(function(){clearTimeout(i),Kr&&($r(n,"1.3","web client sdk-join timeout"),o("web client sdk-join timeout"));},6e4);return Gr.conference.join(r);},function(e){n.conferenceLeave(),$r(n,"1.2",e&&e.message||"java-api join conference failed!"),o(e);}).then(function(){var e=a()(i.a.mark(function e(t){var o,a,c,s,u,d,f;return i.a.wrap(function(e){for(;;){switch(e.prev=e.next){case 0:return Kr=!1,a=t.remoteStreams,c={},s=t.self.userId.split(","),c.myId=t.self.id,c.parId=s[0],c.user=s[1],Xr.self=c,(o=Xr.allAddStreams).push.apply(o,a),Rn(n),Cn(n),Un(n),Nr(n),Ur.conference.addEventListener("messagereceived",function(e){var t=e.message;if(e.origin,0===t.indexOf(Vr)){var n=t.match(new RegExp("^"+Vr+"/([a-z_]*)&(.*)$"));n[1];try{JSON.parse(n[2]);}catch(e){}}}),Dn(n),$n(n),Qr(n),e.next=19,Gr.conference.sendCommand("getParticipantsList","obj");case 19:Sn(),u=Xr.joinInfo.focusParticipantId,d=u&&Gr.allPars.find(function(e){return e.participantId===u;}),(f=d&&d.id)&&(Xr.focusParticipantId=f)&&(Xr.joinInfo.focusParticipantId=f)&&(Xr.lockParticipantId=""),r({allAddStreams:Xr.allAddStreams,allParticipants:Xr.allParticipants,self:Xr.self,conferenceConfig:Xr.joinInfo}),Yr(n);case 26:case"end":return e.stop();}}},e);}));return function(t){return e.apply(this,arguments);};}(),function(e){Kr=!1,n.conferenceLeave(),$r(n,"1.3",e&&e.message+"join err"),o(e);});});},ti=n(7).default,ni=n(6).default(),ri=v(),ii=function ii(){var e={dispatcher:{}};e.dispatcher.eventListeners={},this.addEventListener=function(t,n){void 0===e.dispatcher.eventListeners[t]&&(e.dispatcher.eventListeners[t]=[]),e.dispatcher.eventListeners[t].push(n);},this.removeEventListener=function(t,n){if(e.dispatcher.eventListeners[t]){var r=e.dispatcher.eventListeners[t].indexOf(n);-1!==r&&e.dispatcher.eventListeners[t].splice(r,1);}},this.clearEventListener=function(t){e.dispatcher.eventListeners[t]=[];},this.clearAllEventListener=function(){e.dispatcher={},e.dispatcher.eventListeners={};},this.dispatchEvent=function(t){e.dispatcher.eventListeners[t.type]&&e.dispatcher.eventListeners[t.type].map(function(e){e(t);});};},oi=n(7).default,ai=n(7).default,ci=n(6).default(),si=v(),ui=function ui(e,t,n){var r,i="",o=si.joinInfo.confId,a=ci.allPars.find(function(t){return t.peerId===e;});r=ci.allPars.find(function(t){return t.id===e;}),i=r.streamId;var c=si.allParticipants.find(function(t){return t.id===e;});if(t&&c&&c.handUp&&n.handsDown(e)&&(c.handUp=!1),"notConnect"==c.audioStatus&&!c.callMe)return Promise.resolve();a&&(i=a.streamId);var s=si.allAddStreams.find(function(e){return e.origin===r.id;});return s&&s.attributes&&"wechat"===s.attributes.from?ci.conference.send(t?gt(r.id):bt(r.id),void 0):new Promise(function(e){var a=[{op:"replace",path:"/media/audio/status",value:t?"active":"inactive"}];Z(ai().updateStream(o,i),{body:a,method:"PATCH"},n).then(function(){return ci.conference.send(t?gt(r.id):bt(r.id),void 0);}).then(function(){e();});});},di=m(function(e,t){var n=si.joinInfo.confId;return e&&t.allHandsdown(),new Promise(function(r){var i={op:"replace",path:"/media/audio/status",value:e?"active":"inactive"},o=function(){var e=ci.allPars.find(function(e){return e.host;});if(!e)return 0;var t=ci.allPars.find(function(t){return t.peerId==e.id;});return t?t.streamId:e.streamId;}();if(e){ci.conference.send(_t,void 0);var a=si.allParticipants.filter(function(e){return"voip"!==e.joinType;}).map(function(e){return e.streamId;});return 0==a.length?void r():void ci.conference.sendCommand("controlStreams",{ids:a,command:i}).then(function(){r();});}Z(ai().updateAllStreams(n,o||"0"),{body:[i],method:"PATCH"},t).then(function(){ci.conference.send(wt,void 0),r();}).catch(function(e){r(e);});});},1e3),fi=n(7).default,li=n(6).default(),pi=v();function mi(e,t){var n=pi.joinInfo.confId;Z(fi().delParticipant(n,t),{method:"DELETE"},e);}var hi=function hi(e,t){return new Promise(function(n){if(e.startsWith("SipIn")||e.startsWith("SipOut"))mi(t,e);else{li.conference.send(function(e){return""+ht+mt.Base64.encode(vt[6].cmd+"/"+e);}(e),void 0).then(n);var r=setTimeout(function(){li.allPars.find(function(t){return t.id==e;})&&mi(t,e),clearTimeout(r);},2e3);}var i=li.allPars.find(function(t){return t.peerId&&t.peerId==e;});i&&mi(t,i.id),n();});},vi=n(6).default(),gi=v(),bi=n(7),yi=v(),Si=n(6).default();function wi(e,t){var n=t.find(function(t){return t.id===e;});return n&&n.participantId;}var _i=n(6).default(),Ii=v(),xi=n(7).default,Pi=function Pi(e,t){var n=t.map(function(e){return wi(e,_i.allPars);});return new Promise(function(r,i){var o=Ii.joinInfo.confId;Z(xi().moveToWaitingRoom(),{method:"POST",body:{confId:o,participantIds:n}},e).then(function(e){var n;0===e.data.code?_i.conference.send((n=t,""+ht+mt.Base64.encode(vt[40].cmd+"/"+n.join(",")))).then(r):i(e.data.message);}),t.forEach(function(t){var n=Ii.allParticipants.find(function(e){return e.id===t;});n&&n.callMe&&mi(e,n.callMe.id);});});},ki=function ki(e,t){var n=t.map(function(e){return wi(e,_i.allPars);});return new Promise(function(r,i){var o=Ii.joinInfo.confId;Z(xi().moveToMeetingRoom(),{method:"POST",body:{confId:o,participantIds:n}},e).then(function(e){var n;0===e.data.code?_i.conference.send((n=t,""+ht+mt.Base64.encode(vt[39].cmd+"/"+n.join(",")))).then(r):i(e.data.message);});});},Ei=function Ei(e,t){var n,r=setTimeout(function(){t.forEach(function(t){_i.allPars.forEach(function(n){(n.id===t||n.peerId&&n.peerId===t)&&mi(e,n.id);});}),clearTimeout(r);},2e3);return _i.conference.send((n=t,""+ht+mt.Base64.encode(vt[41].cmd+"/"+n.join(","))));};function Ai(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return ji(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ji(e,t);}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]};};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}return(n=e[Symbol.iterator]()).next.bind(n);}function ji(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++){r[n]=e[n];}return r;}var Ti=n(7).default,Ci=n(6).default(),Oi=v();function Ri(e,t){var n=Oi.allParticipants.find(function(t){return t.id==e;});return n&&n.participantId;}var Li=function Li(e,t){var n=Ri(e);return new Promise(function(r){Z(Ti().handsUp(n),{method:"POST"},t).then(function(){Ci.conference.send(function(e){return""+ht+mt.Base64.encode(vt[15].cmd+"/"+e);}(e),void 0).then(r);});});},Mi=function Mi(e,t){var n=Ri(e);return new Promise(function(r){Z(Ti().handsDown(n),{method:"POST"},t).then(function(){Ci.conference.send(function(e){return""+ht+mt.Base64.encode(vt[16].cmd+"/"+e);}(e),void 0).then(r);});});},Ni=function Ni(e,t){for(var n,r=Oi.allParticipants,i=[],o=function o(){var e=n.value,t=r.find(function(t){return t.id==e;}).participantId;i.push(t);},a=Ai(e);!(n=a()).done;){o();}return new Promise(function(n){Z(Ti().manyHandsDown(),{method:"POST",body:{confId:Oi.joinInfo.confId,participantIds:i}},t).then(function(){Ci.conference.send(function(e){return""+ht+mt.Base64.encode(vt[36].cmd+"/"+e.join(","));}(e),void 0).then(n);});});},Bi=n(6).default(),Di=n(7).default,Ui=v();var Vi,Fi=function Fi(e,t,n){var r=function(e,t){var n=Ui.allParticipants.find(function(t){return t.id==e;});return n&&n.participantId;}(e);return new Promise(function(i,o){(t=t.trim())?t.length>20?o({code:-2,message:"名字长度在20以内"}):!function(e,t){void 0===t&&(t=!1);var n=/^[\w\s\u4E00-\u9FFF!¥……()?,。、【】—《》“”:;‘’'·~!"@:;#=$%^\\&*()_+\]\[|{}<>?,.\/-]{1,20}$/g;return t?n:!!e.trim()&&n.test(e);}(t)?o({code:-3,message:"名字不能包含特殊字符"}):Z(Di().rename(),{method:"POST",body:{confId:Ui.joinInfo.confId,name:t,participantId:r}},n).then(function(n){0===n.data.code?Bi.conference.sendCommand("change-name",{id:e,name:t}).then(i):o(n.data);}):o({code:-1,message:"请输入名字"});});},Wi=n(7).default,$i=n(6).default(),Hi=v(),zi=function zi(e,t){var n=Hi.joinInfo.confId;return e&&t.allHandsdown(),new Promise(function(r,i){Z(Wi().allowUnmute(),{method:"POST",body:{confId:n,allowParticipantUnmute:e}},t).then(function(t){0==t.data.code&&($i.conference.send(e?xt:Pt,void 0),r());}).catch(function(e){i(e);});});},qi=n(6).default(),Ji=n(7).default,Gi=v(),Ki={mediaRecorder:null,shareAddListener:null,shareEndListener:null,audioChangeHandler:null},Xi=n(7).default,Yi=n(6).default();!function(e){e[e.MIX=0]="MIX",e[e.SHARE=1]="SHARE";}(Vi||(Vi={}));var Zi=0,Qi=0,eo=v();function to(e,t){var n=(eo.accountInfo.id||"guestors").split("-").join("").substr(0,8),r=new Date().getTime()-Qi;return n+"-"+Qi+"-"+String(++Zi).padStart(3,"0")+"-"+r+"-"+t+".webm";}function no(e,t){return ro.apply(this,arguments);}function ro(){return(ro=a()(i.a.mark(function e(t,n){var r;return i.a.wrap(function(e){for(;;){switch(e.prev=e.next){case 0:return e.next=2,Z(Xi().conferenceRecord(),{method:"POST",body:n},t);case 2:if(0===(r=e.sent).data.code){e.next=5;break;}throw Error(r.data.message);case 5:return n.type===Vi.MIX&&(eo.record.mix=r.data.data),n.type===Vi.SHARE&&(eo.record.share=r.data.data),e.abrupt("return",r.data.data);case 8:case"end":return e.stop();}}},e);}))).apply(this,arguments);}function io(e){return oo.apply(this,arguments);}function oo(){return(oo=a()(i.a.mark(function e(t){var n,r;return i.a.wrap(function(e){for(;;){switch(e.prev=e.next){case 0:return n=eo.joinInfo.confId,r=[],eo.allAddStreams.forEach(function(e){Ce(e)&&r.push(no(t,{confId:n,streamId:e.id,type:Vi.MIX})),Re(e)&&r.push(no(t,{confId:n,streamId:e.id,type:Vi.SHARE})),Le(e)&&r.push(no(t,{confId:n,streamId:e.id,type:Vi.SHARE}));}),e.next=5,Promise.all(r);case 5:Yi.conference.send(At(eo.record.mix,eo.record.share),"all");case 6:case"end":return e.stop();}}},e);}))).apply(this,arguments);}function ao(e){return Boolean(eo.local.sharePublication);}function co(e){return so.apply(this,arguments);}function so(){return(so=a()(i.a.mark(function e(t){var n,r,o,a,c,s,u,d;return i.a.wrap(function(e){for(;;){switch(e.prev=e.next){case 0:return n=[],r=window.nodeRequire("electron"),o=r.desktopCapturer,e.next=4,o.getSources({types:["window","screen"]});case 4:return a=e.sent,c=a.filter(function(e){return"科天章鱼云"===e.name;})[0],s=c.id,e.next=9,navigator.mediaDevices.getUserMedia({audio:!1,video:{mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:s}}});case 9:if(u=uo(u=e.sent,t).clone(),d={mimeType:"video/webm;codecs=h264"},!Ki.mediaRecorder||"recording"!==Ki.mediaRecorder.state){e.next=14;break;}return e.abrupt("return");case 14:Ki.mediaRecorder=new MediaRecorder(u,d),Ki.mediaRecorder.ondataavailable=function(e){n.push(e.data);},Ki.mediaRecorder.onstop=function(){mo(n,to(0,"app"));},Ki.mediaRecorder.start(500);case 18:case"end":return e.stop();}}},e);}))).apply(this,arguments);}function uo(e,t){var n=new AudioContext(),r=n.createMediaStreamDestination();if(eo.subscribeStream.mixedStream){var i=eo.subscribeStream.mixedStream.stream.mediaStream;n.createMediaStreamSource(i).connect(r);}eo.local.localStream&&"active"===eo.local.audioStatus&&n.createMediaStreamSource(eo.local.localStream.mediaStream).connect(r);return e.addTrack(r.stream.getTracks()[0]),e;}function fo(e){var t=[],n=eo.local.shareStream.mediaStream.clone();n=uo(n);Ki.mediaRecorder=new MediaRecorder(n,{mimeType:"video/webm;codecs=h264"}),Ki.mediaRecorder.ondataavailable=function(e){t.push(e.data);},Ki.mediaRecorder.onstop=function(){mo(t,to(0,"share"));},Ki.mediaRecorder.start(500);}function lo(e){return po.apply(this,arguments);}function po(){return(po=a()(i.a.mark(function e(t){var n,r,o;return i.a.wrap(function(e){for(;;){switch(e.prev=e.next){case 0:if(!ao()){e.next=5;break;}return e.next=3,fo();case 3:e.next=7;break;case 5:return e.next=7,co(t);case 7:return n=eo.self.myId,Ki.shareAddListener=function(){var e=a()(i.a.mark(function e(t){return i.a.wrap(function(e){for(;;){switch(e.prev=e.next){case 0:if(t.stream.origin!==n){e.next=5;break;}return Ki.mediaRecorder&&"recording"===Ki.mediaRecorder.state&&Ki.mediaRecorder.stop(),Ki.mediaRecorder=null,e.next=5,fo();case 5:case"end":return e.stop();}}},e);}));return function(t){return e.apply(this,arguments);};}(),t.addEventListener("shareadd",Ki.shareAddListener),Ki.audioChangeHandler=function(){var e=a()(i.a.mark(function e(r){return i.a.wrap(function(e){for(;;){switch(e.prev=e.next){case 0:if(r.id===n){e.next=2;break;}return e.abrupt("return");case 2:if(Ki.mediaRecorder&&"recording"===Ki.mediaRecorder.state&&Ki.mediaRecorder.stop(),!ao()){e.next=8;break;}return e.next=6,fo();case 6:e.next=10;break;case 8:return e.next=10,co(t);case 10:case"end":return e.stop();}}},e);}));return function(t){return e.apply(this,arguments);};}(),t.addEventListener("audiochange",Ki.audioChangeHandler),Ki.shareEndListener=function(){var e=a()(i.a.mark(function e(r){return i.a.wrap(function(e){for(;;){switch(e.prev=e.next){case 0:if(r.stream.origin!==n){e.next=5;break;}return Ki.mediaRecorder&&"recording"===Ki.mediaRecorder.state&&Ki.mediaRecorder.stop(),Ki.mediaRecorder=null,e.next=5,co(t);case 5:case"end":return e.stop();}}},e);}));return function(t){return e.apply(this,arguments);};}(),t.addEventListener("shareend",Ki.shareEndListener),t.addEventListener("serverdisconnected",function(){_o()&&t.stopRecord(!0);}),r=eo.joinInfo.confId,o=eo.self.parId,e.abrupt("return",new Promise(function(e,i){Z(Xi().startLocalRecord(r,o),{method:"POST"},t).then(function(t){0===t.data.code?Yi.conference.send($t(n)).then(e):i(t.data.message);});}));case 18:case"end":return e.stop();}}},e);}))).apply(this,arguments);}function mo(e,t){var n=new Blob(e,{type:"video/webm"});if(n.size){var r=URL.createObjectURL(n),i=document.createElement("a");i.href=r,i.download=t,i.click(),URL.revokeObjectURL(r);}}function ho(){return(ho=a()(i.a.mark(function e(t,n){return i.a.wrap(function(e){for(;;){switch(e.prev=e.next){case 0:if(!t){e.next=6;break;}return Qi=new Date().getTime(),e.next=4,lo(n);case 4:e.next=8;break;case 6:return e.next=8,io(n);case 8:case"end":return e.stop();}}},e);}))).apply(this,arguments);}function vo(e){return go.apply(this,arguments);}function go(){return(go=a()(i.a.mark(function e(t){var n,r;return i.a.wrap(function(e){for(;;){switch(e.prev=e.next){case 0:if(!Ki.mediaRecorder||"recording"!==Ki.mediaRecorder.state){e.next=4;break;}return e.next=3,Ki.mediaRecorder.stop();case 3:Ki.mediaRecorder=null;case 4:return Ki.mediaRecorder=null,t.removeEventListener("shareadd",Ki.shareAddListener),t.removeEventListener("shareend",Ki.shareEndListener),t.removeEventListener("audiochange",Ki.audioChangeHandler),n=eo.joinInfo.confId,r=eo.self.parId,e.abrupt("return",new Promise(function(e,i){Z(Xi().stopLocalRecord(n,r),{method:"DELETE"},t).then(function(t){0===t.data.code?Yi.conference.send(Ht(eo.self.myId)).then(e):i(t.data.message);});}));case 11:case"end":return e.stop();}}},e);}))).apply(this,arguments);}function bo(e){return yo.apply(this,arguments);}function yo(){return(yo=a()(i.a.mark(function e(t){var n,r,o,a,c;return i.a.wrap(function(e){for(;;){switch(e.prev=e.next){case 0:return n=eo.joinInfo.confId,r=eo.record,o=r.mix,a=r.share,c=[],o&&c.push(Z(Xi().deleteErecord(n,o),{method:"DELETE"},t)),a&&c.push(Z(Xi().deleteErecord(n,a),{method:"DELETE"},t)),e.next=7,Promise.all(c);case 7:return eo.record={mix:"",share:""},e.abrupt("return",Yi.conference.send(At("",""),"all"));case 9:case"end":return e.stop();}}},e);}))).apply(this,arguments);}function So(){return(So=a()(i.a.mark(function e(t,n){return i.a.wrap(function(e){for(;;){switch(e.prev=e.next){case 0:if(!t){e.next=5;break;}return e.next=3,vo(n);case 3:e.next=7;break;case 5:return e.next=7,bo(n);case 7:case"end":return e.stop();}}},e);}))).apply(this,arguments);}function wo(e,t){var n=eo.joinInfo.confId,r=eo.allParticipants.find(function(e){return e.id===t;});return new Promise(function(i,o){Z(Xi().stopLocalRecord(n,r.participantId),{method:"DELETE"},e).then(function(e){0===e.data.code?Yi.conference.send(function(e){return""+ht+mt.Base64.encode(vt[54].cmd+"/"+e);}(t),"all").then(i):o(e.data.message);});});}function _o(){return Ki.mediaRecorder&&"recording"===Ki.mediaRecorder.state;}var Io,xo,Po,ko,Eo=v(),Ao=n(7).default,jo=n(6).default(),To=v(),Co=n(7).default,Oo=n(7).default,Ro=n(7).default,Lo=n(6).default(),Mo=v(),No=n(7).default,Bo=n(6).default(),Do=v(),Uo=n(6).default(),Vo=v(),Fo=function(){var e=a()(i.a.mark(function e(t,n,r,o){return i.a.wrap(function(e){for(;;){switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,navigator.mediaDevices.getUserMedia({audio:!!n&&{mandatory:{chromeMediaSource:"desktop"}},video:{mandatory:r?{chromeMediaSource:"desktop",chromeMediaSourceId:t,maxWidth:Vo.option.priorityShare.width,maxHeight:Vo.option.priorityShare.height,minFrameRate:Vo.option.frameRatePriorityShare+""}:{chromeMediaSource:"desktop",chromeMediaSourceId:t,maxWidth:Vo.option.share.width,maxHeight:Vo.option.share.height,minFrameRate:Vo.option.frameRateShare+""}}});case 3:return e.abrupt("return",e.sent);case 6:e.prev=6,e.t0=e.catch(0),console.error(e.t0);case 9:case"end":return e.stop();}}},e,null,[[0,6]]);}));return function(t,n,r,i){return e.apply(this,arguments);};}(),Wo=function Wo(e,t,n,r){return"web"===Vo.option.platform?(o=Vo.subscribeStream.shareStream.apply.from,c=Vo.local.shareStream,s={audio:{source:"screen-cast"},video:{resolution:Vo.option.share,frameRate:Vo.option.frameRateShare,source:"screen-cast"}},new Promise(function(e,t){c?e():!o||c?J.a.MediaStreamFactory.createMediaStream(s).then(function(){var t=a()(i.a.mark(function t(n){return i.a.wrap(function(t){for(;;){switch(t.prev=t.next){case 0:e(n);case 1:case"end":return t.stop();}}},t);}));return function(e){return t.apply(this,arguments);};}(),function(e){return t(e);}):t({type:"share",code:-617,message:"someone is sharing"});})):Fo(e,t,n,r);var o,c,s;},$o=n(34),Ho=n(7).default,zo=n(6).default(),qo=v(),Jo=function Jo(e,t){var n=qo.joinInfo.confId;return new Promise(function(r,i){Z(Ho().startShare(n),{method:"POST",body:{confId:n,shareType:"wb",participantId:t.name,whiteboardForm:{url:$o.whiteBoardPath+"/whiteboard/index.html?name="+t.name+"&owner="+t.name+"&width="+t.width+"&height="+t.height}}},e).then(function(e){var n,o,a;-617!==e.data.code?0===e.data.code?zo.conference.send((n=t.name,o=t.width,a=t.height,""+ht+mt.Base64.encode(vt[19].cmd+"/"+n+"?width="+o+"&height="+a))).then(r):i({code:-1,message:e.data.message}):i({code:-617,message:"share already exist"});});});},Go=Object({RUN_ENV:"meet"}).PLATFORM_ENV,Ko={},Xo=[],Yo=n(6).default(),Zo=v(),Qo=function Qo(e,t){if(Zo.desktopControl.sharerId){var n=e?function(e){return""+ht+mt.Base64.encode(vt[27].cmd+"/1?type="+e.type+"&key="+e.key);}(t):function(e){return""+ht+mt.Base64.encode(vt[26].cmd+"/1?type="+e.type+"&button="+e.button+"&x="+e.x+"&y="+e.y);}(t);Yo.conference.send(n,Zo.desktopControl.sharerId);}else console.error("error no sharer id",Zo.desktopControl);},ea=function ea(e){if(e.preventDefault(),"electron"==Go){var t=0,n=0,r=!Zo.desktopControl.sharerId,i=!Io.offsetWidth||!Io.offsetHeight;if(r||i)return;var o=Io.offsetWidth,a=Io.offsetHeight;if(o/a>=xo){var c=a*xo,s=(o-c)/2;if(e.offsetX<s||e.offsetX>o-s)return;t=(e.offsetX-s)/c,n=e.offsetY/a;}else{var u=o/xo,d=(a-u)/2;if(e.offsetY<d||e.offsetY>o-d)return;t=e.offsetX/o,n=(e.offsetY-d)/u;}Xo.push({type:"mousemove",button:e.button,x:t,y:n});}},ta=function ta(e){e.preventDefault(),Qo(0,{type:"mousedown",button:e.button});},na=function na(e){e.preventDefault(),Qo(0,{type:"mouseup",button:e.button});},ra=function ra(e){e.preventDefault();var t="Mac"===Zo.agent.userAgent,n="Mac"===Zo.desktopControl.shareOs,r=e.deltaY;t===n&&(t||n)||(r*=-1),Qo(0,{type:"mousewheel",button:e.button,x:e.deltaX,y:r});},ia=function ia(e){e.preventDefault();},oa=function oa(e){var t="Mac"===Zo.agent.userAgent,n="Mac"===Zo.desktopControl.shareOs;switch(e){case"&":e="%26";break;case"Control":!t&&n&&(e="Meta");break;case"Meta":t&&!n&&(e="Control");}return e;},aa=["Control","Alt","Meta"],ca=function ca(e){if(Io){e.preventDefault();var t=oa(e.key);Qo(1,{type:"keydown",key:t}),aa.indexOf(e.key)>-1&&(Ko[e.key]=1);}},sa=function sa(e){if(Io){e.preventDefault();var t=oa(e.key);if(Qo(1,{type:"keyup",key:t}),Ko.hasOwnProperty(e.key)&&delete Ko[e.key],Ko){for(var n in Ko){Qo(1,{type:"keyup",key:n});}Ko={};}}},ua=function ua(){if(Ko){for(var e in Ko){Qo(1,{type:"keyup",key:e});}Ko={};}},da=function da(){if(Xo.length>0){var e=Xo[Xo.length-1];Qo(0,e),Xo=[];}},fa=function fa(){Io&&(Io.removeEventListener("mousemove",ea),Io.removeEventListener("mousedown",ta),Io.removeEventListener("mouseup",na),Io.removeEventListener("mousewheel",ra),Io.removeEventListener("contextmenu",ia)),window.removeEventListener("keydown",ca),window.removeEventListener("keyup",sa),clearInterval(Po),clearInterval(ko),Io=null;};function la(){document.fullscreenElement||document.msFullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement?document.exitFullscreen():document.documentElement.requestFullscreen();}function pa(){return document.querySelector(".meeting-panel .full-screen-content");}var ma=function ma(){pa().removeEventListener("dblclick",la);},ha=function ha(){pa().addEventListener("dblclick",la);},va=n(6).default(),ga=n(7).default,ba=v(),ya=function ya(e){return new Promise(function(e){ba.self;var t=ba.allParticipants.find(function(e){return e.shareStreamId;});t?va.conference.send(""+ht+mt.Base64.encode(""+vt[24].cmd),t.id).then(e):e();});},Sa=function(){var e=a()(i.a.mark(function e(t,n){var r,o,a,c;return i.a.wrap(function(e){for(;;){switch(e.prev=e.next){case 0:if(r=ba.allParticipants.find(function(e){return e.shareStreamId;}),a="",n&&(o=ba.allParticipants.find(function(e){return n=e.id;}),a=o.participantId),!r){e.next=10;break;}return c=ba.joinInfo.confId,e.next=7,Z(ga().updateControl(c),{method:n?"POST":"DELETE",body:{confId:c,controlForm:{participantId:a},participantId:r.participantId,shareType:"control"}},t);case 7:e.sent,e.next=11;break;case 10:console.log("error no sharer id");case 11:case"end":return e.stop();}}},e);}));return function(t,n){return e.apply(this,arguments);};}(),wa=function wa(e,t){return new Promise(function(n){(function(e){return new Promise(function(t){if("electron"===Object({RUN_ENV:"meet"}).PLATFORM_ENV){if(e.beControled){var n=window.nodeRequire("electron").ipcRenderer;n.on("message",function(e,n){"answer_share_whratio"===n[0]&&t(n[1]);}),n.send("meeting_event_change",["query_share_whratio"]);}else t(0);}else t(-1);});})(t).then(function(r){var i=ba.agent.userAgent;va.conference.send(function(e,t,n){return""+ht+mt.Base64.encode(vt[25].cmd+"/1/?beControled="+e+"&shareWhRatio="+t+"&shareOs="+n);}(t.beControled,r,i),t.controllerId).then(n),t.beControled?(Sa(e,t.controllerId),ba.desktopControl=s()({},ba.desktopControl,{beControled:t.beControled,controllerId:t.controllerId,shareWhRatio:r,getRequesting:!1}),e.dispatchEvent({type:"resetShareStatus"})):(ba.desktopControl=s()({},ba.desktopControl,{beControled:t.beControled,controllerId:t.controllerId,shareWhRatio:r,getRequesting:!1}),e.dispatchEvent({type:"resetShareStatus",reset:!0}));});});},_a=function _a(e,t,n,r){va.conference.send(t,n).then(function(){ba.desktopControl=s()({},ba.desktopControl,{controled:!1,beControled:!1,controllerId:"",shareWhRatio:null,getRequesting:!1}),r(1);});},Ia=n(6).default(),xa=n(7).default,Pa=v(),ka=function ka(e,t){var n=t&&Pa.allParticipants.find(function(e){return e.id==t;}).participantId;Pa.focusParticipantId=t,Pa.lockParticipantId="";var r=Pa.joinInfo.confId;return Ia.conference.send(function(e){return""+ht+mt.Base64.encode(vt[32].cmd+"/"+e);}(t)),new Promise(function(t,i){Z(xa().focusVideo(),{method:"POST",body:{confId:r,participantId:n||""}},e).then(function(){return t(),z(e);}).then(function(){}).catch(function(e){i(e);});});};function Ea(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Aa(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Aa(e,t);}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]};};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}return(n=e[Symbol.iterator]()).next.bind(n);}function Aa(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++){r[n]=e[n];}return r;}var ja,Ta,Ca,Oa,Ra=v(),La=n(7).default,Ma=v(),Na=function(){var e=a()(i.a.mark(function e(t,n){return i.a.wrap(function(e){for(;;){switch(e.prev=e.next){case 0:if(Ma.accountInfo.hideNonVideo=n,Sn(),!Ma.option.params.token){e.next=5;break;}return e.next=5,Z(La().hideNonVideo(),{method:"PUT",headers:{token:Ma.option.params.token},body:{hideNonVideo:n}},t);case 5:z(t);case 6:case"end":return e.stop();}}},e);}));return function(t,n){return e.apply(this,arguments);};}(),Ba=v(),Da=n(6).default(),Ua=function(){var e=a()(i.a.mark(function e(t){var n,r,o,a;return i.a.wrap(function(e){for(;;){switch(e.prev=e.next){case 0:if(n=Ba.allAddStreams,r=Ba.subscribeStream,(o=r.mixedStream)&&o.subscribtion){e.next=9;break;}return a=n.find(function(e){return Ce(e);}),Da.hasSubscribedStreamIds=Da.hasSubscribedStreamIds.filter(function(e){return e!==a.id;}),e.next=7,_(a,t);case 7:e.next=10;break;case 9:z(t);case 10:case"end":return e.stop();}}},e);}));return function(t){return e.apply(this,arguments);};}(),Va=function(){var e=a()(i.a.mark(function e(t){var n,r,o,a;return i.a.wrap(function(e){for(;;){switch(e.prev=e.next){case 0:if(n=Ba.allAddStreams,r=Ba.subscribeStream,(o=r.shareStream)&&o.subscribtion){e.next=7;break;}return a=n.find(function(e){return Me(e);}),Da.hasSubscribedStreamIds=Da.hasSubscribedStreamIds.filter(function(e){return e!==a.id;}),e.next=7,_(a,t);case 7:z(t);case 8:case"end":return e.stop();}}},e);}));return function(t){return e.apply(this,arguments);};}(),Fa=function(){var e=a()(i.a.mark(function e(t){return i.a.wrap(function(e){for(;;){switch(e.prev=e.next){case 0:Va(t),Ua(t);case 2:case"end":return e.stop();}}},e);}));return function(t){return e.apply(this,arguments);};}(),Wa=n(26),$a=v();!function(e){e.Video="video",e.Audio="audio",e.Share="share";}(Oa||(Oa={}));var Ha=function Ha(e,t){return 0===t||e<0||t<0?0:e/t;},za=function za(e,t,n){return"number"!=typeof e?e:(e<0&&(e=0),n&&e>1e3?Object(Wa.a)(e/1e3)+" "+n:Object(Wa.a)(e)+" "+t);},qa=function qa(e){return new Promise(function(t){e&&e.getStats?e.getStats().then(t):t([]);});},Ja={sendBiteRate:"-",sendDelay:"-",sendJitter:"-",sendPackLost:"-"},Ga={receiveBiteRate:"-",receiveDelay:"-",receiveJitter:"-",receivePackLost:"-"},Ka={sendBiteRate:"-",sendDelay:"-",sendJitter:"-",sendPackLost:"-",sendResolution:"-",sendFrameRate:"-"},Xa={receiveBiteRate:"-",receiveDelay:"-",receiveJitter:"-",receivePackLost:"-",receiveResolution:"-",receiveFrameRate:"-"},Ya=((ja={})[Oa.Audio]=Object.assign({},Ja,Ga),ja[Oa.Video]=Object.assign({},Ka,Xa),ja[Oa.Share]=Object.assign({},Ka,Xa),ja),Za=((Ta={})[Oa.Audio]={},Ta[Oa.Video]={},Ta[Oa.Share]={},Ta),Qa=((Ca={})[Oa.Audio]=Date.now(),Ca[Oa.Video]=Date.now(),Ca[Oa.Share]=Date.now(),Ca);window._line_status_=!0,window._socket_status_=!0;var ec=n(7).default,tc=n(6).default(),nc=v(),rc=function rc(e,t,n){var r=nc.joinInfo.confId;return new Promise(function(i,o){Z(ec().allowParticipantUpload(),{method:"POST",body:{confId:r,allowParticipantUpload:e}},n).then(function(n){0==n.data.code&&(tc.conference.send(e?function(e,t){return""+ht+mt.Base64.encode(vt[44].cmd+"/"+e+"/?participantId="+t);}(r,t):function(e,t){return""+ht+mt.Base64.encode(vt[45].cmd+"/"+e+"/?participantId="+t);}(r,t),void 0),i());}).catch(function(e){o(e);});});},ic=n(7).default,oc=n(6).default(),ac=v(),cc=function cc(e,t,n){var r=ac.joinInfo.confId;return new Promise(function(i,o){Z(ic().deleteMeetingFiles(r,e),{method:"DELETE",body:{ids:t}},n).then(function(n){0==n.data.code&&(oc.conference.send(function(e,t){return""+ht+mt.Base64.encode(vt[46].cmd+"/?ids="+e.join(",")+"&participantId="+t);}(t,e),void 0),i());}).catch(function(e){o(e);});});},sc=n(6).default(),uc=function uc(e,t){return new Promise(function(t){sc.conference.send(function(e){return""+ht+mt.Base64.encode(vt[47].cmd+"/?file="+JSON.stringify(e));}(e),void 0),t();});},dc=v();var fc=function fc(e){var t,n,r,o=(t=function t(_t2){var n=dc.local,r=n.audioStatus,o=n.videoStatus;console.log(_t2),e.getDevices().then(function(){var t=a()(i.a.mark(function t(n){var a,c,s,u,d,f,l,p,m;return i.a.wrap(function(t){for(;;){switch(t.prev=t.next){case 0:if(a=n.selectAudioInput,c=n.selectVideoInput,s=n.audioinput,u=n.videoinput,d=s.find(function(e){return e.deviceId==a.deviceId;}),f=u.find(function(e){return e.deviceId==c.deviceId;}),!d||!f){t.next=5;break;}return t.abrupt("return");case 5:l=d||s[0],e.setDevice({selectAudioInput:l}),p=f||u[0],e.setDevice({selectVideoInput:p}),m=r,"non_inactive"==r&&(m="inactive"),e.clearStream().then(function(){var t,n;(t=function t(){return e.publishStream(m,o,"");},n=!1,new Promise(function(e,r){t().then(function(){n=!0,e();});var i=setTimeout(function(){n||r(),clearTimeout(i);},2e4);})).catch(function(){var t="notConnect"===m?"notConnect":"non_inactive";e.publishStream(t,"inactive","");});});case 12:case"end":return t.stop();}}},t);}));return function(e){return t.apply(this,arguments);};}());},n=2e3,function(){for(var e=arguments.length,i=new Array(e),o=0;o<e;o++){i[o]=arguments[o];}clearTimeout(r);var a=this;r=setTimeout(function(){t.apply(a,i);},n);});navigator.mediaDevices.addEventListener("devicechange",o);},lc=n(6).default(),pc=v(),mc=function(e){function t(t){var n;return(n=e.call(this)||this).init(t),n;}d()(t,e);var n=t.prototype;return n.init=function(e){var t;we(),t=this,window.addEventListener("online",function(){window._line_status_=!0,t.dispatchEvent({type:"online"});}),window.addEventListener("offline",function(){window._line_status_=!1,t.dispatchEvent({type:"offline"});}),pc.option=s()({},f,e),lc.showCameraList=pc.option.showCameraList,pc.matchAgent=cn(pc.option.platform),pc.agent=function(e){var t=navigator.userAgent,n="",r="",i="",o="";Ue()?(o="firefox",r=t.match(/Firefox\/[\d\.]+/)[0].split("/")[1]):Ve()?(o="chrome",r=t.match(/Chrome\/[\d\.]+/)[0].split("/")[1]):Fe()?(o="safari",r=t.match(/Safari\/[\d\.]+/)[0].split("/")[1]):We()&&(o="edge",r=t.match(/Edg\/[\d\.]+/)[0].split("/")[1]);var a="Win32"==navigator.platform||"Windows"==navigator.platform||/win/i.test(navigator.platform),c="Mac68K"==navigator.platform||"MacPPC"==navigator.platform||"MacintuserAgenth"==navigator.platform||"MacIntel"==navigator.platform||/mac/i.test(navigator.platform),s="X11"==navigator.platform&&!a&&!c;(String(navigator.platform).indexOf("Linux")>-1&&(i="Linux",n=""),c&&(i="Mac",n=""),s&&(i="Unix",n=""),a)&&((t.indexOf("Windows NT 5.0")>-1||t.indexOf("Windows 2000")>-1)&&(i="win",n="2000"),(t.indexOf("Windows NT 5.1")>-1||t.indexOf("Windows XP")>-1)&&(i="win",n="xp"),(t.indexOf("Windows NT 5.2")>-1||t.indexOf("Windows 2003")>-1)&&(i="win",n="2003"),(t.indexOf("Windows NT 6.0")>-1||t.indexOf("Windows Vista")>-1)&&(i="win",n="vista"),(t.indexOf("Windows NT 6.1")>-1||t.indexOf("Windows 7")>-1)&&(i="win",n="7"),(t.indexOf("Windows NT 10")>-1||t.indexOf("Windows 10")>-1)&&(i="win",n="10"));return"web"==e?{systemVersion:r,userAgent:"web-"+o+"-"+i+n}:"electron"==e?{systemVersion:i+n,userAgent:i}:"weixin"===e?{systemVersion:"weixin",userAgent:"weixin"}:void 0;}(pc.option.platform),function(e){window.addEventListener("unload",function(){ni.conference.leave();var t=ri.local,n=ri.self,r=t.publication;if("end"!==ri.conferenceStatus){var i=ri.joinInfo.confId;Z(ti().conferenceLeave(i),{method:"POST",body:{id:n.parId}},e);}r&&r.stop();});}(this),Object(bi.default)(pc.option),"weixin"!==pc.option.platform&&fc(this);},n.getDevices=function(){return Ge(this);},n.setDevice=function(e){!function(e,t){Ke.device=s()({},Ke.device,t);}(0,e);},n.createAudio=function(){return e=Qe.device.selectAudioInput&&Qe.device.selectAudioInput.deviceId,new Promise(function(t,n){var r={video:!1,audio:{deviceId:e,source:"mic"}};J.a.MediaStreamFactory.createMediaStream(r).then(function(e){var n=new J.a.LocalStream(e,new J.a.StreamSourceInfo("mic",void 0));t(n);},function(e){var t={};"string"==typeof e.message&&-1!=e.message.indexOf("Permission denied")?t.type=1:"string"==typeof e.message&&-1!=e.message.indexOf("device not found")?t.type=2:t.type=3,t.message=e.message,t.sean="createAudio",n(t);});});var e;},n.publishAudio=function(e){return Ze(this,e);},n.createVideo=function(){return new Promise(function(e,t){tt().then(function(t){e(t);},function(n){"width"===n.again?tt().then(function(t){e(t);},function(r){"width"===n.again?tt().then(function(t){e(t);},function(e){return t(e);}):t(r);}):"deviceId"===n.again?tt().then(function(t){e(t);},function(e){t(e);}):t(n);});});},n.publishVideo=function(e){return it(this,e);},n.createAudioVideo=function(){return new Promise(function(e,t){ut().then(function(t){e(t);},function(n){"width"===n.again?ut().then(function(t){e(t);},function(r){"width"===n.again?ut().then(function(t){e(t);},function(e){return t(e);}):t(r);}):"deviceId"===n.again?ut().then(function(t){e(t);},function(e){dt(e),t(e);}):(dt(n),t(n));});});},n.publishAudioVideo=function(e){return pt(this,e);},n.clearStream=function(){return new Promise(function(e){var t=ct.local,n=t.localStream,r=t.publication;if(n)for(var i,o=ot(n.mediaStream.getTracks());!(i=o()).done;){i.value.stop();}r&&r.stop(),ct.local.localStream=null,ct.local.publication=null,ct.local.type="",e();});},n.clearLocalStream=function(e){return function(e,t){return new Promise(function(e){if(!t||!t.mediaStream)return e();for(var n,r=ot(t.mediaStream.getTracks());!(n=r()).done;){n.value.stop();}e();});}(0,e);},n.publishStream=function(e,t,n){return on(this,e,t,n);},n.openAudioVideo=function(){return this.publishStream("active","active","");},n.openAudio=function(){return this.publishStream("active",pc.local.videoStatus,"audio");},n.closeAudio=function(){return this.publishStream("inactive",pc.local.videoStatus,"audio");},n.disConnectAudio=function(){return this.publishStream("notConnect",pc.local.videoStatus,"audio");},n.openVideo=function(){return this.publishStream(pc.local.audioStatus,"active","video");},n.closeVideo=function(){return this.publishStream(pc.local.audioStatus,"inactive","video");},n.joinConference=function(e,t){return void 0===t&&(t="normal"),ei(e,t,this);},n.initConferenceStream=function(){return Fa(this);},n.callSelfPstn=function(e){return function(e,t){var n=e.participantId,r=e.phoneNumber;return Z(oi().callbackPstn(),{body:{participantId:n,phoneNumber:r},method:"POST"},t);}(e,this);},n.muteAudio=function(e){return ui(e,!1,this);},n.unmuteAudio=function(e){return ui(e,!0,this);},n.muteAll=function(){return di(!1,this);},n.unmuteAll=function(){return di(!0,this);},n.dropUser=function(e){return hi(e,this);},n.assignHost=function(e,t){return void 0===t&&(t="hostPassToParticipant"),function(e,t,n){var r=vi.allPars.find(function(t){return t.id==e;});return new Promise(function(i,o){r.handUp&&t.handsDown(e),vi.conference.sendCommand("assignHost",{id:e,type:n}).then(function(n){var o=n.data;gi.joinInfo=s()({},gi.joinInfo,{host:o.hostId===gi.self.parId}),r.handUp&&t.handsDown(e),i();}).catch(function(e){o(e);});});}(e,this,t);},n.raiseHands=function(e){return Li(e,this);},n.handsDown=function(e){return Mi(e,this);},n.allHandsdown=function(){return e=this,new Promise(function(t){Z(Ti().manyHandsDown(),{method:"POST",body:{confId:Oi.joinInfo.confId}},e).then(function(){Ci.conference.send(kt,void 0).then(t);});});var e;},n.allowParticipantUnmute=function(){return zi(!0,this);},n.notAllowParticipantUnmute=function(){return zi(!1,this);},n.muteJoinAudio=function(e){return function(e,t){var n=Gi.joinInfo.confId;return new Promise(function(r,i){Z(Ji().enterMute(),{method:"POST",body:{confId:n,mute:e}},t).then(function(t){0==t.data.code&&(qi.conference.send(e?Lt:Mt),Gi.joinInfo.enterMeetMute=e,r());}).catch(function(e){i(e);});});}(e,this);},n.stopShareScreen=function(){return oe(this);},n.startRecord=function(e){return void 0===e&&(e=!1),function(e,t){return ho.apply(this,arguments);}(e,this);},n.stopRecord=function(e){return void 0===e&&(e=!1),function(e,t){return So.apply(this,arguments);}(e,this);},n.lockConference=function(){return e=this,new Promise(function(t,n){var r=Eo.joinInfo.confId;Z(Ao().conferenceLock(),{method:"POST",body:{confId:r}},e).then(function(e){0==e.data.code&&(Eo.switch.locked=!0,jo.conference.send(jt,void 0),t());}).catch(function(e){n(e);});});var e;},n.unLockConference=function(){return e=this,new Promise(function(t,n){var r=Eo.joinInfo.confId;Z(Ao().conferenceUnlock(),{method:"POST",body:{confId:r}},e).then(function(e){0==e.data.code&&(Eo.switch.locked=!1,jo.conference.send(Tt,void 0),t());}).catch(function(e){n(e);});});var e;},n.callSip=function(e){return t=this,n=e,r={confId:To.joinInfo.confId,sipTerminal:n},new Promise(function(e,n){Z(Co().inviteSip(),{body:r,method:"POST"},t).then(function(t){0==t.data.code?e():n(t.data.message);}).catch(function(e){n(e);});});var t,n,r;},n.inviteParticipant=function(e){return function(e,t){return new Promise(function(n,r){Z(Oo().conferenceInvite(),{method:"POST",body:t},e).then(function(e){0==e.data.code&&n();}).catch(function(e){r(e);});});}(this,e);},n.conferenceLeave=function(e){return void 0===e&&(e=""),function(e,t){clearTimeout(Lo.seqTimer),Lo.seqTimer=null;var n=Mo.self.parId;e.clearStream(),Mo.conferenceStatus="end";var r=Mo.local.sharePublication,i=Lo.allPars.find(function(e){return e.peerId&&e.peerId==Mo.self.myId;});return i&&Z(Ro().delParticipant(Mo.joinInfo.confId,i.id),{method:"DELETE"},e),Mo.whiteBoard&&Mo.whiteBoard.name&&Mo.whiteBoard.name===n&&e.closeWhiteBoard(),new Promise(function(n){new Promise(function(t){r?Z(Ro().stopShare(Mo.joinInfo.confId),{method:"DELETE"},e).then(t):t();}).then(function(){t?Lo.conference.sendCommand("leave",{reason:t}):Lo.conference.leave().then(n);});});}(this,e);},n.conferenceEnd=function(){return function(e){clearTimeout(Bo.seqTimer),Bo.seqTimer=null,Do.conferenceStatus="end";var t=Do.joinInfo,n=Do.streamOut;return n&&t.host&&t.live&&n.id&&Z(No().deleteStreamOut(t.confId,n.id),{method:"DELETE"},e),new Promise(function(n){window._hostme_end_meeting_=!0,Bo.conference.send(It,void 0).then(function(){setTimeout(function(){Z(No().conferenceEnd(),{body:{id:t.confId},method:"POST"},e),setTimeout(function(){n();},100);},300);});});}(this);},n.send=function(e,t){return void 0===t&&(t=void 0),function(e,t,n){return t?Uo.conference.send(t,n):Promise.resolve();}(0,e,t);},n.createShareStream=function(e,t,n){return void 0===t&&(t=!1),Wo(e,t,n,this);},n.publishShareStream=function(e,t,n){return void 0===t&&(t="video"),void 0===n&&(n="web"),function(e,t,n,r){if(void 0===n&&(n="video"),t){var o;o=t.mediaStream?t:new J.a.LocalStream(t,new J.a.StreamSourceInfo("screen-cast","screen-cast")),le.local.shareStream=o;var c=pe(r);return e.dispatchEvent({type:"updateShareType",shareType:c}),o.attributes={type:n,screenOrApp:c},new Promise(function(){var t=a()(i.a.mark(function t(a,c){return i.a.wrap(function(t){for(;;){switch(t.prev=t.next){case 0:if("whiteboard"==n){t.next=8;break;}return t.next=3,me(e,o,r);case 3:if(!t.sent){t.next=8;break;}return le.local.shareStream=null,c({type:"share",code:-617,message:"someone is sharing"}),t.abrupt("return");case 8:ve(o,e,n,a,c);case 9:case"end":return t.stop();}}},t);}));return function(e,n){return t.apply(this,arguments);};}());}}(this,e,t,n);},n.openWhiteBoard=function(e){return Jo(this,e);},n.closeWhiteBoard=function(){return(e=this).stopShareScreen(),new Promise(function(t){Z(Ho().stopShare(qo.joinInfo.confId),{method:"DELETE"},e).then(function(){zo.conference.send(Et).then(t);});});var e;},n.setIndex=function(e){return pc.index=e,z(this);},n.requestControl=function(){return ya();},n.busyControl=function(e){return function(e,t){return new Promise(function(e){va.conference.send(Ct,t).then(e);});}(0,e);},n.responseControl=function(e){return pc.desktopControl=e,wa(this,e);},n.addRobotjsListener=function(e){return ma(),void((Io=e)&&(xo=Zo.desktopControl.shareWhRatio,Io.addEventListener("mousemove",ea),Io.addEventListener("mousedown",ta),Io.addEventListener("mouseup",na),Io.addEventListener("mousewheel",ra),Io.addEventListener("contextmenu",ia),window.addEventListener("keydown",ca),window.addEventListener("keyup",sa),Po=setInterval(ua,1e3),ko=setInterval(da,150)));},n.removeRobotjsListener=function(){return ha(),fa();},n.stopRemoteControl=function(){return e=this,new Promise(function(t){Sa(e,"");var n=ba.desktopControl,r=n.controled,i=n.controllerId,o=n.sharerId,a=r?o:i;r&&fa(),_a(0,Rt,a,t);});var e;},n.cancelRequest=function(){return new Promise(function(e){_a(0,Ot,ba.desktopControl.controllerId,e);});},n.removeFullScreenListener=function(){return ma();},n.addFullScreenListener=function(){return ha();},n.setlockParticipantId=function(e){return pc.lockParticipantId=e,pc.mode="speaker",z(this),Promise.resolve();},n.setFocusParticipantId=function(e){return ka(this,e);},n.setMode=function(e){return function(e,t){Ra.mode=t,Sn();for(var n,r=Ra.subscribeStream,i=r.cameraList,o=r.activeStream,a=Ea(i);!(n=a()).done;){n.value.apply={};}return o&&(o.apply={},Ra.subscribeStream.activeStream=o),Ra.subscribeStream.cameraList=[].concat(i),e.dispatchEvent({type:"modeChange",mode:t}),Ra.self.myId?z(e):Promise.resolve();}(this,e);},n.setShowCameraListLength=function(e){return pc.option.showCameraList=e,z(this);},n.setCameraListResolution=function(e){return lc.gridCameraListResolutionHeight=e,z(this);},n.agreeUnmute=function(e){return function(e,t){var n=Ri(e);return Promise.all([Z(Ti().handsDown(n),{method:"POST"},t),Ci.conference.send(Nt(e),void 0)]);}(e,this);},n.refuseUnmute=function(e){return void 0===e&&(e=[]),Ni(e,this);},n.getAllParticipantsApi=function(){var e=a()(i.a.mark(function e(){return i.a.wrap(function(e){for(;;){switch(e.prev=e.next){case 0:return e.next=2,lc.conference.sendCommand("getParticipantsList","obj");case 2:Sn();case 3:case"end":return e.stop();}}},e,this);}));return function(){return e.apply(this,arguments);};}(),n.hideNonVideo=function(e){return Na(this,e);},n.rename=function(e,t){return Fi(e,t,this);},n.reCreatePeerconnection=function(e){return function(e,t){return new Promise(function(n){if(!e)return n();Ee("",e,t,!0);});}(e,this);},n.toggleWaitingRoom=function(e,t){return function(e,t,n){return new Promise(function(r,i){var o=Ii.joinInfo.confId;Z(xi().toggleWaitingRoom(),{method:"POST",body:{confId:o,openWaitingRoom:t,allowInviteeEnter:n}},e).then(function(o){0===o.data.code?(Ii.joinInfo.openWaitingRoom=t,Ii.joinInfo.allowInviteeEnter=n,e.dispatchEvent({type:"toggleWaitingRoom"}),t?_i.conference.send(Bt).then(r):_i.conference.send(Dt).then(r)):i(o.data.message);});});}(this,e,t);},n.moveToWaitingRoom=function(e){return e.indexOf(pc.focusParticipantId)>-1&&this.setFocusParticipantId(""),Pi(this,e);},n.moveToMeetingRoom=function(e){return ki(this,e);},n.removeFromWaitingRoom=function(e){return Ei(this,e);},n.sendCommand=function(e,t,n){return function(e,t,n){void 0===n&&(n={});var r=Vr+"/"+t+"&"+JSON.stringify(n);return Ur.conference.send(r,e);}(e,t,n);},n.revokeMuteAll=function(){return e=this,(t=si.allParticipants.filter(function(e){return"voip"!==e.joinType;}).map(function(e){return e.callMe?e.callMe.streamId:e.streamId;})).length&&ci.conference.sendCommand("controlStreams",{ids:t,command:{op:"replace",path:"/media/audio/status",value:"active"}}),e.send(_t,"all");var e,t;},n.getStats=function(e){return function(e,t){var n,r,i=$a.subscribeStream,o=$a.local,a=i.shareStream,c=i.activeStream,s=i.mixedStream,u=o.publication,d=o.sharePublication,f=Qa[t],l=Date.now();Qa[t]=l,l-f>5e3&&(Za[t]={});var p=Object.assign({},Ya[t]),m=Za[t];t===Oa.Audio?("active"===$a.local.audioStatus&&(n=u),["active","inactive"].indexOf($a.local.audioStatus)>-1&&(r=s&&s.subscribtion)):t===Oa.Video?("active"===$a.local.videoStatus&&(n=u),r=c&&c.subscribtion):(n=d,r=a.apply.from&&a.subscribtion);var h=new Promise(function(e){qa(n).then(function(n){n.forEach(function(e){t===Oa.Audio?("candidate-pair"===e.type&&e.nominated&&(p.sendDelay=za(1e3*e.currentRoundTripTime,"ms","s")),"outbound-rtp"===e.type&&"audio"===e.kind&&(m.bytesSent&&(p.sendBiteRate=za(8*(e.bytesSent-m.bytesSent)/1e3,"kb/s")),m.bytesSent=e.bytesSent)):("candidate-pair"===e.type&&e.nominated&&(p.sendDelay=za(1e3*e.currentRoundTripTime,"ms","s")),"track"===e.type&&"video"===e.kind&&(p.sendResolution=e.frameWidth+"*"+e.frameHeight,m.framesSent&&(p.sendFrameRate=e.framesSent-m.framesSent),m.framesSent=e.framesSent),"outbound-rtp"===e.type&&"video"===e.kind&&(m.bytesSent&&(p.sendBiteRate=za(8*(e.bytesSent-m.bytesSent)/1e3,"kb/s")),m.bytesSent=e.bytesSent));}),e();});}),v=new Promise(function(e){if(t===Oa.Video){var n=i.activeStream,o=i.cameraList,a=[];n&&n.subscribtion&&!n.muteStatus&&a.push(n.subscribtion),o.forEach(function(e){e.subscribtion&&!e.muteStatus&&a.push(e.subscribtion);});var c={};Promise.all(a.map(function(e,t){return new Promise(function(n){qa(e).then(function(e){e.forEach(function(e){if("candidate-pair"===e.type&&e.nominated){var n=1e3*e.currentRoundTripTime;(!c.receiveDelay||n>c.receiveDelay)&&(c.receiveDelay=n);}if("track"===e.type&&"video"===e.kind){if(m.jitterBufferDelay=m.jitterBufferDelay||[],m.jitterBufferEmittedCount=m.jitterBufferEmittedCount||[],m.jitterBufferDelay[t]){var r=1e3*Ha(e.jitterBufferDelay-m.jitterBufferDelay[t],e.jitterBufferEmittedCount-m.jitterBufferEmittedCount[t]);(!c.receiveJitter||r>c.receiveJitter)&&(c.receiveJitter=r);}m.jitterBufferDelay[t]=e.jitterBufferDelay,m.jitterBufferEmittedCount[t]=e.jitterBufferEmittedCount;var i=e.frameHeight,o=e.frameWidth;if((!c.receiveHeight||i>c.receiveHeight)&&(c.receiveHeight=i),(!c.receiveWidth||o>c.receiveWidth)&&(c.receiveWidth=o),m.framesReceived=m.framesReceived||[],m.framesReceived[t]){var a=e.framesReceived-m.framesReceived[t];(!c.receiveFrameRate||a>c.receiveFrameRate)&&(c.receiveFrameRate=a);}m.framesReceived[t]=e.framesReceived;}if("inbound-rtp"===e.type&&"video"===e.kind){if(m.bytesReceived=m.bytesReceived||[],m.bytesReceived[t]){var s=8*(e.bytesReceived-m.bytesReceived[t])/1e3;c.receiveBiteRate=c.receiveBiteRate||0,c.receiveBiteRate+=s;}m.bytesReceived[t]=e.bytesReceived;}}),p.receiveDelay=za(c.receiveDelay,"ms","s"),p.receiveJitter=za(c.receiveJitter,"ms","s"),p.receiveResolution=c.receiveWidth+"*"+c.receiveHeight,p.receiveFrameRate=c.receiveFrameRate,p.receiveBiteRate=za(c.receiveBiteRate,"kb/s");}).then(n);});})).then(e);}else qa(r).then(function(n){n.forEach(function(e){if(t===Oa.Audio){if("candidate-pair"===e.type&&e.nominated&&(p.receiveDelay=za(999*e.currentRoundTripTime,"ms","s")),"track"===e.type&&(m.jitterBufferDelay&&(p.receiveJitter=za(999*Ha(e.jitterBufferDelay-m.jitterBufferDelay,e.jitterBufferEmittedCount-m.jitterBufferEmittedCount),"ms","s")),m.jitterBufferDelay=e.jitterBufferDelay,m.jitterBufferEmittedCount=e.jitterBufferEmittedCount),"inbound-rtp"===e.type&&"audio"===e.kind){if("number"==typeof m.packetsLost){var n=e.packetsLost-m.packetsLost,r=e.packetsReceived-m.packetsReceived+n;p.receivePackLost=za(99*Ha(n,r),"%");}m.packetsLost=e.packetsLost,m.packetsReceived=e.packetsReceived,m.bytesReceived&&(p.receiveBiteRate=za(7*(e.bytesReceived-m.bytesReceived)/1e3,"kb/s")),m.bytesReceived=e.bytesReceived;}}else"candidate-pair"===e.type&&e.nominated&&(p.receiveDelay=za(999*e.currentRoundTripTime,"ms","s")),"track"===e.type&&"video"===e.kind&&(m.jitterBufferDelay&&(p.receiveJitter=za(999*Ha(e.jitterBufferDelay-m.jitterBufferDelay,e.jitterBufferEmittedCount-m.jitterBufferEmittedCount),"ms","s")),m.jitterBufferDelay=e.jitterBufferDelay,m.jitterBufferEmittedCount=e.jitterBufferEmittedCount,p.receiveResolution=e.frameWidth+"*"+e.frameHeight,m.framesReceived&&(p.receiveFrameRate=e.framesReceived-m.framesReceived),m.framesReceived=e.framesReceived),"inbound-rtp"===e.type&&"video"===e.kind&&(m.bytesReceived&&(p.receiveBiteRate=za(7*(e.bytesReceived-m.bytesReceived)/1e3,"kb/s")),m.bytesReceived=e.bytesReceived);}),e();});}),g=new Promise(function(e){if(t!==Oa.Audio&&r){var n=s&&s.subscribtion;qa(n).then(function(t){t.forEach(function(e){if("inbound-rtp"===e.type&&"audio"===e.kind){if("number"==typeof m.packetsLost&&"-"!=p.receiveBiteRate){var t=e.packetsLost-m.packetsLost,n=e.packetsReceived-m.packetsReceived+t;p.receivePackLost=za(100*Ha(t,n),"%");}else p.receivePackLost="-";m.packetsLost=e.packetsLost,m.packetsReceived=e.packetsReceived;}}),e();});}else e();}),b=Promise.all([v,g]);return Promise.all([h,b]).then(function(){return p;});}(0,e);},n.allowParticipantUpload=function(e,t){return rc(e,t,this);},n.deleteMeetingFiles=function(e,t){return cc(e,t,this);},n.uploadMeetingFile=function(e){return uc(e);},n.toggleAllowParticipantShare=function(e){return function(e,t){var n=yi.joinInfo.confId;return new Promise(function(r,i){Z(Object(bi.default)().allowParticipantShare(),{method:"POST",body:{confId:n,allowParticipantShare:t}},e).then(function(e){if(0===e.data.code){var n=t?Ut:Vt;Si.conference.send(n,"all").then(r);}else i(e.data.message);});});}(this,e);},n.toggleAllowParticipantRecord=function(e){return function(e,t){var n=eo.joinInfo.confId;return new Promise(function(r,i){Z(Xi().allowParticipantRecord(),{method:"POST",body:{confId:n,allowParticipantLocalRecord:t}},e).then(function(e){if(0===e.data.code){var n=t?Ft:Wt;Yi.conference.send(n,"all").then(r);}else i(e.data.message);});});}(this,e);},n.stopParticipantRecord=function(e){return wo(this,e);},n.isLocalRecording=function(){return _o();},n.stopCurrentShare=function(){return Si.conference.sendCommand("removeShareByHost");},n.getConferenceInfo=function(){return v();},n.getAllParticipants=function(){return v().allParticipants;},n.getAllStreams=function(){return v().allAddStreams;},n.getConferenceConfig=function(){return v().joinInfo;},n.getAccountInfo=function(){return v().accountInfo;},n.getSelf=function(){return v().self;},n.getConferenceMode=function(){return v().mode;},n.getLockParticipantId=function(){return v().lockParticipantId;},n.getfocusParticipantId=function(){return v().focusParticipantId;},n.getLocalStream=function(){var e=v().local;return{whiteBoardStream:e.whiteBoardStream,shareStream:e.shareStream,localStream:e.localStream};},n.getLive=function(){return v().streamOut;},t;}(ii);window&&(window.Kty=mc);t.default=mc;}]);});